diff --git a/packages/node_modules/@node-red/editor/public/icons/debug.png b/packages/node_modules/@node-red/editor/public/icons/debug.png deleted file mode 100644 index 05691562d..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/debug.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/envelope.png b/packages/node_modules/@node-red/editor/public/icons/envelope.png deleted file mode 100644 index fb0d36b95..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/envelope.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/feed.png b/packages/node_modules/@node-red/editor/public/icons/feed.png deleted file mode 100644 index 9f2671c53..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/feed.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/file-in.png b/packages/node_modules/@node-red/editor/public/icons/file-in.png deleted file mode 100644 index d3e5cd7fe..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/file-in.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/file-out.png b/packages/node_modules/@node-red/editor/public/icons/file-out.png deleted file mode 100644 index 051f819c8..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/file-out.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/file.png b/packages/node_modules/@node-red/editor/public/icons/file.png deleted file mode 100644 index 78ee09f79..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/file.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/function.png b/packages/node_modules/@node-red/editor/public/icons/function.png deleted file mode 100644 index 909505000..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/function.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/hash.png b/packages/node_modules/@node-red/editor/public/icons/hash.png deleted file mode 100644 index e68e45df1..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/hash.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/inject.png b/packages/node_modules/@node-red/editor/public/icons/inject.png deleted file mode 100644 index dbf4711a3..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/inject.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/join.png b/packages/node_modules/@node-red/editor/public/icons/join.png deleted file mode 100644 index d4a2cffb4..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/join.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/leveldb.png b/packages/node_modules/@node-red/editor/public/icons/leveldb.png deleted file mode 100644 index 55760c7dc..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/leveldb.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/light.png b/packages/node_modules/@node-red/editor/public/icons/light.png deleted file mode 100644 index ce21542bb..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/light.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/link-out.png b/packages/node_modules/@node-red/editor/public/icons/link-out.png deleted file mode 100644 index f39ba0453..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/link-out.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/mongodb.png b/packages/node_modules/@node-red/editor/public/icons/mongodb.png deleted file mode 100644 index 3a1fc11be..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/mongodb.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/mouse.png b/packages/node_modules/@node-red/editor/public/icons/mouse.png deleted file mode 100644 index 5d324d294..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/mouse.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/node-changed.png b/packages/node_modules/@node-red/editor/public/icons/node-changed.png deleted file mode 100644 index 38a179444..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/node-changed.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/node-error.png b/packages/node_modules/@node-red/editor/public/icons/node-error.png deleted file mode 100644 index c20c8e85a..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/node-error.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/parser-csv.png b/packages/node_modules/@node-red/editor/public/icons/parser-csv.png deleted file mode 100644 index 5b1c42c48..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/parser-csv.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/parser-html.png b/packages/node_modules/@node-red/editor/public/icons/parser-html.png deleted file mode 100644 index fa5373713..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/parser-html.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/parser-json.png b/packages/node_modules/@node-red/editor/public/icons/parser-json.png deleted file mode 100644 index 839d60dcb..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/parser-json.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/parser-xml.png b/packages/node_modules/@node-red/editor/public/icons/parser-xml.png deleted file mode 100644 index fa5373713..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/parser-xml.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/parser-yaml.png b/packages/node_modules/@node-red/editor/public/icons/parser-yaml.png deleted file mode 100644 index e4cb2f20b..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/parser-yaml.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/range.png b/packages/node_modules/@node-red/editor/public/icons/range.png deleted file mode 100644 index 2e7183ce8..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/range.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/redis.png b/packages/node_modules/@node-red/editor/public/icons/redis.png deleted file mode 100644 index 92e82fd26..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/redis.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/rpi.png b/packages/node_modules/@node-red/editor/public/icons/rpi.png deleted file mode 100644 index 162b99dc1..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/rpi.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/serial.png b/packages/node_modules/@node-red/editor/public/icons/serial.png deleted file mode 100644 index f4bcedc3b..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/serial.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/sort.png b/packages/node_modules/@node-red/editor/public/icons/sort.png deleted file mode 100644 index f0fb7ead2..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/sort.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/split.png b/packages/node_modules/@node-red/editor/public/icons/split.png deleted file mode 100644 index bda78484f..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/split.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/subflow.png b/packages/node_modules/@node-red/editor/public/icons/subflow.png deleted file mode 100644 index 7c1c14f38..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/subflow.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/swap.png b/packages/node_modules/@node-red/editor/public/icons/swap.png deleted file mode 100644 index e9e70efbd..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/swap.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/switch.png b/packages/node_modules/@node-red/editor/public/icons/switch.png deleted file mode 100644 index 4d172de66..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/switch.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/template.png b/packages/node_modules/@node-red/editor/public/icons/template.png deleted file mode 100644 index 1db6f273d..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/template.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/timer.png b/packages/node_modules/@node-red/editor/public/icons/timer.png deleted file mode 100644 index 4f02f4656..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/timer.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/trigger.png b/packages/node_modules/@node-red/editor/public/icons/trigger.png deleted file mode 100644 index 37b60f118..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/trigger.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/twitter.png b/packages/node_modules/@node-red/editor/public/icons/twitter.png deleted file mode 100644 index d06059453..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/twitter.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/watch.png b/packages/node_modules/@node-red/editor/public/icons/watch.png deleted file mode 100644 index a6c1b9451..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/watch.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/icons/white-globe.png b/packages/node_modules/@node-red/editor/public/icons/white-globe.png deleted file mode 100644 index 8a19079bf..000000000 Binary files a/packages/node_modules/@node-red/editor/public/icons/white-globe.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/about b/packages/node_modules/@node-red/editor/public/red/about deleted file mode 100644 index ee591143f..000000000 --- a/packages/node_modules/@node-red/editor/public/red/about +++ /dev/null @@ -1,1285 +0,0 @@ -#### 0.19: Milestone Release - -Editor - - - Add editorTheme.palette.theme to allow overriding colours - - Index all node properties when searching Fixes #1446 - - Handle NaN and Infinity properly in debug sidebar Fixes #1778 #1779 - - Prevent horizontal scroll when palette name cannot wrap - - Ignore middle-click on node/ports to enable panning - - Better wire layout when looping back - - fix appearence of retry button of remote branch management dialog - - Handle releasing ctrl when using quick-add node dialog - - Add $env function to JSONata expressions - - Widen support for env var to use ${} or $() syntax - - Add env-var support to TypedInput - - Show unknown node properties in info tab - - Add node icon picker widget - - Only edit nodes on dbl click on primary button with no modifiers - - Allow subflows to be put in any palette category - - Add flow navigator widget - - Cache flow library result to improve response time Fixes #1753 - - Add middle-button-drag to pan the workspace - - allow multi-line category name in editor - - Redesign sidebar tabs - - Do not disable the export-clipboard menu option with empty selection - -Nodes - - - Change: Ensure runtime errors in Change node can be caught Fixes #1769 - - File: Add output to File Out node - - Function: add expandable JavaScript editor pane - - Function: allow id and name reference in function node code (#1731) - - HTTP Request: Move to request module - - HTTP: Ensure apiMaxLength applies to HTTP Nodes Fixes #1278 - - Join: accumulate top level properties - - Join: allow environment variable as reduce init value - - JSON: add JSON schema validation via msg.schema - - Pi: Let nrgpio code work with python 3 - - Pi: let Pi nodes be visible/editable on all platforms - - Switch: add isEmpty rule - - TCP: queue messages while connecting; closes #1414 - - TLS: Add servername option to TLS config node for SNI Fixes #1805 - - UDP: Don't accidentally re-use udp port when set to not do so - -Persistent Context - - - Add Context data sidebar - - Add persistable context option - - Add default memory store - - Add file-based context store - - Add async mode to evaluateJSONataExpression - - Update RED.util.evaluateNodeProperty to support context stores - -Runtime - - - Support flow.disabled and .info in /flow API - - Node errors should be Strings not Errors Fixes #1781 - - Add detection of connection timeout in git communication Fixes #1770 - - Handle loading empty nodesDir - - Add 'private' property to userDir generated package.json - - Add RED.require to allow nodes to access other modules - -#### 0.18.7: Maintenance Release - -Editor Fixes - - - Do not trim wires if node declares outputs in defaults but misses value Fixes #1737 - -Node Fixes - - - Relax twitter node version ready for major version bump - - Pass Date into the Function node sandbox to fix instanceof tests - - let TCP in node report remote ip and port when in single packet mode - - typo fix in node help (#1735) - -Other Fixes - - Tidy up default grunt task and fixup test break due to reorder Fixes #1738 - - Bump jsonata version - -#### 0.18.6: Maintenance Release - -Editor Fixes - - - Handle a node having wires in the editor on ports it no longer has Fixes #1724 - - Add missing ACE snippet files - - Fix wireClippedNodes is not defined Fixes #1726 - - Split node html to isolate bad nodes when loading - - Avoid unnecessary use of .html() where .text() will do - - - Add editorTheme.projects.enabled to default settings.js" - -#### 0.18.5: Maintenance Release - -Projects - - - Add clone project to welcome screen - - Handle cloning a project without package.json - - Keep remote branch state in sync between editor and runtime - -New Features - - - Add type checks to switch node options (#1714) - - add output property select to HTML parse node (#1701) - - Add Prevent Following Redirect to HTTP Request node (#615) (#1684) - - Add debug and trace functions to function node (#1654) - - Enable user defined icon for subflow - - Add MQTT disconnect message and rework broker node UI (#1719) - - Japanese message catalogue updates (#1723) - - Show node load errors in the Palette Manager view - -Editor Fixes - - - Highlight subflow node when log msg comes from inside Fixes #1698 - - Ensure node wires array is not longer than outputs value Fixes #1678 - - Allow importing an unknown config node to be undone Fixes #1681 - - Ensure keyboard shortcuts get saved in runtime settings Fixes #1696 - - Don't mark a subflow changed when actually modified nothing (#1665) - -Node Fixes - - - bind to correct port when doing udp broadcast/multicast (#1686) - - Provide full error stack in Function node log message (#1700) - - Fix http request doc type Fixes #1690 - - Make debug slightly larger to pass WCAG AA rating - - Make core nodes labels more consistent, to close #1673 - - Allow template node to be updated more than once Fixes #1671 - - Fix the problem that output labels of switch node sometimes disappear (#1664) - - Chinese translations for core nodes (#1607) - -Runtime Fixes - - - Handle and display for invalid flow credentials when project is disabled #1689 (#1694) - - node-red-pi: fix behavior with old bash version (#1713) - - Fix ENOENT error on first start when no user dir (#1711) - - Handle null error object in Flow.handleError Fixes #1721 - - update settings comments to describe how to setup for ipv6 (#1675) - - Remove credential props after diffing flow to prevent future false positives Fixes #1359 - - Log error if settings unavailable when saving user settings Fixes #1645 - - Keep backup of .config.json - - Add warning if using \_credentialSecret from .config.json - - Filter req.user in /settings to prevent potentially leaking info - -#### 0.18.4: Maintenance Release - -Projects - - - Ensure sshkey file path is properly escaped on Windows - - Normalize ssh key paths for Windows file names - - Ensure userDir is an absolute path when used with sshkeygen - - Detect if there are no existing flows to migrate into a project - - Use relative urls when retriving flow history - - Add credentialSecret to clone pane - - Delay clearing inflight when changing credentials key - - Mark deploy inflight when reverting a file change - - Handle missing_flow_file error on clone properly - - Remote project from cached list on delete so it can be reused - - Fix tests for existing file flag in settings - -Editor Fixes - - - Fix merging a remote diff - - Fixed the problems when using a node without defaults - - Disable user defined icon for subflow - - getDefaultNodeIcon should handle subflow instance nodes Fixes #1635 - - Add Japanese info text for core nodes - - Fix message lookup for core nodes in case of i18 locales directory exists - - Prevent the last tab from being deleted - -Node Fixes - - - Ensure trigger gets reset when 2nd output is null - - -#### 0.18.3: Maintenance Release - -Projects - - - Fix permissions on git/ssh scripts - - Add support for GIT_SSH on older levels of git - - Handle host key verification as auth error - - Ensure commit list has a refs object even if empty - - Make git error detection case-insensitive - - Fix up merge conflict handling - - Use flow-diff when looking at flow file changes - -Node Fixes - - - Ensure debug tools show for 'complete msg object' - - Fix msg.parts handling in concat mode of Batch node - -Editor Fixes - - - Fix offset calculation when dragging node from palette - - Allow a library entry to use non-default node-input- prefixes - - Change remote-diff shortcut and add it to keymap Fixes #1628 - -#### 0.18.2: Maintenance Release - -Projects - - - Filter out %D from git log command for older git versions - - Ensure projects are created as logged in user - - Better error handling/reporting in project creation - - Add Project Settings menu option - - Refresh vc sidebar on remote add/remove - - Fix auth prompt for ssh repos - - Prevent http git urls from including username/pword - - Fix fetch auth handling on non-default remote - - Avoid exception if git not installed - - Check version of git client on startup - - Fix pull/push when no tracked branch - - Add git_pull_unrelated_history handling - - Handle delete of last remote in project settings - -Node Fixes - - - Fix and Add some Chinese translations - - Update sort/batch docs - - Don't assume node has defaults when exporting icon property - - Ensure send is last thing trigger does - - Ensure trigger doesn't set two simultaneous timeouts - - Add missing property select var to HTML node - - Add a default keepalive to tcp client mode - - Move node.send in exec and httprequest nodes - - -#### 0.18.1: Maintenance Release - -Projects - - - Handle more repo clone error cases - - Relax validation of git urls - - Revalidate project name on return to project-details view - - Avoid unnecessary project refresh on branch-switch Fixes #1597 - - Add support for file:// git urls - - Handle project first-run without existing flow file - - Handle delete of last remote in project settings - - Add git_pull_unrelated_history handling - - Fix pull/push when no tracked branch - - Remember to disable projects in editor when git not found - -Node Fixes - - - Trigger node migration - ensure bytopic not blank - - Add HEAD to list of methods with no body in http req node #1598 - - Do not include payload in GET requests Fixes #1598 - - Update sort/batch docs Fixes #1601 - - Don't assume node has defaults when exporting icon property - - -#### 0.18: Milestone Release - -Runtime - - - Beta: Projects - must be enabled in settings file - - Allow port zero for Express (#1363) - - Better error reporting when module provides duplicate type - - Update jsonata to 1.5.0 - - add express-session memorystore without leaks (#1435) - - Allow adminAuth.user to be a Function Fixes #1461 - - Ensure RED.server is set even if admin api disabled - - Ensure strategy login button uses relative URL Fixes #1481 - - ignore `_msgid` when merging full objects - - Move node install to spawn to allow for big stdout Fixes #1488 - - SIGINT handler should wait for stop to complete before exit - -Editor - - - allow a node's icon to be set dynamically (#1490) - - Batch messages sent over comms to increase throughput - - Migrate deploy confirmations to notifications - - `oneditdelete` should be available to all node types Closes #1346 - - Sort typeSearch results based on position of match - - Update ACE to test and add python highlighter (#1373) - - Clear mouse state when typeSearch cancelled Fixes #1517 - - Handle scoped modules via palette editor - - TypedInput: handle user defined value/labels options Fixes #1549 - -Nodes - - - add msg. select to range and yaml nodes - - add property choice to xml, sentiment nodes - - mqtt: Add 'name' to mqtt-broker node, and label it by this if it is set. (#1364) - - Add option to JSON node to ensure particular encoding - - add parts support for HTML node (#1495) - - Add passphrase to TLS node - - Add rc property to exec node outputs 1 and 2 (#1401) - - Add skip first n lines capability to csv node (#1535) - - Add support for rejectUnauthorized msg property - - Add TLS options to WebSocket client - - Added parsed YAML support for template node (#1443) - - Allow delay node in rate-limit mode to be reset Fixes #1360 - - Allow setTimeout in Function node to be promisified in node 8 - - Debug to status option (#1499) - - enable template config via msg.template for stored or generated templates (#1503) - - HTTP REQUEST: Adding PROPPATCH and PROPFIND http methods (#1531) - - Initial support of merge & reduce mode for JOIN node (#1546) - - Initial support of new BATCH node (#1548) - - Initial support of sequence rules for SWITCH node (#1545) - - initial support of SORT node (#1500) - - Inject node - let once delay be editable (#1541) - - Introduce `nodeMaxMessageBufferLength` setting for msg sequence nodes - - Let CSV correct parts if we remove header row. - - let default apply if msg.delay not set in override mode. (#1397) - - let trigger node be reset by boolean message (#1554) - - Let trigger node support per topic mode (#1398) - - let HTML node return empty array for no matching input (#1582) - - MQTT node - if Server/URL config contains '//' use it as a complete url; enabled ws:// and wss:// - - clone messages before delayed send (#1474) - - Decrement connected client count rather than show disconnected - - Don't end mqtt client on first error Fixes #1566 - - File out - create dirs synchronously to ensure they exist Fixes #1489 - - Fix debug message format for Buffer (#1444) - - Fix global.keys() bug in function node (#1417) - - Handle escape characters in template node which uses Mustache format and JSON output mode (#1377) - - Move all node.send to end of timer functions in trigger node (issue #1527) (#1539) - - Publish null/undefined to mqtt as blank not toString Fixes #1521 - - remove inject node at specific time spinner - - restrict inject interval to less that 2^31 millisecs - - tag UDP ports in use properly so they get closed correctly (#1508) - -#### 0.17.5: Maintenance Release - - - Add express-session missing dependency for oauth - - Fix improper type tests is core test cases - - File node: recreate write stream when file deleted Fixes #1351 - - Add flow stopping trace messages - - Fix userDir test case when .config.json exists (#1350) - - Do not try to send msg after http request error handled Fixes #1344 - - Fix boundary problem in range node (#1338) - - Modify messages in node properties to refer messages.json (#1339) - - Fix settings.js replacing webSocketVerifyClient by webSocketNodeVerifyClient (#1343) - - -#### 0.17.4: Maintenance Release - - - Add request node test case for POSTing 0 - - Allow false and 0 in payload for httprequest (#1334) - - Add file extension into flow name of library automatically (#1331) - - Fix accessing global context from jsonata expressions Fixes #1335 - - Disable editor whilst a deploy is inflight Fixes #1332 - - Replace Unknown nodes with their real versions when node loaded - - Retry auto-install of modules that fail - - Fix column name in link nodes to refer language file (#1330) - - Use namespaces with link node title attributes i18n name Fixes #1329 - - Tidy up GPIO pin table presentation Fixes #1328 - - Join: count of 0 should not send on every msg - - Handle importing only one end of a link node pair - - Make sending to Debug synchronous again Fixes #1323 - - Make send-error behaviour optional in file node - - Restore File In node behaviour of sending msg on error - - Expose context.keys within Function node - - JSON parser default should be not formatting output - - -#### 0.17.3: Maintenance Release - - - Fix flow library in menu to support period characters as flow name (#1320) - - editorTheme not setting custom css/scripts properly - - Fix missing icons for some nodes (#1321) - - Add reformat button to JSONata test data editor - - Update delay node status without spawning unnecessary intervals - - Avoid stringify ServerResponse and Socket in Debug node Fixes #1311 - - Fix creating userDir other than system drive on Windows (#1317) - - Trigger node not handling a duration of 0 as block mode Fixes #1316 - - Unable to config GPIO Pin 13 Fixes #1314 - -#### 0.17.2: Maintenance Release - - - Fix GPIO node labels - -#### 0.17.1: Maintenance Release - - - Fix PI gpio to use BCM - - Prevent event thread contention when sending to Debug node Closes #1311 - - Fix Bug: Can not display node icon when npm package has scope (#1305) (#1309) - - Clear moved flag when nodes are deployed - -#### 0.17: Milestone Release - -Runtime - - - Return flow rev on reload api when api v2 enabled Closes #1273 - - Provide single endpoint to load all node message catalogs - - Add .trace and .debug to Node prototype - - Rename oauth auth scheme to strategy as it works for openid - - Allow oauth schemes provide a custom verify function - - Add support for oauth adminAuth configs - - Cache auth details to save needlessly recalculating hashes - - Add context.keys function to list top-level keys - - Strip BOM character from JSON files if present Fixes #1239 - - Version check no meta (#1243) - - Ensure all nodes have access to global context Fixes #1230 - - Don't process subscription for unauthenticated comms link Fixes #851 - - Clone credentials when passing to node Fixes #1198 - - Resolve dir argument of getLocalNodeFiles function (#1216) - - Add wait for writing a library entry into a file. (#1186) - - Use correct Buffer.from method rather than constructor - - update core nodes to use newer Buffer syntax - - Treat missing msg properties as undefined rather than throw error Fixes #1167 - - Allows flows to be enabled/disabled in the runtime - - add off option to logging settings comment - - Log error stack traces if verbose flag is set - - Extract line number if available from node load errors - - Add node 8 to travis (with allow failure) - - Shuffle promises for creating default package.json - - Create a package.json file in userDir if one doesn't exist - - autoInstallModules option must honour version/pending_version - - Refuse to update a non-local node module - - Finalise nodeSettings and update tlsConfigDisableLocalFiles - - Allow a node to declare what settings should be made available to the editor. (#1185) - - Add node whitelist function (#1184) - - Allow a node to declare settings that should be exported - - Add test coverage for deleting a flow - - Update tests for oauth -> strategy rename - - Fix the test cases which sometimes fails due to timing. (#1228) - - Extend timeout for the test case of installing non-existant path. (#1191) - - Fix loader test to expect line numbers in load errors - - Update ui_spec for icon module path - - let node installer try to save with ~ version prefix to allow minor updates - - Log error when non-msg-object is returned from a Function - - Timeout a node that fails to close - default 15s timeout - - Pass a 'removed' parameter to node close handler - - Remove event passing for icons/examples from the api layer - - Update general dependencies - -Nodes - - - Do not log node errors if handled by a Catch node - - Fix wrong number of double quotes in CSV parsing - - let csv node handle ip addresses without trying to parse - - Update debug node to register the settings it uses - - Handle IncomingMessage/ServerResponse object types in debug Fixes #1202 - - Toggling debug node enabled/disabled state should set state dirty Fixes #1203 - - redo delay node status messages to be interval based - - Update delay node ui - - Add new msg.delay option to delay node - - stop delay node spamming web socket (when in fast rate limit mode) - - Delay/Range node help tidy up - - Bug fix in exec node. White spaces in arguments now works (#1285) - - Make exec node explicitly call SIGTERM for default - - Fix exec node error tests on Windows (#1234) - - update messages for updated exec node - - Make exec node spawn and exec outputs more consistent - - Exec node for windows environment (#1200) - - remove requirement for cmd in exec node config + new style info - - retry exec node tests - - let exec node take msg.kill SIG... param and pid param - - Third output from Exec node must be consistent for success/failure conditions - - exec node returns 0 on the third output if command ended without error. (#1160) - - exec node can be killed on demand - - add "split/stream" ability to file in node - - add port label to file node and update info - - Allow nodes to have translations not in core (#1183) - - fix tcp node new Buffer alloc size 0 - - change pin selection table for pi gpis nodes - - stop using sudo for Pi gpio access - - adding frequency configuration to pwm output (#1206) - - Fix Pi GPIO debounce - - let Hypriot on Pi detect gpio correctly - - More core node info help tidy up - - Tidy up more core node help text - - Tidy up parser node edit dialogs and help text - - yet more core node info updates - - more core node info updates to newer style - - Update some core nodes info - - First pass of new node-info style - - MQTT new style info - - Fix empty extra node help content issue - - Handle HTTP In url that is missing its leading / Fixes #1218 - - Add file upload support to HTTP In node - - HTTP Request node: add info on how to do form encoding - - Prevent unmodified msg.headers from breaking HTTP Request flows Closed #1015 - - Add cookie handling to HTTP Request node - - Add guard against the http-request buffer fix being reverted - - Multipart streaming - - Add http-request node unit tests - - http request node add transport validity check and warn. - - Update follow_redirects to fix http_proxy handling Fixes #1172 - - Allow statusCode/headers to be set directly within HTTP Response node - - let inject "between time" also fire at start - Plus new info - - remove repeat symbol from inject if repeat is 0 - - Add port labels to inject node (to show types) - - Add buffer joiner mode to Join node - - Let join node auto re-assemble buffers - - let join also accumulate strings (and not fail) - - Add Pretty print option to JSON node and - - Fix selection of link nodes - - Add link label value as portLabels - - Add sentence about clearing retained topic on mqtt - - make sure MQTT client closes if redeploy during reconnect - - make sure MQTT client closes if redeploy during reconnect - - slight filed size adjust for mqtt broker port field - allow 5 digits - - Add help info for split node - - split node - in object mode allow msg.complete on its own - - let split of objects use key to set another property (e.g. topic) - - adding streaming modes into split node - - let split node reassemble based on a final packet. (as well as the first) - - Add buffer support to split node - - updated split/join node (split still needs work before release) - - Added a name icon and a description label on edit subflow window. - - Don't display port labels for subflow pseudo-port nodes - - Added a name icon and a description label on edit subflow window. - - tcp request - remove confusing timeout wording from info - - Final TCP node nits - let 0 do it's thing as per every other timeout - - fix tcp port not waiting as per info/previous behaviour - - TCP In: Fix error in timout callback (#1249) - - Make tcp send msg more consistent - - Update 31-tcpin.js (#1235) - - really close tcp node connection right away (if told to) - - clone message before send in stay connected mode - - Better template node help example - - Add option to parse Template result as JSON before sending - - nail trigger test for windows AND linux - - give up on SIGQUIT for widows test - - better tests for windows nodes - - comment out 2nd exec node kill tests - - fixes for grunt files tests on Windows - - Add events to test helper - - Change default value of tlsConfigDisableLocalFiles to false - - Add the node setting tlsConfigDisableLocalFiles for tls node. (#1190) - - UI to upload certificates and keys for TLS node - - Update trigger help - - let trigger node set repeated outputs - - Move udp sock error listener to only be instantiated once. - - Let watch node recurse into subdirectories - - Misconfigured WebSocket nodes should not register msg handlers - - Add websocketVerifyClient option to enable custom websocket auth Fixes #1127 - -Editor - - - Bump ACE editor to v1.2.7 - - Add RED.utils.getNodeLabel utility function - - Include module name in requests for node icons - - Change debug message menu icon - - Handle empty array/objects in debug view - - Add per-node filter option to Debug pane - - Ensure debug node marked changed when button pressed - - Fix pop-out debug window for all the recent updates - - Add debug message menu - - Don't include msg. in debug message copied paths - - Format Buffer numbers as hex by default - - Remember formatting choices for dbg msg elements - - Allow debug msg elements to be pinned - - Only show debug tools under the debug tab - - Fix test for valid js identifiers in debug path construction - - Remove unused modified flag on debug messages - - Add copy path/value buttons to debug messages - - dont match only part of the node type (#1242) - - Add editorTheme.logout.redirect to allow redirect on logout Closes #1213 - - Handle logging out and already logged-out editor Fixes #1288 - - Fix bug: Export Subflows (#1282) - - destroy editor to ensure fully removed on close (function, template, comment) - - Don't try to nls status text starting with '.' Fixes #1258 - - Add note of removed flows in diffConfig (#1253) - - Add description to flow same as subflow - - Allow tabs to be enabled/disabled in the editor - - Make H3 sections in node help collapsible - - Add JSON Expression editor - - Expression editor - clear legacy flag for blank expressions - - Ensure node labels are reordered properly to match outputs - - Add 'none' placeholder for empty port label form - - Don't mark a node changed when going from none to blank labels - - Leave a node to nls its own port labels - - Allow a node to override default labels - - Add placeholder text on label inputs and clear buttons - - Add port labels to Subflow nodes - - Keep port label form in sync with output reordering - - Basic node label editor - - Port label editor starting point - - Allow port labels be i18n identifiers - - Add inputLabels and outputLabels to node defn + Update Change node - - Resize port labels based on content - - Initial port label behaviour - - Allow a node to decide for itself if its button should be enabled or not - - Provide feedback when enable/disable node fails - - Add node module update api and expose in palette editor - - Reset palette-manager tabs when settings dialog reopened - - Move palette editor to settings panel - - Move palette editor to userSettings dialog - - Move view and keyboard into user settings dialog - - Add basic user settings panel - - Node status should be on by default - - Make theme able to load custom javascript (#1211) - - Allow tips to be hidden and cycled through - - Add info tips back to the sidebar - - Add buffer mode to typedInput - - Add typedInput binary mode icon - - Ensure all ace editors are destroyed in the expression editors - - Refresh sidebar info when tab is changed - - better spacing for library widget - - Fix gridSize for node width calculation to avoid odd resizing - - Redraw grid properly if gridSize changes - - Scroll sidebar info tab to top when changing content - - Ensure info tab sections are collapsible when set from palette - - Only show tab info if there is an active tab - - Only check for reordered outputs if outputMap defiend - - Avoid circular references when stingifying node objects - - Fix padding of config node edit dialog - - Add force-deploy option when conflict detected - - Hide tip box on startup if disabled - - Track node moves separately to node config changes - - Ensure ace editor instances are freed if edit cancelled - - Clip overly long notification messages - - Use queryCommandSupported not queryCommandEnabled to check for copy support - - Add tip to tab description editor - - Make tab info edit box resizable - - Shrink config node appearance in info table - - Display config nodes in Info sidebar table - - Ensure flow info box updates after editing flow - - Hide Node info section when displaying changelog - - Restructure info tab - - Provide notification when new flows deployed in the background - - Stop some ui elements from clearing url anchor when clicked - - clipboard export text stay highlighted even when button deselected - - ensure export clipboard keeps text selected and formatted - - Defer resizing tray components until they have finished building - - Use pre-calculated values for connection path - - Use textContent to avoid manual escaping - - Add RED.stack as a common ui component - - Numeric validator that accepts blank should accept undefined - - Add visual cue as to whether the workspace is focused - - Allow RED.validators.number to allow blank values as valid - - Support dropping json files into the editor - - NLS Expression/JSON editor and fix their height calculation - - Update JSONata to 1.2.4 Closes #1275 - - Remember test expression data on a per-node basis - - NLS jsonata test messages - - Add JSONata expr tester and improved feedback - - Add $context/$flow/$global functions to jsonata - - Update jsonata - -Other - - - add allow es6 to .jshintrc - - travis - don't allow node 8 fails, (and re-add 7) - - ask istanbul for more reports as default - - Add istanbul to Gruntfile.js (#1189) - - -#### 0.16.2: Maintenance Release - - - Ensure custom mustache context parent set in Template node fixes #1126 - - Display debug node name in debug panel if its known - - Ensure auth-tokens are removed when no user is specified in settings - - Ensure all a tags have blank target in info sidebar - - Ensure links do not span tabs in the editor - - Avoid creating multiple reconnect timers in websocket node - - Fix inner reference in install fail message catalog entry Fixes #1120 - - Display buffer data properly for truncated buffers under Object property - -#### 0.16.1: Maintenance Release - - - Add colour swatches to debug when hex colour matched - - Nodes with hasUsers set to false should not appear unused - - Change hard error to verbose warning if using old node.js level - - Don't filter debug properties starting with _ Fixes #1117 - - Node logged errors not displayed properly in debug pane Fixes #1116 - - Do not look for existing nodes when checking for wires on paste Fixes #1114 - - -v option not enabling verbose mode properly - - Add node.js version check on startup - -#### 0.16.0: Milestone Release - -Runtime - - - Drop support for node 0.10 and 0.12 - -Nodes - - - Add option to colourise debug console output Closes #1103 - - Add property validation to nodes using typedInput - - Add common validator for typedInput fields Closes #1104 - - Update debug node console logging indicator icon Closes #1094 - - Let exec node (spawn) handle commands with spaces in path - - Add symbol to debug node to indicate debugging also to console.log - - Change file node to use node 4 syntax (drops support for 0.8) - - add info for httprequest responseUrl property - - Add res.responseUrl to httprequest node response - - Add support for flow and global context in Template node (#1048) - - Added YAML parser node (#1034) - - node-red-node-serialport removed as a default node - -Editor - - - Add install/remove dialog to increase friction Closes #1109 - - Report node catalogue load errors Closes #1009 - - Properly report module remove errors in palette editor Fixes #1043 - - Update rather than hide install button after success install - - Tweak search box styling - - Display info tips slightly longer - - Allow tips to be enabled/disabled via menu option - - Info-tips update - - Make typedInput keyboard navigable - - update Font Awesome to 4.7.0 - - Add expression editor for jsonata - - Overhaul keyboard handling and introduce editor actions - - Add Japanese translation file(editor.json) (#1084) - - Add quick-add node mode with cmd/ctrl-click - - Add cmd/ctrl-click to quick add wires - - Use json-stringify-safe to detect circular references in debug msgs - - debug - format if time if correct length/range - - Make Debug object explorable - - Initial debug pop-out window - - Add proper three-way diff view - - Focus tray body when edit dialog opened - - Hit enter to edit first node in selection - - Add node delete button to edit dialog - - Add notification when runtime stopped due to missing types Part of #832 - -Fixes - - - Do not tie debug src loading to needsPermission Fixes #1111 - - Initialise nodeApp regardless of httpAdmin setting Closes #1096 #1095 - - Speed up reveal of search dialogs - - Ensure flows exist before delegating status/error events Fixes #1069 - - Update package dependencies - - Update MQTT to latest 2.2.1 - - Node status not being refreshed properly in the editor - - Try to prevent auto-fill of password fields in node edit tray Fixes #1081 - - Fix whitespace in localfilesystem - - fix bug where savesettings did not honor local settings variables (#1073) - - Tidy up unused/duplicate editor messages Closes #922 - - Property expressions must not be blank - - Tidy up merge commit of validatePropertyExpression - - add port if wires array > number of ports declared. - - Allow quoted property expressions Fixes #1101 - - Index all node properties for node search - - Remove node 0.10 from travis config - - update welcome message to use logger so it can be turned off/on if required (#1083) - - Fix dynamically loading multiple node-sets from palette editor - - Allow a node to reorder its outputs and maintain links Fixes #1031 - -#### 0.15.3: Maintenance Release - - - Tcpgetfix: Another small check (#1070) - - TCPGet: Ensure done() is called only once (#1068) - - Allow $ and _ at start of property identifiers Fixes #1063 - - TCPGet: Separated the node.connected property for each instance (#1062) - - Corrected 'overide' typo in XML node help (#1061) - - TCPGet: Last property check (hopefully) (#1059) - - Add additional safety checks to avoid acting on non-existent objects (#1057) - - add --title for process name to command line options - - add indicator for fire once on inject node - - reimplement $(env var) replace to share common code. - - Fix error message for missing node html file, and add test. - - Let credentials also use $(...) substitutions from ENV - - Rename insecureRedirect to requireHttps - - Add setting to cause insecure redirect (#1054) - - Palette editor fixes (#1033) - - Close comms on stopServer in test helper (#1020) - - Tcpgetfix (#1050) - - TCPget: Store incoming messages alongside the client object to keep reference - - Merge remote-tracking branch 'upstream/master' into tcpgetfix - - TCPget can now handle concurrent sessions (#1042) - - Better scope handling - - Add security checks - - small change to udp httpadmin - - Fix comparison to "" in tcpin - - Change scope of clients object - - Works when connection is left open - - First release of multi connection tcpget - - Fix node.error() not printing when passed false (#1037) - - fix test for CSV array input - - different test for Pi (rather than use serial port name) - - Fix missing 0 handling for css node with array input - - -#### 0.15.2: Maintenance Release - - - Revert bidi changes to nodes and hide menu option until fixed Fixes #1024 - - Let xml node set options both ways - - Bump serialport to use version 4 - - gpio node handle multiple bits of data returned in one go - - HTTP In should pass application/octet-stream as buffer not string Fixes #1023 - - Handle missing httpNodeRoot setting properly - - Config sidebar not handling node definition error properly - - Add minimum show time to deploy spinner to avoid flicker - - Add work-in-progress update button to palette-editor - - Add log.removeHandler function - - Add Crtl/Shift/p shortcut for manage palette - - Add spinner to deploy button - - Status messages from nodes in subflows not delegated properly Fixes #1016 - - fix spelling in join node info - - Speed up tab scrolling - - Update delay burst test to be more tolerant of timing Fixes #1013 - -#### 0.15.1: Maintenance Release - - - Update default palette catalogue to use https - - Disable palette editor if npm not found - and fix for Windows - - Searching package catalogue should be case-insensitive Fixes #1010 - - contenteditable fields not handled in config nodes Fixes #1011 - - Change html link refs from `_new` to `_blank` to be standards compliant - -#### 0.15.0: Milestone Release - -Runtime - - - Increase default apiMaxLength to 5mb and add to default settings Closes #1001 - - Add v2 /flows api and deploy-overwrite protection - - Encrypt credentials by default - - Ensure errors thrown by RED.events handlers don't percolate up - -Editor - - - Mark nodes as changed when they are moved - - Added parent containment option for draggable. (#1006) - - Ignore bidi event handling on non-existent and non-Input elements Closes #999 - - Remove list of flows from menu - - Allow nodes to be imported with their credentials - - Add workspace search option - - Add scrollOnAdd option to editableList - - Add swift markup to editor for open whisk node - - Scrollable tabs 👍 - - Allow linking to individual flow via url hash - - Avoid duplicating existing subflows on import - - Add import-to-new-tab option - - Add new options to export-nodes dialog - - Stop nodes being added beyond the outer bounds of the workspace - - Default config nodes to global scope unless in a subflow Closes #972 - - Bidi support for Text Direction and Structured Text (#961) - - Fix jQuery selector, selecting more than one help pane/popover and displaying incorrectly. (#970) - - Fixes removeItem not passing row data to callback. (#965) - - Move common components and add searchBox - - Add initial palette sidebar - -Nodes - - - Inject node label - show topic for timestamp mode if short - - Let change node set type if total match - - Clean up status on close for several core nodes. - - Change node: re-parse JSON set value each time to avoid pass-by-ref - - Better handle HTTP Request header capitalisation - - Enable ES6 parsing in Function editor by default Fixes #985 - - Update debug sidebar to use RED.view.reveal to show debug nodes - - Add full path tip to file node, And tidy up Pi node tips - - Remove WebSocket node maxlistener warning - - Update mqtt-broker node to use fully name-space qualified status messages - - Let UDP node better share same port instance if required - - Add number of units to the delay node (rate) (#994) - - Allow http middleware to skip rawBodyParser - - Let change node move property to sub-property. - - Add info to exec warning about buffered output if using python - - TCP node: pass on latest input msg properties - - Make sure MQTT broker is really set - - Fix escape character catch in TCPGet + support 0x?? sequences - - Fix split character in TCP Request node - - Add CSS highlighting to the template node (#950) - - Only update switch previous value after all rules are run - -Other - - - Add npm build/test scripts Closes #946 #660 - - Move travis to node 6 and 7 - drop 5 and 0.12 - - -#### 0.14.6: Maintenance Release - -Fixes - - - Tell ace about Function node globals. Closes #927 - - Tidy up mqtt nodes - linting and done handling. Closes #935 - - Fix invalid html in TCP and HTML node edit templates - - Add proper help text to link nodes - - Handle importing old mqtt-broker configs that lack properties - - Update ace to 1.2.4 - - Allow config nodes to provide a sort function for their select list - - Add log warning if node module required version cannot be satisfied - - Handle empty credentials file. Closes #937 - - Add RPi.GPIO lib test for ArchLinux - -#### 0.14.5: Maintenance Release - -Fixes - - - Cannot clear cookies with http nodes - - let HTML parse node allow msg.select set select - - Validate nodes on import after any references have been remapped - - Debug node handles objects without constructor property Fixes #933 - - Ensure 'false' property values are displayed in info panel Fixes #940 - - Fix node enable/disable over restart - load configs after settings init - -#### 0.14.4: Maintenance Release - -Nodes - - - Update trigger node ui to use typedInputs - - Better handling of quotes in CSV node - - Clarify the MQTT node sends msg.payload - closes #929 - - Inject node should reuse the message it is triggered with Closes #914 - - Stop trigger node re-using old message - - Allow node.status text to be 'falsey' values - -Fixes - - - Handle DOMException when embedded in an iframe of different origin Fixes #932 - - Fix double firing of menu actions - - Fix select box handling in Safari - fixes #928 - - Clear context in node test helper Fixes #858 - - Allow node properties to be same as existing object functions Fixes #880 - - Handle comms link closing whilst completing the initial connect - - Protect against node type names that clash with Object property names Fixes #917 - - Clone default node properties to avoid reference leakage - - Strip tab node definition when exporting - - Check for null config properties in editor before over-writing them - - Add hasUsers flag to config nodes - -Editor - - - Add sql mode to ace editor - - Keyboard shortcuts dialog update (#923) - - Ensure importing link nodes to a subflow doesn't add outbound links Fixes #921 - - Add updateConfigNodeUsers function to editor - - Scroll to bottom when item added to editableList - - Form input widths behave more consistently when resizing Fixes #919 #920 - -#### 0.14.3: Maintenance Release - -Fixes - - - Create default setting.js in user-specified directory. Fixes #908 - - MQTT In subscription qos not defaulting properly - - Let exec node handle 0 as well as "0" - -#### 0.14.2: Maintenance Release - -Fixes - - - Cannot add new twitter credentials. Fixes #913 - - Support array references in Debug property field - -#### 0.14.1: Maintenance Release - -Fixes - - - Handle undefined property that led to missing wires in the editor - - Remove duplicate 'Delete' entry in keyboard shortcut window. Closes #911 - - Add 'exec' to node-red-pi launch script. Closes #910 - -#### 0.14.0: Milestone Release - -Editor - - - Replace edit dialog with edit tray - - Enable shift-drag detach of just the selected link - - Allow workspace tabs to be re-ordered - - Scope keyboard shortcuts to dom elements - - Ensure parent nodes marked as changed due to child config node changes - - Validate all edit dialog inputs when one changes - - Add editableList widget and update Switch/Change nodes to use it - - Add option to filter Debug sidebar by flow and highlight subflow-emitting nodes - - Back off comms reconnect attempts after prolonged failures - - Prompt for login if comms reconnect fails authentication - - Change style of nodes in subflow template view - - Add CHANGELOG.md and make it accessible from menu - -Runtime - - - Always log node warnings on start without requiring -v - - Add support for loading scoped node modules. Closes #885 - - Add process.env.PORT to settings.js - - Clear node context on deploy. Closes #870 - - Enable finer grained permissions in adminAuth - -Nodes - - - Enable config nodes to reference other config nodes - - Add Split/Join nodes - - Add Link nodes - - Add support to HTTP In node for PATCH requests. Closes #904 - - Add cookie handling to HTTP In and HTTP Response nodes - - Add repeat indicator to inject node label. Closes #887 - - Add javascript highlighter to template node - - Add optional timeout to exec node - - Add TLS node and update MQTT/HTTP nodes to use it - - Let trigger node also send last payload to arrive - - Add timestamp as a default typedInput and update Inject and change nodes to match, - - Add QoS option to MQTT In node - - Add status to exec spawn mode - - Add Move capability to Change node - - Update Serial node to support custom baud rates - - Add support for array-syntax in typedInput msg properties - - Add RED.util to Function node sandbox - - Capture error stack on node.error. Closes #879 - - -Fixes - - - Add error handling to all node definition api calls - - Handle null return from Function node in array of messages - - Defer loading of token sessions until they are accessed. Fixes #895 - - set pi gpio pin status correctly if set on start - - Prevent parent window scrolling when view is focused. Fixes #635 - - Handle missing tab nodes in a loaded flow config - - Ensure typedInput dropdown doesn't fall off the page - - Protect against node types with reserved names such as toString. Fixes #880 - - Do not rely on the HTML file to identify where nodes are registered from - - Preserve node properties on import - - Fix regression in delay node. topic based queue was emptying all the time instead of spreading out messages. - - Throw an error if a Function node adds an input event listener - - Fix hang on partial deploy with disconnected mqtt node - - TypedInput: preload type icons to ensure width calc correct - - Ensure tcp node creates a buffer of size 1 at least - - Return editorTheme default if value is undefined - - Fix RED.util.compareObjects for Function created objects and Buffers - - Ensure default settings copied to command-line specified userDir - - -#### 0.13.4: Maintenance Release - - - Add timed release mode to delay node - - Enable link splicing for when import_dragging nodes. Closes #811 - - Fix uncaught exception on deploy whilst node sending messages - - Deprecate old mqtt client and connection pool modules - - Change node: add bool/num types to change mode Closes #835 - - Validate fields that are `$(env-vars)` Closes #825 - - Handle missing config nodes when validating node properties - - Pi node - don't try to send data if closing - - Load node message catalog when added dynamically - - Split palette labels on spaces and hyphens when laying out - - Warn if editor routes are accessed but runtime not started Closes #816 - - Better handling of zero-length flow files Closes #819 - - Allow runtime calls to RED._ to specify other namespace - - Better right alignment of numerics in delay and trigger nodes - - Allow node modules to include example flows - - Create node_modules in userDir - - Ensure errors in node def functions don't break view rendering Fixes #815 - - Updated Inject node info with instructions for flow and global options - - - -#### 0.13.3: Maintenance Release - - - Fix crash on repeated inject of invalid json payload - - Add binary mode to tail node - - Revert Cheerio to somewhat smaller version - - Add os/platform info to default debug - - - -#### 0.13.2: Maintenance Release - - - Don't force reconnect mqtt client if message arrives (fixes the MQTT connect/disconnect endless cycle) - - Add -p/--port option to override listening port - - Invert config node filter toggle button colours so state is more obvious - - Add timeout to httprequest node - - Tidy up of all node info content - make style consistent - - Make jquery spinner element css consistent with other inputs - - tcp node add reply (to all) capability - - Allow the template node to be treated as plain text - - Validate MQTT In topics Fixes #792 - - httpNodeAuth should not block http options requests Fixes #793 - - Disable perMessageDeflate on WS servers - fixes 'zlib binding closed' error - - Clear trigger status icon on re-deploy - - Don't default inject payload to blank string - - Trigger node, add configurable reset - - Allow function properties in settings Fixes #790 - fixes use of httpNodeMiddleware - - Fix order of config dialog calls to save/creds/validate - - Add debounce to Pi GPIO node - - - -#### 0.13.1: Maintenance Release - - - Revert wrapping of http request object - - - -#### 0.13.0: Milestone Release - - - Add 'previous value' option to Switch node - - Allow existing nodes to splice into links on drag - - CORS not properly configured on multiple http routes Fixes #783 - - Restore shift-drag to snap/unsnap to grid - - Moving nodes with keyboard should flag workspace dirty - - Notifications flagged as fixed should not be click-closable - - Rework config sidebar and deploy warning - - Wrap http request object to match http response object - - Add 'view' menu and reorganise a few things - - Allow shift-click to detach existing wires - - Splice nodes dragged from palette into links - - try to trim imported/dragged flows to [ ] - - Move version number as title of NR logo - - Moving nodes mark workspace as dirty - - Ok/Cancel edit dialogs with Ctrl-Enter/Escape - - Handle OSX Meta key when selecting nodes - - Add grid-alignment options - - Add oneditresize function definition - - Rename propertySelect to typedInput and add boolean opt - - Add propertySelect to switch node - - Add propertySelect support to Change node - - Add context/flow/global support to Function node - - Add node context/flow/global - - Add propertySelect jquery widget - - Add add/update/delete flow apis - - Allow core nodes dir to be provided to runtime via settings - - Tidy up API passed to node modules - - Move locale files under api/runtime components - - Add flow reload admin api - - - -#### 0.12.5: Maintenance Release - - - Add attribute capability to HTML parser node - - Add Pi Keyboard code node - - Fix for MQTT client connection cycling on partial deploy - - Fix for tcp node properly closing connections - - Update sentiment node dependencies - - Fix for file node handling of UTF8 extended characters - - - -#### 0.12.4: Maintenance Release - - - Add readOnly setting to prevent file writes in localfilesystem storage - - Support bcrypt for httpNodeAuth - - Pi no longer needs root workaround to access gpio - - Fix: Input File node will not retain the file name - - - -#### 0.12.3: Maintenance Release - - - Fixes for TCP Get node reconnect handling - - Clear delay node status on re-deploy - - Update Font-Awesome to v4.5 - - Fix trigger to block properly until reset - - Update example auth properties in settings.js - - Ensure httpNodeAuth doesn't get applied to admin routes - - TCP Get node not passing on existing msg properties - - - -#### 0.12.2: Maintenance Release - - - Enable touch-menu for links so they can be deleted - - Allow nodes to be installed by path name - - Fix basic authentication on httpNode/Admin/Static - - Handle errors thrown in Function node setTimeout/Interval - - Fix mqtt node lifecycle with partial deployments - - Update tcp node status on reconnect after timeout - - Debug node not handling null messages - - Kill processes run with exec node when flows redeployed - - Inject time spinner incrementing value incorrectly - - - -#### 0.12.1: Maintenance Release - - - Enable touch-menu for links so they can be deleted - - Allow nodes to be installed by path name - - Fix basic authentication on httpNode/Admin/Static - - - -#### 0.12.0: Milestone Release - - - Change/Switch rules now resize with dialog width - - Support for node 4.x - - Move to Express 4.x - - Copy default settings file to user dir on start up - - Config nodes can be scoped to a particular subflow/tab - - Comms link tolerates <5 second breaks in connection before notifying user - - MQTT node overhaul - add will/tls/birth message support - - Status node - to report status events from other nodes - - Error node can be targeted to specific other nodes - - JSON node can encode Array types - - Switch node regular expression rule can now be set to be case-insensitive - - HTTP In node can accept non-UTF8 payloads - will return a Buffer when appropriate - - Exec node configuration consistent regardless of the spawn option - - Function node can now display status icon/text - - CSV node can now handle arrays - - setInterval/clearInterval add to Function node - - Function node automatically clears all timers (setInterval/setTimeout) when the node is stopped - - - -#### 0.11.2: Maintenance Release - - - Allow XML parser options be set on the message - - Add 'mobile' category to the palette (no core nodes included) - - Allow a message catalog provide a partial translation - - Fix HTTP Node nls message id - - Remove delay spinner upper limit - - Update debug node output to include length of payload - - - - -#### 0.11.1: Maintenance Release - - - Fix exclusive config node check when type not registered (prevented HTTP In node from being editable unless the swagger node was also installed) - - - -#### 0.11.0: Milestone Release - - - Add Node 0.12 support - - Internationalization support - - Editor UI refresh - - Add RBE node - - File node optionally creates path to file - - Function node can access `clearTimeout` - - Fix: Unable to login with 'read' permission - - - -#### 0.10.10: Maintenance Release - - - Fix permissions issue with packaged nrgpio script - - Add better help message if deprecated node missing - - - -#### 0.10.9: Maintenance Release - -Fix packaging of bin scripts - - - -#### 0.10.8: Maintenance Release - - - Nodes moved out of core - - still included as a dependency: twitter, serial, email, feedparser - - no longer included: mongo, arduino, irc, redis - - node icon defn can be a function - - http_proxy support - - httpNodeMiddleware setting - - Trigger node ui refresh - - editorTheme setting - - Warn on deploy of unused config nodes - - catch node prevents error loops - - - -#### 0.10.6: Maintenance Release - -Changes: - - Performance improvements in editor - - Palette appearance update - - Warn on navigation with undeployed changes - - Disable undeployed node action buttons - - Disable subflow node action buttons - - Add Catch node - - Add logging functions to Function node - - Add send function to Function node - - Update Change node to support multiple rules - - - -#### 0.10.4: Maintenance Release - -Changes: - - - http request node passes on request url as msg.url - - handle config nodes appearing out of order in flow file - don't assume they are always at the start - - move subflow palette category to the top, to make it more obvious - - fix labelling of Raspberry Pi pins - - allow email node to mark mail as read - - fix saving library content - - add node-red and node-red-pi start scripts - - use $HOME/.node-red for user data unless specified otherwise (or existing data is found in install dir) - - - -#### 0.10.3: Maintenance Release - -Fixes: - - - httpAdminAuth was too aggressively deprecated (ie removed); restoring with a console warning when used - - adds reporting of node.js version on start-up - - mongo node skip/limit options can be strings or numbers - - CSV parser passes through provided message object - - - -#### 0.10.2: Maintenance Release - -Fixes: - - subflow info sidebar more useful - - adds missing font-awesome file - - inject node day selection defaulted to invalid selection - - loading a flow with no tabs failed to add nodes to default tab diff --git a/packages/node_modules/@node-red/editor/public/red/images/deploy-flows-o.png b/packages/node_modules/@node-red/editor/public/red/images/deploy-flows-o.png deleted file mode 100644 index a2f5373e2..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/deploy-flows-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/deploy-flows.png b/packages/node_modules/@node-red/editor/public/red/images/deploy-flows.png deleted file mode 100644 index e83638234..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/deploy-flows.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/deploy-full-o.png b/packages/node_modules/@node-red/editor/public/red/images/deploy-full-o.png deleted file mode 100644 index b5f3a9870..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/deploy-full-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/deploy-full.png b/packages/node_modules/@node-red/editor/public/red/images/deploy-full.png deleted file mode 100644 index 775374d17..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/deploy-full.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/deploy-nodes-o.png b/packages/node_modules/@node-red/editor/public/red/images/deploy-nodes-o.png deleted file mode 100644 index 3174716cc..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/deploy-nodes-o.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/deploy-nodes.png b/packages/node_modules/@node-red/editor/public/red/images/deploy-nodes.png deleted file mode 100644 index 4d982a9c8..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/deploy-nodes.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/grip.png b/packages/node_modules/@node-red/editor/public/red/images/grip.png deleted file mode 100644 index 76c2e0d17..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/grip.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/node-red-256.png b/packages/node_modules/@node-red/editor/public/red/images/node-red-256.png deleted file mode 100644 index 41f70a0d7..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/node-red-256.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/node-red-icon-black.svg b/packages/node_modules/@node-red/editor/public/red/images/node-red-icon-black.svg deleted file mode 100644 index 613427a47..000000000 --- a/packages/node_modules/@node-red/editor/public/red/images/node-red-icon-black.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/packages/node_modules/@node-red/editor/public/red/images/node-red-icon.svg b/packages/node_modules/@node-red/editor/public/red/images/node-red-icon.svg deleted file mode 100644 index 020a90376..000000000 --- a/packages/node_modules/@node-red/editor/public/red/images/node-red-icon.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - Node-RED Icon - - - - image/svg+xml - - Node-RED Icon - - - - Nick O'Leary - - - - - - - - - - - - - - - - - - - diff --git a/packages/node_modules/@node-red/editor/public/red/images/node-red.png b/packages/node_modules/@node-red/editor/public/red/images/node-red.png deleted file mode 100644 index a60c26729..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/node-red.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/pw_maze_white.png b/packages/node_modules/@node-red/editor/public/red/images/pw_maze_white.png deleted file mode 100644 index 66464831c..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/pw_maze_white.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/spin.svg b/packages/node_modules/@node-red/editor/public/red/images/spin.svg deleted file mode 100644 index e609530aa..000000000 --- a/packages/node_modules/@node-red/editor/public/red/images/spin.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/packages/node_modules/@node-red/editor/public/red/images/subflow_tab.png b/packages/node_modules/@node-red/editor/public/red/images/subflow_tab.png deleted file mode 100644 index 022777c4d..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/subflow_tab.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/09.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/09.png deleted file mode 100644 index 247371fe5..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/09.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/az.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/az.png deleted file mode 100644 index 5f5d2404e..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/az.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/bin.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/bin.png deleted file mode 100644 index 615c8dd4f..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/bin.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/bool.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/bool.png deleted file mode 100644 index 9530983de..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/bool.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/env.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/env.png deleted file mode 100644 index 0ea51da00..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/env.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/expr.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/expr.png deleted file mode 100644 index 704105ce5..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/expr.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/json.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/json.png deleted file mode 100644 index 57ac8761f..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/json.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/images/typedInput/re.png b/packages/node_modules/@node-red/editor/public/red/images/typedInput/re.png deleted file mode 100644 index 87deb02ae..000000000 Binary files a/packages/node_modules/@node-red/editor/public/red/images/typedInput/re.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/red/keymap.json b/packages/node_modules/@node-red/editor/public/red/keymap.json deleted file mode 100644 index dc37232e2..000000000 --- a/packages/node_modules/@node-red/editor/public/red/keymap.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "*": { - "ctrl-shift-p":"core:manage-palette", - "ctrl-f": "core:search", - "ctrl-=": "core:zoom-in", - "ctrl--": "core:zoom-out", - "ctrl-0": "core:zoom-reset", - "ctrl-enter": "core:confirm-edit-tray", - "ctrl-escape": "core:cancel-edit-tray", - "ctrl-g i": "core:show-info-tab", - "ctrl-g d": "core:show-debug-tab", - "ctrl-g c": "core:show-config-tab", - "ctrl-g x": "core:show-context-tab", - "ctrl-e": "core:show-export-dialog", - "ctrl-i": "core:show-import-dialog", - "ctrl-space": "core:toggle-sidebar", - "ctrl-,": "core:show-user-settings", - "ctrl-alt-r": "core:show-remote-diff", - "ctrl-alt-n": "core:new-project", - "ctrl-alt-o": "core:open-project", - "ctrl-g v": "core:show-version-control-tab" - }, - "workspace": { - "backspace": "core:delete-selection", - "delete": "core:delete-selection", - "enter": "core:edit-selected-node", - "ctrl-c": "core:copy-selection-to-internal-clipboard", - "ctrl-x": "core:cut-selection-to-internal-clipboard", - "ctrl-v": "core:paste-from-internal-clipboard", - "ctrl-z": "core:undo", - "ctrl-a": "core:select-all-nodes", - "shift-?": "core:show-help", - "up": "core:move-selection-up", - "right": "core:move-selection-right", - "down": "core:move-selection-down", - "left": "core:move-selection-left", - "shift-up": "core:step-selection-up", - "shift-right": "core:step-selection-right", - "shift-down": "core:step-selection-down", - "shift-left": "core:step-selection-left", - "ctrl-shift-j": "core:show-previous-tab", - "ctrl-shift-k": "core:show-next-tab" - } -} diff --git a/packages/node_modules/@node-red/editor/public/red/main.js b/packages/node_modules/@node-red/editor/public/red/main.js deleted file mode 100644 index 7aeea168e..000000000 --- a/packages/node_modules/@node-red/editor/public/red/main.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -$(function() { - if ((window.location.hostname !== "localhost") && (window.location.hostname !== "127.0.0.1")) { - document.title = document.title+" : "+window.location.hostname; - } - RED.init({ - apiRootUrl: "" - }); -}); diff --git a/packages/node_modules/@node-red/editor/public/red/main.min.js b/packages/node_modules/@node-red/editor/public/red/main.min.js deleted file mode 100644 index 150f8c6de..000000000 --- a/packages/node_modules/@node-red/editor/public/red/main.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -$(function(){"localhost"!==window.location.hostname&&"127.0.0.1"!==window.location.hostname&&(document.title=document.title+" : "+window.location.hostname),RED.init({apiRootUrl:""})}); \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/red/red.js b/packages/node_modules/@node-red/editor/public/red/red.js deleted file mode 100644 index 9803fdc0d..000000000 --- a/packages/node_modules/@node-red/editor/public/red/red.js +++ /dev/null @@ -1,29055 +0,0 @@ -/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -var RED = (function() { - - function appendNodeConfig(nodeConfig,done) { - done = done || function(){}; - var m = //.exec(nodeConfig.trim()); - var moduleId; - if (m) { - moduleId = m[1]; - } else { - moduleId = "unknown"; - } - try { - var hasDeferred = false; - - var nodeConfigEls = $("
"+nodeConfig+"
"); - nodeConfigEls.find("script").each(function(i,el) { - var srcUrl = $(el).attr('src'); - if (srcUrl && !/^\s*(https?:|\/|\.)/.test(srcUrl)) { - $(el).remove(); - var newScript = document.createElement("script"); - newScript.onload = function() { $("body").append(nodeConfigEls); done() } - $('body').append(newScript); - newScript.src = RED.settings.apiRootUrl+srcUrl; - hasDeferred = true; - } - }) - if (!hasDeferred) { - $("body").append(nodeConfigEls); - done(); - } - } catch(err) { - RED.notify(RED._("notification.errors.failedToAppendNode",{module:moduleId, error:err.toString()}),{ - type: "error", - timeout: 10000 - }); - console.log("["+moduleId+"] "+err.toString()); - done(); - } - } - - function loadNodeList() { - $.ajax({ - headers: { - "Accept":"application/json" - }, - cache: false, - url: 'nodes', - success: function(data) { - RED.nodes.setNodeList(data); - RED.i18n.loadNodeCatalogs(function() { - loadIconList(loadNodes); - }); - } - }); - } - - function loadIconList(done) { - $.ajax({ - headers: { - "Accept":"application/json" - }, - cache: false, - url: 'icons', - success: function(data) { - RED.nodes.setIconSets(data); - if (done) { - done(); - } - } - }); - } - - function loadNodes() { - $.ajax({ - headers: { - "Accept":"text/html" - }, - cache: false, - url: 'nodes', - success: function(data) { - var configs = data.trim().split(/(?=)/); - var stepConfig = function() { - if (configs.length === 0) { - $("body").i18n(); - $("#palette > .palette-spinner").hide(); - $(".palette-scroll").removeClass("hide"); - $("#palette-search").removeClass("hide"); - loadFlows(function() { - if (RED.settings.theme("projects.enabled",false)) { - RED.projects.refresh(function(activeProject) { - RED.sidebar.info.refresh() - if (!activeProject) { - // Projects enabled but no active project - RED.menu.setDisabled('menu-item-projects-open',true); - RED.menu.setDisabled('menu-item-projects-settings',true); - if (activeProject === false) { - // User previously decline the migration to projects. - } else { // null/undefined - RED.projects.showStartup(); - } - } - completeLoad(); - }); - } else { - // Projects disabled by the user - RED.sidebar.info.refresh() - completeLoad(); - } - }); - } else { - var config = configs.shift(); - appendNodeConfig(config,stepConfig); - } - } - stepConfig(); - } - }); - } - - function loadFlows(done) { - $.ajax({ - headers: { - "Accept":"application/json", - }, - cache: false, - url: 'flows', - success: function(nodes) { - if (nodes) { - var currentHash = window.location.hash; - RED.nodes.version(nodes.rev); - RED.nodes.import(nodes.flows); - RED.nodes.dirty(false); - RED.view.redraw(true); - if (/^#flow\/.+$/.test(currentHash)) { - RED.workspaces.show(currentHash.substring(6)); - } - } - done(); - } - }); - } - - function completeLoad() { - var persistentNotifications = {}; - RED.comms.subscribe("notification/#",function(topic,msg) { - var parts = topic.split("/"); - var notificationId = parts[1]; - if (notificationId === "runtime-deploy") { - // handled in ui/deploy.js - return; - } - if (notificationId === "node") { - // handled below - return; - } - if (notificationId === "project-update") { - RED.nodes.clear(); - RED.history.clear(); - RED.view.redraw(true); - RED.projects.refresh(function() { - loadFlows(function() { - var project = RED.projects.getActiveProject(); - var message = { - "change-branch": RED._("notification.project.change-branch", {project: project.git.branches.local}), - "merge-abort": RED._("notification.project.merge-abort"), - "loaded": RED._("notification.project.loaded", {project: msg.project}), - "updated": RED._("notification.project.updated", {project: msg.project}), - "pull": RED._("notification.project.pull", {project: msg.project}), - "revert": RED._("notification.project.revert", {project: msg.project}), - "merge-complete": RED._("notification.project.merge-complete") - }[msg.action]; - RED.notify("

"+message+"

"); - RED.sidebar.info.refresh() - }); - }); - return; - } - - if (msg.text) { - msg.default = msg.text; - var text = RED._(msg.text,msg); - var options = { - type: msg.type, - fixed: msg.timeout === undefined, - timeout: msg.timeout, - id: notificationId - } - if (notificationId === "runtime-state") { - if (msg.error === "missing-types") { - text+=""; - if (!!RED.projects.getActiveProject()) { - options.buttons = [ - { - text: RED._("notification.label.manage-project-dep"), - click: function() { - persistentNotifications[notificationId].hideNotification(); - RED.projects.settings.show('deps'); - } - } - ] - // } else if (RED.settings.theme('palette.editable') !== false) { - } else { - options.buttons = [ - { - text: RED._("common.label.close"), - click: function() { - persistentNotifications[notificationId].hideNotification(); - } - } - ] - } - } else if (msg.error === "credentials_load_failed") { - if (RED.settings.theme("projects.enabled",false)) { - // projects enabled - if (RED.user.hasPermission("projects.write")) { - options.buttons = [ - { - text: "Setup credentials", - click: function() { - persistentNotifications[notificationId].hideNotification(); - RED.projects.showCredentialsPrompt(); - } - } - ] - } - } else { - options.buttons = [ - { - text: "Close", - click: function() { - persistentNotifications[notificationId].hideNotification(); - } - } - ] - } - } else if (msg.error === "missing_flow_file") { - if (RED.user.hasPermission("projects.write")) { - options.buttons = [ - { - text: "Setup project files", - click: function() { - persistentNotifications[notificationId].hideNotification(); - RED.projects.showFilesPrompt(); - } - } - ] - } - } else if (msg.error === "missing_package_file") { - if (RED.user.hasPermission("projects.write")) { - options.buttons = [ - { - text: "Create default package file", - click: function() { - persistentNotifications[notificationId].hideNotification(); - RED.projects.createDefaultPackageFile(); - } - } - ] - } - } else if (msg.error === "project_empty") { - if (RED.user.hasPermission("projects.write")) { - options.buttons = [ - { - text: "No thanks", - click: function() { - persistentNotifications[notificationId].hideNotification(); - } - }, - { - text: "Create default project files", - click: function() { - persistentNotifications[notificationId].hideNotification(); - RED.projects.createDefaultFileSet(); - } - } - ] - } - } else if (msg.error === "git_merge_conflict") { - RED.nodes.clear(); - RED.sidebar.versionControl.refresh(true); - if (RED.user.hasPermission("projects.write")) { - options.buttons = [ - { - text: "Show merge conflicts", - click: function() { - persistentNotifications[notificationId].hideNotification(); - RED.sidebar.versionControl.showLocalChanges(); - } - } - ] - } - } - } - if (!persistentNotifications.hasOwnProperty(notificationId)) { - persistentNotifications[notificationId] = RED.notify(text,options); - } else { - persistentNotifications[notificationId].update(text,options); - } - } else if (persistentNotifications.hasOwnProperty(notificationId)) { - persistentNotifications[notificationId].close(); - delete persistentNotifications[notificationId]; - } - }); - RED.comms.subscribe("status/#",function(topic,msg) { - var parts = topic.split("/"); - var node = RED.nodes.node(parts[1]); - if (node) { - if (msg.hasOwnProperty("text")) { - if (msg.text[0] !== ".") { - msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()}); - } - } - node.status = msg; - node.dirty = true; - RED.view.redraw(); - } - }); - RED.comms.subscribe("notification/node/#",function(topic,msg) { - var i,m; - var typeList; - var info; - if (topic == "notification/node/added") { - var addedTypes = []; - msg.forEach(function(m) { - var id = m.id; - RED.nodes.addNodeSet(m); - addedTypes = addedTypes.concat(m.types); - RED.i18n.loadNodeCatalog(id, function() { - $.get('nodes/'+id, function(data) { - appendNodeConfig(data); - }); - }); - }); - if (addedTypes.length) { - typeList = ""; - RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success"); - } - loadIconList(); - } else if (topic == "notification/node/removed") { - for (i=0;i
  • ")+"
  • "; - RED.notify(RED._("palette.event.nodeRemoved", {count:m.types.length})+typeList,"success"); - } - } - loadIconList(); - } else if (topic == "notification/node/enabled") { - if (msg.types) { - info = RED.nodes.getNodeSet(msg.id); - if (info.added) { - RED.nodes.enableNodeSet(msg.id); - typeList = ""; - RED.notify(RED._("palette.event.nodeEnabled", {count:msg.types.length})+typeList,"success"); - } else { - $.get('nodes/'+msg.id, function(data) { - appendNodeConfig(data); - typeList = ""; - RED.notify(RED._("palette.event.nodeAdded", {count:msg.types.length})+typeList,"success"); - }); - } - } - } else if (topic == "notification/node/disabled") { - if (msg.types) { - RED.nodes.disableNodeSet(msg.id); - typeList = ""; - RED.notify(RED._("palette.event.nodeDisabled", {count:msg.types.length})+typeList,"success"); - } - } else if (topic == "node/upgraded") { - RED.notify(RED._("palette.event.nodeUpgraded", {module:msg.module,version:msg.version}),"success"); - RED.nodes.registry.setModulePendingUpdated(msg.module,msg.version); - } - // Refresh flow library to ensure any examples are updated - RED.library.loadFlowLibrary(); - }); - } - - function showAbout() { - $.get('red/about', function(data) { - var aboutHeader = '
    '+ - ''+ - '
    '; - - RED.sidebar.info.set(aboutHeader+marked(data)); - RED.sidebar.info.show(); - }); - } - - function loadEditor() { - var menuOptions = []; - if (RED.settings.theme("projects.enabled",false)) { - menuOptions.push({id:"menu-item-projects-menu",label:"Projects",options:[ - {id:"menu-item-projects-new",label:"New",disabled:false,onselect:"core:new-project"}, - {id:"menu-item-projects-open",label:"Open",disabled:false,onselect:"core:open-project"}, - {id:"menu-item-projects-settings",label:"Project Settings",disabled:false,onselect:"core:show-project-settings"} - ]}); - } - - - menuOptions.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[ - // {id:"menu-item-view-show-grid",setting:"view-show-grid",label:RED._("menu.label.view.showGrid"),toggle:true,onselect:"core:toggle-show-grid"}, - // {id:"menu-item-view-snap-grid",setting:"view-snap-grid",label:RED._("menu.label.view.snapGrid"),toggle:true,onselect:"core:toggle-snap-grid"}, - // {id:"menu-item-status",setting:"node-show-status",label:RED._("menu.label.displayStatus"),toggle:true,onselect:"core:toggle-status", selected: true}, - //null, - // {id:"menu-item-bidi",label:RED._("menu.label.view.textDir"),options:[ - // {id:"menu-item-bidi-default",toggle:"text-direction",label:RED._("menu.label.view.defaultDir"),selected: true, onselect:function(s) { if(s){RED.text.bidi.setTextDirection("")}}}, - // {id:"menu-item-bidi-ltr",toggle:"text-direction",label:RED._("menu.label.view.ltr"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("ltr")}}}, - // {id:"menu-item-bidi-rtl",toggle:"text-direction",label:RED._("menu.label.view.rtl"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("rtl")}}}, - // {id:"menu-item-bidi-auto",toggle:"text-direction",label:RED._("menu.label.view.auto"), onselect:function(s) { if(s){RED.text.bidi.setTextDirection("auto")}}} - // ]}, - // null, - {id:"menu-item-sidebar",label:RED._("menu.label.sidebar.show"),toggle:true,onselect:"core:toggle-sidebar", selected: true}, - null - ]}); - menuOptions.push(null); - menuOptions.push({id:"menu-item-import",label:RED._("menu.label.import"),options:[ - {id:"menu-item-import-clipboard",label:RED._("menu.label.clipboard"),onselect:"core:show-import-dialog"}, - {id:"menu-item-import-library",label:RED._("menu.label.library"),options:[]} - ]}); - menuOptions.push({id:"menu-item-export",label:RED._("menu.label.export"),options:[ - {id:"menu-item-export-clipboard",label:RED._("menu.label.clipboard"),onselect:"core:show-export-dialog"}, - {id:"menu-item-export-library",label:RED._("menu.label.library"),disabled:true,onselect:"core:library-export"} - ]}); - menuOptions.push(null); - menuOptions.push({id:"menu-item-search",label:RED._("menu.label.search"),onselect:"core:search"}); - menuOptions.push(null); - menuOptions.push({id:"menu-item-config-nodes",label:RED._("menu.label.displayConfig"),onselect:"core:show-config-tab"}); - menuOptions.push({id:"menu-item-workspace",label:RED._("menu.label.flows"),options:[ - {id:"menu-item-workspace-add",label:RED._("menu.label.add"),onselect:"core:add-flow"}, - {id:"menu-item-workspace-edit",label:RED._("menu.label.rename"),onselect:"core:edit-flow"}, - {id:"menu-item-workspace-delete",label:RED._("menu.label.delete"),onselect:"core:remove-flow"} - ]}); - menuOptions.push({id:"menu-item-subflow",label:RED._("menu.label.subflows"), options: [ - {id:"menu-item-subflow-create",label:RED._("menu.label.createSubflow"),onselect:"core:create-subflow"}, - {id:"menu-item-subflow-convert",label:RED._("menu.label.selectionToSubflow"),disabled:true,onselect:"core:convert-to-subflow"}, - ]}); - menuOptions.push(null); - if (RED.settings.theme('palette.editable') !== false) { - menuOptions.push({id:"menu-item-edit-palette",label:RED._("menu.label.editPalette"),onselect:"core:manage-palette"}); - menuOptions.push(null); - } - - menuOptions.push({id:"menu-item-user-settings",label:RED._("menu.label.settings"),onselect:"core:show-user-settings"}); - menuOptions.push(null); - - menuOptions.push({id:"menu-item-keyboard-shortcuts",label:RED._("menu.label.keyboardShortcuts"),onselect:"core:show-help"}); - menuOptions.push({id:"menu-item-help", - label: RED.settings.theme("menu.menu-item-help.label",RED._("menu.label.help")), - href: RED.settings.theme("menu.menu-item-help.url","http://nodered.org/docs") - }); - menuOptions.push({id:"menu-item-node-red-version", label:"v"+RED.settings.version, onselect: "core:show-about" }); - - - RED.view.init(); - RED.userSettings.init(); - RED.user.init(); - RED.library.init(); - RED.keyboard.init(); - RED.palette.init(); - if (RED.settings.theme('palette.editable') !== false) { - RED.palette.editor.init(); - } else { - console.log("Palette editor disabled"); - } - - RED.sidebar.init(); - - if (RED.settings.theme("projects.enabled",false)) { - RED.projects.init(); - } else { - console.log("Projects disabled"); - } - - RED.subflow.init(); - RED.workspaces.init(); - RED.clipboard.init(); - RED.search.init(); - RED.editor.init(); - RED.diff.init(); - - RED.menu.init({id:"btn-sidemenu",options: menuOptions}); - - RED.deploy.init(RED.settings.theme("deployButton",null)); - RED.notifications.init(); - - RED.actions.add("core:show-about", showAbout); - RED.nodes.init(); - RED.comms.connect(); - - $("#main-container").show(); - $(".header-toolbar").show(); - - loadNodeList(); - } - - var initialised = false; - - function init(options) { - if (initialised) { - throw new Error("RED already initialised"); - } - initialised = true; - ace.require("ace/ext/language_tools"); - options = options || {}; - options.apiRootUrl = options.apiRootUrl || ""; - if (options.apiRootUrl && !/\/$/.test(options.apiRootUrl)) { - options.apiRootUrl = options.apiRootUrl+"/"; - } - RED.i18n.init(options, function() { - RED.settings.init(options, loadEditor); - }) - } - - return { - init: init - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - - RED.events = (function() { - var handlers = {}; - - function on(evt,func) { - handlers[evt] = handlers[evt]||[]; - handlers[evt].push(func); - } - function off(evt,func) { - var handler = handlers[evt]; - if (handler) { - for (var i=0;iundefined - * Else return the JSON parsed value - * @param key - * @returns {*} - */ - var get = function (key) { - if (!hasLocalStorage()) { - return undefined; - } - if (key === "auth-tokens") { - return JSON.parse(localStorage.getItem(key)); - } else { - return userSettings[key]; - } - }; - - var remove = function (key) { - if (!hasLocalStorage()) { - return; - } - if (key === "auth-tokens") { - localStorage.removeItem(key); - } else { - delete userSettings[key]; - saveUserSettings(); - } - }; - - var setProperties = function(data) { - for (var prop in loadedSettings) { - if (loadedSettings.hasOwnProperty(prop) && RED.settings.hasOwnProperty(prop)) { - delete RED.settings[prop]; - } - } - for (prop in data) { - if (data.hasOwnProperty(prop)) { - RED.settings[prop] = data[prop]; - } - } - loadedSettings = data; - }; - - var setUserSettings = function(data) { - userSettings = data; - } - - var init = function (options, done) { - var accessTokenMatch = /[?&]access_token=(.*?)(?:$|&)/.exec(window.location.search); - if (accessTokenMatch) { - var accessToken = accessTokenMatch[1]; - RED.settings.set("auth-tokens",{access_token: accessToken}); - window.location.search = ""; - } - RED.settings.apiRootUrl = options.apiRootUrl; - - $.ajaxSetup({ - beforeSend: function(jqXHR,settings) { - // Only attach auth header for requests to relative paths - if (!/^\s*(https?:|\/|\.)/.test(settings.url)) { - if (options.apiRootUrl) { - settings.url = options.apiRootUrl+settings.url; - } - var auth_tokens = RED.settings.get("auth-tokens"); - if (auth_tokens) { - jqXHR.setRequestHeader("Authorization","Bearer "+auth_tokens.access_token); - } - jqXHR.setRequestHeader("Node-RED-API-Version","v2"); - } - } - }); - - load(done); - } - - var load = function(done) { - $.ajax({ - headers: { - "Accept": "application/json" - }, - dataType: "json", - cache: false, - url: 'settings', - success: function (data) { - setProperties(data); - if (!RED.settings.user || RED.settings.user.anonymous) { - RED.settings.remove("auth-tokens"); - } - console.log("Node-RED: " + data.version); - loadUserSettings(done); - }, - error: function(jqXHR,textStatus,errorThrown) { - if (jqXHR.status === 401) { - if (/[?&]access_token=(.*?)(?:$|&)/.test(window.location.search)) { - window.location.search = ""; - } - RED.user.login(function() { load(done); }); - } else { - console.log("Unexpected error loading settings:",jqXHR.status,textStatus); - } - } - }); - }; - - function loadUserSettings(done) { - $.ajax({ - headers: { - "Accept": "application/json" - }, - dataType: "json", - cache: false, - url: 'settings/user', - success: function (data) { - setUserSettings(data); - done(); - }, - error: function(jqXHR,textStatus,errorThrown) { - console.log("Unexpected error loading user settings:",jqXHR.status,textStatus); - } - }); - } - - function saveUserSettings() { - if (RED.user.hasPermission("settings.write")) { - if (pendingSave) { - clearTimeout(pendingSave); - } - pendingSave = setTimeout(function() { - pendingSave = null; - $.ajax({ - method: 'POST', - contentType: 'application/json', - url: 'settings/user', - data: JSON.stringify(userSettings), - success: function (data) { - }, - error: function(jqXHR,textStatus,errorThrown) { - console.log("Unexpected error saving user settings:",jqXHR.status,textStatus); - } - }); - },300); - } - } - - function theme(property,defaultValue) { - if (!RED.settings.editorTheme) { - return defaultValue; - } - var parts = property.split("."); - var v = RED.settings.editorTheme; - try { - for (var i=0;i'+ - '
    '+ - '
    '+ - '
    '+ - '
    '+ - ''); - - dialog.dialog({ - autoOpen: false, - dialogClass: "ui-dialog-no-close", - modal: true, - closeOnEscape: !!opts.cancelable, - width: 600, - resizable: false, - draggable: false - }); - - $("#node-dialog-login-fields").empty(); - $.ajax({ - dataType: "json", - url: "auth/login", - success: function(data) { - var i=0; - - if (data.type == "credentials") { - - for (;i",{class:"form-row"}); - $('
    ').appendTo(row); - var input = $('').appendTo(row); - - if (i'+RED._("user.loginFailed")+''+ - (opts.cancelable?''+RED._("common.label.cancel")+'':'')+ - '').appendTo("#node-dialog-login-fields"); - - - $("#node-dialog-login-submit").button(); - $("#node-dialog-login-fields").submit(function(event) { - $("#node-dialog-login-submit").button("option","disabled",true); - $("#node-dialog-login-failed").hide(); - $(".login-spinner").show(); - - var body = { - client_id: "node-red-editor", - grant_type: "password", - scope:"" - } - for (var i=0;i",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields"); - - var loginButton = $('',{style: "padding: 10px"}).appendTo(row).click(function() { - document.location = field.url; - }); - if (field.image) { - $("",{src:field.image}).appendTo(loginButton); - } else if (field.label) { - var label = $('').text(field.label); - if (field.icon) { - $('',{class: "fa fa-2x "+field.icon, style:"vertical-align: middle"}).appendTo(loginButton); - label.css({ - "verticalAlign":"middle", - "marginLeft":"8px" - }); - - } - label.appendTo(loginButton); - } - loginButton.button(); - } - - - } - if (opts.cancelable) { - $("#node-dialog-login-cancel").button().click(function( event ) { - $("#node-dialog-login").dialog('destroy').remove(); - }); - } - - var loginImageSrc = data.image || "red/images/node-red-256.png"; - - $("#node-dialog-login-image").load(function() { - dialog.dialog("open"); - }).attr("src",loginImageSrc); - - - } - }); - } - - function logout() { - var tokens = RED.settings.get("auth-tokens"); - var token = tokens?tokens.access_token:""; - $.ajax({ - url: "auth/revoke", - type: "POST", - data: {token:token} - }).done(function(data,textStatus,xhr) { - RED.settings.remove("auth-tokens"); - if (data && data.redirect) { - document.location.href = data.redirect; - } else { - document.location.reload(true); - } - }).fail(function(jqXHR,textStatus,errorThrown) { - if (jqXHR.status === 401) { - document.location.reload(true); - } else { - console.log(textStatus); - } - }) - } - - function updateUserMenu() { - $("#btn-usermenu-submenu li").remove(); - if (RED.settings.user.anonymous) { - RED.menu.addItem("btn-usermenu",{ - id:"usermenu-item-login", - label:RED._("menu.label.login"), - onselect: function() { - RED.user.login({cancelable:true},function() { - RED.settings.load(function() { - RED.notify(RED._("user.loggedInAs",{name:RED.settings.user.username}),"success"); - updateUserMenu(); - RED.events.emit("login",RED.settings.user.username); - }); - }); - } - }); - } else { - RED.menu.addItem("btn-usermenu",{ - id:"usermenu-item-username", - label:""+RED.settings.user.username+"" - }); - RED.menu.addItem("btn-usermenu",{ - id:"usermenu-item-logout", - label:RED._("menu.label.logout"), - onselect: function() { - RED.user.logout(); - } - }); - } - - } - - function init() { - if (RED.settings.user) { - if (!RED.settings.editorTheme || !RED.settings.editorTheme.hasOwnProperty("userMenu")) { - - var userMenu = $('
  • ') - .prependTo(".header-toolbar"); - if (RED.settings.user.image) { - $('').css({ - backgroundImage: "url("+RED.settings.user.image+")", - }).appendTo(userMenu.find("a")); - } else { - $('').appendTo(userMenu.find("a")); - } - - RED.menu.init({id:"btn-usermenu", - options: [] - }); - updateUserMenu(); - } - } - - } - - var readRE = /^((.+)\.)?read$/ - var writeRE = /^((.+)\.)?write$/ - - function hasPermission(permission) { - if (permission === "") { - return true; - } - if (!RED.settings.user) { - return true; - } - return checkPermission(RED.settings.user.permissions||"",permission); - } - function checkPermission(userScope,permission) { - if (permission === "") { - return true; - } - var i; - - if (Array.isArray(permission)) { - // Multiple permissions requested - check each one - for (i=0;i 5 && errornotification == null) { - errornotification = RED.notify(RED._("notification.errors.lostConnection"),"error",true); - } - } else if (reconnectAttempts < 20) { - setTimeout(connectWS,2000); - } else { - connectCountdown = 60; - connectCountdownTimer = setInterval(function() { - connectCountdown--; - if (connectCountdown === 0) { - errornotification.update(RED._("notification.errors.lostConnection")); - clearInterval(connectCountdownTimer); - connectWS(); - } else { - var msg = RED._("notification.errors.lostConnectionReconnect",{time: connectCountdown})+' '+ RED._("notification.errors.lostConnectionTry")+''; - errornotification.update(msg); - $(errornotification).find("a").click(function(e) { - e.preventDefault(); - errornotification.update(RED._("notification.errors.lostConnection")); - clearInterval(connectCountdownTimer); - connectWS(); - }) - } - },1000); - } - - } - } - - function subscribe(topic,callback) { - if (subscriptions[topic] == null) { - subscriptions[topic] = []; - } - subscriptions[topic].push(callback); - if (ws && ws.readyState == 1) { - ws.send(JSON.stringify({subscribe:topic})); - } - } - - function unsubscribe(topic,callback) { - if (subscriptions[topic]) { - for (var i=0;i= 0x05d0 && c <= 0x05ff)|| - (c >= 0x0600 && c <= 0x065f)|| - (c >= 0x066a && c <= 0x06ef)|| - (c >= 0x06fa && c <= 0x07ff)|| - (c >= 0xfb1d && c <= 0xfdff)|| - (c >= 0xfe70 && c <= 0xfefc); - } - - function isLatinChar(c){ - return (c > 64 && c < 91)||(c > 96 && c < 123) - } - - /** - * Determines the text direction of a given string. - * @param value - the string - */ - function resolveBaseTextDir(value) { - if (textDir == "auto") { - if (isRTLValue(value)) { - return "rtl"; - } else { - return "ltr"; - } - } - else { - return textDir; - } - } - - function onInputChange() { - $(this).attr("dir", resolveBaseTextDir($(this).val())); - } - - /** - * Adds event listeners to the Input to ensure its text-direction attribute - * is properly set based on its content. - * @param input - the input field - */ - function prepareInput(input) { - input.on("keyup",onInputChange).on("paste",onInputChange).on("cut",onInputChange); - // Set the initial text direction - onInputChange.call(input); - } - - /** - * Enforces the text direction of a given string by adding - * UCC (Unicode Control Characters) - * @param value - the string - */ - function enforceTextDirectionWithUCC(value) { - if (value) { - var dir = resolveBaseTextDir(value); - if (dir == "ltr") { - return LRE + value + PDF; - } - else if (dir == "rtl") { - return RLE + value + PDF; - } - } - return value; - } - - /** - * Enforces the text direction for all the spans with style bidiAware under - * workspace or sidebar div - */ - function enforceTextDirectionOnPage() { - $("#workspace").find('span.bidiAware').each(function() { - $(this).attr("dir", resolveBaseTextDir($(this).html())); - }); - $("#sidebar").find('span.bidiAware').each(function() { - $(this).attr("dir", resolveBaseTextDir($(this).text())); - }); - } - - /** - * Sets the text direction preference - * @param dir - the text direction preference - */ - function setTextDirection(dir) { - textDir = dir; - RED.nodes.eachNode(function(n) { n.dirty = true;}); - RED.view.redraw(); - RED.palette.refresh(); - enforceTextDirectionOnPage(); - } - - return { - setTextDirection: setTextDirection, - enforceTextDirectionWithUCC: enforceTextDirectionWithUCC, - resolveBaseTextDir: resolveBaseTextDir, - prepareInput: prepareInput - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.text.format = (function() { - - var TextSegment = (function() { - var TextSegment = function (obj) { - this.content = ""; - this.actual = ""; - this.textDirection = ""; - this.localGui = ""; - this.isVisible = true; - this.isSeparator = false; - this.isParsed = false; - this.keep = false; - this.inBounds = false; - this.inPoints = false; - var prop = ""; - for (prop in obj) { - if (obj.hasOwnProperty(prop)) { - this[prop] = obj[prop]; - } - } - }; - return TextSegment; - })(); - - var tools = (function() { - function initBounds(bounds) { - if (!bounds) { - return false; - } - if (typeof(bounds.start) === "undefined") { - bounds.start = ""; - } - if (typeof(bounds.end) === "undefined") { - bounds.end = ""; - } - if (typeof(bounds.startAfter) !== "undefined") { - bounds.start = bounds.startAfter; - bounds.after = true; - } else { - bounds.after = false; - } - if (typeof(bounds.endBefore) !== "undefined") { - bounds.end = bounds.endBefore; - bounds.before = true; - } else { - bounds.before = false; - } - var startPos = parseInt(bounds.startPos, 10); - if (!isNaN(startPos)) { - bounds.usePos = true; - } else { - bounds.usePos = false; - } - var bLength = parseInt(bounds.length, 10); - if (!isNaN(bLength)) { - bounds.useLength = true; - } else { - bounds.useLength = false; - } - bounds.loops = typeof(bounds.loops) !== "undefined" ? !!bounds.loops : true; - return true; - } - - function getBounds(segment, src) { - var bounds = {}; - for (var prop in src) { - if (src.hasOwnProperty(prop)) { - bounds[prop] = src[prop]; - } - } - var content = segment.content; - var usePos = bounds.usePos && bounds.startPos < content.length; - if (usePos) { - bounds.start = ""; - bounds.loops = false; - } - bounds.bStart = usePos ? bounds.startPos : bounds.start.length > 0 ? content.indexOf(bounds.start) : 0; - var useLength = bounds.useLength && bounds.length > 0 && bounds.bStart + bounds.length < content.length; - if (useLength) { - bounds.end = ""; - } - bounds.bEnd = useLength ? bounds.bStart + bounds.length : bounds.end.length > 0 ? - content.indexOf(bounds.end, bounds.bStart + bounds.start.length) + 1 : content.length; - if (!bounds.after) { - bounds.start = ""; - } - if (!bounds.before) { - bounds.end = ""; - } - return bounds; - } - - return { - handleSubcontents: function (segments, args, subs, origContent, locale) { // jshint unused: false - if (!subs.content || typeof(subs.content) !== "string" || subs.content.length === 0) { - return segments; - } - var sLoops = true; - if (typeof(subs.loops) !== "undefined") { - sLoops = !!subs.loops; - } - for (var j = 0; true; j++) { - if (j >= segments.length) { - break; - } - if (segments[j].isParsed || segments.keep || segments[j].isSeparator) { - continue; - } - var content = segments[j].content; - var start = content.indexOf(subs.content); - if (start < 0) { - continue; - } - var end; - var length = 0; - if (subs.continued) { - do { - length++; - end = content.indexOf(subs.content, start + length * subs.content.length); - } while (end === 0); - } else { - length = 1; - } - end = start + length * subs.content.length; - segments.splice(j, 1); - if (start > 0) { - segments.splice(j, 0, new TextSegment({ - content: content.substring(0, start), - localGui: args.dir, - keep: true - })); - j++; - } - segments.splice(j, 0, new TextSegment({ - content: content.substring(start, end), - textDirection: subs.subDir, - localGui: args.dir - })); - if (end < content.length) { - segments.splice(j + 1, 0, new TextSegment({ - content: content.substring(end, content.length), - localGui: args.dir, - keep: true - })); - } - if (!sLoops) { - break; - } - } - }, - - handleBounds: function (segments, args, aBounds, origContent, locale) { - for (var i = 0; i < aBounds.length; i++) { - if (!initBounds(aBounds[i])) { - continue; - } - for (var j = 0; true; j++) { - if (j >= segments.length) { - break; - } - if (segments[j].isParsed || segments[j].inBounds || segments.keep || segments[j].isSeparator) { - continue; - } - var bounds = getBounds(segments[j], aBounds[i]); - var start = bounds.bStart; - var end = bounds.bEnd; - if (start < 0 || end < 0) { - continue; - } - var content = segments[j].content; - - segments.splice(j, 1); - if (start > 0) { - segments.splice(j, 0, new TextSegment({ - content: content.substring(0, start), - localGui: args.dir, - keep: true - })); - j++; - } - if (bounds.start) { - segments.splice(j, 0, new TextSegment({ - content: bounds.start, - localGui: args.dir, - isSeparator: true - })); - j++; - } - segments.splice(j, 0, new TextSegment({ - content: content.substring(start + bounds.start.length, end - bounds.end.length), - textDirection: bounds.subDir, - localGui: args.dir, - inBounds: true - })); - if (bounds.end) { - j++; - segments.splice(j, 0, new TextSegment({ - content: bounds.end, - localGui: args.dir, - isSeparator: true - })); - } - if (end + bounds.end.length < content.length) { - segments.splice(j + 1, 0, new TextSegment({ - content: content.substring(end + bounds.end.length, content.length), - localGui: args.dir, - keep: true - })); - } - if (!bounds.loops) { - break; - } - } - } - for (i = 0; i < segments.length; i++) { - segments[i].inBounds = false; - } - return segments; - }, - - handleCases: function (segments, args, cases, origContent, locale) { - if (cases.length === 0) { - return segments; - } - var hArgs = {}; - for (var prop in args) { - if (args.hasOwnProperty(prop)) { - hArgs[prop] = args[prop]; - } - } - for (var i = 0; i < cases.length; i++) { - if (!cases[i].handler || typeof(cases[i].handler.handle) !== "function") { - cases[i].handler = args.commonHandler; - } - if (cases[i].args) { - hArgs.cases = cases[i].args.cases; - hArgs.points = cases[i].args.points; - hArgs.bounds = cases[i].args.bounds; - hArgs.subs = cases[i].args.subs; - } else { - hArgs.cases = []; - hArgs.points = []; - hArgs.bounds = []; - hArgs.subs = {}; - } - cases[i].handler.handle(origContent, segments, hArgs, locale); - } - return segments; - }, - - handlePoints: function (segments, args, points, origContent, locale) { //jshint unused: false - for (var i = 0; i < points.length; i++) { - for (var j = 0; true; j++) { - if (j >= segments.length) { - break; - } - if (segments[j].isParsed || segments[j].keep || segments[j].isSeparator) { - continue; - } - var content = segments[j].content; - var pos = content.indexOf(points[i]); - if (pos >= 0) { - segments.splice(j, 1); - if (pos > 0) { - segments.splice(j, 0, new TextSegment({ - content: content.substring(0, pos), - textDirection: args.subDir, - localGui: args.dir, - inPoints: true - })); - j++; - } - segments.splice(j, 0, new TextSegment({ - content: points[i], - localGui: args.dir, - isSeparator: true - })); - if (pos + points[i].length + 1 <= content.length) { - segments.splice(j + 1, 0, new TextSegment({ - content: content.substring(pos + points[i].length), - textDirection: args.subDir, - localGui: args.dir, - inPoints: true - })); - } - } - } - } - for (i = 0; i < segments.length; i++) { - if (segments[i].keep) { - segments[i].keep = false; - } else if(segments[i].inPoints){ - segments[i].isParsed = true; - segments[i].inPoints = false; - } - } - return segments; - } - }; - })(); - - var common = (function() { - return { - handle: function (content, segments, args, locale) { - var cases = []; - if (Array.isArray(args.cases)) { - cases = args.cases; - } - var points = []; - if (typeof(args.points) !== "undefined") { - if (Array.isArray(args.points)) { - points = args.points; - } else if (typeof(args.points) === "string") { - points = args.points.split(""); - } - } - var subs = {}; - if (typeof(args.subs) === "object") { - subs = args.subs; - } - var aBounds = []; - if (Array.isArray(args.bounds)) { - aBounds = args.bounds; - } - - tools.handleBounds(segments, args, aBounds, content, locale); - tools.handleSubcontents(segments, args, subs, content, locale); - tools.handleCases(segments, args, cases, content, locale); - tools.handlePoints(segments, args, points, content, locale); - return segments; - } - }; - })(); - - var misc = (function() { - var isBidiLocale = function (locale) { - var lang = !locale ? "" : locale.split("-")[0]; - if (!lang || lang.length < 2) { - return false; - } - return ["iw", "he", "ar", "fa", "ur"].some(function (bidiLang) { - return bidiLang === lang; - }); - }; - var LRE = "\u202A"; - var RLE = "\u202B"; - var PDF = "\u202C"; - var LRM = "\u200E"; - var RLM = "\u200F"; - var LRO = "\u202D"; - var RLO = "\u202E"; - - return { - LRE: LRE, - RLE: RLE, - PDF: PDF, - LRM: LRM, - RLM: RLM, - LRO: LRO, - RLO: RLO, - - getLocaleDetails: function (locale) { - if (!locale) { - locale = typeof navigator === "undefined" ? "" : - (navigator.language || - navigator.userLanguage || - ""); - } - locale = locale.toLowerCase(); - if (isBidiLocale(locale)) { - var full = locale.split("-"); - return {lang: full[0], country: full[1] ? full[1] : ""}; - } - return {lang: "not-bidi"}; - }, - - removeUcc: function (text) { - if (text) { - return text.replace(/[\u200E\u200F\u202A-\u202E]/g, ""); - } - return text; - }, - - removeTags: function (text) { - if (text) { - return text.replace(/<[^<]*>/g, ""); - } - return text; - }, - - getDirection: function (text, dir, guiDir, checkEnd) { - if (dir !== "auto" && (/^(rtl|ltr)$/i).test(dir)) { - return dir; - } - guiDir = (/^(rtl|ltr)$/i).test(guiDir) ? guiDir : "ltr"; - var txt = !checkEnd ? text : text.split("").reverse().join(""); - var fdc = /[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(txt); - return fdc ? (fdc[0] <= "z" ? "ltr" : "rtl") : guiDir; - }, - - hasArabicChar: function (text) { - var fdc = /[\u0600-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(text); - return !!fdc; - }, - - showMarks: function (text, guiDir) { - var result = ""; - for (var i = 0; i < text.length; i++) { - var c = "" + text.charAt(i); - switch (c) { - case LRM: - result += ""; - break; - case RLM: - result += ""; - break; - case LRE: - result += ""; - break; - case RLE: - result += ""; - break; - case LRO: - result += ""; - break; - case RLO: - result += ""; - break; - case PDF: - result += ""; - break; - default: - result += c; - } - } - var mark = typeof(guiDir) === "undefined" || !((/^(rtl|ltr)$/i).test(guiDir)) ? "" : - guiDir === "rtl" ? RLO : LRO; - return mark + result + (mark === "" ? "" : PDF); - }, - - hideMarks: function (text) { - var txt = text.replace(//g, this.LRM).replace(//g, this.RLM).replace(//g, this.LRE); - return txt.replace(//g, this.RLE).replace(//g, this.LRO).replace(//g, this.RLO).replace(//g, this.PDF); - }, - - showTags: function (text) { - return "" + text + ""; - }, - - hideTags: function (text) { - return text.replace(//g,"").replace(/<\/xmp>/g,""); - } - }; - })(); - - var stext = (function() { - var stt = {}; - - // args - // handler: main handler (default - dbidi/stt/handlers/common) - // guiDir: GUI direction (default - "ltr") - // dir: main stt direction (default - guiDir) - // subDir: direction of subsegments - // points: array of delimiters (default - []) - // bounds: array of definitions of bounds in which handler works - // subs: object defines special handling for some substring if found - // cases: array of additional modules with their args for handling special cases (default - []) - function parseAndDisplayStructure(content, fArgs, isHtml, locale) { - if (!content || !fArgs) { - return content; - } - return displayStructure(parseStructure(content, fArgs, locale), fArgs, isHtml); - } - - function checkArguments(fArgs, fullCheck) { - var args = Array.isArray(fArgs)? fArgs[0] : fArgs; - if (!args.guiDir) { - args.guiDir = "ltr"; - } - if (!args.dir) { - args.dir = args.guiDir; - } - if (!fullCheck) { - return args; - } - if (typeof(args.points) === "undefined") { - args.points = []; - } - if (!args.cases) { - args.cases = []; - } - if (!args.bounds) { - args.bounds = []; - } - args.commonHandler = common; - return args; - } - - function parseStructure(content, fArgs, locale) { - if (!content || !fArgs) { - return new TextSegment({content: ""}); - } - var args = checkArguments(fArgs, true); - var segments = [new TextSegment( - { - content: content, - actual: content, - localGui: args.dir - })]; - var parse = common.handle; - if (args.handler && typeof(args.handler) === "function") { - parse = args.handler.handle; - } - parse(content, segments, args, locale); - return segments; - } - - function displayStructure(segments, fArgs, isHtml) { - var args = checkArguments(fArgs, false); - if (isHtml) { - return getResultWithHtml(segments, args); - } - else { - return getResultWithUcc(segments, args); - } - } - - function getResultWithUcc(segments, args, isHtml) { - var result = ""; - var checkedDir = ""; - var prevDir = ""; - var stop = false; - for (var i = 0; i < segments.length; i++) { - if (segments[i].isVisible) { - var dir = segments[i].textDirection; - var lDir = segments[i].localGui; - if (lDir !== "" && prevDir === "") { - result += (lDir === "rtl" ? misc.RLE : misc.LRE); - } - else if(prevDir !== "" && (lDir === "" || lDir !== prevDir || stop)) { - result += misc.PDF + (i == segments.length - 1 && lDir !== ""? "" : args.dir === "rtl" ? misc.RLM : misc.LRM); - if (lDir !== "") { - result += (lDir === "rtl" ? misc.RLE : misc.LRE); - } - } - if (dir === "auto") { - dir = misc.getDirection(segments[i].content, dir, args.guiDir); - } - if ((/^(rtl|ltr)$/i).test(dir)) { - result += (dir === "rtl" ? misc.RLE : misc.LRE) + segments[i].content + misc.PDF; - checkedDir = dir; - } - else { - result += segments[i].content; - checkedDir = misc.getDirection(segments[i].content, dir, args.guiDir, true); - } - if (i < segments.length - 1) { - var locDir = lDir && segments[i+1].localGui? lDir : args.dir; - result += locDir === "rtl" ? misc.RLM : misc.LRM; - } - else if(prevDir !== "") { - result += misc.PDF; - } - prevDir = lDir; - stop = false; - } - else { - stop = true; - } - } - var sttDir = args.dir === "auto" ? misc.getDirection(segments[0].actual, args.dir, args.guiDir) : args.dir; - if (sttDir !== args.guiDir) { - result = (sttDir === "rtl" ? misc.RLE : misc.LRE) + result + misc.PDF; - } - return result; - } - - function getResultWithHtml(segments, args, isHtml) { - var result = ""; - var checkedDir = ""; - var prevDir = ""; - for (var i = 0; i < segments.length; i++) { - if (segments[i].isVisible) { - var dir = segments[i].textDirection; - var lDir = segments[i].localGui; - if (lDir !== "" && prevDir === "") { - result += "<bdi dir='" + (lDir === "rtl" ? "rtl" : "ltr") + "'>"; - } - else if(prevDir !== "" && (lDir === "" || lDir !== prevDir || stop)) { - result += "</bdi>" + (i == segments.length - 1 && lDir !== ""? "" : "<span style='unicode-bidi: embed; direction: " + (args.dir === "rtl" ? "rtl" : "ltr") + ";'></span>"); - if (lDir !== "") { - result += "<bdi dir='" + (lDir === "rtl" ? "rtl" : "ltr") + "'>"; - } - } - - if (dir === "auto") { - dir = misc.getDirection(segments[i].content, dir, args.guiDir); - } - if ((/^(rtl|ltr)$/i).test(dir)) { - //result += "<span style='unicode-bidi: embed; direction: " + (dir === "rtl" ? "rtl" : "ltr") + ";'>" + segments[i].content + "</span>"; - result += "<bdi dir='" + (dir === "rtl" ? "rtl" : "ltr") + "'>" + segments[i].content + "</bdi>"; - checkedDir = dir; - } - else { - result += segments[i].content; - checkedDir = misc.getDirection(segments[i].content, dir, args.guiDir, true); - } - if (i < segments.length - 1) { - var locDir = lDir && segments[i+1].localGui? lDir : args.dir; - result += "<span style='unicode-bidi: embed; direction: " + (locDir === "rtl" ? "rtl" : "ltr") + ";'></span>"; - } - else if(prevDir !== "") { - result += "</bdi>"; - } - prevDir = lDir; - stop = false; - } - else { - stop = true; - } - } - var sttDir = args.dir === "auto" ? misc.getDirection(segments[0].actual, args.dir, args.guiDir) : args.dir; - if (sttDir !== args.guiDir) { - result = "<bdi dir='" + (sttDir === "rtl" ? "rtl" : "ltr") + "'>" + result + "</bdi>"; - } - return result; - } - - //TBD ? - function restore(text, isHtml) { - return text; - } - - stt.parseAndDisplayStructure = parseAndDisplayStructure; - stt.parseStructure = parseStructure; - stt.displayStructure = displayStructure; - stt.restore = restore; - - return stt; - })(); - - var breadcrumb = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: args.dir ? args.dir : isRtl ? "rtl" : "ltr", - subs: { - content: ">", - continued: true, - subDir: isRtl ? "rtl" : "ltr" - }, - cases: [{ - args: { - subs: { - content: "<", - continued: true, - subDir: isRtl ? "ltr" : "rtl" - } - } - }] - }; - - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var comma = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: "ltr", - points: "," - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var email = (function() { - function getDir(text, locale) { - if (misc.getLocaleDetails(locale).lang !== "ar") { - return "ltr"; - } - var ind = text.indexOf("@"); - if (ind > 0 && ind < text.length - 1) { - return misc.hasArabicChar(text.substring(ind + 1)) ? "rtl" : "ltr"; - } - return "ltr"; - } - - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: getDir(text, locale), - points: "<>.:,;@", - cases: [{ - handler: common, - args: { - bounds: [{ - startAfter: "\"", - endBefore: "\"" - }, - { - startAfter: "(", - endBefore: ")" - } - ], - points: "" - } - }] - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var filepath = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: "ltr", - points: "/\\:." - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var formula = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: "ltr", - points: " /%^&[]<>=!?~:.,|()+-*{}", - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - - var sql = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: "ltr", - points: "\t!#%&()*+,-./:;<=>?|[]{}", - cases: [{ - handler: common, - args: { - bounds: [{ - startAfter: "/*", - endBefore: "*/" - }, - { - startAfter: "--", - end: "\n" - }, - { - startAfter: "--" - } - ] - } - }, - { - handler: common, - args: { - subs: { - content: " ", - continued: true - } - } - }, - { - handler: common, - args: { - bounds: [{ - startAfter: "'", - endBefore: "'" - }, - { - startAfter: "\"", - endBefore: "\"" - } - ] - } - } - ] - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var underscore = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: "ltr", - points: "_" - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var url = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: "ltr", - points: ":?#/@.[]=" - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var word = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: args.dir ? args.dir : isRtl ? "rtl" : "ltr", - points: " ,.!?;:", - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var xpath = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var fArgs = - { - guiDir: isRtl ? "rtl" : "ltr", - dir: "ltr", - points: " /[]<>=!:@.|()+-*", - cases: [{ - handler: common, - args: { - bounds: [{ - startAfter: "\"", - endBefore: "\"" - }, - { - startAfter: "'", - endBefore: "'" - } - ], - points: "" - } - } - ] - }; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, fArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, fArgs, !!isHtml, locale); - } - } - }; - })(); - - var custom = (function() { - return { - format: function (text, args, isRtl, isHtml, locale, parseOnly) { - var hArgs = {}; - var prop = ""; - var sArgs = Array.isArray(args)? args[0] : args; - for (prop in sArgs) { - if (sArgs.hasOwnProperty(prop)) { - hArgs[prop] = sArgs[prop]; - } - } - hArgs.guiDir = isRtl ? "rtl" : "ltr"; - hArgs.dir = hArgs.dir ? hArgs.dir : hArgs.guiDir; - if (!parseOnly) { - return stext.parseAndDisplayStructure(text, hArgs, !!isHtml, locale); - } - else { - return stext.parseStructure(text, hArgs, !!isHtml, locale); - } - } - }; - })(); - - var message = (function() { - var params = {msgLang: "en", msgDir: "", phLang: "", phDir: "", phPacking: ["{","}"], phStt: {type: "none", args: {}}, guiDir: ""}; - var parametersChecked = false; - - function getDirectionOfLanguage(lang) { - if (lang === "he" || lang === "iw" || lang === "ar") { - return "rtl"; - } - return "ltr"; - } - - function checkParameters(obj) { - if (obj.msgDir.length === 0) { - obj.msgDir = getDirectionOfLanguage(obj.msgLang); - } - obj.msgDir = obj.msgDir !== "ltr" && obj.msgDir !== "rtl" && obj.msgDir != "auto"? "ltr" : obj.msgDir; - if (obj.guiDir.length === 0) { - obj.guiDir = obj.msgDir; - } - obj.guiDir = obj.guiDir !== "rtl"? "ltr" : "rtl"; - if (obj.phDir.length === 0) { - obj.phDir = obj.phLang.length === 0? obj.msgDir : getDirectionOfLanguage(obj.phLang); - } - obj.phDir = obj.phDir !== "ltr" && obj.phDir !== "rtl" && obj.phDir != "auto"? "ltr" : obj.phDir; - if (typeof (obj.phPacking) === "string") { - obj.phPacking = obj.phPacking.split(""); - } - if (obj.phPacking.length < 2) { - obj.phPacking = ["{","}"]; - } - } - - return { - setDefaults: function (args) { - for (var prop in args) { - if (params.hasOwnProperty(prop)) { - params[prop] = args[prop]; - } - } - checkParameters(params); - parametersChecked = true; - }, - - format: function (text) { - if (!parametersChecked) { - checkParameters(params); - parametersChecked = true; - } - var isHtml = false; - var hasHtmlArg = false; - var spLength = params.phPacking[0].length; - var epLength = params.phPacking[1].length; - if (arguments.length > 0) { - var last = arguments[arguments.length-1]; - if (typeof (last) === "boolean") { - isHtml = last; - hasHtmlArg = true; - } - } - //Message - var re = new RegExp(params.phPacking[0] + "\\d+" + params.phPacking[1]); - var m; - var tSegments = []; - var offset = 0; - var txt = text; - while ((m = re.exec(txt)) != null) { - var lastIndex = txt.indexOf(m[0]) + m[0].length; - if (lastIndex > m[0].length) { - tSegments.push({text: txt.substring(0, lastIndex - m[0].length), ph: false}); - } - tSegments.push({text: m[0], ph: true}); - offset += lastIndex; - txt = txt.substring(lastIndex, txt.length); - } - if (offset < text.length) { - tSegments.push({text: text.substring(offset, text.length), ph: false}); - } - //Parameters - var tArgs = []; - for (var i = 1; i < arguments.length - (hasHtmlArg? 1 : 0); i++) { - var arg = arguments[i]; - var checkArr = arg; - var inLoop = false; - var indArr = 0; - if (Array.isArray(checkArr)) { - arg = checkArr[0]; - if (typeof(arg) === "undefined") { - continue; - } - inLoop = true; - } - do { - if (typeof (arg) === "string") { - tArgs.push({text: arg, dir: params.phDir, stt: params.stt}); - } - else if(typeof (arg) === "boolean") { - isHtml = arg; - } - else if(typeof (arg) === "object") { - tArgs.push(arg); - if (!arg.hasOwnProperty("text")) { - tArgs[tArgs.length-1].text = "{???}"; - } - if (!arg.hasOwnProperty("dir") || arg.dir.length === 0) { - tArgs[tArgs.length-1].dir = params.phDir; - } - if (!arg.hasOwnProperty("stt") || (typeof (arg.stt) === "string" && arg.stt.length === 0) || - (typeof (arg.stt) === "object" && Object.keys(arg.stt).length === 0)) { - tArgs[tArgs.length-1].stt = params.phStt; - } - } - else { - tArgs.push({text: "" + arg, dir: params.phDir, stt: params.phStt}); - } - if (inLoop) { - indArr++; - if (indArr == checkArr.length) { - inLoop = false; - } - else { - arg = checkArr[indArr]; - } - } - } while(inLoop); - } - //Indexing - var segments = []; - for (i = 0; i < tSegments.length; i++) { - var t = tSegments[i]; - if (!t.ph) { - segments.push(new TextSegment({content: t.text, textDirection: params.msgDir})); - } - else { - var ind = parseInt(t.text.substring(spLength, t.text.length - epLength)); - if (isNaN(ind) || ind >= tArgs.length) { - segments.push(new TextSegment({content: t.text, textDirection: params.msgDir})); - continue; - } - var sttType = "none"; - if (!tArgs[ind].stt) { - tArgs[ind].stt = params.phStt; - } - if (tArgs[ind].stt) { - if (typeof (tArgs[ind].stt) === "string") { - sttType = tArgs[ind].stt; - } - else if(tArgs[ind].stt.hasOwnProperty("type")) { - sttType = tArgs[ind].stt.type; - } - } - if (sttType.toLowerCase() !== "none") { - var sttSegs = getHandler(sttType).format(tArgs[ind].text, tArgs[ind].stt.args || {}, - params.msgDir === "rtl", false, params.msgLang, true); - for (var j = 0; j < sttSegs.length; j++) { - segments.push(sttSegs[j]); - } - segments.push(new TextSegment({isVisible: false})); - } - else { - segments.push(new TextSegment({content: tArgs[ind].text, textDirection: (tArgs[ind].dir? tArgs[ind].dir : params.phDir)})); - } - } - } - var result = stext.displayStructure(segments, {guiDir: params.guiDir, dir: params.msgDir}, isHtml); - return result; - } - }; - })(); - - var event = null; - - function getHandler(type) { - switch (type) { - case "breadcrumb" : - return breadcrumb; - case "comma" : - return comma; - case "email" : - return email; - case "filepath" : - return filepath; - case "formula" : - return formula; - case "sql" : - return sql; - case "underscore" : - return underscore; - case "url" : - return url; - case "word" : - return word; - case "xpath" : - return xpath; - default: - return custom; - } - } - - function isInputEventSupported(element) { - var agent = window.navigator.userAgent; - if (agent.indexOf("MSIE") >=0 || agent.indexOf("Trident") >=0 || agent.indexOf("Edge") >=0) { - return false; - } - var checked = document.createElement(element.tagName); - checked.contentEditable = true; - var isSupported = ("oninput" in checked); - if (!isSupported) { - checked.setAttribute('oninput', 'return;'); - isSupported = typeof checked['oninput'] == 'function'; - } - checked = null; - return isSupported; - } - - function attachElement(element, type, args, isRtl, locale) { - //if (!element || element.nodeType != 1 || !element.isContentEditable) - if (!element || element.nodeType != 1) { - return false; - } - if (!event) { - event = document.createEvent('Event'); - event.initEvent('TF', true, true); - } - element.setAttribute("data-tf-type", type); - var sArgs = args === "undefined"? "{}" : JSON.stringify(Array.isArray(args)? args[0] : args); - element.setAttribute("data-tf-args", sArgs); - var dir = "ltr"; - if (isRtl === "undefined") { - if (element.dir) { - dir = element.dir; - } - else if(element.style && element.style.direction) { - dir = element.style.direction; - } - isRtl = dir.toLowerCase() === "rtl"; - } - element.setAttribute("data-tf-dir", isRtl); - element.setAttribute("data-tf-locale", misc.getLocaleDetails(locale).lang); - if (isInputEventSupported(element)) { - var ehandler = element.oninput; - element.oninput = function(event) { - displayWithStructure(event.target); - }; - } - else { - element.onkeyup = function(e) { - displayWithStructure(e.target); - element.dispatchEvent(event); - }; - element.onmouseup = function(e) { - displayWithStructure(e.target); - element.dispatchEvent(event); - }; - } - displayWithStructure(element); - - return true; - } - - function detachElement(element) { - if (!element || element.nodeType != 1) { - return; - } - element.removeAttribute("data-tf-type"); - element.removeAttribute("data-tf-args"); - element.removeAttribute("data-tf-dir"); - element.removeAttribute("data-tf-locale"); - element.innerHTML = element.textContent || ""; - } - - function displayWithStructure(element) { - var txt = element.textContent || ""; - var selection = document.getSelection(); - if (txt.length === 0 || !selection || selection.rangeCount <= 0) { - element.dispatchEvent(event); - return; - } - - var range = selection.getRangeAt(0); - var tempRange = range.cloneRange(), startNode, startOffset; - startNode = range.startContainer; - startOffset = range.startOffset; - var textOffset = 0; - if (startNode.nodeType === 3) { - textOffset += startOffset; - } - tempRange.setStart(element,0); - tempRange.setEndBefore(startNode); - var div = document.createElement('div'); - div.appendChild(tempRange.cloneContents()); - textOffset += div.textContent.length; - - element.innerHTML = getHandler(element.getAttribute("data-tf-type")). - format(txt, JSON.parse(element.getAttribute("data-tf-args")), (element.getAttribute("data-tf-dir") === "true"? true : false), - true, element.getAttribute("data-tf-locale")); - var parent = element; - var node = element; - var newOffset = 0; - var inEnd = false; - selection.removeAllRanges(); - range.setStart(element,0); - range.setEnd(element,0); - while (node) { - if (node.nodeType === 3) { - if (newOffset + node.nodeValue.length >= textOffset) { - range.setStart(node, textOffset - newOffset); - break; - } - else { - newOffset += node.nodeValue.length; - node = node.nextSibling; - } - } - else if(node.hasChildNodes()) { - parent = node; - node = parent.firstChild; - continue; - } - else { - node = node.nextSibling; - } - while (!node) { - if (parent === element) { - inEnd = true; - break; - } - node = parent.nextSibling; - parent = parent.parentNode; - } - if (inEnd) { - break; - } - } - - selection.addRange(range); - element.dispatchEvent(event); - } - - return { - /** - * Returns the HTML representation of a given structured text - * @param text - the structured text - * @param type - could be one of filepath, url, email - * @param args - pass additional arguments to the handler. generally null. - * @param isRtl - indicates if the GUI is mirrored - * @param locale - the browser locale - */ - getHtml: function (text, type, args, isRtl, locale) { - return getHandler(type).format(text, args, isRtl, true, locale); - }, - /** - * Handle Structured text correct display for a given HTML element. - * @param element - the element : should be of type div contenteditable=true - * @param type - could be one of filepath, url, email - * @param args - pass additional arguments to the handler. generally null. - * @param isRtl - indicates if the GUI is mirrored - * @param locale - the browser locale - */ - attach: function (element, type, args, isRtl, locale) { - return attachElement(element, type, args, isRtl, locale); - } - }; -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.state = { - DEFAULT: 0, - MOVING: 1, - JOINING: 2, - MOVING_ACTIVE: 3, - ADDING: 4, - EDITING: 5, - EXPORT: 6, - IMPORT: 7, - IMPORT_DRAGGING: 8, - QUICK_JOINING: 9, - PANNING: 10 -} -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.nodes = (function() { - - var node_defs = {}; - var nodes = []; - var configNodes = {}; - var links = []; - var defaultWorkspace; - var workspaces = {}; - var workspacesOrder =[]; - var subflows = {}; - var loadedFlowVersion = null; - - var initialLoad; - - var dirty = false; - - function setDirty(d) { - dirty = d; - RED.events.emit("nodes:change",{dirty:dirty}); - } - - var registry = (function() { - var moduleList = {}; - var nodeList = []; - var nodeSets = {}; - var typeToId = {}; - var nodeDefinitions = {}; - var iconSets = {}; - - nodeDefinitions['tab'] = { - defaults: { - label: {value:""}, - disabled: {value: false}, - info: {value: ""} - } - }; - - - var exports = { - setModulePendingUpdated: function(module,version) { - moduleList[module].pending_version = version; - RED.events.emit("registry:module-updated",{module:module,version:version}); - }, - getModule: function(module) { - return moduleList[module]; - }, - getNodeSetForType: function(nodeType) { - return exports.getNodeSet(typeToId[nodeType]); - }, - getModuleList: function() { - return moduleList; - }, - getNodeList: function() { - return nodeList; - }, - getNodeTypes: function() { - return Object.keys(nodeDefinitions); - }, - setNodeList: function(list) { - nodeList = []; - for(var i=0;i<list.length;i++) { - var ns = list[i]; - exports.addNodeSet(ns); - } - }, - addNodeSet: function(ns) { - ns.added = false; - nodeSets[ns.id] = ns; - for (var j=0;j<ns.types.length;j++) { - typeToId[ns.types[j]] = ns.id; - } - nodeList.push(ns); - - moduleList[ns.module] = moduleList[ns.module] || { - name:ns.module, - version:ns.version, - local:ns.local, - sets:{} - }; - if (ns.pending_version) { - moduleList[ns.module].pending_version = ns.pending_version; - } - moduleList[ns.module].sets[ns.name] = ns; - RED.events.emit("registry:node-set-added",ns); - }, - removeNodeSet: function(id) { - var ns = nodeSets[id]; - for (var j=0;j<ns.types.length;j++) { - delete typeToId[ns.types[j]]; - } - delete nodeSets[id]; - for (var i=0;i<nodeList.length;i++) { - if (nodeList[i].id === id) { - nodeList.splice(i,1); - break; - } - } - delete moduleList[ns.module].sets[ns.name]; - if (Object.keys(moduleList[ns.module].sets).length === 0) { - delete moduleList[ns.module]; - } - RED.events.emit("registry:node-set-removed",ns); - return ns; - }, - getNodeSet: function(id) { - return nodeSets[id]; - }, - enableNodeSet: function(id) { - var ns = nodeSets[id]; - ns.enabled = true; - RED.events.emit("registry:node-set-enabled",ns); - }, - disableNodeSet: function(id) { - var ns = nodeSets[id]; - ns.enabled = false; - RED.events.emit("registry:node-set-disabled",ns); - }, - registerNodeType: function(nt,def) { - nodeDefinitions[nt] = def; - def.type = nt; - if (nt.substring(0,8) != "subflow:") { - def.set = nodeSets[typeToId[nt]]; - nodeSets[typeToId[nt]].added = true; - nodeSets[typeToId[nt]].enabled = true; - - var ns; - if (def.set.module === "node-red") { - ns = "node-red"; - } else { - ns = def.set.id; - } - def["_"] = function() { - var args = Array.prototype.slice.call(arguments, 0); - var original = args[0]; - if (args[0].indexOf(":") === -1) { - args[0] = ns+":"+args[0]; - } - var result = RED._.apply(null,args); - if (result === args[0]) { - result = original; - } - return result; - } - - // TODO: too tightly coupled into palette UI - } - RED.events.emit("registry:node-type-added",nt); - }, - removeNodeType: function(nt) { - if (nt.substring(0,8) != "subflow:") { - // NON-NLS - internal debug message - throw new Error("this api is subflow only. called with:",nt); - } - delete nodeDefinitions[nt]; - RED.events.emit("registry:node-type-removed",nt); - }, - getNodeType: function(nt) { - return nodeDefinitions[nt]; - }, - setIconSets: function(sets) { - iconSets = sets; - }, - getIconSets: function() { - return iconSets; - } - }; - return exports; - })(); - - function getID() { - return (1+Math.random()*4294967295).toString(16); - } - - function addNode(n) { - if (n.type.indexOf("subflow") !== 0) { - n["_"] = n._def._; - } else { - n["_"] = RED._; - } - if (n._def.category == "config") { - configNodes[n.id] = n; - } else { - n.ports = []; - if (n.wires && (n.wires.length > n.outputs)) { n.outputs = n.wires.length; } - if (n.outputs) { - for (var i=0;i<n.outputs;i++) { - n.ports.push(i); - } - } - n.dirty = true; - updateConfigNodeUsers(n); - if (n._def.category == "subflows" && typeof n.i === "undefined") { - var nextId = 0; - RED.nodes.eachNode(function(node) { - nextId = Math.max(nextId,node.i||0); - }); - n.i = nextId+1; - } - nodes.push(n); - } - RED.events.emit('nodes:add',n); - } - function addLink(l) { - links.push(l); - } - - function getNode(id) { - if (id in configNodes) { - return configNodes[id]; - } else { - for (var n in nodes) { - if (nodes[n].id == id) { - return nodes[n]; - } - } - } - return null; - } - - function removeNode(id) { - var removedLinks = []; - var removedNodes = []; - var node; - if (id in configNodes) { - node = configNodes[id]; - delete configNodes[id]; - RED.events.emit('nodes:remove',node); - RED.workspaces.refresh(); - } else { - node = getNode(id); - if (node) { - nodes.splice(nodes.indexOf(node),1); - removedLinks = links.filter(function(l) { return (l.source === node) || (l.target === node); }); - removedLinks.forEach(function(l) {links.splice(links.indexOf(l), 1); }); - var updatedConfigNode = false; - for (var d in node._def.defaults) { - if (node._def.defaults.hasOwnProperty(d)) { - var property = node._def.defaults[d]; - if (property.type) { - var type = registry.getNodeType(property.type); - if (type && type.category == "config") { - var configNode = configNodes[node[d]]; - if (configNode) { - updatedConfigNode = true; - if (configNode._def.exclusive) { - removeNode(node[d]); - removedNodes.push(configNode); - } else { - var users = configNode.users; - users.splice(users.indexOf(node),1); - } - } - } - } - } - } - if (updatedConfigNode) { - RED.workspaces.refresh(); - } - try { - if (node._def.oneditdelete) { - node._def.oneditdelete.call(node); - } - } catch(err) { - console.log("oneditdelete",node.id,node.type,err.toString()); - } - RED.events.emit('nodes:remove',node); - } - } - if (node && node._def.onremove) { - // Deprecated: never documented but used by some early nodes - console.log("Deprecated API warning: node type ",node.type," has an onremove function - should be oneditremove - please report"); - node._def.onremove.call(n); - } - return {links:removedLinks,nodes:removedNodes}; - } - - function removeLink(l) { - var index = links.indexOf(l); - if (index != -1) { - links.splice(index,1); - } - } - - function addWorkspace(ws) { - workspaces[ws.id] = ws; - ws._def = RED.nodes.getType('tab'); - workspacesOrder.push(ws.id); - } - function getWorkspace(id) { - return workspaces[id]; - } - function removeWorkspace(id) { - delete workspaces[id]; - workspacesOrder.splice(workspacesOrder.indexOf(id),1); - - var removedNodes = []; - var removedLinks = []; - var n; - var node; - for (n=0;n<nodes.length;n++) { - node = nodes[n]; - if (node.z == id) { - removedNodes.push(node); - } - } - for(n in configNodes) { - if (configNodes.hasOwnProperty(n)) { - node = configNodes[n]; - if (node.z == id) { - removedNodes.push(node); - } - } - } - for (n=0;n<removedNodes.length;n++) { - var result = removeNode(removedNodes[n].id); - removedLinks = removedLinks.concat(result.links); - } - return {nodes:removedNodes,links:removedLinks}; - } - - function addSubflow(sf, createNewIds) { - if (createNewIds) { - var subflowNames = Object.keys(subflows).map(function(sfid) { - return subflows[sfid].name; - }); - - subflowNames.sort(); - var copyNumber = 1; - var subflowName = sf.name; - subflowNames.forEach(function(name) { - if (subflowName == name) { - copyNumber++; - subflowName = sf.name+" ("+copyNumber+")"; - } - }); - sf.name = subflowName; - } - subflows[sf.id] = sf; - RED.nodes.registerType("subflow:"+sf.id, { - defaults:{name:{value:""}}, - info: sf.info, - icon: function() { return sf.icon||"subflow.png" }, - category: sf.category || "subflows", - inputs: sf.in.length, - outputs: sf.out.length, - color: "#da9", - label: function() { return this.name||RED.nodes.subflow(sf.id).name }, - labelStyle: function() { return this.name?"node_label_italic":""; }, - paletteLabel: function() { return RED.nodes.subflow(sf.id).name }, - inputLabels: function(i) { return sf.inputLabels?sf.inputLabels[i]:null }, - outputLabels: function(i) { return sf.outputLabels?sf.outputLabels[i]:null }, - set:{ - module: "node-red" - } - }); - sf._def = RED.nodes.getType("subflow:"+sf.id); - } - function getSubflow(id) { - return subflows[id]; - } - function removeSubflow(sf) { - delete subflows[sf.id]; - registry.removeNodeType("subflow:"+sf.id); - } - - function subflowContains(sfid,nodeid) { - for (var i=0;i<nodes.length;i++) { - var node = nodes[i]; - if (node.z === sfid) { - var m = /^subflow:(.+)$/.exec(node.type); - if (m) { - if (m[1] === nodeid) { - return true; - } else { - var result = subflowContains(m[1],nodeid); - if (result) { - return true; - } - } - } - } - } - return false; - } - - function getAllFlowNodes(node) { - var visited = {}; - visited[node.id] = true; - var nns = [node]; - var stack = [node]; - while(stack.length !== 0) { - var n = stack.shift(); - var childLinks = links.filter(function(d) { return (d.source === n) || (d.target === n);}); - for (var i=0;i<childLinks.length;i++) { - var child = (childLinks[i].source === n)?childLinks[i].target:childLinks[i].source; - var id = child.id; - if (!id) { - id = child.direction+":"+child.i; - } - if (!visited[id]) { - visited[id] = true; - nns.push(child); - stack.push(child); - } - } - } - return nns; - } - - function convertWorkspace(n) { - var node = {}; - node.id = n.id; - node.type = n.type; - for (var d in n._def.defaults) { - if (n._def.defaults.hasOwnProperty(d)) { - node[d] = n[d]; - } - } - return node; - } - /** - * Converts a node to an exportable JSON Object - **/ - function convertNode(n, exportCreds) { - if (n.type === 'tab') { - return convertWorkspace(n); - } - exportCreds = exportCreds || false; - var node = {}; - node.id = n.id; - node.type = n.type; - node.z = n.z; - - if (node.type == "unknown") { - for (var p in n._orig) { - if (n._orig.hasOwnProperty(p)) { - node[p] = n._orig[p]; - } - } - } else { - for (var d in n._def.defaults) { - if (n._def.defaults.hasOwnProperty(d)) { - node[d] = n[d]; - } - } - if(exportCreds && n.credentials) { - var credentialSet = {}; - node.credentials = {}; - for (var cred in n._def.credentials) { - if (n._def.credentials.hasOwnProperty(cred)) { - if (n._def.credentials[cred].type == 'password') { - if (!n.credentials._ || - n.credentials["has_"+cred] != n.credentials._["has_"+cred] || - (n.credentials["has_"+cred] && n.credentials[cred])) { - credentialSet[cred] = n.credentials[cred]; - } - } else if (n.credentials[cred] != null && (!n.credentials._ || n.credentials[cred] != n.credentials._[cred])) { - credentialSet[cred] = n.credentials[cred]; - } - } - } - if (Object.keys(credentialSet).length > 0) { - node.credentials = credentialSet; - } - } - } - if (n._def.category != "config") { - node.x = n.x; - node.y = n.y; - node.wires = []; - for(var i=0;i<n.outputs;i++) { - node.wires.push([]); - } - var wires = links.filter(function(d){return d.source === n;}); - for (var j=0;j<wires.length;j++) { - var w = wires[j]; - if (w.target.type != "subflow") { - if (w.sourcePort < node.wires.length) { - node.wires[w.sourcePort].push(w.target.id); - } - } - } - - if (n.inputs > 0 && n.inputLabels && !/^\s*$/.test(n.inputLabels.join(""))) { - node.inputLabels = n.inputLabels.slice(); - } - if (n.outputs > 0 && n.outputLabels && !/^\s*$/.test(n.outputLabels.join(""))) { - node.outputLabels = n.outputLabels.slice(); - } - if ((!n._def.defaults || !n._def.defaults.hasOwnProperty("icon")) && n.icon) { - var defIcon = RED.utils.getDefaultNodeIcon(n._def, n); - if (n.icon !== defIcon.module+"/"+defIcon.file) { - node.icon = n.icon; - } - } - } - return node; - } - - function convertSubflow(n) { - var node = {}; - node.id = n.id; - node.type = n.type; - node.name = n.name; - node.info = n.info; - node.category = n.category; - node.in = []; - node.out = []; - - n.in.forEach(function(p) { - var nIn = {x:p.x,y:p.y,wires:[]}; - var wires = links.filter(function(d) { return d.source === p }); - for (var i=0;i<wires.length;i++) { - var w = wires[i]; - if (w.target.type != "subflow") { - nIn.wires.push({id:w.target.id}) - } - } - node.in.push(nIn); - }); - n.out.forEach(function(p,c) { - var nOut = {x:p.x,y:p.y,wires:[]}; - var wires = links.filter(function(d) { return d.target === p }); - for (i=0;i<wires.length;i++) { - if (wires[i].source.type != "subflow") { - nOut.wires.push({id:wires[i].source.id,port:wires[i].sourcePort}) - } else { - nOut.wires.push({id:n.id,port:0}) - } - } - node.out.push(nOut); - }); - - if (node.in.length > 0 && n.inputLabels && !/^\s*$/.test(n.inputLabels.join(""))) { - node.inputLabels = n.inputLabels.slice(); - } - if (node.out.length > 0 && n.outputLabels && !/^\s*$/.test(n.outputLabels.join(""))) { - node.outputLabels = n.outputLabels.slice(); - } - if (n.icon) { - if (n.icon !== "node-red/subflow.png") { - node.icon = n.icon; - } - } - - return node; - } - /** - * Converts the current node selection to an exportable JSON Object - **/ - function createExportableNodeSet(set, exportedSubflows, exportedConfigNodes) { - var nns = []; - exportedConfigNodes = exportedConfigNodes || {}; - exportedSubflows = exportedSubflows || {}; - for (var n=0;n<set.length;n++) { - var node = set[n]; - if (node.type.substring(0,8) == "subflow:") { - var subflowId = node.type.substring(8); - if (!exportedSubflows[subflowId]) { - exportedSubflows[subflowId] = true; - var subflow = getSubflow(subflowId); - var subflowSet = [subflow]; - RED.nodes.eachNode(function(n) { - if (n.z == subflowId) { - subflowSet.push(n); - } - }); - var exportableSubflow = createExportableNodeSet(subflowSet, exportedSubflows, exportedConfigNodes); - nns = exportableSubflow.concat(nns); - } - } - if (node.type != "subflow") { - var convertedNode = RED.nodes.convertNode(node); - for (var d in node._def.defaults) { - if (node._def.defaults[d].type && node[d] in configNodes) { - var confNode = configNodes[node[d]]; - var exportable = registry.getNodeType(node._def.defaults[d].type).exportable; - if ((exportable == null || exportable)) { - if (!(node[d] in exportedConfigNodes)) { - exportedConfigNodes[node[d]] = true; - set.push(confNode); - } - } else { - convertedNode[d] = ""; - } - } - } - nns.push(convertedNode); - } else { - var convertedSubflow = convertSubflow(node); - nns.push(convertedSubflow); - } - } - return nns; - } - - //TODO: rename this (createCompleteNodeSet) - function createCompleteNodeSet(exportCredentials) { - if (exportCredentials === undefined) { - exportCredentials = true; - } - var nns = []; - var i; - for (i=0;i<workspacesOrder.length;i++) { - if (workspaces[workspacesOrder[i]].type == "tab") { - nns.push(convertWorkspace(workspaces[workspacesOrder[i]])); - } - } - for (i in subflows) { - if (subflows.hasOwnProperty(i)) { - nns.push(convertSubflow(subflows[i])); - } - } - for (i in configNodes) { - if (configNodes.hasOwnProperty(i)) { - nns.push(convertNode(configNodes[i], exportCredentials)); - } - } - for (i=0;i<nodes.length;i++) { - var node = nodes[i]; - nns.push(convertNode(node, exportCredentials)); - } - return nns; - } - - function checkForMatchingSubflow(subflow,subflowNodes) { - var i; - var match = null; - try { - RED.nodes.eachSubflow(function(sf) { - if (sf.name != subflow.name || - sf.info != subflow.info || - sf.in.length != subflow.in.length || - sf.out.length != subflow.out.length) { - return; - } - var sfNodes = RED.nodes.filterNodes({z:sf.id}); - if (sfNodes.length != subflowNodes.length) { - return; - } - - var subflowNodeSet = [subflow].concat(subflowNodes); - var sfNodeSet = [sf].concat(sfNodes); - - var exportableSubflowNodes = JSON.stringify(subflowNodeSet); - var exportableSFNodes = JSON.stringify(createExportableNodeSet(sfNodeSet)); - var nodeMap = {}; - for (i=0;i<sfNodes.length;i++) { - exportableSubflowNodes = exportableSubflowNodes.replace(new RegExp("\""+subflowNodes[i].id+"\"","g"),'"'+sfNodes[i].id+'"'); - } - exportableSubflowNodes = exportableSubflowNodes.replace(new RegExp("\""+subflow.id+"\"","g"),'"'+sf.id+'"'); - - if (exportableSubflowNodes !== exportableSFNodes) { - return; - } - - match = sf; - throw new Error(); - }); - } catch(err) { - console.log(err.stack); - } - return match; - } - function compareNodes(nodeA,nodeB,idMustMatch) { - if (idMustMatch && nodeA.id != nodeB.id) { - return false; - } - if (nodeA.type != nodeB.type) { - return false; - } - var def = nodeA._def; - for (var d in def.defaults) { - if (def.defaults.hasOwnProperty(d)) { - var vA = nodeA[d]; - var vB = nodeB[d]; - if (typeof vA !== typeof vB) { - return false; - } - if (vA === null || typeof vA === "string" || typeof vA === "number") { - if (vA !== vB) { - return false; - } - } else { - if (JSON.stringify(vA) !== JSON.stringify(vB)) { - return false; - } - } - } - } - return true; - } - - function importNodes(newNodesObj,createNewIds,createMissingWorkspace) { - var i; - var n; - var newNodes; - var nodeZmap = {}; - if (typeof newNodesObj === "string") { - if (newNodesObj === "") { - return; - } - try { - newNodes = JSON.parse(newNodesObj); - } catch(err) { - var e = new Error(RED._("clipboard.invalidFlow",{message:err.message})); - e.code = "NODE_RED"; - throw e; - } - } else { - newNodes = newNodesObj; - } - - if (!$.isArray(newNodes)) { - newNodes = [newNodes]; - } - var isInitialLoad = false; - if (!initialLoad) { - isInitialLoad = true; - initialLoad = JSON.parse(JSON.stringify(newNodes)); - } - var unknownTypes = []; - for (i=0;i<newNodes.length;i++) { - n = newNodes[i]; - // TODO: remove workspace in next release+1 - if (n.type != "workspace" && - n.type != "tab" && - n.type != "subflow" && - !registry.getNodeType(n.type) && - n.type.substring(0,8) != "subflow:" && - unknownTypes.indexOf(n.type)==-1) { - unknownTypes.push(n.type); - } - if (n.z) { - nodeZmap[n.z] = nodeZmap[n.z] || []; - nodeZmap[n.z].push(n); - } - - } - if (!isInitialLoad && unknownTypes.length > 0) { - var typeList = "<ul><li>"+unknownTypes.join("</li><li>")+"</li></ul>"; - var type = "type"+(unknownTypes.length > 1?"s":""); - RED.notify("<p>"+RED._("clipboard.importUnrecognised",{count:unknownTypes.length})+"</p>"+typeList,"error",false,10000); - } - - var activeWorkspace = RED.workspaces.active(); - //TODO: check the z of the subflow instance and check _that_ if it exists - var activeSubflow = getSubflow(activeWorkspace); - for (i=0;i<newNodes.length;i++) { - var m = /^subflow:(.+)$/.exec(newNodes[i].type); - if (m) { - var subflowId = m[1]; - var parent = getSubflow(newNodes[i].z || activeWorkspace); - if (parent) { - var err; - if (subflowId === parent.id) { - err = new Error(RED._("notification.errors.cannotAddSubflowToItself")); - } - if (subflowContains(subflowId,parent.id)) { - err = new Error(RED._("notification.errors.cannotAddCircularReference")); - } - if (err) { - // TODO: standardise error codes - err.code = "NODE_RED"; - throw err; - } - } - } - } - - var new_workspaces = []; - var workspace_map = {}; - var new_subflows = []; - var subflow_map = {}; - var subflow_blacklist = {}; - var node_map = {}; - var new_nodes = []; - var new_links = []; - var nid; - var def; - var configNode; - var missingWorkspace = null; - var d; - - // Find all tabs and subflow templates - for (i=0;i<newNodes.length;i++) { - n = newNodes[i]; - // TODO: remove workspace in next release+1 - if (n.type === "workspace" || n.type === "tab") { - if (n.type === "workspace") { - n.type = "tab"; - } - if (defaultWorkspace == null) { - defaultWorkspace = n; - } - if (createNewIds) { - nid = getID(); - workspace_map[n.id] = nid; - n.id = nid; - } - addWorkspace(n); - RED.workspaces.add(n); - new_workspaces.push(n); - } else if (n.type === "subflow") { - var matchingSubflow = checkForMatchingSubflow(n,nodeZmap[n.id]); - if (matchingSubflow) { - subflow_blacklist[n.id] = matchingSubflow; - } else { - subflow_map[n.id] = n; - if (createNewIds) { - nid = getID(); - n.id = nid; - } - // TODO: handle createNewIds - map old to new subflow ids - n.in.forEach(function(input,i) { - input.type = "subflow"; - input.direction = "in"; - input.z = n.id; - input.i = i; - input.id = getID(); - }); - n.out.forEach(function(output,i) { - output.type = "subflow"; - output.direction = "out"; - output.z = n.id; - output.i = i; - output.id = getID(); - }); - new_subflows.push(n); - addSubflow(n,createNewIds); - } - } - } - - // Add a tab if there isn't one there already - if (defaultWorkspace == null) { - defaultWorkspace = { type:"tab", id:getID(), disabled: false, info:"", label:RED._('workspace.defaultName',{number:1})}; - addWorkspace(defaultWorkspace); - RED.workspaces.add(defaultWorkspace); - new_workspaces.push(defaultWorkspace); - activeWorkspace = RED.workspaces.active(); - } - - // Find all config nodes and add them - for (i=0;i<newNodes.length;i++) { - n = newNodes[i]; - def = registry.getNodeType(n.type); - if (def && def.category == "config") { - var existingConfigNode = null; - if (createNewIds) { - if (n.z) { - if (subflow_blacklist[n.z]) { - continue; - } else if (subflow_map[n.z]) { - n.z = subflow_map[n.z].id; - } else { - n.z = workspace_map[n.z]; - if (!workspaces[n.z]) { - if (createMissingWorkspace) { - if (missingWorkspace === null) { - missingWorkspace = RED.workspaces.add(null,true); - new_workspaces.push(missingWorkspace); - } - n.z = missingWorkspace.id; - } else { - n.z = activeWorkspace; - } - } - } - } - existingConfigNode = RED.nodes.node(n.id); - if (existingConfigNode) { - if (n.z && existingConfigNode.z !== n.z) { - existingConfigNode = null; - // Check the config nodes on n.z - for (var cn in configNodes) { - if (configNodes.hasOwnProperty(cn)) { - if (configNodes[cn].z === n.z && compareNodes(configNodes[cn],n,false)) { - existingConfigNode = configNodes[cn]; - node_map[n.id] = configNodes[cn]; - break; - } - } - } - } - } - - } - - if (!existingConfigNode || existingConfigNode._def.exclusive) { //} || !compareNodes(existingConfigNode,n,true) || existingConfigNode.z !== n.z) { - configNode = {id:n.id, z:n.z, type:n.type, users:[], _config:{}}; - for (d in def.defaults) { - if (def.defaults.hasOwnProperty(d)) { - configNode[d] = n[d]; - configNode._config[d] = JSON.stringify(n[d]); - } - } - if (def.hasOwnProperty('credentials') && n.hasOwnProperty('credentials')) { - configNode.credentials = {}; - for (d in def.credentials) { - if (def.credentials.hasOwnProperty(d) && n.credentials.hasOwnProperty(d)) { - configNode.credentials[d] = n.credentials[d]; - } - } - } - configNode.label = def.label; - configNode._def = def; - if (createNewIds) { - configNode.id = getID(); - } - node_map[n.id] = configNode; - new_nodes.push(configNode); - RED.nodes.add(configNode); - } - } - } - - // Find regular flow nodes and subflow instances - for (i=0;i<newNodes.length;i++) { - n = newNodes[i]; - // TODO: remove workspace in next release+1 - if (n.type !== "workspace" && n.type !== "tab" && n.type !== "subflow") { - def = registry.getNodeType(n.type); - if (!def || def.category != "config") { - var node = { - x:n.x, - y:n.y, - z:n.z, - type:0, - wires:n.wires, - inputLabels: n.inputLabels, - outputLabels: n.outputLabels, - icon: n.icon, - changed:false, - _config:{} - }; - if (createNewIds) { - if (subflow_blacklist[n.z]) { - continue; - } else if (subflow_map[node.z]) { - node.z = subflow_map[node.z].id; - } else { - node.z = workspace_map[node.z]; - if (!workspaces[node.z]) { - if (createMissingWorkspace) { - if (missingWorkspace === null) { - missingWorkspace = RED.workspaces.add(null,true); - new_workspaces.push(missingWorkspace); - } - node.z = missingWorkspace.id; - } else { - node.z = activeWorkspace; - } - } - } - node.id = getID(); - } else { - node.id = n.id; - if (node.z == null || (!workspaces[node.z] && !subflow_map[node.z])) { - if (createMissingWorkspace) { - if (missingWorkspace === null) { - missingWorkspace = RED.workspaces.add(null,true); - new_workspaces.push(missingWorkspace); - } - node.z = missingWorkspace.id; - } else { - node.z = activeWorkspace; - } - } - } - node.type = n.type; - node._def = def; - if (n.type.substring(0,7) === "subflow") { - var parentId = n.type.split(":")[1]; - var subflow = subflow_blacklist[parentId]||subflow_map[parentId]||getSubflow(parentId); - if (createNewIds) { - parentId = subflow.id; - node.type = "subflow:"+parentId; - node._def = registry.getNodeType(node.type); - delete node.i; - } - node.name = n.name; - node.outputs = subflow.out.length; - node.inputs = subflow.in.length; - } else { - if (!node._def) { - if (node.x && node.y) { - node._def = { - color:"#fee", - defaults: {}, - label: "unknown: "+n.type, - labelStyle: "node_label_italic", - outputs: n.outputs||n.wires.length, - set: registry.getNodeSet("node-red/unknown") - } - } else { - node._def = { - category:"config", - set: registry.getNodeSet("node-red/unknown") - }; - node.users = []; - // This is a config node, so delete the default - // non-config node properties - delete node.x; - delete node.y; - delete node.wires; - delete node.inputLabels; - delete node.outputLabels; - } - var orig = {}; - for (var p in n) { - if (n.hasOwnProperty(p) && p!="x" && p!="y" && p!="z" && p!="id" && p!="wires") { - orig[p] = n[p]; - } - } - node._orig = orig; - node.name = n.type; - node.type = "unknown"; - } - if (node._def.category != "config") { - if (n.hasOwnProperty('inputs')) { - node.inputs = n.inputs; - node._config.inputs = JSON.stringify(n.inputs); - } else { - node.inputs = node._def.inputs; - } - if (n.hasOwnProperty('outputs')) { - node.outputs = n.outputs; - node._config.outputs = JSON.stringify(n.outputs); - } else { - node.outputs = node._def.outputs; - } - if (node.hasOwnProperty('wires') && node.wires.length > node.outputs) { - if (!node._def.defaults.hasOwnProperty("outputs") || !isNaN(parseInt(n.outputs))) { - // If 'wires' is longer than outputs, clip wires - console.log("Warning: node.wires longer than node.outputs - trimming wires:",node.id," wires:",node.wires.length," outputs:",node.outputs); - node.wires = node.wires.slice(0,node.outputs); - } else { - // The node declares outputs in its defaults, but has not got a valid value - // Defer to the length of the wires array - node.outputs = node.wires.length; - } - } - for (d in node._def.defaults) { - if (node._def.defaults.hasOwnProperty(d) && d !== 'inputs' && d !== 'outputs') { - node[d] = n[d]; - node._config[d] = JSON.stringify(n[d]); - } - } - node._config.x = node.x; - node._config.y = node.y; - if (node._def.hasOwnProperty('credentials') && n.hasOwnProperty('credentials')) { - node.credentials = {}; - for (d in node._def.credentials) { - if (node._def.credentials.hasOwnProperty(d) && n.credentials.hasOwnProperty(d)) { - node.credentials[d] = n.credentials[d]; - } - } - } - } - } - addNode(node); - RED.editor.validateNode(node); - node_map[n.id] = node; - // If an 'unknown' config node, it will not have been caught by the - // proper config node handling, so needs adding to new_nodes here - if (node.type === "unknown" || node._def.category !== "config") { - new_nodes.push(node); - } - } - } - } - // TODO: make this a part of the node definition so it doesn't have to - // be hardcoded here - var nodeTypeArrayReferences = { - "catch":"scope", - "status":"scope", - "link in":"links", - "link out":"links" - } - - // Remap all wires and config node references - for (i=0;i<new_nodes.length;i++) { - n = new_nodes[i]; - if (n.wires) { - for (var w1=0;w1<n.wires.length;w1++) { - var wires = (n.wires[w1] instanceof Array)?n.wires[w1]:[n.wires[w1]]; - for (var w2=0;w2<wires.length;w2++) { - if (node_map.hasOwnProperty(wires[w2])) { - if (n.z === node_map[wires[w2]].z) { - var link = {source:n,sourcePort:w1,target:node_map[wires[w2]]}; - addLink(link); - new_links.push(link); - } else { - console.log("Warning: dropping link that crosses tabs:",n.id,"->",node_map[wires[w2]].id); - } - } - } - } - delete n.wires; - } - for (var d3 in n._def.defaults) { - if (n._def.defaults.hasOwnProperty(d3)) { - if (n._def.defaults[d3].type && node_map[n[d3]]) { - n[d3] = node_map[n[d3]].id; - configNode = RED.nodes.node(n[d3]); - if (configNode && configNode.users.indexOf(n) === -1) { - configNode.users.push(n); - } - } else if (nodeTypeArrayReferences.hasOwnProperty(n.type) && nodeTypeArrayReferences[n.type] === d3 && n[d3] !== undefined && n[d3] !== null) { - for (var j = 0;j<n[d3].length;j++) { - if (node_map[n[d3][j]]) { - n[d3][j] = node_map[n[d3][j]].id; - } - } - - } - } - } - // If importing into a subflow, ensure an outbound-link doesn't - // get added - if (activeSubflow && /^link /.test(n.type) && n.links) { - n.links = n.links.filter(function(id) { - var otherNode = RED.nodes.node(id); - return (otherNode && otherNode.z === activeWorkspace) - }); - } - - // With all properties now remapped to point at valid nodes, - // we can validate the node - RED.editor.validateNode(n); - } - for (i=0;i<new_subflows.length;i++) { - n = new_subflows[i]; - n.in.forEach(function(input) { - input.wires.forEach(function(wire) { - var link = {source:input, sourcePort:0, target:node_map[wire.id]}; - addLink(link); - new_links.push(link); - }); - delete input.wires; - }); - n.out.forEach(function(output) { - output.wires.forEach(function(wire) { - var link; - if (subflow_map[wire.id] && subflow_map[wire.id].id == n.id) { - link = {source:n.in[wire.port], sourcePort:wire.port,target:output}; - } else { - link = {source:node_map[wire.id]||subflow_map[wire.id], sourcePort:wire.port,target:output}; - } - addLink(link); - new_links.push(link); - }); - delete output.wires; - }); - } - - RED.workspaces.refresh(); - return [new_nodes,new_links,new_workspaces,new_subflows,missingWorkspace]; - } - - // TODO: supports filter.z|type - function filterNodes(filter) { - var result = []; - - for (var n=0;n<nodes.length;n++) { - var node = nodes[n]; - if (filter.hasOwnProperty("z") && node.z !== filter.z) { - continue; - } - if (filter.hasOwnProperty("type") && node.type !== filter.type) { - continue; - } - result.push(node); - } - return result; - } - function filterLinks(filter) { - var result = []; - - for (var n=0;n<links.length;n++) { - var link = links[n]; - if (filter.source) { - if (filter.source.hasOwnProperty("id") && link.source.id !== filter.source.id) { - continue; - } - if (filter.source.hasOwnProperty("z") && link.source.z !== filter.source.z) { - continue; - } - } - if (filter.target) { - if (filter.target.hasOwnProperty("id") && link.target.id !== filter.target.id) { - continue; - } - if (filter.target.hasOwnProperty("z") && link.target.z !== filter.target.z) { - continue; - } - } - if (filter.hasOwnProperty("sourcePort") && link.sourcePort !== filter.sourcePort) { - continue; - } - result.push(link); - } - return result; - } - - // Update any config nodes referenced by the provided node to ensure their 'users' list is correct - function updateConfigNodeUsers(n) { - for (var d in n._def.defaults) { - if (n._def.defaults.hasOwnProperty(d)) { - var property = n._def.defaults[d]; - if (property.type) { - var type = registry.getNodeType(property.type); - if (type && type.category == "config") { - var configNode = configNodes[n[d]]; - if (configNode) { - if (configNode.users.indexOf(n) === -1) { - configNode.users.push(n); - } - } - } - } - } - } - } - - function flowVersion(version) { - if (version !== undefined) { - loadedFlowVersion = version; - } else { - return loadedFlowVersion; - } - } - - function clear() { - nodes = []; - links = []; - configNodes = {}; - workspacesOrder = []; - var subflowIds = Object.keys(subflows); - subflowIds.forEach(function(id) { - RED.subflow.removeSubflow(id) - }); - var workspaceIds = Object.keys(workspaces); - workspaceIds.forEach(function(id) { - RED.workspaces.remove(workspaces[id]); - }); - defaultWorkspace = null; - initialLoad = null; - RED.nodes.dirty(false); - RED.view.redraw(true); - RED.palette.refresh(); - RED.workspaces.refresh(); - RED.sidebar.config.refresh(); - RED.sidebar.info.refresh(); - - // var node_defs = {}; - // var nodes = []; - // var configNodes = {}; - // var links = []; - // var defaultWorkspace; - // var workspaces = {}; - // var workspacesOrder =[]; - // var subflows = {}; - // var loadedFlowVersion = null; - } - - return { - init: function() { - RED.events.on("registry:node-type-added",function(type) { - var def = registry.getNodeType(type); - var replaced = false; - var replaceNodes = []; - RED.nodes.eachNode(function(n) { - if (n.type === "unknown" && n.name === type) { - replaceNodes.push(n); - } - }); - RED.nodes.eachConfig(function(n) { - if (n.type === "unknown" && n.name === type) { - replaceNodes.push(n); - } - }); - - if (replaceNodes.length > 0) { - var reimportList = []; - replaceNodes.forEach(function(n) { - if (configNodes.hasOwnProperty(n.id)) { - delete configNodes[n.id]; - } else { - nodes.splice(nodes.indexOf(n),1); - } - reimportList.push(convertNode(n)); - }); - RED.view.redraw(true); - var result = importNodes(reimportList,false); - var newNodeMap = {}; - result[0].forEach(function(n) { - newNodeMap[n.id] = n; - }); - RED.nodes.eachLink(function(l) { - if (newNodeMap.hasOwnProperty(l.source.id)) { - l.source = newNodeMap[l.source.id]; - } - if (newNodeMap.hasOwnProperty(l.target.id)) { - l.target = newNodeMap[l.target.id]; - } - }); - RED.view.redraw(true); - } - }); - }, - registry:registry, - setNodeList: registry.setNodeList, - - getNodeSet: registry.getNodeSet, - addNodeSet: registry.addNodeSet, - removeNodeSet: registry.removeNodeSet, - enableNodeSet: registry.enableNodeSet, - disableNodeSet: registry.disableNodeSet, - - setIconSets: registry.setIconSets, - getIconSets: registry.getIconSets, - - registerType: registry.registerNodeType, - getType: registry.getNodeType, - convertNode: convertNode, - - add: addNode, - remove: removeNode, - clear: clear, - - addLink: addLink, - removeLink: removeLink, - - addWorkspace: addWorkspace, - removeWorkspace: removeWorkspace, - getWorkspaceOrder: function() { return workspacesOrder }, - setWorkspaceOrder: function(order) { workspacesOrder = order; }, - workspace: getWorkspace, - - addSubflow: addSubflow, - removeSubflow: removeSubflow, - subflow: getSubflow, - subflowContains: subflowContains, - - eachNode: function(cb) { - for (var n=0;n<nodes.length;n++) { - cb(nodes[n]); - } - }, - eachLink: function(cb) { - for (var l=0;l<links.length;l++) { - cb(links[l]); - } - }, - eachConfig: function(cb) { - for (var id in configNodes) { - if (configNodes.hasOwnProperty(id)) { - cb(configNodes[id]); - } - } - }, - eachSubflow: function(cb) { - for (var id in subflows) { - if (subflows.hasOwnProperty(id)) { - cb(subflows[id]); - } - } - }, - eachWorkspace: function(cb) { - for (var i=0;i<workspacesOrder.length;i++) { - cb(workspaces[workspacesOrder[i]]); - } - }, - - node: getNode, - - version: flowVersion, - originalFlow: function(flow) { - if (flow === undefined) { - return initialLoad; - } else { - initialLoad = flow; - } - }, - - filterNodes: filterNodes, - filterLinks: filterLinks, - - import: importNodes, - - getAllFlowNodes: getAllFlowNodes, - createExportableNodeSet: createExportableNodeSet, - createCompleteNodeSet: createCompleteNodeSet, - updateConfigNodeUsers: updateConfigNodeUsers, - id: getID, - dirty: function(d) { - if (d == null) { - return dirty; - } else { - setDirty(d); - } - } - }; -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.history = (function() { - var undo_history = []; - - function undoEvent(ev) { - var i; - var len; - var node; - var subflow; - var modifiedTabs = {}; - if (ev) { - if (ev.t == 'multi') { - len = ev.events.length; - for (i=len-1;i>=0;i--) { - undoEvent(ev.events[i]); - } - } else if (ev.t == 'replace') { - RED.nodes.clear(); - var imported = RED.nodes.import(ev.config); - imported[0].forEach(function(n) { - if (ev.changed[n.id]) { - n.changed = true; - } - }) - - RED.nodes.version(ev.rev); - } else if (ev.t == 'add') { - if (ev.nodes) { - for (i=0;i<ev.nodes.length;i++) { - node = RED.nodes.node(ev.nodes[i]); - if (node.z) { - modifiedTabs[node.z] = true; - } - RED.nodes.remove(ev.nodes[i]); - } - } - if (ev.links) { - for (i=0;i<ev.links.length;i++) { - RED.nodes.removeLink(ev.links[i]); - } - } - if (ev.workspaces) { - for (i=0;i<ev.workspaces.length;i++) { - RED.nodes.removeWorkspace(ev.workspaces[i].id); - RED.workspaces.remove(ev.workspaces[i]); - } - } - if (ev.subflows) { - for (i=0;i<ev.subflows.length;i++) { - RED.nodes.removeSubflow(ev.subflows[i]); - RED.workspaces.remove(ev.subflows[i]); - } - } - if (ev.subflow) { - if (ev.subflow.instances) { - ev.subflow.instances.forEach(function(n) { - var node = RED.nodes.node(n.id); - if (node) { - node.changed = n.changed; - node.dirty = true; - } - }); - } - if (ev.subflow.hasOwnProperty('changed')) { - subflow = RED.nodes.subflow(ev.subflow.id); - if (subflow) { - subflow.changed = ev.subflow.changed; - } - } - } - if (ev.removedLinks) { - for (i=0;i<ev.removedLinks.length;i++) { - RED.nodes.addLink(ev.removedLinks[i]); - } - } - - } else if (ev.t == "delete") { - if (ev.workspaces) { - for (i=0;i<ev.workspaces.length;i++) { - RED.nodes.addWorkspace(ev.workspaces[i]); - RED.workspaces.add(ev.workspaces[i]); - } - } - if (ev.subflow && ev.subflow.subflow) { - RED.nodes.addSubflow(ev.subflow.subflow); - } - if (ev.subflowInputs && ev.subflowInputs.length > 0) { - subflow = RED.nodes.subflow(ev.subflowInputs[0].z); - subflow.in.push(ev.subflowInputs[0]); - subflow.in[0].dirty = true; - } - if (ev.subflowOutputs && ev.subflowOutputs.length > 0) { - subflow = RED.nodes.subflow(ev.subflowOutputs[0].z); - ev.subflowOutputs.sort(function(a,b) { return a.i-b.i}); - for (i=0;i<ev.subflowOutputs.length;i++) { - var output = ev.subflowOutputs[i]; - subflow.out.splice(output.i,0,output); - for (var j=output.i+1;j<subflow.out.length;j++) { - subflow.out[j].i++; - subflow.out[j].dirty = true; - } - RED.nodes.eachLink(function(l) { - if (l.source.type == "subflow:"+subflow.id) { - if (l.sourcePort >= output.i) { - l.sourcePort++; - } - } - }); - } - } - if (ev.subflow && ev.subflow.hasOwnProperty('instances')) { - ev.subflow.instances.forEach(function(n) { - var node = RED.nodes.node(n.id); - if (node) { - node.changed = n.changed; - node.dirty = true; - } - }); - } - if (subflow) { - RED.nodes.filterNodes({type:"subflow:"+subflow.id}).forEach(function(n) { - n.inputs = subflow.in.length; - n.outputs = subflow.out.length; - while (n.outputs > n.ports.length) { - n.ports.push(n.ports.length); - } - n.resize = true; - n.dirty = true; - }); - } - if (ev.nodes) { - for (i=0;i<ev.nodes.length;i++) { - RED.nodes.add(ev.nodes[i]); - modifiedTabs[ev.nodes[i].z] = true; - } - } - if (ev.links) { - for (i=0;i<ev.links.length;i++) { - RED.nodes.addLink(ev.links[i]); - } - } - if (ev.changes) { - for (i in ev.changes) { - if (ev.changes.hasOwnProperty(i)) { - node = RED.nodes.node(i); - if (node) { - for (var d in ev.changes[i]) { - if (ev.changes[i].hasOwnProperty(d)) { - node[d] = ev.changes[i][d]; - } - } - node.dirty = true; - } - } - } - - } - } else if (ev.t == "move") { - for (i=0;i<ev.nodes.length;i++) { - var n = ev.nodes[i]; - n.n.x = n.ox; - n.n.y = n.oy; - n.n.dirty = true; - n.n.moved = n.moved; - } - // A move could have caused a link splice - if (ev.links) { - for (i=0;i<ev.links.length;i++) { - RED.nodes.removeLink(ev.links[i]); - } - } - if (ev.removedLinks) { - for (i=0;i<ev.removedLinks.length;i++) { - RED.nodes.addLink(ev.removedLinks[i]); - } - } - } else if (ev.t == "edit") { - for (i in ev.changes) { - if (ev.changes.hasOwnProperty(i)) { - if (ev.node._def.defaults && ev.node._def.defaults[i] && ev.node._def.defaults[i].type) { - // This is a config node property - var currentConfigNode = RED.nodes.node(ev.node[i]); - if (currentConfigNode) { - currentConfigNode.users.splice(currentConfigNode.users.indexOf(ev.node),1); - } - var newConfigNode = RED.nodes.node(ev.changes[i]); - if (newConfigNode) { - newConfigNode.users.push(ev.node); - } - } - ev.node[i] = ev.changes[i]; - } - } - if (ev.subflow) { - if (ev.subflow.hasOwnProperty('inputCount')) { - if (ev.node.in.length > ev.subflow.inputCount) { - ev.node.in.splice(ev.subflow.inputCount); - } else if (ev.subflow.inputs.length > 0) { - ev.node.in = ev.node.in.concat(ev.subflow.inputs); - } - } - if (ev.subflow.hasOwnProperty('outputCount')) { - if (ev.node.out.length > ev.subflow.outputCount) { - ev.node.out.splice(ev.subflow.outputCount); - } else if (ev.subflow.outputs.length > 0) { - ev.node.out = ev.node.out.concat(ev.subflow.outputs); - } - } - if (ev.subflow.hasOwnProperty('instances')) { - ev.subflow.instances.forEach(function(n) { - var node = RED.nodes.node(n.id); - if (node) { - node.changed = n.changed; - node.dirty = true; - } - }); - } - RED.editor.validateNode(ev.node); - RED.nodes.filterNodes({type:"subflow:"+ev.node.id}).forEach(function(n) { - n.inputs = ev.node.in.length; - n.outputs = ev.node.out.length; - RED.editor.updateNodeProperties(n); - RED.editor.validateNode(n); - }); - } else { - var outputMap; - if (ev.outputMap) { - outputMap = {}; - for (var port in ev.outputMap) { - if (ev.outputMap.hasOwnProperty(port) && ev.outputMap[port] !== "-1") { - outputMap[ev.outputMap[port]] = port; - } - } - } - RED.editor.updateNodeProperties(ev.node,outputMap); - RED.editor.validateNode(ev.node); - } - if (ev.links) { - for (i=0;i<ev.links.length;i++) { - RED.nodes.addLink(ev.links[i]); - } - } - ev.node.dirty = true; - ev.node.changed = ev.changed; - } else if (ev.t == "createSubflow") { - if (ev.nodes) { - RED.nodes.filterNodes({z:ev.subflow.subflow.id}).forEach(function(n) { - n.z = ev.activeWorkspace; - n.dirty = true; - }); - for (i=0;i<ev.nodes.length;i++) { - RED.nodes.remove(ev.nodes[i]); - } - } - if (ev.links) { - for (i=0;i<ev.links.length;i++) { - RED.nodes.removeLink(ev.links[i]); - } - } - - RED.nodes.removeSubflow(ev.subflow.subflow); - RED.workspaces.remove(ev.subflow.subflow); - - if (ev.removedLinks) { - for (i=0;i<ev.removedLinks.length;i++) { - RED.nodes.addLink(ev.removedLinks[i]); - } - } - } else if (ev.t == "reorder") { - if (ev.order) { - RED.workspaces.order(ev.order); - } - } - Object.keys(modifiedTabs).forEach(function(id) { - var subflow = RED.nodes.subflow(id); - if (subflow) { - RED.editor.validateNode(subflow); - } - }); - - RED.nodes.dirty(ev.dirty); - RED.view.redraw(true); - RED.palette.refresh(); - RED.workspaces.refresh(); - RED.sidebar.config.refresh(); - } - - } - - return { - //TODO: this function is a placeholder until there is a 'save' event that can be listened to - markAllDirty: function() { - for (var i=0;i<undo_history.length;i++) { - undo_history[i].dirty = true; - } - }, - list: function() { - return undo_history - }, - depth: function() { - return undo_history.length; - }, - push: function(ev) { - undo_history.push(ev); - }, - pop: function() { - var ev = undo_history.pop(); - undoEvent(ev); - }, - peek: function() { - return undo_history[undo_history.length-1]; - }, - clear: function() { - undo_history = []; - } - } - -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.validators = { - number: function(blankAllowed){return function(v) { return (blankAllowed&&(v===''||v===undefined)) || (v!=='' && !isNaN(v));}}, - regex: function(re){return function(v) { return re.test(v);}}, - typedInput: function(ptypeName,isConfig) { return function(v) { - var ptype = $("#node-"+(isConfig?"config-":"")+"input-"+ptypeName).val() || this[ptypeName]; - if (ptype === 'json') { - try { - JSON.parse(v); - return true; - } catch(err) { - return false; - } - } else if (ptype === 'msg' || ptype === 'flow' || ptype === 'global' ) { - return RED.utils.validatePropertyExpression(v); - } else if (ptype === 'num') { - return /^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v); - } - return true; - }} -}; -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.utils = (function() { - - function formatString(str) { - return str.replace(/\r?\n/g,"&crarr;").replace(/\t/g,"&rarr;"); - } - function sanitize(m) { - return m.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"); - } - - function buildMessageSummaryValue(value) { - var result; - if (Array.isArray(value)) { - result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('array['+value.length+']'); - } else if (value === null) { - result = $('<span class="debug-message-object-value debug-message-type-null">null</span>'); - } else if (typeof value === 'object') { - if (value.hasOwnProperty('type') && value.type === 'Buffer' && value.hasOwnProperty('data')) { - result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('buffer['+value.length+']'); - } else if (value.hasOwnProperty('type') && value.type === 'array' && value.hasOwnProperty('data')) { - result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('array['+value.length+']'); - } else if (value.hasOwnProperty('type') && value.type === 'function') { - result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('function'); - } else if (value.hasOwnProperty('type') && value.type === 'number') { - result = $('<span class="debug-message-object-value debug-message-type-number"></span>').text(value.data); - } else { - result = $('<span class="debug-message-object-value debug-message-type-meta">object</span>'); - } - } else if (typeof value === 'string') { - var subvalue; - if (value.length > 30) { - subvalue = sanitize(value.substring(0,30))+"&hellip;"; - } else { - subvalue = sanitize(value); - } - result = $('<span class="debug-message-object-value debug-message-type-string"></span>').html('"'+formatString(subvalue)+'"'); - } else if (typeof value === 'number') { - result = $('<span class="debug-message-object-value debug-message-type-number"></span>').text(""+value); - } else { - result = $('<span class="debug-message-object-value debug-message-type-other"></span>').text(""+value); - } - return result; - } - function makeExpandable(el,onbuild,ontoggle,expand) { - el.addClass("debug-message-expandable"); - el.prop('toggle',function() { - return function(state) { - var parent = el.parent(); - if (parent.hasClass('collapsed')) { - if (state) { - if (onbuild && !parent.hasClass('built')) { - onbuild(); - parent.addClass('built'); - } - parent.removeClass('collapsed'); - return true; - } - } else { - if (!state) { - parent.addClass('collapsed'); - return true; - } - } - return false; - } - }); - el.click(function(e) { - var parent = $(this).parent(); - var currentState = !parent.hasClass('collapsed'); - if ($(this).prop('toggle')(!currentState)) { - if (ontoggle) { - ontoggle(!currentState); - } - } - // if (parent.hasClass('collapsed')) { - // if (onbuild && !parent.hasClass('built')) { - // onbuild(); - // parent.addClass('built'); - // } - // if (ontoggle) { - // ontoggle(true); - // } - // parent.removeClass('collapsed'); - // } else { - // parent.addClass('collapsed'); - // if (ontoggle) { - // ontoggle(false); - // } - // } - e.preventDefault(); - }); - if (expand) { - el.click(); - } - - } - - var pinnedPaths = {}; - var formattedPaths = {}; - - function addMessageControls(obj,sourceId,key,msg,rootPath,strippedKey) { - if (!pinnedPaths.hasOwnProperty(sourceId)) { - pinnedPaths[sourceId] = {} - } - var tools = $('<span class="debug-message-tools"></span>').appendTo(obj); - var copyTools = $('<span class="debug-message-tools-copy button-group"></span>').appendTo(tools); - if (!!key) { - var copyPath = $('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).click(function(e) { - e.preventDefault(); - e.stopPropagation(); - RED.clipboard.copyText(key,copyPath,"clipboard.copyMessagePath"); - }) - } - var copyPayload = $('<button class="editor-button editor-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).click(function(e) { - e.preventDefault(); - e.stopPropagation(); - RED.clipboard.copyText(msg,copyPayload,"clipboard.copyMessageValue"); - }) - if (strippedKey !== undefined && strippedKey !== '') { - var isPinned = pinnedPaths[sourceId].hasOwnProperty(strippedKey); - - var pinPath = $('<button class="editor-button editor-button-small debug-message-tools-pin"><i class="fa fa-map-pin"></i></button>').appendTo(tools).click(function(e) { - e.preventDefault(); - e.stopPropagation(); - if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) { - delete pinnedPaths[sourceId][strippedKey]; - $(this).removeClass("selected"); - obj.removeClass("debug-message-row-pinned"); - } else { - var rootedPath = "$"+(strippedKey[0] === '['?"":".")+strippedKey; - pinnedPaths[sourceId][strippedKey] = normalisePropertyExpression(rootedPath); - $(this).addClass("selected"); - obj.addClass("debug-message-row-pinned"); - } - }).toggleClass("selected",isPinned); - obj.toggleClass("debug-message-row-pinned",isPinned); - } - } - function checkExpanded(strippedKey,expandPaths,minRange,maxRange) { - if (expandPaths && expandPaths.length > 0) { - if (strippedKey === '' && minRange === undefined) { - return true; - } - for (var i=0;i<expandPaths.length;i++) { - var p = expandPaths[i]; - if (p.indexOf(strippedKey) === 0 && (p[strippedKey.length] === "." || p[strippedKey.length] === "[") ) { - - if (minRange !== undefined && p[strippedKey.length] === "[") { - var subkey = p.substring(strippedKey.length); - var m = (/\[(\d+)\]/.exec(subkey)); - if (m) { - var index = parseInt(m[1]); - return minRange<=index && index<=maxRange; - } - } else { - return true; - } - } - } - } - return false; - } - - function formatNumber(element,obj,sourceId,path,cycle,initialFormat) { - var format = (formattedPaths[sourceId] && formattedPaths[sourceId][path] && formattedPaths[sourceId][path]['number']) || initialFormat || "dec"; - if (cycle) { - if (format === 'dec') { - if ((obj.toString().length===13) && (obj<=2147483647000)) { - format = 'dateMS'; - } else if ((obj.toString().length===10) && (obj<=2147483647)) { - format = 'dateS'; - } else { - format = 'hex' - } - } else if (format === 'dateMS' || format == 'dateS') { - format = 'hex'; - } else { - format = 'dec'; - } - formattedPaths[sourceId] = formattedPaths[sourceId]||{}; - formattedPaths[sourceId][path] = formattedPaths[sourceId][path]||{}; - formattedPaths[sourceId][path]['number'] = format; - } else if (initialFormat !== undefined){ - formattedPaths[sourceId] = formattedPaths[sourceId]||{}; - formattedPaths[sourceId][path] = formattedPaths[sourceId][path]||{}; - formattedPaths[sourceId][path]['number'] = format; - } - if (format === 'dec') { - element.text(""+obj); - } else if (format === 'dateMS') { - element.text((new Date(obj)).toISOString()); - } else if (format === 'dateS') { - element.text((new Date(obj*1000)).toISOString()); - } else if (format === 'hex') { - element.text("0x"+(obj).toString(16)); - } - } - - function formatBuffer(element,button,sourceId,path,cycle) { - var format = (formattedPaths[sourceId] && formattedPaths[sourceId][path] && formattedPaths[sourceId][path]['buffer']) || "raw"; - if (cycle) { - if (format === 'raw') { - format = 'string'; - } else { - format = 'raw'; - } - formattedPaths[sourceId] = formattedPaths[sourceId]||{}; - formattedPaths[sourceId][path] = formattedPaths[sourceId][path]||{}; - formattedPaths[sourceId][path]['buffer'] = format; - } - if (format === 'raw') { - button.text('raw'); - element.removeClass('debug-message-buffer-string').addClass('debug-message-buffer-raw'); - } else if (format === 'string') { - button.text('string'); - element.addClass('debug-message-buffer-string').removeClass('debug-message-buffer-raw'); - } - } - - function buildMessageElement(obj,options) { - options = options || {}; - var key = options.key; - var typeHint = options.typeHint; - var hideKey = options.hideKey; - var path = options.path; - var sourceId = options.sourceId; - var rootPath = options.rootPath; - var expandPaths = options.expandPaths; - var ontoggle = options.ontoggle; - var exposeApi = options.exposeApi; - - var subElements = {}; - var i; - var e; - var entryObj; - var expandableHeader; - var header; - var headerHead; - var value; - var strippedKey; - if (path !== undefined && rootPath !== undefined) { - strippedKey = path.substring(rootPath.length+(path[rootPath.length]==="."?1:0)); - } - var element = $('<span class="debug-message-element"></span>'); - element.collapse = function() { - element.find(".debug-message-expandable").parent().addClass("collapsed"); - } - header = $('<span class="debug-message-row"></span>').appendTo(element); - if (sourceId) { - addMessageControls(header,sourceId,path,obj,rootPath,strippedKey); - } - if (!key) { - element.addClass("debug-message-top-level"); - if (sourceId) { - var pinned = pinnedPaths[sourceId]; - expandPaths = []; - if (pinned) { - for (var pinnedPath in pinned) { - if (pinned.hasOwnProperty(pinnedPath)) { - try { - var res = getMessageProperty({$:obj},pinned[pinnedPath]); - if (res !== undefined) { - expandPaths.push(pinnedPath); - } - } catch(err) { - } - } - } - expandPaths.sort(); - } - element.clearPinned = function() { - element.find(".debug-message-row-pinned").removeClass("debug-message-row-pinned"); - pinnedPaths[sourceId] = {}; - } - } - } else { - if (!hideKey) { - $('<span class="debug-message-object-key"></span>').text(key).appendTo(header); - $('<span>: </span>').appendTo(header); - } - } - entryObj = $('<span class="debug-message-object-value"></span>').appendTo(header); - - var isArray = Array.isArray(obj); - var isArrayObject = false; - if (obj && typeof obj === 'object' && obj.hasOwnProperty('type') && obj.hasOwnProperty('data') && ((obj.__enc__ && obj.type === 'array') || obj.type === 'Buffer')) { - isArray = true; - isArrayObject = true; - } - if (obj === null || obj === undefined) { - $('<span class="debug-message-type-null">'+obj+'</span>').appendTo(entryObj); - } else if (obj.__enc__ && obj.type === 'number') { - e = $('<span class="debug-message-type-number debug-message-object-header"></span>').text(obj.data).appendTo(entryObj); - } else if (typeHint === "function" || (obj.__enc__ && obj.type === 'function')) { - e = $('<span class="debug-message-type-meta debug-message-object-header"></span>').text("function").appendTo(entryObj); - } else if (typeHint === "internal" || (obj.__enc__ && obj.type === 'internal')) { - e = $('<span class="debug-message-type-meta debug-message-object-header"></span>').text("[internal]").appendTo(entryObj); - } else if (typeof obj === 'string') { - if (/[\t\n\r]/.test(obj)) { - element.addClass('collapsed'); - $('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header); - makeExpandable(header, function() { - $('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text(typeHint||'string').appendTo(header); - var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(element); - $('<pre class="debug-message-type-string"></pre>').text(obj).appendTo(row); - },function(state) {if (ontoggle) { ontoggle(path,state);}}, checkExpanded(strippedKey,expandPaths)); - } - e = $('<span class="debug-message-type-string debug-message-object-header"></span>').html('"'+formatString(sanitize(obj))+'"').appendTo(entryObj); - if (/^#[0-9a-f]{6}$/i.test(obj)) { - $('<span class="debug-message-type-string-swatch"></span>').css('backgroundColor',obj).appendTo(e); - } - - } else if (typeof obj === 'number') { - e = $('<span class="debug-message-type-number"></span>').appendTo(entryObj); - - if (Number.isInteger(obj) && (obj >= 0)) { // if it's a +ve integer - e.addClass("debug-message-type-number-toggle"); - e.click(function(evt) { - evt.preventDefault(); - formatNumber($(this), obj, sourceId, path, true); - }); - } - formatNumber(e,obj,sourceId,path,false,typeHint==='hex'?'hex':undefined); - - } else if (isArray) { - element.addClass('collapsed'); - - var originalLength = obj.length; - if (typeHint) { - var m = /\[(\d+)\]/.exec(typeHint); - if (m) { - originalLength = parseInt(m[1]); - } - } - var data = obj; - var type = 'array'; - if (isArrayObject) { - data = obj.data; - if (originalLength === undefined) { - originalLength = data.length; - } - if (data.__enc__) { - data = data.data; - } - type = obj.type.toLowerCase(); - } else if (/buffer/.test(typeHint)) { - type = 'buffer'; - } - var fullLength = data.length; - - if (originalLength > 0) { - $('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header); - var arrayRows = $('<div class="debug-message-array-rows"></div>').appendTo(element); - element.addClass('debug-message-buffer-raw'); - } - if (key) { - headerHead = $('<span class="debug-message-type-meta"></span>').text(typeHint||(type+'['+originalLength+']')).appendTo(entryObj); - } else { - headerHead = $('<span class="debug-message-object-header"></span>').appendTo(entryObj); - $('<span>[ </span>').appendTo(headerHead); - var arrayLength = Math.min(originalLength,10); - for (i=0;i<arrayLength;i++) { - buildMessageSummaryValue(data[i]).appendTo(headerHead); - if (i < arrayLength-1) { - $('<span>, </span>').appendTo(headerHead); - } - } - if (originalLength > arrayLength) { - $('<span> &hellip;</span>').appendTo(headerHead); - } - if (arrayLength === 0) { - $('<span class="debug-message-type-meta">empty</span>').appendTo(headerHead); - } - $('<span> ]</span>').appendTo(headerHead); - } - if (originalLength > 0) { - - makeExpandable(header,function() { - if (!key) { - headerHead = $('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text(typeHint||(type+'['+originalLength+']')).appendTo(header); - } - if (type === 'buffer') { - var stringRow = $('<div class="debug-message-string-rows"></div>').appendTo(element); - var sr = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(stringRow); - var stringEncoding = ""; - try { - stringEncoding = String.fromCharCode.apply(null, new Uint16Array(data)) - } catch(err) { - console.log(err); - } - $('<pre class="debug-message-type-string"></pre>').text(stringEncoding).appendTo(sr); - var bufferOpts = $('<span class="debug-message-buffer-opts"></span>').appendTo(headerHead); - var switchFormat = $('<a href="#"></a>').addClass('selected').text('raw').appendTo(bufferOpts).click(function(e) { - e.preventDefault(); - e.stopPropagation(); - formatBuffer(element,$(this),sourceId,path,true); - }); - formatBuffer(element,switchFormat,sourceId,path,false); - - } - var row; - if (fullLength <= 10) { - for (i=0;i<fullLength;i++) { - row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(arrayRows); - subElements[path+"["+i+"]"] = buildMessageElement( - data[i], - { - key: ""+i, - typeHint: type==='buffer'?'hex':false, - hideKey: false, - path: path+"["+i+"]", - sourceId: sourceId, - rootPath: rootPath, - expandPaths: expandPaths, - ontoggle: ontoggle, - exposeApi: exposeApi - } - ).appendTo(row); - } - } else { - for (i=0;i<fullLength;i+=10) { - var minRange = i; - row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(arrayRows); - header = $('<span></span>').appendTo(row); - $('<i class="fa fa-caret-right debug-message-object-handle"></i> ').appendTo(header); - makeExpandable(header, (function() { - var min = minRange; - var max = Math.min(fullLength-1,(minRange+9)); - var parent = row; - return function() { - for (var i=min;i<=max;i++) { - var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(parent); - subElements[path+"["+i+"]"] = buildMessageElement( - data[i], - { - key: ""+i, - typeHint: type==='buffer'?'hex':false, - hideKey: false, - path: path+"["+i+"]", - sourceId: sourceId, - rootPath: rootPath, - expandPaths: expandPaths, - ontoggle: ontoggle, - exposeApi: exposeApi - - } - ).appendTo(row); - } - } - })(), - (function() { var path = path+"["+i+"]"; return function(state) {if (ontoggle) { ontoggle(path,state);}}})(), - checkExpanded(strippedKey,expandPaths,minRange,Math.min(fullLength-1,(minRange+9)))); - $('<span class="debug-message-object-key"></span>').html("["+minRange+" &hellip; "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header); - } - if (fullLength < originalLength) { - $('<div class="debug-message-object-entry collapsed"><span class="debug-message-object-key">['+fullLength+' &hellip; '+originalLength+']</span></div>').appendTo(arrayRows); - } - } - }, - function(state) {if (ontoggle) { ontoggle(path,state);}}, - checkExpanded(strippedKey,expandPaths)); - } - } else if (typeof obj === 'object') { - element.addClass('collapsed'); - var keys = Object.keys(obj); - if (key || keys.length > 0) { - $('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header); - makeExpandable(header, function() { - if (!key) { - $('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text('object').appendTo(header); - } - for (i=0;i<keys.length;i++) { - var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(element); - var newPath = path; - if (newPath !== undefined) { - if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) { - newPath += (newPath.length > 0?".":"")+keys[i]; - } else { - newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]" - } - } - subElements[newPath] = buildMessageElement( - obj[keys[i]], - { - key: keys[i], - typeHint: false, - hideKey: false, - path: newPath, - sourceId: sourceId, - rootPath: rootPath, - expandPaths: expandPaths, - ontoggle: ontoggle, - exposeApi: exposeApi - - } - ).appendTo(row); - } - if (keys.length === 0) { - $('<div class="debug-message-object-entry debug-message-type-meta collapsed"></div>').text("empty").appendTo(element); - } - }, - function(state) {if (ontoggle) { ontoggle(path,state);}}, - checkExpanded(strippedKey,expandPaths)); - } - if (key) { - $('<span class="debug-message-type-meta"></span>').text('object').appendTo(entryObj); - } else { - headerHead = $('<span class="debug-message-object-header"></span>').appendTo(entryObj); - $('<span>{ </span>').appendTo(headerHead); - var keysLength = Math.min(keys.length,5); - for (i=0;i<keysLength;i++) { - $('<span class="debug-message-object-key"></span>').text(keys[i]).appendTo(headerHead); - $('<span>: </span>').appendTo(headerHead); - buildMessageSummaryValue(obj[keys[i]]).appendTo(headerHead); - if (i < keysLength-1) { - $('<span>, </span>').appendTo(headerHead); - } - } - if (keys.length > keysLength) { - $('<span> &hellip;</span>').appendTo(headerHead); - } - if (keysLength === 0) { - $('<span class="debug-message-type-meta">empty</span>').appendTo(headerHead); - } - $('<span> }</span>').appendTo(headerHead); - } - } else { - $('<span class="debug-message-type-other"></span>').text(""+obj).appendTo(entryObj); - } - if (exposeApi) { - element.prop('expand', function() { return function(targetPath, state) { - if (path === targetPath) { - if (header.prop('toggle')) { - header.prop('toggle')(state); - } - } else if (subElements[targetPath] && subElements[targetPath].prop('expand') ) { - subElements[targetPath].prop('expand')(targetPath,state); - } else { - for (var p in subElements) { - if (subElements.hasOwnProperty(p)) { - if (targetPath.indexOf(p) === 0) { - if (subElements[p].prop('expand') ) { - subElements[p].prop('expand')(targetPath,state); - } - break; - } - } - } - } - }}); - } - return element; - } - - function normalisePropertyExpression(str) { - // This must be kept in sync with validatePropertyExpression - // in editor/js/ui/utils.js - - var length = str.length; - if (length === 0) { - throw new Error("Invalid property expression: zero-length"); - } - var parts = []; - var start = 0; - var inString = false; - var inBox = false; - var quoteChar; - var v; - for (var i=0;i<length;i++) { - var c = str[i]; - if (!inString) { - if (c === "'" || c === '"') { - if (i != start) { - throw new Error("Invalid property expression: unexpected "+c+" at position "+i); - } - inString = true; - quoteChar = c; - start = i+1; - } else if (c === '.') { - if (i===0) { - throw new Error("Invalid property expression: unexpected . at position 0"); - } - if (start != i) { - v = str.substring(start,i); - if (/^\d+$/.test(v)) { - parts.push(parseInt(v)); - } else { - parts.push(v); - } - } - if (i===length-1) { - throw new Error("Invalid property expression: unterminated expression"); - } - // Next char is first char of an identifier: a-z 0-9 $ _ - if (!/[a-z0-9\$\_]/i.test(str[i+1])) { - throw new Error("Invalid property expression: unexpected "+str[i+1]+" at position "+(i+1)); - } - start = i+1; - } else if (c === '[') { - if (i === 0) { - throw new Error("Invalid property expression: unexpected "+c+" at position "+i); - } - if (start != i) { - parts.push(str.substring(start,i)); - } - if (i===length-1) { - throw new Error("Invalid property expression: unterminated expression"); - } - // Next char is either a quote or a number - if (!/["'\d]/.test(str[i+1])) { - throw new Error("Invalid property expression: unexpected "+str[i+1]+" at position "+(i+1)); - } - start = i+1; - inBox = true; - } else if (c === ']') { - if (!inBox) { - throw new Error("Invalid property expression: unexpected "+c+" at position "+i); - } - if (start != i) { - v = str.substring(start,i); - if (/^\d+$/.test(v)) { - parts.push(parseInt(v)); - } else { - throw new Error("Invalid property expression: unexpected array expression at position "+start); - } - } - start = i+1; - inBox = false; - } else if (c === ' ') { - throw new Error("Invalid property expression: unexpected ' ' at position "+i); - } - } else { - if (c === quoteChar) { - if (i-start === 0) { - throw new Error("Invalid property expression: zero-length string at position "+start); - } - parts.push(str.substring(start,i)); - // If inBox, next char must be a ]. Otherwise it may be [ or . - if (inBox && !/\]/.test(str[i+1])) { - throw new Error("Invalid property expression: unexpected array expression at position "+start); - } else if (!inBox && i+1!==length && !/[\[\.]/.test(str[i+1])) { - throw new Error("Invalid property expression: unexpected "+str[i+1]+" expression at position "+(i+1)); - } - start = i+1; - inString = false; - } - } - - } - if (inBox || inString) { - throw new Error("Invalid property expression: unterminated expression"); - } - if (start < length) { - parts.push(str.substring(start)); - } - return parts; - } - - function validatePropertyExpression(str) { - try { - var parts = normalisePropertyExpression(str); - return true; - } catch(err) { - return false; - } - } - - function getMessageProperty(msg,expr) { - var result = null; - var msgPropParts; - - if (typeof expr === 'string') { - if (expr.indexOf('msg.')===0) { - expr = expr.substring(4); - } - msgPropParts = normalisePropertyExpression(expr); - } else { - msgPropParts = expr; - } - var m; - msgPropParts.reduce(function(obj, key) { - result = (typeof obj[key] !== "undefined" ? obj[key] : undefined); - if (result === undefined && obj.hasOwnProperty('type') && obj.hasOwnProperty('data')&& obj.hasOwnProperty('length')) { - result = (typeof obj.data[key] !== "undefined" ? obj.data[key] : undefined); - } - return result; - }, msg); - return result; - } - - function separateIconPath(icon) { - var result = {module: "", file: ""}; - if (icon) { - var index = icon.indexOf('/'); - if (index !== -1) { - result.module = icon.slice(0, index); - result.file = icon.slice(index + 1); - } else { - result.file = icon; - } - } - return result; - } - - function getDefaultNodeIcon(def,node) { - var icon_url; - if (node && node.type === "subflow") { - icon_url = "node-red/subflow.png"; - } else if (typeof def.icon === "function") { - try { - icon_url = def.icon.call(node); - } catch(err) { - console.log("Definition error: "+def.type+".icon",err); - icon_url = "arrow-in.png"; - } - } else { - icon_url = def.icon; - } - - var iconPath = separateIconPath(icon_url); - if (!iconPath.module) { - if (def.set) { - iconPath.module = def.set.module; - } else { - // Handle subflow instance nodes that don't have def.set - iconPath.module = "node-red"; - } - } - return iconPath; - } - - function isIconExists(iconPath) { - var iconSets = RED.nodes.getIconSets(); - var iconFileList = iconSets[iconPath.module]; - if (iconFileList && iconFileList.indexOf(iconPath.file) !== -1) { - return true; - } else { - return false; - } - } - - function getNodeIcon(def,node) { - if (def.category === 'config') { - return RED.settings.apiRootUrl+"icons/node-red/cog.png" - } else if (node && node.type === 'tab') { - return RED.settings.apiRootUrl+"icons/node-red/subflow.png" - } else if (node && node.type === 'unknown') { - return RED.settings.apiRootUrl+"icons/node-red/alert.png" - } else if (node && node.icon) { - var iconPath = separateIconPath(node.icon); - if (isIconExists(iconPath)) { - return RED.settings.apiRootUrl+"icons/" + node.icon; - } - } - - var iconPath = getDefaultNodeIcon(def, node); - if (def.category === 'subflows') { - if (!isIconExists(iconPath)) { - return RED.settings.apiRootUrl+"icons/node-red/subflow.png"; - } - } - return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; - } - - function getNodeLabel(node,defaultLabel) { - defaultLabel = defaultLabel||""; - var l; - if (node.type === 'tab') { - l = node.label || defaultLabel - } else { - l = node._def.label; - try { - l = (typeof l === "function" ? l.call(node) : l)||defaultLabel; - } catch(err) { - console.log("Definition error: "+node.type+".label",err); - l = defaultLabel; - } - } - return RED.text.bidi.enforceTextDirectionWithUCC(l); - } - - var nodeColorCache = {}; - function getNodeColor(type, def) { - var result = def.color; - var paletteTheme = RED.settings.theme('palette.theme') || []; - if (paletteTheme.length > 0) { - if (!nodeColorCache.hasOwnProperty(type)) { - var l = paletteTheme.length; - for (var i=0;i<l;i++ ){ - var themeRule = paletteTheme[i]; - if (themeRule.hasOwnProperty('category')) { - if (!themeRule.hasOwnProperty('_category')) { - themeRule._category = new RegExp(themeRule.category); - } - if (!themeRule._category.test(def.category)) { - continue; - } - } - if (themeRule.hasOwnProperty('type')) { - if (!themeRule.hasOwnProperty('_type')) { - themeRule._type = new RegExp(themeRule.type); - } - if (!themeRule._type.test(type)) { - continue; - } - } - nodeColorCache[type] = themeRule.color || def.color; - break; - } - } - result = nodeColorCache[type]; - } - return result; - } - - function addSpinnerOverlay(container,contain) { - var spinner = $('<div class="projects-dialog-spinner "><img src="red/images/spin.svg"/></div>').appendTo(container); - if (contain) { - spinner.addClass('projects-dialog-spinner-contain'); - } - return spinner; - } - - function decodeObject(payload,format) { - if ((format === 'number') && (payload === "NaN")) { - payload = Number.NaN; - } else if ((format === 'number') && (payload === "Infinity")) { - payload = Infinity; - } else if ((format === 'number') && (payload === "-Infinity")) { - payload = -Infinity; - } else if (format === 'Object' || /^array/.test(format) || format === 'boolean' || format === 'number' ) { - payload = JSON.parse(payload); - } else if (/error/i.test(format)) { - payload = JSON.parse(payload); - payload = (payload.name?payload.name+": ":"")+payload.message; - } else if (format === 'null') { - payload = null; - } else if (format === 'undefined') { - payload = undefined; - } else if (/^buffer/.test(format)) { - var buffer = payload; - payload = []; - for (var c = 0; c < buffer.length; c += 2) { - payload.push(parseInt(buffer.substr(c, 2), 16)); - } - } - return payload; - } - - function parseContextKey(key) { - var parts = {}; - var m = /^#:\((\S+?)\)::(.*)$/.exec(key); - if (m) { - parts.store = m[1]; - parts.key = m[2]; - } else { - parts.key = key; - if (RED.settings.context) { - parts.store = RED.settings.context.default; - } - } - return parts; - } - - return { - createObjectElement: buildMessageElement, - getMessageProperty: getMessageProperty, - normalisePropertyExpression: normalisePropertyExpression, - validatePropertyExpression: validatePropertyExpression, - separateIconPath: separateIconPath, - getDefaultNodeIcon: getDefaultNodeIcon, - getNodeIcon: getNodeIcon, - getNodeLabel: getNodeLabel, - getNodeColor: getNodeColor, - addSpinnerOverlay: addSpinnerOverlay, - decodeObject: decodeObject, - parseContextKey: parseContextKey - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -(function($) { - -/** - * options: - * - addButton : boolean|string - text for add label, default 'add' - * - height : number|'auto' - * - resize : function - called when list as a whole is resized - * - resizeItem : function(item) - called to resize individual item - * - sortable : boolean|string - string is the css selector for handle - * - sortItems : function(items) - when order of items changes - * - connectWith : css selector of other sortables - * - removable : boolean - whether to display delete button on items - * - addItem : function(row,index,itemData) - when an item is added - * - removeItem : function(itemData) - called when an item is removed - * - filter : function(itemData) - called for each item to determine if it should be shown - * - sort : function(itemDataA,itemDataB) - called to sort items - * - scrollOnAdd : boolean - whether to scroll to newly added items - * methods: - * - addItem(itemData) - * - removeItem(itemData) - * - width(width) - * - height(height) - * - items() - * - empty() - * - filter(filter) - * - sort(sort) - * - length() - */ - $.widget( "nodered.editableList", { - _create: function() { - var that = this; - - this.element.addClass('red-ui-editableList-list'); - this.uiWidth = this.element.width(); - this.uiContainer = this.element - .wrap( "<div>" ) - .parent(); - - if (this.options.header) { - this.options.header.addClass("red-ui-editableList-header"); - this.borderContainer = this.uiContainer.wrap("<div>").parent(); - this.borderContainer.prepend(this.options.header); - this.topContainer = this.borderContainer.wrap("<div>").parent(); - } else { - this.topContainer = this.uiContainer.wrap("<div>").parent(); - } - this.topContainer.addClass('red-ui-editableList'); - if (this.options.class) { - this.topContainer.addClass(this.options.class); - } - - if (this.options.addButton !== false) { - var addLabel; - if (typeof this.options.addButton === 'string') { - addLabel = this.options.addButton - } else { - if (RED && RED._) { - addLabel = RED._("editableList.add"); - } else { - addLabel = 'add'; - } - } - $('<a href="#" class="editor-button editor-button-small red-ui-editableList-addButton" style="margin-top: 4px;"><i class="fa fa-plus"></i> '+addLabel+'</a>') - .appendTo(this.topContainer) - .click(function(evt) { - evt.preventDefault(); - that.addItem({}); - }); - } - if (this.element.css("position") === "absolute") { - ["top","left","bottom","right"].forEach(function(s) { - var v = that.element.css(s); - if (v!=="auto" && v!=="") { - that.topContainer.css(s,v); - that.uiContainer.css(s,"0"); - that.element.css(s,'auto'); - } - }) - this.element.css("position","static"); - this.topContainer.css("position","absolute"); - this.uiContainer.css("position","absolute"); - - } - if (this.options.header) { - this.borderContainer.addClass("red-ui-editableList-border"); - } else { - this.uiContainer.addClass("red-ui-editableList-border"); - } - this.uiContainer.addClass("red-ui-editableList-container"); - - this.uiHeight = this.element.height(); - - this.activeFilter = this.options.filter||null; - this.activeSort = this.options.sort||null; - this.scrollOnAdd = this.options.scrollOnAdd; - if (this.scrollOnAdd === undefined) { - this.scrollOnAdd = true; - } - var minHeight = this.element.css("minHeight"); - if (minHeight !== '0px') { - this.uiContainer.css("minHeight",minHeight); - this.element.css("minHeight",0); - } - var maxHeight = this.element.css("maxHeight"); - if (maxHeight !== '0px') { - this.uiContainer.css("maxHeight",maxHeight); - this.element.css("maxHeight",null); - } - if (this.options.height !== 'auto') { - this.uiContainer.css("overflow-y","scroll"); - if (!isNaN(this.options.height)) { - this.uiHeight = this.options.height; - } - } - this.element.height('auto'); - - var attrStyle = this.element.attr('style'); - var m; - if ((m = /width\s*:\s*(\d+%)/i.exec(attrStyle)) !== null) { - this.element.width('100%'); - this.uiContainer.width(m[1]); - } - if (this.options.sortable) { - var handle = (typeof this.options.sortable === 'string')? - this.options.sortable : - ".red-ui-editableList-item-handle"; - var sortOptions = { - axis: "y", - update: function( event, ui ) { - if (that.options.sortItems) { - that.options.sortItems(that.items()); - } - }, - handle:handle, - cursor: "move", - tolerance: "pointer", - forcePlaceholderSize:true, - placeholder: "red-ui-editabelList-item-placeholder", - start: function(e, ui){ - ui.placeholder.height(ui.item.height()-4); - } - }; - if (this.options.connectWith) { - sortOptions.connectWith = this.options.connectWith; - } - - this.element.sortable(sortOptions); - } - - this._resize(); - - // this.menu = this._createMenu(this.types, function(v) { that.type(v) }); - // this.type(this.options.default||this.types[0].value); - }, - _resize: function() { - var currentFullHeight = this.topContainer.height(); - var innerHeight = this.uiContainer.height(); - var delta = currentFullHeight - innerHeight; - if (this.uiHeight !== 0) { - this.uiContainer.height(this.uiHeight-delta); - } - if (this.options.resize) { - this.options.resize(); - } - if (this.options.resizeItem) { - var that = this; - this.element.children().each(function(i) { - that.options.resizeItem($(this).find(".red-ui-editableList-item-content"),i); - }); - } - }, - _destroy: function() { - }, - _refreshFilter: function() { - var that = this; - var count = 0; - if (!this.activeFilter) { - return this.element.children().show(); - } - var items = this.items(); - items.each(function (i,el) { - var data = el.data('data'); - try { - if (that.activeFilter(data)) { - el.parent().show(); - count++; - } else { - el.parent().hide(); - } - } catch(err) { - console.log(err); - el.parent().show(); - count++; - } - }); - return count; - }, - _refreshSort: function() { - if (this.activeSort) { - var items = this.element.children(); - var that = this; - items.sort(function(A,B) { - return that.activeSort($(A).find(".red-ui-editableList-item-content").data('data'),$(B).find(".red-ui-editableList-item-content").data('data')); - }); - $.each(items,function(idx,li) { - that.element.append(li); - }) - } - }, - width: function(desiredWidth) { - this.uiWidth = desiredWidth; - this._resize(); - }, - height: function(desiredHeight) { - this.uiHeight = desiredHeight; - this._resize(); - }, - addItem: function(data) { - var that = this; - data = data || {}; - var li = $('<li>'); - var added = false; - if (this.activeSort) { - var items = this.items(); - var skip = false; - items.each(function(i,el) { - if (added) { return } - var itemData = el.data('data'); - if (that.activeSort(data,itemData) < 0) { - li.insertBefore(el.closest("li")); - added = true; - } - }); - } - if (!added) { - li.appendTo(this.element); - } - var row = $('<div/>').addClass("red-ui-editableList-item-content").appendTo(li); - row.data('data',data); - if (this.options.sortable === true) { - $('<i class="red-ui-editableList-item-handle fa fa-bars"></i>').appendTo(li); - li.addClass("red-ui-editableList-item-sortable"); - } - if (this.options.removable) { - var deleteButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li); - $('<i/>',{class:"fa fa-remove"}).appendTo(deleteButton); - li.addClass("red-ui-editableList-item-removable"); - deleteButton.click(function(evt) { - evt.preventDefault(); - var data = row.data('data'); - li.addClass("red-ui-editableList-item-deleting") - li.fadeOut(300, function() { - $(this).remove(); - if (that.options.removeItem) { - that.options.removeItem(data); - } - }); - }); - } - if (this.options.addItem) { - var index = that.element.children().length-1; - setTimeout(function() { - that.options.addItem(row,index,data); - if (that.activeFilter) { - try { - if (!that.activeFilter(data)) { - li.hide(); - } - } catch(err) { - } - } - - if (!that.activeSort && that.scrollOnAdd) { - setTimeout(function() { - that.uiContainer.scrollTop(that.element.height()); - },0); - } - },0); - } - }, - addItems: function(items) { - for (var i=0; i<items.length;i++) { - this.addItem(items[i]); - } - }, - removeItem: function(data) { - var items = this.element.children().filter(function(f) { - return data === $(this).find(".red-ui-editableList-item-content").data('data'); - }); - items.remove(); - if (this.options.removeItem) { - this.options.removeItem(data); - } - }, - items: function() { - return this.element.children().map(function(i) { return $(this).find(".red-ui-editableList-item-content"); }); - }, - empty: function() { - this.element.empty(); - }, - filter: function(filter) { - if (filter !== undefined) { - this.activeFilter = filter; - } - return this._refreshFilter(); - }, - sort: function(sort) { - if (sort !== undefined) { - this.activeSort = sort; - } - return this._refreshSort(); - }, - length: function() { - return this.element.children().length; - } - }); -})(jQuery); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -(function($) { - $.widget( "nodered.checkboxSet", { - _create: function() { - var that = this; - this.uiElement = this.element.wrap( "<span>" ).parent(); - this.uiElement.addClass("red-ui-checkboxSet"); - if (this.options.parent) { - this.parent = this.options.parent; - this.parent.checkboxSet('addChild',this.element); - } - this.children = []; - this.partialFlag = false; - this.stateValue = 0; - var initialState = this.element.prop('checked'); - this.options = [ - $('<span class="red-ui-checkboxSet-option hide"><i class="fa fa-square-o"></i></span>').appendTo(this.uiElement), - $('<span class="red-ui-checkboxSet-option hide"><i class="fa fa-check-square-o"></i></span>').appendTo(this.uiElement), - $('<span class="red-ui-checkboxSet-option hide"><i class="fa fa-minus-square-o"></i></span>').appendTo(this.uiElement) - ]; - if (initialState) { - this.options[1].show(); - } else { - this.options[0].show(); - } - - this.element.change(function() { - if (this.checked) { - that.options[0].hide(); - that.options[1].show(); - that.options[2].hide(); - } else { - that.options[1].hide(); - that.options[0].show(); - that.options[2].hide(); - } - var isChecked = this.checked; - that.children.forEach(function(child) { - child.checkboxSet('state',isChecked,false,true); - }) - }) - this.uiElement.click(function(e) { - e.stopPropagation(); - // state returns null for a partial state. Clicking on that should - // result in false. - that.state((that.state()===false)?true:false); - }) - if (this.parent) { - this.parent.checkboxSet('updateChild',this); - } - }, - _destroy: function() { - if (this.parent) { - this.parent.checkboxSet('removeChild',this.element); - } - }, - addChild: function(child) { - var that = this; - this.children.push(child); - }, - removeChild: function(child) { - var index = this.children.indexOf(child); - if (index > -1) { - this.children.splice(index,1); - } - }, - updateChild: function(child) { - var checkedCount = 0; - this.children.forEach(function(c,i) { - if (c.checkboxSet('state') === true) { - checkedCount++; - } - }); - if (checkedCount === 0) { - - this.state(false,true); - } else if (checkedCount === this.children.length) { - this.state(true,true); - } else { - this.state(null,true); - } - }, - disable: function() { - this.uiElement.addClass('disabled'); - }, - state: function(state,suppressEvent,suppressParentUpdate) { - - if (arguments.length === 0) { - return this.partialFlag?null:this.element.is(":checked"); - } else { - this.partialFlag = (state === null); - var trueState = this.partialFlag||state; - this.element.prop('checked',trueState); - if (state === true) { - this.options[0].hide(); - this.options[1].show(); - this.options[2].hide(); - } else if (state === false) { - this.options[2].hide(); - this.options[1].hide(); - this.options[0].show(); - } else if (state === null) { - this.options[0].hide(); - this.options[1].hide(); - this.options[2].show(); - } - if (!suppressEvent) { - this.element.trigger('change',null); - } - if (!suppressParentUpdate && this.parent) { - this.parent.checkboxSet('updateChild',this); - } - } - } - }) - -})(jQuery); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.menu = (function() { - - var menuItems = {}; - - function createMenuItem(opt) { - var item; - - if (opt !== null && opt.id) { - var themeSetting = RED.settings.theme("menu."+opt.id); - if (themeSetting === false) { - return null; - } - } - - function setInitialState() { - var savedStateActive = RED.settings.get("menu-" + opt.id); - if (opt.setting) { - // May need to migrate pre-0.17 setting - - if (savedStateActive !== null) { - RED.settings.set(opt.setting,savedStateActive); - RED.settings.remove("menu-" + opt.id); - } else { - savedStateActive = RED.settings.get(opt.setting); - } - } - if (savedStateActive) { - link.addClass("active"); - triggerAction(opt.id,true); - } else if (savedStateActive === false) { - link.removeClass("active"); - triggerAction(opt.id,false); - } else if (opt.hasOwnProperty("selected")) { - if (opt.selected) { - link.addClass("active"); - } else { - link.removeClass("active"); - } - triggerAction(opt.id,opt.selected); - } - } - - if (opt === null) { - item = $('<li class="divider"></li>'); - } else { - item = $('<li></li>'); - - if (opt.group) { - item.addClass("menu-group-"+opt.group); - - } - var linkContent = '<a '+(opt.id?'id="'+opt.id+'" ':'')+'tabindex="-1" href="#">'; - if (opt.toggle) { - linkContent += '<i class="fa fa-square pull-left"></i>'; - linkContent += '<i class="fa fa-check-square pull-left"></i>'; - - } - if (opt.icon !== undefined) { - if (/\.png/.test(opt.icon)) { - linkContent += '<img src="'+opt.icon+'"/> '; - } else { - linkContent += '<i class="'+(opt.icon?opt.icon:'" style="display: inline-block;"')+'"></i> '; - } - } - - if (opt.sublabel) { - linkContent += '<span class="menu-label-container"><span class="menu-label">'+opt.label+'</span>'+ - '<span class="menu-sublabel">'+opt.sublabel+'</span></span>' - } else { - linkContent += '<span class="menu-label">'+opt.label+'</span>' - } - - linkContent += '</a>'; - - var link = $(linkContent).appendTo(item); - - menuItems[opt.id] = opt; - - if (opt.onselect) { - link.click(function(e) { - e.preventDefault(); - if ($(this).parent().hasClass("disabled")) { - return; - } - if (opt.toggle) { - var selected = isSelected(opt.id); - if (typeof opt.toggle === "string") { - if (!selected) { - for (var m in menuItems) { - if (menuItems.hasOwnProperty(m)) { - var mi = menuItems[m]; - if (mi.id != opt.id && opt.toggle == mi.toggle) { - setSelected(mi.id,false); - } - } - } - setSelected(opt.id,true); - } - } else { - setSelected(opt.id, !selected); - } - } else { - triggerAction(opt.id); - } - }); - if (opt.toggle) { - setInitialState(); - } - } else if (opt.href) { - link.attr("target","_blank").attr("href",opt.href); - } else if (!opt.options) { - item.addClass("disabled"); - link.click(function(event) { - event.preventDefault(); - }); - } - if (opt.options) { - item.addClass("dropdown-submenu pull-left"); - var submenu = $('<ul id="'+opt.id+'-submenu" class="dropdown-menu"></ul>').appendTo(item); - - for (var i=0;i<opt.options.length;i++) { - var li = createMenuItem(opt.options[i]); - if (li) { - li.appendTo(submenu); - } - } - } - if (opt.disabled) { - item.addClass("disabled"); - } - } - - - return item; - - } - function createMenu(options) { - - var menuParent = $("#"+options.id); - - var topMenu = $("<ul/>",{id:options.id+"-submenu", class:"dropdown-menu pull-right"}); - - if (menuParent.length === 1) { - topMenu.insertAfter(menuParent); - } - - var lastAddedSeparator = false; - for (var i=0;i<options.options.length;i++) { - var opt = options.options[i]; - if (opt !== null || !lastAddedSeparator) { - var li = createMenuItem(opt); - if (li) { - li.appendTo(topMenu); - lastAddedSeparator = (opt === null); - } - } - } - - return topMenu; - } - - function triggerAction(id, args) { - var opt = menuItems[id]; - var callback = opt.onselect; - if (typeof opt.onselect === 'string') { - callback = RED.actions.get(opt.onselect); - } - if (callback) { - callback.call(opt,args); - } else { - console.log("No callback for",id,opt.onselect); - } - } - - function isSelected(id) { - return $("#" + id).hasClass("active"); - } - - function setSelected(id,state) { - if (isSelected(id) == state) { - return; - } - var opt = menuItems[id]; - if (state) { - $("#"+id).addClass("active"); - } else { - $("#"+id).removeClass("active"); - } - if (opt && opt.onselect) { - triggerAction(opt.id,state); - } - RED.settings.set(opt.setting||("menu-"+opt.id), state); - } - - function toggleSelected(id) { - setSelected(id,!isSelected(id)); - } - - function setDisabled(id,state) { - if (state) { - $("#"+id).parent().addClass("disabled"); - } else { - $("#"+id).parent().removeClass("disabled"); - } - } - - function addItem(id,opt) { - var item = createMenuItem(opt); - if (opt.group) { - var groupItems = $("#"+id+"-submenu").children(".menu-group-"+opt.group); - if (groupItems.length === 0) { - item.appendTo("#"+id+"-submenu"); - } else { - for (var i=0;i<groupItems.length;i++) { - var groupItem = groupItems[i]; - var label = $(groupItem).find(".menu-label").html(); - if (opt.label < label) { - $(groupItem).before(item); - break; - } - } - if (i === groupItems.length) { - item.appendTo("#"+id+"-submenu"); - } - } - } else { - item.appendTo("#"+id+"-submenu"); - } - } - function removeItem(id) { - $("#"+id).parent().remove(); - } - - function setAction(id,action) { - var opt = menuItems[id]; - if (opt) { - opt.onselect = action; - } - } - - return { - init: createMenu, - setSelected: setSelected, - isSelected: isSelected, - toggleSelected: toggleSelected, - setDisabled: setDisabled, - addItem: addItem, - removeItem: removeItem, - setAction: setAction - //TODO: add an api for replacing a submenu - see library.js:loadFlowLibrary - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - - -RED.panels = (function() { - - function createPanel(options) { - var container = options.container || $("#"+options.id); - var children = container.children(); - if (children.length !== 2) { - throw new Error("Container must have exactly two children"); - } - - container.addClass("red-ui-panels"); - var separator = $('<div class="red-ui-panels-separator"></div>').insertAfter(children[0]); - var startPosition; - var panelHeights = []; - var modifiedHeights = false; - var panelRatio; - - separator.draggable({ - axis: "y", - containment: container, - scroll: false, - start:function(event,ui) { - var height = container.height(); - startPosition = ui.position.top; - panelHeights = [$(children[0]).height(),$(children[1]).height()]; - }, - drag: function(event,ui) { - var height = container.height(); - var delta = ui.position.top-startPosition; - var newHeights = [panelHeights[0]+delta,panelHeights[1]-delta]; - $(children[0]).height(newHeights[0]); - $(children[1]).height(newHeights[1]); - if (options.resize) { - options.resize(newHeights[0],newHeights[1]); - } - ui.position.top -= delta; - panelRatio = newHeights[0]/height; - }, - stop:function(event,ui) { - modifiedHeights = true; - } - }); - - return { - resize: function(height) { - var panelHeights = [$(children[0]).height(),$(children[1]).height()]; - container.height(height); - if (modifiedHeights) { - var topPanelHeight = panelRatio*height; - var bottomPanelHeight = height - topPanelHeight - 48; - panelHeights = [topPanelHeight,bottomPanelHeight]; - $(children[0]).height(panelHeights[0]); - $(children[1]).height(panelHeights[1]); - } - if (options.resize) { - options.resize(panelHeights[0],panelHeights[1]); - } - } - } - } - - return { - create: createPanel - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.popover = (function() { - var deltaSizes = { - "default": { - top: 10, - leftRight: 17, - leftLeft: 25, - leftBottom: 8, - }, - "small": { - top: 5, - leftRight: 17, - leftLeft: 16, - leftBottom: 3, - } - } - function createPopover(options) { - var target = options.target; - var direction = options.direction || "right"; - var trigger = options.trigger; - var content = options.content; - var delay = options.delay; - var autoClose = options.autoClose; - var width = options.width||"auto"; - var size = options.size||"default"; - if (!deltaSizes[size]) { - throw new Error("Invalid RED.popover size value:",size); - } - - var timer = null; - var active; - var div; - - var openPopup = function(instant) { - if (active) { - div = $('<div class="red-ui-popover red-ui-popover-'+direction+'"></div>'); - if (size !== "default") { - div.addClass("red-ui-popover-size-"+size); - } - if (typeof content === 'function') { - var result = content.call(res); - if (result === null) { - return; - } - if (typeof result === 'string') { - div.text(result); - } else { - div.append(result); - } - } else { - div.html(content); - } - if (width !== "auto") { - div.width(width); - } - div.appendTo("body"); - - var targetPos = target.offset(); - var targetWidth = target.outerWidth(); - var targetHeight = target.outerHeight(); - var divHeight = div.height(); - var divWidth = div.width(); - if (direction === 'right') { - div.css({top: targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top,left:targetPos.left+targetWidth+deltaSizes[size].leftRight}); - } else if (direction === 'left') { - div.css({top: targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top,left:targetPos.left-deltaSizes[size].leftLeft-divWidth}); - } else if (direction === 'bottom') { - div.css({top: targetPos.top+targetHeight+deltaSizes[size].top,left:targetPos.left+targetWidth/2-divWidth/2 - deltaSizes[size].leftBottom}); - } - if (instant) { - div.show(); - } else { - div.fadeIn("fast"); - } - } - } - var closePopup = function(instant) { - if (!active) { - if (div) { - if (instant) { - $(this).remove(); - } else { - div.fadeOut("fast",function() { - $(this).remove(); - }); - } - div = null; - } - } - } - - if (trigger === 'hover') { - target.on('mouseenter',function(e) { - clearTimeout(timer); - active = true; - timer = setTimeout(openPopup,delay.show); - }); - target.on('mouseleave', function(e) { - if (timer) { - clearTimeout(timer); - } - active = false; - setTimeout(closePopup,delay.hide); - }); - } else if (trigger === 'click') { - target.click(function(e) { - e.preventDefault(); - e.stopPropagation(); - active = !active; - if (!active) { - closePopup(); - } else { - openPopup(); - } - }); - } else if (autoClose) { - setTimeout(function() { - active = false; - closePopup(); - },autoClose); - } - var res = { - setContent: function(_content) { - content = _content; - return res; - }, - open: function (instant) { - active = true; - openPopup(instant); - return res; - }, - close: function (instant) { - active = false; - closePopup(instant); - return res; - } - } - return res; - - } - - return { - create: createPopover, - tooltip: function(target,content) { - RED.popover.create({ - target:target, - trigger: "hover", - size: "small", - direction: "bottom", - content: content, - delay: { show: 550, hide: 10 } - }); - } - } - -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -(function($) { - - $.widget( "nodered.searchBox", { - _create: function() { - var that = this; - - this.currentTimeout = null; - this.lastSent = ""; - this.element.val(""); - this.uiContainer = this.element.wrap("<div>").parent(); - this.uiContainer.addClass("red-ui-searchBox-container"); - - $('<i class="fa fa-search"></i>').prependTo(this.uiContainer); - this.clearButton = $('<a href="#"><i class="fa fa-times"></i></a>').appendTo(this.uiContainer); - this.clearButton.on("click",function(e) { - e.preventDefault(); - that.element.val(""); - that._change("",true); - that.element.focus(); - }); - - this.resultCount = $('<span>',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer); - - this.element.val(""); - this.element.on("keydown",function(evt) { - if (evt.keyCode === 27) { - that.element.val(""); - } - }) - this.element.on("keyup",function(evt) { - that._change($(this).val()); - }); - - this.element.on("focus",function() { - $("body").one("mousedown",function() { - that.element.blur(); - }); - }); - - }, - _change: function(val,instant) { - var fireEvent = false; - if (val === "") { - this.clearButton.hide(); - fireEvent = true; - } else { - this.clearButton.show(); - fireEvent = (val.length >= (this.options.minimumLength||0)); - } - var current = this.element.val(); - fireEvent = fireEvent && current !== this.lastSent; - if (fireEvent) { - if (!instant && this.options.delay > 0) { - clearTimeout(this.currentTimeout); - var that = this; - this.currentTimeout = setTimeout(function() { - that.lastSent = that.element.val(); - that._trigger("change"); - },this.options.delay); - } else { - this._trigger("change"); - } - } - }, - value: function(val) { - if (val === undefined) { - return this.element.val(); - } else { - this.element.val(val); - this._change(val); - } - }, - count: function(val) { - if (val === undefined || val === null || val === "") { - this.resultCount.text("").hide(); - } else { - this.resultCount.text(val).show(); - } - }, - change: function() { - this._trigger("change"); - } - }); -})(jQuery); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - - - -RED.tabs = (function() { - - var defaultTabIcon = "fa fa-lemon-o"; - - function createTabs(options) { - var tabs = {}; - var pinnedTabsCount = 0; - var currentTabWidth; - var currentActiveTabWidth = 0; - var collapsibleMenu; - - var ul = options.element || $("#"+options.id); - var wrapper = ul.wrap( "<div>" ).parent(); - var scrollContainer = ul.wrap( "<div>" ).parent(); - wrapper.addClass("red-ui-tabs"); - if (options.vertical) { - wrapper.addClass("red-ui-tabs-vertical"); - } - if (options.addButton && typeof options.addButton === 'function') { - wrapper.addClass("red-ui-tabs-add"); - var addButton = $('<div class="red-ui-tab-button"><a href="#"><i class="fa fa-plus"></i></a></div>').appendTo(wrapper); - addButton.find('a').click(function(evt) { - evt.preventDefault(); - options.addButton(); - }) - - } - var scrollLeft; - var scrollRight; - - if (options.scrollable) { - wrapper.addClass("red-ui-tabs-scrollable"); - scrollContainer.addClass("red-ui-tabs-scroll-container"); - scrollContainer.scroll(updateScroll); - scrollLeft = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a"); - scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();}); - scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a"); - scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,'+=150') }).on('click',function(evt){ evt.preventDefault();}); - } - - if (options.collapsible) { - // var dropDown = $('<div>',{class:"red-ui-tabs-select"}).appendTo(wrapper); - // ul.hide(); - wrapper.addClass("red-ui-tabs-collapsible"); - - var collapsedButtonsRow = $('<div class="red-ui-tab-link-buttons"></div>').appendTo(wrapper); - - var selectButton = $('<a href="#"><i class="fa fa-caret-down"></i></a>').appendTo(collapsedButtonsRow); - selectButton.addClass("red-ui-tab-link-button-menu") - selectButton.click(function(evt) { - evt.preventDefault(); - if (!collapsibleMenu) { - var pinnedOptions = []; - var options = []; - ul.children().each(function(i,el) { - var id = $(el).data('tabId'); - var opt = { - id:"red-ui-tabs-menu-option-"+id, - icon: tabs[id].iconClass || defaultTabIcon, - label: tabs[id].name, - onselect: function() { - activateTab(id); - } - }; - if (tabs[id].pinned) { - pinnedOptions.push(opt); - } else { - options.push(opt); - } - }); - options = pinnedOptions.concat(options); - collapsibleMenu = RED.menu.init({id:"debug-message-option-menu",options: options}); - collapsibleMenu.css({ - position: "absolute" - }) - collapsibleMenu.on('mouseleave', function(){ $(this).hide() }); - collapsibleMenu.on('mouseup', function() { $(this).hide() }); - collapsibleMenu.appendTo("body"); - } - var elementPos = selectButton.offset(); - collapsibleMenu.css({ - top: (elementPos.top+selectButton.height()-20)+"px", - left: (elementPos.left - collapsibleMenu.width() + selectButton.width())+"px" - }) - collapsibleMenu.toggle(); - }) - - } - - function scrollEventHandler(evt,dir) { - evt.preventDefault(); - if ($(this).hasClass('disabled')) { - return; - } - var currentScrollLeft = scrollContainer.scrollLeft(); - scrollContainer.animate( { scrollLeft: dir }, 100); - var interval = setInterval(function() { - var newScrollLeft = scrollContainer.scrollLeft() - if (newScrollLeft === currentScrollLeft) { - clearInterval(interval); - return; - } - currentScrollLeft = newScrollLeft; - scrollContainer.animate( { scrollLeft: dir }, 100); - },100); - $(this).one('mouseup',function() { - clearInterval(interval); - }) - } - - - ul.children().first().addClass("active"); - ul.children().addClass("red-ui-tab"); - - function onTabClick() { - if (options.onclick) { - options.onclick(tabs[$(this).attr('href').slice(1)]); - } - activateTab($(this)); - return false; - } - - function updateScroll() { - if (ul.children().length !== 0) { - var sl = scrollContainer.scrollLeft(); - var scWidth = scrollContainer.width(); - var ulWidth = ul.width(); - if (sl === 0) { - scrollLeft.hide(); - } else { - scrollLeft.show(); - } - if (sl === ulWidth-scWidth) { - scrollRight.hide(); - } else { - scrollRight.show(); - } - } - } - function onTabDblClick() { - if (options.ondblclick) { - options.ondblclick(tabs[$(this).attr('href').slice(1)]); - } - return false; - } - - function activateTab(link) { - if (typeof link === "string") { - link = ul.find("a[href='#"+link+"']"); - } - if (link.length === 0) { - return; - } - if (!link.parent().hasClass("active")) { - ul.children().removeClass("active"); - ul.children().css({"transition": "width 100ms"}); - link.parent().addClass("active"); - var parentId = link.parent().attr('id'); - wrapper.find(".red-ui-tab-link-button").removeClass("active selected"); - $("#"+parentId+"-link-button").addClass("active selected"); - if (options.scrollable) { - var pos = link.parent().position().left; - if (pos-21 < 0) { - scrollContainer.animate( { scrollLeft: '+='+(pos-50) }, 300); - } else if (pos + 120 > scrollContainer.width()) { - scrollContainer.animate( { scrollLeft: '+='+(pos + 140-scrollContainer.width()) }, 300); - } - } - if (options.onchange) { - options.onchange(tabs[link.attr('href').slice(1)]); - } - updateTabWidths(); - setTimeout(function() { - ul.children().css({"transition": ""}); - },100); - } - } - function activatePreviousTab() { - var previous = ul.find("li.active").prev(); - if (previous.length > 0) { - activateTab(previous.find("a")); - } - } - function activateNextTab() { - var next = ul.find("li.active").next(); - if (next.length > 0) { - activateTab(next.find("a")); - } - } - - function updateTabWidths() { - if (options.vertical) { - return; - } - var tabs = ul.find("li.red-ui-tab"); - var width = wrapper.width(); - var tabCount = tabs.size(); - var tabWidth; - - if (options.collapsible) { - tabWidth = width - collapsedButtonsRow.width()-10; - if (tabWidth < 198) { - var delta = 198 - tabWidth; - var b = collapsedButtonsRow.find("a:last").prev(); - while (b.is(":not(:visible)")) { - b = b.prev(); - } - if (!b.hasClass("red-ui-tab-link-button-pinned")) { - b.hide(); - } - tabWidth = width - collapsedButtonsRow.width()-10; - } else { - var space = width - 198 - collapsedButtonsRow.width(); - if (space > 40) { - collapsedButtonsRow.find("a:not(:visible):first").show(); - tabWidth = width - collapsedButtonsRow.width()-10; - } - } - tabs.css({width:tabWidth}); - - } else { - var tabWidth = (width-12-(tabCount*6))/tabCount; - currentTabWidth = (100*tabWidth/width)+"%"; - currentActiveTabWidth = currentTabWidth+"%"; - if (options.scrollable) { - tabWidth = Math.max(tabWidth,140); - currentTabWidth = tabWidth+"px"; - currentActiveTabWidth = 0; - var listWidth = Math.max(wrapper.width(),12+(tabWidth+6)*tabCount); - ul.width(listWidth); - updateScroll(); - } else if (options.hasOwnProperty("minimumActiveTabWidth")) { - if (tabWidth < options.minimumActiveTabWidth) { - tabCount -= 1; - tabWidth = (width-12-options.minimumActiveTabWidth-(tabCount*6))/tabCount; - currentTabWidth = (100*tabWidth/width)+"%"; - currentActiveTabWidth = options.minimumActiveTabWidth+"px"; - } else { - currentActiveTabWidth = 0; - } - } - if (options.collapsible) { - console.log(currentTabWidth); - } - - tabs.css({width:currentTabWidth}); - if (tabWidth < 50) { - ul.find(".red-ui-tab-close").hide(); - ul.find(".red-ui-tab-icon").hide(); - ul.find(".red-ui-tab-label").css({paddingLeft:Math.min(12,Math.max(0,tabWidth-38))+"px"}) - } else { - ul.find(".red-ui-tab-close").show(); - ul.find(".red-ui-tab-icon").show(); - ul.find(".red-ui-tab-label").css({paddingLeft:""}) - } - if (currentActiveTabWidth !== 0) { - ul.find("li.red-ui-tab.active").css({"width":options.minimumActiveTabWidth}); - ul.find("li.red-ui-tab.active .red-ui-tab-close").show(); - ul.find("li.red-ui-tab.active .red-ui-tab-icon").show(); - ul.find("li.red-ui-tab.active .red-ui-tab-label").css({paddingLeft:""}) - } - } - - } - - ul.find("li.red-ui-tab a").on("click",onTabClick).on("dblclick",onTabDblClick); - setTimeout(function() { - updateTabWidths(); - },0); - - - function removeTab(id) { - var li = ul.find("a[href='#"+id+"']").parent(); - if (li.hasClass("active")) { - var tab = li.prev(); - if (tab.size() === 0) { - tab = li.next(); - } - activateTab(tab.find("a")); - } - li.remove(); - if (tabs[id].pinned) { - pinnedTabsCount--; - } - if (options.onremove) { - options.onremove(tabs[id]); - } - delete tabs[id]; - updateTabWidths(); - collapsibleMenu = null; - } - - return { - addTab: function(tab) { - tabs[tab.id] = tab; - var li = $("<li/>",{class:"red-ui-tab"}).appendTo(ul); - li.attr('id',"red-ui-tab-"+(tab.id.replace(".","-"))); - li.data("tabId",tab.id); - - if (options.maximumTabWidth) { - li.css("maxWidth",options.maximumTabWidth+"px"); - } - var link = $("<a/>",{href:"#"+tab.id, class:"red-ui-tab-label"}).appendTo(li); - if (tab.icon) { - $('<img src="'+tab.icon+'" class="red-ui-tab-icon"/>').appendTo(link); - } else if (tab.iconClass) { - $('<i>',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link); - } - var span = $('<span/>',{class:"bidiAware"}).text(tab.label).appendTo(link); - span.attr('dir', RED.text.bidi.resolveBaseTextDir(tab.label)); - if (options.collapsible) { - li.addClass("red-ui-tab-pinned"); - var pinnedLink = $('<a href="#'+tab.id+'" class="red-ui-tab-link-button"></a>'); - if (tab.pinned) { - if (pinnedTabsCount === 0) { - pinnedLink.prependTo(collapsedButtonsRow) - } else { - pinnedLink.insertAfter(collapsedButtonsRow.find("a.red-ui-tab-link-button-pinned:last")); - } - } else { - pinnedLink.insertBefore(collapsedButtonsRow.find("a:last")); - } - - pinnedLink.attr('id',li.attr('id')+"-link-button"); - if (tab.iconClass) { - $('<i>',{class:tab.iconClass}).appendTo(pinnedLink); - } else { - $('<i>',{class:defaultTabIcon}).appendTo(pinnedLink); - } - pinnedLink.click(function(evt) { - evt.preventDefault(); - activateTab(tab.id); - }); - if (tab.pinned) { - pinnedLink.addClass("red-ui-tab-link-button-pinned"); - pinnedTabsCount++; - } - RED.popover.tooltip($(pinnedLink), tab.name); - - } - link.on("click",onTabClick); - link.on("dblclick",onTabDblClick); - if (tab.closeable) { - var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close"}).appendTo(li); - closeLink.append('<i class="fa fa-times" />'); - - closeLink.on("click",function(event) { - event.preventDefault(); - removeTab(tab.id); - }); - } - if (options.onadd) { - options.onadd(tab); - } - link.attr("title",tab.label); - if (ul.find("li.red-ui-tab").size() == 1) { - activateTab(link); - } - if (options.onreorder) { - var originalTabOrder; - var tabDragIndex; - var tabElements = []; - var startDragIndex; - - li.draggable({ - axis:"x", - distance: 20, - start: function(event,ui) { - originalTabOrder = []; - tabElements = []; - ul.children().each(function(i) { - tabElements[i] = { - el:$(this), - text: $(this).text(), - left: $(this).position().left, - width: $(this).width() - }; - if ($(this).is(li)) { - tabDragIndex = i; - startDragIndex = i; - } - originalTabOrder.push($(this).data("tabId")); - }); - ul.children().each(function(i) { - if (i!==tabDragIndex) { - $(this).css({ - position: 'absolute', - left: tabElements[i].left+"px", - width: tabElements[i].width+2, - transition: "left 0.3s" - }); - } - - }) - if (!li.hasClass('active')) { - li.css({'zIndex':1}); - } - }, - drag: function(event,ui) { - ui.position.left += tabElements[tabDragIndex].left+scrollContainer.scrollLeft(); - var tabCenter = ui.position.left + tabElements[tabDragIndex].width/2 - scrollContainer.scrollLeft(); - for (var i=0;i<tabElements.length;i++) { - if (i === tabDragIndex) { - continue; - } - if (tabCenter > tabElements[i].left && tabCenter < tabElements[i].left+tabElements[i].width) { - if (i < tabDragIndex) { - tabElements[i].left += tabElements[tabDragIndex].width+8; - tabElements[tabDragIndex].el.detach().insertBefore(tabElements[i].el); - } else { - tabElements[i].left -= tabElements[tabDragIndex].width+8; - tabElements[tabDragIndex].el.detach().insertAfter(tabElements[i].el); - } - tabElements[i].el.css({left:tabElements[i].left+"px"}); - - tabElements.splice(i, 0, tabElements.splice(tabDragIndex, 1)[0]); - - tabDragIndex = i; - break; - } - } - }, - stop: function(event,ui) { - ul.children().css({position:"relative",left:"",transition:""}); - if (!li.hasClass('active')) { - li.css({zIndex:""}); - } - updateTabWidths(); - if (startDragIndex !== tabDragIndex) { - options.onreorder(originalTabOrder, $.makeArray(ul.children().map(function() { return $(this).data('tabId');}))); - } - activateTab(tabElements[tabDragIndex].el.data('tabId')); - } - }) - } - setTimeout(function() { - updateTabWidths(); - },10); - collapsibleMenu = null; - }, - removeTab: removeTab, - activateTab: activateTab, - nextTab: activateNextTab, - previousTab: activatePreviousTab, - resize: updateTabWidths, - count: function() { - return ul.find("li.red-ui-tab").size(); - }, - contains: function(id) { - return ul.find("a[href='#"+id+"']").length > 0; - }, - renameTab: function(id,label) { - tabs[id].label = label; - var tab = ul.find("a[href='#"+id+"']"); - tab.attr("title",label); - tab.find("span.bidiAware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label)); - updateTabWidths(); - }, - order: function(order) { - var existingTabOrder = $.makeArray(ul.children().map(function() { return $(this).data('tabId');})); - if (existingTabOrder.length !== order.length) { - return - } - var i; - var match = true; - for (i=0;i<order.length;i++) { - if (order[i] !== existingTabOrder[i]) { - match = false; - break; - } - } - if (match) { - return; - } - var existingTabMap = {}; - var existingTabs = ul.children().detach().each(function() { - existingTabMap[$(this).data("tabId")] = $(this); - }); - for (i=0;i<order.length;i++) { - existingTabMap[order[i]].appendTo(ul); - } - } - - } - } - - return { - create: createTabs - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.stack = (function() { - function createStack(options) { - var container = options.container; - container.addClass("red-ui-stack"); - var contentHeight = 0; - var entries = []; - - var visible = true; - // TODO: make this a singleton function - and watch out for stacks no longer - // in the DOM - var resizeStack = function() { - if (entries.length > 0) { - var headerHeight = 0; - entries.forEach(function(entry) { - headerHeight += entry.header.outerHeight(); - }); - - var height = container.innerHeight(); - contentHeight = height - headerHeight - (entries.length-1); - entries.forEach(function(e) { - e.contentWrap.height(contentHeight); - }); - } - } - if (options.fill && options.singleExpanded) { - $(window).resize(resizeStack); - $(window).focus(resizeStack); - } - return { - add: function(entry) { - entries.push(entry); - entry.container = $('<div class="palette-category">').appendTo(container); - if (!visible) { - entry.container.hide(); - } - var header = $('<div class="palette-header"></div>').appendTo(entry.container); - entry.header = header; - entry.contentWrap = $('<div></div>',{style:"position:relative"}).appendTo(entry.container); - if (options.fill) { - entry.contentWrap.css("height",contentHeight); - } - entry.content = $('<div></div>').appendTo(entry.contentWrap); - if (entry.collapsible !== false) { - header.click(function() { - if (options.singleExpanded) { - if (!entry.isExpanded()) { - for (var i=0;i<entries.length;i++) { - if (entries[i].isExpanded()) { - entries[i].collapse(); - } - } - entry.expand(); - } - } else { - entry.toggle(); - } - }); - var icon = $('<i class="fa fa-angle-down"></i>').appendTo(header); - - if (entry.expanded) { - entry.container.addClass("palette-category-expanded"); - icon.addClass("expanded"); - } else { - entry.contentWrap.hide(); - } - } else { - $('<i style="opacity: 0.5;" class="fa fa-angle-down expanded"></i>').appendTo(header); - header.css("cursor","default"); - } - entry.title = $('<span></span>').html(entry.title).appendTo(header); - - - - entry.toggle = function() { - if (entry.isExpanded()) { - entry.collapse(); - return false; - } else { - entry.expand(); - return true; - } - }; - entry.expand = function() { - if (!entry.isExpanded()) { - if (entry.onexpand) { - entry.onexpand.call(entry); - } - if (options.singleExpanded) { - entries.forEach(function(e) { - if (e !== entry) { - e.collapse(); - } - }) - } - - icon.addClass("expanded"); - entry.container.addClass("palette-category-expanded"); - entry.contentWrap.slideDown(200); - return true; - } - }; - entry.collapse = function() { - if (entry.isExpanded()) { - icon.removeClass("expanded"); - entry.container.removeClass("palette-category-expanded"); - entry.contentWrap.slideUp(200); - return true; - } - }; - entry.isExpanded = function() { - return entry.container.hasClass("palette-category-expanded"); - }; - if (options.fill && options.singleExpanded) { - resizeStack(); - } - return entry; - }, - - hide: function() { - visible = false; - entries.forEach(function(entry) { - entry.container.hide(); - }); - return this; - }, - - show: function() { - visible = true; - entries.forEach(function(entry) { - entry.container.show(); - }); - return this; - }, - resize: function() { - if (resizeStack) { - resizeStack(); - } - } - } - } - - return { - create: createStack - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -(function($) { - var contextParse = function(v) { - var parts = RED.utils.parseContextKey(v); - return { - option: parts.store, - value: parts.key - } - } - var contextExport = function(v,opt) { - if (!opt) { - return v; - } - var store = ((typeof opt === "string")?opt:opt.value) - if (store !== RED.settings.context.default) { - return "#:("+store+")::"+v; - } else { - return v; - } - } - var allOptions = { - msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression}, - flow: {value:"flow",label:"flow.",hasValue:true, - options:[], - validate:RED.utils.validatePropertyExpression, - parse: contextParse, - export: contextExport - }, - global: {value:"global",label:"global.",hasValue:true, - options:[], - validate:RED.utils.validatePropertyExpression, - parse: contextParse, - export: contextExport - }, - str: {value:"str",label:"string",icon:"red/images/typedInput/az.png"}, - num: {value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, - bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]}, - json: { - value:"json", - label:"JSON", - icon:"red/images/typedInput/json.png", - validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}}, - expand: function() { - var that = this; - var value = this.value(); - try { - value = JSON.stringify(JSON.parse(value),null,4); - } catch(err) { - } - RED.editor.editJSON({ - value: value, - complete: function(v) { - var value = v; - try { - value = JSON.stringify(JSON.parse(v)); - } catch(err) { - } - that.value(value); - } - }) - } - }, - re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"}, - date: {value:"date",label:"timestamp",hasValue:false}, - jsonata: { - value: "jsonata", - label: "expression", - icon: "red/images/typedInput/expr.png", - validate: function(v) { try{jsonata(v);return true;}catch(e){return false;}}, - expand:function() { - var that = this; - RED.editor.editExpression({ - value: this.value().replace(/\t/g,"\n"), - complete: function(v) { - that.value(v.replace(/\n/g,"\t")); - } - }) - } - }, - bin: { - value: "bin", - label: "buffer", - icon: "red/images/typedInput/bin.png", - expand: function() { - var that = this; - RED.editor.editBuffer({ - value: this.value(), - complete: function(v) { - that.value(v); - } - }) - } - }, - env: { - value: "env", - label: "env variable", - icon: "red/images/typedInput/env.png" - } - }; - var nlsd = false; - - $.widget( "nodered.typedInput", { - _create: function() { - try { - if (!nlsd && RED && RED._) { - for (var i in allOptions) { - if (allOptions.hasOwnProperty(i)) { - allOptions[i].label = RED._("typedInput.type."+i,{defaultValue:allOptions[i].label}); - } - } - var contextStores = RED.settings.context.stores; - var contextOptions = contextStores.map(function(store) { - return {value:store,label: store, icon:'<i class="red-ui-typedInput-icon fa fa-database" style="color: #'+(store==='memory'?'ddd':'777')+'"></i>'} - }) - if (contextOptions.length < 2) { - allOptions.flow.options = []; - allOptions.global.options = []; - } else { - allOptions.flow.options = contextOptions; - allOptions.global.options = contextOptions; - } - } - nlsd = true; - var that = this; - - this.disarmClick = false; - this.input = $('<input type="text"></input>'); - this.input.insertAfter(this.element); - this.input.val(this.element.val()); - this.element.addClass('red-ui-typedInput'); - this.uiWidth = this.element.outerWidth(); - this.elementDiv = this.input.wrap("<div>").parent().addClass('red-ui-typedInput-input'); - this.uiSelect = this.elementDiv.wrap( "<div>" ).parent(); - var attrStyle = this.element.attr('style'); - var m; - if ((m = /width\s*:\s*(calc\s*\(.*\)|\d+(%|px))/i.exec(attrStyle)) !== null) { - this.input.css('width','100%'); - this.uiSelect.width(m[1]); - this.uiWidth = null; - } else { - this.uiSelect.width(this.uiWidth); - } - ["Right","Left"].forEach(function(d) { - var m = that.element.css("margin"+d); - that.uiSelect.css("margin"+d,m); - that.input.css("margin"+d,0); - }); - - this.uiSelect.addClass("red-ui-typedInput-container"); - - this.element.attr('type','hidden'); - - this.options.types = this.options.types||Object.keys(allOptions); - - this.selectTrigger = $('<button tabindex="0"></button>').prependTo(this.uiSelect); - $('<i class="red-ui-typedInput-icon fa fa-sort-desc"></i>').toggle(this.options.types.length > 1).appendTo(this.selectTrigger); - - this.selectLabel = $('<span class="red-ui-typedInput-type-label"></span>').appendTo(this.selectTrigger); - - this.types(this.options.types); - - if (this.options.typeField) { - this.typeField = $(this.options.typeField).hide(); - var t = this.typeField.val(); - if (t && this.typeMap[t]) { - this.options.default = t; - } - } else { - this.typeField = $("<input>",{type:'hidden'}).appendTo(this.uiSelect); - } - - this.input.on('focus', function() { - that.uiSelect.addClass('red-ui-typedInput-focus'); - }); - this.input.on('blur', function() { - that.uiSelect.removeClass('red-ui-typedInput-focus'); - }); - this.input.on('change', function() { - that.validate(); - that.element.val(that.value()); - that.element.trigger('change',that.propertyType,that.value()); - }) - this.selectTrigger.click(function(event) { - event.preventDefault(); - that._showTypeMenu(); - }); - this.selectTrigger.on('keydown',function(evt) { - if (evt.keyCode === 40) { - // Down - that._showTypeMenu(); - } - }).on('focus', function() { - that.uiSelect.addClass('red-ui-typedInput-focus'); - }) - - // explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline' - this.optionSelectTrigger = $('<button tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-sort-desc"></i></span></button>').appendTo(this.uiSelect); - this.optionSelectLabel = $('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger); - RED.popover.tooltip(this.optionSelectLabel,function() { - return that.optionValue; - }); - this.optionSelectTrigger.click(function(event) { - event.preventDefault(); - that._showOptionSelectMenu(); - }).on('keydown', function(evt) { - if (evt.keyCode === 40) { - // Down - that._showOptionSelectMenu(); - } - }).on('blur', function() { - that.uiSelect.removeClass('red-ui-typedInput-focus'); - }).on('focus', function() { - that.uiSelect.addClass('red-ui-typedInput-focus'); - }); - - this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"><i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i></button>').appendTo(this.uiSelect); - this.type(this.options.default||this.typeList[0].value); - }catch(err) { - console.log(err.stack); - } - }, - _showTypeMenu: function() { - if (this.typeList.length > 1) { - this._showMenu(this.menu,this.selectTrigger); - this.menu.find("[value='"+this.propertyType+"']").focus(); - } else { - this.input.focus(); - } - }, - _showOptionSelectMenu: function() { - if (this.optionMenu) { - this.optionMenu.css({ - minWidth:this.optionSelectLabel.width() - }); - - this._showMenu(this.optionMenu,this.optionSelectTrigger); - var selectedOption = this.optionMenu.find("[value='"+this.optionValue+"']"); - if (selectedOption.length === 0) { - selectedOption = this.optionMenu.children(":first"); - } - selectedOption.focus(); - - } - }, - _hideMenu: function(menu) { - $(document).off("mousedown.close-property-select"); - menu.hide(); - if (this.elementDiv.is(":visible")) { - this.input.focus(); - } else if (this.optionSelectTrigger.is(":visible")){ - this.optionSelectTrigger.focus(); - } else { - this.selectTrigger.focus(); - } - }, - _createMenu: function(opts,callback) { - var that = this; - var menu = $("<div>").addClass("red-ui-typedInput-options"); - opts.forEach(function(opt) { - if (typeof opt === 'string') { - opt = {value:opt,label:opt}; - } - var op = $('<a href="#"></a>').attr("value",opt.value).appendTo(menu); - if (opt.label) { - op.text(opt.label); - } - if (opt.icon) { - if (opt.icon.indexOf("<") === 0) { - $(opt.icon).prependTo(op); - } else if (opt.icon.indexOf("/") !== -1) { - $('<img>',{src:opt.icon,style:"margin-right: 4px; height: 18px;"}).prependTo(op); - } else { - $('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op); - } - } else { - op.css({paddingLeft: "18px"}); - } - if (!opt.icon && !opt.label) { - op.text(opt.value); - } - - op.click(function(event) { - event.preventDefault(); - callback(opt.value); - that._hideMenu(menu); - }); - }); - menu.css({ - display: "none", - }); - menu.appendTo(document.body); - - menu.on('keydown', function(evt) { - if (evt.keyCode === 40) { - // DOWN - $(this).children(":focus").next().focus(); - } else if (evt.keyCode === 38) { - // UP - $(this).children(":focus").prev().focus(); - } else if (evt.keyCode === 27) { - that._hideMenu(menu); - } - }) - - - - return menu; - - }, - _showMenu: function(menu,relativeTo) { - if (this.disarmClick) { - this.disarmClick = false; - return - } - var that = this; - var pos = relativeTo.offset(); - var height = relativeTo.height(); - var menuHeight = menu.height(); - var top = (height+pos.top-3); - if (top+menuHeight > $(window).height()) { - top -= (top+menuHeight)-$(window).height()+5; - } - menu.css({ - top: top+"px", - left: (2+pos.left)+"px", - }); - menu.slideDown(100); - this._delay(function() { - that.uiSelect.addClass('red-ui-typedInput-focus'); - $(document).on("mousedown.close-property-select", function(event) { - if(!$(event.target).closest(menu).length) { - that._hideMenu(menu); - } - if ($(event.target).closest(relativeTo).length) { - that.disarmClick = true; - event.preventDefault(); - } - }) - }); - }, - _getLabelWidth: function(label) { - var labelWidth = label.outerWidth(); - if (labelWidth === 0) { - var container = $('<div class="red-ui-typedInput-container"></div>').css({ - position:"absolute", - top:0, - left:-1000 - }).appendTo(document.body); - var newTrigger = label.clone().appendTo(container); - labelWidth = newTrigger.outerWidth(); - container.remove(); - } - return labelWidth; - }, - _resize: function() { - if (this.uiWidth !== null) { - this.uiSelect.width(this.uiWidth); - } - var type = this.typeMap[this.propertyType]; - if (type && type.hasValue === false) { - this.selectTrigger.addClass("red-ui-typedInput-full-width"); - } else { - this.selectTrigger.removeClass("red-ui-typedInput-full-width"); - var labelWidth = this._getLabelWidth(this.selectTrigger); - this.elementDiv.css('left',labelWidth+"px"); - if (this.optionExpandButton.is(":visible")) { - this.elementDiv.css('right',"22px"); - } else { - this.elementDiv.css('right','0'); - this.input.css({ - 'border-top-right-radius': '4px', - 'border-bottom-right-radius': '4px' - }); - } - - // if (this.optionSelectTrigger) { - // this.optionSelectTrigger.css({'left':(labelWidth)+"px",'width':'calc( 100% - '+labelWidth+'px )'}); - // } - - if (this.optionSelectTrigger) { - if (type && type.options && type.hasValue === true) { - this.optionSelectLabel.css({'left':'auto'}) - var lw = this._getLabelWidth(this.optionSelectLabel); - this.optionSelectTrigger.css({'width':(23+lw)+"px"}); - this.elementDiv.css('right',(23+lw)+"px"); - this.input.css({ - 'border-top-right-radius': 0, - 'border-bottom-right-radius': 0 - }); - } else { - this.optionSelectLabel.css({'left':'0'}) - this.optionSelectTrigger.css({'width':'calc( 100% - '+labelWidth+'px )'}); - if (!this.optionExpandButton.is(":visible")) { - this.elementDiv.css({'right':0}); - this.input.css({ - 'border-top-right-radius': '4px', - 'border-bottom-right-radius': '4px' - }); - } - } - } - } - }, - _updateOptionSelectLabel: function(o) { - var opt = this.typeMap[this.propertyType]; - this.optionSelectLabel.empty(); - if (o.icon) { - if (o.icon.indexOf("<") === 0) { - $(o.icon).prependTo(this.optionSelectLabel); - } else if (o.icon.indexOf("/") !== -1) { - // url - $('<img>',{src:o.icon,style:"height: 18px;"}).prependTo(this.optionSelectLabel); - } else { - // icon class - $('<i>',{class:"red-ui-typedInput-icon "+o.icon}).prependTo(this.optionSelectLabel); - } - } else if (o.label) { - this.optionSelectLabel.text(o.label); - } else { - this.optionSelectLabel.text(o.value); - } - if (opt.hasValue) { - this.optionValue = o.value; - this._resize(); - this.input.trigger('change',this.propertyType,this.value()); - } - }, - _destroy: function() { - if (this.optionMenu) { - this.optionMenu.remove(); - } - this.menu.remove(); - }, - types: function(types) { - var that = this; - var currentType = this.type(); - this.typeMap = {}; - this.typeList = types.map(function(opt) { - var result; - if (typeof opt === 'string') { - result = allOptions[opt]; - } else { - result = opt; - } - that.typeMap[result.value] = result; - return result; - }); - this.selectTrigger.toggleClass("disabled", this.typeList.length === 1); - this.selectTrigger.find(".fa-sort-desc").toggle(this.typeList.length > 1) - if (this.menu) { - this.menu.remove(); - } - this.menu = this._createMenu(this.typeList, function(v) { that.type(v) }); - if (currentType && !this.typeMap.hasOwnProperty(currentType)) { - this.type(this.typeList[0].value); - } else { - this.propertyType = null; - this.type(currentType); - } - setTimeout(function() {that._resize();},0); - }, - width: function(desiredWidth) { - this.uiWidth = desiredWidth; - this._resize(); - }, - value: function(value) { - if (!arguments.length) { - var v = this.input.val(); - if (this.typeMap[this.propertyType].export) { - v = this.typeMap[this.propertyType].export(v,this.optionValue) - } - return v; - } else { - var selectedOption; - if (this.typeMap[this.propertyType].options) { - for (var i=0;i<this.typeMap[this.propertyType].options.length;i++) { - var op = this.typeMap[this.propertyType].options[i]; - if (typeof op === "string") { - if (op === value) { - selectedOption = this.activeOptions[op]; - break; - } - } else if (op.value === value) { - selectedOption = op; - break; - } - } - if (!selectedOption) { - selectedOption = {value:""} - } - this._updateOptionSelectLabel(selectedOption) - } - this.input.val(value); - this.input.trigger('change',this.type(),value); - } - }, - type: function(type) { - if (!arguments.length) { - return this.propertyType; - } else { - var that = this; - var opt = this.typeMap[type]; - if (opt && this.propertyType !== type) { - this.propertyType = type; - if (this.typeField) { - this.typeField.val(type); - } - this.selectLabel.empty(); - var image; - if (opt.icon) { - image = new Image(); - image.name = opt.icon; - image.src = opt.icon; - $('<img>',{src:opt.icon,style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel); - } else { - this.selectLabel.text(opt.label); - } - if (opt.options) { - if (this.optionExpandButton) { - this.optionExpandButton.hide(); - } - if (this.optionSelectTrigger) { - this.optionSelectTrigger.show(); - if (!opt.hasValue) { - this.elementDiv.hide(); - } else { - this.elementDiv.show(); - } - this.activeOptions = {}; - opt.options.forEach(function(o) { - if (typeof o === 'string') { - that.activeOptions[o] = {label:o,value:o}; - } else { - that.activeOptions[o.value] = o; - } - }); - - if (!that.activeOptions.hasOwnProperty(that.optionValue)) { - that.optionValue = null; - } - this.optionMenu = this._createMenu(opt.options,function(v){ - that._updateOptionSelectLabel(that.activeOptions[v]); - if (!opt.hasValue) { - that.value(that.activeOptions[v].value) - } - }); - var op; - if (!opt.hasValue) { - var currentVal = this.input.val(); - var validValue = false; - for (var i=0;i<opt.options.length;i++) { - op = opt.options[i]; - if (typeof op === "string" && op === currentVal) { - that._updateOptionSelectLabel({value:currentVal}); - validValue = true; - break; - } else if (op.value === currentVal) { - that._updateOptionSelectLabel(op); - validValue = true; - break; - } - } - if (!validValue) { - op = opt.options[0]; - if (typeof op === "string") { - this.value(op); - that._updateOptionSelectLabel({value:op}); - } else { - this.value(op.value); - that._updateOptionSelectLabel(op); - } - } - } else { - var selectedOption = this.optionValue||opt.options[0]; - if (opt.parse) { - var parts = opt.parse(this.input.val()); - if (parts.option) { - selectedOption = parts.option; - if (!this.activeOptions.hasOwnProperty(selectedOption)) { - parts.option = Object.keys(this.activeOptions)[0]; - selectedOption = parts.option - } - } - this.input.val(parts.value); - if (opt.export) { - this.element.val(opt.export(parts.value,parts.option||selectedOption)); - } - } - if (typeof selectedOption === "string") { - this.optionValue = selectedOption; - if (!this.activeOptions.hasOwnProperty(selectedOption)) { - selectedOption = Object.keys(this.activeOptions)[0]; - } - if (!selectedOption) { - this.optionSelectTrigger.hide(); - } else { - this._updateOptionSelectLabel(this.activeOptions[selectedOption]); - } - } else if (selectedOption) { - this.optionValue = selectedOption.value; - this._updateOptionSelectLabel(selectedOption); - } else { - this.optionSelectTrigger.hide(); - } - } - } - } else { - if (this.optionMenu) { - this.optionMenu.remove(); - this.optionMenu = null; - } - if (this.optionSelectTrigger) { - this.optionSelectTrigger.hide(); - } - if (opt.hasValue === false) { - this.oldValue = this.input.val(); - this.input.val(""); - this.elementDiv.hide(); - } else { - if (this.oldValue !== undefined) { - this.input.val(this.oldValue); - delete this.oldValue; - } - this.elementDiv.show(); - } - if (this.optionExpandButton) { - if (opt.expand && typeof opt.expand === 'function') { - this.optionExpandButton.show(); - this.optionExpandButton.off('click'); - this.optionExpandButton.on('click',function(evt) { - evt.preventDefault(); - opt.expand.call(that); - }) - } else { - this.optionExpandButton.hide(); - } - } - this.input.trigger('change',this.propertyType,this.value()); - } - if (image) { - image.onload = function() { that._resize(); } - image.onerror = function() { that._resize(); } - } else { - this._resize(); - } - } - } - }, - validate: function() { - var result; - var value = this.value(); - var type = this.type(); - if (this.typeMap[type] && this.typeMap[type].validate) { - var val = this.typeMap[type].validate; - if (typeof val === 'function') { - result = val(value); - } else { - result = val.test(value); - } - } else { - result = true; - } - if (result) { - this.uiSelect.removeClass('input-error'); - } else { - this.uiSelect.addClass('input-error'); - } - return result; - }, - show: function() { - this.uiSelect.show(); - this._resize(); - }, - hide: function() { - this.uiSelect.hide(); - } - }); -})(jQuery); -;RED.actions = (function() { - var actions = { - - } - - function addAction(name,handler) { - actions[name] = handler; - } - function removeAction(name) { - delete actions[name]; - } - function getAction(name) { - return actions[name]; - } - function invokeAction(name) { - if (actions.hasOwnProperty(name)) { - actions[name](); - } - } - function listActions() { - var result = []; - Object.keys(actions).forEach(function(action) { - var shortcut = RED.keyboard.getShortcut(action); - result.push({id:action,scope:shortcut?shortcut.scope:undefined,key:shortcut?shortcut.key:undefined,user:shortcut?shortcut.user:undefined}) - }) - return result; - } - return { - add: addAction, - remove: removeAction, - get: getAction, - invoke: invokeAction, - list: listActions - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.deploy = (function() { - - var deploymentTypes = { - "full":{img:"red/images/deploy-full-o.png"}, - "nodes":{img:"red/images/deploy-nodes-o.png"}, - "flows":{img:"red/images/deploy-flows-o.png"} - } - - var ignoreDeployWarnings = { - unknown: false, - unusedConfig: false, - invalid: false - } - - var deploymentType = "full"; - - var deployInflight = false; - - var currentDiff = null; - - function changeDeploymentType(type) { - deploymentType = type; - $("#btn-deploy-icon").attr("src",deploymentTypes[type].img); - } - - /** - * options: - * type: "default" - Button with drop-down options - no further customisation available - * type: "simple" - Button without dropdown. Customisations: - * label: the text to display - default: "Deploy" - * icon : the icon to use. Null removes the icon. default: "red/images/deploy-full-o.png" - */ - function init(options) { - options = options || {}; - var type = options.type || "default"; - - if (type == "default") { - $('<li><span class="deploy-button-group button-group">'+ - '<a id="btn-deploy" class="deploy-button disabled" href="#">'+ - '<span class="deploy-button-content">'+ - '<img id="btn-deploy-icon" src="red/images/deploy-full-o.png"> '+ - '<span>'+RED._("deploy.deploy")+'</span>'+ - '</span>'+ - '<span class="deploy-button-spinner hide">'+ - '<img src="red/images/spin.svg"/>'+ - '</span>'+ - '</a>'+ - '<a id="btn-deploy-options" data-toggle="dropdown" class="deploy-button" href="#"><i class="fa fa-caret-down"></i></a>'+ - '</span></li>').prependTo(".header-toolbar"); - RED.menu.init({id:"btn-deploy-options", - options: [ - {id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}}, - {id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}}, - {id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.png",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}} - ] - }); - } else if (type == "simple") { - var label = options.label || RED._("deploy.deploy"); - var icon = 'red/images/deploy-full-o.png'; - if (options.hasOwnProperty('icon')) { - icon = options.icon; - } - - $('<li><span class="deploy-button-group button-group">'+ - '<a id="btn-deploy" class="deploy-button disabled" href="#">'+ - '<span class="deploy-button-content">'+ - (icon?'<img id="btn-deploy-icon" src="'+icon+'"> ':'')+ - '<span>'+label+'</span>'+ - '</span>'+ - '<span class="deploy-button-spinner hide">'+ - '<img src="red/images/spin.svg"/>'+ - '</span>'+ - '</a>'+ - '</span></li>').prependTo(".header-toolbar"); - } - - $('#btn-deploy').click(function(event) { - event.preventDefault(); - save(); - }); - - RED.actions.add("core:deploy-flows",save); - - - RED.events.on('nodes:change',function(state) { - if (state.dirty) { - window.onbeforeunload = function() { - return RED._("deploy.confirm.undeployedChanges"); - } - $("#btn-deploy").removeClass("disabled"); - } else { - window.onbeforeunload = null; - $("#btn-deploy").addClass("disabled"); - } - }); - - var activeNotifyMessage; - RED.comms.subscribe("notification/runtime-deploy",function(topic,msg) { - if (!activeNotifyMessage) { - var currentRev = RED.nodes.version(); - if (currentRev === null || deployInflight || currentRev === msg.revision) { - return; - } - var message = $('<p>').text(RED._('deploy.confirm.backgroundUpdate')); - activeNotifyMessage = RED.notify(message,{ - modal: true, - fixed: true, - buttons: [ - { - text: RED._('deploy.confirm.button.ignore'), - click: function() { - activeNotifyMessage.close(); - activeNotifyMessage = null; - } - }, - { - text: RED._('deploy.confirm.button.review'), - class: "primary", - click: function() { - activeNotifyMessage.close(); - var nns = RED.nodes.createCompleteNodeSet(); - resolveConflict(nns,false); - activeNotifyMessage = null; - } - } - ] - }); - } - }); - } - - function getNodeInfo(node) { - var tabLabel = ""; - if (node.z) { - var tab = RED.nodes.workspace(node.z); - if (!tab) { - tab = RED.nodes.subflow(node.z); - tabLabel = tab.name; - } else { - tabLabel = tab.label; - } - } - var label = RED.utils.getNodeLabel(node,node.id); - return {tab:tabLabel,type:node.type,label:label}; - } - function sortNodeInfo(A,B) { - if (A.tab < B.tab) { return -1;} - if (A.tab > B.tab) { return 1;} - if (A.type < B.type) { return -1;} - if (A.type > B.type) { return 1;} - if (A.name < B.name) { return -1;} - if (A.name > B.name) { return 1;} - return 0; - } - - function resolveConflict(currentNodes, activeDeploy) { - var message = $('<div>'); - $('<p data-i18n="deploy.confirm.conflict"></p>').appendTo(message); - var conflictCheck = $('<div id="node-dialog-confirm-deploy-conflict-checking" class="node-dialog-confirm-conflict-row">'+ - '<img src="red/images/spin.svg"/><div data-i18n="deploy.confirm.conflictChecking"></div>'+ - '</div>').appendTo(message); - var conflictAutoMerge = $('<div class="node-dialog-confirm-conflict-row">'+ - '<i style="color: #3a3;" class="fa fa-check"></i><div data-i18n="deploy.confirm.conflictAutoMerge"></div>'+ - '</div>').hide().appendTo(message); - var conflictManualMerge = $('<div id="node-dialog-confirm-deploy-conflict-manual-merge" class="node-dialog-confirm-conflict-row">'+ - '<i style="color: #999;" class="fa fa-exclamation"></i><div data-i18n="deploy.confirm.conflictManualMerge"></div>'+ - '</div>').hide().appendTo(message); - - message.i18n(); - currentDiff = null; - var buttons = [ - { - text: RED._("common.label.cancel"), - click: function() { - conflictNotification.close(); - } - }, - { - id: "node-dialog-confirm-deploy-review", - text: RED._("deploy.confirm.button.review"), - class: "primary disabled", - click: function() { - if (!$("#node-dialog-confirm-deploy-review").hasClass('disabled')) { - RED.diff.showRemoteDiff(); - conflictNotification.close(); - } - } - }, - { - id: "node-dialog-confirm-deploy-merge", - text: RED._("deploy.confirm.button.merge"), - class: "primary disabled", - click: function() { - if (!$("#node-dialog-confirm-deploy-merge").hasClass('disabled')) { - RED.diff.mergeDiff(currentDiff); - conflictNotification.close(); - } - } - } - ]; - if (activeDeploy) { - buttons.push({ - id: "node-dialog-confirm-deploy-overwrite", - text: RED._("deploy.confirm.button.overwrite"), - class: "primary", - click: function() { - save(true,activeDeploy); - conflictNotification.close(); - } - }) - } - var conflictNotification = RED.notify(message,{ - modal: true, - fixed: true, - width: 600, - buttons: buttons - }); - - var now = Date.now(); - RED.diff.getRemoteDiff(function(diff) { - var ellapsed = Math.max(1000 - (Date.now()-now), 0); - currentDiff = diff; - setTimeout(function() { - conflictCheck.hide(); - var d = Object.keys(diff.conflicts); - if (d.length === 0) { - conflictAutoMerge.show(); - $("#node-dialog-confirm-deploy-merge").removeClass('disabled') - } else { - conflictManualMerge.show(); - } - $("#node-dialog-confirm-deploy-review").removeClass('disabled') - },ellapsed); - }) - } - function cropList(list) { - if (list.length > 5) { - var remainder = list.length - 5; - list = list.slice(0,5); - list.push(RED._("deploy.confirm.plusNMore",{count:remainder})); - } - return list; - } - function save(skipValidation,force) { - if (!$("#btn-deploy").hasClass("disabled")) { - if (!RED.user.hasPermission("flows.write")) { - RED.notify(RED._("user.errors.deploy"),"error"); - return; - } - if (!skipValidation) { - var hasUnknown = false; - var hasInvalid = false; - var hasUnusedConfig = false; - - var unknownNodes = []; - var invalidNodes = []; - - RED.nodes.eachNode(function(node) { - hasInvalid = hasInvalid || !node.valid; - if (!node.valid) { - invalidNodes.push(getNodeInfo(node)); - } - if (node.type === "unknown") { - if (unknownNodes.indexOf(node.name) == -1) { - unknownNodes.push(node.name); - } - } - }); - hasUnknown = unknownNodes.length > 0; - - var unusedConfigNodes = []; - RED.nodes.eachConfig(function(node) { - if (node.users.length === 0 && (node._def.hasUsers !== false)) { - unusedConfigNodes.push(getNodeInfo(node)); - hasUnusedConfig = true; - } - }); - - var showWarning = false; - var notificationMessage; - var notificationButtons = []; - var notification; - if (hasUnknown && !ignoreDeployWarnings.unknown) { - showWarning = true; - notificationMessage = "<p>"+RED._('deploy.confirm.unknown')+"</p>"+ - '<ul class="node-dialog-configm-deploy-list"><li>'+cropList(unknownNodes).join("</li><li>")+"</li></ul><p>"+ - RED._('deploy.confirm.confirm')+ - "</p>"; - - notificationButtons= [ - { - id: "node-dialog-confirm-deploy-deploy", - text: RED._("deploy.confirm.button.confirm"), - class: "primary", - click: function() { - save(true); - notification.close(); - } - } - ]; - } else if (hasInvalid && !ignoreDeployWarnings.invalid) { - showWarning = true; - invalidNodes.sort(sortNodeInfo); - - notificationMessage = "<p>"+RED._('deploy.confirm.improperlyConfigured')+"</p>"+ - '<ul class="node-dialog-configm-deploy-list"><li>'+cropList(invalidNodes.map(function(A) { return (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")"})).join("</li><li>")+"</li></ul><p>"+ - RED._('deploy.confirm.confirm')+ - "</p>"; - notificationButtons= [ - { - id: "node-dialog-confirm-deploy-deploy", - text: RED._("deploy.confirm.button.confirm"), - class: "primary", - click: function() { - save(true); - notification.close(); - } - } - ]; - } - if (showWarning) { - notificationButtons.unshift( - { - text: RED._("common.label.cancel"), - click: function() { - notification.close(); - } - } - ); - notification = RED.notify(notificationMessage,{ - modal: true, - fixed: true, - buttons:notificationButtons - }); - return; - } - } - - var nns = RED.nodes.createCompleteNodeSet(); - - var startTime = Date.now(); - $(".deploy-button-content").css('opacity',0); - $(".deploy-button-spinner").show(); - $("#btn-deploy").addClass("disabled"); - - var data = {flows:nns}; - - if (!force) { - data.rev = RED.nodes.version(); - } - - deployInflight = true; - $("#header-shade").show(); - $("#editor-shade").show(); - $("#palette-shade").show(); - $("#sidebar-shade").show(); - $.ajax({ - url:"flows", - type: "POST", - data: JSON.stringify(data), - contentType: "application/json; charset=utf-8", - headers: { - "Node-RED-Deployment-Type":deploymentType - } - }).done(function(data,textStatus,xhr) { - RED.nodes.dirty(false); - RED.nodes.version(data.rev); - RED.nodes.originalFlow(nns); - if (hasUnusedConfig) { - RED.notify( - '<p>'+RED._("deploy.successfulDeploy")+'</p>'+ - '<p>'+RED._("deploy.unusedConfigNodes")+' <a href="#" onclick="RED.sidebar.config.show(true); return false;">'+RED._("deploy.unusedConfigNodesLink")+'</a></p>',"success",false,6000); - } else { - RED.notify('<p>'+RED._("deploy.successfulDeploy")+'</p>',"success"); - } - RED.nodes.eachNode(function(node) { - if (node.changed) { - node.dirty = true; - node.changed = false; - } - if (node.moved) { - node.dirty = true; - node.moved = false; - } - if(node.credentials) { - delete node.credentials; - } - }); - RED.nodes.eachConfig(function (confNode) { - confNode.changed = false; - if (confNode.credentials) { - delete confNode.credentials; - } - }); - RED.nodes.eachSubflow(function(subflow) { - subflow.changed = false; - }); - RED.nodes.eachWorkspace(function(ws) { - ws.changed = false; - }); - // Once deployed, cannot undo back to a clean state - RED.history.markAllDirty(); - RED.view.redraw(); - RED.events.emit("deploy"); - }).fail(function(xhr,textStatus,err) { - RED.nodes.dirty(true); - $("#btn-deploy").removeClass("disabled"); - if (xhr.status === 401) { - RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error"); - } else if (xhr.status === 409) { - resolveConflict(nns, true); - } else if (xhr.responseText) { - RED.notify(RED._("deploy.deployFailed",{message:xhr.responseText}),"error"); - } else { - RED.notify(RED._("deploy.deployFailed",{message:RED._("deploy.errors.noResponse")}),"error"); - } - }).always(function() { - deployInflight = false; - var delta = Math.max(0,300-(Date.now()-startTime)); - setTimeout(function() { - $(".deploy-button-content").css('opacity',1); - $(".deploy-button-spinner").hide(); - $("#header-shade").hide(); - $("#editor-shade").hide(); - $("#palette-shade").hide(); - $("#sidebar-shade").hide(); - },delta); - }); - } - } - return { - init: init, - setDeployInflight: function(state) { - deployInflight = state; - } - - } -})(); -;RED.diff = (function() { - - var currentDiff = {}; - var diffVisible = false; - var diffList; - - function init() { - - // RED.actions.add("core:show-current-diff",showLocalDiff); - RED.actions.add("core:show-remote-diff",showRemoteDiff); - // RED.keyboard.add("*","ctrl-shift-l","core:show-current-diff"); - // RED.keyboard.add("*","ctrl-shift-r","core:show-remote-diff"); - - - // RED.actions.add("core:show-test-flow-diff-1",function(){showTestFlowDiff(1)}); - // RED.keyboard.add("*","ctrl-shift-f 1","core:show-test-flow-diff-1"); - // - // RED.actions.add("core:show-test-flow-diff-2",function(){showTestFlowDiff(2)}); - // RED.keyboard.add("*","ctrl-shift-f 2","core:show-test-flow-diff-2"); - // RED.actions.add("core:show-test-flow-diff-3",function(){showTestFlowDiff(3)}); - // RED.keyboard.add("*","ctrl-shift-f 3","core:show-test-flow-diff-3"); - - } - function createDiffTable(container,CurrentDiff) { - var diffList = $('<ol class="node-dialog-view-diff-diff"></ol>').appendTo(container); - diffList.editableList({ - addButton: false, - height: "auto", - scrollOnAdd: false, - addItem: function(container,i,object) { - var localDiff = object.diff; - var remoteDiff = object.remoteDiff; - var tab = object.tab.n; - var def = object.def; - var conflicts = CurrentDiff.conflicts; - - var tabDiv = $('<div>',{class:"node-diff-tab"}).appendTo(container); - tabDiv.addClass('collapsed'); - var titleRow = $('<div>',{class:"node-diff-tab-title"}).appendTo(tabDiv); - var nodesDiv = $('<div>').appendTo(tabDiv); - var originalCell = $('<div>',{class:"node-diff-node-entry-cell"}).appendTo(titleRow); - var localCell = $('<div>',{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(titleRow); - var remoteCell; - var selectState; - - if (remoteDiff) { - remoteCell = $('<div>',{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(titleRow); - } - $('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(originalCell); - createNodeIcon(tab,def).appendTo(originalCell); - var tabForLabel = (object.newTab || object.tab).n; - var titleSpan = $('<span>',{class:"node-diff-tab-title-meta"}).appendTo(originalCell); - if (tabForLabel.type === 'tab') { - titleSpan.text(tabForLabel.label||tabForLabel.id); - } else if (tab.type === 'subflow') { - titleSpan.text((tabForLabel.name||tabForLabel.id)); - } else { - titleSpan.text(RED._("diff.globalNodes")); - } - var flowStats = { - local: { - addedCount:0, - deletedCount:0, - changedCount:0, - unchangedCount: 0 - }, - remote: { - addedCount:0, - deletedCount:0, - changedCount:0, - unchangedCount: 0 - }, - conflicts: 0 - } - if (object.newTab || object.remoteTab) { - var localTabNode = { - node: localDiff.newConfig.all[tab.id], - all: localDiff.newConfig.all, - diff: localDiff - } - var remoteTabNode; - if (remoteDiff) { - remoteTabNode = { - node:remoteDiff.newConfig.all[tab.id]||null, - all: remoteDiff.newConfig.all, - diff: remoteDiff - } - } - if (tab.type !== undefined) { - var div = $("<div>",{class:"node-diff-node-entry node-diff-node-props collapsed"}).appendTo(nodesDiv); - var row = $("<div>",{class:"node-diff-node-entry-header"}).appendTo(div); - var originalNodeDiv = $("<div>",{class:"node-diff-node-entry-cell"}).appendTo(row); - var localNodeDiv = $("<div>",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(row); - var localChanged = false; - var remoteChanged = false; - - if (!localDiff.newConfig.all[tab.id]) { - localNodeDiv.addClass("node-diff-empty"); - } else if (localDiff.added[tab.id]) { - localNodeDiv.addClass("node-diff-node-added"); - localChanged = true; - $('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(localNodeDiv); - } else if (localDiff.changed[tab.id]) { - localNodeDiv.addClass("node-diff-node-changed"); - localChanged = true; - $('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(localNodeDiv); - } else { - localNodeDiv.addClass("node-diff-node-unchanged"); - $('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(localNodeDiv); - } - - var remoteNodeDiv; - if (remoteDiff) { - remoteNodeDiv = $("<div>",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(row); - if (!remoteDiff.newConfig.all[tab.id]) { - remoteNodeDiv.addClass("node-diff-empty"); - if (remoteDiff.deleted[tab.id]) { - remoteChanged = true; - } - } else if (remoteDiff.added[tab.id]) { - remoteNodeDiv.addClass("node-diff-node-added"); - remoteChanged = true; - $('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(remoteNodeDiv); - } else if (remoteDiff.changed[tab.id]) { - remoteNodeDiv.addClass("node-diff-node-changed"); - remoteChanged = true; - $('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(remoteNodeDiv); - } else { - remoteNodeDiv.addClass("node-diff-node-unchanged"); - $('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(remoteNodeDiv); - } - } - $('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(originalNodeDiv); - $('<span>').text(RED._("diff.flowProperties")).appendTo(originalNodeDiv); - - row.click(function(evt) { - evt.preventDefault(); - $(this).parent().toggleClass('collapsed'); - }); - - createNodePropertiesTable(def,tab,localTabNode,remoteTabNode,conflicts).appendTo(div); - selectState = ""; - if (conflicts[tab.id]) { - flowStats.conflicts++; - - if (!localNodeDiv.hasClass("node-diff-empty")) { - $('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(localNodeDiv); - } - if (!remoteNodeDiv.hasClass("node-diff-empty")) { - $('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(remoteNodeDiv); - } - div.addClass("node-diff-node-entry-conflict"); - } else { - selectState = CurrentDiff.resolutions[tab.id]; - } - // Tab properties row - createNodeConflictRadioBoxes(tab,div,localNodeDiv,remoteNodeDiv,true,!conflicts[tab.id],selectState,CurrentDiff); - } - } - // var stats = $('<span>',{class:"node-diff-tab-stats"}).appendTo(titleRow); - var localNodeCount = 0; - var remoteNodeCount = 0; - var seen = {}; - object.tab.nodes.forEach(function(node) { - seen[node.id] = true; - createNodeDiffRow(node,flowStats,CurrentDiff).appendTo(nodesDiv) - }); - if (object.newTab) { - localNodeCount = object.newTab.nodes.length; - object.newTab.nodes.forEach(function(node) { - if (!seen[node.id]) { - seen[node.id] = true; - createNodeDiffRow(node,flowStats,CurrentDiff).appendTo(nodesDiv) - } - }); - } - if (object.remoteTab) { - remoteNodeCount = object.remoteTab.nodes.length; - object.remoteTab.nodes.forEach(function(node) { - if (!seen[node.id]) { - createNodeDiffRow(node,flowStats,CurrentDiff).appendTo(nodesDiv) - } - }); - } - titleRow.click(function(evt) { - // if (titleRow.parent().find(".node-diff-node-entry:not(.hide)").length > 0) { - titleRow.parent().toggleClass('collapsed'); - if ($(this).parent().hasClass('collapsed')) { - $(this).parent().find('.node-diff-node-entry').addClass('collapsed'); - $(this).parent().find('.debug-message-element').addClass('collapsed'); - } - // } - }) - - if (localDiff.deleted[tab.id]) { - $('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.flowDeleted"></span></span></span>').appendTo(localCell); - } else if (object.newTab) { - if (localDiff.added[tab.id]) { - $('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.flowAdded"></span></span></span>').appendTo(localCell); - } else { - if (tab.id) { - if (localDiff.changed[tab.id]) { - flowStats.local.changedCount++; - } else { - flowStats.local.unchangedCount++; - } - } - var localStats = $('<span>',{class:"node-diff-tab-stats"}).appendTo(localCell); - $('<span class="node-diff-status"></span>').text(RED._('diff.nodeCount',{count:localNodeCount})).appendTo(localStats); - - if (flowStats.conflicts + flowStats.local.addedCount + flowStats.local.changedCount + flowStats.local.deletedCount > 0) { - $('<span class="node-diff-status"> [ </span>').appendTo(localStats); - if (flowStats.conflicts > 0) { - $('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i> '+flowStats.conflicts+'</span></span>').appendTo(localStats); - } - if (flowStats.local.addedCount > 0) { - $('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> '+flowStats.local.addedCount+'</span></span>').appendTo(localStats); - } - if (flowStats.local.changedCount > 0) { - $('<span class="node-diff-node-changed"><span class="node-diff-status"><i class="fa fa-square"></i> '+flowStats.local.changedCount+'</span></span>').appendTo(localStats); - } - if (flowStats.local.deletedCount > 0) { - $('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> '+flowStats.local.deletedCount+'</span></span>').appendTo(localStats); - } - $('<span class="node-diff-status"> ] </span>').appendTo(localStats); - } - - } - } else { - localCell.addClass("node-diff-empty"); - } - - if (remoteDiff) { - if (remoteDiff.deleted[tab.id]) { - $('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.flowDeleted"></span></span></span>').appendTo(remoteCell); - } else if (object.remoteTab) { - if (remoteDiff.added[tab.id]) { - $('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.flowAdded"></span></span></span>').appendTo(remoteCell); - } else { - if (tab.id) { - if (remoteDiff.changed[tab.id]) { - flowStats.remote.changedCount++; - } else { - flowStats.remote.unchangedCount++; - } - } - var remoteStats = $('<span>',{class:"node-diff-tab-stats"}).appendTo(remoteCell); - $('<span class="node-diff-status"></span>').text(RED._('diff.nodeCount',{count:remoteNodeCount})).appendTo(remoteStats); - if (flowStats.conflicts + flowStats.remote.addedCount + flowStats.remote.changedCount + flowStats.remote.deletedCount > 0) { - $('<span class="node-diff-status"> [ </span>').appendTo(remoteStats); - if (flowStats.conflicts > 0) { - $('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i> '+flowStats.conflicts+'</span></span>').appendTo(remoteStats); - } - if (flowStats.remote.addedCount > 0) { - $('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> '+flowStats.remote.addedCount+'</span></span>').appendTo(remoteStats); - } - if (flowStats.remote.changedCount > 0) { - $('<span class="node-diff-node-changed"><span class="node-diff-status"><i class="fa fa-square"></i> '+flowStats.remote.changedCount+'</span></span>').appendTo(remoteStats); - } - if (flowStats.remote.deletedCount > 0) { - $('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> '+flowStats.remote.deletedCount+'</span></span>').appendTo(remoteStats); - } - $('<span class="node-diff-status"> ] </span>').appendTo(remoteStats); - } - } - } else { - remoteCell.addClass("node-diff-empty"); - } - selectState = ""; - if (flowStats.conflicts > 0) { - titleRow.addClass("node-diff-node-entry-conflict"); - } else { - selectState = CurrentDiff.resolutions[tab.id]; - } - if (tab.id) { - var hide = !(flowStats.conflicts > 0 &&(localDiff.deleted[tab.id] || remoteDiff.deleted[tab.id])); - // Tab parent row - createNodeConflictRadioBoxes(tab,titleRow,localCell,remoteCell, false, hide, selectState, CurrentDiff); - } - } - - if (tabDiv.find(".node-diff-node-entry").length === 0) { - tabDiv.addClass("node-diff-tab-empty"); - } - container.i18n(); - } - }); - return diffList; - } - function buildDiffPanel(container,diff,options) { - var diffPanel = $('<div class="node-dialog-view-diff-panel"></div>').appendTo(container); - var diffHeaders = $('<div class="node-dialog-view-diff-headers"></div>').appendTo(diffPanel); - if (options.mode === "merge") { - diffPanel.addClass("node-dialog-view-diff-panel-merge"); - } - var diffList = createDiffTable(diffPanel, diff); - - var localDiff = diff.localDiff; - var remoteDiff = diff.remoteDiff; - var conflicts = diff.conflicts; - - var currentConfig = localDiff.currentConfig; - var newConfig = localDiff.newConfig; - - - if (remoteDiff !== undefined) { - diffPanel.addClass('node-diff-three-way'); - var localTitle = options.oldRevTitle || RED._('diff.local'); - var remoteTitle = options.newRevTitle || RED._('diff.remote'); - $('<div></div>').text(localTitle).appendTo(diffHeaders); - $('<div></div>').text(remoteTitle).appendTo(diffHeaders); - } else { - diffPanel.removeClass('node-diff-three-way'); - } - - return { - list: diffList, - finish: function() { - var el = { - diff: localDiff, - def: { - category: 'config', - color: '#f0f0f0' - }, - tab: { - n: {}, - nodes: currentConfig.globals - }, - newTab: { - n: {}, - nodes: newConfig.globals - } - }; - if (remoteDiff !== undefined) { - el.remoteTab = { - n:{}, - nodes:remoteDiff.newConfig.globals - }; - el.remoteDiff = remoteDiff; - } - diffList.editableList('addItem',el); - - var seenTabs = {}; - - currentConfig.tabOrder.forEach(function(tabId) { - var tab = currentConfig.tabs[tabId]; - var el = { - diff: localDiff, - def: RED.nodes.getType('tab'), - tab:tab - }; - if (newConfig.tabs.hasOwnProperty(tabId)) { - el.newTab = newConfig.tabs[tabId]; - } - if (remoteDiff !== undefined) { - el.remoteTab = remoteDiff.newConfig.tabs[tabId]; - el.remoteDiff = remoteDiff; - } - seenTabs[tabId] = true; - diffList.editableList('addItem',el) - }); - newConfig.tabOrder.forEach(function(tabId) { - if (!seenTabs[tabId]) { - seenTabs[tabId] = true; - var tab = newConfig.tabs[tabId]; - var el = { - diff: localDiff, - def: RED.nodes.getType('tab'), - tab:tab, - newTab: tab - }; - if (remoteDiff !== undefined) { - el.remoteDiff = remoteDiff; - } - diffList.editableList('addItem',el) - } - }); - if (remoteDiff !== undefined) { - remoteDiff.newConfig.tabOrder.forEach(function(tabId) { - if (!seenTabs[tabId]) { - var tab = remoteDiff.newConfig.tabs[tabId]; - // TODO how to recognise this is a remotely added flow - var el = { - diff: localDiff, - remoteDiff: remoteDiff, - def: RED.nodes.getType('tab'), - tab:tab, - remoteTab:tab - }; - diffList.editableList('addItem',el) - } - }); - } - var subflowId; - for (subflowId in currentConfig.subflows) { - if (currentConfig.subflows.hasOwnProperty(subflowId)) { - seenTabs[subflowId] = true; - el = { - diff: localDiff, - def: { - defaults:{}, - icon:"subflow.png", - category: "subflows", - color: "#da9" - }, - tab:currentConfig.subflows[subflowId] - } - if (newConfig.subflows.hasOwnProperty(subflowId)) { - el.newTab = newConfig.subflows[subflowId]; - } - if (remoteDiff !== undefined) { - el.remoteTab = remoteDiff.newConfig.subflows[subflowId]; - el.remoteDiff = remoteDiff; - } - diffList.editableList('addItem',el) - } - } - for (subflowId in newConfig.subflows) { - if (newConfig.subflows.hasOwnProperty(subflowId) && !seenTabs[subflowId]) { - seenTabs[subflowId] = true; - el = { - diff: localDiff, - def: { - defaults:{}, - icon:"subflow.png", - category: "subflows", - color: "#da9" - }, - tab:newConfig.subflows[subflowId], - newTab:newConfig.subflows[subflowId] - } - if (remoteDiff !== undefined) { - el.remoteDiff = remoteDiff; - } - diffList.editableList('addItem',el) - } - } - if (remoteDiff !== undefined) { - for (subflowId in remoteDiff.newConfig.subflows) { - if (remoteDiff.newConfig.subflows.hasOwnProperty(subflowId) && !seenTabs[subflowId]) { - el = { - diff: localDiff, - remoteDiff: remoteDiff, - def: { - defaults:{}, - icon:"subflow.png", - category: "subflows", - color: "#da9" - }, - tab:remoteDiff.newConfig.subflows[subflowId], - remoteTab: remoteDiff.newConfig.subflows[subflowId] - } - diffList.editableList('addItem',el) - } - } - } - } - }; - } - function formatWireProperty(wires,allNodes) { - var result = $("<div>",{class:"node-diff-property-wires"}) - var list = $("<ol></ol>"); - var c = 0; - wires.forEach(function(p,i) { - var port = $("<li>").appendTo(list); - if (p && p.length > 0) { - $("<span>").text(i+1).appendTo(port); - var links = $("<ul>").appendTo(port); - p.forEach(function(d) { - c++; - var entry = $("<li>").appendTo(links); - var node = allNodes[d]; - if (node) { - var def = RED.nodes.getType(node.type)||{}; - createNode(node,def).appendTo(entry); - } else { - entry.text(d); - } - }) - } else { - port.text('none'); - } - }) - if (c === 0) { - result.text("none"); - } else { - list.appendTo(result); - } - return result; - } - function createNodeIcon(node,def) { - var nodeDiv = $("<div>",{class:"node-diff-node-entry-node"}); - var colour = RED.utils.getNodeColor(node.type,def); - var icon_url = RED.utils.getNodeIcon(def,node); - if (node.type === 'tab') { - colour = "#C0DEED"; - } - nodeDiv.css('backgroundColor',colour); - - var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); - $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); - - return nodeDiv; - } - function createNode(node,def) { - var nodeTitleDiv = $("<div>",{class:"node-diff-node-entry-title"}) - createNodeIcon(node,def).appendTo(nodeTitleDiv); - var contentDiv = $('<div>',{class:"node-diff-node-description"}).appendTo(nodeTitleDiv); - var nodeLabel = node.label || node.name || node.id; - $('<span>',{class:"node-diff-node-label"}).text(nodeLabel).appendTo(contentDiv); - return nodeTitleDiv; - } - function createNodeDiffRow(node,stats,CurrentDiff) { - var localDiff = CurrentDiff.localDiff; - var remoteDiff = CurrentDiff.remoteDiff; - var conflicted = CurrentDiff.conflicts[node.id]; - - var hasChanges = false; // exists in original and local/remote but with changes - var unChanged = true; // existing in original,local,remote unchanged - var localChanged = false; - - if (localDiff.added[node.id]) { - stats.local.addedCount++; - unChanged = false; - } - if (remoteDiff && remoteDiff.added[node.id]) { - stats.remote.addedCount++; - unChanged = false; - } - if (localDiff.deleted[node.id]) { - stats.local.deletedCount++; - unChanged = false; - } - if (remoteDiff && remoteDiff.deleted[node.id]) { - stats.remote.deletedCount++; - unChanged = false; - } - if (localDiff.changed[node.id]) { - stats.local.changedCount++; - hasChanges = true; - unChanged = false; - } - if (remoteDiff && remoteDiff.changed[node.id]) { - stats.remote.changedCount++; - hasChanges = true; - unChanged = false; - } - // console.log(node.id,localDiff.added[node.id],remoteDiff.added[node.id],localDiff.deleted[node.id],remoteDiff.deleted[node.id],localDiff.changed[node.id],remoteDiff.changed[node.id]) - var def = RED.nodes.getType(node.type); - if (def === undefined) { - if (/^subflow:/.test(node.type)) { - def = { - icon:"subflow.png", - category: "subflows", - color: "#da9", - defaults:{name:{value:""}} - } - } else { - def = {}; - } - } - var div = $("<div>",{class:"node-diff-node-entry collapsed"}); - var row = $("<div>",{class:"node-diff-node-entry-header"}).appendTo(div); - - var originalNodeDiv = $("<div>",{class:"node-diff-node-entry-cell"}).appendTo(row); - var localNodeDiv = $("<div>",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(row); - var remoteNodeDiv; - var chevron; - if (remoteDiff) { - remoteNodeDiv = $("<div>",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(row); - } - $('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(originalNodeDiv); - - if (unChanged) { - stats.local.unchangedCount++; - createNode(node,def).appendTo(originalNodeDiv); - localNodeDiv.addClass("node-diff-node-unchanged"); - $('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(localNodeDiv); - if (remoteDiff) { - stats.remote.unchangedCount++; - remoteNodeDiv.addClass("node-diff-node-unchanged"); - $('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(remoteNodeDiv); - } - div.addClass("node-diff-node-unchanged"); - } else if (localDiff.added[node.id]) { - localNodeDiv.addClass("node-diff-node-added"); - if (remoteNodeDiv) { - remoteNodeDiv.addClass("node-diff-empty"); - } - $('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(localNodeDiv); - createNode(node,def).appendTo(originalNodeDiv); - } else if (remoteDiff && remoteDiff.added[node.id]) { - localNodeDiv.addClass("node-diff-empty"); - remoteNodeDiv.addClass("node-diff-node-added"); - $('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(remoteNodeDiv); - createNode(node,def).appendTo(originalNodeDiv); - } else { - createNode(node,def).appendTo(originalNodeDiv); - if (localDiff.moved[node.id]) { - var localN = localDiff.newConfig.all[node.id]; - if (!localDiff.deleted[node.z] && node.z !== localN.z && node.z !== "" && !localDiff.newConfig.all[node.z]) { - localNodeDiv.addClass("node-diff-empty"); - } else { - localNodeDiv.addClass("node-diff-node-moved"); - var localMovedMessage = ""; - if (node.z === localN.z) { - localMovedMessage = RED._("diff.type.movedFrom",{id:(localDiff.currentConfig.all[node.id].z||'global')}); - } else { - localMovedMessage = RED._("diff.type.movedTo",{id:(localN.z||'global')}); - } - $('<span class="node-diff-status"><i class="fa fa-caret-square-o-right"></i> '+localMovedMessage+'</span>').appendTo(localNodeDiv); - } - localChanged = true; - } else if (localDiff.deleted[node.z]) { - localNodeDiv.addClass("node-diff-empty"); - localChanged = true; - } else if (localDiff.deleted[node.id]) { - localNodeDiv.addClass("node-diff-node-deleted"); - $('<span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.deleted"></span></span>').appendTo(localNodeDiv); - localChanged = true; - } else if (localDiff.changed[node.id]) { - if (localDiff.newConfig.all[node.id].z !== node.z) { - localNodeDiv.addClass("node-diff-empty"); - } else { - localNodeDiv.addClass("node-diff-node-changed"); - $('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(localNodeDiv); - localChanged = true; - } - } else { - if (localDiff.newConfig.all[node.id].z !== node.z) { - localNodeDiv.addClass("node-diff-empty"); - } else { - stats.local.unchangedCount++; - localNodeDiv.addClass("node-diff-node-unchanged"); - $('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(localNodeDiv); - } - } - - if (remoteDiff) { - if (remoteDiff.moved[node.id]) { - var remoteN = remoteDiff.newConfig.all[node.id]; - if (!remoteDiff.deleted[node.z] && node.z !== remoteN.z && node.z !== "" && !remoteDiff.newConfig.all[node.z]) { - remoteNodeDiv.addClass("node-diff-empty"); - } else { - remoteNodeDiv.addClass("node-diff-node-moved"); - var remoteMovedMessage = ""; - if (node.z === remoteN.z) { - remoteMovedMessage = RED._("diff.type.movedFrom",{id:(remoteDiff.currentConfig.all[node.id].z||'global')}); - } else { - remoteMovedMessage = RED._("diff.type.movedTo",{id:(remoteN.z||'global')}); - } - $('<span class="node-diff-status"><i class="fa fa-caret-square-o-right"></i> '+remoteMovedMessage+'</span>').appendTo(remoteNodeDiv); - } - } else if (remoteDiff.deleted[node.z]) { - remoteNodeDiv.addClass("node-diff-empty"); - } else if (remoteDiff.deleted[node.id]) { - remoteNodeDiv.addClass("node-diff-node-deleted"); - $('<span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.deleted"></span></span>').appendTo(remoteNodeDiv); - } else if (remoteDiff.changed[node.id]) { - if (remoteDiff.newConfig.all[node.id].z !== node.z) { - remoteNodeDiv.addClass("node-diff-empty"); - } else { - remoteNodeDiv.addClass("node-diff-node-changed"); - $('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(remoteNodeDiv); - } - } else { - if (remoteDiff.newConfig.all[node.id].z !== node.z) { - remoteNodeDiv.addClass("node-diff-empty"); - } else { - stats.remote.unchangedCount++; - remoteNodeDiv.addClass("node-diff-node-unchanged"); - $('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(remoteNodeDiv); - } - } - } - } - var localNode = { - node: localDiff.newConfig.all[node.id], - all: localDiff.newConfig.all, - diff: localDiff - }; - var remoteNode; - if (remoteDiff) { - remoteNode = { - node:remoteDiff.newConfig.all[node.id]||null, - all: remoteDiff.newConfig.all, - diff: remoteDiff - } - } - createNodePropertiesTable(def,node,localNode,remoteNode).appendTo(div); - - var selectState = ""; - - if (conflicted) { - stats.conflicts++; - if (!localNodeDiv.hasClass("node-diff-empty")) { - $('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(localNodeDiv); - } - if (!remoteNodeDiv.hasClass("node-diff-empty")) { - $('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(remoteNodeDiv); - } - div.addClass("node-diff-node-entry-conflict"); - } else { - selectState = CurrentDiff.resolutions[node.id]; - } - // Node row - createNodeConflictRadioBoxes(node,div,localNodeDiv,remoteNodeDiv,false,!conflicted,selectState,CurrentDiff); - row.click(function(evt) { - $(this).parent().toggleClass('collapsed'); - }); - - return div; - } - function createNodePropertiesTable(def,node,localNodeObj,remoteNodeObj) { - var propertyElements = {}; - var localNode = localNodeObj.node; - var remoteNode; - if (remoteNodeObj) { - remoteNode = remoteNodeObj.node; - } - - var nodePropertiesDiv = $("<div>",{class:"node-diff-node-entry-properties"}); - var nodePropertiesTable = $("<table>").appendTo(nodePropertiesDiv); - var nodePropertiesTableCols = $('<colgroup><col/><col/></colgroup>').appendTo(nodePropertiesTable); - if (remoteNode !== undefined) { - $("<col/>").appendTo(nodePropertiesTableCols); - } - var nodePropertiesTableBody = $("<tbody>").appendTo(nodePropertiesTable); - - var row; - var localCell, remoteCell; - var element; - var currentValue, localValue, remoteValue; - var localChanged = false; - var remoteChanged = false; - var localChanges = 0; - var remoteChanges = 0; - var conflict = false; - var status; - - row = $("<tr>").appendTo(nodePropertiesTableBody); - $("<td>",{class:"node-diff-property-cell-label"}).text("id").appendTo(row); - localCell = $("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); - if (localNode) { - localCell.addClass("node-diff-node-unchanged"); - $('<span class="node-diff-status"></span>').appendTo(localCell); - element = $('<span class="node-diff-element"></span>').appendTo(localCell); - propertyElements['local.id'] = RED.utils.createObjectElement(localNode.id).appendTo(element); - } else { - localCell.addClass("node-diff-empty"); - } - if (remoteNode !== undefined) { - remoteCell = $("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); - remoteCell.addClass("node-diff-node-unchanged"); - if (remoteNode) { - $('<span class="node-diff-status"></span>').appendTo(remoteCell); - element = $('<span class="node-diff-element"></span>').appendTo(remoteCell); - propertyElements['remote.id'] = RED.utils.createObjectElement(remoteNode.id).appendTo(element); - } else { - remoteCell.addClass("node-diff-empty"); - } - } - - - if (node.hasOwnProperty('x')) { - if (localNode) { - if (localNode.x !== node.x || localNode.y !== node.y) { - localChanged = true; - localChanges++; - } - } - if (remoteNode) { - if (remoteNode.x !== node.x || remoteNode.y !== node.y) { - remoteChanged = true; - remoteChanges++; - } - } - if ( (remoteChanged && localChanged && (localNode.x !== remoteNode.x || localNode.y !== remoteNode.y)) || - (!localChanged && remoteChanged && localNodeObj.diff.deleted[node.id]) || - (localChanged && !remoteChanged && remoteNodeObj.diff.deleted[node.id]) - ) { - conflict = true; - } - row = $("<tr>").appendTo(nodePropertiesTableBody); - $("<td>",{class:"node-diff-property-cell-label"}).text("position").appendTo(row); - localCell = $("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); - if (localNode) { - localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged")); - $('<span class="node-diff-status">'+(localChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(localCell); - element = $('<span class="node-diff-element"></span>').appendTo(localCell); - propertyElements['local.position'] = RED.utils.createObjectElement({x:localNode.x,y:localNode.y}, - { - path: "position", - exposeApi: true, - ontoggle: function(path,state) { - if (propertyElements['remote.'+path]) { - propertyElements['remote.'+path].prop('expand')(path,state) - } - } - } - ).appendTo(element); - } else { - localCell.addClass("node-diff-empty"); - } - - if (remoteNode !== undefined) { - remoteCell = $("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); - remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged")); - if (remoteNode) { - $('<span class="node-diff-status">'+(remoteChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(remoteCell); - element = $('<span class="node-diff-element"></span>').appendTo(remoteCell); - propertyElements['remote.position'] = RED.utils.createObjectElement({x:remoteNode.x,y:remoteNode.y}, - { - path: "position", - exposeApi: true, - ontoggle: function(path,state) { - if (propertyElements['local.'+path]) { - propertyElements['local.'+path].prop('expand')(path,state); - } - } - } - ).appendTo(element); - } else { - remoteCell.addClass("node-diff-empty"); - } - } - } - // - localChanged = remoteChanged = conflict = false; - if (node.hasOwnProperty('wires')) { - currentValue = JSON.stringify(node.wires); - if (localNode) { - localValue = JSON.stringify(localNode.wires); - if (currentValue !== localValue) { - localChanged = true; - localChanges++; - } - } - if (remoteNode) { - remoteValue = JSON.stringify(remoteNode.wires); - if (currentValue !== remoteValue) { - remoteChanged = true; - remoteChanges++; - } - } - if ( (remoteChanged && localChanged && (localValue !== remoteValue)) || - (!localChanged && remoteChanged && localNodeObj.diff.deleted[node.id]) || - (localChanged && !remoteChanged && remoteNodeObj.diff.deleted[node.id]) - ){ - conflict = true; - } - row = $("<tr>").appendTo(nodePropertiesTableBody); - $("<td>",{class:"node-diff-property-cell-label"}).text("wires").appendTo(row); - localCell = $("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); - if (localNode) { - if (!conflict) { - localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged")); - $('<span class="node-diff-status">'+(localChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(localCell); - } else { - localCell.addClass("node-diff-node-conflict"); - $('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(localCell); - } - formatWireProperty(localNode.wires,localNodeObj.all).appendTo(localCell); - } else { - localCell.addClass("node-diff-empty"); - } - - if (remoteNode !== undefined) { - remoteCell = $("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); - if (remoteNode) { - if (!conflict) { - remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged")); - $('<span class="node-diff-status">'+(remoteChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(remoteCell); - } else { - remoteCell.addClass("node-diff-node-conflict"); - $('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(remoteCell); - } - formatWireProperty(remoteNode.wires,remoteNodeObj.all).appendTo(remoteCell); - } else { - remoteCell.addClass("node-diff-empty"); - } - } - } - - var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))}); - if (def.defaults) { - properties = properties.concat(Object.keys(def.defaults)); - } - if (node.type !== 'tab') { - properties = properties.concat(['inputLabels','outputLabels']); - } - properties.forEach(function(d) { - localChanged = false; - remoteChanged = false; - conflict = false; - currentValue = JSON.stringify(node[d]); - if (localNode) { - localValue = JSON.stringify(localNode[d]); - if (currentValue !== localValue) { - localChanged = true; - localChanges++; - } - } - if (remoteNode) { - remoteValue = JSON.stringify(remoteNode[d]); - if (currentValue !== remoteValue) { - remoteChanged = true; - remoteChanges++; - } - } - - if ( (remoteChanged && localChanged && (localValue !== remoteValue)) || - (!localChanged && remoteChanged && localNodeObj.diff.deleted[node.id]) || - (localChanged && !remoteChanged && remoteNodeObj.diff.deleted[node.id]) - ){ - conflict = true; - } - - row = $("<tr>").appendTo(nodePropertiesTableBody); - var propertyNameCell = $("<td>",{class:"node-diff-property-cell-label"}).text(d).appendTo(row); - localCell = $("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row); - if (localNode) { - if (!conflict) { - localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged")); - $('<span class="node-diff-status">'+(localChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(localCell); - } else { - localCell.addClass("node-diff-node-conflict"); - $('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(localCell); - } - element = $('<span class="node-diff-element"></span>').appendTo(localCell); - propertyElements['local.'+d] = RED.utils.createObjectElement(localNode[d], - { - path: d, - exposeApi: true, - ontoggle: function(path,state) { - if (propertyElements['remote.'+d]) { - propertyElements['remote.'+d].prop('expand')(path,state) - } - } - } - ).appendTo(element); - } else { - localCell.addClass("node-diff-empty"); - } - if (remoteNode !== undefined) { - remoteCell = $("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row); - if (remoteNode) { - if (!conflict) { - remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged")); - $('<span class="node-diff-status">'+(remoteChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(remoteCell); - } else { - remoteCell.addClass("node-diff-node-conflict"); - $('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(remoteCell); - } - element = $('<span class="node-diff-element"></span>').appendTo(remoteCell); - propertyElements['remote.'+d] = RED.utils.createObjectElement(remoteNode[d], - { - path: d, - exposeApi: true, - ontoggle: function(path,state) { - if (propertyElements['local.'+d]) { - propertyElements['local.'+d].prop('expand')(path,state) - } - } - } - ).appendTo(element); - } else { - remoteCell.addClass("node-diff-empty"); - } - } - if (localNode && remoteNode && typeof localNode[d] === "string") { - if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) { - $('<button class="editor-button editor-button-small node-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').click(function() { - showTextDiff(localNode[d],remoteNode[d]); - }).appendTo(propertyNameCell); - } - } - - - }); - return nodePropertiesDiv; - } - function createNodeConflictRadioBoxes(node,row,localDiv,remoteDiv,propertiesTable,hide,state,diff) { - var safeNodeId = "node-diff-selectbox-"+node.id.replace(/\./g,'-')+(propertiesTable?"-props":""); - var className = ""; - if (node.z||propertiesTable) { - className = "node-diff-selectbox-tab-"+(propertiesTable?node.id:node.z).replace(/\./g,'-'); - } - var titleRow = !propertiesTable && (node.type === 'tab' || node.type === 'subflow'); - var changeHandler = function(evt) { - var className; - if (node.type === undefined) { - // TODO: handle globals - } else if (titleRow) { - className = "node-diff-selectbox-tab-"+node.id.replace(/\./g,'-'); - $("."+className+"-"+this.value).prop('checked',true); - if (this.value === 'local') { - $("."+className+"-"+this.value).closest(".node-diff-node-entry").addClass("node-diff-select-local"); - $("."+className+"-"+this.value).closest(".node-diff-node-entry").removeClass("node-diff-select-remote"); - } else { - $("."+className+"-"+this.value).closest(".node-diff-node-entry").removeClass("node-diff-select-local"); - $("."+className+"-"+this.value).closest(".node-diff-node-entry").addClass("node-diff-select-remote"); - } - } else { - // Individual node or properties table - var parentId = "node-diff-selectbox-"+(propertiesTable?node.id:node.z).replace(/\./g,'-'); - $('#'+parentId+"-local").prop('checked',false); - $('#'+parentId+"-remote").prop('checked',false); - var titleRowDiv = $('#'+parentId+"-local").closest(".node-diff-tab").find(".node-diff-tab-title"); - titleRowDiv.removeClass("node-diff-select-local"); - titleRowDiv.removeClass("node-diff-select-remote"); - } - if (this.value === 'local') { - row.removeClass("node-diff-select-remote"); - row.addClass("node-diff-select-local"); - } else if (this.value === 'remote') { - row.addClass("node-diff-select-remote"); - row.removeClass("node-diff-select-local"); - } - refreshConflictHeader(diff); - } - - var localSelectDiv = $('<label>',{class:"node-diff-selectbox",for:safeNodeId+"-local"}).click(function(e) { e.stopPropagation();}).appendTo(localDiv); - var localRadio = $('<input>',{id:safeNodeId+"-local",type:'radio',value:"local",name:safeNodeId,class:className+"-local"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).change(changeHandler).appendTo(localSelectDiv); - var remoteSelectDiv = $('<label>',{class:"node-diff-selectbox",for:safeNodeId+"-remote"}).click(function(e) { e.stopPropagation();}).appendTo(remoteDiv); - var remoteRadio = $('<input>',{id:safeNodeId+"-remote",type:'radio',value:"remote",name:safeNodeId,class:className+"-remote"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).change(changeHandler).appendTo(remoteSelectDiv); - if (state === 'local') { - localRadio.prop('checked',true); - } else if (state === 'remote') { - remoteRadio.prop('checked',true); - } - if (hide||localDiv.hasClass("node-diff-empty") || remoteDiv.hasClass("node-diff-empty")) { - localSelectDiv.hide(); - remoteSelectDiv.hide(); - } - - } - function refreshConflictHeader(currentDiff) { - var resolutionCount = 0; - $(".node-diff-selectbox>input:checked").each(function() { - if (currentDiff.conflicts[$(this).data('node-id')]) { - resolutionCount++; - } - currentDiff.resolutions[$(this).data('node-id')] = $(this).val(); - }) - var conflictCount = Object.keys(currentDiff.conflicts).length; - if (conflictCount - resolutionCount === 0) { - $("#node-diff-toolbar-resolved-conflicts").html('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-check"></i></span></span> '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount})); - } else { - $("#node-diff-toolbar-resolved-conflicts").html('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span> '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount})); - } - if (conflictCount === resolutionCount) { - $("#node-diff-view-diff-merge").removeClass('disabled'); - $("#node-diff-view-resolve-diff").removeClass('disabled'); - } - } - function getRemoteDiff(callback) { - $.ajax({ - headers: { - "Accept":"application/json", - }, - cache: false, - url: 'flows', - success: function(nodes) { - var localFlow = RED.nodes.createCompleteNodeSet(); - var originalFlow = RED.nodes.originalFlow(); - var remoteFlow = nodes.flows; - var localDiff = generateDiff(originalFlow,localFlow); - var remoteDiff = generateDiff(originalFlow,remoteFlow); - remoteDiff.rev = nodes.rev; - callback(resolveDiffs(localDiff,remoteDiff)) - } - }); - - } - // function showLocalDiff() { - // var nns = RED.nodes.createCompleteNodeSet(); - // var originalFlow = RED.nodes.originalFlow(); - // var diff = generateDiff(originalFlow,nns); - // showDiff(diff); - // } - function showRemoteDiff(diff) { - if (diff === undefined) { - getRemoteDiff(showRemoteDiff); - } else { - showDiff(diff,{mode:'merge'}); - } - } - function parseNodes(nodeList) { - var tabOrder = []; - var tabs = {}; - var subflows = {}; - var globals = []; - var all = {}; - - nodeList.forEach(function(node) { - all[node.id] = node; - if (node.type === 'tab') { - tabOrder.push(node.id); - tabs[node.id] = {n:node,nodes:[]}; - } else if (node.type === 'subflow') { - subflows[node.id] = {n:node,nodes:[]}; - } - }); - - nodeList.forEach(function(node) { - if (node.type !== 'tab' && node.type !== 'subflow') { - if (tabs[node.z]) { - tabs[node.z].nodes.push(node); - } else if (subflows[node.z]) { - subflows[node.z].nodes.push(node); - } else { - globals.push(node); - } - } - }); - - return { - all: all, - tabOrder: tabOrder, - tabs: tabs, - subflows: subflows, - globals: globals - } - } - function generateDiff(currentNodes,newNodes) { - var currentConfig = parseNodes(currentNodes); - var newConfig = parseNodes(newNodes); - var added = {}; - var deleted = {}; - var changed = {}; - var moved = {}; - - Object.keys(currentConfig.all).forEach(function(id) { - var node = RED.nodes.workspace(id)||RED.nodes.subflow(id)||RED.nodes.node(id); - if (!newConfig.all.hasOwnProperty(id)) { - deleted[id] = true; - } else if (JSON.stringify(currentConfig.all[id]) !== JSON.stringify(newConfig.all[id])) { - changed[id] = true; - - if (currentConfig.all[id].z !== newConfig.all[id].z) { - moved[id] = true; - } - } - }); - Object.keys(newConfig.all).forEach(function(id) { - if (!currentConfig.all.hasOwnProperty(id)) { - added[id] = true; - } - }); - - return { - currentConfig: currentConfig, - newConfig: newConfig, - added: added, - deleted: deleted, - changed: changed, - moved: moved - } - } - function resolveDiffs(localDiff,remoteDiff) { - var conflicted = {}; - var resolutions = {}; - - var diff = { - localDiff: localDiff, - remoteDiff: remoteDiff, - conflicts: conflicted, - resolutions: resolutions - } - var seen = {}; - var id,node; - for (id in localDiff.currentConfig.all) { - if (localDiff.currentConfig.all.hasOwnProperty(id)) { - seen[id] = true; - var localNode = localDiff.newConfig.all[id]; - if (localDiff.changed[id] && remoteDiff.deleted[id]) { - conflicted[id] = true; - } else if (localDiff.deleted[id] && remoteDiff.changed[id]) { - conflicted[id] = true; - } else if (localDiff.changed[id] && remoteDiff.changed[id]) { - var remoteNode = remoteDiff.newConfig.all[id]; - if (JSON.stringify(localNode) !== JSON.stringify(remoteNode)) { - conflicted[id] = true; - } - } - if (!conflicted[id]) { - if (remoteDiff.added[id]||remoteDiff.changed[id]||remoteDiff.deleted[id]) { - resolutions[id] = 'remote'; - } else { - resolutions[id] = 'local'; - } - } - } - } - for (id in localDiff.added) { - if (localDiff.added.hasOwnProperty(id)) { - node = localDiff.newConfig.all[id]; - if (remoteDiff.deleted[node.z]) { - conflicted[id] = true; - // conflicted[node.z] = true; - } else { - resolutions[id] = 'local'; - } - } - } - for (id in remoteDiff.added) { - if (remoteDiff.added.hasOwnProperty(id)) { - node = remoteDiff.newConfig.all[id]; - if (localDiff.deleted[node.z]) { - conflicted[id] = true; - // conflicted[node.z] = true; - } else { - resolutions[id] = 'remote'; - } - } - } - // console.log(diff.resolutions); - // console.log(conflicted); - return diff; - } - - function showDiff(diff,options) { - if (diffVisible) { - return; - } - options = options || {}; - var mode = options.mode || 'merge'; - - var localDiff = diff.localDiff; - var remoteDiff = diff.remoteDiff; - var conflicts = diff.conflicts; - // currentDiff = diff; - - var trayOptions = { - title: options.title||RED._("diff.reviewChanges"), - width: Infinity, - overlay: true, - buttons: [ - { - text: RED._((options.mode === 'merge')?"common.label.cancel":"common.label.close"), - click: function() { - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - // trayWidth = dimensions.width; - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var toolbar = $('<div class="node-diff-toolbar">'+ - '<span><span id="node-diff-toolbar-resolved-conflicts"></span></span> '+ - '</div>').prependTo(trayBody); - var diffContainer = $('<div class="node-diff-container"></div>').appendTo(trayBody); - var diffTable = buildDiffPanel(diffContainer,diff,options); - diffTable.list.hide(); - if (remoteDiff) { - $("#node-diff-view-diff-merge").show(); - if (Object.keys(conflicts).length === 0) { - $("#node-diff-view-diff-merge").removeClass('disabled'); - } else { - $("#node-diff-view-diff-merge").addClass('disabled'); - } - } else { - $("#node-diff-view-diff-merge").hide(); - } - refreshConflictHeader(diff); - // console.log("--------------"); - // console.log(localDiff); - // console.log(remoteDiff); - - setTimeout(function() { - diffTable.finish(); - diffTable.list.show(); - },300); - $("#sidebar-shade").show(); - }, - close: function() { - diffVisible = false; - $("#sidebar-shade").hide(); - - }, - show: function() { - - } - } - if (options.mode === 'merge') { - trayOptions.buttons.push( - { - id: "node-diff-view-diff-merge", - text: RED._("deploy.confirm.button.merge"), - class: "primary disabled", - click: function() { - if (!$("#node-diff-view-diff-merge").hasClass('disabled')) { - refreshConflictHeader(diff); - mergeDiff(diff); - RED.tray.close(); - } - } - } - ); - } - - RED.tray.show(trayOptions); - } - - function applyDiff(diff) { - var currentConfig = diff.localDiff.currentConfig; - var localDiff = diff.localDiff; - var remoteDiff = diff.remoteDiff; - var conflicts = diff.conflicts; - var resolutions = diff.resolutions; - var id; - - for (id in conflicts) { - if (conflicts.hasOwnProperty(id)) { - if (!resolutions.hasOwnProperty(id)) { - console.log(diff); - throw new Error("No resolution for conflict on node",id); - } - } - } - - var newConfig = []; - var node; - var nodeChangedStates = {}; - var localChangedStates = {}; - for (id in localDiff.newConfig.all) { - if (localDiff.newConfig.all.hasOwnProperty(id)) { - node = RED.nodes.node(id); - if (resolutions[id] === 'local') { - if (node) { - nodeChangedStates[id] = node.changed; - } - newConfig.push(localDiff.newConfig.all[id]); - } else if (resolutions[id] === 'remote') { - if (!remoteDiff.deleted[id] && remoteDiff.newConfig.all.hasOwnProperty(id)) { - if (node) { - nodeChangedStates[id] = node.changed; - } - localChangedStates[id] = true; - newConfig.push(remoteDiff.newConfig.all[id]); - } - } else { - console.log("Unresolved",id) - } - } - } - for (id in remoteDiff.added) { - if (remoteDiff.added.hasOwnProperty(id)) { - node = RED.nodes.node(id); - if (node) { - nodeChangedStates[id] = node.changed; - } - if (!localDiff.added.hasOwnProperty(id)) { - localChangedStates[id] = true; - newConfig.push(remoteDiff.newConfig.all[id]); - } - } - } - return { - config: newConfig, - nodeChangedStates: nodeChangedStates, - localChangedStates: localChangedStates - } - } - - function mergeDiff(diff) { - var appliedDiff = applyDiff(diff); - - var newConfig = appliedDiff.config; - var nodeChangedStates = appliedDiff.nodeChangedStates; - var localChangedStates = appliedDiff.localChangedStates; - - var historyEvent = { - t:"replace", - config: RED.nodes.createCompleteNodeSet(), - changed: nodeChangedStates, - dirty: RED.nodes.dirty(), - rev: RED.nodes.version() - } - - RED.history.push(historyEvent); - - RED.nodes.clear(); - var imported = RED.nodes.import(newConfig); - imported[0].forEach(function(n) { - if (nodeChangedStates[n.id] || localChangedStates[n.id]) { - n.changed = true; - } - }) - - RED.nodes.version(diff.remoteDiff.rev); - - RED.view.redraw(true); - RED.palette.refresh(); - RED.workspaces.refresh(); - RED.sidebar.config.refresh(); - } - function showTestFlowDiff(index) { - if (index === 1) { - var localFlow = RED.nodes.createCompleteNodeSet(); - var originalFlow = RED.nodes.originalFlow(); - showTextDiff(JSON.stringify(localFlow,null,4),JSON.stringify(originalFlow,null,4)) - } else if (index === 2) { - var local = "1\n2\n3\n4\n5\nA\n6\n7\n8\n9\n"; - var remote = "1\nA\n2\n3\nD\nE\n6\n7\n8\n9\n"; - showTextDiff(local,remote); - } else if (index === 3) { - var local = "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22"; - var remote = "1\nTWO\nTHREE\nEXTRA\n4\n5\n6\n7\n8\n9\n10\n11\n12\nTHIRTEEN\n14\n15\n16\n17\n18\n19\n20\n21\n22"; - showTextDiff(local,remote); - } - } - - function showTextDiff(textA,textB) { - var trayOptions = { - title: RED._("diff.compareChanges"), - width: Infinity, - overlay: true, - buttons: [ - { - text: RED._("common.label.close"), - click: function() { - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - // trayWidth = dimensions.width; - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var diffPanel = $('<div class="node-text-diff"></div>').appendTo(trayBody); - - var codeTable = $("<table>",{class:"node-text-diff-content"}).appendTo(diffPanel); - $('<colgroup><col width="50"><col width="50%"><col width="50"><col width="50%"></colgroup>').appendTo(codeTable); - var codeBody = $('<tbody>').appendTo(codeTable); - var diffSummary = diffText(textA||"",textB||""); - var aIndex = 0; - var bIndex = 0; - var diffLength = Math.max(diffSummary.a.length, diffSummary.b.length); - - var diffLines = []; - var diffBlocks = []; - var currentBlock; - var blockLength = 0; - var blockType = 0; - - for (var i=0;i<diffLength;i++) { - var diffLine = diffSummary[i]; - var Adiff = (aIndex < diffSummary.a.length)?diffSummary.a[aIndex]:{type:2,line:""}; - var Bdiff = (bIndex < diffSummary.b.length)?diffSummary.b[bIndex]:{type:2,line:""}; - if (Adiff.type === 0 && Bdiff.type !== 0) { - Adiff = {type:2,line:""}; - bIndex++; - } else if (Bdiff.type === 0 && Adiff.type !== 0) { - Bdiff = {type:2,line:""}; - aIndex++; - } else { - aIndex++; - bIndex++; - } - diffLines.push({ - a: Adiff, - b: Bdiff - }); - if (currentBlock === undefined) { - currentBlock = {start:i,end:i}; - blockLength = 0; - blockType = (Adiff.type === 0 && Bdiff.type === 0)?0:1; - } else { - if (Adiff.type === 0 && Bdiff.type === 0) { - // Unchanged line - if (blockType === 0) { - // still unchanged - extend the block - currentBlock.end = i; - blockLength++; - } else if (blockType === 1) { - // end of a change - currentBlock.end = i; - blockType = 2; - blockLength = 0; - } else if (blockType === 2) { - // post-change unchanged - currentBlock.end = i; - blockLength++; - if (blockLength === 8) { - currentBlock.end -= 5; // rollback the end - diffBlocks.push(currentBlock); - currentBlock = {start:i-5,end:i-5}; - blockType = 0; - blockLength = 0; - } - } - } else { - // in a change - currentBlock.end = i; - blockLength++; - if (blockType === 0) { - if (currentBlock.end > 3) { - currentBlock.end -= 3; - currentBlock.empty = true; - diffBlocks.push(currentBlock); - currentBlock = {start:i-3,end:i-3}; - } - blockType = 1; - } else if (blockType === 2) { - // we were in unchanged, but hit a change again - blockType = 1; - } - } - } - } - if (blockType === 0) { - currentBlock.empty = true; - } - currentBlock.end = diffLength; - diffBlocks.push(currentBlock); - // console.table(diffBlocks); - var diffRow; - for (var b = 0; b<diffBlocks.length; b++) { - currentBlock = diffBlocks[b]; - if (currentBlock.empty) { - diffRow = createExpandLine(currentBlock.start,currentBlock.end,diffLines).appendTo(codeBody); - } else { - for (var i=currentBlock.start;i<currentBlock.end;i++) { - var row = createDiffLine(diffLines[i]).appendTo(codeBody); - if (i === currentBlock.start) { - row.addClass("start-block"); - } else if (i === currentBlock.end-1) { - row.addClass("end-block"); - } - } - } - } - - }, - close: function() { - diffVisible = false; - - }, - show: function() { - - } - } - RED.tray.show(trayOptions); - } - - function createExpandLine(start,end,diffLines) { - diffRow = $('<tr class="node-text-diff-header node-text-diff-expand">'); - var content = $('<td colspan="4"> <i class="fa fa-arrows-v"></i> </td>').appendTo(diffRow); - var label = $('<span></span>').appendTo(content); - if (end < diffLines.length-1) { - label.text("@@ -"+(diffLines[end-1].a.i+1)+" +"+(diffLines[end-1].b.i+1)); - } - diffRow.click(function(evt) { - // console.log(start,end,diffLines.length); - if (end - start > 20) { - var startPos = $(this).offset(); - // console.log(startPos); - if (start > 0) { - for (var i=start;i<start+10;i++) { - createDiffLine(diffLines[i]).addClass("unchanged").insertBefore($(this)); - } - start += 10; - } - if (end < diffLines.length-1) { - for (var i=end-1;i>end-11;i--) { - createDiffLine(diffLines[i]).addClass("unchanged").insertAfter($(this)); - } - end -= 10; - } - if (end < diffLines.length-1) { - label.text("@@ -"+(diffLines[end-1].a.i+1)+" +"+(diffLines[end-1].b.i+1)); - } - var endPos = $(this).offset(); - var delta = endPos.top - startPos.top; - $(".node-text-diff").scrollTop($(".node-text-diff").scrollTop() + delta); - } else { - for (var i=start;i<end;i++) { - createDiffLine(diffLines[i]).addClass("unchanged").insertBefore($(this)); - } - $(this).remove(); - } - }); - return diffRow; - } - - function createDiffLine(diffLine) { - var diffRow = $('<tr>'); - var Adiff = diffLine.a; - var Bdiff = diffLine.b; - //console.log(diffLine); - var cellNo = $('<td class="lineno">').text(Adiff.type === 2?"":Adiff.i).appendTo(diffRow); - var cellLine = $('<td class="linetext">').text(Adiff.line).appendTo(diffRow); - if (Adiff.type === 2) { - cellNo.addClass('blank'); - cellLine.addClass('blank'); - } else if (Adiff.type === 4) { - cellNo.addClass('added'); - cellLine.addClass('added'); - } else if (Adiff.type === 1) { - cellNo.addClass('removed'); - cellLine.addClass('removed'); - } - cellNo = $('<td class="lineno">').text(Bdiff.type === 2?"":Bdiff.i).appendTo(diffRow); - cellLine = $('<td class="linetext">').text(Bdiff.line).appendTo(diffRow); - if (Bdiff.type === 2) { - cellNo.addClass('blank'); - cellLine.addClass('blank'); - } else if (Bdiff.type === 4) { - cellNo.addClass('added'); - cellLine.addClass('added'); - } else if (Bdiff.type === 1) { - cellNo.addClass('removed'); - cellLine.addClass('removed'); - } - return diffRow; - } - - function diffText(string1, string2,ignoreWhitespace) { - var lines1 = string1.split(/\r?\n/); - var lines2 = string2.split(/\r?\n/); - var i = lines1.length; - var j = lines2.length; - var k; - var m; - var diffSummary = {a:[],b:[]}; - var diffMap = []; - for (k = 0; k < i + 1; k++) { - diffMap[k] = []; - for (m = 0; m < j + 1; m++) { - diffMap[k][m] = 0; - } - } - var c = 0; - for (k = i - 1; k >= 0; k--) { - for (m = j - 1; m >=0; m--) { - c++; - if (compareLines(lines1[k],lines2[m],ignoreWhitespace) !== 1) { - diffMap[k][m] = diffMap[k+1][m+1]+1; - } else { - diffMap[k][m] = Math.max(diffMap[(k + 1)][m], diffMap[k][(m + 1)]); - } - } - } - //console.log(c); - k = 0; - m = 0; - - while ((k < i) && (m < j)) { - var n = compareLines(lines1[k],lines2[m],ignoreWhitespace); - if (n !== 1) { - var d = 0; - if (n===0) { - d = 0; - } else if (n==2) { - d = 3; - } - diffSummary.a.push({i:k+1,j:m+1,line:lines1[k],type:d}); - diffSummary.b.push({i:m+1,j:k+1,line:lines2[m],type:d}); - k++; - m++; - } else if (diffMap[(k + 1)][m] >= diffMap[k][(m + 1)]) { - diffSummary.a.push({i:k+1,line:lines1[k],type:1}); - k++; - } else { - diffSummary.b.push({i:m+1,line:lines2[m],type:4}); - m++; - } - } - while ((k < i) || (m < j)) { - if (k == i) { - diffSummary.b.push({i:m+1,line:lines2[m],type:4}); - m++; - } else if (m == j) { - diffSummary.a.push({i:k+1,line:lines1[k],type:1}); - k++; - } - } - return diffSummary; - } - - function compareLines(string1, string2, ignoreWhitespace) { - if (ignoreWhitespace) { - if (string1 === string2) { - return 0; - } - return string1.trim() === string2.trime() ? 2 : 1; - } - return string1 === string2 ? 0 : 1; - } - - function createUnifiedDiffTable(files,commitOptions) { - var diffPanel = $('<div></div>'); - files.forEach(function(file) { - var hunks = file.hunks; - var isBinary = file.binary; - var codeTable = $("<table>",{class:"node-text-diff-content"}).appendTo(diffPanel); - $('<colgroup><col width="50"><col width="50"><col width="100%"></colgroup>').appendTo(codeTable); - var codeBody = $('<tbody>').appendTo(codeTable); - - var diffFileRow = $('<tr class="node-text-diff-file-header">').appendTo(codeBody); - var content = $('<td colspan="3"></td>').appendTo(diffFileRow); - - var chevron = $('<i class="node-diff-chevron fa fa-angle-down"></i>').appendTo(content); - diffFileRow.click(function(e) { - diffFileRow.toggleClass("collapsed"); - var isCollapsed = diffFileRow.hasClass("collapsed"); - diffFileRow.nextUntil(".node-text-diff-file-header").toggle(!isCollapsed); - }) - var label = $('<span class="filename"></span>').text(file.file).appendTo(content); - - var conflictHeader; - var unresolvedConflicts = 0; - var resolvedConflicts = 0; - var conflictResolutions = {}; - if (commitOptions.project.files && commitOptions.project.files.flow === file.file) { - if (commitOptions.unmerged) { - $('<span style="float: right;"><span id="node-diff-toolbar-resolved-conflicts"></span></span>').appendTo(content); - } - var diffRow = $('<tr class="node-text-diff-header">').appendTo(codeBody); - var flowDiffContent = $('<td class="flow-diff" colspan="3"></td>').appendTo(diffRow); - - var projectName = commitOptions.project.name; - var filename = commitOptions.project.files.flow; - var commonVersionUrl = "projects/"+projectName+"/files/"+commitOptions.commonRev+"/"+filename; - var oldVersionUrl = "projects/"+projectName+"/files/"+commitOptions.oldRev+"/"+filename; - var newVersionUrl = "projects/"+projectName+"/files/"+commitOptions.newRev+"/"+filename; - var promises = [$.Deferred(),$.Deferred(),$.Deferred()]; - if (commitOptions.commonRev) { - var commonVersionUrl = "projects/"+projectName+"/files/"+commitOptions.commonRev+"/"+filename; - $.ajax({dataType: "json",url: commonVersionUrl}).then(function(data) { promises[0].resolve(data); }).fail(function() { promises[0].resolve(null);}) - } else { - promises[0].resolve(null); - } - - $.ajax({dataType: "json",url: oldVersionUrl}).then(function(data) { promises[1].resolve(data); }).fail(function() { promises[1].resolve({content:"[]"});}) - $.ajax({dataType: "json",url: newVersionUrl}).then(function(data) { promises[2].resolve(data); }).fail(function() { promises[2].resolve({content:"[]"});}) - $.when.apply($,promises).always(function(commonVersion, oldVersion,newVersion) { - var commonFlow; - var oldFlow; - var newFlow; - if (commonVersion) { - try { - commonFlow = JSON.parse(commonVersion.content||"[]"); - } catch(err) { - console.log(RED._("diff.commonVersionError"),commonVersionUrl); - console.log(err); - return; - } - } - try { - oldFlow = JSON.parse(oldVersion.content||"[]"); - } catch(err) { - console.log(RED._("diff.oldVersionError"),oldVersionUrl); - console.log(err); - return; - } - if (!commonFlow) { - commonFlow = oldFlow; - } - try { - newFlow = JSON.parse(newVersion.content||"[]"); - } catch(err) { - console.log(RED._("diff.newVersionError"),newFlow); - console.log(err); - return; - } - var localDiff = generateDiff(commonFlow,oldFlow); - var remoteDiff = generateDiff(commonFlow,newFlow); - commitOptions.currentDiff = resolveDiffs(localDiff,remoteDiff); - var diffTable = buildDiffPanel(flowDiffContent,commitOptions.currentDiff,{ - title: filename, - mode: commitOptions.commonRev?'merge':'view', - oldRevTitle: commitOptions.oldRevTitle, - newRevTitle: commitOptions.newRevTitle - }); - diffTable.list.hide(); - refreshConflictHeader(commitOptions.currentDiff); - setTimeout(function() { - diffTable.finish(); - diffTable.list.show(); - },300); - // var flowDiffRow = $("<tr>").insertAfter(diffRow); - // var content = $('<td colspan="3"></td>').appendTo(flowDiffRow); - // currentDiff = diff; - // var diffTable = buildDiffPanel(content,diff,{mode:"view"}).finish(); - }); - - - - } else - - if (isBinary) { - var diffBinaryRow = $('<tr class="node-text-diff-header">').appendTo(codeBody); - var binaryContent = $('<td colspan="3"></td>').appendTo(diffBinaryRow); - $('<span></span>').text(RED._("diff.noBinaryFileShowed")).appendTo(binaryContent); - - } else { - if (commitOptions.unmerged) { - conflictHeader = $('<span style="float: right;">'+RED._("diff.conflictHeader",{resolved:resolvedConflicts, unresolved:unresolvedConflicts})+'</span>').appendTo(content); - } - hunks.forEach(function(hunk) { - var diffRow = $('<tr class="node-text-diff-header">').appendTo(codeBody); - var content = $('<td colspan="3"></td>').appendTo(diffRow); - var label = $('<span></span>').text(hunk.header).appendTo(content); - var isConflict = hunk.conflict; - var localLine = hunk.localStartLine; - var remoteLine = hunk.remoteStartLine; - if (isConflict) { - unresolvedConflicts++; - } - - hunk.lines.forEach(function(lineText,lineNumber) { - // if (lineText[0] === '\\' || lineText === "") { - // // Comment line - bail out of this hunk - // break; - // } - - var actualLineNumber = hunk.diffStart + lineNumber; - var isMergeHeader = isConflict && /^\+\+(<<<<<<<|=======$|>>>>>>>)/.test(lineText); - var diffRow = $('<tr>').appendTo(codeBody); - var localLineNo = $('<td class="lineno">').appendTo(diffRow); - var remoteLineNo; - if (!isMergeHeader) { - remoteLineNo = $('<td class="lineno">').appendTo(diffRow); - } else { - localLineNo.attr('colspan',2); - } - var line = $('<td class="linetext">').appendTo(diffRow); - var prefixStart = 0; - var prefixEnd = 1; - if (isConflict) { - prefixEnd = 2; - } - if (!isMergeHeader) { - var changeMarker = lineText[0]; - if (isConflict && !commitOptions.unmerged && changeMarker === ' ') { - changeMarker = lineText[1]; - } - $('<span class="prefix">').text(changeMarker).appendTo(line); - var handledlLine = false; - if (isConflict && commitOptions.unmerged) { - $('<span class="prefix">').text(lineText[1]).appendTo(line); - if (lineText[0] === '+') { - localLineNo.text(localLine++); - handledlLine = true; - } - if (lineText[1] === '+') { - remoteLineNo.text(remoteLine++); - handledlLine = true; - } - } else { - if (lineText[0] === '+' || (isConflict && lineText[1] === '+')) { - localLineNo.addClass("added"); - remoteLineNo.addClass("added"); - line.addClass("added"); - remoteLineNo.text(remoteLine++); - handledlLine = true; - } else if (lineText[0] === '-' || (isConflict && lineText[1] === '-')) { - localLineNo.addClass("removed"); - remoteLineNo.addClass("removed"); - line.addClass("removed"); - localLineNo.text(localLine++); - handledlLine = true; - } - } - if (!handledlLine) { - line.addClass("unchanged"); - if (localLine > 0 && lineText[0] !== '\\' && lineText !== "") { - localLineNo.text(localLine++); - } - if (remoteLine > 0 && lineText[0] !== '\\' && lineText !== "") { - remoteLineNo.text(remoteLine++); - } - } - $('<span>').text(lineText.substring(prefixEnd)).appendTo(line); - } else { - diffRow.addClass("mergeHeader"); - var isSeparator = /^\+\+=======$/.test(lineText); - if (!isSeparator) { - var isOurs = /^..<<<<<<</.test(lineText); - if (isOurs) { - $('<span>').text("<<<<<<< Local Changes").appendTo(line); - hunk.localChangeStart = actualLineNumber; - } else { - hunk.remoteChangeEnd = actualLineNumber; - $('<span>').text(">>>>>>> Remote Changes").appendTo(line); - - } - diffRow.addClass("mergeHeader-"+(isOurs?"ours":"theirs")); - $('<button class="editor-button editor-button-small" style="float: right; margin-right: 20px;"><i class="fa fa-angle-double-'+(isOurs?"down":"up")+'"></i> use '+(isOurs?"local":"remote")+' changes</button>') - .appendTo(line) - .click(function(evt) { - evt.preventDefault(); - resolvedConflicts++; - var addedRows; - var midRow; - if (isOurs) { - addedRows = diffRow.nextUntil(".mergeHeader-separator"); - midRow = addedRows.last().next(); - midRow.nextUntil(".mergeHeader").remove(); - midRow.next().remove(); - } else { - addedRows = diffRow.prevUntil(".mergeHeader-separator"); - midRow = addedRows.last().prev(); - midRow.prevUntil(".mergeHeader").remove(); - midRow.prev().remove(); - } - midRow.remove(); - diffRow.remove(); - addedRows.find(".linetext").addClass('added'); - conflictHeader.empty(); - $('<span>'+RED._("diff.conflictHeader",{resolved:resolvedConflicts, unresolved:unresolvedConflicts})+'</span>').appendTo(conflictHeader); - - conflictResolutions[file.file] = conflictResolutions[file.file] || {}; - conflictResolutions[file.file][hunk.localChangeStart] = { - changeStart: hunk.localChangeStart, - separator: hunk.changeSeparator, - changeEnd: hunk.remoteChangeEnd, - selection: isOurs?"A":"B" - } - if (commitOptions.resolveConflict) { - commitOptions.resolveConflict({ - conflicts: unresolvedConflicts, - resolved: resolvedConflicts, - resolutions: conflictResolutions - }); - } - }) - } else { - hunk.changeSeparator = actualLineNumber; - diffRow.addClass("mergeHeader-separator"); - } - } - }); - }); - } - }); - return diffPanel; - } - - function showCommitDiff(options) { - var commit = parseCommitDiff(options.commit); - var trayOptions = { - title: RED._("diff.viewCommitDiff"), - width: Infinity, - overlay: true, - buttons: [ - { - text: RED._("common.label.close"), - click: function() { - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - // trayWidth = dimensions.width; - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var diffPanel = $('<div class="node-text-diff"></div>').appendTo(trayBody); - - var codeTable = $("<table>",{class:"node-text-diff-content"}).appendTo(diffPanel); - $('<colgroup><col width="50"><col width="50"><col width="100%"></colgroup>').appendTo(codeTable); - var codeBody = $('<tbody>').appendTo(codeTable); - - var diffRow = $('<tr class="node-text-diff-commit-header">').appendTo(codeBody); - var content = $('<td colspan="3"></td>').appendTo(diffRow); - - $("<h3>").text(commit.title).appendTo(content); - $('<div class="commit-body"></div>').text(commit.comment).appendTo(content); - var summary = $('<div class="commit-summary"></div>').appendTo(content); - $('<div style="float: right">').text("Commit "+commit.sha).appendTo(summary); - $('<div>').text((commit.authorName||commit.author)+" - "+options.date).appendTo(summary); - - if (commit.files) { - createUnifiedDiffTable(commit.files,options).appendTo(diffPanel); - } - - - }, - close: function() { - diffVisible = false; - }, - show: function() { - - } - } - RED.tray.show(trayOptions); - } - function showUnifiedDiff(options) { - var diff = options.diff; - var title = options.title; - var files = parseUnifiedDiff(diff); - - var currentResolution; - if (options.unmerged) { - options.resolveConflict = function(results) { - currentResolution = results; - if (results.conflicts === results.resolved) { - $("#node-diff-view-resolve-diff").removeClass('disabled'); - } - } - } - - var trayOptions = { - title: title|| RED._("diff.compareChanges"), - width: Infinity, - overlay: true, - buttons: [ - { - text: RED._((options.unmerged)?"common.label.cancel":"common.label.close"), - click: function() { - if (options.oncancel) { - options.oncancel(); - } - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - // trayWidth = dimensions.width; - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var diffPanel = $('<div class="node-text-diff"></div>').appendTo(trayBody); - createUnifiedDiffTable(files,options).appendTo(diffPanel); - }, - close: function() { - diffVisible = false; - }, - show: function() { - - } - } - if (options.unmerged) { - trayOptions.buttons.push( - { - id: "node-diff-view-resolve-diff", - text: RED._("diff.saveConflict"), - class: "primary disabled", - click: function() { - if (!$("#node-diff-view-resolve-diff").hasClass('disabled')) { - if (options.currentDiff) { - // This is a flow file. Need to apply the diff - // and generate the new flow. - var result = applyDiff(options.currentDiff); - currentResolution = { - resolutions:{} - }; - currentResolution.resolutions[options.project.files.flow] = JSON.stringify(result.config,"",4); - } - if (options.onresolve) { - options.onresolve(currentResolution); - } - RED.tray.close(); - } - } - } - ); - } - RED.tray.show(trayOptions); - } - - function parseCommitDiff(diff) { - var result = {}; - var lines = diff.split("\n"); - var comment = []; - for (var i=0;i<lines.length;i++) { - if (/^commit /.test(lines[i])) { - result.sha = lines[i].substring(7); - } else if (/^Author: /.test(lines[i])) { - result.author = lines[i].substring(8); - var m = /^(.*) <(.*)>$/.exec(result.author); - if (m) { - result.authorName = m[1]; - result.authorEmail = m[2]; - } - } else if (/^Date: /.test(lines[i])) { - result.date = lines[i].substring(8); - } else if (/^ /.test(lines[i])) { - if (!result.title) { - result.title = lines[i].substring(4); - } else { - if (lines[i].length !== 4 || comment.length > 0) { - comment.push(lines[i].substring(4)); - } - } - } else if (/^diff /.test(lines[i])) { - result.files = parseUnifiedDiff(lines.slice(i)); - break; - } - } - result.comment = comment.join("\n"); - return result; - } - function parseUnifiedDiff(diff) { - var lines; - if (Array.isArray(diff)) { - lines = diff; - } else { - lines = diff.split("\n"); - } - var diffHeader = /^diff (?:(?:--git a\/(.*) b\/(.*))|(?:--cc (.*)))$/; - var fileHeader = /^\+\+\+ b\/(.*)\t?/; - var binaryFile = /^Binary files /; - var hunkHeader = /^@@ -((\d+)(,(\d+))?) \+((\d+)(,(\d+))?) @@ ?(.*)$/; - var conflictHunkHeader = /^@+ -((\d+)(,(\d+))?) -((\d+)(,(\d+))?) \+((\d+)(,(\d+))?) @+/; - var files = []; - var currentFile; - var hunks = []; - var currentHunk; - for (var i=0;i<lines.length;i++) { - var line = lines[i]; - var diffLine = diffHeader.exec(line); - if (diffLine) { - if (currentHunk) { - currentFile.hunks.push(currentHunk); - files.push(currentFile); - } - currentHunk = null; - currentFile = { - file: diffLine[1]||diffLine[3], - hunks: [] - } - } else if (binaryFile.test(line)) { - if (currentFile) { - currentFile.binary = true; - } - } else { - var fileLine = fileHeader.exec(line); - if (fileLine) { - currentFile.file = fileLine[1]; - } else { - var hunkLine = hunkHeader.exec(line); - if (hunkLine) { - if (currentHunk) { - currentFile.hunks.push(currentHunk); - } - currentHunk = { - header: line, - localStartLine: hunkLine[2], - localLength: hunkLine[4]||1, - remoteStartLine: hunkLine[6], - remoteLength: hunkLine[8]||1, - lines: [], - conflict: false - } - continue; - } - hunkLine = conflictHunkHeader.exec(line); - if (hunkLine) { - if (currentHunk) { - currentFile.hunks.push(currentHunk); - } - currentHunk = { - header: line, - localStartLine: hunkLine[2], - localLength: hunkLine[4]||1, - remoteStartLine: hunkLine[6], - remoteLength: hunkLine[8]||1, - diffStart: parseInt(hunkLine[10]), - lines: [], - conflict: true - } - continue; - } - if (currentHunk) { - currentHunk.lines.push(line); - } - } - } - } - if (currentHunk) { - currentFile.hunks.push(currentHunk); - } - files.push(currentFile); - return files; - } - - return { - init: init, - getRemoteDiff: getRemoteDiff, - showRemoteDiff: showRemoteDiff, - showUnifiedDiff: showUnifiedDiff, - showCommitDiff: showCommitDiff, - mergeDiff: mergeDiff - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.keyboard = (function() { - - var isMac = /Mac/i.test(window.navigator.platform); - - var handlers = {}; - var partialState; - - var keyMap = { - "left":37, - "up":38, - "right":39, - "down":40, - "escape":27, - "enter": 13, - "backspace": 8, - "delete": 46, - "space": 32, - ";":186, - "=":187, - ",":188, - "-":189, - ".":190, - "/":191, - "\\":220, - "'":222, - "?":191 // <- QWERTY specific - } - var metaKeyCodes = { - 16:true, - 17:true, - 18: true, - 91:true, - 93: true - } - var actionToKeyMap = {} - var defaultKeyMap = {}; - - // FF generates some different keycodes because reasons. - var firefoxKeyCodeMap = { - 59:186, - 61:187, - 173:189 - } - - function migrateOldKeymap() { - if ('localStorage' in window && window['localStorage'] !== null) { - var oldKeyMap = localStorage.getItem("keymap"); - if (oldKeyMap !== null) { - localStorage.removeItem("keymap"); - var currentEditorSettings = RED.settings.get('editor') || {}; - currentEditorSettings.keymap = JSON.parse(oldKeyMap); - RED.settings.set('editor',currentEditorSettings); - } - } - } - function init() { - // Migrate from pre-0.18 - migrateOldKeymap(); - - var currentEditorSettings = RED.settings.get('editor') || {}; - var userKeymap = currentEditorSettings.keymap || {}; - - $.getJSON("red/keymap.json",function(data) { - for (var scope in data) { - if (data.hasOwnProperty(scope)) { - var keys = data[scope]; - for (var key in keys) { - if (keys.hasOwnProperty(key)) { - if (!userKeymap.hasOwnProperty(keys[key])) { - addHandler(scope,key,keys[key],false); - } - defaultKeyMap[keys[key]] = { - scope:scope, - key:key, - user:false - }; - } - } - } - } - for (var action in userKeymap) { - if (userKeymap.hasOwnProperty(action)) { - var obj = userKeymap[action]; - if (obj.hasOwnProperty('key')) { - addHandler(obj.scope, obj.key, action, true); - } - } - } - }); - - RED.userSettings.add({ - id:'keyboard', - title: RED._("keyboard.keyboard"), - get: getSettingsPane, - focus: function() { - setTimeout(function() { - $("#user-settings-tab-keyboard-filter").focus(); - },200); - } - }) - } - - function revertToDefault(action) { - var currentAction = actionToKeyMap[action]; - if (currentAction) { - removeHandler(currentAction.key); - } - if (defaultKeyMap.hasOwnProperty(action)) { - var obj = defaultKeyMap[action]; - addHandler(obj.scope, obj.key, action, false); - } - } - function parseKeySpecifier(key) { - var parts = key.toLowerCase().split("-"); - var modifiers = {}; - var keycode; - var blank = 0; - for (var i=0;i<parts.length;i++) { - switch(parts[i]) { - case "ctrl": - case "cmd": - modifiers.ctrl = true; - modifiers.meta = true; - break; - case "alt": - modifiers.alt = true; - break; - case "shift": - modifiers.shift = true; - break; - case "": - blank++; - keycode = keyMap["-"]; - break; - default: - if (keyMap.hasOwnProperty(parts[i])) { - keycode = keyMap[parts[i]]; - } else if (parts[i].length > 1) { - return null; - } else { - keycode = parts[i].toUpperCase().charCodeAt(0); - } - break; - } - } - return [keycode,modifiers]; - } - - function resolveKeyEvent(evt) { - var slot = partialState||handlers; - if (evt.ctrlKey || evt.metaKey) { - slot = slot.ctrl; - } - if (slot && evt.shiftKey) { - slot = slot.shift; - } - if (slot && evt.altKey) { - slot = slot.alt; - } - var keyCode = firefoxKeyCodeMap[evt.keyCode] || evt.keyCode; - if (slot && slot[keyCode]) { - var handler = slot[keyCode]; - if (!handler.scope) { - if (partialState) { - partialState = null; - return resolveKeyEvent(evt); - } else if (Object.keys(handler).length > 0) { - partialState = handler; - evt.preventDefault(); - return null; - } else { - return null; - } - } else if (handler.scope && handler.scope !== "*") { - var target = evt.target; - while (target.nodeName !== 'BODY' && target.id !== handler.scope) { - target = target.parentElement; - } - if (target.nodeName === 'BODY') { - handler = null; - } - } - partialState = null; - return handler; - } else if (partialState) { - partialState = null; - return resolveKeyEvent(evt); - } - } - d3.select(window).on("keydown",function() { - if (metaKeyCodes[d3.event.keyCode]) { - return; - } - var handler = resolveKeyEvent(d3.event); - if (handler && handler.ondown) { - if (typeof handler.ondown === "string") { - RED.actions.invoke(handler.ondown); - } else { - handler.ondown(); - } - d3.event.preventDefault(); - } - }); - - function addHandler(scope,key,modifiers,ondown) { - var mod = modifiers; - var cbdown = ondown; - if (typeof modifiers == "function" || typeof modifiers === "string") { - mod = {}; - cbdown = modifiers; - } - var keys = []; - var i=0; - if (typeof key === 'string') { - if (typeof cbdown === 'string') { - actionToKeyMap[cbdown] = {scope:scope,key:key}; - if (typeof ondown === 'boolean') { - actionToKeyMap[cbdown].user = ondown; - } - } - var parts = key.split(" "); - for (i=0;i<parts.length;i++) { - var parsedKey = parseKeySpecifier(parts[i]); - if (parsedKey) { - keys.push(parsedKey); - } else { - return; - } - } - } else { - keys.push([key,mod]) - } - var slot = handlers; - for (i=0;i<keys.length;i++) { - key = keys[i][0]; - mod = keys[i][1]; - if (mod.ctrl) { - slot.ctrl = slot.ctrl||{}; - slot = slot.ctrl; - } - if (mod.shift) { - slot.shift = slot.shift||{}; - slot = slot.shift; - } - if (mod.alt) { - slot.alt = slot.alt||{}; - slot = slot.alt; - } - slot[key] = slot[key] || {}; - slot = slot[key]; - //slot[key] = {scope: scope, ondown:cbdown}; - } - slot.scope = scope; - slot.ondown = cbdown; - } - - function removeHandler(key,modifiers) { - var mod = modifiers || {}; - var keys = []; - var i=0; - if (typeof key === 'string') { - - var parts = key.split(" "); - for (i=0;i<parts.length;i++) { - var parsedKey = parseKeySpecifier(parts[i]); - if (parsedKey) { - keys.push(parsedKey); - } else { - console.log("Unrecognised key specifier:",key) - return; - } - } - } else { - keys.push([key,mod]) - } - var slot = handlers; - for (i=0;i<keys.length;i++) { - key = keys[i][0]; - mod = keys[i][1]; - if (mod.ctrl) { - slot = slot.ctrl; - } - if (slot && mod.shift) { - slot = slot.shift; - } - if (slot && mod.alt) { - slot = slot.alt; - } - if (!slot[key]) { - return; - } - slot = slot[key]; - } - if (typeof slot.ondown === "string") { - if (typeof modifiers === 'boolean' && modifiers) { - actionToKeyMap[slot.ondown] = {user: modifiers} - } else { - delete actionToKeyMap[slot.ondown]; - } - } - delete slot.scope; - delete slot.ondown; - } - - var cmdCtrlKey = '<span class="help-key">'+(isMac?'&#8984;':'Ctrl')+'</span>'; - - function formatKey(key) { - var formattedKey = isMac?key.replace(/ctrl-?/,"&#8984;"):key; - formattedKey = isMac?formattedKey.replace(/alt-?/,"&#8997;"):key; - formattedKey = formattedKey.replace(/shift-?/,"&#8679;") - formattedKey = formattedKey.replace(/left/,"&#x2190;") - formattedKey = formattedKey.replace(/up/,"&#x2191;") - formattedKey = formattedKey.replace(/right/,"&#x2192;") - formattedKey = formattedKey.replace(/down/,"&#x2193;") - return '<span class="help-key-block"><span class="help-key">'+formattedKey.split(" ").join('</span> <span class="help-key">')+'</span></span>'; - } - - function validateKey(key) { - key = key.trim(); - var parts = key.split(" "); - for (i=0;i<parts.length;i++) { - var parsedKey = parseKeySpecifier(parts[i]); - if (!parsedKey) { - return false; - } - } - return true; - } - - function editShortcut(e) { - e.preventDefault(); - var container = $(this); - var object = container.data('data'); - - - if (!container.hasClass('keyboard-shortcut-entry-expanded')) { - endEditShortcut(); - - var key = container.find(".keyboard-shortcut-entry-key"); - var scope = container.find(".keyboard-shortcut-entry-scope"); - container.addClass('keyboard-shortcut-entry-expanded'); - - var keyInput = $('<input type="text">').attr('placeholder',RED._('keyboard.unassigned')).val(object.key||"").appendTo(key); - keyInput.on("keyup",function(e) { - if (e.keyCode === 13) { - return endEditShortcut(); - } - var currentVal = $(this).val(); - currentVal = currentVal.trim(); - var valid = (currentVal === "" || RED.keyboard.validateKey(currentVal)); - $(this).toggleClass("input-error",!valid); - }) - - var scopeSelect = $('<select><option value="*" data-i18n="keyboard.global"></option><option value="workspace" data-i18n="keyboard.workspace"></option></select>').appendTo(scope); - scopeSelect.i18n(); - scopeSelect.val(object.scope||'*'); - - var div = $('<div class="keyboard-shortcut-edit button-group-vertical"></div>').appendTo(scope); - var okButton = $('<button class="editor-button editor-button-small"><i class="fa fa-check"></i></button>').appendTo(div); - var revertButton = $('<button class="editor-button editor-button-small"><i class="fa fa-reply"></i></button>').appendTo(div); - - okButton.click(function(e) { - e.stopPropagation(); - endEditShortcut(); - }); - revertButton.click(function(e) { - e.stopPropagation(); - RED.keyboard.revertToDefault(object.id); - container.empty(); - container.removeClass('keyboard-shortcut-entry-expanded'); - var shortcut = RED.keyboard.getShortcut(object.id); - var userKeymap = RED.settings.get('keymap') || {}; - - var currentEditorSettings = RED.settings.get('editor') || {}; - var userKeymap = currentEditorSettings.keymap || {}; - userKeymap[object.id] = null; - currentEditorSettings.keymap = userKeymap; - RED.settings.set('editor',currentEditorSettings); - - var obj = { - id:object.id, - scope:shortcut?shortcut.scope:undefined, - key:shortcut?shortcut.key:undefined, - user:shortcut?shortcut.user:undefined - } - buildShortcutRow(container,obj); - }) - - keyInput.focus(); - } - } - - function endEditShortcut(cancel) { - var container = $('.keyboard-shortcut-entry-expanded'); - if (container.length === 1) { - var object = container.data('data'); - var keyInput = container.find(".keyboard-shortcut-entry-key input"); - var scopeSelect = container.find(".keyboard-shortcut-entry-scope select"); - if (!cancel) { - var key = keyInput.val().trim(); - var scope = scopeSelect.val(); - var valid = (key === "" || RED.keyboard.validateKey(key)); - if (valid) { - var current = RED.keyboard.getShortcut(object.id); - if ((!current && key) || (current && (current.scope !== scope || current.key !== key))) { - var keyDiv = container.find(".keyboard-shortcut-entry-key"); - var scopeDiv = container.find(".keyboard-shortcut-entry-scope"); - keyDiv.empty(); - scopeDiv.empty(); - if (object.key) { - RED.keyboard.remove(object.key,true); - } - container.find(".keyboard-shortcut-entry-text i").css("opacity",1); - if (key === "") { - keyDiv.parent().addClass("keyboard-shortcut-entry-unassigned"); - keyDiv.append($('<span>').text(RED._('keyboard.unassigned')) ); - delete object.key; - delete object.scope; - } else { - keyDiv.parent().removeClass("keyboard-shortcut-entry-unassigned"); - keyDiv.append(RED.keyboard.formatKey(key)) - $("<span>").text(scope).appendTo(scopeDiv); - object.key = key; - object.scope = scope; - RED.keyboard.add(object.scope,object.key,object.id,true); - } - - var currentEditorSettings = RED.settings.get('editor') || {}; - var userKeymap = currentEditorSettings.keymap || {}; - userKeymap[object.id] = RED.keyboard.getShortcut(object.id); - currentEditorSettings.keymap = userKeymap; - RED.settings.set('editor',currentEditorSettings); - } - } - } - keyInput.remove(); - scopeSelect.remove(); - $('.keyboard-shortcut-edit').remove(); - container.removeClass('keyboard-shortcut-entry-expanded'); - } - } - - function buildShortcutRow(container,object) { - var item = $('<div class="keyboard-shortcut-entry">').appendTo(container); - container.data('data',object); - - var text = object.id.replace(/(^.+:([a-z]))|(-([a-z]))/g,function() { - if (arguments[5] === 0) { - return arguments[2].toUpperCase(); - } else { - return " "+arguments[4].toUpperCase(); - } - }); - var label = $('<div>').addClass("keyboard-shortcut-entry-text").text(text).appendTo(item); - - var user = $('<i class="fa fa-user"></i>').prependTo(label); - - if (!object.user) { - user.css("opacity",0); - } - - var key = $('<div class="keyboard-shortcut-entry-key">').appendTo(item); - if (object.key) { - key.append(RED.keyboard.formatKey(object.key)); - } else { - item.addClass("keyboard-shortcut-entry-unassigned"); - key.append($('<span>').text(RED._('keyboard.unassigned')) ); - } - - var scope = $('<div class="keyboard-shortcut-entry-scope">').appendTo(item); - - $("<span>").text(object.scope === '*'?'global':object.scope||"").appendTo(scope); - container.click(editShortcut); - } - - function getSettingsPane() { - var pane = $('<div id="user-settings-tab-keyboard"></div>'); - - $('<div class="keyboard-shortcut-entry keyboard-shortcut-list-header">'+ - '<div class="keyboard-shortcut-entry-key keyboard-shortcut-entry-text"><input id="user-settings-tab-keyboard-filter" type="text" data-i18n="[placeholder]keyboard.filterActions"></div>'+ - '<div class="keyboard-shortcut-entry-key" data-i18n="keyboard.shortcut"></div>'+ - '<div class="keyboard-shortcut-entry-scope" data-i18n="keyboard.scope"></div>'+ - '</div>').appendTo(pane); - - pane.find("input").searchBox({ - delay: 100, - change: function() { - var filterValue = $(this).val().trim(); - if (filterValue === "") { - shortcutList.editableList('filter', null); - } else { - filterValue = filterValue.replace(/\s/g,""); - shortcutList.editableList('filter', function(data) { - return data.id.toLowerCase().replace(/^.*:/,"").replace("-","").indexOf(filterValue) > -1; - }) - } - } - }); - - var shortcutList = $('<ol class="keyboard-shortcut-list"></ol>').css({ - position: "absolute", - top: "32px", - bottom: "0", - left: "0", - right: "0" - }).appendTo(pane).editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(container,i,object) { - buildShortcutRow(container,object); - }, - - }); - var shortcuts = RED.actions.list(); - shortcuts.sort(function(A,B) { - var Aid = A.id.replace(/^.*:/,"").replace(/[ -]/g,"").toLowerCase(); - var Bid = B.id.replace(/^.*:/,"").replace(/[ -]/g,"").toLowerCase(); - return Aid.localeCompare(Bid); - }); - shortcuts.forEach(function(s) { - shortcutList.editableList('addItem',s); - }); - return pane; - } - - return { - init: init, - add: addHandler, - remove: removeHandler, - getShortcut: function(actionName) { - return actionToKeyMap[actionName]; - }, - revertToDefault: revertToDefault, - formatKey: formatKey, - validateKey: validateKey - } - -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - - -RED.workspaces = (function() { - - var activeWorkspace = 0; - var workspaceIndex = 0; - - function addWorkspace(ws,skipHistoryEntry) { - if (ws) { - workspace_tabs.addTab(ws); - workspace_tabs.resize(); - } else { - var tabId = RED.nodes.id(); - do { - workspaceIndex += 1; - } while ($("#workspace-tabs a[title='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0); - - ws = {type:"tab",id:tabId,disabled: false,info:"",label:RED._('workspace.defaultName',{number:workspaceIndex})}; - RED.nodes.addWorkspace(ws); - workspace_tabs.addTab(ws); - workspace_tabs.activateTab(tabId); - if (!skipHistoryEntry) { - RED.history.push({t:'add',workspaces:[ws],dirty:RED.nodes.dirty()}); - RED.nodes.dirty(true); - } - } - RED.view.focus(); - return ws; - } - function deleteWorkspace(ws) { - if (workspaceTabCount === 1) { - return; - } - removeWorkspace(ws); - var historyEvent = RED.nodes.removeWorkspace(ws.id); - historyEvent.t = 'delete'; - historyEvent.dirty = RED.nodes.dirty(); - historyEvent.workspaces = [ws]; - RED.history.push(historyEvent); - RED.nodes.dirty(true); - RED.sidebar.config.refresh(); - } - - function showRenameWorkspaceDialog(id) { - var workspace = RED.nodes.workspace(id); - RED.view.state(RED.state.EDITING); - var tabflowEditor; - var trayOptions = { - title: RED._("workspace.editFlow",{name:workspace.label}), - buttons: [ - { - id: "node-dialog-delete", - class: 'leftButton'+((workspaceTabCount === 1)?" disabled":""), - text: RED._("common.label.delete"), //'<i class="fa fa-trash"></i>', - click: function() { - deleteWorkspace(workspace); - RED.tray.close(); - } - }, - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - class: "primary", - text: RED._("common.label.done"), - click: function() { - var label = $( "#node-input-name" ).val(); - var changed = false; - var changes = {}; - if (workspace.label != label) { - changes.label = workspace.label; - changed = true; - workspace.label = label; - workspace_tabs.renameTab(workspace.id,label); - } - var disabled = $("#node-input-disabled").prop("checked"); - if (workspace.disabled !== disabled) { - changes.disabled = workspace.disabled; - changed = true; - workspace.disabled = disabled; - } - var info = tabflowEditor.getValue(); - if (workspace.info !== info) { - changes.info = workspace.info; - changed = true; - workspace.info = info; - } - $("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('workspace-disabled',workspace.disabled); - // $("#workspace").toggleClass("workspace-disabled",workspace.disabled); - - if (changed) { - var historyEvent = { - t: "edit", - changes:changes, - node: workspace, - dirty: RED.nodes.dirty() - } - workspace.changed = true; - RED.history.push(historyEvent); - RED.nodes.dirty(true); - RED.sidebar.config.refresh(); - var selection = RED.view.selection(); - if (!selection.nodes && !selection.links) { - RED.sidebar.info.refresh(workspace); - } - } - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - var rows = $("#dialog-form>div:not(.node-text-editor-row)"); - var editorRow = $("#dialog-form>div.node-text-editor-row"); - var height = $("#dialog-form").height(); - for (var i=0; i<rows.size(); i++) { - height -= $(rows[i]).outerHeight(true); - } - height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom"))); - height -= 28; - $(".node-text-editor").css("height",height+"px"); - tabflowEditor.resize(); - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var dialogForm = $('<form id="dialog-form" class="form-horizontal"></form>').appendTo(trayBody); - $('<div class="form-row">'+ - '<label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label>'+ - '<input type="text" id="node-input-name">'+ - '</div>').appendTo(dialogForm); - - $('<div class="form-row">'+ - '<label for="node-input-disabled-btn" data-i18n="editor:workspace.status"></label>'+ - '<button id="node-input-disabled-btn" class="editor-button"><i class="fa fa-toggle-on"></i> <span id="node-input-disabled-label"></span></button> '+ - '<input type="checkbox" id="node-input-disabled" style="display: none;"/>'+ - '</div>').appendTo(dialogForm); - - $('<div class="form-row node-text-editor-row">'+ - '<label for="node-input-info" data-i18n="editor:workspace.info" style="width:300px;"></label>'+ - '<div style="height:250px;" class="node-text-editor" id="node-input-info"></div>'+ - '</div>').appendTo(dialogForm); - tabflowEditor = RED.editor.createEditor({ - id: 'node-input-info', - mode: 'ace/mode/markdown', - value: "" - }); - - $('<div class="form-tips" data-i18n="editor:workspace.tip"></div>').appendTo(dialogForm); - - dialogForm.find('#node-input-disabled-btn').on("click",function(e) { - var i = $(this).find("i"); - if (i.hasClass('fa-toggle-off')) { - i.addClass('fa-toggle-on'); - i.removeClass('fa-toggle-off'); - $("#node-input-disabled").prop("checked",false); - $("#node-input-disabled-label").text(RED._("editor:workspace.enabled")); - } else { - i.addClass('fa-toggle-off'); - i.removeClass('fa-toggle-on'); - $("#node-input-disabled").prop("checked",true); - $("#node-input-disabled-label").text(RED._("editor:workspace.disabled")); - } - }) - - if (workspace.hasOwnProperty("disabled")) { - $("#node-input-disabled").prop("checked",workspace.disabled); - if (workspace.disabled) { - dialogForm.find("#node-input-disabled-btn i").removeClass('fa-toggle-on').addClass('fa-toggle-off'); - $("#node-input-disabled-label").text(RED._("editor:workspace.disabled")); - } else { - $("#node-input-disabled-label").text(RED._("editor:workspace.enabled")); - } - } else { - workspace.disabled = false; - $("#node-input-disabled-label").text(RED._("editor:workspace.enabled")); - } - - $('<input type="text" style="display: none;" />').prependTo(dialogForm); - dialogForm.submit(function(e) { e.preventDefault();}); - $("#node-input-name").val(workspace.label); - RED.text.bidi.prepareInput($("#node-input-name")); - tabflowEditor.getSession().setValue(workspace.info || "", -1); - dialogForm.i18n(); - }, - close: function() { - if (RED.view.state() != RED.state.IMPORT_DRAGGING) { - RED.view.state(RED.state.DEFAULT); - } - RED.sidebar.info.refresh(workspace); - tabflowEditor.destroy(); - } - } - RED.tray.show(trayOptions); - } - - - var workspace_tabs; - var workspaceTabCount = 0; - function createWorkspaceTabs() { - workspace_tabs = RED.tabs.create({ - id: "workspace-tabs", - onchange: function(tab) { - var event = { - old: activeWorkspace - } - activeWorkspace = tab.id; - event.workspace = activeWorkspace; - // $("#workspace").toggleClass("workspace-disabled",tab.disabled); - RED.events.emit("workspace:change",event); - window.location.hash = 'flow/'+tab.id; - RED.sidebar.config.refresh(); - RED.view.focus(); - }, - onclick: function(tab) { - RED.view.focus(); - }, - ondblclick: function(tab) { - if (tab.type != "subflow") { - showRenameWorkspaceDialog(tab.id); - } else { - RED.editor.editSubflow(RED.nodes.subflow(tab.id)); - } - }, - onadd: function(tab) { - if (tab.type === "tab") { - workspaceTabCount++; - } - $('<span class="workspace-disabled-icon"><i class="fa fa-ban"></i> </span>').prependTo("#red-ui-tab-"+(tab.id.replace(".","-"))+" .red-ui-tab-label"); - if (tab.disabled) { - $("#red-ui-tab-"+(tab.id.replace(".","-"))).addClass('workspace-disabled'); - } - RED.menu.setDisabled("menu-item-workspace-delete",workspaceTabCount <= 1); - if (workspaceTabCount === 1) { - showWorkspace(); - } - }, - onremove: function(tab) { - if (tab.type === "tab") { - workspaceTabCount--; - } - RED.menu.setDisabled("menu-item-workspace-delete",workspaceTabCount <= 1); - if (workspaceTabCount === 0) { - hideWorkspace(); - } - }, - onreorder: function(oldOrder, newOrder) { - RED.history.push({t:'reorder',order:oldOrder,dirty:RED.nodes.dirty()}); - RED.nodes.dirty(true); - setWorkspaceOrder(newOrder); - }, - minimumActiveTabWidth: 150, - scrollable: true, - addButton: function() { - addWorkspace(); - } - }); - workspaceTabCount = 0; - } - function showWorkspace() { - $("#workspace .red-ui-tabs").show() - $("#chart").show() - $("#workspace-footer").children().show() - } - function hideWorkspace() { - $("#workspace .red-ui-tabs").hide() - $("#chart").hide() - $("#workspace-footer").children().hide() - } - - function init() { - createWorkspaceTabs(); - RED.events.on("sidebar:resize",workspace_tabs.resize); - - RED.actions.add("core:show-next-tab",workspace_tabs.nextTab); - RED.actions.add("core:show-previous-tab",workspace_tabs.previousTab); - - RED.menu.setAction('menu-item-workspace-delete',function() { - deleteWorkspace(RED.nodes.workspace(activeWorkspace)); - }); - - $(window).resize(function() { - workspace_tabs.resize(); - }); - - RED.actions.add("core:add-flow",addWorkspace); - RED.actions.add("core:edit-flow",editWorkspace); - RED.actions.add("core:remove-flow",removeWorkspace); - - hideWorkspace(); - } - - function editWorkspace(id) { - showRenameWorkspaceDialog(id||activeWorkspace); - } - - function removeWorkspace(ws) { - if (!ws) { - deleteWorkspace(RED.nodes.workspace(activeWorkspace)); - } else { - if (workspace_tabs.contains(ws.id)) { - workspace_tabs.removeTab(ws.id); - } - } - if (ws.id === activeWorkspace) { - activeWorkspace = 0; - } - } - - function setWorkspaceOrder(order) { - RED.nodes.setWorkspaceOrder(order.filter(function(id) { - return RED.nodes.workspace(id) !== undefined; - })); - workspace_tabs.order(order); - } - - return { - init: init, - add: addWorkspace, - remove: removeWorkspace, - order: setWorkspaceOrder, - edit: editWorkspace, - contains: function(id) { - return workspace_tabs.contains(id); - }, - count: function() { - return workspaceTabCount; - }, - active: function() { - return activeWorkspace - }, - show: function(id) { - if (!workspace_tabs.contains(id)) { - var sf = RED.nodes.subflow(id); - if (sf) { - addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.png",label:sf.name, closeable: true}); - } else { - return; - } - } - workspace_tabs.activateTab(id); - }, - refresh: function() { - RED.nodes.eachWorkspace(function(ws) { - workspace_tabs.renameTab(ws.id,ws.label); - - }) - RED.nodes.eachSubflow(function(sf) { - if (workspace_tabs.contains(sf.id)) { - workspace_tabs.renameTab(sf.id,sf.name); - } - }); - RED.sidebar.config.refresh(); - }, - resize: function() { - workspace_tabs.resize(); - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - - -RED.view = (function() { - var space_width = 5000, - space_height = 5000, - lineCurveScale = 0.75, - scaleFactor = 1, - node_width = 100, - node_height = 30; - - var touchLongPressTimeout = 1000, - startTouchDistance = 0, - startTouchCenter = [], - moveTouchCenter = [], - touchStartTime = 0; - - var workspaceScrollPositions = {}; - - var gridSize = 20; - var snapGrid = false; - - var activeSpliceLink; - var spliceActive = false; - var spliceTimer; - - var activeSubflow = null; - var activeNodes = []; - var activeLinks = []; - var activeFlowLinks = []; - - var selected_link = null, - mousedown_link = null, - mousedown_node = null, - mousedown_port_type = null, - mousedown_port_index = 0, - mouseup_node = null, - mouse_offset = [0,0], - mouse_position = null, - mouse_mode = 0, - moving_set = [], - lasso = null, - showStatus = false, - lastClickNode = null, - dblClickPrimed = null, - clickTime = 0, - clickElapsed = 0, - scroll_position = [], - quickAddActive = false, - quickAddLink = null; - - var clipboard = ""; - - var status_colours = { - "red": "#c00", - "green": "#5a8", - "yellow": "#F9DF31", - "blue": "#53A3F3", - "grey": "#d3d3d3" - } - - var PORT_TYPE_INPUT = 1; - var PORT_TYPE_OUTPUT = 0; - - var chart = $("#chart"); - - var outer = d3.select("#chart") - .append("svg:svg") - .attr("width", space_width) - .attr("height", space_height) - .attr("pointer-events", "all") - .style("cursor","crosshair") - .on("mousedown", function() { - focusView(); - }) - .on("contextmenu", function(){ - d3.event.preventDefault(); - }); - - var vis = outer - .append("svg:g") - .on("dblclick.zoom", null) - .append("svg:g") - .attr('class','innerCanvas') - .on("mousemove", canvasMouseMove) - .on("mousedown", canvasMouseDown) - .on("mouseup", canvasMouseUp) - .on("mouseenter", function() { - if (lasso) { - if (d3.event.buttons !== 1) { - lasso.remove(); - lasso = null; - } - } else if (mouse_mode === RED.state.PANNING && d3.event.buttons !== 4) { - resetMouseVars(); - } - }) - .on("touchend", function() { - clearTimeout(touchStartTime); - touchStartTime = null; - if (RED.touch.radialMenu.active()) { - return; - } - if (lasso) { - outer_background.attr("fill","#fff"); - } - canvasMouseUp.call(this); - }) - .on("touchcancel", canvasMouseUp) - .on("touchstart", function() { - var touch0; - if (d3.event.touches.length>1) { - clearTimeout(touchStartTime); - touchStartTime = null; - d3.event.preventDefault(); - touch0 = d3.event.touches.item(0); - var touch1 = d3.event.touches.item(1); - var a = touch0["pageY"]-touch1["pageY"]; - var b = touch0["pageX"]-touch1["pageX"]; - - var offset = $("#chart").offset(); - var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; - startTouchCenter = [ - (touch1["pageX"]+(b/2)-offset.left+scrollPos[0])/scaleFactor, - (touch1["pageY"]+(a/2)-offset.top+scrollPos[1])/scaleFactor - ]; - moveTouchCenter = [ - touch1["pageX"]+(b/2), - touch1["pageY"]+(a/2) - ] - startTouchDistance = Math.sqrt((a*a)+(b*b)); - } else { - var obj = d3.select(document.body); - touch0 = d3.event.touches.item(0); - var pos = [touch0.pageX,touch0.pageY]; - startTouchCenter = [touch0.pageX,touch0.pageY]; - startTouchDistance = 0; - var point = d3.touches(this)[0]; - touchStartTime = setTimeout(function() { - touchStartTime = null; - showTouchMenu(obj,pos); - //lasso = vis.append("rect") - // .attr("ox",point[0]) - // .attr("oy",point[1]) - // .attr("rx",2) - // .attr("ry",2) - // .attr("x",point[0]) - // .attr("y",point[1]) - // .attr("width",0) - // .attr("height",0) - // .attr("class","lasso"); - //outer_background.attr("fill","#e3e3f3"); - },touchLongPressTimeout); - } - }) - .on("touchmove", function(){ - if (RED.touch.radialMenu.active()) { - d3.event.preventDefault(); - return; - } - var touch0; - if (d3.event.touches.length<2) { - if (touchStartTime) { - touch0 = d3.event.touches.item(0); - var dx = (touch0.pageX-startTouchCenter[0]); - var dy = (touch0.pageY-startTouchCenter[1]); - var d = Math.abs(dx*dx+dy*dy); - if (d > 64) { - clearTimeout(touchStartTime); - touchStartTime = null; - } - } else if (lasso) { - d3.event.preventDefault(); - } - canvasMouseMove.call(this); - } else { - touch0 = d3.event.touches.item(0); - var touch1 = d3.event.touches.item(1); - var a = touch0["pageY"]-touch1["pageY"]; - var b = touch0["pageX"]-touch1["pageX"]; - var offset = $("#chart").offset(); - var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; - var moveTouchDistance = Math.sqrt((a*a)+(b*b)); - var touchCenter = [ - touch1["pageX"]+(b/2), - touch1["pageY"]+(a/2) - ]; - - if (!isNaN(moveTouchDistance)) { - oldScaleFactor = scaleFactor; - scaleFactor = Math.min(2,Math.max(0.3, scaleFactor + (Math.floor(((moveTouchDistance*100)-(startTouchDistance*100)))/10000))); - - var deltaTouchCenter = [ // Try to pan whilst zooming - not 100% - startTouchCenter[0]*(scaleFactor-oldScaleFactor),//-(touchCenter[0]-moveTouchCenter[0]), - startTouchCenter[1]*(scaleFactor-oldScaleFactor) //-(touchCenter[1]-moveTouchCenter[1]) - ]; - - startTouchDistance = moveTouchDistance; - moveTouchCenter = touchCenter; - - $("#chart").scrollLeft(scrollPos[0]+deltaTouchCenter[0]); - $("#chart").scrollTop(scrollPos[1]+deltaTouchCenter[1]); - redraw(); - } - } - }); - - var outer_background = vis.append("svg:rect") - .attr("width", space_width) - .attr("height", space_height) - .attr("fill","#fff"); - - var grid = vis.append("g"); - updateGrid(); - - function updateGrid() { - var gridTicks = []; - for (var i=0;i<space_width;i+=+gridSize) { - gridTicks.push(i); - } - grid.selectAll("line.horizontal").remove(); - grid.selectAll("line.horizontal").data(gridTicks).enter() - .append("line") - .attr( - { - "class":"horizontal", - "x1" : 0, - "x2" : space_width, - "y1" : function(d){ return d;}, - "y2" : function(d){ return d;}, - "fill" : "none", - "shape-rendering" : "crispEdges", - "stroke" : "#eee", - "stroke-width" : "1px" - }); - grid.selectAll("line.vertical").remove(); - grid.selectAll("line.vertical").data(gridTicks).enter() - .append("line") - .attr( - { - "class":"vertical", - "y1" : 0, - "y2" : space_width, - "x1" : function(d){ return d;}, - "x2" : function(d){ return d;}, - "fill" : "none", - "shape-rendering" : "crispEdges", - "stroke" : "#eee", - "stroke-width" : "1px" - }); - } - - var dragGroup = vis.append("g"); - var drag_lines = []; - - function showDragLines(nodes) { - for (var i=0;i<nodes.length;i++) { - var node = nodes[i]; - node.el = dragGroup.append("svg:path").attr("class", "drag_line"); - drag_lines.push(node); - } - - } - function hideDragLines() { - while(drag_lines.length) { - var line = drag_lines.pop(); - if (line.el) { - line.el.remove(); - } - } - } - - function updateActiveNodes() { - var activeWorkspace = RED.workspaces.active(); - - activeNodes = RED.nodes.filterNodes({z:activeWorkspace}); - - activeLinks = RED.nodes.filterLinks({ - source:{z:activeWorkspace}, - target:{z:activeWorkspace} - }); - } - - function init() { - - RED.events.on("workspace:change",function(event) { - if (event.old !== 0) { - workspaceScrollPositions[event.old] = { - left:chart.scrollLeft(), - top:chart.scrollTop() - }; - } - var scrollStartLeft = chart.scrollLeft(); - var scrollStartTop = chart.scrollTop(); - - activeSubflow = RED.nodes.subflow(event.workspace); - - RED.menu.setDisabled("menu-item-workspace-edit", activeSubflow); - RED.menu.setDisabled("menu-item-workspace-delete",RED.workspaces.count() == 1 || activeSubflow); - - if (workspaceScrollPositions[event.workspace]) { - chart.scrollLeft(workspaceScrollPositions[event.workspace].left); - chart.scrollTop(workspaceScrollPositions[event.workspace].top); - } else { - chart.scrollLeft(0); - chart.scrollTop(0); - } - var scrollDeltaLeft = chart.scrollLeft() - scrollStartLeft; - var scrollDeltaTop = chart.scrollTop() - scrollStartTop; - if (mouse_position != null) { - mouse_position[0] += scrollDeltaLeft; - mouse_position[1] += scrollDeltaTop; - } - clearSelection(); - RED.nodes.eachNode(function(n) { - n.dirty = true; - }); - updateSelection(); - updateActiveNodes(); - redraw(); - }); - - RED.view.navigator.init(); - - $("#btn-zoom-out").click(function() {zoomOut();}); - $("#btn-zoom-zero").click(function() {zoomZero();}); - $("#btn-zoom-in").click(function() {zoomIn();}); - $("#chart").on("DOMMouseScroll mousewheel", function (evt) { - if ( evt.altKey ) { - evt.preventDefault(); - evt.stopPropagation(); - var move = -(evt.originalEvent.detail) || evt.originalEvent.wheelDelta; - if (move <= 0) { zoomOut(); } - else { zoomIn(); } - } - }); - - // Handle nodes dragged from the palette - $("#chart").droppable({ - accept:".palette_node", - drop: function( event, ui ) { - d3.event = event; - var selected_tool = ui.draggable[0].type; - var result = addNode(selected_tool); - if (!result) { - return; - } - var historyEvent = result.historyEvent; - var nn = result.node; - - var helperOffset = d3.touches(ui.helper.get(0))[0]||d3.mouse(ui.helper.get(0)); - var mousePos = d3.touches(this)[0]||d3.mouse(this); - - mousePos[1] += this.scrollTop + ((nn.h/2)-helperOffset[1]); - mousePos[0] += this.scrollLeft + ((nn.w/2)-helperOffset[0]); - mousePos[1] /= scaleFactor; - mousePos[0] /= scaleFactor; - - if (snapGrid) { - mousePos[0] = gridSize*(Math.ceil(mousePos[0]/gridSize)); - mousePos[1] = gridSize*(Math.ceil(mousePos[1]/gridSize)); - } - nn.x = mousePos[0]; - nn.y = mousePos[1]; - - var spliceLink = $(ui.helper).data("splice"); - if (spliceLink) { - // TODO: DRY - droppable/nodeMouseDown/canvasMouseUp - RED.nodes.removeLink(spliceLink); - var link1 = { - source:spliceLink.source, - sourcePort:spliceLink.sourcePort, - target: nn - }; - var link2 = { - source:nn, - sourcePort:0, - target: spliceLink.target - }; - RED.nodes.addLink(link1); - RED.nodes.addLink(link2); - historyEvent.links = [link1,link2]; - historyEvent.removedLinks = [spliceLink]; - } - - RED.history.push(historyEvent); - RED.nodes.add(nn); - RED.editor.validateNode(nn); - RED.nodes.dirty(true); - // auto select dropped node - so info shows (if visible) - clearSelection(); - nn.selected = true; - moving_set.push({n:nn}); - updateActiveNodes(); - updateSelection(); - redraw(); - - if (nn._def.autoedit) { - RED.editor.edit(nn); - } - } - }); - $("#chart").focus(function() { - $("#workspace-tabs").addClass("workspace-focussed"); - }); - $("#chart").blur(function() { - $("#workspace-tabs").removeClass("workspace-focussed"); - }); - - RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection); - RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection();deleteSelection();}); - RED.actions.add("core:paste-from-internal-clipboard",function(){importNodes(clipboard);}); - RED.actions.add("core:delete-selection",deleteSelection); - RED.actions.add("core:edit-selected-node",editSelection); - RED.actions.add("core:undo",RED.history.pop); - RED.actions.add("core:select-all-nodes",selectAll); - RED.actions.add("core:zoom-in",zoomIn); - RED.actions.add("core:zoom-out",zoomOut); - RED.actions.add("core:zoom-reset",zoomZero); - - RED.actions.add("core:toggle-show-grid",function(state) { - if (state === undefined) { - RED.userSettings.toggle("view-show-grid"); - } else { - toggleShowGrid(state); - } - }); - RED.actions.add("core:toggle-snap-grid",function(state) { - if (state === undefined) { - RED.userSettings.toggle("view-snap-grid"); - } else { - toggleSnapGrid(state); - } - }); - RED.actions.add("core:toggle-status",function(state) { - if (state === undefined) { - RED.userSettings.toggle("view-node-status"); - } else { - toggleStatus(state); - } - }); - - RED.actions.add("core:move-selection-up", function() { moveSelection(0,-1);}); - RED.actions.add("core:step-selection-up", function() { moveSelection(0,-20);}); - RED.actions.add("core:move-selection-right", function() { moveSelection(1,0);}); - RED.actions.add("core:step-selection-right", function() { moveSelection(20,0);}); - RED.actions.add("core:move-selection-down", function() { moveSelection(0,1);}); - RED.actions.add("core:step-selection-down", function() { moveSelection(0,20);}); - RED.actions.add("core:move-selection-left", function() { moveSelection(-1,0);}); - RED.actions.add("core:step-selection-left", function() { moveSelection(-20,0);}); - } - - function generateLinkPath(origX,origY, destX, destY, sc) { - var dy = destY-origY; - var dx = destX-origX; - var delta = Math.sqrt(dy*dy+dx*dx); - var scale = lineCurveScale; - var scaleY = 0; - if (dx*sc > 0) { - if (delta < node_width) { - scale = 0.75-0.75*((node_width-delta)/node_width); - // scale += 2*(Math.min(5*node_width,Math.abs(dx))/(5*node_width)); - // if (Math.abs(dy) < 3*node_height) { - // scaleY = ((dy>0)?0.5:-0.5)*(((3*node_height)-Math.abs(dy))/(3*node_height))*(Math.min(node_width,Math.abs(dx))/(node_width)) ; - // } - } - } else { - scale = 0.4-0.2*(Math.max(0,(node_width-Math.min(Math.abs(dx),Math.abs(dy)))/node_width)); - } - if (dx*sc > 0) { - return "M "+origX+" "+origY+ - " C "+(origX+sc*(node_width*scale))+" "+(origY+scaleY*node_height)+" "+ - (destX-sc*(scale)*node_width)+" "+(destY-scaleY*node_height)+" "+ - destX+" "+destY - } else { - - var midX = Math.floor(destX-dx/2); - var midY = Math.floor(destY-dy/2); - // - if (dy === 0) { - midY = destY + node_height; - } - var cp_height = node_height/2; - var y1 = (destY + midY)/2 - var topX =origX + sc*node_width*scale; - var topY = dy>0?Math.min(y1 - dy/2 , origY+cp_height):Math.max(y1 - dy/2 , origY-cp_height); - var bottomX = destX - sc*node_width*scale; - var bottomY = dy>0?Math.max(y1, destY-cp_height):Math.min(y1, destY+cp_height); - var x1 = (origX+topX)/2; - var scy = dy>0?1:-1; - var cp = [ - // Orig -> Top - [x1,origY], - [topX,dy>0?Math.max(origY, topY-cp_height):Math.min(origY, topY+cp_height)], - // Top -> Mid - // [Mirror previous cp] - [x1,dy>0?Math.min(midY, topY+cp_height):Math.max(midY, topY-cp_height)], - // Mid -> Bottom - // [Mirror previous cp] - [bottomX,dy>0?Math.max(midY, bottomY-cp_height):Math.min(midY, bottomY+cp_height)], - // Bottom -> Dest - // [Mirror previous cp] - [(destX+bottomX)/2,destY] - ]; - if (cp[2][1] === topY+scy*cp_height) { - if (Math.abs(dy) < cp_height*10) { - cp[1][1] = topY-scy*cp_height/2; - cp[3][1] = bottomY-scy*cp_height/2; - } - cp[2][0] = topX; - } - return "M "+origX+" "+origY+ - " C "+ - cp[0][0]+" "+cp[0][1]+" "+ - cp[1][0]+" "+cp[1][1]+" "+ - topX+" "+topY+ - " S "+ - cp[2][0]+" "+cp[2][1]+" "+ - midX+" "+midY+ - " S "+ - cp[3][0]+" "+cp[3][1]+" "+ - bottomX+" "+bottomY+ - " S "+ - cp[4][0]+" "+cp[4][1]+" "+ - destX+" "+destY - } - } - - - function addNode(type,x,y) { - var m = /^subflow:(.+)$/.exec(type); - - if (activeSubflow && m) { - var subflowId = m[1]; - if (subflowId === activeSubflow.id) { - RED.notify(RED._("notification.error",{message: RED._("notification.errors.cannotAddSubflowToItself")}),"error"); - return; - } - if (RED.nodes.subflowContains(m[1],activeSubflow.id)) { - RED.notify(RED._("notification.error",{message: RED._("notification.errors.cannotAddCircularReference")}),"error"); - return; - } - } - - var nn = { id:RED.nodes.id(),z:RED.workspaces.active()}; - - nn.type = type; - nn._def = RED.nodes.getType(nn.type); - - if (!m) { - nn.inputs = nn._def.inputs || 0; - nn.outputs = nn._def.outputs; - - for (var d in nn._def.defaults) { - if (nn._def.defaults.hasOwnProperty(d)) { - if (nn._def.defaults[d].value !== undefined) { - nn[d] = JSON.parse(JSON.stringify(nn._def.defaults[d].value)); - } - } - } - - if (nn._def.onadd) { - try { - nn._def.onadd.call(nn); - } catch(err) { - console.log("Definition error: "+nn.type+".onadd:",err); - } - } - } else { - var subflow = RED.nodes.subflow(m[1]); - nn.name = ""; - nn.inputs = subflow.in.length; - nn.outputs = subflow.out.length; - } - - nn.changed = true; - nn.moved = true; - - nn.w = node_width; - nn.h = Math.max(node_height,(nn.outputs||0) * 15); - - var historyEvent = { - t:"add", - nodes:[nn.id], - dirty:RED.nodes.dirty() - } - if (activeSubflow) { - var subflowRefresh = RED.subflow.refresh(true); - if (subflowRefresh) { - historyEvent.subflow = { - id:activeSubflow.id, - changed: activeSubflow.changed, - instances: subflowRefresh.instances - } - } - } - return { - node: nn, - historyEvent: historyEvent - } - - } - - function canvasMouseDown() { - var point; - - if (d3.event.button === 1) { - // Middle Click pan - mouse_mode = RED.state.PANNING; - mouse_position = [d3.event.pageX,d3.event.pageY] - scroll_position = [chart.scrollLeft(),chart.scrollTop()]; - - return; - } - - if (!mousedown_node && !mousedown_link) { - selected_link = null; - updateSelection(); - } - if (mouse_mode === 0) { - if (lasso) { - lasso.remove(); - lasso = null; - } - } - if (mouse_mode === 0 || mouse_mode === RED.state.QUICK_JOINING) { - if (d3.event.metaKey || d3.event.ctrlKey) { - point = d3.mouse(this); - d3.event.stopPropagation(); - var mainPos = $("#main-container").position(); - - if (mouse_mode !== RED.state.QUICK_JOINING) { - mouse_mode = RED.state.QUICK_JOINING; - $(window).on('keyup',disableQuickJoinEventHandler); - } - quickAddActive = true; - RED.typeSearch.show({ - x:d3.event.clientX-mainPos.left-node_width/2, - y:d3.event.clientY-mainPos.top-node_height/2, - cancel: function() { - quickAddActive = false; - resetMouseVars(); - }, - add: function(type) { - quickAddActive = false; - var result = addNode(type); - if (!result) { - return; - } - var nn = result.node; - var historyEvent = result.historyEvent; - nn.x = point[0]; - nn.y = point[1]; - if (mouse_mode === RED.state.QUICK_JOINING || quickAddLink) { - if (quickAddLink || drag_lines.length > 0) { - var drag_line = quickAddLink||drag_lines[0]; - var src = null,dst,src_port; - if (drag_line.portType === PORT_TYPE_OUTPUT && nn.inputs > 0) { - src = drag_line.node; - src_port = drag_line.port; - dst = nn; - } else if (drag_line.portType === PORT_TYPE_INPUT && nn.outputs > 0) { - src = nn; - dst = drag_line.node; - src_port = 0; - } - if (src !== null) { - var link = {source: src, sourcePort:src_port, target: dst}; - RED.nodes.addLink(link); - historyEvent.links = [link]; - hideDragLines(); - if (!quickAddLink && drag_line.portType === PORT_TYPE_OUTPUT && nn.outputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_OUTPUT}]); - } else if (!quickAddLink && drag_line.portType === PORT_TYPE_INPUT && nn.inputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_INPUT}]); - } else { - resetMouseVars(); - } - } else { - hideDragLines(); - resetMouseVars(); - } - } else { - if (nn.outputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_OUTPUT}]); - } else if (nn.inputs > 0) { - showDragLines([{node:nn,port:0,portType:PORT_TYPE_INPUT}]); - } else { - resetMouseVars(); - } - } - quickAddLink = null; - } - - RED.history.push(historyEvent); - RED.nodes.add(nn); - RED.editor.validateNode(nn); - RED.nodes.dirty(true); - // auto select dropped node - so info shows (if visible) - clearSelection(); - nn.selected = true; - moving_set.push({n:nn}); - updateActiveNodes(); - updateSelection(); - redraw(); - } - }); - - updateActiveNodes(); - updateSelection(); - redraw(); - } - } - if (mouse_mode === 0 && !(d3.event.metaKey || d3.event.ctrlKey)) { - if (!touchStartTime) { - point = d3.mouse(this); - lasso = vis.append("rect") - .attr("ox",point[0]) - .attr("oy",point[1]) - .attr("rx",1) - .attr("ry",1) - .attr("x",point[0]) - .attr("y",point[1]) - .attr("width",0) - .attr("height",0) - .attr("class","lasso"); - d3.event.preventDefault(); - } - } - } - - function canvasMouseMove() { - var i; - var node; - // Prevent touch scrolling... - //if (d3.touches(this)[0]) { - // d3.event.preventDefault(); - //} - - // TODO: auto scroll the container - //var point = d3.mouse(this); - //if (point[0]-container.scrollLeft < 30 && container.scrollLeft > 0) { container.scrollLeft -= 15; } - //console.log(d3.mouse(this),container.offsetWidth,container.offsetHeight,container.scrollLeft,container.scrollTop); - - if (mouse_mode === RED.state.PANNING) { - - var pos = [d3.event.pageX,d3.event.pageY]; - var deltaPos = [ - mouse_position[0]-pos[0], - mouse_position[1]-pos[1] - ]; - - chart.scrollLeft(scroll_position[0]+deltaPos[0]) - chart.scrollTop(scroll_position[1]+deltaPos[1]) - return - } - - mouse_position = d3.touches(this)[0]||d3.mouse(this); - - - if (lasso) { - var ox = parseInt(lasso.attr("ox")); - var oy = parseInt(lasso.attr("oy")); - var x = parseInt(lasso.attr("x")); - var y = parseInt(lasso.attr("y")); - var w; - var h; - if (mouse_position[0] < ox) { - x = mouse_position[0]; - w = ox-x; - } else { - w = mouse_position[0]-x; - } - if (mouse_position[1] < oy) { - y = mouse_position[1]; - h = oy-y; - } else { - h = mouse_position[1]-y; - } - lasso - .attr("x",x) - .attr("y",y) - .attr("width",w) - .attr("height",h) - ; - return; - } - - if (mouse_mode != RED.state.QUICK_JOINING && mouse_mode != RED.state.IMPORT_DRAGGING && !mousedown_node && selected_link == null) { - return; - } - - var mousePos; - if (mouse_mode == RED.state.JOINING || mouse_mode === RED.state.QUICK_JOINING) { - // update drag line - if (drag_lines.length === 0 && mousedown_port_type !== null) { - if (d3.event.shiftKey) { - // Get all the wires we need to detach. - var links = []; - var existingLinks = []; - if (selected_link && - ((mousedown_port_type === PORT_TYPE_OUTPUT && - selected_link.source === mousedown_node && - selected_link.sourcePort === mousedown_port_index - ) || - (mousedown_port_type === PORT_TYPE_INPUT && - selected_link.target === mousedown_node - )) - ) { - existingLinks = [selected_link]; - } else { - var filter; - if (mousedown_port_type === PORT_TYPE_OUTPUT) { - filter = { - source:mousedown_node, - sourcePort: mousedown_port_index - } - } else { - filter = { - target: mousedown_node - } - } - existingLinks = RED.nodes.filterLinks(filter); - } - for (i=0;i<existingLinks.length;i++) { - var link = existingLinks[i]; - RED.nodes.removeLink(link); - links.push({ - link:link, - node: (mousedown_port_type===PORT_TYPE_OUTPUT)?link.target:link.source, - port: (mousedown_port_type===PORT_TYPE_OUTPUT)?0:link.sourcePort, - portType: (mousedown_port_type===PORT_TYPE_OUTPUT)?PORT_TYPE_INPUT:PORT_TYPE_OUTPUT - }) - } - if (links.length === 0) { - resetMouseVars(); - redraw(); - } else { - showDragLines(links); - mouse_mode = 0; - updateActiveNodes(); - redraw(); - mouse_mode = RED.state.JOINING; - } - } else if (mousedown_node) { - showDragLines([{node:mousedown_node,port:mousedown_port_index,portType:mousedown_port_type}]); - } - selected_link = null; - } - mousePos = mouse_position; - for (i=0;i<drag_lines.length;i++) { - var drag_line = drag_lines[i]; - var numOutputs = (drag_line.portType === PORT_TYPE_OUTPUT)?(drag_line.node.outputs || 1):1; - var sourcePort = drag_line.port; - var portY = -((numOutputs-1)/2)*13 +13*sourcePort; - - var sc = (drag_line.portType === PORT_TYPE_OUTPUT)?1:-1; - - drag_line.el.attr("d",generateLinkPath(drag_line.node.x+sc*drag_line.node.w/2,drag_line.node.y+portY,mousePos[0],mousePos[1],sc)); - } - d3.event.preventDefault(); - } else if (mouse_mode == RED.state.MOVING) { - mousePos = d3.mouse(document.body); - if (isNaN(mousePos[0])) { - mousePos = d3.touches(document.body)[0]; - } - var d = (mouse_offset[0]-mousePos[0])*(mouse_offset[0]-mousePos[0]) + (mouse_offset[1]-mousePos[1])*(mouse_offset[1]-mousePos[1]); - if (d > 3) { - mouse_mode = RED.state.MOVING_ACTIVE; - clickElapsed = 0; - spliceActive = false; - if (moving_set.length === 1) { - node = moving_set[0]; - spliceActive = node.n.hasOwnProperty("_def") && - node.n._def.inputs > 0 && - node.n._def.outputs > 0 && - RED.nodes.filterLinks({ source: node.n }).length === 0 && - RED.nodes.filterLinks({ target: node.n }).length === 0; - } - } - } else if (mouse_mode == RED.state.MOVING_ACTIVE || mouse_mode == RED.state.IMPORT_DRAGGING) { - mousePos = mouse_position; - var minX = 0; - var minY = 0; - var maxX = space_width; - var maxY = space_height; - for (var n = 0; n<moving_set.length; n++) { - node = moving_set[n]; - if (d3.event.shiftKey) { - node.n.ox = node.n.x; - node.n.oy = node.n.y; - } - node.n.x = mousePos[0]+node.dx; - node.n.y = mousePos[1]+node.dy; - node.n.dirty = true; - minX = Math.min(node.n.x-node.n.w/2-5,minX); - minY = Math.min(node.n.y-node.n.h/2-5,minY); - maxX = Math.max(node.n.x+node.n.w/2+5,maxX); - maxY = Math.max(node.n.y+node.n.h/2+5,maxY); - } - if (minX !== 0 || minY !== 0) { - for (i = 0; i<moving_set.length; i++) { - node = moving_set[i]; - node.n.x -= minX; - node.n.y -= minY; - } - } - if (maxX !== space_width || maxY !== space_height) { - for (i = 0; i<moving_set.length; i++) { - node = moving_set[i]; - node.n.x -= (maxX - space_width); - node.n.y -= (maxY - space_height); - } - } - if (snapGrid != d3.event.shiftKey && moving_set.length > 0) { - var gridOffset = [0,0]; - node = moving_set[0]; - gridOffset[0] = node.n.x-(gridSize*Math.floor((node.n.x-node.n.w/2)/gridSize)+node.n.w/2); - gridOffset[1] = node.n.y-(gridSize*Math.floor(node.n.y/gridSize)); - if (gridOffset[0] !== 0 || gridOffset[1] !== 0) { - for (i = 0; i<moving_set.length; i++) { - node = moving_set[i]; - node.n.x -= gridOffset[0]; - node.n.y -= gridOffset[1]; - if (node.n.x == node.n.ox && node.n.y == node.n.oy) { - node.dirty = false; - } - } - } - } - if ((mouse_mode == RED.state.MOVING_ACTIVE || mouse_mode == RED.state.IMPORT_DRAGGING) && moving_set.length === 1) { - node = moving_set[0]; - if (spliceActive) { - if (!spliceTimer) { - spliceTimer = setTimeout(function() { - var nodes = []; - var bestDistance = Infinity; - var bestLink = null; - var mouseX = node.n.x; - var mouseY = node.n.y; - if (outer[0][0].getIntersectionList) { - var svgRect = outer[0][0].createSVGRect(); - svgRect.x = mouseX; - svgRect.y = mouseY; - svgRect.width = 1; - svgRect.height = 1; - nodes = outer[0][0].getIntersectionList(svgRect, outer[0][0]); - } else { - // Firefox doesn"t do getIntersectionList and that - // makes us sad - nodes = RED.view.getLinksAtPoint(mouseX,mouseY); - } - for (var i=0;i<nodes.length;i++) { - if (d3.select(nodes[i]).classed("link_background")) { - var length = nodes[i].getTotalLength(); - for (var j=0;j<length;j+=10) { - var p = nodes[i].getPointAtLength(j); - var d2 = ((p.x-mouseX)*(p.x-mouseX))+((p.y-mouseY)*(p.y-mouseY)); - if (d2 < 200 && d2 < bestDistance) { - bestDistance = d2; - bestLink = nodes[i]; - } - } - } - } - if (activeSpliceLink && activeSpliceLink !== bestLink) { - d3.select(activeSpliceLink.parentNode).classed("link_splice",false); - } - if (bestLink) { - d3.select(bestLink.parentNode).classed("link_splice",true) - } else { - d3.select(".link_splice").classed("link_splice",false); - } - activeSpliceLink = bestLink; - spliceTimer = null; - },100); - } - } - } - - - } - if (mouse_mode !== 0) { - redraw(); - } - } - - function canvasMouseUp() { - var i; - var historyEvent; - if (mouse_mode === RED.state.PANNING) { - resetMouseVars(); - return - } - if (mouse_mode === RED.state.QUICK_JOINING) { - return; - } - if (mousedown_node && mouse_mode == RED.state.JOINING) { - var removedLinks = []; - for (i=0;i<drag_lines.length;i++) { - if (drag_lines[i].link) { - removedLinks.push(drag_lines[i].link) - } - } - historyEvent = { - t:"delete", - links: removedLinks, - dirty:RED.nodes.dirty() - }; - RED.history.push(historyEvent); - hideDragLines(); - } - if (lasso) { - var x = parseInt(lasso.attr("x")); - var y = parseInt(lasso.attr("y")); - var x2 = x+parseInt(lasso.attr("width")); - var y2 = y+parseInt(lasso.attr("height")); - if (!d3.event.ctrlKey) { - clearSelection(); - } - RED.nodes.eachNode(function(n) { - if (n.z == RED.workspaces.active() && !n.selected) { - n.selected = (n.x > x && n.x < x2 && n.y > y && n.y < y2); - if (n.selected) { - n.dirty = true; - moving_set.push({n:n}); - } - } - }); - if (activeSubflow) { - activeSubflow.in.forEach(function(n) { - n.selected = (n.x > x && n.x < x2 && n.y > y && n.y < y2); - if (n.selected) { - n.dirty = true; - moving_set.push({n:n}); - } - }); - activeSubflow.out.forEach(function(n) { - n.selected = (n.x > x && n.x < x2 && n.y > y && n.y < y2); - if (n.selected) { - n.dirty = true; - moving_set.push({n:n}); - } - }); - } - updateSelection(); - lasso.remove(); - lasso = null; - } else if (mouse_mode == RED.state.DEFAULT && mousedown_link == null && !d3.event.ctrlKey&& !d3.event.metaKey ) { - clearSelection(); - updateSelection(); - } - if (mouse_mode == RED.state.MOVING_ACTIVE) { - if (moving_set.length > 0) { - var ns = []; - for (var j=0;j<moving_set.length;j++) { - var n = moving_set[j]; - if (n.ox !== n.n.x || n.oy !== n.n.y) { - ns.push({n:n.n,ox:n.ox,oy:n.oy,moved:n.n.moved}); - n.n.dirty = true; - n.n.moved = true; - } - } - if (ns.length > 0) { - historyEvent = {t:"move",nodes:ns,dirty:RED.nodes.dirty()}; - if (activeSpliceLink) { - // TODO: DRY - droppable/nodeMouseDown/canvasMouseUp - var spliceLink = d3.select(activeSpliceLink).data()[0]; - RED.nodes.removeLink(spliceLink); - var link1 = { - source:spliceLink.source, - sourcePort:spliceLink.sourcePort, - target: moving_set[0].n - }; - var link2 = { - source:moving_set[0].n, - sourcePort:0, - target: spliceLink.target - }; - RED.nodes.addLink(link1); - RED.nodes.addLink(link2); - historyEvent.links = [link1,link2]; - historyEvent.removedLinks = [spliceLink]; - updateActiveNodes(); - } - RED.nodes.dirty(true); - RED.history.push(historyEvent); - } - } - } - if (mouse_mode == RED.state.MOVING || mouse_mode == RED.state.MOVING_ACTIVE) { - for (i=0;i<moving_set.length;i++) { - delete moving_set[i].ox; - delete moving_set[i].oy; - } - } - if (mouse_mode == RED.state.IMPORT_DRAGGING) { - RED.keyboard.remove("escape"); - updateActiveNodes(); - RED.nodes.dirty(true); - } - resetMouseVars(); - redraw(); - } - - function zoomIn() { - if (scaleFactor < 2) { - scaleFactor += 0.1; - RED.view.navigator.resize(); - redraw(); - } - } - function zoomOut() { - if (scaleFactor > 0.3) { - scaleFactor -= 0.1; - RED.view.navigator.resize(); - redraw(); - } - } - function zoomZero() { - scaleFactor = 1; - RED.view.navigator.resize(); - redraw(); - } - - function selectAll() { - RED.nodes.eachNode(function(n) { - if (n.z == RED.workspaces.active()) { - if (!n.selected) { - n.selected = true; - n.dirty = true; - moving_set.push({n:n}); - } - } - }); - if (activeSubflow) { - activeSubflow.in.forEach(function(n) { - if (!n.selected) { - n.selected = true; - n.dirty = true; - moving_set.push({n:n}); - } - }); - activeSubflow.out.forEach(function(n) { - if (!n.selected) { - n.selected = true; - n.dirty = true; - moving_set.push({n:n}); - } - }); - } - - selected_link = null; - updateSelection(); - redraw(); - } - - function clearSelection() { - for (var i=0;i<moving_set.length;i++) { - var n = moving_set[i]; - n.n.dirty = true; - n.n.selected = false; - } - moving_set = []; - selected_link = null; - } - - var lastSelection = null; - function updateSelection() { - var selection = {}; - - if (moving_set.length > 0) { - selection.nodes = moving_set.map(function(n) { return n.n;}); - } - if (selected_link != null) { - selection.link = selected_link; - } - var activeWorkspace = RED.workspaces.active(); - activeLinks = RED.nodes.filterLinks({ - source:{z:activeWorkspace}, - target:{z:activeWorkspace} - }); - var tabOrder = RED.nodes.getWorkspaceOrder(); - var currentLinks = activeLinks; - var addedLinkLinks = {}; - activeFlowLinks = []; - for (var i=0;i<moving_set.length;i++) { - if (moving_set[i].n.type === "link out" || moving_set[i].n.type === "link in") { - var linkNode = moving_set[i].n; - var offFlowLinks = {}; - linkNode.links.forEach(function(id) { - var target = RED.nodes.node(id); - if (target) { - if (linkNode.type === "link out") { - if (target.z === linkNode.z) { - if (!addedLinkLinks[linkNode.id+":"+target.id]) { - activeLinks.push({ - source:linkNode, - sourcePort:0, - target: target, - link: true - }); - addedLinkLinks[linkNode.id+":"+target.id] = true; - } - } else { - offFlowLinks[target.z] = offFlowLinks[target.z]||[]; - offFlowLinks[target.z].push(target); - } - } else { - if (target.z === linkNode.z) { - if (!addedLinkLinks[target.id+":"+linkNode.id]) { - activeLinks.push({ - source:target, - sourcePort:0, - target: linkNode, - link: true - }); - addedLinkLinks[target.id+":"+linkNode.id] = true; - } - } else { - offFlowLinks[target.z] = offFlowLinks[target.z]||[]; - offFlowLinks[target.z].push(target); - } - } - } - }); - var offFlows = Object.keys(offFlowLinks); - // offFlows.sort(function(A,B) { - // return tabOrder.indexOf(A) - tabOrder.indexOf(B); - // }); - if (offFlows.length > 0) { - activeFlowLinks.push({ - refresh: Math.floor(Math.random()*10000), - node: linkNode, - links: offFlowLinks//offFlows.map(function(i) { return {id:i,links:offFlowLinks[i]};}) - }); - } - } - } - var selectionJSON = activeWorkspace+":"+JSON.stringify(selection,function(key,value) { - if (key === 'nodes') { - return value.map(function(n) { return n.id }) - } else if (key === 'link') { - return value.source.id+":"+value.sourcePort+":"+value.target.id; - } - return value; - }); - if (selectionJSON !== lastSelection) { - lastSelection = selectionJSON; - RED.events.emit("view:selection-changed",selection); - } - } - - function endKeyboardMove() { - endMoveSet = false; - if (moving_set.length > 0) { - var ns = []; - for (var i=0;i<moving_set.length;i++) { - ns.push({n:moving_set[i].n,ox:moving_set[i].ox,oy:moving_set[i].oy,moved:moving_set[i].n.moved}); - moving_set[i].n.moved = true; - moving_set[i].n.dirty = true; - delete moving_set[i].ox; - delete moving_set[i].oy; - } - redraw(); - RED.history.push({t:"move",nodes:ns,dirty:RED.nodes.dirty()}); - RED.nodes.dirty(true); - } - } - var endMoveSet = false; - function moveSelection(dx,dy) { - if (moving_set.length > 0) { - if (!endMoveSet) { - $(document).one('keyup',endKeyboardMove); - endMoveSet = true; - } - var minX = 0; - var minY = 0; - var node; - - for (var i=0;i<moving_set.length;i++) { - node = moving_set[i]; - node.n.moved = true; - node.n.dirty = true; - if (node.ox == null && node.oy == null) { - node.ox = node.n.x; - node.oy = node.n.y; - } - node.n.x += dx; - node.n.y += dy; - node.n.dirty = true; - minX = Math.min(node.n.x-node.n.w/2-5,minX); - minY = Math.min(node.n.y-node.n.h/2-5,minY); - } - - if (minX !== 0 || minY !== 0) { - for (var n = 0; n<moving_set.length; n++) { - node = moving_set[n]; - node.n.x -= minX; - node.n.y -= minY; - } - } - - redraw(); - } - } - function editSelection() { - if (moving_set.length > 0) { - var node = moving_set[0].n; - if (node.type === "subflow") { - RED.editor.editSubflow(activeSubflow); - } else { - RED.editor.edit(node); - } - } - } - function deleteSelection() { - if (moving_set.length > 0 || selected_link != null) { - var result; - var removedNodes = []; - var removedLinks = []; - var removedSubflowOutputs = []; - var removedSubflowInputs = []; - var subflowInstances = []; - - var startDirty = RED.nodes.dirty(); - var startChanged = false; - if (moving_set.length > 0) { - for (var i=0;i<moving_set.length;i++) { - var node = moving_set[i].n; - node.selected = false; - if (node.type != "subflow") { - if (node.x < 0) { - node.x = 25 - } - var removedEntities = RED.nodes.remove(node.id); - removedNodes.push(node); - removedNodes = removedNodes.concat(removedEntities.nodes); - removedLinks = removedLinks.concat(removedEntities.links); - } else { - if (node.direction === "out") { - removedSubflowOutputs.push(node); - } else if (node.direction === "in") { - removedSubflowInputs.push(node); - } - node.dirty = true; - } - } - if (removedSubflowOutputs.length > 0) { - result = RED.subflow.removeOutput(removedSubflowOutputs); - if (result) { - removedLinks = removedLinks.concat(result.links); - } - } - // Assume 0/1 inputs - if (removedSubflowInputs.length == 1) { - result = RED.subflow.removeInput(); - if (result) { - removedLinks = removedLinks.concat(result.links); - } - } - var instances = RED.subflow.refresh(true); - if (instances) { - subflowInstances = instances.instances; - } - moving_set = []; - if (removedNodes.length > 0 || removedSubflowOutputs.length > 0 || removedSubflowInputs.length > 0) { - RED.nodes.dirty(true); - } - } - if (selected_link) { - RED.nodes.removeLink(selected_link); - removedLinks.push(selected_link); - RED.nodes.dirty(true); - } - var historyEvent = { - t:"delete", - nodes:removedNodes, - links:removedLinks, - subflowOutputs:removedSubflowOutputs, - subflowInputs:removedSubflowInputs, - subflow: { - instances: subflowInstances - }, - dirty:startDirty - }; - RED.history.push(historyEvent); - - selected_link = null; - updateActiveNodes(); - updateSelection(); - redraw(); - } - } - - function copySelection() { - if (moving_set.length > 0) { - var nns = []; - for (var n=0;n<moving_set.length;n++) { - var node = moving_set[n].n; - // The only time a node.type == subflow can be selected is the - // input/output "proxy" nodes. They cannot be copied. - if (node.type != "subflow") { - for (var d in node._def.defaults) { - if (node._def.defaults.hasOwnProperty(d)) { - if (node._def.defaults[d].type) { - var configNode = RED.nodes.node(node[d]); - if (configNode && configNode._def.exclusive) { - nns.push(RED.nodes.convertNode(configNode)); - } - } - } - } - nns.push(RED.nodes.convertNode(node)); - //TODO: if the node has an exclusive config node, it should also be copied, to ensure it remains exclusive... - } - } - clipboard = JSON.stringify(nns); - RED.notify(RED._("clipboard.nodeCopied",{count:nns.length})); - } - } - - - function calculateTextWidth(str, className, offset) { - return calculateTextDimensions(str,className,offset,0)[0]; - } - - function calculateTextDimensions(str,className,offsetW,offsetH) { - var sp = document.createElement("span"); - sp.className = className; - sp.style.position = "absolute"; - sp.style.top = "-1000px"; - sp.textContent = (str||""); - document.body.appendChild(sp); - var w = sp.offsetWidth; - var h = sp.offsetHeight; - document.body.removeChild(sp); - return [offsetW+w,offsetH+h]; - } - - function resetMouseVars() { - mousedown_node = null; - mouseup_node = null; - mousedown_link = null; - mouse_mode = 0; - mousedown_port_type = null; - activeSpliceLink = null; - spliceActive = false; - d3.select(".link_splice").classed("link_splice",false); - if (spliceTimer) { - clearTimeout(spliceTimer); - spliceTimer = null; - } - } - - function disableQuickJoinEventHandler(evt) { - // Check for ctrl (all browsers), "Meta" (Chrome/FF), keyCode 91 (Safari) - if (evt.keyCode === 17 || evt.key === "Meta" || evt.keyCode === 91) { - if (quickAddActive && drag_lines.length > 0) { - quickAddLink = drag_lines[0]; - } - resetMouseVars(); - hideDragLines(); - redraw(); - $(window).off('keyup',disableQuickJoinEventHandler); - } - } - - function portMouseDown(d,portType,portIndex) { - //console.log(d,portType,portIndex); - // disable zoom - //vis.call(d3.behavior.zoom().on("zoom"), null); - if (d3.event.button === 1) { - return; - } - - mousedown_node = d; - mousedown_port_type = portType; - mousedown_port_index = portIndex || 0; - if (mouse_mode !== RED.state.QUICK_JOINING) { - mouse_mode = RED.state.JOINING; - document.body.style.cursor = "crosshair"; - if (d3.event.ctrlKey || d3.event.metaKey) { - mouse_mode = RED.state.QUICK_JOINING; - showDragLines([{node:mousedown_node,port:mousedown_port_index,portType:mousedown_port_type}]); - $(window).on('keyup',disableQuickJoinEventHandler); - } - } - d3.event.stopPropagation(); - d3.event.preventDefault(); - } - - function portMouseUp(d,portType,portIndex) { - var i; - if (mouse_mode === RED.state.QUICK_JOINING && drag_lines.length > 0) { - if (drag_lines[0].node===d) { - return - } - } - document.body.style.cursor = ""; - if (mouse_mode == RED.state.JOINING || mouse_mode == RED.state.QUICK_JOINING) { - if (typeof TouchEvent != "undefined" && d3.event instanceof TouchEvent) { - RED.nodes.eachNode(function(n) { - if (n.z == RED.workspaces.active()) { - var hw = n.w/2; - var hh = n.h/2; - if (n.x-hw<mouse_position[0] && n.x+hw> mouse_position[0] && - n.y-hh<mouse_position[1] && n.y+hh>mouse_position[1]) { - mouseup_node = n; - portType = mouseup_node.inputs>0?PORT_TYPE_INPUT:PORT_TYPE_OUTPUT; - portIndex = 0; - } - } - }); - } else { - mouseup_node = d; - } - var addedLinks = []; - var removedLinks = []; - - for (i=0;i<drag_lines.length;i++) { - if (drag_lines[i].link) { - removedLinks.push(drag_lines[i].link) - } - } - for (i=0;i<drag_lines.length;i++) { - if (portType != drag_lines[i].portType && mouseup_node !== drag_lines[i].node) { - var drag_line = drag_lines[i]; - var src,dst,src_port; - if (drag_line.portType === PORT_TYPE_OUTPUT) { - src = drag_line.node; - src_port = drag_line.port; - dst = mouseup_node; - } else if (drag_line.portType === PORT_TYPE_INPUT) { - src = mouseup_node; - dst = drag_line.node; - src_port = portIndex; - } - var existingLink = RED.nodes.filterLinks({source:src,target:dst,sourcePort: src_port}).length !== 0; - if (!existingLink) { - var link = {source: src, sourcePort:src_port, target: dst}; - RED.nodes.addLink(link); - addedLinks.push(link); - } - } - } - if (addedLinks.length > 0 || removedLinks.length > 0) { - var historyEvent = { - t:"add", - links:addedLinks, - removedLinks: removedLinks, - dirty:RED.nodes.dirty() - }; - if (activeSubflow) { - var subflowRefresh = RED.subflow.refresh(true); - if (subflowRefresh) { - historyEvent.subflow = { - id:activeSubflow.id, - changed: activeSubflow.changed, - instances: subflowRefresh.instances - } - } - } - RED.history.push(historyEvent); - updateActiveNodes(); - RED.nodes.dirty(true); - } - if (mouse_mode === RED.state.QUICK_JOINING) { - if (addedLinks.length > 0) { - hideDragLines(); - if (portType === PORT_TYPE_INPUT && d.outputs > 0) { - showDragLines([{node:d,port:0,portType:PORT_TYPE_OUTPUT}]); - } else if (portType === PORT_TYPE_OUTPUT && d.inputs > 0) { - showDragLines([{node:d,port:0,portType:PORT_TYPE_INPUT}]); - } else { - resetMouseVars(); - } - } - redraw(); - return; - } - - resetMouseVars(); - hideDragLines(); - selected_link = null; - redraw(); - } - } - - var portLabelHoverTimeout = null; - var portLabelHover = null; - - - function getElementPosition(node) { - var d3Node = d3.select(node); - if (d3Node.attr('class') === 'innerCanvas') { - return [0,0]; - } - var result = []; - var localPos = [0,0]; - if (node.nodeName.toLowerCase() === 'g') { - var transform = d3Node.attr("transform"); - if (transform) { - localPos = d3.transform(transform).translate; - } - } else { - localPos = [d3Node.attr("x")||0,d3Node.attr("y")||0]; - } - var parentPos = getElementPosition(node.parentNode); - return [localPos[0]+parentPos[0],localPos[1]+parentPos[1]] - - } - - function getPortLabel(node,portType,portIndex) { - var result; - var nodePortLabels = (portType === PORT_TYPE_INPUT)?node.inputLabels:node.outputLabels; - if (nodePortLabels && nodePortLabels[portIndex]) { - return nodePortLabels[portIndex]; - } - var portLabels = (portType === PORT_TYPE_INPUT)?node._def.inputLabels:node._def.outputLabels; - if (typeof portLabels === 'string') { - result = portLabels; - } else if (typeof portLabels === 'function') { - try { - result = portLabels.call(node,portIndex); - } catch(err) { - console.log("Definition error: "+node.type+"."+((portType === PORT_TYPE_INPUT)?"inputLabels":"outputLabels"),err); - result = null; - } - } else if ($.isArray(portLabels)) { - result = portLabels[portIndex]; - } - return result; - } - function portMouseOver(port,d,portType,portIndex) { - clearTimeout(portLabelHoverTimeout); - var active = (mouse_mode!=RED.state.JOINING || (drag_lines.length > 0 && drag_lines[0].portType !== portType)); - if (active && ((portType === PORT_TYPE_INPUT && ((d._def && d._def.inputLabels)||d.inputLabels)) || (portType === PORT_TYPE_OUTPUT && ((d._def && d._def.outputLabels)||d.outputLabels)))) { - portLabelHoverTimeout = setTimeout(function() { - var tooltip = getPortLabel(d,portType,portIndex); - if (!tooltip) { - return; - } - var pos = getElementPosition(port.node()); - portLabelHoverTimeout = null; - portLabelHover = vis.append("g") - .attr("transform","translate("+(pos[0]+(portType===PORT_TYPE_INPUT?-2:12))+","+(pos[1]+5)+")") - .attr("class","port_tooltip"); - var lines = tooltip.split("\n"); - var labelWidth = 0; - var labelHeight = 4; - var labelHeights = []; - lines.forEach(function(l) { - var labelDimensions = calculateTextDimensions(l, "port_tooltip_label", 8,0); - labelWidth = Math.max(labelWidth,labelDimensions[0]); - labelHeights.push(0.8*labelDimensions[1]); - labelHeight += 0.8*labelDimensions[1]; - }); - - var labelHeight1 = (labelHeight/2)-5-2; - var labelHeight2 = labelHeight - 4; - portLabelHover.append("path").attr("d", - portType===PORT_TYPE_INPUT? - "M0 0 l -5 -5 v -"+(labelHeight1)+" q 0 -2 -2 -2 h -"+labelWidth+" q -2 0 -2 2 v "+(labelHeight2)+" q 0 2 2 2 h "+labelWidth+" q 2 0 2 -2 v -"+(labelHeight1)+" l 5 -5" - : - "M0 0 l 5 -5 v -"+(labelHeight1)+" q 0 -2 2 -2 h "+labelWidth+" q 2 0 2 2 v "+(labelHeight2)+" q 0 2 -2 2 h -"+labelWidth+" q -2 0 -2 -2 v -"+(labelHeight1)+" l -5 -5" - ); - var y = -labelHeight/2-2; - lines.forEach(function(l,i) { - y += labelHeights[i]; - portLabelHover.append("svg:text").attr("class","port_tooltip_label") - .attr("x", portType===PORT_TYPE_INPUT?-10:10) - .attr("y", y) - .attr("text-anchor",portType===PORT_TYPE_INPUT?"end":"start") - .text(l) - }); - },500); - } - port.classed("port_hovered",active); - } - function portMouseOut(port,d,portType,portIndex) { - clearTimeout(portLabelHoverTimeout); - if (portLabelHover) { - portLabelHover.remove(); - portLabelHover = null; - } - port.classed("port_hovered",false); - } - - function nodeMouseUp(d) { - if (dblClickPrimed && mousedown_node == d && clickElapsed > 0 && clickElapsed < 750) { - mouse_mode = RED.state.DEFAULT; - if (d.type != "subflow") { - RED.editor.edit(d); - } else { - RED.editor.editSubflow(activeSubflow); - } - clickElapsed = 0; - d3.event.stopPropagation(); - return; - } - var direction = d._def? (d.inputs > 0 ? 1: 0) : (d.direction == "in" ? 0: 1) - portMouseUp(d, direction, 0); - } - - function nodeMouseDown(d) { - focusView(); - if (d3.event.button === 1) { - return; - } - //var touch0 = d3.event; - //var pos = [touch0.pageX,touch0.pageY]; - //RED.touch.radialMenu.show(d3.select(this),pos); - if (mouse_mode == RED.state.IMPORT_DRAGGING) { - RED.keyboard.remove("escape"); - - if (activeSpliceLink) { - // TODO: DRY - droppable/nodeMouseDown/canvasMouseUp - var spliceLink = d3.select(activeSpliceLink).data()[0]; - RED.nodes.removeLink(spliceLink); - var link1 = { - source:spliceLink.source, - sourcePort:spliceLink.sourcePort, - target: moving_set[0].n - }; - var link2 = { - source:moving_set[0].n, - sourcePort:0, - target: spliceLink.target - }; - RED.nodes.addLink(link1); - RED.nodes.addLink(link2); - var historyEvent = RED.history.peek(); - historyEvent.links = [link1,link2]; - historyEvent.removedLinks = [spliceLink]; - updateActiveNodes(); - } - - updateSelection(); - RED.nodes.dirty(true); - redraw(); - resetMouseVars(); - d3.event.stopPropagation(); - return; - } else if (mouse_mode == RED.state.QUICK_JOINING) { - d3.event.stopPropagation(); - return; - } - mousedown_node = d; - var now = Date.now(); - clickElapsed = now-clickTime; - clickTime = now; - - dblClickPrimed = (lastClickNode == mousedown_node && - d3.event.buttons === 1 && - !d3.event.shiftKey && !d3.event.metaKey && !d3.event.altKey && !d3.event.ctrlKey); - lastClickNode = mousedown_node; - - var i; - - if (d.selected && (d3.event.ctrlKey||d3.event.metaKey)) { - mousedown_node.selected = false; - for (i=0;i<moving_set.length;i+=1) { - if (moving_set[i].n === mousedown_node) { - moving_set.splice(i,1); - break; - } - } - } else { - if (d3.event.shiftKey) { - clearSelection(); - var cnodes = RED.nodes.getAllFlowNodes(mousedown_node); - for (var n=0;n<cnodes.length;n++) { - cnodes[n].selected = true; - cnodes[n].dirty = true; - moving_set.push({n:cnodes[n]}); - } - } else if (!d.selected) { - if (!d3.event.ctrlKey && !d3.event.metaKey) { - clearSelection(); - } - mousedown_node.selected = true; - moving_set.push({n:mousedown_node}); - } - selected_link = null; - if (d3.event.button != 2) { - mouse_mode = RED.state.MOVING; - var mouse = d3.touches(this)[0]||d3.mouse(this); - mouse[0] += d.x-d.w/2; - mouse[1] += d.y-d.h/2; - for (i=0;i<moving_set.length;i++) { - moving_set[i].ox = moving_set[i].n.x; - moving_set[i].oy = moving_set[i].n.y; - moving_set[i].dx = moving_set[i].n.x-mouse[0]; - moving_set[i].dy = moving_set[i].n.y-mouse[1]; - } - mouse_offset = d3.mouse(document.body); - if (isNaN(mouse_offset[0])) { - mouse_offset = d3.touches(document.body)[0]; - } - } - } - d.dirty = true; - updateSelection(); - redraw(); - d3.event.stopPropagation(); - } - - function isButtonEnabled(d) { - var buttonEnabled = true; - if (d._def.button.hasOwnProperty('enabled')) { - if (typeof d._def.button.enabled === "function") { - buttonEnabled = d._def.button.enabled.call(d); - } else { - buttonEnabled = d._def.button.enabled; - } - } - return buttonEnabled; - } - - function nodeButtonClicked(d) { - if (!activeSubflow) { - if (d._def.button.toggle) { - d[d._def.button.toggle] = !d[d._def.button.toggle]; - d.dirty = true; - } - if (d._def.button.onclick) { - try { - d._def.button.onclick.call(d); - } catch(err) { - console.log("Definition error: "+d.type+".onclick",err); - } - } - if (d.dirty) { - redraw(); - } - } else { - RED.notify(RED._("notification.warning", {message:RED._("notification.warnings.nodeActionDisabled")}),"warning"); - } - d3.event.preventDefault(); - } - - function showTouchMenu(obj,pos) { - var mdn = mousedown_node; - var options = []; - options.push({name:"delete",disabled:(moving_set.length===0 && selected_link === null),onselect:function() {deleteSelection();}}); - options.push({name:"cut",disabled:(moving_set.length===0),onselect:function() {copySelection();deleteSelection();}}); - options.push({name:"copy",disabled:(moving_set.length===0),onselect:function() {copySelection();}}); - options.push({name:"paste",disabled:(clipboard.length===0),onselect:function() {importNodes(clipboard,false,true);}}); - options.push({name:"edit",disabled:(moving_set.length != 1),onselect:function() { RED.editor.edit(mdn);}}); - options.push({name:"select",onselect:function() {selectAll();}}); - options.push({name:"undo",disabled:(RED.history.depth() === 0),onselect:function() {RED.history.pop();}}); - - RED.touch.radialMenu.show(obj,pos,options); - resetMouseVars(); - } - function redraw() { - vis.attr("transform","scale("+scaleFactor+")"); - outer.attr("width", space_width*scaleFactor).attr("height", space_height*scaleFactor); - - // Don't bother redrawing nodes if we're drawing links - if (mouse_mode != RED.state.JOINING) { - - var dirtyNodes = {}; - - if (activeSubflow) { - var subflowOutputs = vis.selectAll(".subflowoutput").data(activeSubflow.out,function(d,i){ return d.id;}); - subflowOutputs.exit().remove(); - var outGroup = subflowOutputs.enter().insert("svg:g").attr("class","node subflowoutput").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); - outGroup.each(function(d,i) { - d.w=40; - d.h=40; - }); - outGroup.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) - // TODO: This is exactly the same set of handlers used for regular nodes - DRY - .on("mouseup",nodeMouseUp) - .on("mousedown",nodeMouseDown) - .on("touchstart",function(d) { - var obj = d3.select(this); - var touch0 = d3.event.touches.item(0); - var pos = [touch0.pageX,touch0.pageY]; - startTouchCenter = [touch0.pageX,touch0.pageY]; - startTouchDistance = 0; - touchStartTime = setTimeout(function() { - showTouchMenu(obj,pos); - },touchLongPressTimeout); - nodeMouseDown.call(this,d) - }) - .on("touchend", function(d) { - clearTimeout(touchStartTime); - touchStartTime = null; - if (RED.touch.radialMenu.active()) { - d3.event.stopPropagation(); - return; - } - nodeMouseUp.call(this,d); - }); - - outGroup.append("g").attr('transform','translate(-5,15)').append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) - .on("mousedown", function(d,i){portMouseDown(d,PORT_TYPE_INPUT,0);} ) - .on("touchstart", function(d,i){portMouseDown(d,PORT_TYPE_INPUT,0);} ) - .on("mouseup", function(d,i){portMouseUp(d,PORT_TYPE_INPUT,0);}) - .on("touchend",function(d,i){portMouseUp(d,PORT_TYPE_INPUT,0);} ) - .on("mouseover",function(d){portMouseOver(d3.select(this),d,PORT_TYPE_INPUT,0);}) - .on("mouseout",function(d){portMouseOut(d3.select(this),d,PORT_TYPE_INPUT,0);}); - - outGroup.append("svg:text").attr("class","port_label").attr("x",20).attr("y",8).style("font-size","10px").text("output"); - outGroup.append("svg:text").attr("class","port_label port_index").attr("x",20).attr("y",24).text(function(d,i){ return i+1}); - - var subflowInputs = vis.selectAll(".subflowinput").data(activeSubflow.in,function(d,i){ return d.id;}); - subflowInputs.exit().remove(); - var inGroup = subflowInputs.enter().insert("svg:g").attr("class","node subflowinput").attr("transform",function(d) { return "translate("+(d.x-20)+","+(d.y-20)+")"}); - inGroup.each(function(d,i) { - d.w=40; - d.h=40; - }); - inGroup.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40) - // TODO: This is exactly the same set of handlers used for regular nodes - DRY - .on("mouseup",nodeMouseUp) - .on("mousedown",nodeMouseDown) - .on("touchstart",function(d) { - var obj = d3.select(this); - var touch0 = d3.event.touches.item(0); - var pos = [touch0.pageX,touch0.pageY]; - startTouchCenter = [touch0.pageX,touch0.pageY]; - startTouchDistance = 0; - touchStartTime = setTimeout(function() { - showTouchMenu(obj,pos); - },touchLongPressTimeout); - nodeMouseDown.call(this,d) - }) - .on("touchend", function(d) { - clearTimeout(touchStartTime); - touchStartTime = null; - if (RED.touch.radialMenu.active()) { - d3.event.stopPropagation(); - return; - } - nodeMouseUp.call(this,d); - }); - - inGroup.append("g").attr('transform','translate(35,15)').append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) - .on("mousedown", function(d,i){portMouseDown(d,PORT_TYPE_OUTPUT,i);} ) - .on("touchstart", function(d,i){portMouseDown(d,PORT_TYPE_OUTPUT,i);} ) - .on("mouseup", function(d,i){portMouseUp(d,PORT_TYPE_OUTPUT,i);}) - .on("touchend",function(d,i){portMouseUp(d,PORT_TYPE_OUTPUT,i);} ) - .on("mouseover",function(d){portMouseOver(d3.select(this),d,PORT_TYPE_OUTPUT,0);}) - .on("mouseout",function(d) {portMouseOut(d3.select(this),d,PORT_TYPE_OUTPUT,0);}); - - - inGroup.append("svg:text").attr("class","port_label").attr("x",18).attr("y",20).style("font-size","10px").text("input"); - - - - subflowOutputs.each(function(d,i) { - if (d.dirty) { - var output = d3.select(this); - output.selectAll(".subflowport").classed("node_selected",function(d) { return d.selected; }) - output.selectAll(".port_index").text(function(d){ return d.i+1}); - output.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); - dirtyNodes[d.id] = d; - d.dirty = false; - } - }); - subflowInputs.each(function(d,i) { - if (d.dirty) { - var input = d3.select(this); - input.selectAll(".subflowport").classed("node_selected",function(d) { return d.selected; }) - input.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); - dirtyNodes[d.id] = d; - d.dirty = false; - } - }); - } else { - vis.selectAll(".subflowoutput").remove(); - vis.selectAll(".subflowinput").remove(); - } - - var node = vis.selectAll(".nodegroup").data(activeNodes,function(d){return d.id}); - node.exit().remove(); - - var nodeEnter = node.enter().insert("svg:g") - .attr("class", "node nodegroup") - .classed("node_subflow",function(d) { return activeSubflow != null; }) - .classed("node_link",function(d) { return d.type === "link in" || d.type === "link out" }); - - nodeEnter.each(function(d,i) { - var node = d3.select(this); - var isLink = d.type === "link in" || d.type === "link out"; - node.attr("id",d.id); - var l = RED.utils.getNodeLabel(d); - if (isLink) { - d.w = node_height; - } else { - d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "node_label", 50)+(d._def.inputs>0?7:0))/20)) ); - } - d.h = Math.max(node_height,(d.outputs||0) * 15); - - if (d._def.badge) { - var badge = node.append("svg:g").attr("class","node_badge_group"); - var badgeRect = badge.append("rect").attr("class","node_badge").attr("rx",5).attr("ry",5).attr("width",40).attr("height",15); - badge.append("svg:text").attr("class","node_badge_label").attr("x",35).attr("y",11).attr("text-anchor","end").text(d._def.badge()); - if (d._def.onbadgeclick) { - badgeRect.attr("cursor","pointer") - .on("click",function(d) { d._def.onbadgeclick.call(d);d3.event.preventDefault();}); - } - } - - if (d._def.button) { - var nodeButtonGroup = node.append("svg:g") - .attr("transform",function(d) { return "translate("+((d._def.align == "right") ? 94 : -25)+",2)"; }) - .attr("class",function(d) { return "node_button "+((d._def.align == "right") ? "node_right_button" : "node_left_button"); }); - nodeButtonGroup.append("rect") - .attr("rx",5) - .attr("ry",5) - .attr("width",32) - .attr("height",node_height-4) - .attr("fill","#eee");//function(d) { return d._def.color;}) - nodeButtonGroup.append("rect") - .attr("class","node_button_button") - .attr("x",function(d) { return d._def.align == "right"? 11:5}) - .attr("y",4) - .attr("rx",4) - .attr("ry",4) - .attr("width",16) - .attr("height",node_height-12) - .attr("fill",function(d) { return RED.utils.getNodeColor(d.type,d._def); /*d._def.color;*/}) - .attr("cursor","pointer") - .on("mousedown",function(d) {if (!lasso && isButtonEnabled(d)) {focusView();d3.select(this).attr("fill-opacity",0.2);d3.event.preventDefault(); d3.event.stopPropagation();}}) - .on("mouseup",function(d) {if (!lasso && isButtonEnabled(d)) { d3.select(this).attr("fill-opacity",0.4);d3.event.preventDefault();d3.event.stopPropagation();}}) - .on("mouseover",function(d) {if (!lasso && isButtonEnabled(d)) { d3.select(this).attr("fill-opacity",0.4);}}) - .on("mouseout",function(d) {if (!lasso && isButtonEnabled(d)) { - var op = 1; - if (d._def.button.toggle) { - op = d[d._def.button.toggle]?1:0.2; - } - d3.select(this).attr("fill-opacity",op); - }}) - .on("click",nodeButtonClicked) - .on("touchstart",nodeButtonClicked) - } - - var mainRect = node.append("rect") - .attr("class", "node") - .classed("node_unknown",function(d) { return d.type == "unknown"; }) - .attr("rx", 5) - .attr("ry", 5) - .attr("fill",function(d) { return RED.utils.getNodeColor(d.type,d._def); /*d._def.color;*/}) - .on("mouseup",nodeMouseUp) - .on("mousedown",nodeMouseDown) - .on("touchstart",function(d) { - var obj = d3.select(this); - var touch0 = d3.event.touches.item(0); - var pos = [touch0.pageX,touch0.pageY]; - startTouchCenter = [touch0.pageX,touch0.pageY]; - startTouchDistance = 0; - touchStartTime = setTimeout(function() { - showTouchMenu(obj,pos); - },touchLongPressTimeout); - nodeMouseDown.call(this,d) - }) - .on("touchend", function(d) { - clearTimeout(touchStartTime); - touchStartTime = null; - if (RED.touch.radialMenu.active()) { - d3.event.stopPropagation(); - return; - } - nodeMouseUp.call(this,d); - }) - .on("mouseover",function(d) { - if (mouse_mode === 0) { - var node = d3.select(this); - node.classed("node_hovered",true); - } - }) - .on("mouseout",function(d) { - var node = d3.select(this); - node.classed("node_hovered",false); - }); - - //node.append("rect").attr("class", "node-gradient-top").attr("rx", 6).attr("ry", 6).attr("height",30).attr("stroke","none").attr("fill","url(#gradient-top)").style("pointer-events","none"); - //node.append("rect").attr("class", "node-gradient-bottom").attr("rx", 6).attr("ry", 6).attr("height",30).attr("stroke","none").attr("fill","url(#gradient-bottom)").style("pointer-events","none"); - - if (d._def.icon) { - var icon_url = RED.utils.getNodeIcon(d._def,d); - var icon_group = node.append("g") - .attr("class","node_icon_group") - .attr("x",0).attr("y",0); - - var icon_shade = icon_group.append("rect") - .attr("x",0).attr("y",0) - .attr("class","node_icon_shade") - .attr("width","30") - .attr("stroke","none") - .attr("fill","#000") - .attr("fill-opacity","0.05") - .attr("height",function(d){return Math.min(50,d.h-4);}); - - var icon = icon_group.append("image") - .attr("xlink:href",icon_url) - .attr("class","node_icon") - .attr("x",0) - .attr("width","30") - .attr("height","30"); - - var icon_shade_border = icon_group.append("path") - .attr("d",function(d) { return "M 30 1 l 0 "+(d.h-2)}) - .attr("class","node_icon_shade_border") - .attr("stroke-opacity","0.1") - .attr("stroke","#000") - .attr("stroke-width","1"); - - if ("right" == d._def.align) { - icon_group.attr("class","node_icon_group node_icon_group_"+d._def.align); - icon_shade_border.attr("d",function(d) { return "M 0 1 l 0 "+(d.h-2)}) - //icon.attr("class","node_icon node_icon_"+d._def.align); - //icon.attr("class","node_icon_shade node_icon_shade_"+d._def.align); - //icon.attr("class","node_icon_shade_border node_icon_shade_border_"+d._def.align); - } - - //if (d.inputs > 0 && d._def.align == null) { - // icon_shade.attr("width",35); - // icon.attr("transform","translate(5,0)"); - // icon_shade_border.attr("transform","translate(5,0)"); - //} - //if (d._def.outputs > 0 && "right" == d._def.align) { - // icon_shade.attr("width",35); //icon.attr("x",5); - //} - - var img = new Image(); - img.src = icon_url; - img.onload = function() { - icon.attr("width",Math.min(img.width,30)); - icon.attr("height",Math.min(img.height,30)); - icon.attr("x",15-Math.min(img.width,30)/2); - //if ("right" == d._def.align) { - // icon.attr("x",function(d){return d.w-img.width-1-(d.outputs>0?5:0);}); - // icon_shade.attr("x",function(d){return d.w-30}); - // icon_shade_border.attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2);}); - //} - } - - //icon.style("pointer-events","none"); - icon_group.style("pointer-events","none"); - } - if (!isLink) { - var text = node.append("svg:text").attr("class","node_label").attr("x", 38).attr("dy", ".35em").attr("text-anchor","start"); - if (d._def.align) { - text.attr("class","node_label node_label_"+d._def.align); - if (d._def.align === "right") { - text.attr("text-anchor","end"); - } - } - - var status = node.append("svg:g").attr("class","node_status_group").style("display","none"); - - var statusRect = status.append("rect").attr("class","node_status") - .attr("x",6).attr("y",1).attr("width",9).attr("height",9) - .attr("rx",2).attr("ry",2).attr("stroke-width","3"); - - var statusLabel = status.append("svg:text") - .attr("class","node_status_label") - .attr("x",20).attr("y",9); - } - //node.append("circle").attr({"class":"centerDot","cx":0,"cy":0,"r":5}); - - //node.append("path").attr("class","node_error").attr("d","M 3,-3 l 10,0 l -5,-8 z"); - - //TODO: these ought to be SVG - node.append("image").attr("class","node_error hidden").attr("xlink:href","icons/node-red/node-error.png").attr("x",0).attr("y",-6).attr("width",10).attr("height",9); - node.append("image").attr("class","node_changed hidden").attr("xlink:href","icons/node-red/node-changed.png").attr("x",12).attr("y",-6).attr("width",10).attr("height",10); - }); - - node.each(function(d,i) { - if (d.dirty) { - var isLink = d.type === "link in" || d.type === "link out"; - dirtyNodes[d.id] = d; - //if (d.x < -50) deleteSelection(); // Delete nodes if dragged back to palette - if (!isLink && d.resize) { - var l = RED.utils.getNodeLabel(d); - var ow = d.w; - d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "node_label", 50)+(d._def.inputs>0?7:0))/20)) ); - d.h = Math.max(node_height,(d.outputs||0) * 15); - d.x += (d.w-ow)/2; - d.resize = false; - } - var thisNode = d3.select(this); - //thisNode.selectAll(".centerDot").attr({"cx":function(d) { return d.w/2;},"cy":function(d){return d.h/2}}); - thisNode.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; }); - - if (mouse_mode != RED.state.MOVING_ACTIVE) { - thisNode.selectAll(".node") - .attr("width",function(d){return d.w}) - .attr("height",function(d){return d.h}) - .classed("node_selected",function(d) { return d.selected; }) - .classed("node_highlighted",function(d) { return d.highlighted; }) - ; - //thisNode.selectAll(".node-gradient-top").attr("width",function(d){return d.w}); - //thisNode.selectAll(".node-gradient-bottom").attr("width",function(d){return d.w}).attr("y",function(d){return d.h-30}); - - thisNode.selectAll(".node_icon_group_right").attr("transform", function(d){return "translate("+(d.w-30)+",0)"}); - thisNode.selectAll(".node_label_right").attr("x", function(d){return d.w-38}); - //thisNode.selectAll(".node_icon_right").attr("x",function(d){return d.w-d3.select(this).attr("width")-1-(d.outputs>0?5:0);}); - //thisNode.selectAll(".node_icon_shade_right").attr("x",function(d){return d.w-30;}); - //thisNode.selectAll(".node_icon_shade_border_right").attr("d",function(d){return "M "+(d.w-30)+" 1 l 0 "+(d.h-2)}); - - var inputPorts = thisNode.selectAll(".port_input"); - if (d.inputs === 0 && !inputPorts.empty()) { - inputPorts.remove(); - //nodeLabel.attr("x",30); - } else if (d.inputs === 1 && inputPorts.empty()) { - var inputGroup = thisNode.append("g").attr("class","port_input"); - inputGroup.append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) - .on("mousedown",function(d){portMouseDown(d,PORT_TYPE_INPUT,0);}) - .on("touchstart",function(d){portMouseDown(d,PORT_TYPE_INPUT,0);}) - .on("mouseup",function(d){portMouseUp(d,PORT_TYPE_INPUT,0);} ) - .on("touchend",function(d){portMouseUp(d,PORT_TYPE_INPUT,0);} ) - .on("mouseover",function(d){portMouseOver(d3.select(this),d,PORT_TYPE_INPUT,0);}) - .on("mouseout",function(d) {portMouseOut(d3.select(this),d,PORT_TYPE_INPUT,0);}); - } - - var numOutputs = d.outputs; - var y = (d.h/2)-((numOutputs-1)/2)*13; - d.ports = d.ports || d3.range(numOutputs); - d._ports = thisNode.selectAll(".port_output").data(d.ports); - var output_group = d._ports.enter().append("g").attr("class","port_output"); - - output_group.append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10) - .on("mousedown",(function(){var node = d; return function(d,i){portMouseDown(node,PORT_TYPE_OUTPUT,i);}})() ) - .on("touchstart",(function(){var node = d; return function(d,i){portMouseDown(node,PORT_TYPE_OUTPUT,i);}})() ) - .on("mouseup",(function(){var node = d; return function(d,i){portMouseUp(node,PORT_TYPE_OUTPUT,i);}})() ) - .on("touchend",(function(){var node = d; return function(d,i){portMouseUp(node,PORT_TYPE_OUTPUT,i);}})() ) - .on("mouseover",(function(){var node = d; return function(d,i){portMouseOver(d3.select(this),node,PORT_TYPE_OUTPUT,i);}})()) - .on("mouseout",(function(){var node = d; return function(d,i) {portMouseOut(d3.select(this),node,PORT_TYPE_OUTPUT,i);}})()); - - d._ports.exit().remove(); - if (d._ports) { - numOutputs = d.outputs || 1; - y = (d.h/2)-((numOutputs-1)/2)*13; - var x = d.w - 5; - d._ports.each(function(d,i) { - var port = d3.select(this); - //port.attr("y",(y+13*i)-5).attr("x",x); - port.attr("transform", function(d) { return "translate("+x+","+((y+13*i)-5)+")";}); - }); - } - thisNode.selectAll("text.node_label").text(function(d,i){ - var l = ""; - if (d._def.label) { - l = d._def.label; - try { - l = (typeof l === "function" ? l.call(d) : l)||""; - l = RED.text.bidi.enforceTextDirectionWithUCC(l); - } catch(err) { - console.log("Definition error: "+d.type+".label",err); - l = d.type; - } - } - return l; - }) - .attr("y", function(d){return (d.h/2)-1;}) - .attr("class",function(d){ - var s = ""; - if (d._def.labelStyle) { - s = d._def.labelStyle; - try { - s = (typeof s === "function" ? s.call(d) : s)||""; - } catch(err) { - console.log("Definition error: "+d.type+".labelStyle",err); - s = ""; - } - s = " "+s; - } - return "node_label"+ - (d._def.align?" node_label_"+d._def.align:"")+s; - }); - - if (d._def.icon) { - icon = thisNode.select(".node_icon"); - var current_url = icon.attr("xlink:href"); - var new_url = RED.utils.getNodeIcon(d._def,d); - if (new_url !== current_url) { - icon.attr("xlink:href",new_url); - var img = new Image(); - img.src = new_url; - img.onload = function() { - icon.attr("width",Math.min(img.width,30)); - icon.attr("height",Math.min(img.height,30)); - icon.attr("x",15-Math.min(img.width,30)/2); - } - } - } - - - thisNode.selectAll(".node_tools").attr("x",function(d){return d.w-35;}).attr("y",function(d){return d.h-20;}); - - thisNode.selectAll(".node_changed") - .attr("x",function(d){return d.w-10}) - .classed("hidden",function(d) { return !(d.changed||d.moved); }); - - thisNode.selectAll(".node_error") - .attr("x",function(d){return d.w-10-((d.changed||d.moved)?13:0)}) - .classed("hidden",function(d) { return d.valid; }); - - thisNode.selectAll(".port_input").each(function(d,i) { - var port = d3.select(this); - port.attr("transform",function(d){return "translate(-5,"+((d.h/2)-5)+")";}) - }); - - thisNode.selectAll(".node_icon").attr("y",function(d){return (d.h-d3.select(this).attr("height"))/2;}); - thisNode.selectAll(".node_icon_shade").attr("height",function(d){return d.h;}); - thisNode.selectAll(".node_icon_shade_border").attr("d",function(d){ return "M "+(("right" == d._def.align) ?0:30)+" 1 l 0 "+(d.h-2)}); - - thisNode.selectAll(".node_button").attr("opacity",function(d) { - return (activeSubflow||!isButtonEnabled(d))?0.4:1 - }); - thisNode.selectAll(".node_button_button").attr("cursor",function(d) { - return (activeSubflow||!isButtonEnabled(d))?"":"pointer"; - }); - thisNode.selectAll(".node_right_button").attr("transform",function(d){ - var x = d.w-6; - if (d._def.button.toggle && !d[d._def.button.toggle]) { - x = x - 8; - } - return "translate("+x+",2)"; - }); - thisNode.selectAll(".node_right_button rect").attr("fill-opacity",function(d){ - if (d._def.button.toggle) { - return d[d._def.button.toggle]?1:0.2; - } - return 1; - }); - - //thisNode.selectAll(".node_right_button").attr("transform",function(d){return "translate("+(d.w - d._def.button.width.call(d))+","+0+")";}).attr("fill",function(d) { - // return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color) - //}); - - thisNode.selectAll(".node_badge_group").attr("transform",function(d){return "translate("+(d.w-40)+","+(d.h+3)+")";}); - thisNode.selectAll("text.node_badge_label").text(function(d,i) { - if (d._def.badge) { - if (typeof d._def.badge == "function") { - try { - return d._def.badge.call(d); - } catch(err) { - console.log("Definition error: "+d.type+".badge",err); - return ""; - } - } else { - return d._def.badge; - } - } - return ""; - }); - } - - if (!showStatus || !d.status) { - thisNode.selectAll(".node_status_group").style("display","none"); - } else { - thisNode.selectAll(".node_status_group").style("display","inline").attr("transform","translate(3,"+(d.h+3)+")"); - var fill = status_colours[d.status.fill]; // Only allow our colours for now - if (d.status.shape == null && fill == null) { - thisNode.selectAll(".node_status").style("display","none"); - } else { - var style; - if (d.status.shape == null || d.status.shape == "dot") { - style = { - display: "inline", - fill: fill, - stroke: fill - }; - } else if (d.status.shape == "ring" ){ - style = { - display: "inline", - fill: "#fff", - stroke: fill - } - } - thisNode.selectAll(".node_status").style(style); - } - if (d.status.text) { - thisNode.selectAll(".node_status_label").text(d.status.text); - } else { - thisNode.selectAll(".node_status_label").text(""); - } - } - - d.dirty = false; - } - }); - - var link = vis.selectAll(".link").data( - activeLinks, - function(d) { - return d.source.id+":"+d.sourcePort+":"+d.target.id+":"+d.target.i; - } - ); - var linkEnter = link.enter().insert("g",".node").attr("class","link"); - - linkEnter.each(function(d,i) { - var l = d3.select(this); - d.added = true; - l.append("svg:path").attr("class","link_background link_path") - .on("mousedown",function(d) { - mousedown_link = d; - clearSelection(); - selected_link = mousedown_link; - updateSelection(); - redraw(); - focusView(); - d3.event.stopPropagation(); - }) - .on("touchstart",function(d) { - mousedown_link = d; - clearSelection(); - selected_link = mousedown_link; - updateSelection(); - redraw(); - focusView(); - d3.event.stopPropagation(); - - var obj = d3.select(document.body); - var touch0 = d3.event.touches.item(0); - var pos = [touch0.pageX,touch0.pageY]; - touchStartTime = setTimeout(function() { - touchStartTime = null; - showTouchMenu(obj,pos); - },touchLongPressTimeout); - }) - l.append("svg:path").attr("class","link_outline link_path"); - l.append("svg:path").attr("class","link_line link_path") - .classed("link_link", function(d) { return d.link }) - .classed("link_subflow", function(d) { return !d.link && activeSubflow }); - }); - - link.exit().remove(); - var links = vis.selectAll(".link_path"); - links.each(function(d) { - var link = d3.select(this); - if (d.added || d===selected_link || d.selected || dirtyNodes[d.source.id] || dirtyNodes[d.target.id]) { - link.attr("d",function(d){ - var numOutputs = d.source.outputs || 1; - var sourcePort = d.sourcePort || 0; - var y = -((numOutputs-1)/2)*13 +13*sourcePort; - d.x1 = d.source.x+d.source.w/2; - d.y1 = d.source.y+y; - d.x2 = d.target.x-d.target.w/2; - d.y2 = d.target.y; - - // return "M "+d.x1+" "+d.y1+ - // " C "+(d.x1+scale*node_width)+" "+(d.y1+scaleY*node_height)+" "+ - // (d.x2-scale*node_width)+" "+(d.y2-scaleY*node_height)+" "+ - // d.x2+" "+d.y2; - - return generateLinkPath(d.x1,d.y1,d.x2,d.y2,1); - }); - } - }) - - link.classed("link_selected", function(d) { return d === selected_link || d.selected; }); - link.classed("link_unknown",function(d) { - delete d.added; - return d.target.type == "unknown" || d.source.type == "unknown" - }); - var offLinks = vis.selectAll(".link_flow_link_g").data( - activeFlowLinks, - function(d) { - return d.node.id+":"+d.refresh - } - ); - - var offLinksEnter = offLinks.enter().insert("g",".node").attr("class","link_flow_link_g"); - offLinksEnter.each(function(d,i) { - var g = d3.select(this); - var s = 1; - var labelAnchor = "start"; - if (d.node.type === "link in") { - s = -1; - labelAnchor = "end"; - } - var stemLength = s*30; - var branchLength = s*20; - var l = g.append("svg:path").attr("class","link_flow_link") - .attr("class","link_link").attr("d","M 0 0 h "+stemLength); - var links = d.links; - var flows = Object.keys(links); - var tabOrder = RED.nodes.getWorkspaceOrder(); - flows.sort(function(A,B) { - return tabOrder.indexOf(A) - tabOrder.indexOf(B); - }); - var linkWidth = 10; - var h = node_height; - var y = -(flows.length-1)*h/2; - var linkGroups = g.selectAll(".link_group").data(flows); - var enterLinkGroups = linkGroups.enter().append("g").attr("class","link_group") - .on('mouseover', function() { d3.select(this).classed('link_group_active',true)}) - .on('mouseout', function() { d3.select(this).classed('link_group_active',false)}) - .on('mousedown', function() { d3.event.preventDefault(); d3.event.stopPropagation(); }) - .on('mouseup', function(f) { - d3.event.stopPropagation(); - var targets = d.links[f]; - RED.workspaces.show(f); - targets.forEach(function(n) { - n.selected = true; - n.dirty = true; - moving_set.push({n:n}); - }); - updateSelection(); - redraw(); - }); - enterLinkGroups.each(function(f) { - var linkG = d3.select(this); - linkG.append("svg:path").attr("class","link_flow_link") - .attr("class","link_link") - .attr("d", - "M "+stemLength+" 0 "+ - "C "+(stemLength+(1.7*branchLength))+" "+0+ - " "+(stemLength+(0.1*branchLength))+" "+y+" "+ - (stemLength+branchLength*1.5)+" "+y+" " - ); - linkG.append("svg:path") - .attr("class","link_port") - .attr("d", - "M "+(stemLength+branchLength*1.5+s*(linkWidth+7))+" "+(y-12)+" "+ - "h "+(-s*linkWidth)+" "+ - "a 3 3 45 0 "+(s===1?"0":"1")+" "+(s*-3)+" 3 "+ - "v 18 "+ - "a 3 3 45 0 "+(s===1?"0":"1")+" "+(s*3)+" 3 "+ - "h "+(s*linkWidth) - ); - linkG.append("svg:path") - .attr("class","link_port") - .attr("d", - "M "+(stemLength+branchLength*1.5+s*(linkWidth+10))+" "+(y-12)+" "+ - "h "+(s*(linkWidth*3))+" "+ - "M "+(stemLength+branchLength*1.5+s*(linkWidth+10))+" "+(y+12)+" "+ - "h "+(s*(linkWidth*3)) - ).style("stroke-dasharray","12 3 8 4 3"); - linkG.append("rect").attr("class","port link_port") - .attr("x",stemLength+branchLength*1.5-4+(s*4)) - .attr("y",y-4) - .attr("rx",2) - .attr("ry",2) - .attr("width",8) - .attr("height",8); - linkG.append("rect") - .attr("x",stemLength+branchLength*1.5-(s===-1?node_width:0)) - .attr("y",y-12) - .attr("width",node_width) - .attr("height",24) - .style("stroke","none") - .style("fill","transparent") - var tab = RED.nodes.workspace(f); - var label; - if (tab) { - label = tab.label || tab.id; - } - linkG.append("svg:text") - .attr("class","port_label") - .attr("x",stemLength+branchLength*1.5+(s*15)) - .attr("y",y+1) - .style("font-size","10px") - .style("text-anchor",labelAnchor) - .text(label); - - y += h; - }); - linkGroups.exit().remove(); - }); - offLinks.exit().remove(); - offLinks = vis.selectAll(".link_flow_link_g"); - offLinks.each(function(d) { - var s = 1; - if (d.node.type === "link in") { - s = -1; - } - var link = d3.select(this); - link.attr("transform", function(d) { return "translate(" + (d.node.x+(s*d.node.w/2)) + "," + (d.node.y) + ")"; }); - - }) - - } else { - // JOINING - unselect any selected links - vis.selectAll(".link_selected").data( - activeLinks, - function(d) { - return d.source.id+":"+d.sourcePort+":"+d.target.id+":"+d.target.i; - } - ).classed("link_selected", false); - } - RED.view.navigator.refresh(); - if (d3.event) { - d3.event.preventDefault(); - } - - } - - function focusView() { - try { - // Workaround for browser unexpectedly scrolling iframe into full - // view - record the parent scroll position and restore it after - // setting the focus - var scrollX = window.parent.window.scrollX; - var scrollY = window.parent.window.scrollY; - $("#chart").focus(); - window.parent.window.scrollTo(scrollX,scrollY); - } catch(err) { - // In case we're iframed into a page of a different origin, just focus - // the view following the inevitable DOMException - $("#chart").focus(); - } - } - - /** - * Imports a new collection of nodes from a JSON String. - * - all get new IDs assigned - * - all "selected" - * - attached to mouse for placing - "IMPORT_DRAGGING" - */ - function importNodes(newNodesStr,addNewFlow,touchImport) { - try { - var activeSubflowChanged; - if (activeSubflow) { - activeSubflowChanged = activeSubflow.changed; - } - var result = RED.nodes.import(newNodesStr,true,addNewFlow); - if (result) { - var new_nodes = result[0]; - var new_links = result[1]; - var new_workspaces = result[2]; - var new_subflows = result[3]; - var new_default_workspace = result[4]; - if (addNewFlow && new_default_workspace) { - RED.workspaces.show(new_default_workspace.id); - } - var new_ms = new_nodes.filter(function(n) { return n.hasOwnProperty("x") && n.hasOwnProperty("y") && n.z == RED.workspaces.active() }).map(function(n) { return {n:n};}); - var new_node_ids = new_nodes.map(function(n){ return n.id; }); - - // TODO: pick a more sensible root node - if (new_ms.length > 0) { - var root_node = new_ms[0].n; - var dx = root_node.x; - var dy = root_node.y; - - if (mouse_position == null) { - mouse_position = [0,0]; - } - - var minX = 0; - var minY = 0; - var i; - var node; - - for (i=0;i<new_ms.length;i++) { - node = new_ms[i]; - node.n.selected = true; - node.n.changed = true; - node.n.moved = true; - node.n.x -= dx - mouse_position[0]; - node.n.y -= dy - mouse_position[1]; - node.dx = node.n.x - mouse_position[0]; - node.dy = node.n.y - mouse_position[1]; - minX = Math.min(node.n.x-node_width/2-5,minX); - minY = Math.min(node.n.y-node_height/2-5,minY); - } - for (i=0;i<new_ms.length;i++) { - node = new_ms[i]; - node.n.x -= minX; - node.n.y -= minY; - node.dx -= minX; - node.dy -= minY; - if (node.n._def.onadd) { - try { - node.n._def.onadd.call(node.n); - } catch(err) { - console.log("Definition error: "+node.n.type+".onadd:",err); - } - } - - } - if (!touchImport) { - mouse_mode = RED.state.IMPORT_DRAGGING; - spliceActive = false; - if (new_ms.length === 1) { - node = new_ms[0]; - spliceActive = node.n.hasOwnProperty("_def") && - node.n._def.inputs > 0 && - node.n._def.outputs > 0; - } - } - RED.keyboard.add("*","escape",function(){ - RED.keyboard.remove("escape"); - clearSelection(); - RED.history.pop(); - mouse_mode = 0; - }); - clearSelection(); - moving_set = new_ms; - } - - var historyEvent = { - t:"add", - nodes:new_node_ids, - links:new_links, - workspaces:new_workspaces, - subflows:new_subflows, - dirty:RED.nodes.dirty() - }; - if (new_ms.length === 0) { - RED.nodes.dirty(true); - } - if (activeSubflow) { - var subflowRefresh = RED.subflow.refresh(true); - if (subflowRefresh) { - historyEvent.subflow = { - id:activeSubflow.id, - changed: activeSubflowChanged, - instances: subflowRefresh.instances - } - } - } - RED.history.push(historyEvent); - - updateActiveNodes(); - redraw(); - } - } catch(error) { - if (error.code != "NODE_RED") { - console.log(error.stack); - RED.notify(RED._("notification.error",{message:error.toString()}),"error"); - } else { - RED.notify(RED._("notification.error",{message:error.message}),"error"); - } - } - } - - function toggleShowGrid(state) { - if (state) { - grid.style("visibility","visible"); - } else { - grid.style("visibility","hidden"); - } - } - function toggleSnapGrid(state) { - snapGrid = state; - redraw(); - } - function toggleStatus(s) { - showStatus = s; - RED.nodes.eachNode(function(n) { n.dirty = true;}); - //TODO: subscribe/unsubscribe here - redraw(); - } - - return { - init: init, - state:function(state) { - if (state == null) { - return mouse_mode - } else { - mouse_mode = state; - } - }, - - redraw: function(updateActive) { - if (updateActive) { - updateActiveNodes(); - updateSelection(); - } - redraw(); - }, - focus: focusView, - importNodes: importNodes, - calculateTextWidth: calculateTextWidth, - select: function(selection) { - if (typeof selection !== "undefined") { - clearSelection(); - if (typeof selection == "string") { - var selectedNode = RED.nodes.node(selection); - if (selectedNode) { - selectedNode.selected = true; - selectedNode.dirty = true; - moving_set = [{n:selectedNode}]; - } - } - } - updateSelection(); - redraw(); - }, - selection: function() { - var selection = {}; - if (moving_set.length > 0) { - selection.nodes = moving_set.map(function(n) { return n.n;}); - } - if (selected_link != null) { - selection.link = selected_link; - } - return selection; - }, - scale: function() { - return scaleFactor; - }, - getLinksAtPoint: function(x,y) { - var result = []; - var links = outer.selectAll(".link_background")[0]; - for (var i=0;i<links.length;i++) { - var bb = links[i].getBBox(); - if (x >= bb.x && y >= bb.y && x <= bb.x+bb.width && y <= bb.y+bb.height) { - result.push(links[i]) - } - } - return result; - }, - reveal: function(id) { - if (RED.nodes.workspace(id) || RED.nodes.subflow(id)) { - RED.workspaces.show(id); - } else { - var node = RED.nodes.node(id); - if (node._def.category !== 'config' && node.z) { - node.highlighted = true; - node.dirty = true; - RED.workspaces.show(node.z); - - var screenSize = [$("#chart").width(),$("#chart").height()]; - var scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; - - if (node.x < scrollPos[0] || node.y < scrollPos[1] || node.x > screenSize[0]+scrollPos[0] || node.y > screenSize[1]+scrollPos[1]) { - var deltaX = '-='+((scrollPos[0] - node.x) + screenSize[0]/2); - var deltaY = '-='+((scrollPos[1] - node.y) + screenSize[1]/2); - $("#chart").animate({ - scrollLeft: deltaX, - scrollTop: deltaY - },200); - } - - if (!node._flashing) { - node._flashing = true; - var flash = 22; - var flashFunc = function() { - flash--; - node.dirty = true; - if (flash >= 0) { - node.highlighted = !node.highlighted; - setTimeout(flashFunc,100); - } else { - node.highlighted = false; - delete node._flashing; - } - RED.view.redraw(); - } - flashFunc(); - } - } else if (node._def.category === 'config') { - RED.sidebar.config.show(id); - } - } - }, - gridSize: function(v) { - if (v === undefined) { - return gridSize; - } else { - gridSize = Math.max(5,v); - updateGrid(); - } - }, - getActiveNodes: function() { - return activeNodes; - } - }; -})(); -;/** - * Copyright 2016 IBM Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - - - RED.view.navigator = (function() { - - var nav_scale = 25; - var nav_width = 5000/nav_scale; - var nav_height = 5000/nav_scale; - - var navContainer; - var navBox; - var navBorder; - var navVis; - var scrollPos; - var scaleFactor; - var chartSize; - var dimensions; - var isDragging; - var isShowing = false; - - function refreshNodes() { - if (!isShowing) { - return; - } - var navNode = navVis.selectAll(".navnode").data(RED.view.getActiveNodes(),function(d){return d.id}); - navNode.exit().remove(); - navNode.enter().insert("rect") - .attr('class','navnode') - .attr("pointer-events", "none"); - navNode.each(function(d) { - d3.select(this).attr("x",function(d) { return (d.x-d.w/2)/nav_scale }) - .attr("y",function(d) { return (d.y-d.h/2)/nav_scale }) - .attr("width",function(d) { return Math.max(9,d.w/nav_scale) }) - .attr("height",function(d) { return Math.max(3,d.h/nav_scale) }) - .attr("fill",function(d) { return RED.utils.getNodeColor(d.type,d._def);}) - }); - } - function onScroll() { - if (!isDragging) { - resizeNavBorder(); - } - } - function resizeNavBorder() { - if (navBorder) { - scaleFactor = RED.view.scale(); - chartSize = [ $("#chart").width(), $("#chart").height()]; - scrollPos = [$("#chart").scrollLeft(),$("#chart").scrollTop()]; - navBorder.attr('x',scrollPos[0]/nav_scale) - .attr('y',scrollPos[1]/nav_scale) - .attr('width',chartSize[0]/nav_scale/scaleFactor) - .attr('height',chartSize[1]/nav_scale/scaleFactor) - } - } - - return { - init: function() { - - $(window).resize(resizeNavBorder); - RED.events.on("sidebar:resize",resizeNavBorder); - - var hideTimeout; - - navContainer = $('<div>').css({ - "position":"absolute", - "bottom":$("#workspace-footer").height(), - "right":0, - zIndex: 1 - }).appendTo("#workspace").hide(); - - navBox = d3.select(navContainer[0]) - .append("svg:svg") - .attr("width", nav_width) - .attr("height", nav_height) - .attr("pointer-events", "all") - .style({ - position: "absolute", - bottom: 0, - right:0, - zIndex: 101, - "border-left": "1px solid #ccc", - "border-top": "1px solid #ccc", - background: "rgba(245,245,245,0.5)", - "box-shadow": "-1px 0 3px rgba(0,0,0,0.1)" - }); - - navBox.append("rect").attr("x",0).attr("y",0).attr("width",nav_width).attr("height",nav_height).style({ - fill:"none", - stroke:"none", - pointerEvents:"all" - }).on("mousedown", function() { - // Update these in case they have changed - scaleFactor = RED.view.scale(); - chartSize = [ $("#chart").width(), $("#chart").height()]; - dimensions = [chartSize[0]/nav_scale/scaleFactor, chartSize[1]/nav_scale/scaleFactor]; - var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); - var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); - navBorder.attr('x',newX).attr('y',newY); - isDragging = true; - $("#chart").scrollLeft(newX*nav_scale*scaleFactor); - $("#chart").scrollTop(newY*nav_scale*scaleFactor); - }).on("mousemove", function() { - if (!isDragging) { return } - if (d3.event.buttons === 0) { - isDragging = false; - return; - } - var newX = Math.max(0,Math.min(d3.event.offsetX+dimensions[0]/2,nav_width)-dimensions[0]); - var newY = Math.max(0,Math.min(d3.event.offsetY+dimensions[1]/2,nav_height)-dimensions[1]); - navBorder.attr('x',newX).attr('y',newY); - $("#chart").scrollLeft(newX*nav_scale*scaleFactor); - $("#chart").scrollTop(newY*nav_scale*scaleFactor); - }).on("mouseup", function() { - isDragging = false; - }) - - navBorder = navBox.append("rect") - .attr("stroke-dasharray","5,5") - .attr("pointer-events", "none") - .style({ - stroke: "#999", - strokeWidth: 1, - fill: "white", - }); - - navVis = navBox.append("svg:g") - - - $("#btn-navigate").click(function(evt) { - evt.preventDefault(); - if (!isShowing) { - isShowing = true; - $("#btn-navigate").addClass("selected"); - resizeNavBorder(); - refreshNodes(); - $("#chart").on("scroll",onScroll); - navContainer.fadeIn(200); - } else { - isShowing = false; - navContainer.fadeOut(100); - $("#chart").off("scroll",onScroll); - $("#btn-navigate").removeClass("selected"); - } - }) - }, - refresh: refreshNodes, - resize: resizeNavBorder - } - - -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.sidebar = (function() { - - //$('#sidebar').tabs(); - var sidebar_tabs = RED.tabs.create({ - id:"sidebar-tabs", - onchange:function(tab) { - $("#sidebar-content").children().hide(); - $("#sidebar-footer").children().hide(); - if (tab.onchange) { - tab.onchange.call(tab); - } - $(tab.wrapper).show(); - if (tab.toolbar) { - $(tab.toolbar).show(); - } - }, - onremove: function(tab) { - $(tab.wrapper).hide(); - if (tab.onremove) { - tab.onremove.call(tab); - } - }, - // minimumActiveTabWidth: 70, - collapsible: true - // scrollable: true - }); - - var knownTabs = { - - }; - - function addTab(title,content,closeable,visible) { - var options; - if (typeof title === "string") { - // TODO: legacy support in case anyone uses this... - options = { - id: content.id, - label: title, - name: title, - content: content, - closeable: closeable, - visible: visible - } - } else if (typeof title === "object") { - options = title; - } - - delete options.closeable; - - options.wrapper = $('<div>',{style:"height:100%"}).appendTo("#sidebar-content") - options.wrapper.append(options.content); - options.wrapper.hide(); - - if (!options.enableOnEdit) { - options.shade = $('<div>',{class:"sidebar-shade hide"}).appendTo(options.wrapper); - } - - if (options.toolbar) { - $("#sidebar-footer").append(options.toolbar); - $(options.toolbar).hide(); - } - var id = options.id; - - RED.menu.addItem("menu-item-view-menu",{ - id:"menu-item-view-menu-"+options.id, - label:options.name, - onselect:function() { - showSidebar(options.id); - }, - group: "sidebar-tabs" - }); - - options.iconClass = options.iconClass || "fa fa-square-o" - - knownTabs[options.id] = options; - - if (options.visible !== false) { - sidebar_tabs.addTab(knownTabs[options.id]); - } - } - - function removeTab(id) { - sidebar_tabs.removeTab(id); - $(knownTabs[id].wrapper).remove(); - if (knownTabs[id].footer) { - knownTabs[id].footer.remove(); - } - delete knownTabs[id]; - RED.menu.removeItem("menu-item-view-menu-"+id); - } - - var sidebarSeparator = {}; - $("#sidebar-separator").draggable({ - axis: "x", - start:function(event,ui) { - sidebarSeparator.closing = false; - sidebarSeparator.opening = false; - var winWidth = $(window).width(); - sidebarSeparator.start = ui.position.left; - sidebarSeparator.chartWidth = $("#workspace").width(); - sidebarSeparator.chartRight = winWidth-$("#workspace").width()-$("#workspace").offset().left-2; - - if (!RED.menu.isSelected("menu-item-sidebar")) { - sidebarSeparator.opening = true; - var newChartRight = 7; - $("#sidebar").addClass("closing"); - $("#workspace").css("right",newChartRight); - $("#editor-stack").css("right",newChartRight+1); - $("#sidebar").width(0); - RED.menu.setSelected("menu-item-sidebar",true); - RED.events.emit("sidebar:resize"); - } - sidebarSeparator.width = $("#sidebar").width(); - }, - drag: function(event,ui) { - var d = ui.position.left-sidebarSeparator.start; - var newSidebarWidth = sidebarSeparator.width-d; - if (sidebarSeparator.opening) { - newSidebarWidth -= 3; - } - - if (newSidebarWidth > 150) { - if (sidebarSeparator.chartWidth+d < 200) { - ui.position.left = 200+sidebarSeparator.start-sidebarSeparator.chartWidth; - d = ui.position.left-sidebarSeparator.start; - newSidebarWidth = sidebarSeparator.width-d; - } - } - - if (newSidebarWidth < 150) { - if (!sidebarSeparator.closing) { - $("#sidebar").addClass("closing"); - sidebarSeparator.closing = true; - } - if (!sidebarSeparator.opening) { - newSidebarWidth = 150; - ui.position.left = sidebarSeparator.width-(150 - sidebarSeparator.start); - d = ui.position.left-sidebarSeparator.start; - } - } else if (newSidebarWidth > 150 && (sidebarSeparator.closing || sidebarSeparator.opening)) { - sidebarSeparator.closing = false; - $("#sidebar").removeClass("closing"); - } - - var newChartRight = sidebarSeparator.chartRight-d; - $("#workspace").css("right",newChartRight); - $("#editor-stack").css("right",newChartRight+1); - $("#sidebar").width(newSidebarWidth); - - sidebar_tabs.resize(); - RED.events.emit("sidebar:resize"); - }, - stop:function(event,ui) { - if (sidebarSeparator.closing) { - $("#sidebar").removeClass("closing"); - RED.menu.setSelected("menu-item-sidebar",false); - if ($("#sidebar").width() < 180) { - $("#sidebar").width(180); - $("#workspace").css("right",187); - $("#editor-stack").css("right",188); - } - } - $("#sidebar-separator").css("left","auto"); - $("#sidebar-separator").css("right",($("#sidebar").width()+2)+"px"); - RED.events.emit("sidebar:resize"); - } - }); - - function toggleSidebar(state) { - if (!state) { - $("#main-container").addClass("sidebar-closed"); - } else { - $("#main-container").removeClass("sidebar-closed"); - sidebar_tabs.resize(); - } - RED.events.emit("sidebar:resize"); - } - - function showSidebar(id) { - if (id) { - if (!containsTab(id)) { - sidebar_tabs.addTab(knownTabs[id]); - } - sidebar_tabs.activateTab(id); - if (!RED.menu.isSelected("menu-item-sidebar")) { - RED.menu.setSelected("menu-item-sidebar",true); - } - } - } - - function containsTab(id) { - return sidebar_tabs.contains(id); - } - - function init () { - RED.actions.add("core:toggle-sidebar",function(state){ - if (state === undefined) { - RED.menu.toggleSelected("menu-item-sidebar"); - } else { - toggleSidebar(state); - } - }); - showSidebar(); - RED.sidebar.info.init(); - RED.sidebar.config.init(); - RED.sidebar.context.init(); - // hide info bar at start if screen rather narrow... - if ($(window).width() < 600) { RED.menu.setSelected("menu-item-sidebar",false); } - } - - return { - init: init, - addTab: addTab, - removeTab: removeTab, - show: showSidebar, - containsTab: containsTab, - toggleSidebar: toggleSidebar, - } - -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.palette = (function() { - - var exclusion = ['config','unknown','deprecated']; - var coreCategories = ['subflows', 'input', 'output', 'function', 'social', 'mobile', 'storage', 'analysis', 'advanced']; - - var categoryContainers = {}; - - - function createCategory(originalCategory,rootCategory,category,ns) { - if ($("#palette-base-category-"+rootCategory).length === 0) { - createCategoryContainer(originalCategory,rootCategory, ns+":palette.label."+rootCategory); - } - $("#palette-container-"+rootCategory).show(); - if ($("#palette-"+category).length === 0) { - $("#palette-base-category-"+rootCategory).append('<div id="palette-'+category+'"></div>'); - } - } - function createCategoryContainer(originalCategory,category, labelId) { - var label = RED._(labelId, {defaultValue:category}); - label = (label || category).replace(/_/g, " "); - var catDiv = $('<div id="palette-container-'+category+'" class="palette-category palette-close hide">'+ - '<div id="palette-header-'+category+'" class="palette-header"><i class="expanded fa fa-angle-down"></i><span>'+label+'</span></div>'+ - '<div class="palette-content" id="palette-base-category-'+category+'">'+ - '<div id="palette-'+category+'-input"></div>'+ - '<div id="palette-'+category+'-output"></div>'+ - '<div id="palette-'+category+'-function"></div>'+ - '</div>'+ - '</div>').appendTo("#palette-container"); - catDiv.data('category',originalCategory); - catDiv.data('label',label); - categoryContainers[category] = { - container: catDiv, - close: function() { - catDiv.removeClass("palette-open"); - catDiv.addClass("palette-closed"); - $("#palette-base-category-"+category).slideUp(); - $("#palette-header-"+category+" i").removeClass("expanded"); - }, - open: function() { - catDiv.addClass("palette-open"); - catDiv.removeClass("palette-closed"); - $("#palette-base-category-"+category).slideDown(); - $("#palette-header-"+category+" i").addClass("expanded"); - }, - toggle: function() { - if (catDiv.hasClass("palette-open")) { - categoryContainers[category].close(); - } else { - categoryContainers[category].open(); - } - } - }; - - $("#palette-header-"+category).on('click', function(e) { - categoryContainers[category].toggle(); - }); - } - - function setLabel(type, el,label, info) { - var nodeWidth = 82; - var nodeHeight = 25; - var lineHeight = 20; - var portHeight = 10; - - var words = label.split(/[ -]/); - - var displayLines = []; - - var currentLine = words[0]; - var currentLineWidth = RED.view.calculateTextWidth(currentLine, "palette_label", 0); - - for (var i=1;i<words.length;i++) { - var newWidth = RED.view.calculateTextWidth(currentLine+" "+words[i], "palette_label", 0); - if (newWidth < nodeWidth) { - currentLine += " "+words[i]; - currentLineWidth = newWidth; - } else { - displayLines.push(currentLine); - currentLine = words[i]; - currentLineWidth = RED.view.calculateTextWidth(currentLine, "palette_label", 0); - } - } - displayLines.push(currentLine); - - var lines = displayLines.join("<br/>"); - var multiLineNodeHeight = 8+(lineHeight*displayLines.length); - el.css({height:multiLineNodeHeight+"px"}); - - var labelElement = el.find(".palette_label"); - labelElement.html(lines).attr('dir', RED.text.bidi.resolveBaseTextDir(lines)); - - el.find(".palette_port").css({top:(multiLineNodeHeight/2-5)+"px"}); - - var popOverContent; - try { - var l = "<p><b>"+RED.text.bidi.enforceTextDirectionWithUCC(label)+"</b></p>"; - if (label != type) { - l = "<p><b>"+RED.text.bidi.enforceTextDirectionWithUCC(label)+"</b><br/><i>"+type+"</i></p>"; - } - popOverContent = $(l+(info?info:$("script[data-help-name='"+type+"']").html()||"<p>"+RED._("palette.noInfo")+"</p>").trim()) - .filter(function(n) { - return (this.nodeType == 1 && this.nodeName == "P") || (this.nodeType == 3 && this.textContent.trim().length > 0) - }).slice(0,2); - } catch(err) { - // Malformed HTML may cause errors. TODO: need to understand what can break - // NON-NLS: internal debug - console.log("Error generating pop-over label for ",type); - console.log(err.toString()); - popOverContent = "<p><b>"+label+"</b></p><p>"+RED._("palette.noInfo")+"</p>"; - } - - el.data('popover').setContent(popOverContent); - } - - function setIcon(element,sf) { - var iconElement = element.find(".palette_icon"); - var icon_url = RED.utils.getNodeIcon(sf._def,sf); - iconElement.attr("style", "background-image: url("+icon_url+")"); - } - - function escapeNodeType(nt) { - return nt.replace(" ","_").replace(".","_").replace(":","_"); - } - - function addNodeType(nt,def) { - var nodeTypeId = escapeNodeType(nt); - if ($("#palette_node_"+nodeTypeId).length) { - return; - } - if (exclusion.indexOf(def.category)===-1) { - - var originalCategory = def.category; - var category = def.category.replace(/ /g,"_"); - var rootCategory = category.split("-")[0]; - - var d = document.createElement("div"); - d.id = "palette_node_"+nodeTypeId; - d.type = nt; - - var label = /^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1]; - if (typeof def.paletteLabel !== "undefined") { - try { - label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||""; - } catch(err) { - console.log("Definition error: "+nt+".paletteLabel",err); - } - } - - $('<div/>',{class:"palette_label"+(def.align=="right"?" palette_label_right":"")}).appendTo(d); - - d.className="palette_node"; - - if (def.icon) { - var icon_url = RED.utils.getNodeIcon(def); - var iconContainer = $('<div/>',{class:"palette_icon_container"+(def.align=="right"?" palette_icon_container_right":"")}).appendTo(d); - $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); - } - - d.style.backgroundColor = RED.utils.getNodeColor(nt,def); - - if (def.outputs > 0) { - var portOut = document.createElement("div"); - portOut.className = "palette_port palette_port_output"; - d.appendChild(portOut); - } - - if (def.inputs > 0) { - var portIn = document.createElement("div"); - portIn.className = "palette_port palette_port_input"; - d.appendChild(portIn); - } - - createCategory(def.category,rootCategory,category,(coreCategories.indexOf(rootCategory) !== -1)?"node-red":def.set.id); - - $("#palette-"+category).append(d); - - $(d).data('category',rootCategory); - - d.onmousedown = function(e) { e.preventDefault(); }; - - var popover = RED.popover.create({ - target:$(d), - trigger: "hover", - width: "300px", - content: "hi", - delay: { show: 750, hide: 50 } - }); - $(d).data('popover',popover); - - // $(d).popover({ - // title:d.type, - // placement:"right", - // trigger: "hover", - // delay: { show: 750, hide: 50 }, - // html: true, - // container:'body' - // }); - $(d).click(function() { - RED.view.focus(); - var helpText; - if (nt.indexOf("subflow:") === 0) { - helpText = marked(RED.nodes.subflow(nt.substring(8)).info||"")||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>'); - } else { - helpText = $("script[data-help-name='"+d.type+"']").html()||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>'); - } - RED.sidebar.info.set(helpText,RED._("sidebar.info.nodeHelp")); - }); - var chart = $("#chart"); - var chartOffset = chart.offset(); - var chartSVG = $("#chart>svg").get(0); - var activeSpliceLink; - var mouseX; - var mouseY; - var spliceTimer; - var paletteWidth; - var paletteTop; - $(d).draggable({ - helper: 'clone', - appendTo: 'body', - revert: true, - revertDuration: 50, - containment:'#main-container', - start: function() { - paletteWidth = $("#palette").width(); - paletteTop = $("#palette").parent().position().top + $("#palette-container").position().top; - RED.view.focus(); - }, - stop: function() { d3.select('.link_splice').classed('link_splice',false); if (spliceTimer) { clearTimeout(spliceTimer); spliceTimer = null;}}, - drag: function(e,ui) { - - // TODO: this is the margin-left of palette node. Hard coding - // it here makes me sad - //console.log(ui.helper.position()); - ui.position.left += 17.5; - - if (def.inputs > 0 && def.outputs > 0) { - mouseX = ui.position.left-paletteWidth+(ui.helper.width()/2) - chartOffset.left + chart.scrollLeft(); - mouseY = ui.position.top-paletteTop+(ui.helper.height()/2) - chartOffset.top + chart.scrollTop(); - if (!spliceTimer) { - spliceTimer = setTimeout(function() { - var nodes = []; - var bestDistance = Infinity; - var bestLink = null; - if (chartSVG.getIntersectionList) { - var svgRect = chartSVG.createSVGRect(); - svgRect.x = mouseX; - svgRect.y = mouseY; - svgRect.width = 1; - svgRect.height = 1; - nodes = chartSVG.getIntersectionList(svgRect,chartSVG); - mouseX /= RED.view.scale(); - mouseY /= RED.view.scale(); - } else { - // Firefox doesn't do getIntersectionList and that - // makes us sad - mouseX /= RED.view.scale(); - mouseY /= RED.view.scale(); - nodes = RED.view.getLinksAtPoint(mouseX,mouseY); - } - - for (var i=0;i<nodes.length;i++) { - if (d3.select(nodes[i]).classed('link_background')) { - var length = nodes[i].getTotalLength(); - for (var j=0;j<length;j+=10) { - var p = nodes[i].getPointAtLength(j); - var d2 = ((p.x-mouseX)*(p.x-mouseX))+((p.y-mouseY)*(p.y-mouseY)); - if (d2 < 200 && d2 < bestDistance) { - bestDistance = d2; - bestLink = nodes[i]; - } - } - } - } - if (activeSpliceLink && activeSpliceLink !== bestLink) { - d3.select(activeSpliceLink.parentNode).classed('link_splice',false); - } - if (bestLink) { - d3.select(bestLink.parentNode).classed('link_splice',true) - } else { - d3.select('.link_splice').classed('link_splice',false); - } - if (activeSpliceLink !== bestLink) { - if (bestLink) { - $(ui.helper).data('splice',d3.select(bestLink).data()[0]); - } else { - $(ui.helper).removeData('splice'); - } - } - activeSpliceLink = bestLink; - spliceTimer = null; - },200); - } - } - } - }); - - var nodeInfo = null; - if (nt.indexOf("subflow:") === 0) { - $(d).dblclick(function(e) { - RED.workspaces.show(nt.substring(8)); - e.preventDefault(); - }); - nodeInfo = marked(def.info||""); - } - setLabel(nt,$(d),label,nodeInfo); - - var categoryNode = $("#palette-container-"+category); - if (categoryNode.find(".palette_node").length === 1) { - categoryContainers[category].open(); - } - - } - } - - function removeNodeType(nt) { - var nodeTypeId = escapeNodeType(nt); - var paletteNode = $("#palette_node_"+nodeTypeId); - var categoryNode = paletteNode.closest(".palette-category"); - paletteNode.remove(); - if (categoryNode.find(".palette_node").length === 0) { - if (categoryNode.find("i").hasClass("expanded")) { - categoryNode.find(".palette-content").slideToggle(); - categoryNode.find("i").toggleClass("expanded"); - } - } - } - - function hideNodeType(nt) { - var nodeTypeId = escapeNodeType(nt); - var paletteNode = $("#palette_node_"+nodeTypeId); - paletteNode.hide(); - var categoryNode = paletteNode.closest(".palette-category"); - var cl = categoryNode.find(".palette_node"); - var c = 0; - for (var i = 0; i < cl.length; i++) { - if ($(cl[i]).css('display') === 'none') { c += 1; } - } - if (c === cl.length) { categoryNode.hide(); } - } - - function showNodeType(nt) { - var nodeTypeId = escapeNodeType(nt); - var paletteNode = $("#palette_node_"+nodeTypeId); - var categoryNode = paletteNode.closest(".palette-category"); - categoryNode.show(); - paletteNode.show(); - } - - function refreshNodeTypes() { - RED.nodes.eachSubflow(function(sf) { - var paletteNode = $("#palette_node_subflow_"+sf.id.replace(".","_")); - var portInput = paletteNode.find(".palette_port_input"); - var portOutput = paletteNode.find(".palette_port_output"); - - if (portInput.length === 0 && sf.in.length > 0) { - var portIn = document.createElement("div"); - portIn.className = "palette_port palette_port_input"; - paletteNode.append(portIn); - } else if (portInput.length !== 0 && sf.in.length === 0) { - portInput.remove(); - } - - if (portOutput.length === 0 && sf.out.length > 0) { - var portOut = document.createElement("div"); - portOut.className = "palette_port palette_port_output"; - paletteNode.append(portOut); - } else if (portOutput.length !== 0 && sf.out.length === 0) { - portOutput.remove(); - } - setLabel(sf.type+":"+sf.id,paletteNode,sf.name,marked(sf.info||"")); - setIcon(paletteNode,sf); - - var currentCategory = paletteNode.data('category'); - var newCategory = (sf.category||"subflows"); - if (currentCategory !== newCategory) { - var category = newCategory.replace(/ /g,"_"); - createCategory(newCategory,category,category,"node-red"); - - var currentCategoryNode = paletteNode.closest(".palette-category"); - var newCategoryNode = $("#palette-"+category); - newCategoryNode.append(paletteNode); - if (newCategoryNode.find(".palette_node").length === 1) { - categoryContainers[category].open(); - } - - paletteNode.data('category',newCategory); - if (currentCategoryNode.find(".palette_node").length === 0) { - if (currentCategoryNode.find("i").hasClass("expanded")) { - currentCategoryNode.find(".palette-content").slideToggle(); - currentCategoryNode.find("i").toggleClass("expanded"); - } - } - - - - } - }); - } - - function filterChange(val) { - var re = new RegExp(val.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'),'i'); - $("#palette-container .palette_node").each(function(i,el) { - var currentLabel = $(el).find(".palette_label").text(); - if (val === "" || re.test(el.id) || re.test(currentLabel)) { - $(this).show(); - } else { - $(this).hide(); - } - }); - - for (var category in categoryContainers) { - if (categoryContainers.hasOwnProperty(category)) { - if (categoryContainers[category].container - .find(".palette_node") - .filter(function() { return $(this).css('display') !== 'none'}).length === 0) { - categoryContainers[category].close(); - } else { - categoryContainers[category].open(); - } - } - } - } - - function init() { - - RED.events.on('registry:node-type-added', function(nodeType) { - var def = RED.nodes.getType(nodeType); - addNodeType(nodeType,def); - if (def.onpaletteadd && typeof def.onpaletteadd === "function") { - def.onpaletteadd.call(def); - } - }); - RED.events.on('registry:node-type-removed', function(nodeType) { - removeNodeType(nodeType); - }); - RED.events.on('registry:node-set-enabled', function(nodeSet) { - for (var j=0;j<nodeSet.types.length;j++) { - showNodeType(nodeSet.types[j]); - var def = RED.nodes.getType(nodeSet.types[j]); - if (def && def.onpaletteadd && typeof def.onpaletteadd === "function") { - def.onpaletteadd.call(def); - } - } - }); - RED.events.on('registry:node-set-disabled', function(nodeSet) { - for (var j=0;j<nodeSet.types.length;j++) { - hideNodeType(nodeSet.types[j]); - var def = RED.nodes.getType(nodeSet.types[j]); - if (def && def.onpaletteremove && typeof def.onpaletteremove === "function") { - def.onpaletteremove.call(def); - } - } - }); - RED.events.on('registry:node-set-removed', function(nodeSet) { - if (nodeSet.added) { - for (var j=0;j<nodeSet.types.length;j++) { - removeNodeType(nodeSet.types[j]); - var def = RED.nodes.getType(nodeSet.types[j]); - if (def && def.onpaletteremove && typeof def.onpaletteremove === "function") { - def.onpaletteremove.call(def); - } - } - } - }); - - $("#palette > .palette-spinner").show(); - - $("#palette-search input").searchBox({ - delay: 100, - change: function() { - filterChange($(this).val()); - } - }) - - var categoryList = coreCategories; - if (RED.settings.paletteCategories) { - categoryList = RED.settings.paletteCategories; - } else if (RED.settings.theme('palette.categories')) { - categoryList = RED.settings.theme('palette.categories'); - } - if (!Array.isArray(categoryList)) { - categoryList = coreCategories - } - categoryList.forEach(function(category){ - createCategoryContainer(category, category, "palette.label."+category); - }); - - $("#palette-collapse-all").on("click", function(e) { - e.preventDefault(); - for (var cat in categoryContainers) { - if (categoryContainers.hasOwnProperty(cat)) { - categoryContainers[cat].close(); - } - } - }); - $("#palette-expand-all").on("click", function(e) { - e.preventDefault(); - for (var cat in categoryContainers) { - if (categoryContainers.hasOwnProperty(cat)) { - categoryContainers[cat].open(); - } - } - }); - } - function getCategories() { - var categories = []; - $("#palette-container .palette-category").each(function(i,d) { - categories.push({id:$(d).data('category'),label:$(d).data('label')}); - }) - return categories; - } - return { - init: init, - add:addNodeType, - remove:removeNodeType, - hide:hideNodeType, - show:showNodeType, - refresh:refreshNodeTypes, - getCategories: getCategories - }; -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.sidebar.info = (function() { - - marked.setOptions({ - renderer: new marked.Renderer(), - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: true, - smartLists: true, - smartypants: false - }); - - var content; - var sections; - var nodeSection; - var infoSection; - var tipBox; - - var expandedSections = { - "property": false - }; - - function init() { - - content = document.createElement("div"); - content.className = "sidebar-node-info" - - RED.actions.add("core:show-info-tab",show); - - var stackContainer = $("<div>",{class:"sidebar-node-info-stack"}).appendTo(content); - - sections = RED.stack.create({ - container: stackContainer - }).hide(); - - nodeSection = sections.add({ - title: RED._("sidebar.info.info"), - collapsible: true - }); - nodeSection.expand(); - infoSection = sections.add({ - title: RED._("sidebar.info.nodeHelp"), - collapsible: true - }); - infoSection.expand(); - infoSection.content.css("padding","6px"); - infoSection.container.css("border-bottom","none"); - - var tipContainer = $('<div class="node-info-tips"></div>').appendTo(content); - tipBox = $('<div class="node-info-tip"></div>').appendTo(tipContainer); - var tipButtons = $('<div class="node-info-tips-buttons"></div>').appendTo(tipContainer); - - var tipRefresh = $('<a href="#" class="workspace-footer-button"><i class="fa fa-refresh"></a>').appendTo(tipButtons); - tipRefresh.click(function(e) { - e.preventDefault(); - tips.next(); - }) - - var tipClose = $('<a href="#" class="workspace-footer-button"><i class="fa fa-times"></a>').appendTo(tipButtons); - tipClose.click(function(e) { - e.preventDefault(); - RED.actions.invoke("core:toggle-show-tips"); - RED.notify(RED._("sidebar.info.showTips")); - }); - - RED.sidebar.addTab({ - id: "info", - label: RED._("sidebar.info.label"), - name: RED._("sidebar.info.name"), - iconClass: "fa fa-info", - content: content, - pinned: true, - enableOnEdit: true - }); - if (tips.enabled()) { - tips.start(); - } else { - tips.stop(); - } - - } - - function show() { - RED.sidebar.show("info"); - } - - // TODO: DRY - projects.js - function addTargetToExternalLinks(el) { - $(el).find("a").each(function(el) { - var href = $(this).attr('href'); - if (/^https?:/.test(href)) { - $(this).attr('target','_blank'); - } - }); - return el; - } - function refresh(node) { - if (node === undefined) { - refreshSelection(); - return; - } - sections.show(); - $(nodeSection.content).empty(); - $(infoSection.content).empty(); - - var propRow; - - var table = $('<table class="node-info"></table>').appendTo(nodeSection.content); - var tableBody = $('<tbody>').appendTo(table); - var subflowNode; - var subflowUserCount; - - var activeProject = RED.projects.getActiveProject(); - if (activeProject) { - propRow = $('<tr class="node-info-node-row"><td>Project</td><td></td></tr>').appendTo(tableBody); - $(propRow.children()[1]).text(activeProject.name||""); - $('<tr class="node-info-property-expand blank"><td colspan="2"></td></tr>').appendTo(tableBody); - $('<button class="editor-button editor-button-small" style="position:absolute;right:2px;"><i class="fa fa-ellipsis-h"></i></button>') - .appendTo(propRow.children()[1]) - .click(function(evt) { - evt.preventDefault(); - RED.projects.editProject(); - }); - } - infoSection.container.show(); - if (node === null) { - return; - } else if (Array.isArray(node)) { - infoSection.container.hide(); - propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.selection")+"</td><td></td></tr>").appendTo(tableBody); - $(propRow.children()[1]).text(RED._("sidebar.info.nodes",{count:node.length})) - } else { - var m = /^subflow(:(.+))?$/.exec(node.type); - if (m) { - if (m[2]) { - subflowNode = RED.nodes.subflow(m[2]); - } else { - subflowNode = node; - } - - subflowUserCount = 0; - var subflowType = "subflow:"+subflowNode.id; - RED.nodes.eachNode(function(n) { - if (n.type === subflowType) { - subflowUserCount++; - } - }); - } - if (node.type === "tab" || node.type === "subflow") { - propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info."+(node.type==='tab'?'flow':'subflow'))+'</td><td></td></tr>').appendTo(tableBody); - RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]); - propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.tabName")+"</td><td></td></tr>").appendTo(tableBody); - $(propRow.children()[1]).text(node.label||node.name||""); - if (node.type === "tab") { - propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.status")+'</td><td></td></tr>').appendTo(tableBody); - $(propRow.children()[1]).text((!!!node.disabled)?RED._("sidebar.info.enabled"):RED._("sidebar.info.disabled")) - } else if (node.type === "subflow") { - propRow = $('<tr class="node-info-node-row"><td>'+RED._("subflow.category")+'</td><td></td></tr>').appendTo(tableBody); - var category = node.category||"subflows"; - $(propRow.children()[1]).text(RED._("palette.label."+category,{defaultValue:category})) - } - } else { - propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.node")+"</td><td></td></tr>").appendTo(tableBody); - RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]); - - - if (node.type !== "subflow" && node.type !== "unknown" && node.name) { - propRow = $('<tr class="node-info-node-row"><td>'+RED._("common.label.name")+'</td><td></td></tr>').appendTo(tableBody); - $('<span class="bidiAware" dir="'+RED.text.bidi.resolveBaseTextDir(node.name)+'"></span>').text(node.name).appendTo(propRow.children()[1]); - } - if (!m) { - propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.type")+"</td><td></td></tr>").appendTo(tableBody); - $(propRow.children()[1]).text((node.type === "unknown")?node._orig.type:node.type); - if (node.type === "unknown") { - $('<span style="float: right; font-size: 0.8em"><i class="fa fa-warning"></i></span>').prependTo($(propRow.children()[1])) - } - } - if (!m && node.type != "subflow" && node.type != "comment") { - var defaults; - if (node.type === 'unknown') { - defaults = {}; - Object.keys(node._orig).forEach(function(k) { - if (k !== 'type') { - defaults[k] = {}; - } - }) - } else if (node._def) { - defaults = node._def.defaults; - } - if (defaults) { - var count = 0; - for (var n in defaults) { - if (n != "name" && defaults.hasOwnProperty(n)) { - var val = node[n]; - var type = typeof val; - count++; - propRow = $('<tr class="node-info-property-row'+(expandedSections.property?"":" hide")+'"><td>'+n+"</td><td></td></tr>").appendTo(tableBody); - if (defaults[n].type) { - var configNode = RED.nodes.node(val); - if (!configNode) { - RED.utils.createObjectElement(undefined).appendTo(propRow.children()[1]); - } else { - var configLabel = RED.utils.getNodeLabel(configNode,val); - var container = propRow.children()[1]; - - var div = $('<span>',{class:""}).appendTo(container); - var nodeDiv = $('<div>',{class:"palette_node palette_node_small"}).appendTo(div); - var colour = RED.utils.getNodeColor(configNode.type,configNode._def); - var icon_url = RED.utils.getNodeIcon(configNode._def); - nodeDiv.css({'backgroundColor':colour, "cursor":"pointer"}); - var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); - $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); - var nodeContainer = $('<span></span>').css({"verticalAlign":"top","marginLeft":"6px"}).text(configLabel).appendTo(container); - - nodeDiv.on('dblclick',function() { - RED.editor.editConfig("", configNode.type, configNode.id); - }) - - } - } else { - RED.utils.createObjectElement(val).appendTo(propRow.children()[1]); - } - } - } - if (count > 0) { - $('<tr class="node-info-property-expand blank"><td colspan="2"><a href="#" class=" node-info-property-header'+(expandedSections.property?" expanded":"")+'"><span class="node-info-property-show-more">'+RED._("sidebar.info.showMore")+'</span><span class="node-info-property-show-less">'+RED._("sidebar.info.showLess")+'</span> <i class="fa fa-caret-down"></i></a></td></tr>').appendTo(tableBody); - } - } - } - if (node.type !== 'tab') { - if (m) { - $('<tr class="blank"><th colspan="2">'+RED._("sidebar.info.subflow")+'</th></tr>').appendTo(tableBody); - $('<tr class="node-info-subflow-row"><td>'+RED._("common.label.name")+'</td><td><span class="bidiAware" dir=\"'+RED.text.bidi.resolveBaseTextDir(subflowNode.name)+'">'+subflowNode.name+'</span></td></tr>').appendTo(tableBody); - } - } - } - if (m) { - propRow = $('<tr class="node-info-node-row"><td>'+RED._("subflow.category")+'</td><td></td></tr>').appendTo(tableBody); - var category = subflowNode.category||"subflows"; - $(propRow.children()[1]).text(RED._("palette.label."+category,{defaultValue:category})) - $('<tr class="node-info-subflow-row"><td>'+RED._("sidebar.info.instances")+"</td><td>"+subflowUserCount+'</td></tr>').appendTo(tableBody); - } - - var infoText = ""; - if (!subflowNode && node.type !== "comment" && node.type !== "tab") { - infoSection.title.text(RED._("sidebar.info.nodeHelp")); - var helpText = $("script[data-help-name='"+node.type+"']").html()||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>'); - infoText = helpText; - } else if (node.type === "tab") { - infoSection.title.text(RED._("sidebar.info.flowDesc")); - infoText = marked(node.info||"")||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>'); - } - - if (subflowNode) { - infoText = infoText + (marked(subflowNode.info||"")||('<span class="node-info-none">'+RED._("sidebar.info.none")+'</span>')); - infoSection.title.text(RED._("sidebar.info.subflowDesc")); - } else if (node._def && node._def.info) { - infoSection.title.text(RED._("sidebar.info.nodeHelp")); - var info = node._def.info; - var textInfo = (typeof info === "function" ? info.call(node) : info); - // TODO: help - infoText = infoText + marked(textInfo); - } - if (infoText) { - setInfoText(infoText); - } - - - $(".node-info-property-header").click(function(e) { - e.preventDefault(); - expandedSections["property"] = !expandedSections["property"]; - $(this).toggleClass("expanded",expandedSections["property"]); - $(".node-info-property-row").toggle(expandedSections["property"]); - }); - } - } - function setInfoText(infoText) { - var info = addTargetToExternalLinks($('<div class="node-help"><span class="bidiAware" dir=\"'+RED.text.bidi.resolveBaseTextDir(infoText)+'">'+infoText+'</span></div>')).appendTo(infoSection.content); - info.find(".bidiAware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" ); - var foldingHeader = "H3"; - info.find(foldingHeader).wrapInner('<a class="node-info-header expanded" href="#"></a>') - .find("a").prepend('<i class="fa fa-angle-right">').click(function(e) { - e.preventDefault(); - var isExpanded = $(this).hasClass('expanded'); - var el = $(this).parent().next(); - while(el.length === 1 && el[0].nodeName !== foldingHeader) { - el.toggle(!isExpanded); - el = el.next(); - } - $(this).toggleClass('expanded',!isExpanded); - }) - } - var tips = (function() { - var enabled = true; - var startDelay = 1000; - var cycleDelay = 15000; - var startTimeout; - var refreshTimeout; - var tipCount = -1; - - RED.actions.add("core:toggle-show-tips",function(state) { - if (state === undefined) { - RED.userSettings.toggle("view-show-tips"); - } else { - enabled = state; - if (enabled) { - startTips(); - } else { - stopTips(); - } - } - }); - - function setTip() { - var r = Math.floor(Math.random() * tipCount); - var tip = RED._("infotips:info.tip"+r); - - var m; - while ((m=/({{(.*?)}})/.exec(tip))) { - var shortcut = RED.keyboard.getShortcut(m[2]); - if (shortcut) { - tip = tip.replace(m[1],RED.keyboard.formatKey(shortcut.key)); - } else { - return; - } - } - while ((m=/(\[(.*?)\])/.exec(tip))) { - tip = tip.replace(m[1],RED.keyboard.formatKey(m[2])); - } - tipBox.html(tip).fadeIn(200); - if (startTimeout) { - startTimeout = null; - refreshTimeout = setInterval(cycleTips,cycleDelay); - } - } - function cycleTips() { - tipBox.fadeOut(300,function() { - setTip(); - }) - } - function startTips() { - $(".sidebar-node-info").addClass('show-tips'); - if (enabled) { - if (!startTimeout && !refreshTimeout) { - if (tipCount === -1) { - do { - tipCount++; - } while(RED._("infotips:info.tip"+tipCount)!=="infotips:info.tip"+tipCount); - } - startTimeout = setTimeout(setTip,startDelay); - } - } - } - function stopTips() { - $(".sidebar-node-info").removeClass('show-tips'); - clearInterval(refreshTimeout); - clearTimeout(startTimeout); - refreshTimeout = null; - startTimeout = null; - } - function nextTip() { - clearInterval(refreshTimeout); - startTimeout = true; - setTip(); - } - return { - start: startTips, - stop: stopTips, - next: nextTip, - enabled: function() { return enabled; } - } - })(); - - function clear() { - // sections.hide(); - refresh(null); - } - - function set(html,title) { - // tips.stop(); - // sections.show(); - // nodeSection.container.hide(); - infoSection.title.text(title||""); - refresh(null); - $(infoSection.content).empty(); - setInfoText(html); - $(".sidebar-node-info-stack").scrollTop(0); - } - - function refreshSelection(selection) { - if (selection === undefined) { - selection = RED.view.selection(); - } - if (selection.nodes) { - if (selection.nodes.length == 1) { - var node = selection.nodes[0]; - if (node.type === "subflow" && node.direction) { - refresh(RED.nodes.subflow(node.z)); - } else { - refresh(node); - } - } else { - refresh(selection.nodes); - } - } else { - var activeWS = RED.workspaces.active(); - - var flow = RED.nodes.workspace(activeWS) || RED.nodes.subflow(activeWS); - if (flow) { - refresh(flow); - } else { - var workspace = RED.nodes.workspace(RED.workspaces.active()); - if (workspace && workspace.info) { - refresh(workspace); - } else { - refresh(null) - // clear(); - } - } - } - } - - - RED.events.on("view:selection-changed",refreshSelection); - - return { - init: init, - show: show, - refresh: refresh, - clear: clear, - set: set - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.sidebar.config = (function() { - - - var content = document.createElement("div"); - content.className = "sidebar-node-config"; - - $('<div class="button-group sidebar-header">'+ - '<a class="sidebar-header-button-toggle selected" id="workspace-config-node-filter-all" href="#"><span data-i18n="sidebar.config.filterAll"></span></a>'+ - '<a class="sidebar-header-button-toggle" id="workspace-config-node-filter-unused" href="#"><span data-i18n="sidebar.config.filterUnused"></span></a> '+ - '</div>' - ).appendTo(content); - - - var toolbar = $('<div>'+ - '<a class="sidebar-footer-button" id="workspace-config-node-collapse-all" href="#"><i class="fa fa-angle-double-up"></i></a> '+ - '<a class="sidebar-footer-button" id="workspace-config-node-expand-all" href="#"><i class="fa fa-angle-double-down"></i></a>'+ - '</div>'); - - var globalCategories = $("<div>").appendTo(content); - var flowCategories = $("<div>").appendTo(content); - var subflowCategories = $("<div>").appendTo(content); - - var showUnusedOnly = false; - - var categories = {}; - - function getOrCreateCategory(name,parent,label) { - name = name.replace(/\./i,"-"); - if (!categories[name]) { - var container = $('<div class="palette-category workspace-config-node-category" id="workspace-config-node-category-'+name+'"></div>').appendTo(parent); - var header = $('<div class="workspace-config-node-tray-header palette-header"><i class="fa fa-angle-down expanded"></i></div>').appendTo(container); - if (label) { - $('<span class="config-node-label"/>').text(label).appendTo(header); - } else { - $('<span class="config-node-label" data-i18n="sidebar.config.'+name+'">').appendTo(header); - } - $('<span class="config-node-filter-info"></span>').appendTo(header); - category = $('<ul class="palette-content config-node-list"></ul>').appendTo(container); - container.i18n(); - var icon = header.find("i"); - var result = { - label: label, - list: category, - size: function() { - return result.list.find("li:not(.config_node_none)").length - }, - open: function(snap) { - if (!icon.hasClass("expanded")) { - icon.addClass("expanded"); - if (snap) { - result.list.show(); - } else { - result.list.slideDown(); - } - } - }, - close: function(snap) { - if (icon.hasClass("expanded")) { - icon.removeClass("expanded"); - if (snap) { - result.list.hide(); - } else { - result.list.slideUp(); - } - } - }, - isOpen: function() { - return icon.hasClass("expanded"); - } - }; - - header.on('click', function(e) { - if (result.isOpen()) { - result.close(); - } else { - result.open(); - } - }); - categories[name] = result; - } else { - if (categories[name].label !== label) { - categories[name].list.parent().find('.config-node-label').text(label); - categories[name].label = label; - } - } - return categories[name]; - } - - function createConfigNodeList(id,nodes) { - var category = getOrCreateCategory(id.replace(/\./i,"-")) - var list = category.list; - - nodes.sort(function(A,B) { - if (A.type < B.type) { return -1;} - if (A.type > B.type) { return 1;} - return 0; - }); - if (showUnusedOnly) { - var hiddenCount = nodes.length; - nodes = nodes.filter(function(n) { - return n._def.hasUsers!==false && n.users.length === 0; - }) - hiddenCount = hiddenCount - nodes.length; - if (hiddenCount > 0) { - list.parent().find('.config-node-filter-info').text(RED._('sidebar.config.filtered',{count:hiddenCount})).show(); - } else { - list.parent().find('.config-node-filter-info').hide(); - } - } else { - list.parent().find('.config-node-filter-info').hide(); - } - list.empty(); - if (nodes.length === 0) { - $('<li class="config_node_none" data-i18n="sidebar.config.none">NONE</li>').i18n().appendTo(list); - category.close(true); - } else { - var currentType = ""; - nodes.forEach(function(node) { - var label = RED.utils.getNodeLabel(node,node.id); - if (node.type != currentType) { - $('<li class="config_node_type">'+node.type+'</li>').appendTo(list); - currentType = node.type; - } - - var entry = $('<li class="palette_node config_node palette_node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list); - $('<div class="palette_label"></div>').text(label).appendTo(entry); - if (node._def.hasUsers !== false) { - var iconContainer = $('<div/>',{class:"palette_icon_container palette_icon_container_right"}).text(node.users.length).appendTo(entry); - if (node.users.length === 0) { - entry.addClass("config_node_unused"); - } - } - entry.on('click',function(e) { - RED.sidebar.info.refresh(node); - }); - entry.on('dblclick',function(e) { - RED.editor.editConfig("", node.type, node.id); - }); - var userArray = node.users.map(function(n) { return n.id }); - entry.on('mouseover',function(e) { - RED.nodes.eachNode(function(node) { - if( userArray.indexOf(node.id) != -1) { - node.highlighted = true; - node.dirty = true; - } - }); - RED.view.redraw(); - }); - - entry.on('mouseout',function(e) { - RED.nodes.eachNode(function(node) { - if(node.highlighted) { - node.highlighted = false; - node.dirty = true; - } - }); - RED.view.redraw(); - }); - }); - category.open(true); - } - } - - function refreshConfigNodeList() { - var validList = {"global":true}; - - getOrCreateCategory("global",globalCategories); - - RED.nodes.eachWorkspace(function(ws) { - validList[ws.id.replace(/\./g,"-")] = true; - getOrCreateCategory(ws.id,flowCategories,ws.label); - }) - RED.nodes.eachSubflow(function(sf) { - validList[sf.id.replace(/\./g,"-")] = true; - getOrCreateCategory(sf.id,subflowCategories,sf.name); - }) - $(".workspace-config-node-category").each(function() { - var id = $(this).attr('id').substring("workspace-config-node-category-".length); - if (!validList[id]) { - $(this).remove(); - delete categories[id]; - } - }) - var globalConfigNodes = []; - var configList = {}; - RED.nodes.eachConfig(function(cn) { - if (cn.z) {//} == RED.workspaces.active()) { - configList[cn.z.replace(/\./g,"-")] = configList[cn.z.replace(/\./g,"-")]||[]; - configList[cn.z.replace(/\./g,"-")].push(cn); - } else if (!cn.z) { - globalConfigNodes.push(cn); - } - }); - for (var id in validList) { - if (validList.hasOwnProperty(id)) { - createConfigNodeList(id,configList[id]||[]); - } - } - createConfigNodeList('global',globalConfigNodes); - } - - function init() { - RED.sidebar.addTab({ - id: "config", - label: RED._("sidebar.config.label"), - name: RED._("sidebar.config.name"), - content: content, - toolbar: toolbar, - iconClass: "fa fa-cog", - onchange: function() { refreshConfigNodeList(); } - }); - RED.actions.add("core:show-config-tab",function() {RED.sidebar.show('config')}); - - $("#workspace-config-node-collapse-all").on("click", function(e) { - e.preventDefault(); - for (var cat in categories) { - if (categories.hasOwnProperty(cat)) { - categories[cat].close(); - } - } - }); - $("#workspace-config-node-expand-all").on("click", function(e) { - e.preventDefault(); - for (var cat in categories) { - if (categories.hasOwnProperty(cat)) { - if (categories[cat].size() > 0) { - categories[cat].open(); - } - } - } - }); - $('#workspace-config-node-filter-all').on("click",function(e) { - e.preventDefault(); - if (showUnusedOnly) { - $(this).addClass('selected'); - $('#workspace-config-node-filter-unused').removeClass('selected'); - showUnusedOnly = !showUnusedOnly; - refreshConfigNodeList(); - } - }); - $('#workspace-config-node-filter-unused').on("click",function(e) { - e.preventDefault(); - if (!showUnusedOnly) { - $(this).addClass('selected'); - $('#workspace-config-node-filter-all').removeClass('selected'); - showUnusedOnly = !showUnusedOnly; - refreshConfigNodeList(); - } - }); - - - } - function show(id) { - if (typeof id === 'boolean') { - if (id) { - $('#workspace-config-node-filter-unused').click(); - } else { - $('#workspace-config-node-filter-all').click(); - } - } - refreshConfigNodeList(); - if (typeof id === "string") { - $('#workspace-config-node-filter-all').click(); - id = id.replace(/\./g,"-"); - setTimeout(function() { - var node = $(".palette_node_id_"+id); - var y = node.position().top; - var h = node.height(); - var scrollWindow = $(".sidebar-node-config"); - var scrollHeight = scrollWindow.height(); - - if (y+h > scrollHeight) { - scrollWindow.animate({scrollTop: '-='+(scrollHeight-(y+h)-30)},150); - } else if (y<0) { - scrollWindow.animate({scrollTop: '+='+(y-10)},150); - } - var flash = 21; - var flashFunc = function() { - if ((flash%2)===0) { - node.removeClass('node_highlighted'); - } else { - node.addClass('node_highlighted'); - } - flash--; - if (flash >= 0) { - setTimeout(flashFunc,100); - } - } - flashFunc(); - },100); - } - RED.sidebar.show("config"); - } - return { - init:init, - show:show, - refresh:refreshConfigNodeList - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.sidebar.context = (function() { - - var content; - var sections; - - var localCache = {}; - - - var nodeSection; - // var subflowSection; - var flowSection; - var globalSection; - - var currentNode; - var currentFlow; - - function init() { - - content = $("<div>").css({"position":"relative","height":"100%"}); - content.className = "sidebar-context" - // var toolbar = $('<div class="sidebar-header">'+ - // '</div>').appendTo(content); - - var footerToolbar = $('<div>'+ - // '<span class="button-group"><a class="sidebar-footer-button" href="#" data-i18n="[title]node-red:debug.sidebar.openWindow"><i class="fa fa-desktop"></i></a></span> ' + - '</div>'); - - - - var stackContainer = $("<div>",{class:"sidebar-context-stack"}).appendTo(content); - sections = RED.stack.create({ - container: stackContainer - }); - - nodeSection = sections.add({ - title: RED._("sidebar.context.node"), - collapsible: true, - // onexpand: function() { - // updateNode(currentNode,true); - // } - }); - nodeSection.expand(); - nodeSection.content.css({height:"100%"}); - nodeSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(nodeSection.content); - var table = $('<table class="node-info"></table>').appendTo(nodeSection.content); - nodeSection.table = $('<tbody>').appendTo(table); - var bg = $('<div style="float: right"></div>').appendTo(nodeSection.header); - $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>') - .appendTo(bg) - .click(function(evt) { - evt.stopPropagation(); - evt.preventDefault(); - updateNode(currentNode, true); - }) - - // subflowSection = sections.add({ - // title: "Subflow", - // collapsible: true - // }); - // subflowSection.expand(); - // subflowSection.content.css({height:"100%"}); - // bg = $('<div style="float: right"></div>').appendTo(subflowSection.header); - // $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>') - // .appendTo(bg) - // .click(function(evt) { - // evt.stopPropagation(); - // evt.preventDefault(); - // }) - // - // subflowSection.container.hide(); - - flowSection = sections.add({ - title: RED._("sidebar.context.flow"), - collapsible: true - }); - flowSection.expand(); - flowSection.content.css({height:"100%"}); - flowSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(flowSection.content); - var table = $('<table class="node-info"></table>').appendTo(flowSection.content); - flowSection.table = $('<tbody>').appendTo(table); - bg = $('<div style="float: right"></div>').appendTo(flowSection.header); - $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>') - .appendTo(bg) - .click(function(evt) { - evt.stopPropagation(); - evt.preventDefault(); - updateFlow(currentFlow); - }) - - globalSection = sections.add({ - title: RED._("sidebar.context.global"), - collapsible: true - }); - globalSection.expand(); - globalSection.content.css({height:"100%"}); - globalSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(globalSection.content); - var table = $('<table class="node-info"></table>').appendTo(globalSection.content); - globalSection.table = $('<tbody>').appendTo(table); - - bg = $('<div style="float: right"></div>').appendTo(globalSection.header); - $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>') - .appendTo(bg) - .click(function(evt) { - evt.stopPropagation(); - evt.preventDefault(); - updateEntry(globalSection,"context/global","global"); - }) - - - RED.actions.add("core:show-context-tab",show); - - RED.sidebar.addTab({ - id: "context", - label: RED._("sidebar.context.label"), - name: RED._("sidebar.context.name"), - iconClass: "fa fa-database", - content: content, - toolbar: footerToolbar, - // pinned: true, - enableOnEdit: false - }); - - // var toggleLiveButton = $("#sidebar-context-toggle-live"); - // toggleLiveButton.click(function(evt) { - // evt.preventDefault(); - // if ($(this).hasClass("selected")) { - // $(this).removeClass("selected"); - // $(this).find("i").removeClass("fa-pause"); - // $(this).find("i").addClass("fa-play"); - // } else { - // $(this).addClass("selected"); - // $(this).find("i").removeClass("fa-play"); - // $(this).find("i").addClass("fa-pause"); - // } - // }); - // RED.popover.tooltip(toggleLiveButton, function() { - // if (toggleLiveButton.hasClass("selected")) { - // return "Pause live updates" - // } else { - // return "Start live updates" - // } - // }); - - - RED.events.on("view:selection-changed", function(event) { - var selectedNode = event.nodes && event.nodes.length === 1 && event.nodes[0]; - updateNode(selectedNode); - }) - - RED.events.on("workspace:change", function(event) { - updateFlow(RED.nodes.workspace(event.workspace)); - }) - - updateEntry(globalSection,"context/global","global"); - - } - - function updateNode(node,force) { - currentNode = node; - if (force) { - if (node) { - updateEntry(nodeSection,"context/node/"+node.id,node.id); - // if (/^subflow:/.test(node.type)) { - // subflowSection.container.show(); - // updateEntry(subflowSection,"context/flow/"+node.id,node.id); - // } else { - // subflowSection.container.hide(); - // } - } else { - // subflowSection.container.hide(); - updateEntry(nodeSection) - } - } else { - $(nodeSection.table).empty(); - if (node) { - $('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.refresh"></td></tr>').appendTo(nodeSection.table).i18n(); - } else { - $('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.none"></td></tr>').appendTo(nodeSection.table).i18n(); - } - nodeSection.timestamp.html("&nbsp;"); - - } - } - function updateFlow(flow) { - currentFlow = flow; - if (flow) { - updateEntry(flowSection,"context/flow/"+flow.id,flow.id); - } else { - updateEntry(flowSection) - } - } - - function refreshEntry(section,baseUrl,id) { - - var contextStores = RED.settings.context.stores; - var container = section.table; - - $.getJSON(baseUrl, function(data) { - $(container).empty(); - var sortedData = {}; - for (var store in data) { - if (data.hasOwnProperty(store)) { - for (var key in data[store]) { - if (data[store].hasOwnProperty(key)) { - if (!sortedData.hasOwnProperty(key)) { - sortedData[key] = []; - } - data[store][key].store = store; - sortedData[key].push(data[store][key]) - } - } - } - } - var keys = Object.keys(sortedData); - keys.sort(); - var l = keys.length; - for (var i = 0; i < l; i++) { - sortedData[keys[i]].forEach(function(v) { - var k = keys[i]; - var l2 = sortedData[k].length; - var propRow = $('<tr class="node-info-node-row"><td class="sidebar-context-property"></td><td></td></tr>').appendTo(container); - var obj = $(propRow.children()[0]); - obj.text(k); - var tools = $('<span class="debug-message-tools button-group"></span>').appendTo(obj); - var refreshItem = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(tools).click(function(e) { - e.preventDefault(); - e.stopPropagation(); - $.getJSON(baseUrl+"/"+k+"?store="+v.store, function(data) { - $(propRow.children()[1]).empty(); - var payload = data.msg; - var format = data.format; - payload = RED.utils.decodeObject(payload,format); - RED.utils.createObjectElement(payload, { - typeHint: data.format, - sourceId: id+"."+k - }).appendTo(propRow.children()[1]); - }) - }); - - - var payload = v.msg; - var format = v.format; - payload = RED.utils.decodeObject(payload,format); - RED.utils.createObjectElement(payload, { - typeHint: v.format, - sourceId: id+"."+k - }).appendTo(propRow.children()[1]); - if (contextStores.length > 1) { - $("<span>",{class:"sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0])) - } - }); - } - if (l === 0) { - $('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.empty"></td></tr>').appendTo(container).i18n(); - } - $(section.timestamp).text(new Date().toLocaleString()); - }); - } - function updateEntry(section,baseUrl,id) { - var container = section.table; - if (id) { - refreshEntry(section,baseUrl,id); - } else { - $(container).empty(); - $('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.none"></td></tr>').appendTo(container).i18n(); - } - } - - - - function show() { - RED.sidebar.show("context"); - } - return { - init: init - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.palette.editor = (function() { - - var disabled = false; - - var editorTabs; - var filterInput; - var searchInput; - var nodeList; - var packageList; - var loadedList = []; - var filteredList = []; - var loadedIndex = {}; - - var typesInUse = {}; - var nodeEntries = {}; - var eventTimers = {}; - var activeFilter = ""; - - function semVerCompare(A,B) { - var aParts = A.split(".").map(function(m) { return parseInt(m);}); - var bParts = B.split(".").map(function(m) { return parseInt(m);}); - for (var i=0;i<3;i++) { - var j = aParts[i]-bParts[i]; - if (j<0) { return -1 } - if (j>0) { return 1 } - } - return 0; - } - - function delayCallback(start,callback) { - var delta = Date.now() - start; - if (delta < 300) { - delta = 300; - } else { - delta = 0; - } - setTimeout(function() { - callback(); - },delta); - } - function changeNodeState(id,state,shade,callback) { - shade.show(); - var start = Date.now(); - $.ajax({ - url:"nodes/"+id, - type: "PUT", - data: JSON.stringify({ - enabled: state - }), - contentType: "application/json; charset=utf-8" - }).done(function(data,textStatus,xhr) { - delayCallback(start,function() { - shade.hide(); - callback(); - }); - }).fail(function(xhr,textStatus,err) { - delayCallback(start,function() { - shade.hide(); - callback(xhr); - }); - }) - } - function installNodeModule(id,version,callback) { - var requestBody = { - module: id - }; - if (version) { - requestBody.version = version; - } - $.ajax({ - url:"nodes", - type: "POST", - data: JSON.stringify(requestBody), - contentType: "application/json; charset=utf-8" - }).done(function(data,textStatus,xhr) { - callback(); - }).fail(function(xhr,textStatus,err) { - callback(xhr); - }); - } - function removeNodeModule(id,callback) { - $.ajax({ - url:"nodes/"+id, - type: "DELETE" - }).done(function(data,textStatus,xhr) { - callback(); - }).fail(function(xhr,textStatus,err) { - callback(xhr); - }) - } - - function refreshNodeModuleList() { - for (var id in nodeEntries) { - if (nodeEntries.hasOwnProperty(id)) { - _refreshNodeModule(id); - } - } - } - - function refreshNodeModule(module) { - if (!eventTimers.hasOwnProperty(module)) { - eventTimers[module] = setTimeout(function() { - delete eventTimers[module]; - _refreshNodeModule(module); - },100); - } - } - - - function getContrastingBorder(rgbColor){ - var parts = /^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)[,)]/.exec(rgbColor); - if (parts) { - var r = parseInt(parts[1]); - var g = parseInt(parts[2]); - var b = parseInt(parts[3]); - var yiq = ((r*299)+(g*587)+(b*114))/1000; - if (yiq > 160) { - r = Math.floor(r*0.8); - g = Math.floor(g*0.8); - b = Math.floor(b*0.8); - return "rgb("+r+","+g+","+b+")"; - } - } - return rgbColor; - } - - function formatUpdatedAt(dateString) { - var now = new Date(); - var d = new Date(dateString); - var delta = (Date.now() - new Date(dateString).getTime())/1000; - - if (delta < 60) { - return RED._('palette.editor.times.seconds'); - } - delta = Math.floor(delta/60); - if (delta < 10) { - return RED._('palette.editor.times.minutes'); - } - if (delta < 60) { - return RED._('palette.editor.times.minutesV',{count:delta}); - } - - delta = Math.floor(delta/60); - - if (delta < 24) { - return RED._('palette.editor.times.hoursV',{count:delta}); - } - - delta = Math.floor(delta/24); - - if (delta < 7) { - return RED._('palette.editor.times.daysV',{count:delta}) - } - var weeks = Math.floor(delta/7); - var days = delta%7; - - if (weeks < 4) { - return RED._('palette.editor.times.weeksV',{count:weeks}) - } - - var months = Math.floor(weeks/4); - weeks = weeks%4; - - if (months < 12) { - return RED._('palette.editor.times.monthsV',{count:months}) - } - var years = Math.floor(months/12); - months = months%12; - - if (months === 0) { - return RED._('palette.editor.times.yearsV',{count:years}) - } else { - return RED._('palette.editor.times.year'+(years>1?'s':'')+'MonthsV',{y:years,count:months}) - } - } - - - function _refreshNodeModule(module) { - if (!nodeEntries.hasOwnProperty(module)) { - nodeEntries[module] = {info:RED.nodes.registry.getModule(module)}; - var index = [module]; - for (var s in nodeEntries[module].info.sets) { - if (nodeEntries[module].info.sets.hasOwnProperty(s)) { - index.push(s); - index = index.concat(nodeEntries[module].info.sets[s].types) - } - } - nodeEntries[module].index = index.join(",").toLowerCase(); - nodeList.editableList('addItem', nodeEntries[module]); - } else { - var moduleInfo = nodeEntries[module].info; - var nodeEntry = nodeEntries[module].elements; - if (nodeEntry) { - var activeTypeCount = 0; - var typeCount = 0; - var errorCount = 0; - nodeEntry.errorList.empty(); - nodeEntries[module].totalUseCount = 0; - nodeEntries[module].setUseCount = {}; - - for (var setName in moduleInfo.sets) { - if (moduleInfo.sets.hasOwnProperty(setName)) { - var inUseCount = 0; - var set = moduleInfo.sets[setName]; - var setElements = nodeEntry.sets[setName]; - if (set.err) { - errorCount++; - $("<li>").text(set.err).appendTo(nodeEntry.errorList); - } - if (set.enabled) { - activeTypeCount += set.types.length; - } - typeCount += set.types.length; - for (var i=0;i<moduleInfo.sets[setName].types.length;i++) { - var t = moduleInfo.sets[setName].types[i]; - inUseCount += (typesInUse[t]||0); - var swatch = setElements.swatches[t]; - if (set.enabled) { - var def = RED.nodes.getType(t); - if (def && def.color) { - swatch.css({background:RED.utils.getNodeColor(t,def)}); - swatch.css({border: "1px solid "+getContrastingBorder(swatch.css('backgroundColor'))}) - - } else { - swatch.css({background:"#eee",border:"1px dashed #999"}) - } - } else { - swatch.css({background:"#eee",border:"1px dashed #999"}) - } - } - nodeEntries[module].setUseCount[setName] = inUseCount; - nodeEntries[module].totalUseCount += inUseCount; - - if (inUseCount > 0) { - setElements.enableButton.text(RED._('palette.editor.inuse')); - setElements.enableButton.addClass('disabled'); - } else { - setElements.enableButton.removeClass('disabled'); - if (set.enabled) { - setElements.enableButton.text(RED._('palette.editor.disable')); - } else { - setElements.enableButton.text(RED._('palette.editor.enable')); - } - } - setElements.setRow.toggleClass("palette-module-set-disabled",!set.enabled); - } - } - - if (errorCount === 0) { - nodeEntry.errorRow.hide() - } else { - nodeEntry.errorRow.show(); - } - - var nodeCount = (activeTypeCount === typeCount)?typeCount:activeTypeCount+" / "+typeCount; - nodeEntry.setCount.text(RED._('palette.editor.nodeCount',{count:typeCount,label:nodeCount})); - - if (nodeEntries[module].totalUseCount > 0) { - nodeEntry.enableButton.text(RED._('palette.editor.inuse')); - nodeEntry.enableButton.addClass('disabled'); - nodeEntry.removeButton.hide(); - } else { - nodeEntry.enableButton.removeClass('disabled'); - if (moduleInfo.local) { - nodeEntry.removeButton.css('display', 'inline-block'); - } - if (activeTypeCount === 0) { - nodeEntry.enableButton.text(RED._('palette.editor.enableall')); - } else { - nodeEntry.enableButton.text(RED._('palette.editor.disableall')); - } - nodeEntry.container.toggleClass("disabled",(activeTypeCount === 0)); - } - } - if (moduleInfo.pending_version) { - nodeEntry.versionSpan.html(moduleInfo.version+' <i class="fa fa-long-arrow-right"></i> '+moduleInfo.pending_version).appendTo(nodeEntry.metaRow) - nodeEntry.updateButton.text(RED._('palette.editor.updated')).addClass('disabled').show(); - } else if (loadedIndex.hasOwnProperty(module)) { - if (semVerCompare(loadedIndex[module].version,moduleInfo.version) === 1) { - nodeEntry.updateButton.show(); - nodeEntry.updateButton.text(RED._('palette.editor.update',{version:loadedIndex[module].version})); - } else { - nodeEntry.updateButton.hide(); - } - } else { - nodeEntry.updateButton.hide(); - } - } - - } - - function filterChange(val) { - activeFilter = val.toLowerCase(); - var visible = nodeList.editableList('filter'); - var size = nodeList.editableList('length'); - if (val === "") { - filterInput.searchBox('count'); - } else { - filterInput.searchBox('count',visible+" / "+size); - } - } - - - var catalogueCount; - var catalogueLoadStatus = []; - var catalogueLoadStart; - var catalogueLoadErrors = false; - - var activeSort = sortModulesAZ; - - function handleCatalogResponse(err,catalog,index,v) { - catalogueLoadStatus.push(err||v); - if (!err) { - if (v.modules) { - v.modules.forEach(function(m) { - loadedIndex[m.id] = m; - m.index = [m.id]; - if (m.keywords) { - m.index = m.index.concat(m.keywords); - } - if (m.updated_at) { - m.timestamp = new Date(m.updated_at).getTime(); - } else { - m.timestamp = 0; - } - m.index = m.index.join(",").toLowerCase(); - }) - loadedList = loadedList.concat(v.modules); - } - searchInput.searchBox('count',loadedList.length); - } else { - catalogueLoadErrors = true; - } - if (catalogueCount > 1) { - $(".palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>"+catalogueLoadStatus.length+"/"+catalogueCount); - } - if (catalogueLoadStatus.length === catalogueCount) { - if (catalogueLoadErrors) { - RED.notify(RED._('palette.editor.errors.catalogLoadFailed',{url: catalog}),"error",false,8000); - } - var delta = 250-(Date.now() - catalogueLoadStart); - setTimeout(function() { - $("#palette-module-install-shade").hide(); - },Math.max(delta,0)); - - } - } - - function initInstallTab() { - if (loadedList.length === 0) { - loadedList = []; - loadedIndex = {}; - packageList.editableList('empty'); - - $(".palette-module-shade-status").text(RED._('palette.editor.loading')); - var catalogues = RED.settings.theme('palette.catalogues')||['https://catalogue.nodered.org/catalogue.json']; - catalogueLoadStatus = []; - catalogueLoadErrors = false; - catalogueCount = catalogues.length; - if (catalogues.length > 1) { - $(".palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>0/"+catalogues.length); - } - $("#palette-module-install-shade").show(); - catalogueLoadStart = Date.now(); - var handled = 0; - catalogues.forEach(function(catalog,index) { - $.getJSON(catalog, {_: new Date().getTime()},function(v) { - handleCatalogResponse(null,catalog,index,v); - refreshNodeModuleList(); - }).fail(function(jqxhr, textStatus, error) { - handleCatalogResponse(jqxhr,catalog,index); - }).always(function() { - handled++; - if (handled === catalogueCount) { - searchInput.searchBox('change'); - } - }) - }); - } - } - - function refreshFilteredItems() { - packageList.editableList('empty'); - var currentFilter = searchInput.searchBox('value').trim(); - if (currentFilter === ""){ - packageList.editableList('addItem',{count:loadedList.length}) - return; - } - filteredList.sort(activeSort); - for (var i=0;i<Math.min(10,filteredList.length);i++) { - packageList.editableList('addItem',filteredList[i]); - } - if (filteredList.length === 0) { - packageList.editableList('addItem',{}); - } - - if (filteredList.length > 10) { - packageList.editableList('addItem',{start:10,more:filteredList.length-10}) - } - } - function sortModulesAZ(A,B) { - return A.info.id.localeCompare(B.info.id); - } - function sortModulesRecent(A,B) { - return -1 * (A.info.timestamp-B.info.timestamp); - } - - - function init() { - if (RED.settings.theme('palette.editable') === false) { - return; - } - createSettingsPane(); - - RED.userSettings.add({ - id:'palette', - title: RED._("palette.editor.palette"), - get: getSettingsPane, - close: function() { - settingsPane.detach(); - }, - focus: function() { - editorTabs.resize(); - setTimeout(function() { - filterInput.focus(); - },200); - } - }) - - RED.actions.add("core:manage-palette",function() { - RED.userSettings.show('palette'); - }); - - RED.events.on('registry:module-updated', function(ns) { - refreshNodeModule(ns.module); - }); - RED.events.on('registry:node-set-enabled', function(ns) { - refreshNodeModule(ns.module); - }); - RED.events.on('registry:node-set-disabled', function(ns) { - refreshNodeModule(ns.module); - }); - RED.events.on('registry:node-type-added', function(nodeType) { - if (!/^subflow:/.test(nodeType)) { - var ns = RED.nodes.registry.getNodeSetForType(nodeType); - refreshNodeModule(ns.module); - } - }); - RED.events.on('registry:node-type-removed', function(nodeType) { - if (!/^subflow:/.test(nodeType)) { - var ns = RED.nodes.registry.getNodeSetForType(nodeType); - refreshNodeModule(ns.module); - } - }); - RED.events.on('registry:node-set-added', function(ns) { - refreshNodeModule(ns.module); - for (var i=0;i<filteredList.length;i++) { - if (filteredList[i].info.id === ns.module) { - var installButton = filteredList[i].elements.installButton; - installButton.addClass('disabled'); - installButton.text(RED._('palette.editor.installed')); - break; - } - } - }); - RED.events.on('registry:node-set-removed', function(ns) { - var module = RED.nodes.registry.getModule(ns.module); - if (!module) { - var entry = nodeEntries[ns.module]; - if (entry) { - nodeList.editableList('removeItem', entry); - delete nodeEntries[ns.module]; - for (var i=0;i<filteredList.length;i++) { - if (filteredList[i].info.id === ns.module) { - var installButton = filteredList[i].elements.installButton; - installButton.removeClass('disabled'); - installButton.text(RED._('palette.editor.install')); - break; - } - } - } - } - }); - RED.events.on('nodes:add', function(n) { - if (!/^subflow:/.test(n.type)) { - typesInUse[n.type] = (typesInUse[n.type]||0)+1; - if (typesInUse[n.type] === 1) { - var ns = RED.nodes.registry.getNodeSetForType(n.type); - refreshNodeModule(ns.module); - } - } - }) - RED.events.on('nodes:remove', function(n) { - if (typesInUse.hasOwnProperty(n.type)) { - typesInUse[n.type]--; - if (typesInUse[n.type] === 0) { - delete typesInUse[n.type]; - var ns = RED.nodes.registry.getNodeSetForType(n.type); - refreshNodeModule(ns.module); - } - } - }) - } - - var settingsPane; - - function getSettingsPane() { - initInstallTab(); - editorTabs.activateTab('nodes'); - return settingsPane; - } - - - - function createSettingsPane() { - settingsPane = $('<div id="user-settings-tab-palette"></div>'); - var content = $('<div id="palette-editor">'+ - '<ul id="palette-editor-tabs"></ul>'+ - '</div>').appendTo(settingsPane); - - editorTabs = RED.tabs.create({ - element: settingsPane.find('#palette-editor-tabs'), - onchange:function(tab) { - content.find(".palette-editor-tab").hide(); - tab.content.show(); - if (filterInput) { - filterInput.searchBox('value',""); - } - if (searchInput) { - searchInput.searchBox('value',""); - } - if (tab.id === 'install') { - if (searchInput) { - searchInput.focus(); - } - } else { - if (filterInput) { - filterInput.focus(); - } - } - }, - minimumActiveTabWidth: 110 - }); - - - var modulesTab = $('<div>',{class:"palette-editor-tab"}).appendTo(content); - - editorTabs.addTab({ - id: 'nodes', - label: RED._('palette.editor.tab-nodes'), - content: modulesTab - }) - - var filterDiv = $('<div>',{class:"palette-search"}).appendTo(modulesTab); - filterInput = $('<input type="text" data-i18n="[placeholder]palette.filter"></input>') - .appendTo(filterDiv) - .searchBox({ - delay: 200, - change: function() { - filterChange($(this).val()); - } - }); - - - nodeList = $('<ol>',{id:"palette-module-list", style:"position: absolute;top: 35px;bottom: 0;left: 0;right: 0px;"}).appendTo(modulesTab).editableList({ - addButton: false, - scrollOnAdd: false, - sort: function(A,B) { - return A.info.name.localeCompare(B.info.name); - }, - filter: function(data) { - if (activeFilter === "" ) { - return true; - } - - return (activeFilter==="")||(data.index.indexOf(activeFilter) > -1); - }, - addItem: function(container,i,object) { - var entry = object.info; - if (entry) { - var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container); - var titleRow = $('<div class="palette-module-meta palette-module-name"><i class="fa fa-cube"></i></div>').appendTo(headerRow); - $('<span>').text(entry.name).appendTo(titleRow); - var metaRow = $('<div class="palette-module-meta palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow); - var versionSpan = $('<span>').text(entry.version).appendTo(metaRow); - - var errorRow = $('<div class="palette-module-meta palette-module-errors"><i class="fa fa-warning"></i></div>').hide().appendTo(headerRow); - var errorList = $('<ul class="palette-module-error-list"></ul>').appendTo(errorRow); - var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow); - var setButton = $('<a href="#" class="editor-button editor-button-small palette-module-set-button"><i class="fa fa-angle-right palette-module-node-chevron"></i> </a>').appendTo(buttonRow); - var setCount = $('<span>').appendTo(setButton); - var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow); - - var updateButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.update')).appendTo(buttonGroup); - updateButton.attr('id','up_'+Math.floor(Math.random()*1000000000)); - updateButton.click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('disabled')) { - return; - } - update(entry,loadedIndex[entry.name].version,container,function(err){}); - }) - - - var removeButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.remove')).appendTo(buttonGroup); - removeButton.attr('id','up_'+Math.floor(Math.random()*1000000000)); - removeButton.click(function(evt) { - evt.preventDefault(); - remove(entry,container,function(err){}); - }) - if (!entry.local) { - removeButton.hide(); - } - var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.disableall')).appendTo(buttonGroup); - - var contentRow = $('<div>',{class:"palette-module-content"}).appendTo(container); - var shade = $('<div class="palette-module-shade hide"><img src="red/images/spin.svg" class="palette-spinner"/></div>').appendTo(container); - - object.elements = { - updateButton: updateButton, - removeButton: removeButton, - enableButton: enableButton, - errorRow: errorRow, - errorList: errorList, - setCount: setCount, - container: container, - shade: shade, - versionSpan: versionSpan, - sets: {} - } - setButton.click(function(evt) { - evt.preventDefault(); - if (container.hasClass('expanded')) { - container.removeClass('expanded'); - contentRow.slideUp(); - } else { - container.addClass('expanded'); - contentRow.slideDown(); - } - }) - - var setList = Object.keys(entry.sets) - setList.sort(function(A,B) { - return A.toLowerCase().localeCompare(B.toLowerCase()); - }); - setList.forEach(function(setName) { - var set = entry.sets[setName]; - var setRow = $('<div>',{class:"palette-module-set"}).appendTo(contentRow); - var buttonGroup = $('<div>',{class:"palette-module-set-button-group"}).appendTo(setRow); - var typeSwatches = {}; - set.types.forEach(function(t) { - var typeDiv = $('<div>',{class:"palette-module-type"}).appendTo(setRow); - typeSwatches[t] = $('<span>',{class:"palette-module-type-swatch"}).appendTo(typeDiv); - $('<span>',{class:"palette-module-type-node"}).text(t).appendTo(typeDiv); - }) - var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').appendTo(buttonGroup); - enableButton.click(function(evt) { - evt.preventDefault(); - if (object.setUseCount[setName] === 0) { - var currentSet = RED.nodes.registry.getNodeSet(set.id); - shade.show(); - var newState = !currentSet.enabled - changeNodeState(set.id,newState,shade,function(xhr){ - if (xhr) { - if (xhr.responseJSON) { - RED.notify(RED._('palette.editor.errors.'+(newState?'enable':'disable')+'Failed',{module: id,message:xhr.responseJSON.message})); - } - } - }); - } - }) - - object.elements.sets[set.name] = { - setRow: setRow, - enableButton: enableButton, - swatches: typeSwatches - }; - }); - enableButton.click(function(evt) { - evt.preventDefault(); - if (object.totalUseCount === 0) { - changeNodeState(entry.name,(container.hasClass('disabled')),shade,function(xhr){ - if (xhr) { - if (xhr.responseJSON) { - RED.notify(RED._('palette.editor.errors.installFailed',{module: id,message:xhr.responseJSON.message})); - } - } - }); - } - }) - refreshNodeModule(entry.name); - } else { - $('<div>',{class:"red-ui-search-empty"}).text(RED._('search.empty')).appendTo(container); - } - } - }); - - - - var installTab = $('<div>',{class:"palette-editor-tab hide"}).appendTo(content); - - editorTabs.addTab({ - id: 'install', - label: RED._('palette.editor.tab-install'), - content: installTab - }) - - var toolBar = $('<div>',{class:"palette-editor-toolbar"}).appendTo(installTab); - - var searchDiv = $('<div>',{class:"palette-search"}).appendTo(installTab); - searchInput = $('<input type="text" data-i18n="[placeholder]palette.search"></input>') - .appendTo(searchDiv) - .searchBox({ - delay: 300, - change: function() { - var searchTerm = $(this).val().trim().toLowerCase(); - if (searchTerm.length > 0) { - filteredList = loadedList.filter(function(m) { - return (m.index.indexOf(searchTerm) > -1); - }).map(function(f) { return {info:f}}); - refreshFilteredItems(); - searchInput.searchBox('count',filteredList.length+" / "+loadedList.length); - } else { - searchInput.searchBox('count',loadedList.length); - packageList.editableList('empty'); - packageList.editableList('addItem',{count:loadedList.length}); - - } - } - }); - - - $('<span>').text(RED._("palette.editor.sort")+' ').appendTo(toolBar); - var sortGroup = $('<span class="button-group"></span>').appendTo(toolBar); - var sortAZ = $('<a href="#" class="sidebar-header-button-toggle selected" data-i18n="palette.editor.sortAZ"></a>').appendTo(sortGroup); - var sortRecent = $('<a href="#" class="sidebar-header-button-toggle" data-i18n="palette.editor.sortRecent"></a>').appendTo(sortGroup); - - sortAZ.click(function(e) { - e.preventDefault(); - if ($(this).hasClass("selected")) { - return; - } - $(this).addClass("selected"); - sortRecent.removeClass("selected"); - activeSort = sortModulesAZ; - refreshFilteredItems(); - }); - - sortRecent.click(function(e) { - e.preventDefault(); - if ($(this).hasClass("selected")) { - return; - } - $(this).addClass("selected"); - sortAZ.removeClass("selected"); - activeSort = sortModulesRecent; - refreshFilteredItems(); - }); - - - var refreshSpan = $('<span>').appendTo(toolBar); - var refreshButton = $('<a href="#" class="sidebar-header-button"><i class="fa fa-refresh"></i></a>').appendTo(refreshSpan); - refreshButton.click(function(e) { - e.preventDefault(); - loadedList = []; - loadedIndex = {}; - initInstallTab(); - }) - - packageList = $('<ol>',{style:"position: absolute;top: 78px;bottom: 0;left: 0;right: 0px;"}).appendTo(installTab).editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(container,i,object) { - if (object.count) { - $('<div>',{class:"red-ui-search-empty"}).text(RED._('palette.editor.moduleCount',{count:object.count})).appendTo(container); - return - } - if (object.more) { - container.addClass('palette-module-more'); - var moreRow = $('<div>',{class:"palette-module-header palette-module"}).appendTo(container); - var moreLink = $('<a href="#"></a>').text(RED._('palette.editor.more',{count:object.more})).appendTo(moreRow); - moreLink.click(function(e) { - e.preventDefault(); - packageList.editableList('removeItem',object); - for (var i=object.start;i<Math.min(object.start+10,object.start+object.more);i++) { - packageList.editableList('addItem',filteredList[i]); - } - if (object.more > 10) { - packageList.editableList('addItem',{start:object.start+10, more:object.more-10}) - } - }) - return; - } - if (object.info) { - var entry = object.info; - var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container); - var titleRow = $('<div class="palette-module-meta"><i class="fa fa-cube"></i></div>').appendTo(headerRow); - $('<span>',{class:"palette-module-name"}).text(entry.name||entry.id).appendTo(titleRow); - $('<a target="_blank" class="palette-module-link"><i class="fa fa-external-link"></i></a>').attr('href',entry.url).appendTo(titleRow); - var descRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow); - $('<div>',{class:"palette-module-description"}).text(entry.description).appendTo(descRow); - - var metaRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow); - $('<span class="palette-module-version"><i class="fa fa-tag"></i> '+entry.version+'</span>').appendTo(metaRow); - $('<span class="palette-module-updated"><i class="fa fa-calendar"></i> '+formatUpdatedAt(entry.updated_at)+'</span>').appendTo(metaRow); - var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow); - var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow); - var installButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.install')).appendTo(buttonGroup); - installButton.click(function(e) { - e.preventDefault(); - if (!$(this).hasClass('disabled')) { - install(entry,container,function(xhr) {}); - } - }) - if (nodeEntries.hasOwnProperty(entry.id)) { - installButton.addClass('disabled'); - installButton.text(RED._('palette.editor.installed')); - } - - object.elements = { - installButton:installButton - } - } else { - $('<div>',{class:"red-ui-search-empty"}).text(RED._('search.empty')).appendTo(container); - } - } - }); - - $('<div id="palette-module-install-shade" class="palette-module-shade hide"><div class="palette-module-shade-status"></div><img src="red/images/spin.svg" class="palette-spinner"/></div>').appendTo(installTab); - } - function update(entry,version,container,done) { - if (RED.settings.theme('palette.editable') === false) { - done(new Error('Palette not editable')); - return; - } - var notification = RED.notify(RED._("palette.editor.confirm.update.body",{module:entry.name}),{ - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - notification.close(); - } - }, - { - text: RED._("palette.editor.confirm.button.update"), - class: "primary palette-module-install-confirm-button-update", - click: function() { - var spinner = RED.utils.addSpinnerOverlay(container, true); - installNodeModule(entry.name,version,function(xhr) { - spinner.remove(); - if (xhr) { - if (xhr.responseJSON) { - RED.notify(RED._('palette.editor.errors.updateFailed',{module: entry.name,message:xhr.responseJSON.message})); - } - } - done(xhr); - }); - notification.close(); - } - } - ] - }) - } - function remove(entry,container,done) { - if (RED.settings.theme('palette.editable') === false) { - done(new Error('Palette not editable')); - return; - } - var notification = RED.notify(RED._("palette.editor.confirm.remove.body",{module:entry.name}),{ - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - notification.close(); - } - }, - { - text: RED._("palette.editor.confirm.button.remove"), - class: "primary palette-module-install-confirm-button-remove", - click: function() { - var spinner = RED.utils.addSpinnerOverlay(container, true); - removeNodeModule(entry.name, function(xhr) { - spinner.remove(); - if (xhr) { - if (xhr.responseJSON) { - RED.notify(RED._('palette.editor.errors.removeFailed',{module: entry.name,message:xhr.responseJSON.message})); - } - } - }) - notification.close(); - } - } - ] - }) - } - function install(entry,container,done) { - if (RED.settings.theme('palette.editable') === false) { - done(new Error('Palette not editable')); - return; - } - var buttons = [ - { - text: RED._("common.label.cancel"), - click: function() { - notification.close(); - } - } - ]; - if (entry.url) { - buttons.push({ - text: RED._("palette.editor.confirm.button.review"), - class: "primary palette-module-install-confirm-button-install", - click: function() { - var url = entry.url||""; - window.open(url); - } - }); - } - buttons.push({ - text: RED._("palette.editor.confirm.button.install"), - class: "primary palette-module-install-confirm-button-install", - click: function() { - var spinner = RED.utils.addSpinnerOverlay(container, true); - installNodeModule(entry.id,entry.version,function(xhr) { - spinner.remove(); - if (xhr) { - if (xhr.responseJSON) { - RED.notify(RED._('palette.editor.errors.installFailed',{module: entry.id,message:xhr.responseJSON.message})); - } - } - done(xhr); - }); - notification.close(); - } - }); - - var notification = RED.notify(RED._("palette.editor.confirm.install.body",{module:entry.id}),{ - modal: true, - fixed: true, - buttons: buttons - }) - } - - return { - init: init, - install: install - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.editor = (function() { - - - var editStack = []; - var editing_node = null; - var editing_config_node = null; - var subflowEditor; - - var editTrayWidthCache = {}; - - function getCredentialsURL(nodeType, nodeID) { - var dashedType = nodeType.replace(/\s+/g, '-'); - return 'credentials/' + dashedType + "/" + nodeID; - } - - /** - * Validate a node - * @param node - the node being validated - * @returns {boolean} whether the node is valid. Sets node.dirty if needed - */ - function validateNode(node) { - var oldValue = node.valid; - var oldChanged = node.changed; - node.valid = true; - var subflow; - var isValid; - var hasChanged; - if (node.type.indexOf("subflow:")===0) { - subflow = RED.nodes.subflow(node.type.substring(8)); - isValid = subflow.valid; - hasChanged = subflow.changed; - if (isValid === undefined) { - isValid = validateNode(subflow); - hasChanged = subflow.changed; - } - node.valid = isValid && validateNodeProperties(node, node._def.defaults, node); - node.changed = node.changed || hasChanged; - } else if (node._def) { - node.valid = validateNodeProperties(node, node._def.defaults, node); - if (node._def._creds) { - node.valid = node.valid && validateNodeProperties(node, node._def.credentials, node._def._creds); - } - } else if (node.type == "subflow") { - var subflowNodes = RED.nodes.filterNodes({z:node.id}); - for (var i=0;i<subflowNodes.length;i++) { - isValid = subflowNodes[i].valid; - hasChanged = subflowNodes[i].changed; - if (isValid === undefined) { - isValid = validateNode(subflowNodes[i]); - hasChanged = subflowNodes[i].changed; - } - node.valid = node.valid && isValid; - node.changed = node.changed || hasChanged; - } - var subflowInstances = RED.nodes.filterNodes({type:"subflow:"+node.id}); - var modifiedTabs = {}; - for (i=0;i<subflowInstances.length;i++) { - subflowInstances[i].valid = node.valid; - subflowInstances[i].changed = subflowInstances[i].changed || node.changed; - subflowInstances[i].dirty = true; - modifiedTabs[subflowInstances[i].z] = true; - } - Object.keys(modifiedTabs).forEach(function(id) { - var subflow = RED.nodes.subflow(id); - if (subflow) { - validateNode(subflow); - } - }); - } - if (oldValue !== node.valid || oldChanged !== node.changed) { - node.dirty = true; - subflow = RED.nodes.subflow(node.z); - if (subflow) { - validateNode(subflow); - } - } - return node.valid; - } - - /** - * Validate a node's properties for the given set of property definitions - * @param node - the node being validated - * @param definition - the node property definitions (either def.defaults or def.creds) - * @param properties - the node property values to validate - * @returns {boolean} whether the node's properties are valid - */ - function validateNodeProperties(node, definition, properties) { - var isValid = true; - for (var prop in definition) { - if (definition.hasOwnProperty(prop)) { - if (!validateNodeProperty(node, definition, prop, properties[prop])) { - isValid = false; - } - } - } - return isValid; - } - - /** - * Validate a individual node property - * @param node - the node being validated - * @param definition - the node property definitions (either def.defaults or def.creds) - * @param property - the property name being validated - * @param value - the property value being validated - * @returns {boolean} whether the node proprty is valid - */ - function validateNodeProperty(node,definition,property,value) { - var valid = true; - if (/^\$\([a-zA-Z_][a-zA-Z0-9_]*\)$/.test(value)) { - return true; - } - if ("required" in definition[property] && definition[property].required) { - valid = value !== ""; - } - if (valid && "validate" in definition[property]) { - try { - valid = definition[property].validate.call(node,value); - } catch(err) { - console.log("Validation error:",node.type,node.id,"property: "+property,"value:",value,err); - } - } - if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) { - if (!value || value == "_ADD_") { - valid = definition[property].hasOwnProperty("required") && !definition[property].required; - } else { - var configNode = RED.nodes.node(value); - valid = (configNode !== null && (configNode.valid == null || configNode.valid)); - } - } - return valid; - } - - - function validateNodeEditor(node,prefix) { - for (var prop in node._def.defaults) { - if (node._def.defaults.hasOwnProperty(prop)) { - validateNodeEditorProperty(node,node._def.defaults,prop,prefix); - } - } - if (node._def.credentials) { - for (prop in node._def.credentials) { - if (node._def.credentials.hasOwnProperty(prop)) { - validateNodeEditorProperty(node,node._def.credentials,prop,prefix); - } - } - } - } - - function validateNodeEditorProperty(node,defaults,property,prefix) { - var input = $("#"+prefix+"-"+property); - if (input.length > 0) { - var value = input.val(); - if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") { - value = input.text(); - } - if (!validateNodeProperty(node, defaults, property,value)) { - input.addClass("input-error"); - } else { - input.removeClass("input-error"); - } - } - } - - /** - * Called when the node's properties have changed. - * Marks the node as dirty and needing a size check. - * Removes any links to non-existant outputs. - * @param node - the node that has been updated - * @param outputMap - (optional) a map of old->new port numbers if wires should be moved - * @returns {array} the links that were removed due to this update - */ - function updateNodeProperties(node, outputMap) { - node.resize = true; - node.dirty = true; - var removedLinks = []; - if (node.ports) { - if (outputMap) { - RED.nodes.eachLink(function(l) { - if (l.source === node && outputMap.hasOwnProperty(l.sourcePort)) { - if (outputMap[l.sourcePort] === "-1") { - removedLinks.push(l); - } else { - l.sourcePort = outputMap[l.sourcePort]; - } - } - }); - } - if (node.outputs < node.ports.length) { - while (node.outputs < node.ports.length) { - node.ports.pop(); - } - RED.nodes.eachLink(function(l) { - if (l.source === node && l.sourcePort >= node.outputs && removedLinks.indexOf(l) === -1) { - removedLinks.push(l); - } - }); - } else if (node.outputs > node.ports.length) { - while (node.outputs > node.ports.length) { - node.ports.push(node.ports.length); - } - } - } - if (node.inputs === 0) { - removedLinks.concat(RED.nodes.filterLinks({target:node})); - } - for (var l=0;l<removedLinks.length;l++) { - RED.nodes.removeLink(removedLinks[l]); - } - return removedLinks; - } - - /** - * Create a config-node select box for this property - * @param node - the node being edited - * @param property - the name of the field - * @param type - the type of the config-node - */ - function prepareConfigNodeSelect(node,property,type,prefix) { - var input = $("#"+prefix+"-"+property); - if (input.length === 0 ) { - return; - } - var newWidth = input.width(); - var attrStyle = input.attr('style'); - var m; - if ((m = /width\s*:\s*(\d+(%|[a-z]+))/i.exec(attrStyle)) !== null) { - newWidth = m[1]; - } else { - newWidth = "70%"; - } - var outerWrap = $("<div></div>").css({display:'inline-block',position:'relative'}); - var selectWrap = $("<div></div>").css({position:'absolute',left:0,right:'40px'}).appendTo(outerWrap); - var select = $('<select id="'+prefix+'-'+property+'"></select>').appendTo(selectWrap); - - outerWrap.width(newWidth).height(input.height()); - if (outerWrap.width() === 0) { - outerWrap.width("70%"); - } - input.replaceWith(outerWrap); - // set the style attr directly - using width() on FF causes a value of 114%... - select.attr('style',"width:100%"); - updateConfigNodeSelect(property,type,node[property],prefix); - $('<a id="'+prefix+'-lookup-'+property+'" class="editor-button"><i class="fa fa-pencil"></i></a>') - .css({position:'absolute',right:0,top:0}) - .appendTo(outerWrap); - $('#'+prefix+'-lookup-'+property).click(function(e) { - showEditConfigNodeDialog(property,type,select.find(":selected").val(),prefix); - e.preventDefault(); - }); - var label = ""; - var configNode = RED.nodes.node(node[property]); - var node_def = RED.nodes.getType(type); - - if (configNode) { - label = RED.utils.getNodeLabel(configNode,configNode.id); - } - input.val(label); - } - - /** - * Create a config-node button for this property - * @param node - the node being edited - * @param property - the name of the field - * @param type - the type of the config-node - */ - function prepareConfigNodeButton(node,property,type,prefix) { - var input = $("#"+prefix+"-"+property); - input.val(node[property]); - input.attr("type","hidden"); - - var button = $("<a>",{id:prefix+"-edit-"+property, class:"editor-button"}); - input.after(button); - - if (node[property]) { - button.text(RED._("editor.configEdit")); - } else { - button.text(RED._("editor.configAdd")); - } - - button.click(function(e) { - showEditConfigNodeDialog(property,type,input.val()||"_ADD_",prefix); - e.preventDefault(); - }); - } - - /** - * Populate the editor dialog input field for this property - * @param node - the node being edited - * @param property - the name of the field - * @param prefix - the prefix to use in the input element ids (node-input|node-config-input) - * @param definition - the definition of the field - */ - function preparePropertyEditor(node,property,prefix,definition) { - var input = $("#"+prefix+"-"+property); - if (input.length === 0) { - return; - } - if (input.attr('type') === "checkbox") { - input.prop('checked',node[property]); - } - else { - var val = node[property]; - if (val == null) { - val = ""; - } - if (definition !== undefined && definition[property].hasOwnProperty("format") && definition[property].format !== "" && input[0].nodeName === "DIV") { - input.html(RED.text.format.getHtml(val, definition[property].format, {}, false, "en")); - RED.text.format.attach(input[0], definition[property].format, {}, false, "en"); - } else { - input.val(val); - if (input[0].nodeName === 'INPUT' || input[0].nodeName === 'TEXTAREA') { - RED.text.bidi.prepareInput(input); - } - } - } - } - - /** - * Add an on-change handler to revalidate a node field - * @param node - the node being edited - * @param definition - the definition of the node - * @param property - the name of the field - * @param prefix - the prefix to use in the input element ids (node-input|node-config-input) - */ - function attachPropertyChangeHandler(node,definition,property,prefix) { - var input = $("#"+prefix+"-"+property); - if (definition !== undefined && "format" in definition[property] && definition[property].format !== "" && input[0].nodeName === "DIV") { - $("#"+prefix+"-"+property).on('change keyup', function(event,skipValidation) { - if (!skipValidation) { - validateNodeEditor(node,prefix); - } - }); - } else { - $("#"+prefix+"-"+property).change(function(event,skipValidation) { - if (!skipValidation) { - validateNodeEditor(node,prefix); - } - }); - } - } - - /** - * Assign the value to each credential field - * @param node - * @param credDef - * @param credData - * @param prefix - */ - function populateCredentialsInputs(node, credDef, credData, prefix) { - var cred; - for (cred in credDef) { - if (credDef.hasOwnProperty(cred)) { - if (credDef[cred].type == 'password') { - if (credData[cred]) { - $('#' + prefix + '-' + cred).val(credData[cred]); - } else if (credData['has_' + cred]) { - $('#' + prefix + '-' + cred).val('__PWRD__'); - } - else { - $('#' + prefix + '-' + cred).val(''); - } - } else { - preparePropertyEditor(credData, cred, prefix, credDef); - } - attachPropertyChangeHandler(node, credDef, cred, prefix); - } - } - } - - /** - * Update the node credentials from the edit form - * @param node - the node containing the credentials - * @param credDefinition - definition of the credentials - * @param prefix - prefix of the input fields - * @return {boolean} whether anything has changed - */ - function updateNodeCredentials(node, credDefinition, prefix) { - var changed = false; - if(!node.credentials) { - node.credentials = {_:{}}; - } - - for (var cred in credDefinition) { - if (credDefinition.hasOwnProperty(cred)) { - var input = $("#" + prefix + '-' + cred); - var value = input.val(); - if (credDefinition[cred].type == 'password') { - node.credentials['has_' + cred] = (value !== ""); - if (value == '__PWRD__') { - continue; - } - changed = true; - - } - node.credentials[cred] = value; - if (value != node.credentials._[cred]) { - changed = true; - } - } - } - return changed; - } - - /** - * Prepare all of the editor dialog fields - * @param node - the node being edited - * @param definition - the node definition - * @param prefix - the prefix to use in the input element ids (node-input|node-config-input) - */ - function prepareEditDialog(node,definition,prefix,done) { - for (var d in definition.defaults) { - if (definition.defaults.hasOwnProperty(d)) { - if (definition.defaults[d].type) { - var configTypeDef = RED.nodes.getType(definition.defaults[d].type); - if (configTypeDef) { - if (configTypeDef.exclusive) { - prepareConfigNodeButton(node,d,definition.defaults[d].type,prefix); - } else { - prepareConfigNodeSelect(node,d,definition.defaults[d].type,prefix); - } - } else { - console.log("Unknown type:", definition.defaults[d].type); - preparePropertyEditor(node,d,prefix,definition.defaults); - } - } else { - preparePropertyEditor(node,d,prefix,definition.defaults); - } - attachPropertyChangeHandler(node,definition.defaults,d,prefix); - } - } - var completePrepare = function() { - if (definition.oneditprepare) { - try { - definition.oneditprepare.call(node); - } catch(err) { - console.log("oneditprepare",node.id,node.type,err.toString()); - } - } - // Now invoke any change handlers added to the fields - passing true - // to prevent full node validation from being triggered each time - for (var d in definition.defaults) { - if (definition.defaults.hasOwnProperty(d)) { - $("#"+prefix+"-"+d).trigger("change",[true]); - } - } - if (definition.credentials) { - for (d in definition.credentials) { - if (definition.credentials.hasOwnProperty(d)) { - $("#"+prefix+"-"+d).trigger("change",[true]); - } - } - } - validateNodeEditor(node,prefix); - if (done) { - done(); - } - } - - if (definition.credentials) { - if (node.credentials) { - populateCredentialsInputs(node, definition.credentials, node.credentials, prefix); - completePrepare(); - } else { - $.getJSON(getCredentialsURL(node.type, node.id), function (data) { - node.credentials = data; - node.credentials._ = $.extend(true,{},data); - populateCredentialsInputs(node, definition.credentials, node.credentials, prefix); - completePrepare(); - }); - } - } else { - completePrepare(); - } - } - - function getEditStackTitle() { - var title = '<ul class="editor-tray-breadcrumbs">'; - var label; - for (var i=editStack.length-1;i<editStack.length;i++) { - var node = editStack[i]; - label = node.type; - if (node.type === '_expression') { - label = RED._("expressionEditor.title"); - } else if (node.type === '_js') { - label = RED._("jsEditor.title"); - } else if (node.type === '_json') { - label = RED._("jsonEditor.title"); - } else if (node.type === '_markdown') { - label = RED._("markdownEditor.title"); - } else if (node.type === '_buffer') { - label = RED._("bufferEditor.title"); - } else if (node.type === 'subflow') { - label = RED._("subflow.editSubflow",{name:node.name}) - } else if (node.type.indexOf("subflow:")===0) { - var subflow = RED.nodes.subflow(node.type.substring(8)); - label = RED._("subflow.editSubflow",{name:subflow.name}) - } else { - if (typeof node._def.paletteLabel !== "undefined") { - try { - label = (typeof node._def.paletteLabel === "function" ? node._def.paletteLabel.call(node._def) : node._def.paletteLabel)||""; - } catch(err) { - console.log("Definition error: "+node.type+".paletteLabel",err); - } - } - if (i === editStack.length-1) { - if (RED.nodes.node(node.id)) { - label = RED._("editor.editNode",{type:label}); - } else { - label = RED._("editor.addNewConfig",{type:label}); - } - } - } - title += '<li>'+label+'</li>'; - } - title += '</ul>'; - return label; - } - - function buildEditForm(container,formId,type,ns) { - var dialogForm = $('<form id="'+formId+'" class="form-horizontal" autocomplete="off"></form>').appendTo(container); - dialogForm.html($("script[data-template-name='"+type+"']").html()); - ns = ns||"node-red"; - dialogForm.find('[data-i18n]').each(function() { - var current = $(this).attr("data-i18n"); - var keys = current.split(";"); - for (var i=0;i<keys.length;i++) { - var key = keys[i]; - if (key.indexOf(":") === -1) { - var prefix = ""; - if (key.indexOf("[")===0) { - var parts = key.split("]"); - prefix = parts[0]+"]"; - key = parts[1]; - } - keys[i] = prefix+ns+":"+key; - } - } - $(this).attr("data-i18n",keys.join(";")); - }); - // Add dummy fields to prevent 'Enter' submitting the form in some - // cases, and also prevent browser auto-fill of password - // Add in reverse order as they are prepended... - $('<input type="password" style="display: none;" />').prependTo(dialogForm); - $('<input type="text" style="display: none;" />').prependTo(dialogForm); - dialogForm.submit(function(e) { e.preventDefault();}); - return dialogForm; - } - - function refreshLabelForm(container,node) { - - var inputPlaceholder = node._def.inputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"); - var outputPlaceholder = node._def.outputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"); - - var inputsDiv = $("#node-label-form-inputs"); - var outputsDiv = $("#node-label-form-outputs"); - - var inputCount = node.inputs || node._def.inputs || 0; - var children = inputsDiv.children(); - var childCount = children.length; - if (childCount === 1 && $(children[0]).hasClass('node-label-form-none')) { - childCount--; - } - - if (childCount < inputCount) { - if (childCount === 0) { - // remove the 'none' placeholder - $(children[0]).remove(); - } - for (i = childCount;i<inputCount;i++) { - buildLabelRow("input",i,"",inputPlaceholder).appendTo(inputsDiv); - } - } else if (childCount > inputCount) { - for (i=inputCount;i<childCount;i++) { - $(children[i]).remove(); - } - if (outputCount === 0) { - buildLabelRow().appendTo(inputsDiv); - } - } - - var outputCount; - var i; - var formOutputs = $("#node-input-outputs").val(); - - if (formOutputs === undefined) { - outputCount = node.outputs || node._def.outputs || 0; - } else if (isNaN(formOutputs)) { - var outputMap = JSON.parse(formOutputs); - var keys = Object.keys(outputMap); - children = outputsDiv.children(); - childCount = children.length; - if (childCount === 1 && $(children[0]).hasClass('node-label-form-none')) { - childCount--; - } - - outputCount = 0; - var rows = []; - keys.forEach(function(p) { - var row = $("#node-label-form-output-"+p).parent(); - if (row.length === 0 && outputMap[p] !== -1) { - if (childCount === 0) { - $(children[0]).remove(); - childCount = -1; - } - row = buildLabelRow("output",p,"",outputPlaceholder); - } else { - row.detach(); - } - if (outputMap[p] !== -1) { - outputCount++; - rows.push({i:parseInt(outputMap[p]),r:row}); - } - }); - rows.sort(function(A,B) { - return A.i-B.i; - }) - rows.forEach(function(r,i) { - r.r.find("label").text((i+1)+"."); - r.r.appendTo(outputsDiv); - }) - if (rows.length === 0) { - buildLabelRow("output",i,"").appendTo(outputsDiv); - } else { - - } - } else { - outputCount = Math.max(0,parseInt(formOutputs)); - } - children = outputsDiv.children(); - childCount = children.length; - if (childCount === 1 && $(children[0]).hasClass('node-label-form-none')) { - childCount--; - } - if (childCount < outputCount) { - if (childCount === 0) { - // remove the 'none' placeholder - $(children[0]).remove(); - } - for (i = childCount;i<outputCount;i++) { - buildLabelRow("output",i,"").appendTo(outputsDiv); - } - } else if (childCount > outputCount) { - for (i=outputCount;i<childCount;i++) { - $(children[i]).remove(); - } - if (outputCount === 0) { - buildLabelRow().appendTo(outputsDiv); - } - } - } - function buildLabelRow(type, index, value, placeHolder) { - var result = $('<div>',{class:"node-label-form-row"}); - if (type === undefined) { - $('<span>').text(RED._("editor.noDefaultLabel")).appendTo(result); - result.addClass("node-label-form-none"); - } else { - result.addClass(""); - var id = "node-label-form-"+type+"-"+index; - $('<label>',{for:id}).text((index+1)+".").appendTo(result); - var input = $('<input>',{type:"text",id:id, placeholder: placeHolder}).val(value).appendTo(result); - var clear = $('<button class="editor-button editor-button-small"><i class="fa fa-times"></i></button>').appendTo(result); - clear.click(function(evt) { - evt.preventDefault(); - input.val(""); - }) - } - return result; - } - function showIconPicker(container, node, iconPath, done) { - var containerPos = container.offset(); - var pickerBackground = $('<div>').css({ - position: "absolute",top:0,bottom:0,left:0,right:0,zIndex:20 - }).appendTo("body"); - - var top = containerPos.top - 30; - - if (top+280 > $( window ).height()) { - top = $( window ).height() - 280; - } - var picker = $('<div class="red-ui-icon-picker">').css({ - top: top+"px", - left: containerPos.left+"px", - }).appendTo("body"); - - var hide = function() { - pickerBackground.remove(); - picker.remove(); - RED.keyboard.remove("escape"); - } - RED.keyboard.add("*","escape",function(){hide()}); - pickerBackground.on("mousedown", hide); - - var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(picker); - searchInput = $('<input type="text">').attr("placeholder",RED._("editor.searchIcons")).appendTo(searchDiv).searchBox({ - delay: 50, - change: function() { - var searchTerm = $(this).val().trim(); - if (searchTerm === "") { - iconList.find(".red-ui-icon-list-module").show(); - iconList.find(".red-ui-icon-list-icon").show(); - } else { - iconList.find(".red-ui-icon-list-module").hide(); - iconList.find(".red-ui-icon-list-icon").each(function(i,n) { - if ($(n).data('icon').indexOf(searchTerm) === -1) { - $(n).hide(); - } else { - $(n).show(); - } - }); - } - } - }); - - var row = $('<div>').appendTo(picker); - var iconList = $('<div class="red-ui-icon-list">').appendTo(picker); - var metaRow = $('<div class="red-ui-icon-meta"></div>').appendTo(picker); - var summary = $('<span>').appendTo(metaRow); - var resetButton = $('<button class="editor-button editor-button-small">'+RED._("editor.useDefault")+'</button>').appendTo(metaRow).click(function(e) { - e.preventDefault(); - hide(); - done(null); - }); - var iconSets = RED.nodes.getIconSets(); - Object.keys(iconSets).forEach(function(moduleName) { - var icons = iconSets[moduleName]; - if (icons.length > 0) { - // selectIconModule.append($("<option></option>").val(moduleName).text(moduleName)); - var header = $('<div class="red-ui-icon-list-module"></div>').text(moduleName).appendTo(iconList); - $('<i class="fa fa-cube"></i>').prependTo(header); - icons.forEach(function(icon) { - var iconDiv = $('<div>',{class:"red-ui-icon-list-icon"}).appendTo(iconList); - var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(iconDiv); - var colour = RED.utils.getNodeColor(node.type, node._def); - var icon_url = "icons/"+moduleName+"/"+icon; - iconDiv.data('icon',icon_url) - nodeDiv.css('backgroundColor',colour); - var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); - $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); - - if (iconPath.module === moduleName && iconPath.file === icon) { - iconDiv.addClass("selected"); - } - iconDiv.on("mouseover", function() { - summary.text(icon); - }) - iconDiv.on("mouseout", function() { - summary.html("&nbsp;"); - }) - iconDiv.click(function() { - hide(); - done(moduleName+"/"+icon); - }) - }) - } - }); - picker.slideDown(100); - searchInput.focus(); - } - - function buildLabelForm(container,node) { - var dialogForm = $('<form class="dialog-form form-horizontal" autocomplete="off"></form>').appendTo(container); - - var inputCount = node.inputs || node._def.inputs || 0; - var outputCount = node.outputs || node._def.outputs || 0; - if (node.type === 'subflow') { - inputCount = node.in.length; - outputCount = node.out.length; - } - - var inputLabels = node.inputLabels || []; - var outputLabels = node.outputLabels || []; - - var inputPlaceholder = node._def.inputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"); - var outputPlaceholder = node._def.outputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"); - - var i,row; - $('<div class="form-row"><span data-i18n="editor.labelInputs"></span><div id="node-label-form-inputs"></div></div>').appendTo(dialogForm); - var inputsDiv = $("#node-label-form-inputs"); - if (inputCount > 0) { - for (i=0;i<inputCount;i++) { - buildLabelRow("input",i,inputLabels[i],inputPlaceholder).appendTo(inputsDiv); - } - } else { - buildLabelRow().appendTo(inputsDiv); - } - $('<div class="form-row"><span data-i18n="editor.labelOutputs"></span><div id="node-label-form-outputs"></div></div>').appendTo(dialogForm); - var outputsDiv = $("#node-label-form-outputs"); - if (outputCount > 0) { - for (i=0;i<outputCount;i++) { - buildLabelRow("output",i,outputLabels[i],outputPlaceholder).appendTo(outputsDiv); - } - } else { - buildLabelRow().appendTo(outputsDiv); - } - - if ((!node._def.defaults || !node._def.defaults.hasOwnProperty("icon"))) { - $('<hr>').appendTo(dialogForm); - var iconRow = $('<div class="form-row"></div>').appendTo(dialogForm); - $('<label style="width: 50px" data-i18n="editor.settingIcon">').appendTo(iconRow); - - var iconButton = $('<button class="editor-button">').appendTo(iconRow); - - var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(iconButton); - var colour = RED.utils.getNodeColor(node.type, node._def); - var icon_url = RED.utils.getNodeIcon(node._def,node); - nodeDiv.css('backgroundColor',colour); - var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); - var iconDiv = $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); - - iconButton.click(function(e) { - e.preventDefault(); - var iconPath; - var icon = $("#node-settings-icon").text()||""; - if (icon) { - iconPath = RED.utils.separateIconPath(icon); - } else { - iconPath = RED.utils.getDefaultNodeIcon(node._def, node); - } - showIconPicker(iconRow,node,iconPath,function(newIcon) { - $("#node-settings-icon").text(newIcon||""); - var icon_url = RED.utils.getNodeIcon(node._def,{type:node.type,icon:newIcon}); - iconDiv.css("backgroundImage","url("+icon_url+")"); - }); - }) - $('<div class="uneditable-input" id="node-settings-icon">').text(node.icon).appendTo(iconRow); - } - } - - function updateLabels(editing_node, changes, outputMap) { - var inputLabels = $("#node-label-form-inputs").children().find("input"); - var outputLabels = $("#node-label-form-outputs").children().find("input"); - - var hasNonBlankLabel = false; - var changed = false; - var newValue = inputLabels.map(function() { - var v = $(this).val(); - hasNonBlankLabel = hasNonBlankLabel || v!== ""; - return v; - }).toArray().slice(0,editing_node.inputs); - if ((editing_node.inputLabels === undefined && hasNonBlankLabel) || - (editing_node.inputLabels !== undefined && JSON.stringify(newValue) !== JSON.stringify(editing_node.inputLabels))) { - changes.inputLabels = editing_node.inputLabels; - editing_node.inputLabels = newValue; - changed = true; - } - hasNonBlankLabel = false; - newValue = new Array(editing_node.outputs); - outputLabels.each(function() { - var index = $(this).attr('id').substring(23); // node-label-form-output-<index> - if (outputMap && outputMap.hasOwnProperty(index)) { - index = parseInt(outputMap[index]); - if (index === -1) { - return; - } - } - var v = $(this).val(); - hasNonBlankLabel = hasNonBlankLabel || v!== ""; - newValue[index] = v; - }); - - if ((editing_node.outputLabels === undefined && hasNonBlankLabel) || - (editing_node.outputLabels !== undefined && JSON.stringify(newValue) !== JSON.stringify(editing_node.outputLabels))) { - changes.outputLabels = editing_node.outputLabels; - editing_node.outputLabels = newValue; - changed = true; - } - return changed; - } - - function showEditDialog(node) { - var editing_node = node; - var isDefaultIcon; - var defaultIcon; - editStack.push(node); - RED.view.state(RED.state.EDITING); - var type = node.type; - if (node.type.substring(0,8) == "subflow:") { - type = "subflow"; - } - var trayOptions = { - title: getEditStackTitle(), - buttons: [ - { - id: "node-dialog-delete", - class: 'leftButton', - text: RED._("common.label.delete"), - click: function() { - var startDirty = RED.nodes.dirty(); - var removedNodes = []; - var removedLinks = []; - var removedEntities = RED.nodes.remove(editing_node.id); - removedNodes.push(editing_node); - removedNodes = removedNodes.concat(removedEntities.nodes); - removedLinks = removedLinks.concat(removedEntities.links); - - var historyEvent = { - t:'delete', - nodes:removedNodes, - links:removedLinks, - changes: {}, - dirty: startDirty - } - - RED.nodes.dirty(true); - RED.view.redraw(true); - RED.history.push(historyEvent); - RED.tray.close(); - } - }, - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - if (editing_node._def) { - if (editing_node._def.oneditcancel) { - try { - editing_node._def.oneditcancel.call(editing_node); - } catch(err) { - console.log("oneditcancel",editing_node.id,editing_node.type,err.toString()); - } - } - - for (var d in editing_node._def.defaults) { - if (editing_node._def.defaults.hasOwnProperty(d)) { - var def = editing_node._def.defaults[d]; - if (def.type) { - var configTypeDef = RED.nodes.getType(def.type); - if (configTypeDef && configTypeDef.exclusive) { - var input = $("#node-input-"+d).val()||""; - if (input !== "" && !editing_node[d]) { - // This node has an exclusive config node that - // has just been added. As the user is cancelling - // the edit, need to delete the just-added config - // node so that it doesn't get orphaned. - RED.nodes.remove(input); - } - } - } - } - - } - } - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - text: RED._("common.label.done"), - class: "primary", - click: function() { - var changes = {}; - var changed = false; - var wasDirty = RED.nodes.dirty(); - var d; - var outputMap; - - if (editing_node._def.oneditsave) { - var oldValues = {}; - for (d in editing_node._def.defaults) { - if (editing_node._def.defaults.hasOwnProperty(d)) { - if (typeof editing_node[d] === "string" || typeof editing_node[d] === "number") { - oldValues[d] = editing_node[d]; - } else { - oldValues[d] = $.extend(true,{},{v:editing_node[d]}).v; - } - } - } - try { - var rc = editing_node._def.oneditsave.call(editing_node); - if (rc === true) { - changed = true; - } - } catch(err) { - console.log("oneditsave",editing_node.id,editing_node.type,err.toString()); - } - - for (d in editing_node._def.defaults) { - if (editing_node._def.defaults.hasOwnProperty(d)) { - if (oldValues[d] === null || typeof oldValues[d] === "string" || typeof oldValues[d] === "number") { - if (oldValues[d] !== editing_node[d]) { - changes[d] = oldValues[d]; - changed = true; - } - } else { - if (JSON.stringify(oldValues[d]) !== JSON.stringify(editing_node[d])) { - changes[d] = oldValues[d]; - changed = true; - } - } - } - } - } - - var newValue; - if (editing_node._def.defaults) { - for (d in editing_node._def.defaults) { - if (editing_node._def.defaults.hasOwnProperty(d)) { - var input = $("#node-input-"+d); - if (input.attr('type') === "checkbox") { - newValue = input.prop('checked'); - } else if ("format" in editing_node._def.defaults[d] && editing_node._def.defaults[d].format !== "" && input[0].nodeName === "DIV") { - newValue = input.text(); - } else { - newValue = input.val(); - } - if (newValue != null) { - if (d === "outputs") { - if (newValue.trim() === "") { - continue; - } - if (isNaN(newValue)) { - outputMap = JSON.parse(newValue); - var outputCount = 0; - var outputsChanged = false; - var keys = Object.keys(outputMap); - keys.forEach(function(p) { - if (isNaN(p)) { - // New output; - outputCount ++; - delete outputMap[p]; - } else { - outputMap[p] = outputMap[p]+""; - if (outputMap[p] !== "-1") { - outputCount++; - if (outputMap[p] !== p) { - // Output moved - outputsChanged = true; - } else { - delete outputMap[p]; - } - } else { - // Output removed - outputsChanged = true; - } - } - }); - - newValue = outputCount; - if (outputsChanged) { - changed = true; - } - } else { - newValue = parseInt(newValue); - } - } - if (editing_node[d] != newValue) { - if (editing_node._def.defaults[d].type) { - if (newValue == "_ADD_") { - newValue = ""; - } - // Change to a related config node - var configNode = RED.nodes.node(editing_node[d]); - if (configNode) { - var users = configNode.users; - users.splice(users.indexOf(editing_node),1); - } - configNode = RED.nodes.node(newValue); - if (configNode) { - configNode.users.push(editing_node); - } - } - changes[d] = editing_node[d]; - editing_node[d] = newValue; - changed = true; - } - } - } - } - } - if (editing_node._def.credentials) { - var prefix = 'node-input'; - var credDefinition = editing_node._def.credentials; - var credsChanged = updateNodeCredentials(editing_node,credDefinition,prefix); - changed = changed || credsChanged; - } - // if (editing_node.hasOwnProperty("_outputs")) { - // outputMap = editing_node._outputs; - // delete editing_node._outputs; - // if (Object.keys(outputMap).length > 0) { - // changed = true; - // } - // } - var removedLinks = updateNodeProperties(editing_node,outputMap); - - if (updateLabels(editing_node, changes, outputMap)) { - changed = true; - } - - if (!editing_node._def.defaults || !editing_node._def.defaults.hasOwnProperty("icon")) { - var icon = $("#node-settings-icon").text()||"" - if (!isDefaultIcon) { - if (icon !== editing_node.icon) { - changes.icon = editing_node.icon; - editing_node.icon = icon; - changed = true; - } - } else { - if (icon !== defaultIcon) { - changes.icon = editing_node.icon; - editing_node.icon = icon; - changed = true; - } else { - var iconPath = RED.utils.getDefaultNodeIcon(editing_node._def, editing_node); - var currentDefaultIcon = iconPath.module+"/"+iconPath.file; - if (defaultIcon !== currentDefaultIcon) { - changes.icon = editing_node.icon; - editing_node.icon = currentDefaultIcon; - changed = true; - } - } - } - } - - if (changed) { - var wasChanged = editing_node.changed; - editing_node.changed = true; - RED.nodes.dirty(true); - - var activeSubflow = RED.nodes.subflow(RED.workspaces.active()); - var subflowInstances = null; - if (activeSubflow) { - subflowInstances = []; - RED.nodes.eachNode(function(n) { - if (n.type == "subflow:"+RED.workspaces.active()) { - subflowInstances.push({ - id:n.id, - changed:n.changed - }); - n.changed = true; - n.dirty = true; - updateNodeProperties(n); - } - }); - } - var historyEvent = { - t:'edit', - node:editing_node, - changes:changes, - links:removedLinks, - dirty:wasDirty, - changed:wasChanged - }; - if (outputMap) { - historyEvent.outputMap = outputMap; - } - if (subflowInstances) { - historyEvent.subflow = { - instances:subflowInstances - } - } - RED.history.push(historyEvent); - } - editing_node.dirty = true; - validateNode(editing_node); - RED.events.emit("editor:save",editing_node); - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - editTrayWidthCache[type] = dimensions.width; - $(".editor-tray-content").height(dimensions.height - 78); - var form = $(".editor-tray-content form").height(dimensions.height - 78 - 40); - if (editing_node && editing_node._def.oneditresize) { - try { - editing_node._def.oneditresize.call(editing_node,{width:form.width(),height:form.height()}); - } catch(err) { - console.log("oneditresize",editing_node.id,editing_node.type,err.toString()); - } - } - }, - open: function(tray, done) { - var trayFooter = tray.find(".editor-tray-footer"); - var trayBody = tray.find('.editor-tray-body'); - trayBody.parent().css('overflow','hidden'); - - var stack = RED.stack.create({ - container: trayBody, - singleExpanded: true - }); - var nodeProperties = stack.add({ - title: RED._("editor.nodeProperties"), - expanded: true - }); - nodeProperties.content.addClass("editor-tray-content"); - - var portLabels = stack.add({ - title: RED._("editor.portLabels"), - onexpand: function() { - refreshLabelForm(this.content,node); - } - }); - portLabels.content.addClass("editor-tray-content"); - - - if (editing_node) { - RED.sidebar.info.refresh(editing_node); - } - var ns; - if (node._def.set.module === "node-red") { - ns = "node-red"; - } else { - ns = node._def.set.id; - } - var iconPath = RED.utils.getDefaultNodeIcon(node._def,node); - defaultIcon = iconPath.module+"/"+iconPath.file; - if (node.icon && node.icon !== defaultIcon) { - isDefaultIcon = false; - } else { - isDefaultIcon = true; - } - buildEditForm(nodeProperties.content,"dialog-form",type,ns); - buildLabelForm(portLabels.content,node); - - prepareEditDialog(node,node._def,"node-input", function() { - trayBody.i18n(); - done(); - }); - }, - close: function() { - if (RED.view.state() != RED.state.IMPORT_DRAGGING) { - RED.view.state(RED.state.DEFAULT); - } - if (editing_node) { - RED.sidebar.info.refresh(editing_node); - } - RED.workspaces.refresh(); - RED.view.redraw(true); - editStack.pop(); - }, - show: function() { - if (editing_node) { - RED.sidebar.info.refresh(editing_node); - } - } - } - if (editTrayWidthCache.hasOwnProperty(type)) { - trayOptions.width = editTrayWidthCache[type]; - } - - if (type === 'subflow') { - var id = editing_node.type.substring(8); - trayOptions.buttons.unshift({ - class: 'leftButton', - text: RED._("subflow.edit"), - click: function() { - RED.workspaces.show(id); - $("#node-dialog-ok").click(); - } - }); - } - - RED.tray.show(trayOptions); - } - /** - * name - name of the property that holds this config node - * type - type of config node - * id - id of config node to edit. _ADD_ for a new one - * prefix - the input prefix of the parent property - */ - function showEditConfigNodeDialog(name,type,id,prefix) { - var adding = (id == "_ADD_"); - var node_def = RED.nodes.getType(type); - var editing_config_node = RED.nodes.node(id); - - var ns; - if (node_def.set.module === "node-red") { - ns = "node-red"; - } else { - ns = node_def.set.id; - } - var configNodeScope = ""; // default to global - var activeSubflow = RED.nodes.subflow(RED.workspaces.active()); - if (activeSubflow) { - configNodeScope = activeSubflow.id; - } - if (editing_config_node == null) { - editing_config_node = { - id: RED.nodes.id(), - _def: node_def, - type: type, - z: configNodeScope, - users: [] - } - for (var d in node_def.defaults) { - if (node_def.defaults[d].value) { - editing_config_node[d] = JSON.parse(JSON.stringify(node_def.defaults[d].value)); - } - } - editing_config_node["_"] = node_def._; - } - editStack.push(editing_config_node); - - RED.view.state(RED.state.EDITING); - var trayOptions = { - title: getEditStackTitle(), //(adding?RED._("editor.addNewConfig", {type:type}):RED._("editor.editConfig", {type:type})), - resize: function() { - if (editing_config_node && editing_config_node._def.oneditresize) { - var form = $("#node-config-dialog-edit-form"); - try { - editing_config_node._def.oneditresize.call(editing_config_node,{width:form.width(),height:form.height()}); - } catch(err) { - console.log("oneditresize",editing_config_node.id,editing_config_node.type,err.toString()); - } - } - }, - open: function(tray, done) { - var trayHeader = tray.find(".editor-tray-header"); - var trayFooter = tray.find(".editor-tray-footer"); - - if (node_def.hasUsers !== false) { - trayFooter.prepend('<div id="node-config-dialog-user-count"><i class="fa fa-info-circle"></i> <span></span></div>'); - } - trayFooter.append('<span id="node-config-dialog-scope-container"><span id="node-config-dialog-scope-warning" data-i18n="[title]editor.errors.scopeChange"><i class="fa fa-warning"></i></span><select id="node-config-dialog-scope"></select></span>'); - - var dialogForm = buildEditForm(tray.find('.editor-tray-body'),"node-config-dialog-edit-form",type,ns); - - prepareEditDialog(editing_config_node,node_def,"node-config-input", function() { - if (editing_config_node._def.exclusive) { - $("#node-config-dialog-scope").hide(); - } else { - $("#node-config-dialog-scope").show(); - } - $("#node-config-dialog-scope-warning").hide(); - - var nodeUserFlows = {}; - editing_config_node.users.forEach(function(n) { - nodeUserFlows[n.z] = true; - }); - var flowCount = Object.keys(nodeUserFlows).length; - var tabSelect = $("#node-config-dialog-scope").empty(); - tabSelect.off("change"); - tabSelect.append('<option value=""'+(!editing_config_node.z?" selected":"")+' data-i18n="sidebar.config.global"></option>'); - tabSelect.append('<option disabled data-i18n="sidebar.config.flows"></option>'); - RED.nodes.eachWorkspace(function(ws) { - var workspaceLabel = ws.label; - if (nodeUserFlows[ws.id]) { - workspaceLabel = "* "+workspaceLabel; - } - tabSelect.append('<option value="'+ws.id+'"'+(ws.id==editing_config_node.z?" selected":"")+'>'+workspaceLabel+'</option>'); - }); - tabSelect.append('<option disabled data-i18n="sidebar.config.subflows"></option>'); - RED.nodes.eachSubflow(function(ws) { - var workspaceLabel = ws.name; - if (nodeUserFlows[ws.id]) { - workspaceLabel = "* "+workspaceLabel; - } - tabSelect.append('<option value="'+ws.id+'"'+(ws.id==editing_config_node.z?" selected":"")+'>'+workspaceLabel+'</option>'); - }); - if (flowCount > 0) { - tabSelect.on('change',function() { - var newScope = $(this).val(); - if (newScope === '') { - // global scope - everyone can use it - $("#node-config-dialog-scope-warning").hide(); - } else if (!nodeUserFlows[newScope] || flowCount > 1) { - // a user will loose access to it - $("#node-config-dialog-scope-warning").show(); - } else { - $("#node-config-dialog-scope-warning").hide(); - } - }); - } - tabSelect.i18n(); - - dialogForm.i18n(); - if (node_def.hasUsers !== false) { - $("#node-config-dialog-user-count").find("span").text(RED._("editor.nodesUse", {count:editing_config_node.users.length})).parent().show(); - } - done(); - }); - }, - close: function() { - RED.workspaces.refresh(); - editStack.pop(); - }, - show: function() { - if (editing_config_node) { - RED.sidebar.info.refresh(editing_config_node); - } - } - } - trayOptions.buttons = [ - { - id: "node-config-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - var configType = type; - var configId = editing_config_node.id; - var configAdding = adding; - var configTypeDef = RED.nodes.getType(configType); - - if (configTypeDef.oneditcancel) { - // TODO: what to pass as this to call - if (configTypeDef.oneditcancel) { - var cn = RED.nodes.node(configId); - if (cn) { - try { - configTypeDef.oneditcancel.call(cn,false); - } catch(err) { - console.log("oneditcancel",cn.id,cn.type,err.toString()); - } - } else { - try { - configTypeDef.oneditcancel.call({id:configId},true); - } catch(err) { - console.log("oneditcancel",configId,configType,err.toString()); - } - } - } - } - RED.tray.close(); - } - }, - { - id: "node-config-dialog-ok", - text: adding?RED._("editor.configAdd"):RED._("editor.configUpdate"), - class: "primary", - click: function() { - var configProperty = name; - var configId = editing_config_node.id; - var configType = type; - var configAdding = adding; - var configTypeDef = RED.nodes.getType(configType); - var d; - var input; - var scope = $("#node-config-dialog-scope").val(); - - if (configTypeDef.oneditsave) { - try { - configTypeDef.oneditsave.call(editing_config_node); - } catch(err) { - console.log("oneditsave",editing_config_node.id,editing_config_node.type,err.toString()); - } - } - - for (d in configTypeDef.defaults) { - if (configTypeDef.defaults.hasOwnProperty(d)) { - var newValue; - input = $("#node-config-input-"+d); - if (input.attr('type') === "checkbox") { - newValue = input.prop('checked'); - } else if ("format" in configTypeDef.defaults[d] && configTypeDef.defaults[d].format !== "" && input[0].nodeName === "DIV") { - newValue = input.text(); - } else { - newValue = input.val(); - } - if (newValue != null && newValue !== editing_config_node[d]) { - if (editing_config_node._def.defaults[d].type) { - if (newValue == "_ADD_") { - newValue = ""; - } - // Change to a related config node - var configNode = RED.nodes.node(editing_config_node[d]); - if (configNode) { - var users = configNode.users; - users.splice(users.indexOf(editing_config_node),1); - } - configNode = RED.nodes.node(newValue); - if (configNode) { - configNode.users.push(editing_config_node); - } - } - editing_config_node[d] = newValue; - } - } - } - editing_config_node.label = configTypeDef.label; - editing_config_node.z = scope; - - if (scope) { - // Search for nodes that use this one that are no longer - // in scope, so must be removed - editing_config_node.users = editing_config_node.users.filter(function(n) { - var keep = true; - for (var d in n._def.defaults) { - if (n._def.defaults.hasOwnProperty(d)) { - if (n._def.defaults[d].type === editing_config_node.type && - n[d] === editing_config_node.id && - n.z !== scope) { - keep = false; - // Remove the reference to this node - // and revalidate - n[d] = null; - n.dirty = true; - n.changed = true; - validateNode(n); - } - } - } - return keep; - }); - } - - if (configAdding) { - RED.nodes.add(editing_config_node); - } - - if (configTypeDef.credentials) { - updateNodeCredentials(editing_config_node,configTypeDef.credentials,"node-config-input"); - } - validateNode(editing_config_node); - var validatedNodes = {}; - validatedNodes[editing_config_node.id] = true; - - var userStack = editing_config_node.users.slice(); - while(userStack.length > 0) { - var user = userStack.pop(); - if (!validatedNodes[user.id]) { - validatedNodes[user.id] = true; - if (user.users) { - userStack = userStack.concat(user.users); - } - validateNode(user); - } - } - RED.nodes.dirty(true); - RED.view.redraw(true); - if (!configAdding) { - RED.events.emit("editor:save",editing_config_node); - } - RED.tray.close(function() { - updateConfigNodeSelect(configProperty,configType,editing_config_node.id,prefix); - }); - } - } - ]; - - if (!adding) { - trayOptions.buttons.unshift({ - class: 'leftButton', - text: RED._("editor.configDelete"), //'<i class="fa fa-trash"></i>', - click: function() { - var configProperty = name; - var configId = editing_config_node.id; - var configType = type; - var configTypeDef = RED.nodes.getType(configType); - - try { - - if (configTypeDef.ondelete) { - // Deprecated: never documented but used by some early nodes - console.log("Deprecated API warning: config node type ",configType," has an ondelete function - should be oneditdelete"); - configTypeDef.ondelete.call(editing_config_node); - } - if (configTypeDef.oneditdelete) { - configTypeDef.oneditdelete.call(editing_config_node); - } - } catch(err) { - console.log("oneditdelete",editing_config_node.id,editing_config_node.type,err.toString()); - } - - var historyEvent = { - t:'delete', - nodes:[editing_config_node], - changes: {}, - dirty: RED.nodes.dirty() - } - for (var i=0;i<editing_config_node.users.length;i++) { - var user = editing_config_node.users[i]; - historyEvent.changes[user.id] = { - changed: user.changed, - valid: user.valid - }; - for (var d in user._def.defaults) { - if (user._def.defaults.hasOwnProperty(d) && user[d] == configId) { - historyEvent.changes[user.id][d] = configId - user[d] = ""; - user.changed = true; - user.dirty = true; - } - } - validateNode(user); - } - RED.nodes.remove(configId); - RED.nodes.dirty(true); - RED.view.redraw(true); - RED.history.push(historyEvent); - RED.tray.close(function() { - updateConfigNodeSelect(configProperty,configType,"",prefix); - }); - } - }); - } - - RED.tray.show(trayOptions); - } - - function defaultConfigNodeSort(A,B) { - if (A.__label__ < B.__label__) { - return -1; - } else if (A.__label__ > B.__label__) { - return 1; - } - return 0; - } - - function updateConfigNodeSelect(name,type,value,prefix) { - // if prefix is null, there is no config select to update - if (prefix) { - var button = $("#"+prefix+"-edit-"+name); - if (button.length) { - if (value) { - button.text(RED._("editor.configEdit")); - } else { - button.text(RED._("editor.configAdd")); - } - $("#"+prefix+"-"+name).val(value); - } else { - - var select = $("#"+prefix+"-"+name); - var node_def = RED.nodes.getType(type); - select.children().remove(); - - var activeWorkspace = RED.nodes.workspace(RED.workspaces.active()); - if (!activeWorkspace) { - activeWorkspace = RED.nodes.subflow(RED.workspaces.active()); - } - - var configNodes = []; - - RED.nodes.eachConfig(function(config) { - if (config.type == type && (!config.z || config.z === activeWorkspace.id)) { - var label = RED.utils.getNodeLabel(config,config.id); - config.__label__ = label; - configNodes.push(config); - } - }); - var configSortFn = defaultConfigNodeSort; - if (typeof node_def.sort == "function") { - configSortFn = node_def.sort; - } - try { - configNodes.sort(configSortFn); - } catch(err) { - console.log("Definition error: "+node_def.type+".sort",err); - } - - configNodes.forEach(function(cn) { - select.append('<option value="'+cn.id+'"'+(value==cn.id?" selected":"")+'>'+RED.text.bidi.enforceTextDirectionWithUCC(cn.__label__)+'</option>'); - delete cn.__label__; - }); - - select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:type})+'</option>'); - window.setTimeout(function() { select.change();},50); - } - } - } - - function showEditSubflowDialog(subflow) { - var editing_node = subflow; - editStack.push(subflow); - RED.view.state(RED.state.EDITING); - var subflowEditor; - - var trayOptions = { - title: getEditStackTitle(), - buttons: [ - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - class: "primary", - text: RED._("common.label.done"), - click: function() { - var i; - var changes = {}; - var changed = false; - var wasDirty = RED.nodes.dirty(); - - var newName = $("#subflow-input-name").val(); - - if (newName != editing_node.name) { - changes['name'] = editing_node.name; - editing_node.name = newName; - changed = true; - } - - var newDescription = subflowEditor.getValue(); - - if (newDescription != editing_node.info) { - changes['info'] = editing_node.info; - editing_node.info = newDescription; - changed = true; - } - if (updateLabels(editing_node, changes, null)) { - changed = true; - } - var icon = $("#node-settings-icon").text()||""; - if ((editing_node.icon === undefined && icon !== "node-red/subflow.png") || - (editing_node.icon !== undefined && editing_node.icon !== icon)) { - changes.icon = editing_node.icon; - editing_node.icon = icon; - changed = true; - } - var newCategory = $("#subflow-input-category").val().trim(); - if (newCategory === "_custom_") { - newCategory = $("#subflow-input-custom-category").val().trim(); - if (newCategory === "") { - newCategory = editing_node.category; - } - } - if (newCategory === 'subflows') { - newCategory = ''; - } - if (newCategory != editing_node.category) { - changes['category'] = editing_node.category; - editing_node.category = newCategory; - changed = true; - } - - RED.palette.refresh(); - - if (changed) { - var wasChanged = editing_node.changed; - editing_node.changed = true; - validateNode(editing_node); - var subflowInstances = []; - RED.nodes.eachNode(function(n) { - if (n.type == "subflow:"+editing_node.id) { - subflowInstances.push({ - id:n.id, - changed:n.changed - }) - n.changed = true; - n.dirty = true; - updateNodeProperties(n); - validateNode(n); - } - }); - RED.nodes.dirty(true); - var historyEvent = { - t:'edit', - node:editing_node, - changes:changes, - dirty:wasDirty, - changed:wasChanged, - subflow: { - instances:subflowInstances - } - }; - - RED.history.push(historyEvent); - } - editing_node.dirty = true; - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - $(".editor-tray-content").height(dimensions.height - 78); - var form = $(".editor-tray-content form").height(dimensions.height - 78 - 40); - - var rows = $("#dialog-form>div:not(.node-text-editor-row)"); - var editorRow = $("#dialog-form>div.node-text-editor-row"); - var height = $("#dialog-form").height(); - for (var i=0;i<rows.size();i++) { - height -= $(rows[i]).outerHeight(true); - } - height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom"))); - $(".node-text-editor").css("height",height+"px"); - subflowEditor.resize(); - }, - open: function(tray) { - var trayFooter = tray.find(".editor-tray-footer"); - var trayBody = tray.find('.editor-tray-body'); - trayBody.parent().css('overflow','hidden'); - - var stack = RED.stack.create({ - container: trayBody, - singleExpanded: true - }); - var nodeProperties = stack.add({ - title: RED._("editor.nodeProperties"), - expanded: true - }); - nodeProperties.content.addClass("editor-tray-content"); - var portLabels = stack.add({ - title: RED._("editor.portLabels") - }); - portLabels.content.addClass("editor-tray-content"); - - if (editing_node) { - RED.sidebar.info.refresh(editing_node); - } - var dialogForm = buildEditForm(nodeProperties.content,"dialog-form","subflow-template"); - subflowEditor = RED.editor.createEditor({ - id: 'subflow-input-info-editor', - mode: 'ace/mode/markdown', - value: "" - }); - - $("#subflow-input-name").val(subflow.name); - RED.text.bidi.prepareInput($("#subflow-input-name")); - - $("#subflow-input-category").empty(); - var categories = RED.palette.getCategories(); - categories.sort(function(A,B) { - return A.label.localeCompare(B.label); - }) - categories.forEach(function(cat) { - $("#subflow-input-category").append($("<option></option>").val(cat.id).text(cat.label)); - }) - $("#subflow-input-category").append($("<option></option>").attr('disabled',true).text("---")); - $("#subflow-input-category").append($("<option></option>").val("_custom_").text(RED._("palette.addCategory"))); - - - $("#subflow-input-category").change(function() { - var val = $(this).val(); - if (val === "_custom_") { - $("#subflow-input-category").width(120); - $("#subflow-input-custom-category").show(); - } else { - $("#subflow-input-category").width(250); - $("#subflow-input-custom-category").hide(); - } - }) - - - $("#subflow-input-category").val(subflow.category||"subflows"); - - subflowEditor.getSession().setValue(subflow.info||"",-1); - var userCount = 0; - var subflowType = "subflow:"+editing_node.id; - - RED.nodes.eachNode(function(n) { - if (n.type === subflowType) { - userCount++; - } - }); - $("#subflow-dialog-user-count").text(RED._("subflow.subflowInstances", {count:userCount})).show(); - - buildLabelForm(portLabels.content,subflow); - trayBody.i18n(); - }, - close: function() { - if (RED.view.state() != RED.state.IMPORT_DRAGGING) { - RED.view.state(RED.state.DEFAULT); - } - RED.sidebar.info.refresh(editing_node); - RED.workspaces.refresh(); - subflowEditor.destroy(); - editStack.pop(); - editing_node = null; - }, - show: function() { - } - } - RED.tray.show(trayOptions); - } - - function showTypeEditor(type, options) { - if (RED.editor.types.hasOwnProperty(type)) { - if (editStack.length > 0) { - options.parent = editStack[editStack.length-1].id; - } - editStack.push({type:type}); - options.title = options.title || getEditStackTitle(); - options.onclose = function() { - editStack.pop(); - } - RED.editor.types[type].show(options); - } else { - console.log("Unknown type editor:",type); - } - } - - - return { - init: function() { - RED.tray.init(); - RED.actions.add("core:confirm-edit-tray", function() { - $("#node-dialog-ok").click(); - $("#node-config-dialog-ok").click(); - }); - RED.actions.add("core:cancel-edit-tray", function() { - $("#node-dialog-cancel").click(); - $("#node-config-dialog-cancel").click(); - }); - - for (var type in RED.editor.types) { - if (RED.editor.types.hasOwnProperty(type)) { - RED.editor.types[type].init(); - } - } - }, - types: {}, - edit: showEditDialog, - editConfig: showEditConfigNodeDialog, - editSubflow: showEditSubflowDialog, - editJavaScript: function(options) { showTypeEditor("_js",options) }, - editExpression: function(options) { showTypeEditor("_expression", options) }, - editJSON: function(options) { showTypeEditor("_json", options) }, - editMarkdown: function(options) { showTypeEditor("_markdown", options) }, - editBuffer: function(options) { showTypeEditor("_buffer", options) }, - buildEditForm: buildEditForm, - validateNode: validateNode, - updateNodeProperties: updateNodeProperties, // TODO: only exposed for edit-undo - - - createEditor: function(options) { - var editor = ace.edit(options.id||options.element); - editor.setTheme("ace/theme/tomorrow"); - var session = editor.getSession(); - session.on("changeAnnotation", function () { - var annotations = session.getAnnotations() || []; - var i = annotations.length; - var len = annotations.length; - while (i--) { - if (/doctype first\. Expected/.test(annotations[i].text)) { annotations.splice(i, 1); } - else if (/Unexpected End of file\. Expected/.test(annotations[i].text)) { annotations.splice(i, 1); } - } - if (len > annotations.length) { session.setAnnotations(annotations); } - }); - if (options.mode) { - session.setMode(options.mode); - } - if (options.foldStyle) { - session.setFoldStyle(options.foldStyle); - } else { - session.setFoldStyle('markbeginend'); - } - if (options.options) { - editor.setOptions(options.options); - } else { - editor.setOptions({ - enableBasicAutocompletion:true, - enableSnippets:true - }); - } - if (options.readOnly) { - editor.setOption('readOnly',options.readOnly); - editor.container.classList.add("ace_read-only"); - } - if (options.hasOwnProperty('lineNumbers')) { - editor.renderer.setOption('showGutter',options.lineNumbers); - } - editor.$blockScrolling = Infinity; - if (options.value) { - session.setValue(options.value,-1); - } - if (options.globals) { - setTimeout(function() { - if (!!session.$worker) { - session.$worker.send("setOptions", [{globals: options.globals, esversion:6, sub:true, asi:true, maxerr:1000}]); - } - },100); - } - return editor; - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.editor.types._buffer = (function() { - - - var template = '<script type="text/x-red" data-template-name="_buffer"><div id="node-input-buffer-panels"><div id="node-input-buffer-panel-str" class="red-ui-panel"><div class="form-row" style="margin-bottom: 3px; text-align: right;"><span class="node-input-buffer-type"><i class="fa fa-exclamation-circle"></i> <span id="node-input-buffer-type-string" data-i18n="bufferEditor.modeString"></span><span id="node-input-buffer-type-array" data-i18n="bufferEditor.modeArray"></span></span></div><div class="form-row node-text-editor-row"><div class="node-text-editor" id="node-input-buffer-str"></div></div></div><div id="node-input-buffer-panel-bin" class="red-ui-panel"><div class="form-row node-text-editor-row" style="margin-top: 10px"><div class="node-text-editor" id="node-input-buffer-bin"></div></div></div></div></script>'; - - function stringToUTF8Array(str) { - var data = []; - var i=0, l = str.length; - for (i=0; i<l; i++) { - var char = str.charCodeAt(i); - if (char < 0x80) { - data.push(char); - } else if (char < 0x800) { - data.push(0xc0 | (char >> 6)); - data.push(0x80 | (char & 0x3f)); - } else if (char < 0xd800 || char >= 0xe000) { - data.push(0xe0 | (char >> 12)); - data.push(0x80 | ((char>>6) & 0x3f)); - data.push(0x80 | (char & 0x3f)); - } else { - i++; - char = 0x10000 + (((char & 0x3ff)<<10) | (str.charAt(i) & 0x3ff)); - data.push(0xf0 | (char >>18)); - data.push(0x80 | ((char>>12) & 0x3f)); - data.push(0x80 | ((char>>6) & 0x3f)); - data.push(0x80 | (char & 0x3f)); - } - } - return data; - } - - - return { - init: function() { - $(template).appendTo(document.body); - }, - show: function(options) { - var value = options.value; - var onComplete = options.complete; - var type = "_buffer" - RED.view.state(RED.state.EDITING); - var bufferStringEditor = []; - var bufferBinValue; - - var panels; - - var trayOptions = { - title: options.title, - width: "inherit", - buttons: [ - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - text: RED._("common.label.done"), - class: "primary", - click: function() { - onComplete(JSON.stringify(bufferBinValue)); - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - var height = $("#dialog-form").height(); - if (panels) { - panels.resize(height); - } - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var dialogForm = RED.editor.buildEditForm(tray.find('.editor-tray-body'),'dialog-form',type,'editor'); - - bufferStringEditor = RED.editor.createEditor({ - id: 'node-input-buffer-str', - value: "", - mode:"ace/mode/text" - }); - bufferStringEditor.getSession().setValue(value||"",-1); - - bufferBinEditor = RED.editor.createEditor({ - id: 'node-input-buffer-bin', - value: "", - mode:"ace/mode/text", - readOnly: true - }); - - var changeTimer; - var buildBuffer = function(data) { - var valid = true; - var isString = typeof data === 'string'; - var binBuffer = []; - if (isString) { - bufferBinValue = stringToUTF8Array(data); - } else { - bufferBinValue = data; - } - var i=0,l=bufferBinValue.length; - var c = 0; - for(i=0;i<l;i++) { - var d = parseInt(bufferBinValue[i]); - if (!isString && (isNaN(d) || d < 0 || d > 255)) { - valid = false; - break; - } - if (i>0) { - if (i%8 === 0) { - if (i%16 === 0) { - binBuffer.push("\n"); - } else { - binBuffer.push(" "); - } - } else { - binBuffer.push(" "); - } - } - binBuffer.push((d<16?"0":"")+d.toString(16).toUpperCase()); - } - if (valid) { - $("#node-input-buffer-type-string").toggle(isString); - $("#node-input-buffer-type-array").toggle(!isString); - bufferBinEditor.setValue(binBuffer.join(""),1); - } - return valid; - } - var bufferStringUpdate = function() { - var value = bufferStringEditor.getValue(); - var isValidArray = false; - if (/^[\s]*\[[\s\S]*\][\s]*$/.test(value)) { - isValidArray = true; - try { - var data = JSON.parse(value); - isValidArray = buildBuffer(data); - } catch(err) { - isValidArray = false; - } - } - if (!isValidArray) { - buildBuffer(value); - } - - } - bufferStringEditor.getSession().on('change', function() { - clearTimeout(changeTimer); - changeTimer = setTimeout(bufferStringUpdate,200); - }); - - bufferStringUpdate(); - - dialogForm.i18n(); - - panels = RED.panels.create({ - id:"node-input-buffer-panels", - resize: function(p1Height,p2Height) { - var p1 = $("#node-input-buffer-panel-str"); - p1Height -= $(p1.children()[0]).outerHeight(true); - var editorRow = $(p1.children()[1]); - p1Height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); - $("#node-input-buffer-str").css("height",(p1Height-5)+"px"); - bufferStringEditor.resize(); - - var p2 = $("#node-input-buffer-panel-bin"); - editorRow = $(p2.children()[0]); - p2Height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); - $("#node-input-buffer-bin").css("height",(p2Height-5)+"px"); - bufferBinEditor.resize(); - } - }); - - $(".node-input-buffer-type").click(function(e) { - e.preventDefault(); - RED.sidebar.info.set(RED._("bufferEditor.modeDesc")); - RED.sidebar.info.show(); - }) - - - }, - close: function() { - if (options.onclose) { - options.onclose(); - } - bufferStringEditor.destroy(); - bufferBinEditor.destroy(); - }, - show: function() {} - } - RED.tray.show(trayOptions); - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.editor.types._expression = (function() { - - - var template = '<script type="text/x-red" data-template-name="_expression"><div id="node-input-expression-panels"><div id="node-input-expression-panel-expr" class="red-ui-panel"><div class="form-row" style="margin-bottom: 3px; text-align: right;"><span class="node-input-expression-legacy"><i class="fa fa-exclamation-circle"></i> <span data-i18n="expressionEditor.compatMode"></span></span><button id="node-input-expression-reformat" class="editor-button editor-button-small"><span data-i18n="expressionEditor.format"></span></button></div><div class="form-row node-text-editor-row"><div class="node-text-editor" id="node-input-expression"></div></div></div><div id="node-input-expression-panel-info" class="red-ui-panel"><div class="form-row"><ul id="node-input-expression-tabs"></ul><div id="node-input-expression-tab-help" class="node-input-expression-tab-content hide"><div><select id="node-input-expression-func"></select><button id="node-input-expression-func-insert" class="editor-button" data-i18n="expressionEditor.insert"></button></div><div id="node-input-expression-help"></div></div><div id="node-input-expression-tab-test" class="node-input-expression-tab-content hide"><div><span style="display: inline-block; width: calc(50% - 5px);"><span data-i18n="expressionEditor.data"></span><button style="float: right; margin-right: 5px;" id="node-input-example-reformat" class="editor-button editor-button-small"><span data-i18n="jsonEditor.format"></span></button></span><span style="display: inline-block; width: calc(50% - 5px);" data-i18n="expressionEditor.result"></span></div><div style="display: inline-block; width: calc(50% - 5px);" class="node-text-editor" id="node-input-expression-test-data"></div><div style="display: inline-block; width: calc(50% - 5px);" class="node-text-editor" id="node-input-expression-test-result"></div></div></div></div></div></script>'; - var expressionTestCache = {}; - - return { - init: function() { - $(template).appendTo(document.body); - }, - show: function(options) { - var expressionTestCacheId = options.parent||"_"; - var value = options.value; - var onComplete = options.complete; - var type = "_expression" - RED.view.state(RED.state.EDITING); - var expressionEditor; - var testDataEditor; - var testResultEditor - var panels; - - var trayOptions = { - title: options.title, - width: "inherit", - buttons: [ - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - text: RED._("common.label.done"), - class: "primary", - click: function() { - $("#node-input-expression-help").text(""); - onComplete(expressionEditor.getValue()); - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - var height = $("#dialog-form").height(); - if (panels) { - panels.resize(height); - } - - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - trayBody.addClass("node-input-expression-editor") - var dialogForm = RED.editor.buildEditForm(tray.find('.editor-tray-body'),'dialog-form','_expression','editor'); - var funcSelect = $("#node-input-expression-func"); - Object.keys(jsonata.functions).forEach(function(f) { - funcSelect.append($("<option></option>").val(f).text(f)); - }) - funcSelect.change(function(e) { - var f = $(this).val(); - var args = RED._('jsonata:'+f+".args",{defaultValue:''}); - var title = "<h5>"+f+"("+args+")</h5>"; - var body = marked(RED._('jsonata:'+f+'.desc',{defaultValue:''})); - $("#node-input-expression-help").html(title+"<p>"+body+"</p>"); - - }) - expressionEditor = RED.editor.createEditor({ - id: 'node-input-expression', - value: "", - mode:"ace/mode/jsonata", - options: { - enableBasicAutocompletion:true, - enableSnippets:true, - enableLiveAutocompletion: true - } - }); - var currentToken = null; - var currentTokenPos = -1; - var currentFunctionMarker = null; - - expressionEditor.getSession().setValue(value||"",-1); - expressionEditor.on("changeSelection", function() { - var c = expressionEditor.getCursorPosition(); - var token = expressionEditor.getSession().getTokenAt(c.row,c.column); - if (token !== currentToken || (token && /paren/.test(token.type) && c.column !== currentTokenPos)) { - currentToken = token; - var r,p; - var scopedFunction = null; - if (token && token.type === 'keyword') { - r = c.row; - scopedFunction = token; - } else { - var depth = 0; - var next = false; - if (token) { - if (token.type === 'paren.rparen') { - // If this is a block of parens ')))', set - // depth to offset against the cursor position - // within the block - currentTokenPos = c.column; - depth = c.column - (token.start + token.value.length); - } - r = c.row; - p = token.index; - } else { - r = c.row-1; - p = -1; - } - while ( scopedFunction === null && r > -1) { - var rowTokens = expressionEditor.getSession().getTokens(r); - if (p === -1) { - p = rowTokens.length-1; - } - while (p > -1) { - var type = rowTokens[p].type; - if (next) { - if (type === 'keyword') { - scopedFunction = rowTokens[p]; - // console.log("HIT",scopedFunction); - break; - } - next = false; - } - if (type === 'paren.lparen') { - depth-=rowTokens[p].value.length; - } else if (type === 'paren.rparen') { - depth+=rowTokens[p].value.length; - } - if (depth < 0) { - next = true; - depth = 0; - } - // console.log(r,p,depth,next,rowTokens[p]); - p--; - } - if (!scopedFunction) { - r--; - } - } - } - expressionEditor.session.removeMarker(currentFunctionMarker); - if (scopedFunction) { - //console.log(token,.map(function(t) { return t.type})); - funcSelect.val(scopedFunction.value).change(); - } - } - }); - - dialogForm.i18n(); - $("#node-input-expression-func-insert").click(function(e) { - e.preventDefault(); - var pos = expressionEditor.getCursorPosition(); - var f = funcSelect.val(); - var snippet = jsonata.getFunctionSnippet(f); - expressionEditor.insertSnippet(snippet); - expressionEditor.focus(); - }); - $("#node-input-expression-reformat").click(function(evt) { - evt.preventDefault(); - var v = expressionEditor.getValue()||""; - try { - v = jsonata.format(v); - } catch(err) { - // TODO: do an optimistic auto-format - } - expressionEditor.getSession().setValue(v||"",-1); - }); - - var tabs = RED.tabs.create({ - element: $("#node-input-expression-tabs"), - onchange:function(tab) { - $(".node-input-expression-tab-content").hide(); - tab.content.show(); - trayOptions.resize(); - } - }) - - tabs.addTab({ - id: 'expression-help', - label: RED._('expressionEditor.functionReference'), - content: $("#node-input-expression-tab-help") - }); - tabs.addTab({ - id: 'expression-tests', - label: RED._('expressionEditor.test'), - content: $("#node-input-expression-tab-test") - }); - testDataEditor = RED.editor.createEditor({ - id: 'node-input-expression-test-data', - value: expressionTestCache[expressionTestCacheId] || '{\n "payload": "hello world"\n}', - mode:"ace/mode/json", - lineNumbers: false - }); - var changeTimer; - $(".node-input-expression-legacy").click(function(e) { - e.preventDefault(); - RED.sidebar.info.set(RED._("expressionEditor.compatModeDesc")); - RED.sidebar.info.show(); - }) - var testExpression = function() { - var value = testDataEditor.getValue(); - var parsedData; - var currentExpression = expressionEditor.getValue(); - var expr; - var usesContext = false; - var legacyMode = /(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(currentExpression); - $(".node-input-expression-legacy").toggle(legacyMode); - try { - expr = jsonata(currentExpression); - expr.assign('flowContext',function(val) { - usesContext = true; - return null; - }); - expr.assign('globalContext',function(val) { - usesContext = true; - return null; - }); - } catch(err) { - testResultEditor.setValue(RED._("expressionEditor.errors.invalid-expr",{message:err.message}),-1); - return; - } - try { - parsedData = JSON.parse(value); - } catch(err) { - testResultEditor.setValue(RED._("expressionEditor.errors.invalid-msg",{message:err.toString()})) - return; - } - - try { - var result = expr.evaluate(legacyMode?{msg:parsedData}:parsedData); - if (usesContext) { - testResultEditor.setValue(RED._("expressionEditor.errors.context-unsupported"),-1); - return; - } - - var formattedResult; - if (result !== undefined) { - formattedResult = JSON.stringify(result,null,4); - } else { - formattedResult = RED._("expressionEditor.noMatch"); - } - testResultEditor.setValue(formattedResult,-1); - } catch(err) { - testResultEditor.setValue(RED._("expressionEditor.errors.eval",{message:err.message}),-1); - } - } - - testDataEditor.getSession().on('change', function() { - clearTimeout(changeTimer); - changeTimer = setTimeout(testExpression,200); - expressionTestCache[expressionTestCacheId] = testDataEditor.getValue(); - }); - expressionEditor.getSession().on('change', function() { - clearTimeout(changeTimer); - changeTimer = setTimeout(testExpression,200); - }); - - testResultEditor = RED.editor.createEditor({ - id: 'node-input-expression-test-result', - value: "", - mode:"ace/mode/json", - lineNumbers: false, - readOnly: true - }); - panels = RED.panels.create({ - id:"node-input-expression-panels", - resize: function(p1Height,p2Height) { - var p1 = $("#node-input-expression-panel-expr"); - p1Height -= $(p1.children()[0]).outerHeight(true); - var editorRow = $(p1.children()[1]); - p1Height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); - $("#node-input-expression").css("height",(p1Height-5)+"px"); - expressionEditor.resize(); - - var p2 = $("#node-input-expression-panel-info > .form-row > div:first-child"); - p2Height -= p2.outerHeight(true) + 20; - $(".node-input-expression-tab-content").height(p2Height); - $("#node-input-expression-test-data").css("height",(p2Height-5)+"px"); - testDataEditor.resize(); - $("#node-input-expression-test-result").css("height",(p2Height-5)+"px"); - testResultEditor.resize(); - } - }); - - $("#node-input-example-reformat").click(function(evt) { - evt.preventDefault(); - var v = testDataEditor.getValue()||""; - try { - v = JSON.stringify(JSON.parse(v),null,4); - } catch(err) { - // TODO: do an optimistic auto-format - } - testDataEditor.getSession().setValue(v||"",-1); - }); - - testExpression(); - }, - close: function() { - if (options.onclose) { - options.onclose(); - } - expressionEditor.destroy(); - testDataEditor.destroy(); - }, - show: function() {} - } - RED.tray.show(trayOptions); - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.editor.types._js = (function() { - - - var template = '<script type="text/x-red" data-template-name="_js"><div class="form-row node-text-editor-row" style="width: 700px"><div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-js"></div></div></script>'; - - return { - init: function() { - $(template).appendTo(document.body); - }, - show: function(options) { - var value = options.value; - var onComplete = options.complete; - var type = "_js" - RED.view.state(RED.state.EDITING); - var expressionEditor; - var changeTimer; - - var trayOptions = { - title: options.title, - width: "inherit", - buttons: [ - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - text: RED._("common.label.done"), - class: "primary", - click: function() { - onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition()); - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - var rows = $("#dialog-form>div:not(.node-text-editor-row)"); - var editorRow = $("#dialog-form>div.node-text-editor-row"); - var height = $("#dialog-form").height(); - for (var i=0;i<rows.size();i++) { - height -= $(rows[i]).outerHeight(true); - } - height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom"))); - $(".node-text-editor").css("height",height+"px"); - expressionEditor.resize(); - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var dialogForm = RED.editor.buildEditForm(tray.find('.editor-tray-body'),'dialog-form',type,'editor'); - expressionEditor = RED.editor.createEditor({ - id: 'node-input-js', - mode: 'ace/mode/javascript', - value: value, - globals: { - msg:true, - context:true, - RED: true, - util: true, - flow: true, - global: true, - console: true, - Buffer: true, - setTimeout: true, - clearTimeout: true, - setInterval: true, - clearInterval: true - } - }); - if (options.cursor) { - expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false); - } - dialogForm.i18n(); - }, - close: function() { - expressionEditor.destroy(); - if (options.onclose) { - options.onclose(); - } - }, - show: function() {} - } - RED.tray.show(trayOptions); - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.editor.types._json = (function() { - - - var template = '<script type="text/x-red" data-template-name="_json"><div class="form-row" style="margin-bottom: 3px; text-align: right;"><button id="node-input-json-reformat" class="editor-button editor-button-small"><span data-i18n="jsonEditor.format"></span></button></div><div class="form-row node-text-editor-row"><div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-json"></div></div></script>'; - - return { - init: function() { - $(template).appendTo(document.body); - }, - show: function(options) { - var value = options.value; - var onComplete = options.complete; - var type = "_json" - RED.view.state(RED.state.EDITING); - var expressionEditor; - var changeTimer; - - var checkValid = function() { - var v = expressionEditor.getValue(); - try { - JSON.parse(v); - $("#node-dialog-ok").removeClass('disabled'); - return true; - } catch(err) { - $("#node-dialog-ok").addClass('disabled'); - return false; - } - } - var trayOptions = { - title: options.title, - width: "inherit", - buttons: [ - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - text: RED._("common.label.done"), - class: "primary", - click: function() { - if (options.requireValid && !checkValid()) { - return; - } - onComplete(expressionEditor.getValue()); - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - var rows = $("#dialog-form>div:not(.node-text-editor-row)"); - var editorRow = $("#dialog-form>div.node-text-editor-row"); - var height = $("#dialog-form").height(); - for (var i=0;i<rows.size();i++) { - height -= $(rows[i]).outerHeight(true); - } - height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom"))); - $(".node-text-editor").css("height",height+"px"); - expressionEditor.resize(); - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var dialogForm = RED.editor.buildEditForm(tray.find('.editor-tray-body'),'dialog-form',type,'editor'); - expressionEditor = RED.editor.createEditor({ - id: 'node-input-json', - value: "", - mode:"ace/mode/json" - }); - expressionEditor.getSession().setValue(value||"",-1); - if (options.requireValid) { - expressionEditor.getSession().on('change', function() { - clearTimeout(changeTimer); - changeTimer = setTimeout(checkValid,200); - }); - checkValid(); - } - $("#node-input-json-reformat").click(function(evt) { - evt.preventDefault(); - var v = expressionEditor.getValue()||""; - try { - v = JSON.stringify(JSON.parse(v),null,4); - } catch(err) { - // TODO: do an optimistic auto-format - } - expressionEditor.getSession().setValue(v||"",-1); - }); - dialogForm.i18n(); - }, - close: function() { - expressionEditor.destroy(); - if (options.onclose) { - options.onclose(); - } - }, - show: function() {} - } - RED.tray.show(trayOptions); - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.editor.types._markdown = (function() { - - - var template = '<script type="text/x-red" data-template-name="_markdown"><div class="form-row" id="node-input-markdown-title" style="margin-bottom: 3px; text-align: right;"></div><div class="form-row node-text-editor-row"><div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-markdown"></div></div></script>'; - - return { - init: function() { - $(template).appendTo(document.body); - }, - show: function(options) { - var value = options.value; - var onComplete = options.complete; - var type = "_markdown" - RED.view.state(RED.state.EDITING); - var expressionEditor; - - var trayOptions = { - title: options.title, - width: "inherit", - buttons: [ - { - id: "node-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - RED.tray.close(); - } - }, - { - id: "node-dialog-ok", - text: RED._("common.label.done"), - class: "primary", - click: function() { - onComplete(expressionEditor.getValue()); - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - var rows = $("#dialog-form>div:not(.node-text-editor-row)"); - var editorRow = $("#dialog-form>div.node-text-editor-row"); - var height = $("#dialog-form").height(); - for (var i=0;i<rows.size();i++) { - height -= $(rows[i]).outerHeight(true); - } - height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom"))); - $(".node-text-editor").css("height",height+"px"); - expressionEditor.resize(); - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var dialogForm = RED.editor.buildEditForm(tray.find('.editor-tray-body'),'dialog-form',type,'editor'); - expressionEditor = RED.editor.createEditor({ - id: 'node-input-markdown', - value: value, - mode:"ace/mode/markdown" - }); - if (options.header) { - options.header.appendTo(tray.find('#node-input-markdown-title')); - } - - dialogForm.i18n(); - }, - close: function() { - expressionEditor.destroy(); - if (options.onclose) { - options.onclose(); - } - }, - show: function() {} - } - RED.tray.show(trayOptions); - - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.tray = (function() { - - var stack = []; - var editorStack = $("#editor-stack"); - var openingTray = false; - - function resize() { - - } - function showTray(options) { - var el = $('<div class="editor-tray"></div>'); - var header = $('<div class="editor-tray-header"></div>').appendTo(el); - var bodyWrapper = $('<div class="editor-tray-body-wrapper"></div>').appendTo(el); - var body = $('<div class="editor-tray-body"></div>').appendTo(bodyWrapper); - var footer = $('<div class="editor-tray-footer"></div>').appendTo(el); - var resizer = $('<div class="editor-tray-resize-handle"></div>').appendTo(el); - // var growButton = $('<a class="editor-tray-resize-button" style="cursor: w-resize;"><i class="fa fa-angle-left"></i></a>').appendTo(resizer); - // var shrinkButton = $('<a class="editor-tray-resize-button" style="cursor: e-resize;"><i style="margin-left: 1px;" class="fa fa-angle-right"></i></a>').appendTo(resizer); - if (options.title) { - var titles = stack.map(function(e) { return e.options.title }); - titles.push(options.title); - var title = '<ul class="editor-tray-breadcrumbs"><li>'+titles.join("</li><li>")+'</li></ul>'; - - $('<div class="editor-tray-titlebar">'+title+'</div>').appendTo(header); - } - if (options.width === Infinity) { - options.maximized = true; - resizer.addClass('editor-tray-resize-maximised'); - } - var buttonBar = $('<div class="editor-tray-toolbar"></div>').appendTo(header); - var primaryButton; - if (options.buttons) { - for (var i=0;i<options.buttons.length;i++) { - var button = options.buttons[i]; - var b = $('<button>').button().appendTo(buttonBar); - if (button.id) { - b.attr('id',button.id); - } - if (button.text) { - b.text(button.text); - } - if (button.click) { - b.click((function(action) { - return function(evt) { - if (!$(this).hasClass('disabled')) { - action(evt); - } - }; - })(button.click)); - } - if (button.class) { - b.addClass(button.class); - if (button.class === "primary") { - primaryButton = button; - } - } - } - } - el.appendTo(editorStack); - var tray = { - tray: el, - header: header, - body: body, - footer: footer, - options: options, - primaryButton: primaryButton - }; - stack.push(tray); - - if (!options.maximized) { - el.draggable({ - handle: resizer, - axis: "x", - start:function(event,ui) { - el.width('auto'); - }, - drag: function(event,ui) { - var absolutePosition = editorStack.position().left+ui.position.left - if (absolutePosition < 7) { - ui.position.left += 7-absolutePosition; - } else if (ui.position.left > -tray.preferredWidth-1) { - ui.position.left = -Math.min(editorStack.position().left-7,tray.preferredWidth-1); - } - if (tray.options.resize) { - setTimeout(function() { - tray.options.resize({width: -ui.position.left}); - },0); - } - tray.width = -ui.position.left; - }, - stop:function(event,ui) { - el.width(-ui.position.left); - el.css({left:''}); - if (tray.options.resize) { - tray.options.resize({width: -ui.position.left}); - } - tray.width = -ui.position.left; - } - }); - } - - function finishBuild() { - $("#header-shade").show(); - $("#editor-shade").show(); - $("#palette-shade").show(); - $(".sidebar-shade").show(); - tray.preferredWidth = Math.max(el.width(),500); - if (!options.maximized) { - body.css({"minWidth":tray.preferredWidth-40}); - } - if (options.width) { - if (options.width > $("#editor-stack").position().left-8) { - options.width = $("#editor-stack").position().left-8; - } - el.width(options.width); - } else { - el.width(tray.preferredWidth); - } - - tray.width = el.width(); - if (tray.width > $("#editor-stack").position().left-8) { - tray.width = Math.max(0/*tray.preferredWidth*/,$("#editor-stack").position().left-8); - el.width(tray.width); - } - - // tray.body.parent().width(Math.min($("#editor-stack").position().left-8,tray.width)); - - el.css({ - right: -(el.width()+10)+"px", - transition: "right 0.25s ease" - }); - $("#workspace").scrollLeft(0); - handleWindowResize(); - openingTray = true; - setTimeout(function() { - setTimeout(function() { - if (!options.width) { - el.width(Math.min(tray.preferredWidth,$("#editor-stack").position().left-8)); - } - if (options.resize) { - options.resize({width:el.width()}); - } - if (options.show) { - options.show(); - } - setTimeout(function() { - // Delay resetting the flag, so we don't close prematurely - openingTray = false; - },200); - body.find(":focusable:first").focus(); - - },150); - el.css({right:0}); - },0); - } - if (options.open) { - if (options.open.length === 1) { - options.open(el); - finishBuild(); - } else { - options.open(el,finishBuild); - } - } else { - finishBuild(); - } - } - - function handleWindowResize() { - if (stack.length > 0) { - var tray = stack[stack.length-1]; - var trayHeight = tray.tray.height()-tray.header.outerHeight()-tray.footer.outerHeight(); - tray.body.height(trayHeight); - if (tray.options.maximized || tray.width > $("#editor-stack").position().left-8) { - tray.width = $("#editor-stack").position().left-8; - tray.tray.width(tray.width); - // tray.body.parent().width(tray.width); - } else if (tray.width < tray.preferredWidth) { - tray.width = Math.min($("#editor-stack").position().left-8,tray.preferredWidth); - tray.tray.width(tray.width); - // tray.body.parent().width(tray.width); - } - if (tray.options.resize) { - tray.options.resize({width:tray.width, height:trayHeight}); - } - } - } - - return { - init: function init() { - $(window).resize(handleWindowResize); - RED.events.on("sidebar:resize",handleWindowResize); - $("#editor-shade").click(function() { - if (!openingTray) { - var tray = stack[stack.length-1]; - if (tray && tray.primaryButton) { - tray.primaryButton.click(); - } - } - }); - }, - show: function show(options) { - if (stack.length > 0 && !options.overlay) { - var oldTray = stack[stack.length-1]; - if (options.width === "inherit") { - options.width = oldTray.tray.width(); - } - oldTray.tray.css({ - right: -(oldTray.tray.width()+10)+"px" - }); - setTimeout(function() { - oldTray.tray.detach(); - showTray(options); - },250) - } else { - RED.events.emit("editor:open"); - showTray(options); - } - - }, - close: function close(done) { - if (stack.length > 0) { - var tray = stack.pop(); - tray.tray.css({ - right: -(tray.tray.width()+10)+"px" - }); - setTimeout(function() { - if (tray.options.close) { - tray.options.close(); - } - tray.tray.remove(); - if (stack.length > 0) { - var oldTray = stack[stack.length-1]; - if (!oldTray.options.overlay) { - oldTray.tray.appendTo("#editor-stack"); - setTimeout(function() { - handleWindowResize(); - oldTray.tray.css({right:0}); - if (oldTray.options.show) { - oldTray.options.show(); - } - },0); - } else { - handleWindowResize(); - if (oldTray.options.show) { - oldTray.options.show(); - } - } - } - if (done) { - done(); - } - if (stack.length === 0) { - $("#header-shade").hide(); - $("#editor-shade").hide(); - $("#palette-shade").hide(); - $(".sidebar-shade").hide(); - RED.events.emit("editor:close"); - RED.view.focus(); - } - },250) - } - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - - -RED.clipboard = (function() { - - var dialog; - var dialogContainer; - var exportNodesDialog; - var importNodesDialog; - var disabled = false; - - function setupDialogs() { - dialog = $('<div id="clipboard-dialog" class="hide node-red-dialog"><form class="dialog-form form-horizontal"></form></div>') - .appendTo("body") - .dialog({ - modal: true, - autoOpen: false, - width: 500, - resizable: false, - buttons: [ - { - id: "clipboard-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - id: "clipboard-dialog-close", - class: "primary", - text: RED._("common.label.close"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - id: "clipboard-dialog-copy", - class: "primary", - text: RED._("clipboard.export.copy"), - click: function() { - $("#clipboard-export").select(); - document.execCommand("copy"); - document.getSelection().removeAllRanges(); - RED.notify(RED._("clipboard.nodesExported")); - $( this ).dialog( "close" ); - } - }, - { - id: "clipboard-dialog-ok", - class: "primary", - text: RED._("common.label.import"), - click: function() { - RED.view.importNodes($("#clipboard-import").val(),$("#import-tab > a.selected").attr('id') === 'import-tab-new'); - $( this ).dialog( "close" ); - } - } - ], - open: function(e) { - $(this).parent().find(".ui-dialog-titlebar-close").hide(); - }, - close: function(e) { - } - }); - - dialogContainer = dialog.children(".dialog-form"); - - exportNodesDialog = - '<div class="form-row">'+ - '<label style="width:auto;margin-right: 10px;" data-i18n="clipboard.export.copy"></label>'+ - '<span id="export-range-group" class="button-group">'+ - '<a id="export-range-selected" class="editor-button toggle" href="#" data-i18n="clipboard.export.selected"></a>'+ - '<a id="export-range-flow" class="editor-button toggle" href="#" data-i18n="clipboard.export.current"></a>'+ - '<a id="export-range-full" class="editor-button toggle" href="#" data-i18n="clipboard.export.all"></a>'+ - '</span>'+ - '</div>'+ - '<div class="form-row">'+ - '<textarea readonly style="resize: none; width: 100%; border-radius: 4px;font-family: monospace; font-size: 12px; background:#f3f3f3; padding-left: 0.5em; box-sizing:border-box;" id="clipboard-export" rows="5"></textarea>'+ - '</div>'+ - '<div class="form-row" style="text-align: right;">'+ - '<span id="export-format-group" class="button-group">'+ - '<a id="export-format-mini" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.compact"></a>'+ - '<a id="export-format-full" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.formatted"></a>'+ - '</span>'+ - '</div>'; - - importNodesDialog = '<div class="form-row">'+ - '<textarea style="resize: none; width: 100%; border-radius: 0px;font-family: monospace; font-size: 12px; background:#eee; padding-left: 0.5em; box-sizing:border-box;" id="clipboard-import" rows="5" placeholder="'+ - RED._("clipboard.pasteNodes")+ - '"></textarea>'+ - '</div>'+ - '<div class="form-row">'+ - '<label style="width:auto;margin-right: 10px;" data-i18n="clipboard.import.import"></label>'+ - '<span id="import-tab" class="button-group">'+ - '<a id="import-tab-current" class="editor-button toggle selected" href="#" data-i18n="clipboard.export.current"></a>'+ - '<a id="import-tab-new" class="editor-button toggle" href="#" data-i18n="clipboard.import.newFlow"></a>'+ - '</span>'+ - '</div>'; - } - - function validateImport() { - var importInput = $("#clipboard-import"); - var v = importInput.val(); - v = v.substring(v.indexOf('['),v.lastIndexOf(']')+1); - try { - JSON.parse(v); - importInput.removeClass("input-error"); - importInput.val(v); - $("#clipboard-dialog-ok").button("enable"); - } catch(err) { - if (v !== "") { - importInput.addClass("input-error"); - } - $("#clipboard-dialog-ok").button("disable"); - } - } - - function importNodes() { - if (disabled) { - return; - } - dialogContainer.empty(); - dialogContainer.append($(importNodesDialog)); - dialogContainer.i18n(); - - $("#clipboard-dialog-ok").show(); - $("#clipboard-dialog-cancel").show(); - $("#clipboard-dialog-close").hide(); - $("#clipboard-dialog-copy").hide(); - $("#clipboard-dialog-ok").button("disable"); - $("#clipboard-import").keyup(validateImport); - $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)}); - - $("#import-tab > a").click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { - return; - } - $(this).parent().children().removeClass('selected'); - $(this).addClass('selected'); - }); - - dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open"); - } - - function exportNodes() { - if (disabled) { - return; - } - - dialogContainer.empty(); - dialogContainer.append($(exportNodesDialog)); - dialogContainer.i18n(); - var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini"; - - $("#export-format-group > a").click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { - $("#clipboard-export").focus(); - return; - } - $(this).parent().children().removeClass('selected'); - $(this).addClass('selected'); - - var flow = $("#clipboard-export").val(); - if (flow.length > 0) { - var nodes = JSON.parse(flow); - - format = $(this).attr('id'); - if (format === 'export-format-full') { - flow = JSON.stringify(nodes,null,4); - } else { - flow = JSON.stringify(nodes); - } - $("#clipboard-export").val(flow); - $("#clipboard-export").focus(); - } - }); - - $("#export-range-group > a").click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { - $("#clipboard-export").focus(); - return; - } - $(this).parent().children().removeClass('selected'); - $(this).addClass('selected'); - var type = $(this).attr('id'); - var flow = ""; - var nodes = null; - if (type === 'export-range-selected') { - var selection = RED.view.selection(); - // Don't include the subflow meta-port nodes in the exported selection - nodes = RED.nodes.createExportableNodeSet(selection.nodes.filter(function(n) { return n.type !== 'subflow'})); - } else if (type === 'export-range-flow') { - var activeWorkspace = RED.workspaces.active(); - nodes = RED.nodes.filterNodes({z:activeWorkspace}); - var parentNode = RED.nodes.workspace(activeWorkspace)||RED.nodes.subflow(activeWorkspace); - nodes.unshift(parentNode); - nodes = RED.nodes.createExportableNodeSet(nodes); - } else if (type === 'export-range-full') { - nodes = RED.nodes.createCompleteNodeSet(false); - } - if (nodes !== null) { - if (format === "export-format-full") { - flow = JSON.stringify(nodes,null,4); - } else { - flow = JSON.stringify(nodes); - } - } - if (flow.length > 0) { - $("#export-copy").removeClass('disabled'); - } else { - $("#export-copy").addClass('disabled'); - } - $("#clipboard-export").val(flow); - $("#clipboard-export").focus(); - }) - - $("#clipboard-dialog-ok").hide(); - $("#clipboard-dialog-cancel").hide(); - $("#clipboard-dialog-copy").hide(); - $("#clipboard-dialog-close").hide(); - var selection = RED.view.selection(); - if (selection.nodes) { - $("#export-range-selected").click(); - } else { - $("#export-range-selected").addClass('disabled').removeClass('selected'); - $("#export-range-flow").click(); - } - if (format === "export-format-full") { - $("#export-format-full").click(); - } else { - $("#export-format-mini").click(); - } - $("#clipboard-export") - .focus(function() { - var textarea = $(this); - textarea.select(); - textarea.mouseup(function() { - textarea.unbind("mouseup"); - return false; - }) - }); - dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" ); - - $("#clipboard-export").focus(); - if (!document.queryCommandSupported("copy")) { - $("#clipboard-dialog-cancel").hide(); - $("#clipboard-dialog-close").show(); - } else { - $("#clipboard-dialog-cancel").show(); - $("#clipboard-dialog-copy").show(); - } - } - - function hideDropTarget() { - $("#dropTarget").hide(); - RED.keyboard.remove("escape"); - } - function copyText(value,element,msg) { - var truncated = false; - if (typeof value !== "string" ) { - value = JSON.stringify(value, function(key,value) { - if (value !== null && typeof value === 'object') { - if (value.__enc__) { - if (value.hasOwnProperty('data') && value.hasOwnProperty('length')) { - truncated = value.data.length !== value.length; - return value.data; - } - if (value.type === 'function' || value.type === 'internal') { - return undefined - } - if (value.type === 'number') { - // Handle NaN and Infinity - they are not permitted - // in JSON. We can either substitute with a String - // representation or null - return null; - } - } - } - return value; - }); - } - if (truncated) { - msg += "_truncated"; - } - $("#clipboard-hidden").val(value).select(); - var result = document.execCommand("copy"); - if (result && element) { - var popover = RED.popover.create({ - target: element, - direction: 'left', - size: 'small', - content: RED._(msg) - }); - setTimeout(function() { - popover.close(); - },1000); - popover.open(); - } - return result; - } - return { - init: function() { - setupDialogs(); - - $('<input type="text" id="clipboard-hidden">').appendTo("body"); - - RED.actions.add("core:show-export-dialog",exportNodes); - RED.actions.add("core:show-import-dialog",importNodes); - - - RED.events.on("editor:open",function() { disabled = true; }); - RED.events.on("editor:close",function() { disabled = false; }); - RED.events.on("search:open",function() { disabled = true; }); - RED.events.on("search:close",function() { disabled = false; }); - RED.events.on("type-search:open",function() { disabled = true; }); - RED.events.on("type-search:close",function() { disabled = false; }); - - - $('#chart').on("dragenter",function(event) { - if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 || - $.inArray("Files",event.originalEvent.dataTransfer.types) != -1) { - $("#dropTarget").css({display:'table'}); - RED.keyboard.add("*", "escape" ,hideDropTarget); - } - }); - - $('#dropTarget').on("dragover",function(event) { - if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 || - $.inArray("Files",event.originalEvent.dataTransfer.types) != -1) { - event.preventDefault(); - } - }) - .on("dragleave",function(event) { - hideDropTarget(); - }) - .on("drop",function(event) { - if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) { - var data = event.originalEvent.dataTransfer.getData("text/plain"); - data = data.substring(data.indexOf('['),data.lastIndexOf(']')+1); - RED.view.importNodes(data); - } else if ($.inArray("Files",event.originalEvent.dataTransfer.types) != -1) { - var files = event.originalEvent.dataTransfer.files; - if (files.length === 1) { - var file = files[0]; - var reader = new FileReader(); - reader.onload = (function(theFile) { - return function(e) { - RED.view.importNodes(e.target.result); - }; - })(file); - reader.readAsText(file); - } - } - hideDropTarget(); - event.preventDefault(); - }); - - }, - import: importNodes, - export: exportNodes, - copyText: copyText - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.library = (function() { - - var exportToLibraryDialog; - var elementPrefix = "node-input-"; - - - var _librarySaveConfirm = '<div id="node-dialog-library-save-confirm" class="hide"><form class="form-horizontal"><div style="text-align: center; padding-top: 30px;" id="node-dialog-library-save-content"></div></form></div>'; - var _librarySave = '<div id="node-dialog-library-save" class="hide"><form class="form-horizontal"><div class="form-row"><label for="node-dialog-library-save-folder" data-i18n="[append]library.folder"><i class="fa fa-folder-open"></i> </label><input type="text" id="node-dialog-library-save-folder" data-i18n="[placeholder]library.folderPlaceholder"></div><div class="form-row"><label for="node-dialog-library-save-filename" data-i18n="[append]library.filename"><i class="fa fa-file"></i> </label><input type="text" id="node-dialog-library-save-filename" data-i18n="[placeholder]library.filenamePlaceholder"></div></form></div>'; - var _libraryLookup = '<div id="node-dialog-library-lookup" class="hide"><form class="form-horizontal"><div class="form-row"><ul id="node-dialog-library-breadcrumbs" class="breadcrumb"><li class="active"><a href="#" data-i18n="[append]library.breadcrumb"></a></li></ul></div><div class="form-row"><div style="vertical-align: top; display: inline-block; height: 100%; width: 30%; padding-right: 20px;"><div id="node-select-library" style="border: 1px solid #999; width: 100%; height: 100%; overflow:scroll;"><ul></ul></div></div><div style="vertical-align: top; display: inline-block;width: 65%; height: 100%;"><div style="height: 100%; width: 95%;" class="node-text-editor" id="node-select-library-text" ></div></div></div></form></div>'; - - - function loadFlowLibrary() { - $.getJSON("library/flows",function(data) { - //console.log(data); - - var buildMenu = function(data,root) { - var i; - var li; - var a; - var ul = document.createElement("ul"); - if (root === "") { - ul.id = "menu-item-import-library-submenu"; - } - ul.className = "dropdown-menu"; - if (data.d) { - for (i in data.d) { - if (data.d.hasOwnProperty(i)) { - li = document.createElement("li"); - li.className = "dropdown-submenu pull-left"; - a = document.createElement("a"); - a.href="#"; - var label = i.replace(/^@.*\//,"").replace(/^node-red-contrib-/,"").replace(/^node-red-node-/,"").replace(/-/," ").replace(/_/," "); - a.innerHTML = label; - li.appendChild(a); - li.appendChild(buildMenu(data.d[i],root+(root!==""?"/":"")+i)); - ul.appendChild(li); - } - } - } - if (data.f) { - for (i in data.f) { - if (data.f.hasOwnProperty(i)) { - li = document.createElement("li"); - a = document.createElement("a"); - a.href="#"; - a.innerHTML = data.f[i]; - a.flowName = root+(root!==""?"/":"")+data.f[i]; - a.onclick = function() { - $.get('library/flows/'+this.flowName, function(data) { - RED.view.importNodes(data); - }); - }; - li.appendChild(a); - ul.appendChild(li); - } - } - } - return ul; - }; - var examples; - if (data.d && data.d._examples_) { - examples = data.d._examples_; - delete data.d._examples_; - } - var menu = buildMenu(data,""); - $("#menu-item-import-examples").remove(); - if (examples) { - RED.menu.addItem("menu-item-import",{id:"menu-item-import-examples",label:RED._("menu.label.examples"),options:[]}) - $("#menu-item-import-examples-submenu").replaceWith(buildMenu(examples,"_examples_")); - } - //TODO: need an api in RED.menu for this - $("#menu-item-import-library-submenu").replaceWith(menu); - }); - } - - function createUI(options) { - var libraryData = {}; - var selectedLibraryItem = null; - var libraryEditor = null; - elementPrefix = options.elementPrefix || "node-input-"; - - // Orion editor has set/getText - // ACE editor has set/getValue - // normalise to set/getValue - if (options.editor.setText) { - // Orion doesn't like having pos passed in, so proxy the call to drop it - options.editor.setValue = function(text,pos) { - options.editor.setText.call(options.editor,text); - } - } - if (options.editor.getText) { - options.editor.getValue = options.editor.getText; - } - - function buildFileListItem(item) { - var li = document.createElement("li"); - li.onmouseover = function(e) { $(this).addClass("list-hover"); }; - li.onmouseout = function(e) { $(this).removeClass("list-hover"); }; - return li; - } - - function buildFileList(root,data) { - var ul = document.createElement("ul"); - var li; - for (var i=0; i<data.length; i++) { - var v = data[i]; - if (typeof v === "string") { - // directory - li = buildFileListItem(v); - li.onclick = (function () { - var dirName = v; - return function(e) { - var bcli = $('<li class="active"><span class="divider">/</span> <a href="#">'+dirName+'</a></li>'); - $("a",bcli).click(function(e) { - $(this).parent().nextAll().remove(); - $.getJSON("library/"+options.url+root+dirName,function(data) { - $("#node-select-library").children().first().replaceWith(buildFileList(root+dirName+"/",data)); - }); - e.stopPropagation(); - }); - var bc = $("#node-dialog-library-breadcrumbs"); - $(".active",bc).removeClass("active"); - bc.append(bcli); - $.getJSON("library/"+options.url+root+dirName,function(data) { - $("#node-select-library").children().first().replaceWith(buildFileList(root+dirName+"/",data)); - }); - } - })(); - li.innerHTML = '<i class="fa fa-folder"></i> '+v+"</i>"; - ul.appendChild(li); - } else { - // file - li = buildFileListItem(v); - li.innerHTML = v.name; - li.onclick = (function() { - var item = v; - return function(e) { - $(".list-selected",ul).removeClass("list-selected"); - $(this).addClass("list-selected"); - $.get("library/"+options.url+root+item.fn, function(data) { - selectedLibraryItem = item; - libraryEditor.setValue(data,-1); - }); - } - })(); - ul.appendChild(li); - } - } - return ul; - } - - $('#'+elementPrefix+"name").css("width","calc(100% - 52px)").after( - '<div class="btn-group" style="margin-left:5px;">'+ - '<a id="node-input-'+options.type+'-lookup" class="editor-button" data-toggle="dropdown"><i class="fa fa-book"></i> <i class="fa fa-caret-down"></i></a>'+ - '<ul class="dropdown-menu pull-right" role="menu">'+ - '<li><a id="node-input-'+options.type+'-menu-open-library" tabindex="-1" href="#">'+RED._("library.openLibrary")+'</a></li>'+ - '<li><a id="node-input-'+options.type+'-menu-save-library" tabindex="-1" href="#">'+RED._("library.saveToLibrary")+'</a></li>'+ - '</ul></div>' - ); - - $('#node-input-'+options.type+'-menu-open-library').click(function(e) { - $("#node-select-library").children().remove(); - var bc = $("#node-dialog-library-breadcrumbs"); - bc.children().first().nextAll().remove(); - libraryEditor.setValue('',-1); - - $.getJSON("library/"+options.url,function(data) { - $("#node-select-library").append(buildFileList("/",data)); - $("#node-dialog-library-breadcrumbs a").click(function(e) { - $(this).parent().nextAll().remove(); - $("#node-select-library").children().first().replaceWith(buildFileList("/",data)); - e.stopPropagation(); - }); - $( "#node-dialog-library-lookup" ).dialog( "open" ); - }); - - e.preventDefault(); - }); - - $('#node-input-'+options.type+'-menu-save-library').click(function(e) { - //var found = false; - var name = $("#"+elementPrefix+"name").val().replace(/(^\s*)|(\s*$)/g,""); - - //var buildPathList = function(data,root) { - // var paths = []; - // if (data.d) { - // for (var i in data.d) { - // var dn = root+(root==""?"":"/")+i; - // var d = { - // label:dn, - // files:[] - // }; - // for (var f in data.d[i].f) { - // d.files.push(data.d[i].f[f].fn.split("/").slice(-1)[0]); - // } - // paths.push(d); - // paths = paths.concat(buildPathList(data.d[i],root+(root==""?"":"/")+i)); - // } - // } - // return paths; - //}; - $("#node-dialog-library-save-folder").attr("value",""); - - var filename = name.replace(/[^\w-]/g,"-"); - if (filename === "") { - filename = "unnamed-"+options.type; - } - $("#node-dialog-library-save-filename").attr("value",filename+".js"); - - //var paths = buildPathList(libraryData,""); - //$("#node-dialog-library-save-folder").autocomplete({ - // minLength: 0, - // source: paths, - // select: function( event, ui ) { - // $("#node-dialog-library-save-filename").autocomplete({ - // minLength: 0, - // source: ui.item.files - // }); - // } - //}); - - $( "#node-dialog-library-save" ).dialog( "open" ); - e.preventDefault(); - }); - - libraryEditor = ace.edit('node-select-library-text'); - libraryEditor.setTheme("ace/theme/tomorrow"); - if (options.mode) { - libraryEditor.getSession().setMode(options.mode); - } - libraryEditor.setOptions({ - readOnly: true, - highlightActiveLine: false, - highlightGutterLine: false - }); - libraryEditor.renderer.$cursorLayer.element.style.opacity=0; - libraryEditor.$blockScrolling = Infinity; - - $( "#node-dialog-library-lookup" ).dialog({ - title: RED._("library.typeLibrary", {type:options.type}), - modal: true, - autoOpen: false, - width: 800, - height: 450, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - text: RED._("common.label.load"), - class: "primary", - click: function() { - if (selectedLibraryItem) { - for (var i=0; i<options.fields.length; i++) { - var field = options.fields[i]; - $("#"+elementPrefix+field).val(selectedLibraryItem[field]); - } - options.editor.setValue(libraryEditor.getValue(),-1); - } - $( this ).dialog( "close" ); - } - } - ], - open: function(e) { - var form = $("form",this); - form.height(form.parent().height()-30); - $("#node-select-library-text").height("100%"); - $(".form-row:last-child",form).children().height(form.height()-60); - }, - resize: function(e) { - var form = $("form",this); - form.height(form.parent().height()-30); - $(".form-row:last-child",form).children().height(form.height()-60); - } - }); - - function saveToLibrary(overwrite) { - var name = $("#"+elementPrefix+"name").val().replace(/(^\s*)|(\s*$)/g,""); - if (name === "") { - name = RED._("library.unnamedType",{type:options.type}); - } - var filename = $("#node-dialog-library-save-filename").val().replace(/(^\s*)|(\s*$)/g,""); - var pathname = $("#node-dialog-library-save-folder").val().replace(/(^\s*)|(\s*$)/g,""); - if (filename === "" || !/.+\.js$/.test(filename)) { - RED.notify(RED._("library.invalidFilename"),"warning"); - return; - } - var fullpath = pathname+(pathname===""?"":"/")+filename; - if (!overwrite) { - //var pathnameParts = pathname.split("/"); - //var exists = false; - //var ds = libraryData; - //for (var pnp in pathnameParts) { - // if (ds.d && pathnameParts[pnp] in ds.d) { - // ds = ds.d[pathnameParts[pnp]]; - // } else { - // ds = null; - // break; - // } - //} - //if (ds && ds.f) { - // for (var f in ds.f) { - // if (ds.f[f].fn == fullpath) { - // exists = true; - // break; - // } - // } - //} - //if (exists) { - // $("#node-dialog-library-save-content").html(RED._("library.dialogSaveOverwrite",{libraryType:options.type,libraryName:fullpath})); - // $("#node-dialog-library-save-confirm").dialog( "open" ); - // return; - //} - } - var queryArgs = []; - var data = {}; - for (var i=0; i<options.fields.length; i++) { - var field = options.fields[i]; - if (field == "name") { - data.name = name; - } else { - data[field] = $("#"+elementPrefix+field).val(); - } - } - - data.text = options.editor.getValue(); - $.ajax({ - url:"library/"+options.url+'/'+fullpath, - type: "POST", - data: JSON.stringify(data), - contentType: "application/json; charset=utf-8" - }).done(function(data,textStatus,xhr) { - RED.notify(RED._("library.savedType", {type:options.type}),"success"); - }).fail(function(xhr,textStatus,err) { - if (xhr.status === 401) { - RED.notify(RED._("library.saveFailed",{message:RED._("user.notAuthorized")}),"error"); - } else { - RED.notify(RED._("library.saveFailed",{message:xhr.responseText}),"error"); - } - }); - } - $( "#node-dialog-library-save-confirm" ).dialog({ - title: RED._("library.saveToLibrary"), - modal: true, - autoOpen: false, - width: 530, - height: 230, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - text: RED._("common.label.save"), - class: "primary", - click: function() { - saveToLibrary(true); - $( this ).dialog( "close" ); - } - } - ] - }); - $( "#node-dialog-library-save" ).dialog({ - title: RED._("library.saveToLibrary"), - modal: true, - autoOpen: false, - width: 530, - height: 230, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - text: RED._("common.label.save"), - class: "primary", - click: function() { - saveToLibrary(false); - $( this ).dialog( "close" ); - } - } - ] - }); - - } - - function exportFlow() { - //TODO: don't rely on the main dialog - var nns = RED.nodes.createExportableNodeSet(RED.view.selection().nodes); - $("#node-input-library-filename").attr('nodes',JSON.stringify(nns)); - exportToLibraryDialog.dialog( "open" ); - } - - return { - init: function() { - - - $(_librarySave).appendTo(document.body); - $(_librarySaveConfirm).appendTo(document.body); - $(_libraryLookup).appendTo(document.body); - - RED.actions.add("core:library-export",exportFlow); - - RED.events.on("view:selection-changed",function(selection) { - if (!selection.nodes) { - RED.menu.setDisabled("menu-item-export-library",true); - } else { - RED.menu.setDisabled("menu-item-export-library",false); - } - }); - - if (RED.settings.theme("menu.menu-item-import-library") !== false) { - loadFlowLibrary(); - } - - exportToLibraryDialog = $('<div id="library-dialog" class="hide"><form class="dialog-form form-horizontal"></form></div>') - .appendTo("body") - .dialog({ - modal: true, - autoOpen: false, - width: 500, - resizable: false, - title: RED._("library.exportToLibrary"), - buttons: [ - { - id: "library-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - id: "library-dialog-ok", - class: "primary", - text: RED._("common.label.export"), - click: function() { - //TODO: move this to RED.library - var flowName = $("#node-input-library-filename").val(); - if (!/^\s*$/.test(flowName)) { - $.ajax({ - url:'library/flows/'+flowName, - type: "POST", - data: $("#node-input-library-filename").attr('nodes'), - contentType: "application/json; charset=utf-8" - }).done(function() { - RED.library.loadFlowLibrary(); - RED.notify(RED._("library.savedNodes"),"success"); - }).fail(function(xhr,textStatus,err) { - if (xhr.status === 401) { - RED.notify(RED._("library.saveFailed",{message:RED._("user.notAuthorized")}),"error"); - } else { - RED.notify(RED._("library.saveFailed",{message:xhr.responseText}),"error"); - } - }); - } - $( this ).dialog( "close" ); - } - } - ], - open: function(e) { - $(this).parent().find(".ui-dialog-titlebar-close").hide(); - }, - close: function(e) { - } - }); - exportToLibraryDialog.children(".dialog-form").append($( - '<div class="form-row">'+ - '<label for="node-input-library-filename" data-i18n="[append]editor:library.filename"><i class="fa fa-file"></i> </label>'+ - '<input type="text" id="node-input-library-filename" data-i18n="[placeholder]editor:library.fullFilenamePlaceholder">'+ - '<input type="text" style="display: none;" />'+ // Second hidden input to prevent submit on Enter - '</div>' - )); - }, - create: createUI, - loadFlowLibrary: loadFlowLibrary, - - export: exportFlow - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.notifications = (function() { - - /* - // Example usage for a modal dialog with buttons - var myNotification = RED.notify("This is the message to display",{ - modal: true, - fixed: true, - type: 'warning', - buttons: [ - { - text: "cancel", - click: function(e) { - myNotification.close(); - } - }, - { - text: "okay", - class:"primary", - click: function(e) { - myNotification.close(); - } - } - ] - }); - */ - - var persistentNotifications = {}; - - var currentNotifications = []; - var c = 0; - function notify(msg,type,fixed,timeout) { - var options = {}; - if (type !== null && typeof type === 'object') { - options = type; - fixed = options.fixed; - timeout = options.timeout; - type = options.type; - } - - if (options.modal) { - $("#full-shade").show(); - } - - if (currentNotifications.length > 4) { - var ll = currentNotifications.length; - for (var i = 0;ll > 4 && i<currentNotifications.length;i+=1) { - var notifiction = currentNotifications[i]; - if (!notifiction.fixed) { - window.clearTimeout(notifiction.timeoutid); - notifiction.close(); - ll -= 1; - } - } - } - var n = document.createElement("div"); - n.id="red-notification-"+c; - n.className = "notification"; - n.fixed = fixed; - if (type) { - n.className = "notification notification-"+type; - } - if (options.width) { - var parentWidth = $("#notifications").width(); - if (options.width > parentWidth) { - var margin = -(options.width-parentWidth)/2; - $(n).css({ - width: options.width+"px", - marginLeft: margin+"px" - }) - } - } - n.style.display = "none"; - if (typeof msg === "string") { - if (!/<p>/i.test(msg)) { - msg = "<p>"+msg+"</p>"; - } - n.innerHTML = msg; - } else { - $(n).append(msg); - } - if (options.buttons) { - var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(n) - options.buttons.forEach(function(buttonDef) { - var b = $('<button>').html(buttonDef.text).click(buttonDef.click).appendTo(buttonSet); - if (buttonDef.id) { - b.attr('id',buttonDef.id); - } - if (buttonDef.class) { - b.addClass(buttonDef.class); - } - }) - } - - - $("#notifications").append(n); - $(n).slideDown(300); - n.close = (function() { - var nn = n; - return function() { - if (nn.closed) { - return; - } - nn.closed = true; - currentNotifications.splice(currentNotifications.indexOf(nn),1); - if (options.id) { - delete persistentNotifications[options.id]; - if (Object.keys(persistentNotifications).length === 0) { - notificationButtonWrapper.hide(); - } - } - $(nn).slideUp(300, function() { - nn.parentNode.removeChild(nn); - }); - if (options.modal) { - $("#full-shade").hide(); - } - }; - })(); - n.hideNotification = (function() { - var nn = n; - return function() { - if (nn.closed) { - return - } - nn.hidden = true; - $(nn).slideUp(300); - } - })(); - n.showNotification = (function() { - var nn = n; - return function() { - if (nn.closed || !nn.hidden) { - return - } - nn.hidden = false; - $(nn).slideDown(300); - } - })(); - - n.update = (function() { - var nn = n; - return function(msg,options) { - if (typeof msg === "string") { - if (!/<p>/i.test(msg)) { - msg = "<p>"+msg+"</p>"; - } - nn.innerHTML = msg; - } else { - $(nn).empty().append(msg); - } - var timeout; - if (typeof options === 'number') { - timeout = options; - } else if (options !== undefined) { - timeout = options.timeout; - if (options.buttons) { - var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(nn) - options.buttons.forEach(function(buttonDef) { - var b = $('<button>').text(buttonDef.text).click(buttonDef.click).appendTo(buttonSet); - if (buttonDef.id) { - b.attr('id',buttonDef.id); - } - if (buttonDef.class) { - b.addClass(buttonDef.class); - } - }) - } - } - if (timeout !== undefined && timeout > 0) { - window.clearTimeout(nn.timeoutid); - nn.timeoutid = window.setTimeout(nn.close,timeout); - } else { - window.clearTimeout(nn.timeoutid); - } - if (nn.hidden) { - nn.showNotification(); - } - - } - })(); - - if (!fixed) { - $(n).click((function() { - var nn = n; - return function() { - nn.close(); - window.clearTimeout(nn.timeoutid); - }; - })()); - n.timeoutid = window.setTimeout(n.close,timeout||5000); - } - currentNotifications.push(n); - if (options.id) { - persistentNotifications[options.id] = n; - notificationButtonWrapper.show(); - } - c+=1; - return n; - } - - RED.notify = notify; - - - function hidePersistent() { - for(var i in persistentNotifications) { - if (persistentNotifications.hasOwnProperty(i)) { - persistentNotifications[i].hideNotification(); - } - } - } - function showPersistent() { - for(var i in persistentNotifications) { - if (persistentNotifications.hasOwnProperty(i)) { - persistentNotifications[i].showNotification(); - } - } - } - - var notificationButtonWrapper; - - return { - init: function() { - notificationButtonWrapper = $('<li>'+ - '<a id="btn-notifications" class="button" href="#">'+ - '<i class="fa fa-warning"></i>'+ - '</a>'+ - '</li>').prependTo(".header-toolbar").hide(); - $('#btn-notifications').click(function() { - showPersistent(); - }) - }, - notify: notify - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.search = (function() { - - var disabled = false; - var dialog = null; - var searchInput; - var searchResults; - var selected = -1; - var visible = false; - - var index = {}; - var keys = []; - var results = []; - - - function indexProperty(node,label,property) { - if (typeof property === 'string' || typeof property === 'number') { - property = (""+property).toLowerCase(); - index[property] = index[property] || {}; - index[property][node.id] = {node:node,label:label}; - } else if (Array.isArray(property)) { - property.forEach(function(prop) { - indexProperty(node,label,prop); - }) - } else if (typeof property === 'object') { - for (var prop in property) { - if (property.hasOwnProperty(prop)) { - indexProperty(node,label,property[prop]) - } - } - } - } - function indexNode(n) { - var l = RED.utils.getNodeLabel(n); - if (l) { - l = (""+l).toLowerCase(); - index[l] = index[l] || {}; - index[l][n.id] = {node:n,label:l} - } - l = l||n.label||n.name||n.id||""; - - - var properties = ['id','type','name','label','info']; - if (n._def && n._def.defaults) { - properties = properties.concat(Object.keys(n._def.defaults)); - } - for (var i=0;i<properties.length;i++) { - if (n.hasOwnProperty(properties[i])) { - indexProperty(n, l, n[properties[i]]); - } - } - } - - function indexWorkspace() { - index = {}; - RED.nodes.eachWorkspace(indexNode); - RED.nodes.eachSubflow(indexNode); - RED.nodes.eachConfig(indexNode); - RED.nodes.eachNode(indexNode); - keys = Object.keys(index); - keys.sort(); - keys.forEach(function(key) { - index[key] = Object.keys(index[key]).map(function(id) { - return index[key][id]; - }) - }) - } - - function search(val) { - searchResults.editableList('empty'); - selected = -1; - results = []; - if (val.length > 0) { - val = val.toLowerCase(); - var i; - var j; - var list = []; - var nodes = {}; - for (i=0;i<keys.length;i++) { - var key = keys[i]; - var kpos = keys[i].indexOf(val); - if (kpos > -1) { - for (j=0;j<index[key].length;j++) { - var node = index[key][j]; - nodes[node.node.id] = nodes[node.node.id] = node; - nodes[node.node.id].index = Math.min(nodes[node.node.id].index||Infinity,kpos); - } - } - } - list = Object.keys(nodes); - list.sort(function(A,B) { - return nodes[A].index - nodes[B].index; - }); - - for (i=0;i<list.length;i++) { - results.push(nodes[list[i]]); - } - if (results.length > 0) { - for (i=0;i<Math.min(results.length,25);i++) { - searchResults.editableList('addItem',results[i]) - } - } else { - searchResults.editableList('addItem',{}); - } - } - } - function ensureSelectedIsVisible() { - var selectedEntry = searchResults.find("li.selected"); - if (selectedEntry.length === 1) { - var scrollWindow = searchResults.parent(); - var scrollHeight = scrollWindow.height(); - var scrollOffset = scrollWindow.scrollTop(); - var y = selectedEntry.position().top; - var h = selectedEntry.height(); - if (y+h > scrollHeight) { - scrollWindow.animate({scrollTop: '-='+(scrollHeight-(y+h)-10)},50); - } else if (y<0) { - scrollWindow.animate({scrollTop: '+='+(y-10)},50); - } - } - } - - function createDialog() { - dialog = $("<div>",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#main-container"); - var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(dialog); - searchInput = $('<input type="text" data-i18n="[placeholder]menu.label.searchInput">').appendTo(searchDiv).searchBox({ - delay: 200, - change: function() { - search($(this).val()); - } - }); - searchInput.on('keydown',function(evt) { - var children; - if (results.length > 0) { - if (evt.keyCode === 40) { - // Down - children = searchResults.children(); - if (selected < children.length-1) { - if (selected > -1) { - $(children[selected]).removeClass('selected'); - } - selected++; - } - $(children[selected]).addClass('selected'); - ensureSelectedIsVisible(); - evt.preventDefault(); - } else if (evt.keyCode === 38) { - // Up - children = searchResults.children(); - if (selected > 0) { - if (selected < children.length) { - $(children[selected]).removeClass('selected'); - } - selected--; - } - $(children[selected]).addClass('selected'); - ensureSelectedIsVisible(); - evt.preventDefault(); - } else if (evt.keyCode === 13) { - // Enter - if (results.length > 0) { - reveal(results[Math.max(0,selected)].node); - } - } - } - }); - searchInput.i18n(); - - var searchResultsDiv = $("<div>",{class:"red-ui-search-results-container"}).appendTo(dialog); - searchResults = $('<ol>',{id:"search-result-list", style:"position: absolute;top: 5px;bottom: 5px;left: 5px;right: 5px;"}).appendTo(searchResultsDiv).editableList({ - addButton: false, - addItem: function(container,i,object) { - var node = object.node; - if (node === undefined) { - $('<div>',{class:"red-ui-search-empty"}).text(RED._('search.empty')).appendTo(container); - - } else { - var def = node._def; - var div = $('<a>',{href:'#',class:"red-ui-search-result"}).appendTo(container); - - var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div); - var colour = RED.utils.getNodeColor(node.type,def); - var icon_url = RED.utils.getNodeIcon(def,node); - if (node.type === 'tab') { - colour = "#C0DEED"; - } - nodeDiv.css('backgroundColor',colour); - - var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); - $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); - - var contentDiv = $('<div>',{class:"red-ui-search-result-description"}).appendTo(div); - if (node.z) { - var workspace = RED.nodes.workspace(node.z); - if (!workspace) { - workspace = RED.nodes.subflow(node.z); - workspace = "subflow:"+workspace.name; - } else { - workspace = "flow:"+workspace.label; - } - $('<div>',{class:"red-ui-search-result-node-flow"}).text(workspace).appendTo(contentDiv); - } - - $('<div>',{class:"red-ui-search-result-node-label"}).text(object.label || node.id).appendTo(contentDiv); - $('<div>',{class:"red-ui-search-result-node-type"}).text(node.type).appendTo(contentDiv); - $('<div>',{class:"red-ui-search-result-node-id"}).text(node.id).appendTo(contentDiv); - - div.click(function(evt) { - evt.preventDefault(); - reveal(node); - }); - } - }, - scrollOnAdd: false - }); - - } - function reveal(node) { - hide(); - RED.view.reveal(node.id); - } - - function show() { - if (disabled) { - return; - } - if (!visible) { - RED.keyboard.add("*","escape",function(){hide()}); - $("#header-shade").show(); - $("#editor-shade").show(); - $("#palette-shade").show(); - $("#sidebar-shade").show(); - $("#sidebar-separator").hide(); - indexWorkspace(); - if (dialog === null) { - createDialog(); - } - dialog.slideDown(300); - RED.events.emit("search:open"); - visible = true; - } - searchInput.focus(); - } - function hide() { - if (visible) { - RED.keyboard.remove("escape"); - visible = false; - $("#header-shade").hide(); - $("#editor-shade").hide(); - $("#palette-shade").hide(); - $("#sidebar-shade").hide(); - $("#sidebar-separator").show(); - if (dialog !== null) { - dialog.slideUp(200,function() { - searchInput.searchBox('value',''); - }); - } - RED.events.emit("search:close"); - } - } - - function init() { - RED.actions.add("core:search",show); - - RED.events.on("editor:open",function() { disabled = true; }); - RED.events.on("editor:close",function() { disabled = false; }); - RED.events.on("type-search:open",function() { disabled = true; }); - RED.events.on("type-search:close",function() { disabled = false; }); - - - - $("#header-shade").on('mousedown',hide); - $("#editor-shade").on('mousedown',hide); - $("#palette-shade").on('mousedown',hide); - $("#sidebar-shade").on('mousedown',hide); - } - - return { - init: init, - show: show, - hide: hide - }; - -})(); -;RED.typeSearch = (function() { - - var shade; - - var disabled = false; - var dialog = null; - var searchInput; - var searchResults; - var searchResultsDiv; - var selected = -1; - var visible = false; - - var activeFilter = ""; - var addCallback; - var cancelCallback; - - var typesUsed = {}; - - function search(val) { - activeFilter = val.toLowerCase(); - var visible = searchResults.editableList('filter'); - searchResults.editableList('sort'); - setTimeout(function() { - selected = 0; - searchResults.children().removeClass('selected'); - searchResults.children(":visible:first").addClass('selected'); - },100); - - } - - function ensureSelectedIsVisible() { - var selectedEntry = searchResults.find("li.selected"); - if (selectedEntry.length === 1) { - var scrollWindow = searchResults.parent(); - var scrollHeight = scrollWindow.height(); - var scrollOffset = scrollWindow.scrollTop(); - var y = selectedEntry.position().top; - var h = selectedEntry.height(); - if (y+h > scrollHeight) { - scrollWindow.animate({scrollTop: '-='+(scrollHeight-(y+h)-10)},50); - } else if (y<0) { - scrollWindow.animate({scrollTop: '+='+(y-10)},50); - } - } - } - - function createDialog() { - //shade = $('<div>',{class:"red-ui-type-search-shade"}).appendTo("#main-container"); - dialog = $("<div>",{id:"red-ui-type-search",class:"red-ui-search red-ui-type-search"}).appendTo("#main-container"); - var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(dialog); - searchInput = $('<input type="text">').attr("placeholder",RED._("search.addNode")).appendTo(searchDiv).searchBox({ - delay: 50, - change: function() { - search($(this).val()); - } - }); - searchInput.on('keydown',function(evt) { - var children = searchResults.children(":visible"); - if (children.length > 0) { - if (evt.keyCode === 40) { - // Down - if (selected < children.length-1) { - if (selected > -1) { - $(children[selected]).removeClass('selected'); - } - selected++; - } - $(children[selected]).addClass('selected'); - ensureSelectedIsVisible(); - evt.preventDefault(); - } else if (evt.keyCode === 38) { - // Up - if (selected > 0) { - if (selected < children.length) { - $(children[selected]).removeClass('selected'); - } - selected--; - } - $(children[selected]).addClass('selected'); - ensureSelectedIsVisible(); - evt.preventDefault(); - } else if (evt.keyCode === 13) { - // Enter - var index = Math.max(0,selected); - if (index < children.length) { - // TODO: dips into editableList impl details - confirm($(children[index]).find(".red-ui-editableList-item-content").data('data')); - } - } - } - }); - - searchResultsDiv = $("<div>",{class:"red-ui-search-results-container"}).appendTo(dialog); - searchResults = $('<ol>',{id:"search-result-list", style:"position: absolute;top: 0;bottom: 0;left: 0;right: 0;"}).appendTo(searchResultsDiv).editableList({ - addButton: false, - filter: function(data) { - if (activeFilter === "" ) { - return true; - } - if (data.recent || data.common) { - return false; - } - return (activeFilter==="")||(data.index.indexOf(activeFilter) > -1); - }, - sort: function(A,B) { - if (activeFilter === "") { - return A.i - B.i; - } - var Ai = A.index.indexOf(activeFilter); - var Bi = B.index.indexOf(activeFilter); - if (Ai === -1) { - return 1; - } - if (Bi === -1) { - return -1; - } - if (Ai === Bi) { - return sortTypeLabels(A,B); - } - return Ai-Bi; - }, - addItem: function(container,i,object) { - var def = object.def; - object.index = object.type.toLowerCase(); - if (object.separator) { - container.addClass("red-ui-search-result-separator") - } - var div = $('<a>',{href:'#',class:"red-ui-search-result"}).appendTo(container); - - var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div); - var colour = RED.utils.getNodeColor(object.type,def); - var icon_url = RED.utils.getNodeIcon(def); - nodeDiv.css('backgroundColor',colour); - - var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv); - $('<div/>',{class:"palette_icon",style:"background-image: url("+icon_url+")"}).appendTo(iconContainer); - - if (def.inputs > 0) { - $('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv); - } - if (def.outputs > 0) { - $('<div/>',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv); - } - - var contentDiv = $('<div>',{class:"red-ui-search-result-description"}).appendTo(div); - - var label = object.label; - object.index += "|"+label.toLowerCase(); - - $('<div>',{class:"red-ui-search-result-node-label"}).text(label).appendTo(contentDiv); - - div.click(function(evt) { - evt.preventDefault(); - confirm(object); - }); - }, - scrollOnAdd: false - }); - - } - function confirm(def) { - hide(); - typesUsed[def.type] = Date.now(); - addCallback(def.type); - } - - function handleMouseActivity(evt) { - if (visible) { - var t = $(evt.target); - while (t.prop('nodeName').toLowerCase() !== 'body') { - if (t.attr('id') === 'red-ui-type-search') { - return; - } - t = t.parent(); - } - hide(true); - if (cancelCallback) { - cancelCallback(); - } - } - } - function show(opts) { - if (!visible) { - RED.keyboard.add("*","escape",function(){ - hide(); - if (cancelCallback) { - cancelCallback(); - } - }); - if (dialog === null) { - createDialog(); - } - visible = true; - setTimeout(function() { - $(document).on('mousedown.type-search',handleMouseActivity); - $(document).on('mouseup.type-search',handleMouseActivity); - $(document).on('click.type-search',handleMouseActivity); - },200); - } else { - dialog.hide(); - searchResultsDiv.hide(); - } - refreshTypeList(); - addCallback = opts.add; - closeCallback = opts.close; - RED.events.emit("type-search:open"); - //shade.show(); - dialog.css({left:opts.x+"px",top:opts.y+"px"}).show(); - searchResultsDiv.slideDown(300); - setTimeout(function() { - searchResultsDiv.find(".red-ui-editableList-container").scrollTop(0); - searchInput.focus(); - },100); - } - function hide(fast) { - if (visible) { - RED.keyboard.remove("escape"); - visible = false; - if (dialog !== null) { - searchResultsDiv.slideUp(fast?50:200,function() { - dialog.hide(); - searchInput.searchBox('value',''); - }); - //shade.hide(); - } - RED.events.emit("type-search:close"); - RED.view.focus(); - $(document).off('mousedown.type-search'); - $(document).off('mouseup.type-search'); - $(document).off('click.type-search'); - } - } - - function getTypeLabel(type, def) { - var label = type; - if (typeof def.paletteLabel !== "undefined") { - try { - label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||""; - label += " ("+type+")"; - } catch(err) { - console.log("Definition error: "+type+".paletteLabel",err); - } - } - return label; - } - function sortTypeLabels(a,b) { - var al = a.label.toLowerCase(); - var bl = b.label.toLowerCase(); - if (al < bl) { - return -1; - } else if (al === bl) { - return 0; - } else { - return 1; - } - } - function refreshTypeList() { - var i; - searchResults.editableList('empty'); - searchInput.searchBox('value',''); - selected = -1; - var common = [ - 'inject','debug','function','change','switch' - ]; - - var recentlyUsed = Object.keys(typesUsed); - recentlyUsed.sort(function(a,b) { - return typesUsed[b]-typesUsed[a]; - }); - recentlyUsed = recentlyUsed.filter(function(t) { - return common.indexOf(t) === -1; - }); - - var items = []; - RED.nodes.registry.getNodeTypes().forEach(function(t) { - var def = RED.nodes.getType(t); - if (def.category !== 'config' && t !== 'unknown' && t !== 'tab') { - items.push({type:t,def: def, label:getTypeLabel(t,def)}); - } - }); - items.sort(sortTypeLabels); - - var commonCount = 0; - var item; - var index = 0; - for(i=0;i<common.length;i++) { - var itemDef = RED.nodes.getType(common[i]); - if (itemDef) { - item = { - type: common[i], - common: true, - def: itemDef, - i: index++ - }; - item.label = getTypeLabel(item.type,item.def); - if (i === common.length-1) { - item.separator = true; - } - searchResults.editableList('addItem', item); - } - } - for(i=0;i<Math.min(5,recentlyUsed.length);i++) { - item = { - type:recentlyUsed[i], - def: RED.nodes.getType(recentlyUsed[i]), - recent: true, - i: index++ - }; - item.label = getTypeLabel(item.type,item.def); - if (i === recentlyUsed.length-1) { - item.separator = true; - } - searchResults.editableList('addItem', item); - } - for (i=0;i<items.length;i++) { - items[i].i = index++; - searchResults.editableList('addItem', items[i]); - } - setTimeout(function() { - selected = 0; - searchResults.children(":first").addClass('selected'); - },100); - } - - return { - show: show, - hide: hide - }; - -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.subflow = (function() { - - - var _subflowEditTemplate = '<script type="text/x-red" data-template-name="subflow"><div class="form-row"><label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label><input type="text" id="node-input-name"></div></script>'; - var _subflowTemplateEditTemplate = '<script type="text/x-red" data-template-name="subflow-template"><div class="form-row"><i class="fa fa-tag"></i><label for="subflow-input-name" data-i18n="common.label.name"></label><input type="text" id="subflow-input-name"></div><div class="form-row" style="margin-bottom: 0px;"><label for="subflow-input-info" data-i18n="editor:subflow.info"></label><a href="https://help.github.com/articles/markdown-basics/" style="font-size: 0.8em; float: right;" data-i18n="[html]subflow.format"></a></div><div class="form-row node-text-editor-row"><div style="height: 250px;" class="node-text-editor" id="subflow-input-info-editor"></div></div><div class="form-row form-tips" id="subflow-dialog-user-count"></div></script>'; - - - function getSubflow() { - return RED.nodes.subflow(RED.workspaces.active()); - } - - function findAvailableSubflowIOPosition(subflow,isInput) { - var pos = {x:50,y:30}; - if (!isInput) { - pos.x += 110; - } - for (var i=0;i<subflow.out.length+subflow.in.length;i++) { - var port; - if (i < subflow.out.length) { - port = subflow.out[i]; - } else { - port = subflow.in[i-subflow.out.length]; - } - if (port.x == pos.x && port.y == pos.y) { - pos.x += 55; - i=0; - } - } - return pos; - } - - function addSubflowInput() { - var subflow = RED.nodes.subflow(RED.workspaces.active()); - if (subflow.in.length === 1) { - return; - } - var position = findAvailableSubflowIOPosition(subflow,true); - var newInput = { - type:"subflow", - direction:"in", - z:subflow.id, - i:subflow.in.length, - x:position.x, - y:position.y, - id:RED.nodes.id() - }; - var oldInCount = subflow.in.length; - subflow.in.push(newInput); - subflow.dirty = true; - var wasDirty = RED.nodes.dirty(); - var wasChanged = subflow.changed; - subflow.changed = true; - var result = refresh(true); - var historyEvent = { - t:'edit', - node:subflow, - dirty:wasDirty, - changed:wasChanged, - subflow: { - inputCount: oldInCount, - instances: result.instances - } - }; - RED.history.push(historyEvent); - RED.view.select(); - RED.nodes.dirty(true); - RED.view.redraw(); - $("#workspace-subflow-input-add").addClass("active"); - $("#workspace-subflow-input-remove").removeClass("active"); - } - - function removeSubflowInput() { - var activeSubflow = RED.nodes.subflow(RED.workspaces.active()); - if (activeSubflow.in.length === 0) { - return; - } - var removedInput = activeSubflow.in[0]; - var removedInputLinks = []; - RED.nodes.eachLink(function(l) { - if (l.source.type == "subflow" && l.source.z == activeSubflow.id && l.source.i == removedInput.i) { - removedInputLinks.push(l); - } else if (l.target.type == "subflow:"+activeSubflow.id) { - removedInputLinks.push(l); - } - }); - removedInputLinks.forEach(function(l) { RED.nodes.removeLink(l)}); - activeSubflow.in = []; - $("#workspace-subflow-input-add").removeClass("active"); - $("#workspace-subflow-input-remove").addClass("active"); - activeSubflow.changed = true; - return {subflowInputs: [ removedInput ], links:removedInputLinks}; - } - - function addSubflowOutput(id) { - var subflow = RED.nodes.subflow(RED.workspaces.active()); - var position = findAvailableSubflowIOPosition(subflow,false); - - var newOutput = { - type:"subflow", - direction:"out", - z:subflow.id, - i:subflow.out.length, - x:position.x, - y:position.y, - id:RED.nodes.id() - }; - var oldOutCount = subflow.out.length; - subflow.out.push(newOutput); - subflow.dirty = true; - var wasDirty = RED.nodes.dirty(); - var wasChanged = subflow.changed; - subflow.changed = true; - - var result = refresh(true); - - var historyEvent = { - t:'edit', - node:subflow, - dirty:wasDirty, - changed:wasChanged, - subflow: { - outputCount: oldOutCount, - instances: result.instances - } - }; - RED.history.push(historyEvent); - RED.view.select(); - RED.nodes.dirty(true); - RED.view.redraw(); - $("#workspace-subflow-output .spinner-value").text(subflow.out.length); - } - - function removeSubflowOutput(removedSubflowOutputs) { - var activeSubflow = RED.nodes.subflow(RED.workspaces.active()); - if (activeSubflow.out.length === 0) { - return; - } - if (typeof removedSubflowOutputs === "undefined") { - removedSubflowOutputs = [activeSubflow.out[activeSubflow.out.length-1]]; - } - var removedLinks = []; - removedSubflowOutputs.sort(function(a,b) { return b.i-a.i}); - for (i=0;i<removedSubflowOutputs.length;i++) { - var output = removedSubflowOutputs[i]; - activeSubflow.out.splice(output.i,1); - var subflowRemovedLinks = []; - var subflowMovedLinks = []; - RED.nodes.eachLink(function(l) { - if (l.target.type == "subflow" && l.target.z == activeSubflow.id && l.target.i == output.i) { - subflowRemovedLinks.push(l); - } - if (l.source.type == "subflow:"+activeSubflow.id) { - if (l.sourcePort == output.i) { - subflowRemovedLinks.push(l); - } else if (l.sourcePort > output.i) { - subflowMovedLinks.push(l); - } - } - }); - subflowRemovedLinks.forEach(function(l) { RED.nodes.removeLink(l)}); - subflowMovedLinks.forEach(function(l) { l.sourcePort--; }); - - removedLinks = removedLinks.concat(subflowRemovedLinks); - for (var j=output.i;j<activeSubflow.out.length;j++) { - activeSubflow.out[j].i--; - activeSubflow.out[j].dirty = true; - } - } - activeSubflow.changed = true; - - return {subflowOutputs: removedSubflowOutputs, links: removedLinks} - } - - function refresh(markChange) { - var activeSubflow = RED.nodes.subflow(RED.workspaces.active()); - refreshToolbar(activeSubflow); - var subflowInstances = []; - if (activeSubflow) { - RED.nodes.filterNodes({type:"subflow:"+activeSubflow.id}).forEach(function(n) { - subflowInstances.push({ - id: n.id, - changed: n.changed - }); - if (markChange) { - n.changed = true; - } - n.inputs = activeSubflow.in.length; - n.outputs = activeSubflow.out.length; - while (n.outputs < n.ports.length) { - n.ports.pop(); - } - n.resize = true; - n.dirty = true; - RED.editor.updateNodeProperties(n); - }); - RED.editor.validateNode(activeSubflow); - return { - instances: subflowInstances - } - } - } - function refreshToolbar(activeSubflow) { - if (activeSubflow) { - $("#workspace-subflow-input-add").toggleClass("active", activeSubflow.in.length !== 0); - $("#workspace-subflow-input-remove").toggleClass("active",activeSubflow.in.length === 0); - - $("#workspace-subflow-output .spinner-value").text(activeSubflow.out.length); - } - } - - function showWorkspaceToolbar(activeSubflow) { - var toolbar = $("#workspace-toolbar"); - toolbar.empty(); - - $('<a class="button" id="workspace-subflow-edit" href="#" data-i18n="[append]subflow.editSubflowProperties"><i class="fa fa-pencil"></i> </a>').appendTo(toolbar); - $('<span style="margin-left: 5px;" data-i18n="subflow.input"></span> '+ - '<div style="display: inline-block;" class="button-group">'+ - '<a id="workspace-subflow-input-remove" class="button active" href="#">0</a>'+ - '<a id="workspace-subflow-input-add" class="button" href="#">1</a>'+ - '</div>').appendTo(toolbar); - - $('<span style="margin-left: 5px;" data-i18n="subflow.output"></span> <div id="workspace-subflow-output" style="display: inline-block;" class="button-group spinner-group">'+ - '<a id="workspace-subflow-output-remove" class="button" href="#"><i class="fa fa-minus"></i></a>'+ - '<div class="spinner-value">3</div>'+ - '<a id="workspace-subflow-output-add" class="button" href="#"><i class="fa fa-plus"></i></a>'+ - '</div>').appendTo(toolbar); - - // $('<a class="button disabled" id="workspace-subflow-add-input" href="#" data-i18n="[append]subflow.input"><i class="fa fa-plus"></i> </a>').appendTo(toolbar); - // $('<a class="button" id="workspace-subflow-add-output" href="#" data-i18n="[append]subflow.output"><i class="fa fa-plus"></i> </a>').appendTo(toolbar); - $('<a class="button" id="workspace-subflow-delete" href="#" data-i18n="[append]subflow.deleteSubflow"><i class="fa fa-trash"></i> </a>').appendTo(toolbar); - toolbar.i18n(); - - - $("#workspace-subflow-output-remove").click(function(event) { - event.preventDefault(); - var wasDirty = RED.nodes.dirty(); - var wasChanged = activeSubflow.changed; - var result = removeSubflowOutput(); - if (result) { - var inst = refresh(true); - RED.history.push({ - t:'delete', - links:result.links, - subflowOutputs: result.subflowOutputs, - changed: wasChanged, - dirty:wasDirty, - subflow: { - instances: inst.instances - } - }); - - RED.view.select(); - RED.nodes.dirty(true); - RED.view.redraw(true); - } - }); - $("#workspace-subflow-output-add").click(function(event) { - event.preventDefault(); - addSubflowOutput(); - }); - - $("#workspace-subflow-input-add").click(function(event) { - event.preventDefault(); - addSubflowInput(); - }); - $("#workspace-subflow-input-remove").click(function(event) { - event.preventDefault(); - var wasDirty = RED.nodes.dirty(); - var wasChanged = activeSubflow.changed; - activeSubflow.changed = true; - var result = removeSubflowInput(); - if (result) { - var inst = refresh(true); - RED.history.push({ - t:'delete', - links:result.links, - changed: wasChanged, - subflowInputs: result.subflowInputs, - dirty:wasDirty, - subflow: { - instances: inst.instances - } - }); - RED.view.select(); - RED.nodes.dirty(true); - RED.view.redraw(true); - } - }); - - $("#workspace-subflow-edit").click(function(event) { - RED.editor.editSubflow(RED.nodes.subflow(RED.workspaces.active())); - event.preventDefault(); - }); - - $("#workspace-subflow-delete").click(function(event) { - event.preventDefault(); - var startDirty = RED.nodes.dirty(); - var historyEvent = removeSubflow(RED.workspaces.active()); - historyEvent.t = 'delete'; - historyEvent.dirty = startDirty; - - RED.history.push(historyEvent); - - }); - - refreshToolbar(activeSubflow); - - $("#chart").css({"margin-top": "40px"}); - $("#workspace-toolbar").show(); - } - function hideWorkspaceToolbar() { - $("#workspace-toolbar").hide().empty(); - $("#chart").css({"margin-top": "0"}); - } - - function removeSubflow(id) { - var removedNodes = []; - var removedLinks = []; - - var activeSubflow = RED.nodes.subflow(id); - - RED.nodes.eachNode(function(n) { - if (n.type == "subflow:"+activeSubflow.id) { - removedNodes.push(n); - } - if (n.z == activeSubflow.id) { - removedNodes.push(n); - } - }); - RED.nodes.eachConfig(function(n) { - if (n.z == activeSubflow.id) { - removedNodes.push(n); - } - }); - - var removedConfigNodes = []; - for (var i=0;i<removedNodes.length;i++) { - var removedEntities = RED.nodes.remove(removedNodes[i].id); - removedLinks = removedLinks.concat(removedEntities.links); - removedConfigNodes = removedConfigNodes.concat(removedEntities.nodes); - } - // TODO: this whole delete logic should be in RED.nodes.removeSubflow.. - removedNodes = removedNodes.concat(removedConfigNodes); - - RED.nodes.removeSubflow(activeSubflow); - RED.workspaces.remove(activeSubflow); - RED.nodes.dirty(true); - RED.view.redraw(); - - return { - nodes:removedNodes, - links:removedLinks, - subflow: { - subflow: activeSubflow - } - } - } - function init() { - RED.events.on("workspace:change",function(event) { - var activeSubflow = RED.nodes.subflow(event.workspace); - if (activeSubflow) { - showWorkspaceToolbar(activeSubflow); - } else { - hideWorkspaceToolbar(); - } - }); - RED.events.on("view:selection-changed",function(selection) { - if (!selection.nodes) { - RED.menu.setDisabled("menu-item-subflow-convert",true); - } else { - RED.menu.setDisabled("menu-item-subflow-convert",false); - } - }); - - RED.actions.add("core:create-subflow",createSubflow); - RED.actions.add("core:convert-to-subflow",convertToSubflow); - - $(_subflowEditTemplate).appendTo(document.body); - $(_subflowTemplateEditTemplate).appendTo(document.body); - - } - - function createSubflow() { - var lastIndex = 0; - RED.nodes.eachSubflow(function(sf) { - var m = (new RegExp("^Subflow (\\d+)$")).exec(sf.name); - if (m) { - lastIndex = Math.max(lastIndex,m[1]); - } - }); - - var name = "Subflow "+(lastIndex+1); - - var subflowId = RED.nodes.id(); - var subflow = { - type:"subflow", - id:subflowId, - name:name, - info:"", - in: [], - out: [] - }; - RED.nodes.addSubflow(subflow); - RED.history.push({ - t:'createSubflow', - subflow: { - subflow:subflow - }, - dirty:RED.nodes.dirty() - }); - RED.workspaces.show(subflowId); - RED.nodes.dirty(true); - } - - function convertToSubflow() { - var selection = RED.view.selection(); - if (!selection.nodes) { - RED.notify(RED._("subflow.errors.noNodesSelected"),"error"); - return; - } - var i,n; - var nodes = {}; - var new_links = []; - var removedLinks = []; - - var candidateInputs = []; - var candidateOutputs = []; - var candidateInputNodes = {}; - - - var boundingBox = [selection.nodes[0].x, - selection.nodes[0].y, - selection.nodes[0].x, - selection.nodes[0].y]; - - for (i=0;i<selection.nodes.length;i++) { - n = selection.nodes[i]; - nodes[n.id] = {n:n,outputs:{}}; - boundingBox = [ - Math.min(boundingBox[0],n.x), - Math.min(boundingBox[1],n.y), - Math.max(boundingBox[2],n.x), - Math.max(boundingBox[3],n.y) - ] - } - - var center = [(boundingBox[2]+boundingBox[0]) / 2,(boundingBox[3]+boundingBox[1]) / 2]; - - RED.nodes.eachLink(function(link) { - if (nodes[link.source.id] && nodes[link.target.id]) { - // A link wholely within the selection - } - - if (nodes[link.source.id] && !nodes[link.target.id]) { - // An outbound link from the selection - candidateOutputs.push(link); - removedLinks.push(link); - } - if (!nodes[link.source.id] && nodes[link.target.id]) { - // An inbound link - candidateInputs.push(link); - candidateInputNodes[link.target.id] = link.target; - removedLinks.push(link); - } - }); - - var outputs = {}; - candidateOutputs = candidateOutputs.filter(function(v) { - if (outputs[v.source.id+":"+v.sourcePort]) { - outputs[v.source.id+":"+v.sourcePort].targets.push(v.target); - return false; - } - v.targets = []; - v.targets.push(v.target); - outputs[v.source.id+":"+v.sourcePort] = v; - return true; - }); - candidateOutputs.sort(function(a,b) { return a.source.y-b.source.y}); - - if (Object.keys(candidateInputNodes).length > 1) { - RED.notify(RED._("subflow.errors.multipleInputsToSelection"),"error"); - return; - } - - var lastIndex = 0; - RED.nodes.eachSubflow(function(sf) { - var m = (new RegExp("^Subflow (\\d+)$")).exec(sf.name); - if (m) { - lastIndex = Math.max(lastIndex,m[1]); - } - }); - - var name = "Subflow "+(lastIndex+1); - - var subflowId = RED.nodes.id(); - var subflow = { - type:"subflow", - id:subflowId, - name:name, - info:"", - in: Object.keys(candidateInputNodes).map(function(v,i) { var index = i; return { - type:"subflow", - direction:"in", - x:candidateInputNodes[v].x-(candidateInputNodes[v].w/2)-80, - y:candidateInputNodes[v].y, - z:subflowId, - i:index, - id:RED.nodes.id(), - wires:[{id:candidateInputNodes[v].id}] - }}), - out: candidateOutputs.map(function(v,i) { var index = i; return { - type:"subflow", - direction:"in", - x:v.source.x+(v.source.w/2)+80, - y:v.source.y, - z:subflowId, - i:index, - id:RED.nodes.id(), - wires:[{id:v.source.id,port:v.sourcePort}] - }}) - }; - - RED.nodes.addSubflow(subflow); - - var subflowInstance = { - id:RED.nodes.id(), - type:"subflow:"+subflow.id, - x: center[0], - y: center[1], - z: RED.workspaces.active(), - inputs: subflow.in.length, - outputs: subflow.out.length, - h: Math.max(30/*node_height*/,(subflow.out.length||0) * 15), - changed:true - } - subflowInstance._def = RED.nodes.getType(subflowInstance.type); - RED.editor.validateNode(subflowInstance); - RED.nodes.add(subflowInstance); - - candidateInputs.forEach(function(l) { - var link = {source:l.source, sourcePort:l.sourcePort, target: subflowInstance}; - new_links.push(link); - RED.nodes.addLink(link); - }); - - candidateOutputs.forEach(function(output,i) { - output.targets.forEach(function(target) { - var link = {source:subflowInstance, sourcePort:i, target: target}; - new_links.push(link); - RED.nodes.addLink(link); - }); - }); - - subflow.in.forEach(function(input) { - input.wires.forEach(function(wire) { - var link = {source: input, sourcePort: 0, target: RED.nodes.node(wire.id) } - new_links.push(link); - RED.nodes.addLink(link); - }); - }); - subflow.out.forEach(function(output,i) { - output.wires.forEach(function(wire) { - var link = {source: RED.nodes.node(wire.id), sourcePort: wire.port , target: output } - new_links.push(link); - RED.nodes.addLink(link); - }); - }); - - for (i=0;i<removedLinks.length;i++) { - RED.nodes.removeLink(removedLinks[i]); - } - - for (i=0;i<selection.nodes.length;i++) { - n = selection.nodes[i]; - if (/^link /.test(n.type)) { - n.links = n.links.filter(function(id) { - var isLocalLink = nodes.hasOwnProperty(id); - if (!isLocalLink) { - var otherNode = RED.nodes.node(id); - if (otherNode && otherNode.links) { - var i = otherNode.links.indexOf(n.id); - if (i > -1) { - otherNode.links.splice(i,1); - } - } - } - return isLocalLink; - }); - } - n.z = subflow.id; - } - - RED.history.push({ - t:'createSubflow', - nodes:[subflowInstance.id], - links:new_links, - subflow: { - subflow: subflow - }, - - activeWorkspace: RED.workspaces.active(), - removedLinks: removedLinks, - - dirty:RED.nodes.dirty() - }); - RED.view.select(null); - RED.editor.validateNode(subflow); - RED.nodes.dirty(true); - RED.view.redraw(true); - } - - - - return { - init: init, - createSubflow: createSubflow, - convertToSubflow: convertToSubflow, - removeSubflow: removeSubflow, - refresh: refresh, - removeInput: removeSubflowInput, - removeOutput: removeSubflowOutput - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.userSettings = (function() { - - var trayWidth = 700; - var settingsVisible = false; - - var panes = []; - - function addPane(options) { - panes.push(options); - } - - function show(initialTab) { - if (settingsVisible) { - return; - } - if (!RED.user.hasPermission("settings.write")) { - RED.notify(RED._("user.errors.settings"),"error"); - return; - } - settingsVisible = true; - var tabContainer; - - var trayOptions = { - title: RED._("menu.label.userSettings"), - buttons: [ - { - id: "node-dialog-ok", - text: RED._("common.label.close"), - class: "primary", - click: function() { - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - trayWidth = dimensions.width; - }, - open: function(tray) { - var trayBody = tray.find('.editor-tray-body'); - var settingsContent = $('<div></div>').appendTo(trayBody); - var tabContainer = $('<div></div>',{id:"user-settings-tabs-container"}).appendTo(settingsContent); - - $('<ul></ul>',{id:"user-settings-tabs"}).appendTo(tabContainer); - var settingsTabs = RED.tabs.create({ - id: "user-settings-tabs", - vertical: true, - onchange: function(tab) { - setTimeout(function() { - $("#user-settings-tabs-content").children().hide(); - $("#" + tab.id).show(); - if (tab.pane.focus) { - tab.pane.focus(); - } - },50); - } - }); - var tabContents = $('<div></div>',{id:"user-settings-tabs-content"}).appendTo(settingsContent); - - panes.forEach(function(pane) { - settingsTabs.addTab({ - id: "user-settings-tab-"+pane.id, - label: pane.title, - pane: pane - }); - pane.get().hide().appendTo(tabContents); - }); - settingsContent.i18n(); - settingsTabs.activateTab("user-settings-tab-"+(initialTab||'view')) - $("#sidebar-shade").show(); - }, - close: function() { - settingsVisible = false; - panes.forEach(function(pane) { - if (pane.close) { - pane.close(); - } - }); - $("#sidebar-shade").hide(); - - }, - show: function() {} - } - if (trayWidth !== null) { - trayOptions.width = trayWidth; - } - RED.tray.show(trayOptions); - } - - var viewSettings = [ - { - title: "menu.label.view.grid", - options: [ - {setting:"view-show-grid",oldSetting:"menu-menu-item-view-show-grid",label:"menu.label.view.showGrid",toggle:true,onchange:"core:toggle-show-grid"}, - {setting:"view-snap-grid",oldSetting:"menu-menu-item-view-snap-grid",label:"menu.label.view.snapGrid",toggle:true,onchange:"core:toggle-snap-grid"}, - {setting:"view-grid-size",label:"menu.label.view.gridSize",type:"number",default: 20, onchange:RED.view.gridSize} - ] - }, - { - title: "menu.label.nodes", - options: [ - {setting:"view-node-status",oldSetting:"menu-menu-item-status",label:"menu.label.displayStatus",default: true, toggle:true,onchange:"core:toggle-status"} - ] - }, - { - title: "menu.label.other", - options: [ - {setting:"view-show-tips",oldSettings:"menu-menu-item-show-tips",label:"menu.label.showTips",toggle:true,default:true,onchange:"core:toggle-show-tips"} - ] - } - ]; - - var allSettings = {}; - - function createViewPane() { - - var pane = $('<div id="user-settings-tab-view" class="node-help"></div>'); - - var currentEditorSettings = RED.settings.get('editor') || {}; - currentEditorSettings.view = currentEditorSettings.view || {}; - - viewSettings.forEach(function(section) { - $('<h3></h3>').text(RED._(section.title)).appendTo(pane); - section.options.forEach(function(opt) { - var initialState = currentEditorSettings.view[opt.setting]; - var row = $('<div class="user-settings-row"></div>').appendTo(pane); - var input; - if (opt.toggle) { - input = $('<label for="user-settings-'+opt.setting+'"><input id="user-settings-'+opt.setting+'" type="checkbox"> '+RED._(opt.label)+'</label>').appendTo(row).find("input"); - input.prop('checked',initialState); - } else { - $('<label for="user-settings-'+opt.setting+'">'+RED._(opt.label)+'</label>').appendTo(row); - $('<input id="user-settings-'+opt.setting+'" type="'+(opt.type||"text")+'">').appendTo(row).val(initialState); - } - }); - }) - return pane; - } - - function setSelected(id, value) { - var opt = allSettings[id]; - var currentEditorSettings = RED.settings.get('editor') || {}; - currentEditorSettings.view = currentEditorSettings.view || {}; - currentEditorSettings.view[opt.setting] = value; - RED.settings.set('editor', currentEditorSettings); - var callback = opt.onchange; - if (typeof callback === 'string') { - callback = RED.actions.get(callback); - } - if (callback) { - callback.call(opt,value); - } - } - function toggle(id) { - var opt = allSettings[id]; - var currentEditorSettings = RED.settings.get('editor') || {}; - currentEditorSettings.view = currentEditorSettings.view || {}; - setSelected(id,!currentEditorSettings.view[opt.setting]); - } - - - function init() { - RED.actions.add("core:show-user-settings",show); - RED.actions.add("core:show-help", function() { show('keyboard')}); - - addPane({ - id:'view', - title: RED._("menu.label.view.view"), - get: createViewPane, - close: function() { - viewSettings.forEach(function(section) { - section.options.forEach(function(opt) { - var input = $("#user-settings-"+opt.setting); - if (opt.toggle) { - setSelected(opt.setting,input.prop('checked')); - } else { - setSelected(opt.setting,input.val()); - } - }); - }) - } - }) - - var currentEditorSettings = RED.settings.get('editor') || {}; - currentEditorSettings.view = currentEditorSettings.view || {}; - var editorSettingsChanged = false; - viewSettings.forEach(function(section) { - section.options.forEach(function(opt) { - if (opt.oldSetting) { - var oldValue = RED.settings.get(opt.oldSetting); - if (oldValue !== undefined && oldValue !== null) { - currentEditorSettings.view[opt.setting] = oldValue; - editorSettingsChanged = true; - RED.settings.remove(opt.oldSetting); - } - } - allSettings[opt.setting] = opt; - if (opt.onchange) { - var value = currentEditorSettings.view[opt.setting]; - if ((value === null || value === undefined) && opt.hasOwnProperty('default')) { - value = opt.default; - currentEditorSettings.view[opt.setting] = value; - editorSettingsChanged = true; - } - - var callback = opt.onchange; - if (typeof callback === 'string') { - callback = RED.actions.get(callback); - } - if (callback) { - callback.call(opt,value); - } - } - }); - }); - if (editorSettingsChanged) { - RED.settings.set('editor',currentEditorSettings); - } - - } - return { - init: init, - toggle: toggle, - show: show, - add: addPane - }; -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.projects = (function() { - - var dialog; - var dialogBody; - - var activeProject; - function reportUnexpectedError(error) { - var notification; - if (error.error === 'git_missing_user') { - notification = RED.notify("<p>"+RED._("projects.errors.no-username-email")+"</p>",{ - fixed: true, - type:'error', - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - notification.close(); - } - }, - { - text: RED._("projects.config-git"), - click: function() { - RED.userSettings.show('gitconfig'); - notification.close(); - } - } - ] - }) - } else { - console.log(error); - notification = RED.notify("<p>"+RED._("projects.errors.unexpected")+":</p><p>"+error.message+"</p><small>"+RED._("projects.errors.code")+": "+error.error+"</small>",{ - fixed: true, - modal: true, - type: 'error', - buttons: [ - { - text: RED._("common.label.close"), - click: function() { - notification.close(); - } - } - ] - }) - } - } - var screens = {}; - function initScreens() { - var migrateProjectHeader = $('<div class="projects-dialog-screen-start-hero"></div>'); - $('<span><i class="fa fa-files-o fa-2x"></i> &nbsp; &nbsp; <i class="fa fa-long-arrow-right fa-2x"></i> &nbsp; &nbsp; <i class="fa fa-archive fa-2x"></i></span>').appendTo(migrateProjectHeader) - $('<hr>').appendTo(migrateProjectHeader); - - var createProjectOptions = {}; - - screens = { - 'welcome': { - content: function(options) { - - var container = $('<div class="projects-dialog-screen-start"></div>'); - - migrateProjectHeader.appendTo(container); - - var body = $('<div class="projects-dialog-screen-start-body"></div>').appendTo(container); - $('<p>').text(RED._("projects.welcome.hello")).appendTo(body); - $('<p>').text(RED._("projects.welcome.desc0")).appendTo(body); - $('<p>').text(RED._("projects.welcome.desc1")).appendTo(body); - $('<p>').text(RED._("projects.welcome.desc2")).appendTo(body); - - var row = $('<div style="text-align: center"></div>').appendTo(body); - var createAsEmpty = $('<button data-type="empty" class="editor-button projects-dialog-screen-create-type"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-asterisk"></i><br/>'+RED._("projects.welcome.create")+'</button>').appendTo(row); - var createAsClone = $('<button data-type="clone" class="editor-button projects-dialog-screen-create-type"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.welcome.clone")+'</button>').appendTo(row); - - createAsEmpty.click(function(e) { - e.preventDefault(); - createProjectOptions = { - action: "create" - } - show('git-config'); - }) - - createAsClone.click(function(e) { - e.preventDefault(); - createProjectOptions = { - action: "clone" - } - show('git-config'); - }) - - return container; - }, - buttons: [ - { - // id: "clipboard-dialog-cancel", - text: RED._("projects.welcome.not-right-now"), - click: function() { - createProjectOptions = {}; - $( this ).dialog( "close" ); - } - } - ] - }, - 'git-config': (function() { - var gitUsernameInput; - var gitEmailInput; - return { - content: function(options) { - var isGlobalConfig = false; - var existingGitSettings = RED.settings.get('git'); - if (existingGitSettings && existingGitSettings.user) { - existingGitSettings = existingGitSettings.user; - } else if (RED.settings.git && RED.settings.git.globalUser) { - isGlobalConfig = true; - existingGitSettings = RED.settings.git.globalUser; - } - - var validateForm = function() { - var name = gitUsernameInput.val().trim(); - var email = gitEmailInput.val().trim(); - var valid = name.length > 0 && email.length > 0; - $("#projects-dialog-git-config").prop('disabled',!valid).toggleClass('disabled ui-button-disabled ui-state-disabled',!valid); - - } - - var container = $('<div class="projects-dialog-screen-start"></div>'); - migrateProjectHeader.appendTo(container); - var body = $('<div class="projects-dialog-screen-start-body"></div>').appendTo(container); - - $('<p>').text(RED._("projects.git-config.setup")).appendTo(body); - $('<p>').text(RED._("projects.git-config.desc0")).appendTo(body); - $('<p>').text(RED._("projects.git-config.desc1")).appendTo(body); - - if (isGlobalConfig) { - $('<p>').text(RED._("projects.git-config.desc2")).appendTo(body); - } - $('<p>').text(RED._("projects.git-config.desc3")).appendTo(body); - - var row = $('<div class="form-row"></div>').appendTo(body); - $('<label for="">'+RED._("projects.git-config.username")+'</label>').appendTo(row); - gitUsernameInput = $('<input type="text">').val((existingGitSettings&&existingGitSettings.name)||"").appendTo(row); - // $('<div style="position:relative;"></div>').text("This does not need to be your real name").appendTo(row); - gitUsernameInput.on("change keyup paste",validateForm); - - row = $('<div class="form-row"></div>').appendTo(body); - $('<label for="">'+RED._("projects.git-config.email")+'</label>').appendTo(row); - gitEmailInput = $('<input type="text">').val((existingGitSettings&&existingGitSettings.email)||"").appendTo(row); - gitEmailInput.on("change keyup paste",validateForm); - // $('<div style="position:relative;"></div>').text("Something something email").appendTo(row); - setTimeout(function() { - gitUsernameInput.focus(); - validateForm(); - },50); - return container; - }, - buttons: [ - { - // id: "clipboard-dialog-cancel", - text: RED._("common.label.back"), - click: function() { - show('welcome'); - } - }, - { - id: "projects-dialog-git-config", - text: RED._("common.label.next"), - class: "primary", - click: function() { - var currentGitSettings = RED.settings.get('git') || {}; - currentGitSettings.user = currentGitSettings.user || {}; - currentGitSettings.user.name = gitUsernameInput.val(); - currentGitSettings.user.email = gitEmailInput.val(); - RED.settings.set('git', currentGitSettings); - if (createProjectOptions.action === "create") { - show('project-details'); - } else if (createProjectOptions.action === "clone") { - show('clone-project'); - } - } - } - ] - }; - })(), - 'project-details': (function() { - var projectNameInput; - var projectSummaryInput; - return { - content: function(options) { - var projectList = null; - var projectNameValid; - - var pendingFormValidation = false; - $.getJSON("projects", function(data) { - projectList = {}; - data.projects.forEach(function(p) { - projectList[p] = true; - if (pendingFormValidation) { - pendingFormValidation = false; - validateForm(); - } - }) - }); - var container = $('<div class="projects-dialog-screen-start"></div>'); - migrateProjectHeader.appendTo(container); - var body = $('<div class="projects-dialog-screen-start-body"></div>').appendTo(container); - - $('<p>').text(RED._("projects.project-details.create")).appendTo(body); - $('<p>').text(RED._("projects.project-details.desc0")).appendTo(body); - $('<p>').text(RED._("projects.project-details.desc1")).appendTo(body); - $('<p>').text(RED._("projects.project-details.desc2")).appendTo(body); - - var validateForm = function() { - var projectName = projectNameInput.val(); - var valid = true; - if (projectNameInputChanged) { - if (projectList === null) { - pendingFormValidation = true; - return; - } - projectNameStatus.empty(); - if (!/^[a-zA-Z0-9\-_]+$/.test(projectName) || projectList[projectName]) { - projectNameInput.addClass("input-error"); - $('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>').appendTo(projectNameStatus); - projectNameValid = false; - valid = false; - if (projectList[projectName]) { - projectNameSublabel.text(RED._("projects.project-details.already-exists")); - } else { - projectNameSublabel.text(RED._("projects.project-details.must-contain")); - } - } else { - projectNameInput.removeClass("input-error"); - $('<i style="margin-top: 8px;" class="fa fa-check"></i>').appendTo(projectNameStatus); - projectNameSublabel.text(RED._("projects.project-details.must-contain")); - projectNameValid = true; - } - projectNameLastChecked = projectName; - } - valid = projectNameValid; - $("#projects-dialog-create-name").prop('disabled',!valid).toggleClass('disabled ui-button-disabled ui-state-disabled',!valid); - } - - var row = $('<div class="form-row"></div>').appendTo(body); - $('<label for="projects-dialog-screen-create-project-name">'+RED._("projects.project-details.project-name")+'</label>').appendTo(row); - - var subrow = $('<div style="position:relative;"></div>').appendTo(row); - projectNameInput = $('<input id="projects-dialog-screen-create-project-name" type="text"></input>').val(createProjectOptions.name||"").appendTo(subrow); - var projectNameStatus = $('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow); - - var projectNameInputChanged = false; - var projectNameLastChecked = ""; - var projectNameValid; - var checkProjectName; - var autoInsertedName = ""; - - - projectNameInput.on("change keyup paste",function() { - projectNameInputChanged = (projectNameInput.val() !== projectNameLastChecked); - if (checkProjectName) { - clearTimeout(checkProjectName); - } else if (projectNameInputChanged) { - projectNameStatus.empty(); - $('<img src="red/images/spin.svg"/>').appendTo(projectNameStatus); - if (projectNameInput.val() === '') { - validateForm(); - return; - } - } - checkProjectName = setTimeout(function() { - validateForm(); - checkProjectName = null; - },300) - }); - projectNameSublabel = $('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.project-details.must-contain")+'</small></label>').appendTo(row).find("small"); - - // Empty Project - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(body); - $('<label for="projects-dialog-screen-create-project-desc">'+RED._("projects.project-details.desc")+'</label>').appendTo(row); - projectSummaryInput = $('<input id="projects-dialog-screen-create-project-desc" type="text">').val(createProjectOptions.summary||"").appendTo(row); - $('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.project-details.opt")+'</small></label>').appendTo(row); - - setTimeout(function() { - projectNameInput.focus(); - projectNameInput.change(); - },50); - return container; - }, - buttons: function(options) { - return [ - { - text: RED._("common.label.back"), - click: function() { - show('git-config'); - } - }, - { - id: "projects-dialog-create-name", - disabled: true, - text: RED._("common.label.next"), - class: "primary disabled", - click: function() { - createProjectOptions.name = projectNameInput.val(); - createProjectOptions.summary = projectSummaryInput.val(); - show('default-files', options); - } - } - ] - } - }; - })(), - 'clone-project': (function() { - var projectNameInput; - var projectSummaryInput; - var projectFlowFileInput; - var projectSecretInput; - var projectSecretSelect; - var copyProject; - var projectRepoInput; - var projectCloneSecret; - var emptyProjectCredentialInput; - var projectRepoUserInput; - var projectRepoPasswordInput; - var projectNameSublabel; - var projectRepoSSHKeySelect; - var projectRepoPassphrase; - var projectRepoRemoteName - var projectRepoBranch; - var selectedProject; - - return { - content: function(options) { - var container = $('<div class="projects-dialog-screen-start"></div>'); - migrateProjectHeader.appendTo(container); - var body = $('<div class="projects-dialog-screen-start-body"></div>').appendTo(container); - $('<p>').text(RED._("projects.clone-project.clone")).appendTo(body); - $('<p>').text(RED._("projects.clone-project.desc0")).appendTo(body); - - var projectList = null; - var pendingFormValidation = false; - $.getJSON("projects", function(data) { - projectList = {}; - data.projects.forEach(function(p) { - projectList[p] = true; - if (pendingFormValidation) { - pendingFormValidation = false; - validateForm(); - } - }) - }); - - - var validateForm = function() { - var projectName = projectNameInput.val(); - var valid = true; - if (projectNameInputChanged) { - if (projectList === null) { - pendingFormValidation = true; - return; - } - projectNameStatus.empty(); - if (!/^[a-zA-Z0-9\-_]+$/.test(projectName) || projectList[projectName]) { - projectNameInput.addClass("input-error"); - $('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>').appendTo(projectNameStatus); - projectNameValid = false; - valid = false; - if (projectList[projectName]) { - projectNameSublabel.text(RED._("projects.clone-project.already-exists")); - } else { - projectNameSublabel.text(RED._("projects.clone-project.must-contain")); - } - } else { - projectNameInput.removeClass("input-error"); - $('<i style="margin-top: 8px;" class="fa fa-check"></i>').appendTo(projectNameStatus); - projectNameSublabel.text(RED._("projects.clone-project.must-contain")); - projectNameValid = true; - } - projectNameLastChecked = projectName; - } - valid = projectNameValid; - - var repo = projectRepoInput.val(); - - // var validRepo = /^(?:file|git|ssh|https?|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+(?:\/?|\#[\d\w\.\-_]+?)$/.test(repo); - var validRepo = repo.length > 0 && !/\s/.test(repo); - if (/^https?:\/\/[^/]+@/i.test(repo)) { - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.no-info-in-url")); - validRepo = false; - } - if (!validRepo) { - if (projectRepoChanged) { - projectRepoInput.addClass("input-error"); - } - valid = false; - } else { - projectRepoInput.removeClass("input-error"); - } - if (/^https?:\/\//.test(repo)) { - $(".projects-dialog-screen-create-row-creds").show(); - $(".projects-dialog-screen-create-row-sshkey").hide(); - } else if (/^(?:ssh|[\S]+?@[\S]+?):(?:\/\/)?/.test(repo)) { - $(".projects-dialog-screen-create-row-creds").hide(); - $(".projects-dialog-screen-create-row-sshkey").show(); - // if ( !getSelectedSSHKey(projectRepoSSHKeySelect) ) { - // valid = false; - // } - } else { - $(".projects-dialog-screen-create-row-creds").hide(); - $(".projects-dialog-screen-create-row-sshkey").hide(); - } - - $("#projects-dialog-clone-project").prop('disabled',!valid).toggleClass('disabled ui-button-disabled ui-state-disabled',!valid); - } - - var row; - - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty projects-dialog-screen-create-row-clone"></div>').appendTo(body); - $('<label for="projects-dialog-screen-create-project-name">'+RED._("projects.clone-project.project-name")+'</label>').appendTo(row); - - var subrow = $('<div style="position:relative;"></div>').appendTo(row); - projectNameInput = $('<input id="projects-dialog-screen-create-project-name" type="text"></input>').appendTo(subrow); - var projectNameStatus = $('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow); - - var projectNameInputChanged = false; - var projectNameLastChecked = ""; - var projectNameValid; - var checkProjectName; - var autoInsertedName = ""; - - - projectNameInput.on("change keyup paste",function() { - projectNameInputChanged = (projectNameInput.val() !== projectNameLastChecked); - if (checkProjectName) { - clearTimeout(checkProjectName); - } else if (projectNameInputChanged) { - projectNameStatus.empty(); - $('<img src="red/images/spin.svg"/>').appendTo(projectNameStatus); - if (projectNameInput.val() === '') { - validateForm(); - return; - } - } - checkProjectName = setTimeout(function() { - validateForm(); - checkProjectName = null; - },300) - }); - projectNameSublabel = $('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.clone-project.must-contain")+'</small></label>').appendTo(row).find("small"); - - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(body); - $('<label for="projects-dialog-screen-create-project-repo">'+RED._("projects.clone-project.git-url")+'</label>').appendTo(row); - projectRepoInput = $('<input id="projects-dialog-screen-create-project-repo" type="text" placeholder="https://git.example.com/path/my-project.git"></input>').appendTo(row); - $('<label id="projects-dialog-screen-create-project-repo-label" class="projects-edit-form-sublabel"><small>'+RED._("projects.clone-project.protocols")+'</small></label>').appendTo(row); - var projectRepoChanged = false; - var lastProjectRepo = ""; - projectRepoInput.on("change keyup paste",function() { - projectRepoChanged = true; - var repo = $(this).val(); - if (lastProjectRepo !== repo) { - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.protocols")); - } - lastProjectRepo = repo; - - var m = /\/([^/]+?)(?:\.git)?$/.exec(repo); - if (m) { - var projectName = projectNameInput.val(); - if (projectName === "" || projectName === autoInsertedName) { - autoInsertedName = m[1]; - projectNameInput.val(autoInsertedName); - projectNameInput.change(); - } - } - validateForm(); - }); - - var cloneAuthRows = $('<div class="projects-dialog-screen-create-row"></div>').appendTo(body); - row = $('<div class="form-row projects-dialog-screen-create-row-auth-error"></div>').hide().appendTo(cloneAuthRows); - $('<div><i class="fa fa-warning"></i> '+RED._("projects.clone-project.auth-failed")+'</div>').appendTo(row); - - // Repo credentials - username/password ---------------- - row = $('<div class="hide form-row projects-dialog-screen-create-row-creds"></div>').hide().appendTo(cloneAuthRows); - - var subrow = $('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-user">'+RED._("projects.clone-project.username")+'</label>').appendTo(subrow); - projectRepoUserInput = $('<input id="projects-dialog-screen-create-project-repo-user" type="text"></input>').appendTo(subrow); - - subrow = $('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-pass">'+RED._("projects.clone-project.passwd")+'</label>').appendTo(subrow); - projectRepoPasswordInput = $('<input id="projects-dialog-screen-create-project-repo-pass" type="password"></input>').appendTo(subrow); - // ----------------------------------------------------- - - // Repo credentials - key/passphrase ------------------- - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').hide().appendTo(cloneAuthRows); - subrow = $('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.clone-project.ssh-key")+'</label>').appendTo(subrow); - projectRepoSSHKeySelect = $("<select>",{style:"width: 100%"}).appendTo(subrow); - - $.getJSON("settings/user/keys", function(data) { - var count = 0; - data.keys.forEach(function(key) { - projectRepoSSHKeySelect.append($("<option></option>").val(key.name).text(key.name)); - count++; - }); - if (count === 0) { - projectRepoSSHKeySelect.addClass("input-error"); - projectRepoSSHKeySelect.attr("disabled",true); - sshwarningRow.show(); - } else { - projectRepoSSHKeySelect.removeClass("input-error"); - projectRepoSSHKeySelect.attr("disabled",false); - sshwarningRow.hide(); - } - }); - subrow = $('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.clone-project.passphrase")+'</label>').appendTo(subrow); - projectRepoPassphrase = $('<input id="projects-dialog-screen-create-project-repo-passphrase" type="password"></input>').appendTo(subrow); - - subrow = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').appendTo(cloneAuthRows); - var sshwarningRow = $('<div class="projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(subrow); - $('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.clone-project.ssh-key-desc")+'</div>').appendTo(sshwarningRow); - subrow = $('<div style="text-align: center">').appendTo(sshwarningRow); - $('<button class="editor-button">'+RED._("projects.clone-project.ssh-key-add")+'</button>').appendTo(subrow).click(function(e) { - e.preventDefault(); - $('#projects-dialog-cancel').click(); - RED.userSettings.show('gitconfig'); - setTimeout(function() { - $("#user-settings-gitconfig-add-key").click(); - },500); - }); - // ----------------------------------------------------- - - - // Secret - clone - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(body); - $('<label>'+RED._("projects.clone-project.credential-key")+'</label>').appendTo(row); - projectSecretInput = $('<input type="password"></input>').appendTo(row); - - - - return container; - }, - buttons: function(options) { - return [ - { - text: RED._("common.label.back"), - click: function() { - show('git-config'); - } - }, - { - id: "projects-dialog-clone-project", - disabled: true, - text: RED._("common.label.clone"), - class: "primary disabled", - click: function() { - var projectType = $(".projects-dialog-screen-create-type.selected").data('type'); - var projectData = { - name: projectNameInput.val(), - } - projectData.credentialSecret = projectSecretInput.val(); - var repoUrl = projectRepoInput.val(); - var metaData = {}; - if (/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(repoUrl)) { - var selected = projectRepoSSHKeySelect.val();//false;//getSelectedSSHKey(projectRepoSSHKeySelect); - if ( selected ) { - projectData.git = { - remotes: { - 'origin': { - url: repoUrl, - keyFile: selected, - passphrase: projectRepoPassphrase.val() - } - } - }; - } - else { - console.log(RED._("projects.clone-project.cant-get-ssh-key")); - return; - } - } - else { - projectData.git = { - remotes: { - 'origin': { - url: repoUrl, - username: projectRepoUserInput.val(), - password: projectRepoPasswordInput.val() - } - } - }; - } - - $(".projects-dialog-screen-create-row-auth-error").hide(); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.protocols")); - - projectRepoUserInput.removeClass("input-error"); - projectRepoPasswordInput.removeClass("input-error"); - projectRepoSSHKeySelect.removeClass("input-error"); - projectRepoPassphrase.removeClass("input-error"); - - RED.deploy.setDeployInflight(true); - RED.projects.settings.switchProject(projectData.name); - - sendRequest({ - url: "projects", - type: "POST", - handleAuthFail: false, - responses: { - 200: function(data) { - dialog.dialog( "close" ); - }, - 400: { - 'project_exists': function(error) { - console.log(RED._("projects.clone-project.already-exists2")); - }, - 'git_error': function(error) { - console.log(RED._("projects.clone-project.git-error"),error); - }, - 'git_connection_failed': function(error) { - projectRepoInput.addClass("input-error"); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.connection-failed")); - }, - 'git_not_a_repository': function(error) { - projectRepoInput.addClass("input-error"); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.not-git-repo")); - }, - 'git_repository_not_found': function(error) { - projectRepoInput.addClass("input-error"); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.repo-not-found")); - }, - 'git_auth_failed': function(error) { - $(".projects-dialog-screen-create-row-auth-error").show(); - - projectRepoUserInput.addClass("input-error"); - projectRepoPasswordInput.addClass("input-error"); - // getRepoAuthDetails(req); - projectRepoSSHKeySelect.addClass("input-error"); - projectRepoPassphrase.addClass("input-error"); - }, - 'missing_flow_file': function(error) { - // This is handled via a runtime notification. - dialog.dialog("close"); - }, - 'project_empty': function(error) { - // This is handled via a runtime notification. - dialog.dialog("close"); - }, - 'credentials_load_failed': function(error) { - // This is handled via a runtime notification. - dialog.dialog("close"); - }, - '*': function(error) { - reportUnexpectedError(error); - $( dialog ).dialog( "close" ); - } - } - } - },projectData).then(function() { - RED.events.emit("project:change", {name:name}); - }).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }) - - } - } - ] - } - } - })(), - 'default-files': (function() { - var projectFlowFileInput; - var projectCredentialFileInput; - return { - content: function(options) { - var container = $('<div class="projects-dialog-screen-start"></div>'); - migrateProjectHeader.appendTo(container); - var body = $('<div class="projects-dialog-screen-start-body"></div>').appendTo(container); - - $('<p>').text(RED._("projects.default-files.create")).appendTo(body); - $('<p>').text(RED._("projects.default-files.desc0")).appendTo(body); - $('<p>').text(RED._("projects.default-files.desc1")).appendTo(body); - if (!options.existingProject && RED.settings.files) { - $('<p>').text(RED._("projects.default-files.desc2")).appendTo(body); - } - - var validateForm = function() { - var valid = true; - var flowFile = projectFlowFileInput.val(); - if (flowFile === "" || !/\.json$/.test(flowFile)) { - valid = false; - if (!projectFlowFileInput.hasClass("input-error")) { - projectFlowFileInput.addClass("input-error"); - projectFlowFileInput.next().empty().append('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>'); - } - projectCredentialFileInput.text(""); - if (!projectCredentialFileInput.hasClass("input-error")) { - projectCredentialFileInput.addClass("input-error"); - projectCredentialFileInput.next().empty().append('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>'); - } - } else { - if (projectFlowFileInput.hasClass("input-error")) { - projectFlowFileInput.removeClass("input-error"); - projectFlowFileInput.next().empty(); - } - if (projectCredentialFileInput.hasClass("input-error")) { - projectCredentialFileInput.removeClass("input-error"); - projectCredentialFileInput.next().empty(); - } - projectCredentialFileInput.text(flowFile.substring(0,flowFile.length-5)+"_cred.json"); - } - $("#projects-dialog-create-default-files").prop('disabled',!valid).toggleClass('disabled ui-button-disabled ui-state-disabled',!valid); - } - var row = $('<div class="form-row"></div>').appendTo(body); - $('<label for="projects-dialog-screen-create-project-file">'+RED._("projects.default-files.flow-file")+'</label>').appendTo(row); - var subrow = $('<div style="position:relative;"></div>').appendTo(row); - var defaultFlowFile = (createProjectOptions.files &&createProjectOptions.files.flow) || (RED.settings.files && RED.settings.files.flow)||"flow.json"; - projectFlowFileInput = $('<input id="projects-dialog-screen-create-project-file" type="text">').val(defaultFlowFile) - .on("change keyup paste",validateForm) - .appendTo(subrow); - $('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow); - $('<label class="projects-edit-form-sublabel"><small>*.json</small></label>').appendTo(row); - - var defaultCredentialsFile = (createProjectOptions.files &&createProjectOptions.files.credentials) || (RED.settings.files && RED.settings.files.credentials)||"flow_cred.json"; - row = $('<div class="form-row"></div>').appendTo(body); - $('<label for="projects-dialog-screen-create-project-credfile">'+RED._("projects.default-files.credentials-file")+'</label>').appendTo(row); - subrow = $('<div style="position:relative;"></div>').appendTo(row); - projectCredentialFileInput = $('<div style="width: 100%" class="uneditable-input" id="projects-dialog-screen-create-project-credentials">').text(defaultCredentialsFile) - .appendTo(subrow); - $('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow); - - setTimeout(function() { - projectFlowFileInput.focus(); - validateForm(); - },50); - - return container; - }, - buttons: function(options) { - return [ - { - // id: "clipboard-dialog-cancel", - text: RED._(options.existingProject ? "common.label.cancel": "common.label.back"), - click: function() { - if (options.existingProject) { - $(this).dialog('close'); - } else { - show('project-details',options); - } - } - }, - { - id: "projects-dialog-create-default-files", - text: RED._("common.label.next"), - class: "primary", - click: function() { - createProjectOptions.files = { - flow: projectFlowFileInput.val(), - credentials: projectCredentialFileInput.text() - } - if (!options.existingProject) { - createProjectOptions.migrateFiles = true; - } - show('encryption-config',options); - } - } - ] - } - } - })(), - 'encryption-config': (function() { - var emptyProjectCredentialInput; - return { - content: function(options) { - - var container = $('<div class="projects-dialog-screen-start"></div>'); - migrateProjectHeader.appendTo(container); - var body = $('<div class="projects-dialog-screen-start-body"></div>').appendTo(container); - - $('<p>').text(RED._("projects.encryption-config.setup")).appendTo(body); - if (options.existingProject) { - $('<p>').text(RED._("projects.encryption-config.desc0")).appendTo(body); - $('<p>').text(RED._("projects.encryption-config.desc1")).appendTo(body); - } else { - if (RED.settings.flowEncryptionType === 'disabled') { - $('<p>').text(RED._("projects.encryption-config.desc2")).appendTo(body); - $('<p>').text(RED._("projects.encryption-config.desc3")).appendTo(body); - $('<p>').text(RED._("projects.encryption-config.desc4")).appendTo(body); - } else { - if (RED.settings.flowEncryptionType === 'user') { - $('<p>').text(RED._("projects.encryption-config.desc5")).appendTo(body); - } else if (RED.settings.flowEncryptionType === 'system') { - $('<p>').text(RED._("projects.encryption-config.desc6")).appendTo(body); - } - $('<p>').text(RED._("projects.encryption-config.desc7")).appendTo(body); - } - } - - // var row = $('<div class="form-row"></div>').appendTo(body); - // $('<label for="">Username</label>').appendTo(row); - // var gitUsernameInput = $('<input type="text">').val(currentGitSettings.user.name||"").appendTo(row); - // // $('<div style="position:relative;"></div>').text("This does not need to be your real name").appendTo(row); - // - // row = $('<div class="form-row"></div>').appendTo(body); - // $('<label for="">Email</label>').appendTo(row); - // var gitEmailInput = $('<input type="text">').val(currentGitSettings.user.email||"").appendTo(row); - // // $('<div style="position:relative;"></div>').text("Something something email").appendTo(row); - - var validateForm = function() { - var valid = true; - var encryptionState = $("input[name=projects-encryption-type]:checked").val(); - if (encryptionState === 'enabled') { - var encryptionKeyType = $("input[name=projects-encryption-key]:checked").val(); - if (encryptionKeyType === 'custom') { - valid = valid && emptyProjectCredentialInput.val()!==''; - } - } - $("#projects-dialog-create-encryption").prop('disabled',!valid).toggleClass('disabled ui-button-disabled ui-state-disabled',!valid); - } - - - var row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(body); - $('<label>'+RED._("projects.encryption-config.credentials")+'</label>').appendTo(row); - - var credentialsBox = $('<div style="width: 550px">').appendTo(row); - var credentialsRightBox = $('<div style="min-height:150px; box-sizing: border-box; float: right; vertical-align: top; width: 331px; margin-left: -1px; padding: 15px; margin-top: -15px; border: 1px solid #ccc; border-radius: 3px; display: inline-block">').appendTo(credentialsBox); - var credentialsLeftBox = $('<div style="vertical-align: top; width: 220px; display: inline-block">').appendTo(credentialsBox); - - var credentialsEnabledBox = $('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid #ccc;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: white;"></div>').appendTo(credentialsLeftBox); - $('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="enabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-lock"></i> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.enable")+'</span></label>').appendTo(credentialsEnabledBox); - var credentialsDisabledBox = $('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid white;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: #ccc; "></div>').appendTo(credentialsLeftBox); - $('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="disabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-unlock"></i> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.disable")+'</span></label>').appendTo(credentialsDisabledBox); - - credentialsLeftBox.find("input[name=projects-encryption-type]").click(function(e) { - var val = $(this).val(); - var toEnable; - var toDisable; - if (val === 'enabled') { - toEnable = credentialsEnabledBox; - toDisable = credentialsDisabledBox; - $(".projects-encryption-enabled-row").show(); - $(".projects-encryption-disabled-row").hide(); - if ($("input[name=projects-encryption-key]:checked").val() === 'custom') { - emptyProjectCredentialInput.focus(); - } - - } else { - toDisable = credentialsEnabledBox; - toEnable = credentialsDisabledBox; - $(".projects-encryption-enabled-row").hide(); - $(".projects-encryption-disabled-row").show(); - } - - toEnable.css({ - borderColor: "#ccc", - borderRightColor: "white" - }); - toDisable.css({ - borderColor: "white", - borderRightColor: "#ccc" - }); - - validateForm(); - }) - - row = $('<div class="form-row projects-encryption-enabled-row"></div>').appendTo(credentialsRightBox); - $('<label class="projects-edit-form-inline-label '+((RED.settings.flowEncryptionType !== 'user')?'disabled':'')+'" style="margin-left: 5px"><input '+((RED.settings.flowEncryptionType !== 'user')?RED._("projects.encryption-config.disabled"):'')+' type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" value="default" name="projects-encryption-key"> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.copy")+'</span></label>').appendTo(row); - row = $('<div class="form-row projects-encryption-enabled-row"></div>').appendTo(credentialsRightBox); - $('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" value="custom" name="projects-encryption-key"> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.use-custom")+'</span></label>').appendTo(row); - row = $('<div class="projects-encryption-enabled-row"></div>').appendTo(credentialsRightBox); - emptyProjectCredentialInput = $('<input disabled type="password" style="margin-left: 25px; width: calc(100% - 30px);"></input>').appendTo(row); - emptyProjectCredentialInput.on("change keyup paste", validateForm); - - row = $('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(credentialsRightBox); - $('<div class="" style="padding: 5px 20px;"><i class="fa fa-warning"></i> '+RED._("projects.encryption-config.desc8")+'</div>').appendTo(row); - - credentialsRightBox.find("input[name=projects-encryption-key]").click(function() { - var val = $(this).val(); - emptyProjectCredentialInput.attr("disabled",val === 'default'); - if (val === "custom") { - emptyProjectCredentialInput.focus(); - } - validateForm(); - }); - - setTimeout(function() { - credentialsLeftBox.find("input[name=projects-encryption-type][value=enabled]").click(); - if (RED.settings.flowEncryptionType !== 'user') { - credentialsRightBox.find("input[name=projects-encryption-key][value=custom]").click(); - } else { - credentialsRightBox.find("input[name=projects-encryption-key][value=default]").click(); - } - validateForm(); - },100); - - return container; - }, - buttons: function(options) { - return [ - { - // id: "clipboard-dialog-cancel", - text: RED._("common.label.back"), - click: function() { - show('default-files',options); - } - }, - { - id: "projects-dialog-create-encryption", - text: RED._(options.existingProject?"projects.encryption-config.create-project-files":"projects.encryption-config.create-project"), - class: "primary disabled", - disabled: true, - click: function() { - var encryptionState = $("input[name=projects-encryption-type]:checked").val(); - if (encryptionState === 'enabled') { - var encryptionKeyType = $("input[name=projects-encryption-key]:checked").val(); - if (encryptionKeyType === 'custom') { - createProjectOptions.credentialSecret = emptyProjectCredentialInput.val(); - } else { - // If 'use existing', leave createProjectOptions.credentialSecret blank - // - that will trigger it to use the existing key - // TODO: this option should be disabled if encryption is disabled - } - } else { - // Disabled encryption by explicitly setting credSec to false - createProjectOptions.credentialSecret = false; - } - RED.deploy.setDeployInflight(true); - RED.projects.settings.switchProject(createProjectOptions.name); - - var method = "POST"; - var url = "projects"; - - if (options.existingProject) { - createProjectOptions.initialise = true; - method = "PUT"; - url = "projects/"+activeProject.name; - } - var self = this; - sendRequest({ - url: url, - type: method, - requireCleanWorkspace: true, - handleAuthFail: false, - responses: { - 200: function(data) { - createProjectOptions = {}; - if (options.existingProject) { - $( self ).dialog( "close" ); - } else { - show('create-success'); - RED.menu.setDisabled('menu-item-projects-open',false); - RED.menu.setDisabled('menu-item-projects-settings',false); - } - }, - 400: { - 'project_exists': function(error) { - console.log(RED._("projects.encryption-config.already-exists")); - }, - 'git_error': function(error) { - console.log(RED._("projects.encryption-config.git-error"),error); - }, - 'git_connection_failed': function(error) { - projectRepoInput.addClass("input-error"); - }, - 'git_auth_failed': function(error) { - projectRepoUserInput.addClass("input-error"); - projectRepoPasswordInput.addClass("input-error"); - // getRepoAuthDetails(req); - console.log(RED._("projects.encryption-config.git-auth-error"),error); - }, - '*': function(error) { - reportUnexpectedError(error); - $( dialog ).dialog( "close" ); - } - } - } - },createProjectOptions).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }) - } - } - ]; - } - } - })(), - 'create-success': { - content: function(options) { - - var container = $('<div class="projects-dialog-screen-start"></div>'); - migrateProjectHeader.appendTo(container); - var body = $('<div class="projects-dialog-screen-start-body"></div>').appendTo(container); - - $('<p>').text(RED._("projects.create-success.success")).appendTo(body); - $('<p>').text(RED._("projects.create-success.desc0")).appendTo(body); - $('<p>').text(RED._("projects.create-success.desc1")).appendTo(body); - $('<p>').text(RED._("projects.create-success.desc2")).appendTo(body); - - return container; - }, - buttons: [ - { - text: RED._("common.label.done"), - click: function() { - $( this ).dialog( "close" ); - } - } - ] - }, - 'create': (function() { - var projectNameInput; - var projectSummaryInput; - var projectFlowFileInput; - var projectSecretInput; - var projectSecretSelect; - var copyProject; - var projectRepoInput; - var projectCloneSecret; - var emptyProjectCredentialInput; - var projectRepoUserInput; - var projectRepoPasswordInput; - var projectNameSublabel; - var projectRepoSSHKeySelect; - var projectRepoPassphrase; - var projectRepoRemoteName - var projectRepoBranch; - var selectedProject; - - return { - title: RED._("projects.create.projects"), - content: function(options) { - var projectList = null; - selectedProject = null; - var pendingFormValidation = false; - $.getJSON("projects", function(data) { - projectList = {}; - data.projects.forEach(function(p) { - projectList[p] = true; - if (pendingFormValidation) { - pendingFormValidation = false; - validateForm(); - } - }) - }); - - var container = $('<div class="projects-dialog-screen-create"></div>'); - var row; - - var validateForm = function() { - var projectName = projectNameInput.val(); - var valid = true; - if (projectNameInputChanged) { - if (projectList === null) { - pendingFormValidation = true; - return; - } - projectNameStatus.empty(); - if (!/^[a-zA-Z0-9\-_]+$/.test(projectName) || projectList[projectName]) { - projectNameInput.addClass("input-error"); - $('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>').appendTo(projectNameStatus); - projectNameValid = false; - valid = false; - if (projectList[projectName]) { - projectNameSublabel.text(RED._("projects.create.already-exists")); - } else { - projectNameSublabel.text(RED._("projects.create.must-contain")); - } - } else { - projectNameInput.removeClass("input-error"); - $('<i style="margin-top: 8px;" class="fa fa-check"></i>').appendTo(projectNameStatus); - projectNameSublabel.text(RED._("projects.create.must-contain")); - projectNameValid = true; - } - projectNameLastChecked = projectName; - } - valid = projectNameValid; - - var projectType = $(".projects-dialog-screen-create-type.selected").data('type'); - if (projectType === 'copy') { - if (!copyProject) { - valid = false; - } - } else if (projectType === 'clone') { - var repo = projectRepoInput.val(); - - // var validRepo = /^(?:file|git|ssh|https?|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+(?:\/?|\#[\d\w\.\-_]+?)$/.test(repo); - var validRepo = repo.length > 0 && !/\s/.test(repo); - if (/^https?:\/\/[^/]+@/i.test(repo)) { - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.no-info-in-url")); - validRepo = false; - } - if (!validRepo) { - if (projectRepoChanged) { - projectRepoInput.addClass("input-error"); - } - valid = false; - } else { - projectRepoInput.removeClass("input-error"); - } - if (/^https?:\/\//.test(repo)) { - $(".projects-dialog-screen-create-row-creds").show(); - $(".projects-dialog-screen-create-row-sshkey").hide(); - } else if (/^(?:ssh|[\S]+?@[\S]+?):(?:\/\/)?/.test(repo)) { - $(".projects-dialog-screen-create-row-creds").hide(); - $(".projects-dialog-screen-create-row-sshkey").show(); - // if ( !getSelectedSSHKey(projectRepoSSHKeySelect) ) { - // valid = false; - // } - } else { - $(".projects-dialog-screen-create-row-creds").hide(); - $(".projects-dialog-screen-create-row-sshkey").hide(); - } - - - } else if (projectType === 'empty') { - var flowFile = projectFlowFileInput.val(); - if (flowFile === "" || !/\.json$/.test(flowFile)) { - valid = false; - if (!projectFlowFileInput.hasClass("input-error")) { - projectFlowFileInput.addClass("input-error"); - projectFlowFileInput.next().empty().append('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>'); - } - } else { - if (projectFlowFileInput.hasClass("input-error")) { - projectFlowFileInput.removeClass("input-error"); - projectFlowFileInput.next().empty(); - } - } - - var encryptionState = $("input[name=projects-encryption-type]:checked").val(); - if (encryptionState === 'enabled') { - var encryptionKeyType = $("input[name=projects-encryption-key]:checked").val(); - if (encryptionKeyType === 'custom') { - valid = valid && emptyProjectCredentialInput.val()!=='' - } - } - } else if (projectType === 'open') { - valid = !!selectedProject; - } - - $("#projects-dialog-create").prop('disabled',!valid).toggleClass('disabled ui-button-disabled ui-state-disabled',!valid); - } - - row = $('<div class="form-row button-group"></div>').appendTo(container); - - var openProject = $('<button data-type="open" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-folder-open"></i><br/>'+RED._("projects.create.open")+'</button>').appendTo(row); - var createAsEmpty = $('<button data-type="empty" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-asterisk"></i><br/>'+RED._("projects.create.create")+'</button>').appendTo(row); - // var createAsCopy = $('<button data-type="copy" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i class="fa fa-long-arrow-right fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Copy existing</button>').appendTo(row); - var createAsClone = $('<button data-type="clone" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.create.clone")+'</button>').appendTo(row); - // var createAsClone = $('<button data-type="clone" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-git fa-2x"></i><i class="fa fa-arrows-h fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Clone Repository</button>').appendTo(row); - row.find(".projects-dialog-screen-create-type").click(function(evt) { - evt.preventDefault(); - container.find(".projects-dialog-screen-create-type").removeClass('selected'); - $(this).addClass('selected'); - container.find(".projects-dialog-screen-create-row").hide(); - container.find(".projects-dialog-screen-create-row-"+$(this).data('type')).show(); - validateForm(); - projectNameInput.focus(); - switch ($(this).data('type')) { - case "open": $("#projects-dialog-create").text(RED._("projects.create.open")); break; - case "empty": $("#projects-dialog-create").text(RED._("projects.create.create")); break; - case "clone": $("#projects-dialog-create").text(RED._("projects.create.clone")); break; - } - }) - - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-open"></div>').hide().appendTo(container); - createProjectList({ - canSelectActive: false, - dblclick: function(project) { - selectedProject = project; - $("#projects-dialog-create").click(); - }, - select: function(project) { - selectedProject = project; - validateForm(); - }, - delete: function(project) { - if (projectList) { - delete projectList[project.name]; - } - selectedProject = null; - - validateForm(); - } - }).appendTo(row); - - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty projects-dialog-screen-create-row-clone"></div>').appendTo(container); - $('<label for="projects-dialog-screen-create-project-name">'+RED._("projects.create.project-name")+'</label>').appendTo(row); - - var subrow = $('<div style="position:relative;"></div>').appendTo(row); - projectNameInput = $('<input id="projects-dialog-screen-create-project-name" type="text"></input>').appendTo(subrow); - var projectNameStatus = $('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow); - - var projectNameInputChanged = false; - var projectNameLastChecked = ""; - var projectNameValid; - var checkProjectName; - var autoInsertedName = ""; - - - projectNameInput.on("change keyup paste",function() { - projectNameInputChanged = (projectNameInput.val() !== projectNameLastChecked); - if (checkProjectName) { - clearTimeout(checkProjectName); - } else if (projectNameInputChanged) { - projectNameStatus.empty(); - $('<img src="red/images/spin.svg"/>').appendTo(projectNameStatus); - if (projectNameInput.val() === '') { - validateForm(); - return; - } - } - checkProjectName = setTimeout(function() { - validateForm(); - checkProjectName = null; - },300) - }); - projectNameSublabel = $('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.create.must-contain")+'</small></label>').appendTo(row).find("small"); - - // Empty Project - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(container); - $('<label for="projects-dialog-screen-create-project-desc">'+RED._("projects.create.desc")+'</label>').appendTo(row); - projectSummaryInput = $('<input id="projects-dialog-screen-create-project-desc" type="text">').appendTo(row); - $('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.create.opt")+'</small></label>').appendTo(row); - - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(container); - $('<label for="projects-dialog-screen-create-project-file">'+RED._("projects.create.flow-file")+'</label>').appendTo(row); - subrow = $('<div style="position:relative;"></div>').appendTo(row); - projectFlowFileInput = $('<input id="projects-dialog-screen-create-project-file" type="text">').val("flow.json") - .on("change keyup paste",validateForm) - .appendTo(subrow); - $('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow); - $('<label class="projects-edit-form-sublabel"><small>*.json</small></label>').appendTo(row); - - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(container); - $('<label>'+RED._("projects.create.credentials")+'</label>').appendTo(row); - - var credentialsBox = $('<div style="width: 550px">').appendTo(row); - var credentialsRightBox = $('<div style="min-height:150px; box-sizing: border-box; float: right; vertical-align: top; width: 331px; margin-left: -1px; padding: 15px; margin-top: -15px; border: 1px solid #ccc; border-radius: 3px; display: inline-block">').appendTo(credentialsBox); - var credentialsLeftBox = $('<div style="vertical-align: top; width: 220px; display: inline-block">').appendTo(credentialsBox); - - var credentialsEnabledBox = $('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid #ccc;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: white;"></div>').appendTo(credentialsLeftBox); - $('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" checked style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="enabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-lock"></i> <span style="vertical-align: middle;">'+RED._("projects.create.enable-encryption")+'</span></label>').appendTo(credentialsEnabledBox); - var credentialsDisabledBox = $('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid white;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: #ccc; "></div>').appendTo(credentialsLeftBox); - $('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="disabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-unlock"></i> <span style="vertical-align: middle;">'+RED._("projects.create.disable-encryption")+'</span></label>').appendTo(credentialsDisabledBox); - - credentialsLeftBox.find("input[name=projects-encryption-type]").click(function(e) { - var val = $(this).val(); - var toEnable; - var toDisable; - if (val === 'enabled') { - toEnable = credentialsEnabledBox; - toDisable = credentialsDisabledBox; - $(".projects-encryption-enabled-row").show(); - $(".projects-encryption-disabled-row").hide(); - if ($("input[name=projects-encryption-key]:checked").val() === 'custom') { - emptyProjectCredentialInput.focus(); - } - } else { - toDisable = credentialsEnabledBox; - toEnable = credentialsDisabledBox; - $(".projects-encryption-enabled-row").hide(); - $(".projects-encryption-disabled-row").show(); - - } - - toEnable.css({ - borderColor: "#ccc", - borderRightColor: "white" - }); - toDisable.css({ - borderColor: "white", - borderRightColor: "#ccc" - }) - validateForm(); - }) - - row = $('<div class="form-row projects-encryption-enabled-row"></div>').appendTo(credentialsRightBox); - $('<label class="projects-edit-form-inline-label">'+RED._("projects.create.encryption-key")+'</label>').appendTo(row); - // row = $('<div class="projects-encryption-enabled-row"></div>').appendTo(credentialsRightBox); - emptyProjectCredentialInput = $('<input type="password"></input>').appendTo(row); - emptyProjectCredentialInput.on("change keyup paste", validateForm); - $('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.create.desc0")+'</small></label>').appendTo(row); - - - row = $('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(credentialsRightBox); - $('<div class="" style="padding: 5px 20px;"><i class="fa fa-warning"></i> '+RED._("projects.create.desc1")+'</div>').appendTo(row); - - credentialsRightBox.find("input[name=projects-encryption-key]").click(function() { - var val = $(this).val(); - emptyProjectCredentialInput.attr("disabled",val === 'default'); - if (val === "custom") { - emptyProjectCredentialInput.focus(); - } - validateForm(); - }) - - // Clone Project - row = $('<div class="hide form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(container); - $('<label for="projects-dialog-screen-create-project-repo">'+RED._("projects.create.git-url")+'</label>').appendTo(row); - projectRepoInput = $('<input id="projects-dialog-screen-create-project-repo" type="text" placeholder="https://git.example.com/path/my-project.git"></input>').appendTo(row); - $('<label id="projects-dialog-screen-create-project-repo-label" class="projects-edit-form-sublabel"><small>'+RED._("projects.create.protocols")+'</small></label>').appendTo(row); - - var projectRepoChanged = false; - var lastProjectRepo = ""; - projectRepoInput.on("change keyup paste",function() { - projectRepoChanged = true; - var repo = $(this).val(); - if (lastProjectRepo !== repo) { - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.protocols")); - } - lastProjectRepo = repo; - - var m = /\/([^/]+?)(?:\.git)?$/.exec(repo); - if (m) { - var projectName = projectNameInput.val(); - if (projectName === "" || projectName === autoInsertedName) { - autoInsertedName = m[1]; - projectNameInput.val(autoInsertedName); - projectNameInput.change(); - } - } - validateForm(); - }); - - - var cloneAuthRows = $('<div class="hide projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').hide().appendTo(container); - row = $('<div class="form-row projects-dialog-screen-create-row-auth-error"></div>').hide().appendTo(cloneAuthRows); - $('<div><i class="fa fa-warning"></i> '+RED._("projects.create.auth-failed")+'</div>').appendTo(row); - - // Repo credentials - username/password ---------------- - row = $('<div class="hide form-row projects-dialog-screen-create-row-creds"></div>').hide().appendTo(cloneAuthRows); - - var subrow = $('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-user">'+RED._("projects.create.username")+'</label>').appendTo(subrow); - projectRepoUserInput = $('<input id="projects-dialog-screen-create-project-repo-user" type="text"></input>').appendTo(subrow); - - subrow = $('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-pass">'+RED._("projects.create.password")+'</label>').appendTo(subrow); - projectRepoPasswordInput = $('<input id="projects-dialog-screen-create-project-repo-pass" type="password"></input>').appendTo(subrow); - // ----------------------------------------------------- - - // Repo credentials - key/passphrase ------------------- - row = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').hide().appendTo(cloneAuthRows); - subrow = $('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.create.ssh-key")+'</label>').appendTo(subrow); - projectRepoSSHKeySelect = $("<select>",{style:"width: 100%"}).appendTo(subrow); - - $.getJSON("settings/user/keys", function(data) { - var count = 0; - data.keys.forEach(function(key) { - projectRepoSSHKeySelect.append($("<option></option>").val(key.name).text(key.name)); - count++; - }); - if (count === 0) { - projectRepoSSHKeySelect.addClass("input-error"); - projectRepoSSHKeySelect.attr("disabled",true); - sshwarningRow.show(); - } else { - projectRepoSSHKeySelect.removeClass("input-error"); - projectRepoSSHKeySelect.attr("disabled",false); - sshwarningRow.hide(); - } - }); - subrow = $('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(row); - $('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.create.passphrase")+'</label>').appendTo(subrow); - projectRepoPassphrase = $('<input id="projects-dialog-screen-create-project-repo-passphrase" type="password"></input>').appendTo(subrow); - - subrow = $('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').appendTo(cloneAuthRows); - var sshwarningRow = $('<div class="projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(subrow); - $('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.create.desc2")+'</div>').appendTo(sshwarningRow); - subrow = $('<div style="text-align: center">').appendTo(sshwarningRow); - $('<button class="editor-button">'+RED._("projects.create.add-ssh-key")+'</button>').appendTo(subrow).click(function(e) { - e.preventDefault(); - $('#projects-dialog-cancel').click(); - RED.userSettings.show('gitconfig'); - setTimeout(function() { - $("#user-settings-gitconfig-add-key").click(); - },500); - }); - // ----------------------------------------------------- - - - // Secret - clone - row = $('<div class="hide form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(container); - $('<label>'+RED._("projects.create.credentials-encryption-key")+'</label>').appendTo(row); - projectSecretInput = $('<input type="password"></input>').appendTo(row); - - - switch(options.screen||"empty") { - case "empty": createAsEmpty.click(); break; - case "open": openProject.click(); break; - case "clone": createAsClone.click(); break; - } - - setTimeout(function() { - if ((options.screen||"empty") !== "open") { - projectNameInput.focus(); - } else { - $("#projects-dialog-project-list-search").focus(); - } - },50); - return container; - }, - buttons: function(options) { - var initialLabel; - switch (options.screen||"empty") { - case "open": initialLabel = RED._("projects.create.open"); break; - case "empty": initialLabel = RED._("projects.create.create"); break; - case "clone": initialLabel = RED._("projects.create.clone"); break; - } - return [ - { - id: "projects-dialog-cancel", - text: RED._("common.label.cancel"), - click: function() { - $( this ).dialog( "close" ); - } - }, - { - id: "projects-dialog-create", - text: initialLabel, - class: "primary disabled", - disabled: true, - click: function() { - var projectType = $(".projects-dialog-screen-create-type.selected").data('type'); - var projectData = { - name: projectNameInput.val(), - } - if (projectType === 'empty') { - projectData.summary = projectSummaryInput.val(); - projectData.files = { - flow: projectFlowFileInput.val() - }; - var encryptionState = $("input[name=projects-encryption-type]:checked").val(); - if (encryptionState === 'enabled') { - projectData.credentialSecret = emptyProjectCredentialInput.val(); - } else { - // Disabled encryption by explicitly setting credSec to false - projectData.credentialSecret = false; - } - - - } else if (projectType === 'copy') { - projectData.copy = copyProject.name; - } else if (projectType === 'clone') { - projectData.credentialSecret = projectSecretInput.val(); - var repoUrl = projectRepoInput.val(); - var metaData = {}; - if (/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(repoUrl)) { - var selected = projectRepoSSHKeySelect.val();//false;//getSelectedSSHKey(projectRepoSSHKeySelect); - if ( selected ) { - projectData.git = { - remotes: { - 'origin': { - url: repoUrl, - keyFile: selected, - passphrase: projectRepoPassphrase.val() - } - } - }; - } - else { - console.log(RED._("projects.create.cant-get-ssh-key-path")); - return; - } - } - else { - projectData.git = { - remotes: { - 'origin': { - url: repoUrl, - username: projectRepoUserInput.val(), - password: projectRepoPasswordInput.val() - } - } - }; - } - } else if (projectType === 'open') { - return switchProject(selectedProject.name,function(err,data) { - dialog.dialog( "close" ); - if (err) { - if (err.error !== 'credentials_load_failed') { - console.log(RED._("projects.create.unexpected_error"),err) - } - } - }) - } - - $(".projects-dialog-screen-create-row-auth-error").hide(); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.protocols")); - - projectRepoUserInput.removeClass("input-error"); - projectRepoPasswordInput.removeClass("input-error"); - projectRepoSSHKeySelect.removeClass("input-error"); - projectRepoPassphrase.removeClass("input-error"); - - RED.deploy.setDeployInflight(true); - RED.projects.settings.switchProject(projectData.name); - - sendRequest({ - url: "projects", - type: "POST", - handleAuthFail: false, - responses: { - 200: function(data) { - dialog.dialog( "close" ); - }, - 400: { - 'project_exists': function(error) { - console.log(RED._("projects.create.already-exists-2")); - }, - 'git_error': function(error) { - console.log(RED._("projects.create.git-error"),error); - }, - 'git_connection_failed': function(error) { - projectRepoInput.addClass("input-error"); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.con-failed")); - }, - 'git_not_a_repository': function(error) { - projectRepoInput.addClass("input-error"); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.not-git")); - }, - 'git_repository_not_found': function(error) { - projectRepoInput.addClass("input-error"); - $("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.no-resource")); - }, - 'git_auth_failed': function(error) { - $(".projects-dialog-screen-create-row-auth-error").show(); - - projectRepoUserInput.addClass("input-error"); - projectRepoPasswordInput.addClass("input-error"); - // getRepoAuthDetails(req); - projectRepoSSHKeySelect.addClass("input-error"); - projectRepoPassphrase.addClass("input-error"); - }, - 'missing_flow_file': function(error) { - // This is handled via a runtime notification. - dialog.dialog("close"); - }, - 'project_empty': function(error) { - // This is handled via a runtime notification. - dialog.dialog("close"); - }, - 'credentials_load_failed': function(error) { - // This is handled via a runtime notification. - dialog.dialog("close"); - }, - '*': function(error) { - reportUnexpectedError(error); - $( dialog ).dialog( "close" ); - } - } - } - },projectData).then(function() { - RED.events.emit("project:change", {name:name}); - }).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }) - } - } - ] - } - } - })() - } - } - - function switchProject(name,done) { - RED.deploy.setDeployInflight(true); - RED.projects.settings.switchProject(name); - sendRequest({ - url: "projects/"+name, - type: "PUT", - requireCleanWorkspace: true, - responses: { - 200: function(data) { - done(null,data); - }, - 400: { - '*': done - }, - } - },{active:true}).then(function() { - RED.events.emit("project:change", {name:name}); - }).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }) - } - - function deleteProject(row,name,done) { - var cover = $('<div>').css({ - background:"white", - position:"absolute", - top:0,right:0,bottom:0,left:"100%", - overflow:"hidden", - padding: "5px 20px", - transition: "left 0.4s", - whitespace: "nowrap", - width:"1000px" - }).click(function(evt) { evt.stopPropagation(); }).appendTo(row); - $('<span>').css({"lineHeight":"40px"}).text(RED._("projects.delete.confirm")).appendTo(cover); - $('<button style="margin-left:20px" class="editor-button">'+RED._("common.label.cancel")+'</button>') - .appendTo(cover) - .click(function(e) { - e.stopPropagation(); - cover.remove(); - done(true); - }); - $('<button style="margin-left:20px" class="editor-button primary">'+RED._("common.label.delete")+'</button>') - .appendTo(cover) - .click(function(e) { - e.stopPropagation(); - cover.remove(); - sendRequest({ - url: "projects/"+name, - type: "DELETE", - responses: { - 200: function(data) { - done(false); - }, - 400: { - 'unexpected_error': function(error) { - cover.remove(); - done(true); - } - } - } - }); - }); - - setTimeout(function() { - cover.css("left",0); - },50); - // - } - - function show(s,options) { - if (!dialog) { - RED.projects.init(); - } - var screen = screens[s]; - var container = screen.content(options||{}); - - dialogBody.empty(); - var buttons = screen.buttons; - if (typeof buttons === 'function') { - buttons = buttons(options||{}); - } - dialog.dialog('option','buttons',buttons); - dialogBody.append(container); - dialog.dialog('option','title',screen.title||""); - dialog.dialog("open"); - dialog.dialog({position: { 'my': 'center top', 'at': 'center top+10%', 'of': window }}); - } - - function createProjectList(options) { - options = options||{}; - var height = options.height || "300px"; - var container = $('<div></div>',{class:"projects-dialog-project-list-container" }); - var filterTerm = ""; - - var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(container); - var searchInput = $('<input id="projects-dialog-project-list-search" type="text" placeholder="'+RED._("projects.create-project-list.search")+'">').appendTo(searchDiv).searchBox({ - //data-i18n="[placeholder]menu.label.searchInput" - delay: 200, - change: function() { - filterTerm = $(this).val().toLowerCase(); - list.editableList('filter'); - if (selectedListItem && !selectedListItem.is(":visible")) { - selectedListItem.children().children().removeClass('selected'); - selectedListItem = list.children(":visible").first(); - selectedListItem.children().children().addClass('selected'); - if (options.select) { - options.select(selectedListItem.children().data('data')); - } - } else { - selectedListItem = list.children(":visible").first(); - selectedListItem.children().children().addClass('selected'); - if (options.select) { - options.select(selectedListItem.children().data('data')); - } - } - ensureSelectedIsVisible(); - } - }); - var selectedListItem; - - searchInput.on('keydown',function(evt) { - if (evt.keyCode === 40) { - evt.preventDefault(); - // Down - var next = selectedListItem; - if (selectedListItem) { - do { - next = next.next(); - } while(next.length !== 0 && !next.is(":visible")); - if (next.length === 0) { - return; - } - selectedListItem.children().children().removeClass('selected'); - } else { - next = list.children(":visible").first(); - } - selectedListItem = next; - selectedListItem.children().children().addClass('selected'); - if (options.select) { - options.select(selectedListItem.children().data('data')); - } - ensureSelectedIsVisible(); - } else if (evt.keyCode === 38) { - evt.preventDefault(); - // Up - var prev = selectedListItem; - if (selectedListItem) { - do { - prev = prev.prev(); - } while(prev.length !== 0 && !prev.is(":visible")); - if (prev.length === 0) { - return; - } - selectedListItem.children().children().removeClass('selected'); - } else { - prev = list.children(":visible").first(); - } - selectedListItem = prev; - selectedListItem.children().children().addClass('selected'); - if (options.select) { - options.select(selectedListItem.children().data('data')); - } - ensureSelectedIsVisible(); - } else if (evt.keyCode === 13) { - evt.preventDefault(); - // Enter - if (selectedListItem) { - if (options.dblclick) { - options.dblclick(selectedListItem.children().data('data')); - } - } - } - }); - - searchInput.i18n(); - - var ensureSelectedIsVisible = function() { - var selectedEntry = list.find(".projects-dialog-project-list-entry.selected").parent().parent(); - if (selectedEntry.length === 1) { - var scrollWindow = listContainer; - var scrollHeight = scrollWindow.height(); - var scrollOffset = scrollWindow.scrollTop(); - var y = selectedEntry.position().top; - var h = selectedEntry.height(); - if (y+h > scrollHeight) { - scrollWindow.animate({scrollTop: '-='+(scrollHeight-y-h)},50); - } else if (y<0) { - scrollWindow.animate({scrollTop: '+='+y},50); - } - } - } - - var listContainer = $('<div></div>',{class:"projects-dialog-project-list-inner-container" }).appendTo(container); - - var list = $('<ol>',{class:"projects-dialog-project-list"}).appendTo(listContainer).editableList({ - addButton: false, - height:"auto", - scrollOnAdd: false, - addItem: function(row,index,entry) { - var header = $('<div></div>',{class:"projects-dialog-project-list-entry"}).appendTo(row); - $('<span class="projects-dialog-project-list-entry-icon"><i class="fa fa-archive"></i></span>').appendTo(header); - $('<span class="projects-dialog-project-list-entry-name" style=""></span>').text(entry.name).appendTo(header); - if (activeProject && activeProject.name === entry.name) { - header.addClass("projects-list-entry-current"); - $('<span class="projects-dialog-project-list-entry-current">'+RED._("projects.create-project-list.current")+'</span>').appendTo(header); - if (options.canSelectActive === false) { - // active project cannot be selected; so skip the rest - return - } - } - - header.addClass("selectable"); - - var tools = $('<div class="projects-dialog-project-list-entry-tools"></div>').appendTo(header); - $('<button class="editor-button editor-button-small" style="float: right;"><i class="fa fa-trash"></i></button>') - .appendTo(tools) - .click(function(e) { - e.stopPropagation(); - e.preventDefault(); - deleteProject(row,entry.name, function(cancelled) { - if (!cancelled) { - row.fadeOut(300,function() { - list.editableList('removeItem',entry); - if (options.delete) { - options.delete(entry); - } - }); - } - }) - }); - - - row.click(function(evt) { - $('.projects-dialog-project-list-entry').removeClass('selected'); - header.addClass('selected'); - selectedListItem = row.parent(); - if (options.select) { - options.select(entry); - } - ensureSelectedIsVisible(); - searchInput.focus(); - }) - if (options.dblclick) { - row.dblclick(function(evt) { - evt.preventDefault(); - options.dblclick(entry); - }) - } - }, - filter: function(data) { - if (filterTerm === "") { return true; } - return data.name.toLowerCase().indexOf(filterTerm) !== -1; - } - }); - $.getJSON("projects", function(data) { - data.projects.forEach(function(project) { - list.editableList('addItem',{name:project}); - }); - }) - return container; - } - - - - function requireCleanWorkspace(done) { - if (RED.nodes.dirty()) { - var message = RED._("projects.require-clean.confirm"); - var cleanNotification = RED.notify(message,{ - type:"info", - fixed: true, - modal: true, - buttons: [ - { - //id: "node-dialog-delete", - //class: 'leftButton', - text: RED._("common.label.cancel"), - click: function() { - cleanNotification.close(); - done(true); - } - },{ - text: RED._("common.label.cont"), - click: function() { - cleanNotification.close(); - done(false); - } - } - ] - }); - - } - } - - function sendRequest(options,body) { - // dialogBody.hide(); - // console.log(options.url,body); - - if (options.requireCleanWorkspace && RED.nodes.dirty()) { - var thenCallback; - var alwaysCallback; - requireCleanWorkspace(function(cancelled) { - if (cancelled) { - if (options.cancel) { - options.cancel(); - if (alwaysCallback) { - alwaysCallback(); - } - } - } else { - delete options.requireCleanWorkspace; - sendRequest(options,body).then(function() { - if (thenCallback) { - thenCallback(); - } - }).always(function() { - if (alwaysCallback) { - alwaysCallback(); - } - - }) - } - }) - // What follows is a very hacky Promise-like api thats good enough - // for our needs. - return { - then: function(done) { - thenCallback = done; - return { always: function(done) { alwaysCallback = done; }} - }, - always: function(done) { alwaysCallback = done; } - } - } - - var start = Date.now(); - // TODO: this is specific to the dialog-based requests - $(".projects-dialog-spinner").show(); - $("#projects-dialog").parent().find(".ui-dialog-buttonset").children().css("visibility","hidden") - if (body) { - options.data = JSON.stringify(body); - options.contentType = "application/json; charset=utf-8"; - } - var resultCallback; - var resultCallbackArgs; - return $.ajax(options).done(function(data,textStatus,xhr) { - if (options.responses && options.responses[200]) { - resultCallback = options.responses[200]; - resultCallbackArgs = data; - } - }).fail(function(xhr,textStatus,err) { - if (options.responses && options.responses[xhr.status]) { - var responses = options.responses[xhr.status]; - if (typeof responses === 'function') { - resultCallback = responses; - resultCallbackArgs = {error:responses.statusText}; - return; - } else if (options.handleAuthFail !== false && xhr.responseJSON.error === 'git_auth_failed') { - var url = activeProject.git.remotes[xhr.responseJSON.remote||options.remote||'origin'].fetch; - - var message = $('<div>'+ - '<div class="form-row">'+RED._("projects.send-req.auth-req")+':</div>'+ - '<div class="form-row"><div style="margin-left: 20px;">'+url+'</div></div>'+ - '</div>'); - - var isSSH = false; - if (/^https?:\/\//.test(url)) { - $('<div class="form-row"><label for="projects-user-auth-username">'+RED._("projects.send-req.username")+'</label><input id="projects-user-auth-username" type="text"></input></div>'+ - '<div class="form-row"><label for=projects-user-auth-password">'+RED._("projects.send-req.password")+'</label><input id="projects-user-auth-password" type="password"></input></div>').appendTo(message); - } else if (/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(url)) { - isSSH = true; - var row = $('<div class="form-row"></div>').appendTo(message); - $('<label for="projects-user-auth-key">SSH Key</label>').appendTo(row); - var projectRepoSSHKeySelect = $('<select id="projects-user-auth-key">').width('70%').appendTo(row); - $.getJSON("settings/user/keys", function(data) { - var count = 0; - data.keys.forEach(function(key) { - projectRepoSSHKeySelect.append($("<option></option>").val(key.name).text(key.name)); - count++; - }); - if (count === 0) { - //TODO: handle no keys yet setup - } - }); - row = $('<div class="form-row"></div>').appendTo(message); - $('<label for="projects-user-auth-passphrase">'+RED._("projects.send-req.passphrase")+'</label>').appendTo(row); - $('<input id="projects-user-auth-passphrase" type="password"></input>').appendTo(row); - } - - var notification = RED.notify(message,{ - type:"error", - fixed: true, - modal: true, - buttons: [ - { - //id: "node-dialog-delete", - //class: 'leftButton', - text: RED._("common.label.cancel"), - click: function() { - notification.close(); - } - },{ - text: '<span><i class="fa fa-refresh"></i> ' +RED._("projects.send-req.retry") +'</span>', - click: function() { - body = body || {}; - var authBody = {}; - if (isSSH) { - authBody.keyFile = $('#projects-user-auth-key').val(); - authBody.passphrase = $('#projects-user-auth-passphrase').val(); - } else { - authBody.username = $('#projects-user-auth-username').val(); - authBody.password = $('#projects-user-auth-password').val(); - } - var done = function(err) { - if (err) { - console.log(RED._("projects.send-req.update-failed")); - console.log(err); - } else { - sendRequest(options,body); - notification.close(); - } - - } - sendRequest({ - url: "projects/"+activeProject.name+"/remotes/"+(xhr.responseJSON.remote||options.remote||'origin'), - type: "PUT", - responses: { - 0: function(error) { - done(error,null); - }, - 200: function(data) { - done(null,data); - }, - 400: { - 'unexpected_error': function(error) { - done(error,null); - } - }, - } - },{auth:authBody}); - } - } - ] - }); - return; - } else if (responses[xhr.responseJSON.error]) { - resultCallback = responses[xhr.responseJSON.error]; - resultCallbackArgs = xhr.responseJSON; - return; - } else if (responses['*']) { - resultCallback = responses['*']; - resultCallbackArgs = xhr.responseJSON; - return; - } - } - console.log(RED._("projects.send-req.unhandled")+":"); - console.log(xhr); - console.log(textStatus); - console.log(err); - }).always(function() { - var delta = Date.now() - start; - delta = Math.max(0,500-delta); - setTimeout(function() { - // dialogBody.show(); - $(".projects-dialog-spinner").hide(); - $("#projects-dialog").parent().find(".ui-dialog-buttonset").children().css("visibility","") - if (resultCallback) { - resultCallback(resultCallbackArgs) - } - },delta); - }); - } - - function createBranchList(options) { - var branchFilterTerm = ""; - var branchFilterCreateItem; - var branches = []; - var branchPrefix = ""; - var container = $('<div class="projects-branch-list">').appendTo(options.container); - - var branchFilter = $('<input type="text">').attr('placeholder',options.placeholder).appendTo(container).searchBox({ - delay: 200, - change: function() { - branchFilterTerm = $(this).val(); - if (/(\.\.|\/\.|[?*[~^: \\]|\/\/|\/.$|\/$)/.test(branchFilterTerm)) { - if (!branchFilterCreateItem.hasClass("input-error")) { - branchFilterCreateItem.addClass("input-error"); - branchFilterCreateItem.find("i").addClass("fa-warning").removeClass("fa-code-fork"); - } - branchFilterCreateItem.find("span").text(RED._("projects.create-branch-list.invalid")+": "+branchPrefix+branchFilterTerm); - } else { - if (branchFilterCreateItem.hasClass("input-error")) { - branchFilterCreateItem.removeClass("input-error"); - branchFilterCreateItem.find("i").removeClass("fa-warning").addClass("fa-code-fork"); - } - branchFilterCreateItem.find(".sidebar-version-control-branch-list-entry-create-name").text(branchPrefix+branchFilterTerm); - } - branchList.editableList("filter"); - } - }); - var branchList = $("<ol>",{style:"height: 130px;"}).appendTo(container); - branchList.editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - var container = $('<div class="sidebar-version-control-branch-list-entry">').appendTo(row); - if (!entry.hasOwnProperty('commit')) { - branchFilterCreateItem = container; - $('<i class="fa fa-code-fork"></i>').appendTo(container); - $('<span>').text(RED._("projects.create-branch-list.create")+":").appendTo(container); - $('<div class="sidebar-version-control-branch-list-entry-create-name" style="margin-left: 10px;">').text(entry.name).appendTo(container); - } else { - $('<i class="fa fa-code-fork"></i>').appendTo(container); - $('<span>').text(entry.name).appendTo(container); - if (entry.current) { - container.addClass("selected"); - $('<span class="current"></span>').text(options.currentLabel||RED._("projects.create-branch-list.current")).appendTo(container); - } - } - container.click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('input-error')) { - return; - } - var body = {}; - if (!entry.hasOwnProperty('commit')) { - body.name = branchFilter.val(); - body.create = true; - if (options.remote) { - body.name = options.remote()+"/"+body.name; - } - } else { - if ($(this).hasClass('selected')) { - body.current = true; - } - body.name = entry.name; - } - if (options.onselect) { - options.onselect(body); - } - }); - }, - filter: function(data) { - var isCreateEntry = (!data.hasOwnProperty('commit')); - return ( - isCreateEntry && - ( - branchFilterTerm !== "" && - branches.indexOf(branchPrefix+branchFilterTerm) === -1 - ) - ) || - ( - !isCreateEntry && - data.name.indexOf(branchFilterTerm) !== -1 - ); - } - }); - return { - refresh: function(url) { - branchFilter.searchBox("value",""); - branchList.editableList('empty'); - var start = Date.now(); - var spinner = addSpinnerOverlay(container).addClass("projects-dialog-spinner-contain"); - if (options.remote) { - branchPrefix = options.remote()+"/"; - } else { - branchPrefix = ""; - } - - sendRequest({ - url: url, - type: "GET", - responses: { - 0: function(error) { - console.log(error); - }, - 200: function(result) { - branches = result.branches; - result.branches.forEach(function(b) { - branchList.editableList('addItem',b); - }); - branchList.editableList('addItem',{}); - setTimeout(function() { - spinner.remove(); - },Math.max(300-(Date.now() - start),0)); - }, - 400: { - 'git_connection_failed': function(error) { - RED.notify(error.message,'error'); - }, - 'git_not_a_repository': function(error) { - RED.notify(error.message,'error'); - }, - 'git_repository_not_found': function(error) { - RED.notify(error.message,'error'); - }, - 'unexpected_error': function(error) { - reportUnexpectedError(error); - } - } - } - }) - }, - // addItem: function(data) { branchList.editableList('addItem',data) }, - filter: function() { branchList.editableList('filter') }, - focus: function() { branchFilter.focus() } - } - } - - function addSpinnerOverlay(container) { - var spinner = $('<div class="projects-dialog-spinner"><img src="red/images/spin.svg"/></div>').appendTo(container); - return spinner; - } - - function init() { - dialog = $('<div id="projects-dialog" class="hide node-red-dialog projects-edit-form"><form class="form-horizontal"></form><div class="projects-dialog-spinner hide"><img src="red/images/spin.svg"/></div></div>') - .appendTo("body") - .dialog({ - modal: true, - autoOpen: false, - width: 600, - resizable: false, - open: function(e) { - $(this).parent().find(".ui-dialog-titlebar-close").hide(); - // $("#header-shade").show(); - // $("#editor-shade").show(); - // $("#palette-shade").show(); - // $("#sidebar-shade").show(); - }, - close: function(e) { - // $("#header-shade").hide(); - // $("#editor-shade").hide(); - // $("#palette-shade").hide(); - // $("#sidebar-shade").hide(); - } - }); - dialogBody = dialog.find("form"); - - RED.actions.add("core:new-project",RED.projects.newProject); - RED.actions.add("core:open-project",RED.projects.selectProject); - RED.actions.add("core:show-project-settings",RED.projects.settings.show); - var projectsAPI = { - sendRequest:sendRequest, - createBranchList:createBranchList, - addSpinnerOverlay:addSpinnerOverlay, - reportUnexpectedError:reportUnexpectedError - }; - RED.projects.settings.init(projectsAPI); - RED.projects.userSettings.init(projectsAPI); - RED.sidebar.versionControl.init(projectsAPI); - initScreens(); - // initSidebar(); - } - - function createDefaultFileSet() { - if (!activeProject) { - throw new Error(RED._("projects.create-default-file-set.no-active")); - } else if (!activeProject.empty) { - throw new Error(RED._("projects.create-default-file-set.no-empty")); - } - if (!RED.user.hasPermission("projects.write")) { - RED.notify(RED._("user.errors.notAuthorized"),"error"); - return; - } - createProjectOptions = {}; - show('default-files',{existingProject: true}); - } - function createDefaultPackageFile() { - RED.deploy.setDeployInflight(true); - RED.projects.settings.switchProject(activeProject.name); - - var method = "PUT"; - var url = "projects/"+activeProject.name; - var createProjectOptions = { - initialise: true - }; - sendRequest({ - url: url, - type: method, - requireCleanWorkspace: true, - handleAuthFail: false, - responses: { - 200: function(data) { }, - 400: { - 'git_error': function(error) { - console.log(RED._("projects.create-default-file-set.git-error"),error); - }, - 'missing_flow_file': function(error) { - // This is a natural next error - but let the runtime event - // trigger the dialog rather than double-report it. - $( dialog ).dialog( "close" ); - }, - '*': function(error) { - reportUnexpectedError(error); - $( dialog ).dialog( "close" ); - } - } - } - },createProjectOptions).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }) - } - - function refresh(done) { - $.getJSON("projects",function(data) { - if (data.active) { - $.getJSON("projects/"+data.active, function(project) { - activeProject = project; - RED.sidebar.versionControl.refresh(true); - if (done) { - done(activeProject); - } - }); - } else { - if (done) { - done(null); - } - } - }); - } - - - function showNewProjectScreen() { - createProjectOptions = {}; - if (!activeProject) { - show('welcome'); - } else { - show('create',{screen:'empty'}) - } - } - - return { - init: init, - showStartup: function() { - if (!RED.user.hasPermission("projects.write")) { - RED.notify(RED._("user.errors.notAuthorized"),"error"); - return; - } - show('welcome'); - }, - newProject: function() { - if (!RED.user.hasPermission("projects.write")) { - RED.notify(RED._("user.errors.notAuthorized"),"error"); - return; - } - - if (RED.nodes.dirty()) { - return requireCleanWorkspace(function(cancelled) { - if (!cancelled) { - showNewProjectScreen(); - } - }) - } else { - showNewProjectScreen(); - } - }, - selectProject: function() { - if (!RED.user.hasPermission("projects.write")) { - RED.notify(RED._("user.errors.notAuthorized"),"error"); - return; - } - show('create',{screen:'open'}) - }, - showCredentialsPrompt: function() { //TODO: rename this function - if (!RED.user.hasPermission("projects.write")) { - RED.notify(RED._("user.errors.notAuthorized"),"error"); - return; - } - RED.projects.settings.show('settings'); - }, - showFilesPrompt: function() { //TODO: rename this function - if (!RED.user.hasPermission("projects.write")) { - RED.notify(RED._("user.errors.notAuthorized"),"error"); - return; - } - RED.projects.settings.show('settings'); - }, - showProjectDependencies: function() { - RED.projects.settings.show('deps'); - }, - createDefaultFileSet: createDefaultFileSet, - createDefaultPackageFile: createDefaultPackageFile, - // showSidebar: showSidebar, - refresh: refresh, - editProject: function() { - RED.projects.settings.show(); - }, - getActiveProject: function() { - return activeProject; - } - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.projects.settings = (function() { - - var trayWidth = 700; - var settingsVisible = false; - - var panes = []; - - function addPane(options) { - panes.push(options); - } - - // TODO: DRY - tab-info.js - function addTargetToExternalLinks(el) { - $(el).find("a").each(function(el) { - var href = $(this).attr('href'); - if (/^https?:/.test(href)) { - $(this).attr('target','_blank'); - } - }); - return el; - } - - function show(initialTab) { - if (settingsVisible) { - return; - } - if (!RED.user.hasPermission("projects.write")) { - RED.notify(RED._("user.errors.notAuthorized"),"error"); - return; - } - - settingsVisible = true; - var tabContainer; - - var trayOptions = { - title: RED._("menu.label.userSettings"), - buttons: [ - { - id: "node-dialog-ok", - text: RED._("common.label.close"), - class: "primary", - click: function() { - RED.tray.close(); - } - } - ], - resize: function(dimensions) { - trayWidth = dimensions.width; - }, - open: function(tray) { - var project = RED.projects.getActiveProject(); - - var trayBody = tray.find('.editor-tray-body'); - var settingsContent = $('<div></div>').appendTo(trayBody); - var tabContainer = $('<div></div>',{id:"user-settings-tabs-container"}).appendTo(settingsContent); - - $('<ul></ul>',{id:"user-settings-tabs"}).appendTo(tabContainer); - var settingsTabs = RED.tabs.create({ - id: "user-settings-tabs", - vertical: true, - onchange: function(tab) { - setTimeout(function() { - $("#user-settings-tabs-content").children().hide(); - $("#" + tab.id).show(); - if (tab.pane.focus) { - tab.pane.focus(); - } - },50); - } - }); - var tabContents = $('<div></div>',{id:"user-settings-tabs-content"}).appendTo(settingsContent); - - panes.forEach(function(pane) { - settingsTabs.addTab({ - id: "project-settings-tab-"+pane.id, - label: pane.title, - pane: pane - }); - pane.get(project).hide().appendTo(tabContents); - }); - settingsContent.i18n(); - settingsTabs.activateTab("project-settings-tab-"+(initialTab||'main')) - $("#sidebar-shade").show(); - }, - close: function() { - settingsVisible = false; - panes.forEach(function(pane) { - if (pane.close) { - pane.close(); - } - }); - $("#sidebar-shade").hide(); - - }, - show: function() {} - } - if (trayWidth !== null) { - trayOptions.width = trayWidth; - } - RED.tray.show(trayOptions); - } - - function editDescription(activeProject, container) { - RED.editor.editMarkdown({ - title: RED._('sidebar.project.editDescription'), - header: $('<span><i class="fa fa-book"></i> README.md</span>'), - value: activeProject.description, - complete: function(v) { - container.empty(); - var spinner = utils.addSpinnerOverlay(container); - var done = function(err,res) { - if (err) { - return editDescription(activeProject, container); - } - activeProject.description = v; - updateProjectDescription(activeProject, container); - } - utils.sendRequest({ - url: "projects/"+activeProject.name, - type: "PUT", - responses: { - 0: function(error) { - done(error,null); - }, - 200: function(data) { - done(null,data); - RED.sidebar.versionControl.refresh(true); - }, - 400: { - '*': function(error) { - utils.reportUnexpectedError(error); - done(error,null); - } - }, - } - },{description:v}).always(function() { - spinner.remove(); - }); - } - }); - } - function updateProjectDescription(activeProject, container) { - container.empty(); - var desc; - if (activeProject.description) { - desc = marked(activeProject.description); - } else { - desc = '<span class="node-info-none">'+'No description available'+'</span>'; - } - var description = addTargetToExternalLinks($('<span class="bidiAware" dir=\"'+RED.text.bidi.resolveBaseTextDir(desc)+'">'+desc+'</span>')).appendTo(container); - description.find(".bidiAware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" ); - } - - function editSummary(activeProject, summary, container) { - var editButton = container.prev(); - editButton.hide(); - container.empty(); - var bg = $('<span class="button-row" style="position: relative; float: right; margin-right:0;"></span>').appendTo(container); - var input = $('<input type="text" style="width: calc(100% - 150px); margin-right: 10px;">').val(summary||"").appendTo(container); - $('<button class="editor-button">' + RED._("common.label.cancel") + '</button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - updateProjectSummary(activeProject.summary, container); - editButton.show(); - }); - $('<button class="editor-button">' + RED._("common.label.save") + '</button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - var v = input.val(); - updateProjectSummary(v, container); - var spinner = utils.addSpinnerOverlay(container); - var done = function(err,res) { - if (err) { - spinner.remove(); - return editSummary(activeProject, summary, container); - } - activeProject.summary = v; - spinner.remove(); - updateProjectSummary(activeProject.summary, container); - editButton.show(); - } - utils.sendRequest({ - url: "projects/"+activeProject.name, - type: "PUT", - responses: { - 0: function(error) { - done(error,null); - }, - 200: function(data) { - RED.sidebar.versionControl.refresh(true); - done(null,data); - }, - 400: { - '*': function(error) { - utils.reportUnexpectedError(error); - done(error,null); - } - }, - } - },{summary:v}); - }); - } - function updateProjectSummary(summary, container) { - container.empty(); - if (summary) { - container.text(summary).removeClass('node-info-node'); - } else { - container.text(RED._("sidebar.project.projectSettings.noSummaryAvailable")).addClass('node-info-none'); - } - } - - function createMainPane(activeProject) { - - var pane = $('<div id="project-settings-tab-main" class="project-settings-tab-pane node-help"></div>'); - $('<h1>').text(activeProject.name).appendTo(pane); - var summary = $('<div style="position: relative">').appendTo(pane); - var summaryContent = $('<div></div>',{style:"color: #999"}).appendTo(summary); - updateProjectSummary(activeProject.summary, summaryContent); - if (RED.user.hasPermission("projects.write")) { - $('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editDescription') + '</button>') - .prependTo(summary) - .click(function(evt) { - evt.preventDefault(); - editSummary(activeProject, activeProject.summary, summaryContent); - }); - } - $('<hr>').appendTo(pane); - - var description = $('<div class="node-help" style="position: relative"></div>').appendTo(pane); - var descriptionContent = $('<div>',{style:"min-height: 200px"}).appendTo(description); - - updateProjectDescription(activeProject, descriptionContent); - - if (RED.user.hasPermission("projects.write")) { - $('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editReadme') + '</button>') - .prependTo(description) - .click(function(evt) { - evt.preventDefault(); - editDescription(activeProject, descriptionContent); - }); - } - return pane; - } - function updateProjectDependencies(activeProject,depsList) { - depsList.editableList('empty'); - - var totalCount = 0; - var unknownCount = 0; - var unusedCount = 0; - var notInstalledCount = 0; - - for (var m in modulesInUse) { - if (modulesInUse.hasOwnProperty(m)) { - depsList.editableList('addItem',{ - id: modulesInUse[m].module, - version: modulesInUse[m].version, - count: modulesInUse[m].count, - known: activeProject.dependencies.hasOwnProperty(m), - installed: true - }); - totalCount++; - if (modulesInUse[m].count === 0) { - unusedCount++; - } - if (!activeProject.dependencies.hasOwnProperty(m)) { - unknownCount++; - } - } - } - - if (activeProject.dependencies) { - for (var m in activeProject.dependencies) { - if (activeProject.dependencies.hasOwnProperty(m) && !modulesInUse.hasOwnProperty(m)) { - var installed = !!RED.nodes.registry.getModule(m); - depsList.editableList('addItem',{ - id: m, - version: activeProject.dependencies[m], //RED.nodes.registry.getModule(module).version, - count: 0, - known: true, - installed: installed - }); - totalCount++; - if (installed) { - unusedCount++; - } else { - notInstalledCount++; - } - } - } - } - // if (notInstalledCount > 0) { - // depsList.editableList('addItem',{index:1, label:"Missing dependencies"}); // TODO: nls - // } - // if (unknownCount > 0) { - // depsList.editableList('addItem',{index:1, label:"Unlisted dependencies"}); // TODO: nls - // } - // if (unusedCount > 0) { - // depsList.editableList('addItem',{index:3, label:"Unused dependencies"}); // TODO: nls - // } - if (totalCount === 0) { - depsList.editableList('addItem',{index:0, label:RED._("sidebar.project.projectSettings.none")}); - } - - } - - function saveDependencies(depsList,container,dependencies,complete) { - var activeProject = RED.projects.getActiveProject(); - var spinner = utils.addSpinnerOverlay(container).addClass('projects-dialog-spinner-contain'); - var done = function(err,res) { - spinner.remove(); - if (err) { - return complete(err); - } - activeProject.dependencies = dependencies; - RED.sidebar.versionControl.refresh(true); - complete(); - } - utils.sendRequest({ - url: "projects/"+activeProject.name, - type: "PUT", - responses: { - 0: function(error) { - done(error,null); - }, - 200: function(data) { - RED.sidebar.versionControl.refresh(true); - done(null,data); - }, - 400: { - '*': function(error) { - done(error,null); - } - }, - } - },{dependencies:dependencies}); - } - function editDependencies(activeProject,depsJSON,container,depsList) { - var json = depsJSON||JSON.stringify(activeProject.dependencies||{},"",4); - if (json === "{}") { - json = "{\n\n}"; - } - RED.editor.editJSON({ - title: RED._('sidebar.project.editDependencies'), - value: json, - requireValid: true, - complete: function(v) { - try { - var parsed = JSON.parse(v); - saveDependencies(depsList,container,parsed,function(err) { - if (err) { - return editDependencies(activeProject,v,container,depsList); - } - activeProject.dependencies = parsed; - updateProjectDependencies(activeProject,depsList); - }); - } catch(err) { - editDependencies(activeProject,v,container,depsList); - } - } - }); - } - - function createDependenciesPane(activeProject) { - var pane = $('<div id="project-settings-tab-deps" class="project-settings-tab-pane node-help"></div>'); - if (RED.user.hasPermission("projects.write")) { - $('<button class="editor-button editor-button-small" style="margin-top:10px;float: right;">' + RED._("sidebar.project.projectSettings.edit") + '</button>') - .appendTo(pane) - .click(function(evt) { - evt.preventDefault(); - editDependencies(activeProject,null,pane,depsList) - }); - } - var depsList = $("<ol>",{style:"position: absolute;top: 60px;bottom: 20px;left: 20px;right: 20px;"}).appendTo(pane); - depsList.editableList({ - addButton: false, - addItem: function(row,index,entry) { - // console.log(entry); - var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(row); - if (entry.label) { - if (entry.index === 0) { - headerRow.addClass("red-ui-search-empty") - } else { - row.parent().addClass("palette-module-section"); - } - headerRow.text(entry.label); - // if (RED.user.hasPermission("projects.write")) { - // if (entry.index === 1) { - // var addButton = $('<button class="editor-button editor-button-small palette-module-button">add to project</button>').appendTo(headerRow).click(function(evt) { - // evt.preventDefault(); - // var deps = $.extend(true, {}, activeProject.dependencies); - // for (var m in modulesInUse) { - // if (modulesInUse.hasOwnProperty(m) && !modulesInUse[m].known) { - // deps[m] = modulesInUse[m].version; - // } - // } - // editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList); - // }); - // } else if (entry.index === 3) { - // var removeButton = $('<button class="editor-button editor-button-small palette-module-button">remove from project</button>').appendTo(headerRow).click(function(evt) { - // evt.preventDefault(); - // var deps = $.extend(true, {}, activeProject.dependencies); - // for (var m in activeProject.dependencies) { - // if (activeProject.dependencies.hasOwnProperty(m) && !modulesInUse.hasOwnProperty(m)) { - // delete deps[m]; - // } - // } - // editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList); - // }); - // } - // } - } else { - headerRow.addClass("palette-module-header"); - if (!entry.installed) { - headerRow.addClass("palette-module-not-installed"); - } else if (entry.count === 0) { - headerRow.addClass("palette-module-unused"); - } else if (!entry.known) { - headerRow.addClass("palette-module-unknown"); - } - - entry.element = headerRow; - var titleRow = $('<div class="palette-module-meta palette-module-name"></div>').appendTo(headerRow); - var iconClass = "fa-cube"; - if (!entry.installed) { - iconClass = "fa-warning"; - } - var icon = $('<i class="fa '+iconClass+'"></i>').appendTo(titleRow); - entry.icon = icon; - $('<span>').text(entry.id).appendTo(titleRow); - var metaRow = $('<div class="palette-module-meta palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow); - var versionSpan = $('<span>').text(entry.version).appendTo(metaRow); - metaRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow); - var buttons = $('<div class="palette-module-button-group"></div>').appendTo(metaRow); - if (RED.user.hasPermission("projects.write")) { - if (!entry.installed && RED.settings.theme('palette.editable') !== false) { - $('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.install") + '</a>').appendTo(buttons) - .click(function(evt) { - evt.preventDefault(); - RED.palette.editor.install(entry,row,function(err) { - if (!err) { - entry.installed = true; - var spinner = RED.utils.addSpinnerOverlay(row,true); - setTimeout(function() { - depsList.editableList('removeItem',entry); - refreshModuleInUseCounts(); - entry.count = modulesInUse[entry.id].count; - depsList.editableList('addItem',entry); - },500); - } - }); - }) - } else if (entry.known && entry.count === 0) { - $('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.removeFromProject") + '</a>').appendTo(buttons) - .click(function(evt) { - evt.preventDefault(); - var deps = $.extend(true, {}, activeProject.dependencies); - delete deps[entry.id]; - saveDependencies(depsList,row,deps,function(err) { - if (!err) { - row.fadeOut(200,function() { - depsList.editableList('removeItem',entry); - }); - } else { - console.log(err); - } - }); - }); - } else if (!entry.known) { - $('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.addToProject") + '</a>').appendTo(buttons) - .click(function(evt) { - evt.preventDefault(); - var deps = $.extend(true, {}, activeProject.dependencies); - deps[entry.id] = modulesInUse[entry.id].version; - saveDependencies(depsList,row,deps,function(err) { - if (!err) { - buttons.remove(); - headerRow.removeClass("palette-module-unknown"); - } else { - console.log(err); - } - }); - }); - } - } - } - }, - sort: function(A,B) { - return A.id.localeCompare(B.id); - // if (A.index && B.index) { - // return A.index - B.index; - // } - // var Acategory = A.index?A.index:(A.known?(A.count>0?0:4):2); - // var Bcategory = B.index?B.index:(B.known?(B.count>0?0:4):2); - // if (Acategory === Bcategory) { - // return A.id.localeCompare(B.id); - // } else { - // return Acategory - Bcategory; - // } - } - }); - - updateProjectDependencies(activeProject,depsList); - return pane; - - } - - function showProjectFileListing(row,activeProject,current,filter,done) { - var dialog; - var dialogBody; - var filesList; - var selected; - var container = $('<div class="project-file-listing-container"></div>',{style:"position: relative; min-height: 175px; height: 175px;"}).hide().appendTo(row); - var spinner = utils.addSpinnerOverlay(container); - $.getJSON("projects/"+activeProject.name+"/files",function(result) { - var fileNames = Object.keys(result); - fileNames = fileNames.filter(function(fn) { - return !result[fn].status || !/D/.test(result[fn].status); - }) - var files = {}; - fileNames.sort(); - fileNames.forEach(function(file) { - file.split("/").reduce(function(r,v,i,arr) { if (v) { if (i<arr.length-1) { r[v] = r[v]||{};} else { r[v] = true }return r[v];}},files); - }); - var sortFiles = function(key,value,fullPath) { - var result = { - name: key||"/", - path: fullPath+(fullPath?"/":"")+key, - }; - if (value === true) { - result.type = 'f'; - return result; - } - result.type = 'd'; - result.children = []; - result.path = result.path; - var files = Object.keys(value); - files.forEach(function(file) { - result.children.push(sortFiles(file,value[file],result.path)); - }) - result.children.sort(function(A,B) { - if (A.hasOwnProperty("children") && !B.hasOwnProperty("children")) { - return -1; - } else if (!A.hasOwnProperty("children") && B.hasOwnProperty("children")) { - return 1; - } - return A.name.localeCompare(B.name); - }) - return result; - } - var files = sortFiles("",files,""); - createFileSubList(container,files.children,current,filter,done,"height: 175px"); - spinner.remove(); - }); - return container; - } - - function createFileSubList(container, files, current, filter, onselect, style) { - style = style || ""; - var list = $('<ol>',{class:"projects-dialog-file-list", style:style}).appendTo(container).editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - var header = $('<div></div>',{class:"projects-dialog-file-list-entry"}).appendTo(row); - if (entry.children) { - $('<span class="projects-dialog-file-list-entry-folder"><i class="fa fa-angle-right"></i> <i class="fa fa-folder-o"></i></span>').appendTo(header); - if (entry.children.length > 0) { - var children = $('<div></div>',{style:"padding-left: 20px;"}).appendTo(row); - if (current.indexOf(entry.path+"/") === 0) { - header.addClass("expanded"); - } else { - children.hide(); - } - createFileSubList(children,entry.children,current,filter,onselect); - header.addClass("selectable"); - header.click(function(e) { - if ($(this).hasClass("expanded")) { - $(this).removeClass("expanded"); - children.slideUp(200); - } else { - $(this).addClass("expanded"); - children.slideDown(200); - } - - }); - - } - } else { - var fileIcon = "fa-file-o"; - var fileClass = ""; - if (/\.json$/i.test(entry.name)) { - fileIcon = "fa-file-code-o" - } else if (/\.md$/i.test(entry.name)) { - fileIcon = "fa-book"; - } else if (/^\.git/i.test(entry.name)) { - fileIcon = "fa-code-fork"; - header.addClass("projects-dialog-file-list-entry-file-type-git"); - } - $('<span class="projects-dialog-file-list-entry-file"> <i class="fa '+fileIcon+'"></i></span>').appendTo(header); - if (filter.test(entry.name)) { - header.addClass("selectable"); - if (entry.path === current) { - header.addClass("selected"); - } - header.click(function(e) { - $(".projects-dialog-file-list-entry.selected").removeClass("selected"); - $(this).addClass("selected"); - onselect(entry.path); - }) - header.dblclick(function(e) { - e.preventDefault(); - onselect(entry.path,true); - }) - } else { - header.addClass("unselectable"); - } - } - $('<span class="projects-dialog-file-list-entry-name" style=""></span>').text(entry.name).appendTo(header); - } - }); - if (!style) { - list.parent().css("overflow-y",""); - } - files.forEach(function(f) { - list.editableList('addItem',f); - }) - } - - // function editFiles(activeProject, container,flowFile, flowFileLabel) { - // var editButton = container.children().first(); - // editButton.hide(); - // - // var flowFileInput = $('<input id="" type="text" style="width: calc(100% - 300px);">').val(flowFile).insertAfter(flowFileLabel); - // - // var flowFileInputSearch = $('<button class="editor-button" style="margin-left: 10px"><i class="fa fa-folder-open-o"></i></button>') - // .insertAfter(flowFileInput) - // .click(function(e) { - // showProjectFileListing(activeProject,'Select flow file',flowFileInput.val(),function(result) { - // flowFileInput.val(result); - // checkFiles(); - // }) - // }) - // - // var checkFiles = function() { - // saveButton.toggleClass('disabled',flowFileInput.val()===""); - // saveButton.prop('disabled',flowFileInput.val()===""); - // } - // flowFileInput.on("change keyup paste",checkFiles); - // flowFileLabel.hide(); - // - // var bg = $('<span class="button-group" style="position: relative; float: right; margin-right:0;"></span>').prependTo(container); - // $('<button class="editor-button">Cancel</button>') - // .appendTo(bg) - // .click(function(evt) { - // evt.preventDefault(); - // - // flowFileLabel.show(); - // flowFileInput.remove(); - // flowFileInputSearch.remove(); - // bg.remove(); - // editButton.show(); - // }); - // var saveButton = $('<button class="editor-button">Save</button>') - // .appendTo(bg) - // .click(function(evt) { - // evt.preventDefault(); - // var newFlowFile = flowFileInput.val(); - // var newCredsFile = credentialsFileInput.val(); - // var spinner = utils.addSpinnerOverlay(container); - // var done = function(err,res) { - // if (err) { - // spinner.remove(); - // return; - // } - // activeProject.summary = v; - // spinner.remove(); - // flowFileLabel.text(newFlowFile); - // flowFileLabel.show(); - // flowFileInput.remove(); - // flowFileInputSearch.remove(); - // bg.remove(); - // editButton.show(); - // } - // // utils.sendRequest({ - // // url: "projects/"+activeProject.name, - // // type: "PUT", - // // responses: { - // // 0: function(error) { - // // done(error,null); - // // }, - // // 200: function(data) { - // // done(null,data); - // // }, - // // 400: { - // // 'unexpected_error': function(error) { - // // done(error,null); - // // } - // // }, - // // } - // // },{summary:v}); - // }); - // - // - // checkFiles(); - // - // } - - function createFilesSection(activeProject,pane) { - var title = $('<h3></h3>').text(RED._("sidebar.project.projectSettings.files")).appendTo(pane); - var filesContainer = $('<div class="user-settings-section"></div>').appendTo(pane); - if (RED.user.hasPermission("projects.write")) { - var editFilesButton = $('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.projectSettings.edit') + '</button>') - .appendTo(title) - .click(function(evt) { - evt.preventDefault(); - formButtons.show(); - editFilesButton.hide(); - flowFileLabelText.hide(); - flowFileInput.show(); - flowFileInputSearch.show(); - credFileLabel.hide(); - credFileInput.show(); - flowFileInput.focus(); - // credentialStateLabel.parent().hide(); - credentialStateLabel.addClass("uneditable-input"); - $(".user-settings-row-credentials").show(); - credentialStateLabel.css('height','auto'); - credentialFormRows.hide(); - credentialSecretButtons.show(); - }); - } - var row; - - // Flow files - row = $('<div class="user-settings-row"></div>').appendTo(filesContainer); - $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.flow")).appendTo(row); - var flowFileLabel = $('<div class="uneditable-input" style="padding:0">').appendTo(row); - var flowFileLabelText = $('<span style="display:inline-block; padding: 6px">').text(activeProject.files.flow).appendTo(flowFileLabel); - - var flowFileInput = $('<input id="" type="text" style="margin-bottom: 0;width: 100%; border: none;">').val(activeProject.files.flow).hide().appendTo(flowFileLabel); - var flowFileInputSearch = $('<button class="editor-button" style="border-top-right-radius: 4px; border-bottom-right-radius: 4px; width: 36px; height: 34px; position: absolute; top: -1px; right: -1px;"><i class="fa fa-folder-open-o"></i></button>') - .hide() - .appendTo(flowFileLabel) - .click(function(e) { - if ($(this).hasClass('selected')) { - $(this).removeClass('selected'); - flowFileLabel.find('.project-file-listing-container').slideUp(200,function() { - $(this).remove(); - flowFileLabel.css('height',''); - }); - flowFileLabel.css('color',''); - } else { - $(this).addClass('selected'); - flowFileLabel.css('color','inherit'); - var fileList = showProjectFileListing(flowFileLabel,activeProject,flowFileInput.val(), /.*\.json$/,function(result,isDblClick) { - if (result) { - flowFileInput.val(result); - } - if (isDblClick) { - $(flowFileInputSearch).click(); - } - checkFiles(); - }); - flowFileLabel.css('height','auto'); - setTimeout(function() { - fileList.slideDown(200); - },50); - - } - }) - - row = $('<div class="user-settings-row"></div>').appendTo(filesContainer); - $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.credentials")).appendTo(row); - var credFileLabel = $('<div class="uneditable-input">').text(activeProject.files.credentials).appendTo(row); - var credFileInput = $('<div class="uneditable-input">').text(activeProject.files.credentials).hide().insertAfter(credFileLabel); - - var checkFiles = function() { - var saveDisabled; - var currentFlowValue = flowFileInput.val(); - var m = /^(.+?)(\.[^.]*)?$/.exec(currentFlowValue); - if (m) { - credFileInput.text(m[1]+"_cred"+(m[2]||".json")); - } else if (currentFlowValue === "") { - credFileInput.text(""); - } - var isFlowInvalid = currentFlowValue==="" || - /\.\./.test(currentFlowValue) || - /\/$/.test(currentFlowValue); - - saveDisabled = isFlowInvalid || credFileInput.text()===""; - - if (credentialSecretExistingInput.is(":visible")) { - credentialSecretExistingInput.toggleClass("input-error", credentialSecretExistingInput.val() === ""); - saveDisabled = saveDisabled || credentialSecretExistingInput.val() === ""; - } - if (credentialSecretNewInput.is(":visible")) { - credentialSecretNewInput.toggleClass("input-error", credentialSecretNewInput.val() === ""); - saveDisabled = saveDisabled || credentialSecretNewInput.val() === ""; - } - - - flowFileInput.toggleClass("input-error", isFlowInvalid); - credFileInput.toggleClass("input-error",credFileInput.text()===""); - saveButton.toggleClass('disabled',saveDisabled); - saveButton.prop('disabled',saveDisabled); - } - flowFileInput.on("change keyup paste",checkFiles); - - - if (!activeProject.files.flow) { - $('<span class="form-warning"><i class="fa fa-warning"></i> Missing</span>').appendTo(flowFileLabelText); - } - if (!activeProject.files.credentials) { - $('<span class="form-warning"><i class="fa fa-warning"></i> Missing</span>').appendTo(credFileLabel); - } - - - row = $('<div class="user-settings-row"></div>').appendTo(filesContainer); - - $('<label></label>').appendTo(row); - var credentialStateLabel = $('<span><i class="user-settings-credentials-state-icon fa"></i> <span class="user-settings-credentials-state"></span></span>').appendTo(row); - var credentialSecretButtons = $('<span class="button-group" style="margin-left: -72px;">').hide().appendTo(row); - - credentialStateLabel.css('color','#666'); - credentialSecretButtons.css('vertical-align','top'); - var credentialSecretResetButton = $('<button class="editor-button" style="vertical-align: top; width: 36px; margin-bottom: 10px"><i class="fa fa-trash-o"></i></button>') - .appendTo(credentialSecretButtons) - .click(function(e) { - e.preventDefault(); - if (!$(this).hasClass('selected')) { - credentialSecretNewInput.val(""); - credentialSecretExistingRow.hide(); - credentialSecretNewRow.show(); - $(this).addClass("selected"); - credentialSecretEditButton.removeClass("selected"); - credentialResetLabel.show(); - credentialResetWarning.show(); - credentialSetLabel.hide(); - credentialChangeLabel.hide(); - - credentialFormRows.show(); - } else { - $(this).removeClass("selected"); - credentialFormRows.hide(); - } - checkFiles(); - }); - var credentialSecretEditButton = $('<button class="editor-button" style="border-top-right-radius: 4px; border-bottom-right-radius: 4px; vertical-align: top; width: 36px; margin-bottom: 10px"><i class="fa fa-pencil"></i></button>') - .appendTo(credentialSecretButtons) - .click(function(e) { - e.preventDefault(); - if (!$(this).hasClass('selected')) { - credentialSecretExistingInput.val(""); - credentialSecretNewInput.val(""); - if (activeProject.settings.credentialSecretInvalid || !activeProject.settings.credentialsEncrypted) { - credentialSetLabel.show(); - credentialChangeLabel.hide(); - credentialSecretExistingRow.hide(); - } else { - credentialSecretExistingRow.show(); - credentialSetLabel.hide(); - credentialChangeLabel.show(); - } - credentialSecretNewRow.show(); - credentialSecretEditButton.addClass("selected"); - credentialSecretResetButton.removeClass("selected"); - - credentialResetLabel.hide(); - credentialResetWarning.hide(); - credentialFormRows.show(); - } else { - $(this).removeClass("selected"); - credentialFormRows.hide(); - } - checkFiles(); - }) - - - row = $('<div class="user-settings-row user-settings-row-credentials"></div>').hide().appendTo(filesContainer); - - - - var credentialFormRows = $('<div>',{style:"margin-top:10px"}).hide().appendTo(credentialStateLabel); - - var credentialSetLabel = $('<div style="margin: 20px 0 10px 5px;">' + RED._("sidebar.project.projectSettings.setTheEncryptionKey") + '</div>').hide().appendTo(credentialFormRows); - var credentialChangeLabel = $('<div style="margin: 20px 0 10px 5px;">' + RED._("sidebar.project.projectSettings.changeTheEncryptionKey") + '</div>').hide().appendTo(credentialFormRows); - var credentialResetLabel = $('<div style="margin: 20px 0 10px 5px;">' + RED._("sidebar.project.projectSettings.resetTheEncryptionKey") + '</div>').hide().appendTo(credentialFormRows); - - var credentialSecretExistingRow = $('<div class="user-settings-row user-settings-row-credentials"></div>').appendTo(credentialFormRows); - $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.currentKey")).appendTo(credentialSecretExistingRow); - var credentialSecretExistingInput = $('<input type="password">').appendTo(credentialSecretExistingRow) - .on("change keyup paste",function() { - if (popover) { - popover.close(); - popover = null; - } - checkFiles(); - }); - - var credentialSecretNewRow = $('<div class="user-settings-row user-settings-row-credentials"></div>').appendTo(credentialFormRows); - - - $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.newKey")).appendTo(credentialSecretNewRow); - var credentialSecretNewInput = $('<input type="password">').appendTo(credentialSecretNewRow).on("change keyup paste",checkFiles); - - var credentialResetWarning = $('<div class="form-tips form-warning" style="margin: 10px;"><i class="fa fa-warning"></i>' + RED._("sidebar.project.projectSettings.credentialsAlert") + '</div>').hide().appendTo(credentialFormRows); - - - var hideEditForm = function() { - editFilesButton.show(); - formButtons.hide(); - flowFileLabelText.show(); - flowFileInput.hide(); - flowFileInputSearch.hide(); - credFileLabel.show(); - credFileInput.hide(); - // credentialStateLabel.parent().show(); - credentialStateLabel.removeClass("uneditable-input"); - credentialStateLabel.css('height',''); - - flowFileInputSearch.removeClass('selected'); - flowFileLabel.find('.project-file-listing-container').remove(); - flowFileLabel.css('height',''); - flowFileLabel.css('color',''); - - $(".user-settings-row-credentials").hide(); - credentialFormRows.hide(); - credentialSecretButtons.hide(); - credentialSecretResetButton.removeClass("selected"); - credentialSecretEditButton.removeClass("selected"); - - - } - - var formButtons = $('<span class="button-row" style="position: relative; float: right; margin-right:0;"></span>').hide().appendTo(filesContainer); - $('<button class="editor-button">' + RED._("common.label.cancel") + '</button>') - .appendTo(formButtons) - .click(function(evt) { - evt.preventDefault(); - hideEditForm(); - }); - var saveButton = $('<button class="editor-button">' + RED._("common.label.save") + '</button>') - .appendTo(formButtons) - .click(function(evt) { - evt.preventDefault(); - var spinner = utils.addSpinnerOverlay(filesContainer); - var done = function(err) { - spinner.remove(); - if (err) { - utils.reportUnexpectedError(err); - return; - } - flowFileLabelText.text(flowFileInput.val()); - credFileLabel.text(credFileInput.text()); - hideEditForm(); - } - var payload = { - files: { - flow: flowFileInput.val(), - credentials: credFileInput.text() - } - } - - if (credentialSecretResetButton.hasClass('selected')) { - payload.resetCredentialSecret = true; - } - if (credentialSecretResetButton.hasClass('selected') || credentialSecretEditButton.hasClass('selected')) { - payload.credentialSecret = credentialSecretNewInput.val(); - if (credentialSecretExistingInput.is(":visible")) { - payload.currentCredentialSecret = credentialSecretExistingInput.val(); - } - } - - // console.log(JSON.stringify(payload,null,4)); - RED.deploy.setDeployInflight(true); - utils.sendRequest({ - url: "projects/"+activeProject.name, - type: "PUT", - responses: { - 0: function(error) { - done(error); - }, - 200: function(data) { - activeProject = data; - RED.sidebar.versionControl.refresh(true); - updateForm(); - done(); - }, - 400: { - 'credentials_load_failed': function(error) { - done(error); - }, - 'missing_current_credential_key': function(error) { - credentialSecretExistingInput.addClass("input-error"); - popover = RED.popover.create({ - target: credentialSecretExistingInput, - direction: 'right', - size: 'small', - content: "Incorrect key", - autoClose: 3000 - }).open(); - done(error); - }, - '*': function(error) { - done(error); - } - }, - } - },payload).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }); - }); - var updateForm = function() { - if (activeProject.settings.credentialSecretInvalid) { - credentialStateLabel.find(".user-settings-credentials-state-icon").removeClass().addClass("user-settings-credentials-state-icon fa fa-warning"); - credentialStateLabel.find(".user-settings-credentials-state").text(RED._("sidebar.project.projectSettings.invalidEncryptionKey")); - } else if (activeProject.settings.credentialsEncrypted) { - credentialStateLabel.find(".user-settings-credentials-state-icon").removeClass().addClass("user-settings-credentials-state-icon fa fa-lock"); - credentialStateLabel.find(".user-settings-credentials-state").text(RED._("sidebar.project.projectSettings.encryptionEnabled")); - } else { - credentialStateLabel.find(".user-settings-credentials-state-icon").removeClass().addClass("user-settings-credentials-state-icon fa fa-unlock"); - credentialStateLabel.find(".user-settings-credentials-state").text(RED._("sidebar.project.projectSettings.encryptionDisabled")); - } - credentialSecretResetButton.toggleClass('disabled',!activeProject.settings.credentialSecretInvalid && !activeProject.settings.credentialsEncrypted); - credentialSecretResetButton.prop('disabled',!activeProject.settings.credentialSecretInvalid && !activeProject.settings.credentialsEncrypted); - } - - checkFiles(); - updateForm(); - } - - function createLocalBranchListSection(activeProject,pane) { - var localBranchContainer = $('<div class="user-settings-section"></div>').appendTo(pane); - $('<h4></h4>').text(RED._("sidebar.project.projectSettings.branches")).appendTo(localBranchContainer); - - var row = $('<div class="user-settings-row projects-dialog-list"></div>').appendTo(localBranchContainer); - - - var branchList = $('<ol>').appendTo(row).editableList({ - height: 'auto', - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - var container = $('<div class="projects-dialog-list-entry">').appendTo(row); - if (entry.empty) { - container.addClass('red-ui-search-empty'); - container.text(RED._("sidebar.project.projectSettings.noBranches")); - return; - } - if (entry.current) { - container.addClass("current"); - } - $('<span class="entry-icon"><i class="fa fa-code-fork"></i></span>').appendTo(container); - var content = $('<span>').appendTo(container); - var topRow = $('<div>').appendTo(content); - $('<span class="entry-name">').text(entry.name).appendTo(topRow); - if (entry.commit) { - $('<span class="entry-detail">').text(entry.commit.sha).appendTo(topRow); - } - if (entry.remote) { - var bottomRow = $('<div>').appendTo(content); - - $('<span class="entry-detail entry-remote-name">').text(entry.remote||"").appendTo(bottomRow); - if (entry.status.ahead+entry.status.behind > 0) { - $('<span class="entry-detail">'+ - '<i class="fa fa-long-arrow-up"></i> <span>'+entry.status.ahead+'</span> '+ - '<i class="fa fa-long-arrow-down"></i> <span>'+entry.status.behind+'</span>'+ - '</span>').appendTo(bottomRow); - } - } - - if (!entry.current) { - var tools = $('<span class="entry-tools">').appendTo(container); - $('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>') - .appendTo(tools) - .click(function(e) { - e.preventDefault(); - var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain'); - var notification = RED.notify(RED._("sidebar.project.projectSettings.deleteConfirm", { name: entry.name }), { - type: "warning", - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - spinner.remove(); - notification.close(); - } - },{ - text: 'Delete branch', - click: function() { - notification.close(); - var url = "projects/"+activeProject.name+"/branches/"+entry.name; - var options = { - url: url, - type: "DELETE", - responses: { - 200: function(data) { - row.fadeOut(200,function() { - branchList.editableList('removeItem',entry); - spinner.remove(); - }); - }, - 400: { - 'git_delete_branch_unmerged': function(error) { - notification = RED.notify(RED._("sidebar.project.projectSettings.unmergedConfirm", { name: entry.name }), { - type: "warning", - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - spinner.remove(); - notification.close(); - } - },{ - text: RED._("sidebar.project.projectSettings.deleteUnmergedBranch"), - click: function() { - options.url += "?force=true"; - notification.close(); - utils.sendRequest(options); - } - } - ] - }); - }, - '*': function(error) { - utils.reportUnexpectedError(error); - spinner.remove(); - } - }, - } - } - utils.sendRequest(options); - } - } - - ] - }) - }) - } - - } - }); - - $.getJSON("projects/"+activeProject.name+"/branches",function(result) { - if (result.branches) { - if (result.branches.length > 0) { - result.branches.sort(function(A,B) { - if (A.current) { return -1 } - if (B.current) { return 1 } - return A.name.localeCompare(B.name); - }); - result.branches.forEach(function(branch) { - branchList.editableList('addItem',branch); - }) - } else { - branchList.editableList('addItem',{empty:true}); - } - } - }) - } - - function createRemoteRepositorySection(activeProject,pane) { - $('<h3></h3>').text(RED._("sidebar.project.projectSettings.versionControl")).appendTo(pane); - - createLocalBranchListSection(activeProject,pane); - - var repoContainer = $('<div class="user-settings-section"></div>').appendTo(pane); - var title = $('<h4></h4>').text(RED._("sidebar.project.projectSettings.gitRemotes")).appendTo(repoContainer); - - var editRepoButton = $('<button class="editor-button editor-button-small" style="float: right; margin-right: 10px;">' + RED._("sidebar.project.projectSettings.addRemote") + '</button>') - .appendTo(title) - .click(function(evt) { - editRepoButton.attr('disabled',true); - addRemoteDialog.slideDown(200, function() { - addRemoteDialog[0].scrollIntoView(); - if (isEmpty) { - remoteNameInput.val('origin'); - remoteURLInput.focus(); - } else { - remoteNameInput.focus(); - } - validateForm(); - }); - }); - - - var emptyItem = { empty: true }; - var isEmpty = true; - var row = $('<div class="user-settings-row"></div>').appendTo(repoContainer); - var addRemoteDialog = $('<div class="projects-dialog-list-dialog"></div>').hide().appendTo(row); - row = $('<div class="user-settings-row projects-dialog-list"></div>').appendTo(repoContainer); - var remotesList = $('<ol>').appendTo(row); - remotesList.editableList({ - addButton: false, - height: 'auto', - addItem: function(row,index,entry) { - - var container = $('<div class="projects-dialog-list-entry">').appendTo(row); - if (entry.empty) { - container.addClass('red-ui-search-empty'); - container.text(RED._("sidebar.project.projectSettings.noRemotes")); - return; - } else { - $('<span class="entry-icon"><i class="fa fa-globe"></i></span>').appendTo(container); - var content = $('<span>').appendTo(container); - $('<div class="entry-name">').text(entry.name).appendTo(content); - if (entry.urls.fetch === entry.urls.push) { - $('<div class="entry-detail">').text(entry.urls.fetch).appendTo(content); - } else { - $('<div class="entry-detail">').text("fetch: "+entry.urls.fetch).appendTo(content); - $('<div class="entry-detail">').text("push: "+entry.urls.push).appendTo(content); - - } - var tools = $('<span class="entry-tools">').appendTo(container); - $('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>') - .appendTo(tools) - .click(function(e) { - e.preventDefault(); - var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain'); - var notification = RED.notify(RED._("sidebar.project.projectSettings.deleteRemoteConfrim", { name: entry.name }), { - type: "warning", - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - spinner.remove(); - notification.close(); - } - },{ - text: RED._("sidebar.project.projectSettings.deleteRemote"), - click: function() { - notification.close(); - - if (activeProject.git.branches.remote && activeProject.git.branches.remote.indexOf(entry.name+"/") === 0) { - delete activeProject.git.branches.remote; - } - if (activeProject.git.branches.remoteAlt && activeProject.git.branches.remoteAlt.indexOf(entry.name+"/") === 0) { - delete activeProject.git.branches.remoteAlt; - } - - var url = "projects/"+activeProject.name+"/remotes/"+entry.name; - var options = { - url: url, - type: "DELETE", - responses: { - 200: function(data) { - row.fadeOut(200,function() { - remotesList.editableList('removeItem',entry); - setTimeout(spinner.remove, 100); - if (data.remotes.length === 0) { - delete activeProject.git.remotes; - isEmpty = true; - remotesList.editableList('addItem',emptyItem); - } else { - activeProject.git.remotes = {}; - data.remotes.forEach(function(remote) { - var name = remote.name; - delete remote.name; - activeProject.git.remotes[name] = remote; - }); - } - delete activeProject.git.branches.remoteAlt; - RED.sidebar.versionControl.refresh(); - }); - }, - 400: { - '*': function(error) { - utils.reportUnexpectedError(error); - spinner.remove(); - } - }, - } - } - utils.sendRequest(options); - } - } - - ] - }) - }); - } - - - } - }); - - var validateForm = function() { - var validName = /^[a-zA-Z0-9\-_]+$/.test(remoteNameInput.val()); - var repo = remoteURLInput.val(); - // var validRepo = /^(?:file|git|ssh|https?|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+(?:\.git)?(?:\/?|\#[\d\w\.\-_]+?)$/.test(remoteURLInput.val()); - var validRepo = repo.length > 0 && !/\s/.test(repo); - if (/^https?:\/\/[^/]+@/i.test(repo)) { - remoteURLLabel.text(RED._("sidebar.project.projectSettings.urlRule2")); - validRepo = false; - } else { - remoteURLLabel.text(RED._("sidebar.project.projectSettings.urlRule")); - } - saveButton.attr('disabled',(!validName || !validRepo)) - remoteNameInput.toggleClass('input-error',remoteNameInputChanged&&!validName); - remoteURLInput.toggleClass('input-error',remoteURLInputChanged&&!validRepo); - if (popover) { - popover.close(); - popover = null; - } - }; - var popover; - var remoteNameInputChanged = false; - var remoteURLInputChanged = false; - - $('<div class="projects-dialog-list-dialog-header">').text(RED._('sidebar.project.projectSettings.addRemote2')).appendTo(addRemoteDialog); - - row = $('<div class="user-settings-row"></div>').appendTo(addRemoteDialog); - $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.remoteName")).appendTo(row); - var remoteNameInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() { - remoteNameInputChanged = true; - validateForm(); - }); - $('<label class="projects-edit-form-sublabel"><small>' + RED._("sidebar.project.projectSettings.nameRule") + '</small></label>').appendTo(row).find("small"); - row = $('<div class="user-settings-row"></div>').appendTo(addRemoteDialog); - $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.url")).appendTo(row); - var remoteURLInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() { - remoteURLInputChanged = true; - validateForm() - }); - var remoteURLLabel = $('<label class="projects-edit-form-sublabel"><small>' + RED._("sidebar.project.projectSettings.urlRule") +'</small></label>').appendTo(row).find("small"); - - var hideEditForm = function() { - editRepoButton.attr('disabled',false); - addRemoteDialog.hide(); - remoteNameInput.val(""); - remoteURLInput.val(""); - if (popover) { - popover.close(); - popover = null; - } - } - var formButtons = $('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>') - .appendTo(addRemoteDialog); - $('<button class="editor-button">' + RED._("common.label.cancel") + '</button>') - .appendTo(formButtons) - .click(function(evt) { - evt.preventDefault(); - hideEditForm(); - }); - var saveButton = $('<button class="editor-button">' + RED._("sidebar.project.projectSettings.addRemote2") + '</button>') - .appendTo(formButtons) - .click(function(evt) { - evt.preventDefault(); - var spinner = utils.addSpinnerOverlay(addRemoteDialog).addClass('projects-dialog-spinner-contain'); - - var payload = { - name: remoteNameInput.val(), - url: remoteURLInput.val() - } - var done = function(err) { - spinner.remove(); - if (err) { - return; - } - hideEditForm(); - } - // console.log(JSON.stringify(payload,null,4)); - RED.deploy.setDeployInflight(true); - utils.sendRequest({ - url: "projects/"+activeProject.name+"/remotes", - type: "POST", - responses: { - 0: function(error) { - done(error); - }, - 200: function(data) { - activeProject.git.remotes = {}; - data.remotes.forEach(function(remote) { - var name = remote.name; - delete remote.name; - activeProject.git.remotes[name] = remote; - }); - updateForm(); - RED.sidebar.versionControl.refresh(); - done(); - }, - 400: { - 'git_remote_already_exists': function(error) { - popover = RED.popover.create({ - target: remoteNameInput, - direction: 'right', - size: 'small', - content: "Remote already exists", - autoClose: 6000 - }).open(); - remoteNameInput.addClass('input-error'); - done(error); - }, - '*': function(error) { - utils.reportUnexpectedError(error); - done(error); - } - }, - } - },payload); - }); - - var updateForm = function() { - remotesList.editableList('empty'); - var count = 0; - if (activeProject.git.hasOwnProperty('remotes')) { - for (var name in activeProject.git.remotes) { - if (activeProject.git.remotes.hasOwnProperty(name)) { - count++; - remotesList.editableList('addItem',{name:name,urls:activeProject.git.remotes[name]}); - } - } - } - isEmpty = (count === 0); - if (isEmpty) { - remotesList.editableList('addItem',emptyItem); - } - } - updateForm(); - } - - - - function createSettingsPane(activeProject) { - var pane = $('<div id="project-settings-tab-settings" class="project-settings-tab-pane node-help"></div>'); - createFilesSection(activeProject,pane); - // createLocalRepositorySection(activeProject,pane); - createRemoteRepositorySection(activeProject,pane); - return pane; - } - - function refreshModuleInUseCounts() { - modulesInUse = {}; - RED.nodes.eachNode(_updateModulesInUse); - RED.nodes.eachConfig(_updateModulesInUse); - } - - function _updateModulesInUse(n) { - if (!/^subflow:/.test(n.type)) { - var module = RED.nodes.registry.getNodeSetForType(n.type).module; - if (module !== 'node-red') { - if (!modulesInUse.hasOwnProperty(module)) { - modulesInUse[module] = { - module: module, - version: RED.nodes.registry.getModule(module).version, - count: 0, - known: false - } - } - modulesInUse[module].count++; - } - } - } - - var popover; - var utils; - var modulesInUse = {}; - function init(_utils) { - utils = _utils; - addPane({ - id:'main', - title: RED._("sidebar.project.name"), - get: createMainPane, - close: function() { } - }); - addPane({ - id:'deps', - title: RED._("sidebar.project.dependencies"), - get: createDependenciesPane, - close: function() { } - }); - addPane({ - id:'settings', - title: RED._("sidebar.project.settings"), - get: createSettingsPane, - close: function() { - if (popover) { - popover.close(); - popover = null; - } - } - }); - - RED.events.on('nodes:add', _updateModulesInUse); - RED.events.on('nodes:remove', function(n) { - if (!/^subflow:/.test(n.type)) { - var module = RED.nodes.registry.getNodeSetForType(n.type).module; - if (module !== 'node-red' && modulesInUse.hasOwnProperty(module)) { - modulesInUse[module].count--; - if (modulesInUse[module].count === 0) { - if (!modulesInUse[module].known) { - delete modulesInUse[module]; - } - } - } - } - }) - - - - } - return { - init: init, - show: show, - switchProject: function(name) { - // TODO: not ideal way to trigger this; should there be an editor-wide event? - modulesInUse = {}; - } - }; -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.projects.userSettings = (function() { - - var gitUsernameInput; - var gitEmailInput; - - function createGitUserSection(pane) { - - var currentGitSettings = RED.settings.get('git') || {}; - currentGitSettings.user = currentGitSettings.user || {}; - - var title = $('<h3></h3>').text(RED._("editor:sidebar.project.userSettings.committerDetail")).appendTo(pane); - - var gitconfigContainer = $('<div class="user-settings-section"></div>').appendTo(pane); - $('<div style="color:#aaa;"></div>').appendTo(gitconfigContainer).text(RED._("editor:sidebar.project.userSettings.committerTip")); - - var row = $('<div class="user-settings-row"></div>').appendTo(gitconfigContainer); - $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.userName")).appendTo(row); - gitUsernameInput = $('<input type="text">').appendTo(row); - gitUsernameInput.val(currentGitSettings.user.name||""); - - row = $('<div class="user-settings-row"></div>').appendTo(gitconfigContainer); - $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.email")).appendTo(row); - gitEmailInput = $('<input type="text">').appendTo(row); - gitEmailInput.val(currentGitSettings.user.email||""); - } - - - function createSSHKeySection(pane) { - var container = $('<div class="user-settings-section"></div>').appendTo(pane); - var popover; - var title = $('<h3></h3>').text(RED._("editor:sidebar.project.userSettings.sshKeys")).appendTo(container); - var subtitle = $('<div style="color:#aaa;"></div>').appendTo(container).text(RED._("editor:sidebar.project.userSettings.sshKeysTip")); - - var addKeyButton = $('<button id="user-settings-gitconfig-add-key" class="editor-button editor-button-small" style="float: right; margin-right: 10px;">'+RED._("editor:sidebar.project.userSettings.add")+'</button>') - .appendTo(subtitle) - .click(function(evt) { - addKeyButton.attr('disabled',true); - saveButton.attr('disabled',true); - // bg.children().removeClass("selected"); - // addLocalButton.click(); - addKeyDialog.slideDown(200); - keyNameInput.focus(); - }); - - var validateForm = function() { - var valid = /^[a-zA-Z0-9\-_]+$/.test(keyNameInput.val()); - keyNameInput.toggleClass('input-error',keyNameInputChanged&&!valid); - - // var selectedButton = bg.find(".selected"); - // if (selectedButton[0] === addLocalButton[0]) { - // valid = valid && localPublicKeyPathInput.val().length > 0 && localPrivateKeyPathInput.val().length > 0; - // } else if (selectedButton[0] === uploadButton[0]) { - // valid = valid && publicKeyInput.val().length > 0 && privateKeyInput.val().length > 0; - // } else if (selectedButton[0] === generateButton[0]) { - var passphrase = passphraseInput.val(); - var validPassphrase = passphrase.length === 0 || passphrase.length >= 8; - passphraseInput.toggleClass('input-error',!validPassphrase); - if (!validPassphrase) { - passphraseInputSubLabel.text(RED._("editor:sidebar.project.userSettings.passphraseShort")); - } else if (passphrase.length === 0) { - passphraseInputSubLabel.text(RED._("editor:sidebar.project.userSettings.optional")); - } else { - passphraseInputSubLabel.text(""); - } - valid = valid && validPassphrase; - // } - - saveButton.attr('disabled',!valid); - - if (popover) { - popover.close(); - popover = null; - } - }; - - var row = $('<div class="user-settings-row"></div>').appendTo(container); - var addKeyDialog = $('<div class="projects-dialog-list-dialog"></div>').hide().appendTo(row); - $('<div class="projects-dialog-list-dialog-header">').text(RED._("editor:sidebar.project.userSettings.addSshKey")).appendTo(addKeyDialog); - var addKeyDialogBody = $('<div>').appendTo(addKeyDialog); - - row = $('<div class="user-settings-row"></div>').appendTo(addKeyDialogBody); - $('<div style="color:#aaa;"></div>').appendTo(row).text(RED._("editor:sidebar.project.userSettings.addSshKeyTip")); - // var bg = $('<div></div>',{class:"button-group", style:"text-align: center"}).appendTo(row); - // var addLocalButton = $('<button class="editor-button toggle selected">use local key</button>').appendTo(bg); - // var uploadButton = $('<button class="editor-button toggle">upload key</button>').appendTo(bg); - // var generateButton = $('<button class="editor-button toggle">generate key</button>').appendTo(bg); - // bg.children().click(function(e) { - // e.preventDefault(); - // if ($(this).hasClass("selected")) { - // return; - // } - // bg.children().removeClass("selected"); - // $(this).addClass("selected"); - // if (this === addLocalButton[0]) { - // addLocalKeyPane.show(); - // generateKeyPane.hide(); - // uploadKeyPane.hide(); - // } else if (this === uploadButton[0]) { - // addLocalKeyPane.hide(); - // generateKeyPane.hide(); - // uploadKeyPane.show(); - // } else if (this === generateButton[0]){ - // addLocalKeyPane.hide(); - // generateKeyPane.show(); - // uploadKeyPane.hide(); - // } - // validateForm(); - // }) - - - row = $('<div class="user-settings-row"></div>').appendTo(addKeyDialogBody); - $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.name")).appendTo(row); - var keyNameInputChanged = false; - var keyNameInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() { - keyNameInputChanged = true; - validateForm(); - }); - $('<label class="projects-edit-form-sublabel"><small>'+RED._("editor:sidebar.project.userSettings.nameRule")+'</small></label>').appendTo(row).find("small"); - - var generateKeyPane = $('<div>').appendTo(addKeyDialogBody); - row = $('<div class="user-settings-row"></div>').appendTo(generateKeyPane); - $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.passphrase")).appendTo(row); - var passphraseInput = $('<input type="password">').appendTo(row).on("change keyup paste",validateForm); - var passphraseInputSubLabel = $('<label class="projects-edit-form-sublabel"><small>'+RED._("editor:sidebar.project.userSettings.optional")+'</small></label>').appendTo(row).find("small"); - - // var addLocalKeyPane = $('<div>').hide().appendTo(addKeyDialogBody); - // row = $('<div class="user-settings-row"></div>').appendTo(addLocalKeyPane); - // $('<label for=""></label>').text('Public key').appendTo(row); - // var localPublicKeyPathInput = $('<input type="text">').appendTo(row).on("change keyup paste",validateForm); - // $('<label class="projects-edit-form-sublabel"><small>Public key file path, for example: ~/.ssh/id_rsa.pub</small></label>').appendTo(row).find("small"); - // row = $('<div class="user-settings-row"></div>').appendTo(addLocalKeyPane); - // $('<label for=""></label>').text('Private key').appendTo(row); - // var localPrivateKeyPathInput = $('<input type="text">').appendTo(row).on("change keyup paste",validateForm); - // $('<label class="projects-edit-form-sublabel"><small>Private key file path, for example: ~/.ssh/id_rsa</small></label>').appendTo(row).find("small"); - // - // var uploadKeyPane = $('<div>').hide().appendTo(addKeyDialogBody); - // row = $('<div class="user-settings-row"></div>').appendTo(uploadKeyPane); - // $('<label for=""></label>').text('Public key').appendTo(row); - // var publicKeyInput = $('<textarea>').appendTo(row).on("change keyup paste",validateForm); - // $('<label class="projects-edit-form-sublabel"><small>Paste in public key contents, for example: ~/.ssh/id_rsa.pub</small></label>').appendTo(row).find("small"); - // row = $('<div class="user-settings-row"></div>').appendTo(uploadKeyPane); - // $('<label for=""></label>').text('Private key').appendTo(row); - // var privateKeyInput = $('<textarea>').appendTo(row).on("change keyup paste",validateForm); - // $('<label class="projects-edit-form-sublabel"><small>Paste in private key contents, for example: ~/.ssh/id_rsa</small></label>').appendTo(row).find("small"); - - - - - var hideEditForm = function() { - addKeyButton.attr('disabled',false); - addKeyDialog.hide(); - - keyNameInput.val(""); - keyNameInputChanged = false; - passphraseInput.val(""); - // localPublicKeyPathInput.val(""); - // localPrivateKeyPathInput.val(""); - // publicKeyInput.val(""); - // privateKeyInput.val(""); - if (popover) { - popover.close(); - popover = null; - } - } - var formButtons = $('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>').appendTo(addKeyDialog); - $('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.cancel")+'</button>') - .appendTo(formButtons) - .click(function(evt) { - evt.preventDefault(); - hideEditForm(); - }); - var saveButton = $('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.generate")+'</button>') - .appendTo(formButtons) - .click(function(evt) { - evt.preventDefault(); - var spinner = utils.addSpinnerOverlay(addKeyDialog).addClass('projects-dialog-spinner-contain'); - var payload = { - name: keyNameInput.val() - }; - - // var selectedButton = bg.find(".selected"); - // if (selectedButton[0] === addLocalButton[0]) { - // payload.type = "local"; - // payload.publicKeyPath = localPublicKeyPathInput.val(); - // payload.privateKeyPath = localPrivateKeyPathInput.val(); - // } else if (selectedButton[0] === uploadButton[0]) { - // payload.type = "upload"; - // payload.publicKey = publicKeyInput.val(); - // payload.privateKey = privateKeyInput.val(); - // } else if (selectedButton[0] === generateButton[0]) { - payload.type = "generate"; - payload.comment = gitEmailInput.val(); - payload.password = passphraseInput.val(); - payload.size = 4096; - // } - var done = function(err) { - spinner.remove(); - if (err) { - return; - } - hideEditForm(); - } - // console.log(JSON.stringify(payload,null,4)); - RED.deploy.setDeployInflight(true); - utils.sendRequest({ - url: "settings/user/keys", - type: "POST", - responses: { - 0: function(error) { - done(error); - }, - 200: function(data) { - refreshSSHKeyList(payload.name); - done(); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - done(error); - } - }, - } - },payload); - }); - - row = $('<div class="user-settings-row projects-dialog-list"></div>').appendTo(container); - var emptyItem = { empty: true }; - var expandKey = function(container,entry) { - var row = $('<div class="projects-dialog-ssh-public-key">',{style:"position:relative"}).appendTo(container); - var keyBox = $('<pre>',{style:"min-height: 80px"}).appendTo(row); - var spinner = utils.addSpinnerOverlay(keyBox).addClass('projects-dialog-spinner-contain'); - var options = { - url: 'settings/user/keys/'+entry.name, - type: "GET", - responses: { - 200: function(data) { - keyBox.text(data.publickey); - spinner.remove(); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - spinner.remove(); - } - }, - } - } - utils.sendRequest(options); - - var formButtons = $('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>').appendTo(row); - $('<button class="editor-button editor-button-small">'+RED._("editor:sidebar.project.userSettings.copyPublicKey")+'</button>') - .appendTo(formButtons) - .click(function(evt) { - try { - evt.stopPropagation(); - evt.preventDefault(); - document.getSelection().selectAllChildren(keyBox[0]); - var ret = document.execCommand('copy'); - document.getSelection().empty(); - } catch(err) { - - } - - }); - - return row; - } - var keyList = $('<ol class="projects-dialog-ssh-key-list">').appendTo(row).editableList({ - height: 'auto', - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - var container = $('<div class="projects-dialog-list-entry">').appendTo(row); - if (entry.empty) { - container.addClass('red-ui-search-empty'); - container.text(RED._("editor:sidebar.project.userSettings.noSshKeys")); - return; - } - var topRow = $('<div class="projects-dialog-ssh-key-header">').appendTo(container); - $('<span class="entry-icon"><i class="fa fa-key"></i></span>').appendTo(topRow); - $('<span class="entry-name">').text(entry.name).appendTo(topRow); - var tools = $('<span class="button-row entry-tools">').appendTo(topRow); - var expandedRow; - topRow.click(function(e) { - if (expandedRow) { - expandedRow.slideUp(200,function() { - expandedRow.remove(); - expandedRow = null; - }) - } else { - expandedRow = expandKey(container,entry); - } - }) - if (!entry.system) { - $('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>') - .appendTo(tools) - .click(function(e) { - e.stopPropagation(); - var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain'); - var notification = RED.notify(RED._("editor:sidebar.project.userSettings.deleteConfirm", {name:entry.name}), { - type: 'warning', - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - spinner.remove(); - notification.close(); - } - }, - { - text: RED._("editor:sidebar.project.userSettings.delete"), - click: function() { - notification.close(); - var url = "settings/user/keys/"+entry.name; - var options = { - url: url, - type: "DELETE", - responses: { - 200: function(data) { - row.fadeOut(200,function() { - keyList.editableList('removeItem',entry); - setTimeout(spinner.remove, 100); - if (keyList.editableList('length') === 0) { - keyList.editableList('addItem',emptyItem); - } - }); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - spinner.remove(); - } - }, - } - } - utils.sendRequest(options); - } - } - ] - }); - }); - } - if (entry.expand) { - expandedRow = expandKey(container,entry); - } - } - }); - - var refreshSSHKeyList = function(justAdded) { - $.getJSON("settings/user/keys",function(result) { - if (result.keys) { - result.keys.sort(function(A,B) { - return A.name.localeCompare(B.name); - }); - keyList.editableList('empty'); - result.keys.forEach(function(key) { - if (key.name === justAdded) { - key.expand = true; - } - keyList.editableList('addItem',key); - }); - if (keyList.editableList('length') === 0) { - keyList.editableList('addItem',emptyItem); - } - - } - }) - } - refreshSSHKeyList(); - - } - - function createSettingsPane(activeProject) { - var pane = $('<div id="user-settings-tab-gitconfig" class="project-settings-tab-pane node-help"></div>'); - createGitUserSection(pane); - createSSHKeySection(pane); - return pane; - } - - var utils; - function init(_utils) { - utils = _utils; - RED.userSettings.add({ - id:'gitconfig', - title: RED._("editor:sidebar.project.userSettings.gitConfig"), - get: createSettingsPane, - close: function() { - var currentGitSettings = RED.settings.get('git') || {}; - currentGitSettings.user = currentGitSettings.user || {}; - currentGitSettings.user.name = gitUsernameInput.val(); - currentGitSettings.user.email = gitEmailInput.val(); - RED.settings.set('git', currentGitSettings); - } - }); - } - - return { - init: init, - }; -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -RED.sidebar.versionControl = (function() { - - var sidebarContent; - var sections; - - var allChanges = {}; - - var unstagedChangesList; - var stageAllButton; - var stagedChangesList; - var unstageAllButton; - var unstagedChanges; - var stagedChanges; - var bulkChangeSpinner; - var unmergedContent; - var unmergedChangesList; - var commitButton; - var localChanges; - - var localCommitList; - var localCommitListShade; - // var remoteCommitList; - - var isMerging; - - function viewFileDiff(entry,state) { - var activeProject = RED.projects.getActiveProject(); - var diffTarget = (state === 'staged')?"index":"tree"; - utils.sendRequest({ - url: "projects/"+activeProject.name+"/diff/"+diffTarget+"/"+encodeURIComponent(entry.file), - type: "GET", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(data) { - var title; - if (state === 'unstaged') { - title = RED._("sidebar.project.versionControl.unstagedChanges")+' : '+entry.file - } else if (state === 'staged') { - title = RED._("sidebar.project.versionControl.stagedChanges")+' : '+entry.file - } else { - title = RED._("sidebar.project.versionControl.resolveConflicts")+' : '+entry.file - } - var options = { - diff: data.diff, - title: title, - unmerged: state === 'unmerged', - project: activeProject - } - if (state == 'unstaged') { - options.oldRevTitle = entry.indexStatus === " "?RED._("sidebar.project.versionControl.head"):RED._("sidebar.project.versionControl.staged"); - options.newRevTitle = RED._("sidebar.project.versionControl.unstaged"); - options.oldRev = entry.indexStatus === " "?"@":":0"; - options.newRev = "_"; - } else if (state === 'staged') { - options.oldRevTitle = RED._("sidebar.project.versionControl.head"); - options.newRevTitle = RED._("sidebar.project.versionControl.staged"); - options.oldRev = "@"; - options.newRev = ":0"; - } else { - options.oldRevTitle = RED._("sidebar.project.versionControl.local"); - options.newRevTitle = RED._("sidebar.project.versionControl.remote"); - options.commonRev = ":1"; - options.oldRev = ":2"; - options.newRev = ":3"; - options.onresolve = function(resolution) { - utils.sendRequest({ - url: "projects/"+activeProject.name+"/resolve/"+encodeURIComponent(entry.file), - type: "POST", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(data) { - refresh(true); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - // done(error,null); - } - }, - } - },{resolutions:resolution.resolutions[entry.file]}); - } - } - RED.diff.showUnifiedDiff(options); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - // done(error,null); - } - } - } - }) - } - - function createChangeEntry(row, entry, status, state) { - row.addClass("sidebar-version-control-change-entry"); - var container = $('<div>').appendTo(row); - if (entry.label) { - row.addClass('node-info-none'); - container.text(entry.label); - if (entry.button) { - container.css({ - display: "inline-block", - maxWidth: "300px", - textAlign: "left" - }) - var toolbar = $('<div style="float: right; margin: 5px; height: 50px;"></div>').appendTo(container); - - $('<button class="editor-button editor-button-small"></button>').text(entry.button.label) - .appendTo(toolbar) - .click(entry.button.click); - } - return; - } - - - var icon = $('<i class=""></i>').appendTo(container); - var entryLink = $('<a href="#">') - .appendTo(container) - .click(function(e) { - e.preventDefault(); - viewFileDiff(entry,state); - }); - var label = $('<span>').appendTo(entryLink); - - var entryTools = $('<div class="sidebar-version-control-change-entry-tools">').appendTo(row); - var bg; - var revertButton; - if (state === 'unstaged') { - bg = $('<span class="button-group" style="margin-right: 5px;"></span>').appendTo(entryTools); - revertButton = $('<button class="editor-button editor-button-small"><i class="fa fa-reply"></i></button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - - var spinner = utils.addSpinnerOverlay(container).addClass('projects-dialog-spinner-contain'); - var notification = RED.notify(RED._("sidebar.project.versionControl.revert",{file:entry.file}), { - type: "warning", - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - spinner.remove(); - notification.close(); - } - },{ - text: RED._("sidebar.project.versionControl.revertChanges"), - click: function() { - notification.close(); - var activeProject = RED.projects.getActiveProject(); - var url = "projects/"+activeProject.name+"/files/_/"+entry.file; - var options = { - url: url, - type: "DELETE", - responses: { - 200: function(data) { - spinner.remove(); - }, - 400: { - 'unexpected_error': function(error) { - spinner.remove(); - console.log(error); - // done(error,null); - } - } - } - } - RED.deploy.setDeployInflight(true); - utils.sendRequest(options).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }); - } - } - - ] - }) - - }); - } - bg = $('<span class="button-group"></span>').appendTo(entryTools); - if (state !== 'unmerged') { - $('<button class="editor-button editor-button-small"><i class="fa fa-'+((state==='unstaged')?"plus":"minus")+'"></i></button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - var activeProject = RED.projects.getActiveProject(); - entry.spinner = utils.addSpinnerOverlay(row).addClass('projects-version-control-spinner-sidebar'); - utils.sendRequest({ - url: "projects/"+activeProject.name+"/stage/"+encodeURIComponent(entry.file), - type: (state==='unstaged')?"POST":"DELETE", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(data) { - refreshFiles(data); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - // done(error,null); - } - }, - } - },{}); - }); - } - entry["update"+((state==='unstaged')?"Unstaged":"Staged")] = function(entry,status) { - container.removeClass(); - var iconClass = ""; - if (status === 'A') { - container.addClass("node-diff-added"); - iconClass = "fa-plus-square"; - } else if (status === '?') { - container.addClass("node-diff-unchanged"); - iconClass = "fa-question-circle-o"; - } else if (status === 'D') { - container.addClass("node-diff-deleted"); - iconClass = "fa-minus-square"; - } else if (status === 'M') { - container.addClass("node-diff-changed"); - iconClass = "fa-square"; - } else if (status === 'R') { - container.addClass("node-diff-changed"); - iconClass = "fa-toggle-right"; - } else if (status === 'U') { - container.addClass("node-diff-conflicted"); - iconClass = "fa-exclamation-triangle"; - } else { - iconClass = "fa-exclamation-triangle" - } - label.empty(); - $('<span>').text(entry.file.replace(/\\(.)/g,"$1")).appendTo(label); - - if (entry.oldName) { - $('<i class="fa fa-long-arrow-right"></i>').prependTo(label); - $('<span>').text(entry.oldName.replace(/\\(.)/g,"$1")).prependTo(label); - // label.text(entry.oldName+" -> "+entry.file); - } - // console.log(entry.file,status,iconClass); - - icon.removeClass(); - icon.addClass("fa "+iconClass); - if (entry.spinner) { - entry.spinner.remove(); - delete entry.spinner; - } - - if (revertButton) { - revertButton.toggle(status !== '?'); - } - entryLink.toggleClass("disabled",(status === 'D' || status === '?')); - } - entry["update"+((state==='unstaged')?"Unstaged":"Staged")](entry, status); - } - var utils; - var emptyStagedItem; - var emptyMergedItem; - function init(_utils) { - utils = _utils; - - RED.actions.add("core:show-version-control-tab",show); - RED.events.on("deploy", function() { - var activeProject = RED.projects.getActiveProject(); - if (activeProject) { - // TODO: this is a full refresh of the files - should be able to - // just do an incremental refresh - allChanges = {}; - unstagedChangesList.editableList('empty'); - stagedChangesList.editableList('empty'); - unmergedChangesList.editableList('empty'); - - $.getJSON("projects/"+activeProject.name+"/status",function(result) { - refreshFiles(result); - }); - } - }); - RED.events.on("login",function() { - refresh(true); - }); - sidebarContent = $('<div>', {class:"sidebar-version-control"}); - var stackContainer = $("<div>",{class:"sidebar-version-control-stack"}).appendTo(sidebarContent); - sections = RED.stack.create({ - container: stackContainer, - fill: true, - singleExpanded: true - }); - - localChanges = sections.add({ - title: RED._("sidebar.project.versionControl.localChanges"), - collapsible: true - }); - localChanges.expand(); - localChanges.content.css({height:"100%"}); - - var bg = $('<div style="float: right"></div>').appendTo(localChanges.header); - $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - refresh(true); - }) - - emptyStagedItem = { label: RED._("sidebar.project.versionControl.none") }; - emptyMergedItem = { label: RED._("sidebar.project.versionControl.conflictResolve") }; - - var unstagedContent = $('<div class="sidebar-version-control-change-container"></div>').appendTo(localChanges.content); - var header = $('<div class="sidebar-version-control-change-header">'+RED._("sidebar.project.versionControl.localFiles")+'</div>').appendTo(unstagedContent); - stageAllButton = $('<button class="editor-button editor-button-small" style="float: right"><i class="fa fa-plus"></i> '+RED._("sidebar.project.versionControl.all")+'</button>') - .appendTo(header) - .click(function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - var toStage = Object.keys(allChanges).filter(function(fn) { - return allChanges[fn].treeStatus !== ' '; - }); - updateBulk(toStage,true); - }); - unstagedChangesList = $("<ol>",{style:"position: absolute; top: 30px; bottom: 0; right:0; left:0;"}).appendTo(unstagedContent); - unstagedChangesList.editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - createChangeEntry(row,entry,entry.treeStatus,'unstaged'); - }, - sort: function(A,B) { - if (A.treeStatus === '?' && B.treeStatus !== '?') { - return 1; - } else if (A.treeStatus !== '?' && B.treeStatus === '?') { - return -1; - } - return A.file.localeCompare(B.file); - } - - }) - - unmergedContent = $('<div class="sidebar-version-control-change-container"></div>').appendTo(localChanges.content); - - header = $('<div class="sidebar-version-control-change-header">'+RED._("sidebar.project.versionControl.unmergedChanges")+'</div>').appendTo(unmergedContent); - bg = $('<div style="float: right"></div>').appendTo(header); - var abortMergeButton = $('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.abortMerge")+'</button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - var spinner = utils.addSpinnerOverlay(unmergedContent); - var activeProject = RED.projects.getActiveProject(); - RED.deploy.setDeployInflight(true); - utils.sendRequest({ - url: "projects/"+activeProject.name+"/merge", - type: "DELETE", - responses: { - 0: function(error) { - console.log(error); - }, - 200: function(data) { - spinner.remove(); - refresh(true); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - } - }, - } - }).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }); - }); - unmergedChangesList = $("<ol>",{style:"position: absolute; top: 30px; bottom: 0; right:0; left:0;"}).appendTo(unmergedContent); - unmergedChangesList.editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - if (entry === emptyMergedItem) { - entry.button = { - label: RED._("sidebar.project.versionControl.commit"), - click: function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - showCommitBox(); - } - } - } - createChangeEntry(row,entry,entry.treeStatus,'unmerged'); - }, - sort: function(A,B) { - if (A.treeStatus === '?' && B.treeStatus !== '?') { - return 1; - } else if (A.treeStatus !== '?' && B.treeStatus === '?') { - return -1; - } - return A.file.localeCompare(B.file); - } - - }) - - - var stagedContent = $('<div class="sidebar-version-control-change-container"></div>').appendTo(localChanges.content); - - header = $('<div class="sidebar-version-control-change-header">'+RED._("sidebar.project.versionControl.changeToCommit")+'</div>').appendTo(stagedContent); - - bg = $('<div style="float: right"></div>').appendTo(header); - var showCommitBox = function() { - commitMessage.val(""); - submitCommitButton.attr("disabled",true); - unstagedContent.css("height","30px"); - if (unmergedContent.is(":visible")) { - unmergedContent.css("height","30px"); - stagedContent.css("height","calc(100% - 60px - 175px)"); - } else { - stagedContent.css("height","calc(100% - 30px - 175px)"); - } - commitBox.show(); - setTimeout(function() { - commitBox.css("height","175px"); - },10); - stageAllButton.attr("disabled",true); - unstageAllButton.attr("disabled",true); - commitButton.attr("disabled",true); - abortMergeButton.attr("disabled",true); - commitMessage.focus(); - } - commitButton = $('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.commit")+'</button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - showCommitBox(); - }); - unstageAllButton = $('<button class="editor-button editor-button-small"><i class="fa fa-minus"></i> '+RED._("sidebar.project.versionControl.all")+'</button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - var toUnstage = Object.keys(allChanges).filter(function(fn) { - return allChanges[fn].indexStatus !== ' ' && allChanges[fn].indexStatus !== '?'; - }); - updateBulk(toUnstage,false); - - }); - - - stagedChangesList = $("<ol>",{style:"position: absolute; top: 30px; bottom: 0; right:0; left:0;"}).appendTo(stagedContent); - stagedChangesList.editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - createChangeEntry(row,entry,entry.indexStatus,'staged'); - }, - sort: function(A,B) { - return A.file.localeCompare(B.file); - } - }) - - commitBox = $('<div class="sidebar-version-control-slide-box sidebar-version-control-slide-box-bottom"></div>').hide().appendTo(localChanges.content); - - var commitMessage = $('<textarea placeholder='+RED._("sidebar.project.versionControl.commitPlaceholder")+'></textarea>') - .appendTo(commitBox) - .on("change keyup paste",function() { - submitCommitButton.attr('disabled',$(this).val().trim()===""); - }); - var commitToolbar = $('<div class="sidebar-version-control-slide-box-toolbar button-group">').appendTo(commitBox); - - var cancelCommitButton = $('<button class="editor-button">'+RED._("sidebar.project.versionControl.cancelCapital")+'</button>') - .appendTo(commitToolbar) - .click(function(evt) { - evt.preventDefault(); - commitMessage.val(""); - unstagedContent.css("height",""); - unmergedContent.css("height",""); - stagedContent.css("height",""); - commitBox.css("height",0); - setTimeout(function() { - commitBox.hide(); - },200); - stageAllButton.attr("disabled",false); - unstageAllButton.attr("disabled",false); - commitButton.attr("disabled",false); - abortMergeButton.attr("disabled",false); - - }) - var submitCommitButton = $('<button class="editor-button">'+RED._("sidebar.project.versionControl.commitCapital")+'</button>') - .appendTo(commitToolbar) - .click(function(evt) { - evt.preventDefault(); - var spinner = utils.addSpinnerOverlay(submitCommitButton).addClass('projects-dialog-spinner-sidebar'); - var activeProject = RED.projects.getActiveProject(); - RED.deploy.setDeployInflight(true); - utils.sendRequest({ - url: "projects/"+activeProject.name+"/commit", - type: "POST", - responses: { - 0: function(error) { - console.log(error); - }, - 200: function(data) { - spinner.remove(); - cancelCommitButton.click(); - refresh(true); - }, - 400: { - '*': function(error) { - utils.reportUnexpectedError(error); - } - }, - } - },{ - message:commitMessage.val() - }).always(function() { - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }) - }) - - - var localHistory = sections.add({ - title: RED._("sidebar.project.versionControl.commitHistory"), - collapsible: true - }); - - var bg = $('<div style="float: right"></div>').appendTo(localHistory.header); - $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>') - .appendTo(bg) - .click(function(evt) { - evt.preventDefault(); - refresh(true,true); - }) - - var localBranchToolbar = $('<div class="sidebar-version-control-change-header" style="text-align: right;"></div>').appendTo(localHistory.content); - - var localBranchButton = $('<button class="editor-button editor-button-small"><i class="fa fa-code-fork"></i> '+RED._("sidebar.project.versionControl.branch")+' <span id="sidebar-version-control-local-branch"></span></button>') - .appendTo(localBranchToolbar) - .click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('selected')) { - closeBranchBox(); - } else { - closeRemoteBox(); - localCommitListShade.show(); - $(this).addClass('selected'); - var activeProject = RED.projects.getActiveProject(); - localBranchList.refresh("projects/"+activeProject.name+"/branches"); - localBranchBox.show(); - setTimeout(function() { - localBranchBox.css("height","215px"); - localBranchList.focus(); - },100); - } - }) - var repoStatusButton = $('<button class="editor-button editor-button-small" style="margin-left: 10px;" id="sidebar-version-control-repo-status-button">'+ - '<span id="sidebar-version-control-repo-status-stats">'+ - '<i class="fa fa-long-arrow-up"></i> <span id="sidebar-version-control-commits-ahead"></span> '+ - '<i class="fa fa-long-arrow-down"></i> <span id="sidebar-version-control-commits-behind"></span>'+ - '</span>'+ - '<span id="sidebar-version-control-repo-status-auth-issue">'+ - '<i class="fa fa-warning"></i>'+ - '</span>'+ - '</button>') - .appendTo(localBranchToolbar) - .click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('selected')) { - closeRemoteBox(); - } else { - closeBranchBox(); - localCommitListShade.show(); - $(this).addClass('selected'); - var activeProject = RED.projects.getActiveProject(); - $("#sidebar-version-control-repo-toolbar-set-upstream-row").toggle(!!activeProject.git.branches.remoteAlt); - remoteBox.show(); - - setTimeout(function() { - remoteBox.css("height","265px"); - },100); - - } - }); - - localCommitList = $("<ol>",{style:"position: absolute; top: 30px; bottom: 0px; right:0; left:0;"}).appendTo(localHistory.content); - localCommitListShade = $('<div class="component-shade" style="z-Index: 3"></div>').css('top',"30px").hide().appendTo(localHistory.content); - localCommitList.editableList({ - addButton: false, - scrollOnAdd: false, - addItem: function(row,index,entry) { - row.addClass('sidebar-version-control-commit-entry'); - if (entry.url) { - row.addClass('sidebar-version-control-commit-more'); - row.text("+ "+(entry.total-entry.totalKnown)+RED._("sidebar.project.versionControl.moreCommits")); - row.click(function(e) { - e.preventDefault(); - getCommits(entry.url,localCommitList,row,entry.limit,entry.before); - }) - } else { - row.click(function(e) { - var activeProject = RED.projects.getActiveProject(); - if (activeProject) { - $.getJSON("projects/"+activeProject.name+"/commits/"+entry.sha,function(result) { - result.project = activeProject; - result.parents = entry.parents; - result.oldRev = entry.sha+"~1"; - result.newRev = entry.sha; - result.oldRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7)+"~1"; - result.newRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7); - result.date = humanizeSinceDate(parseInt(entry.date)); - RED.diff.showCommitDiff(result); - }); - } - }); - var container = $('<div>').appendTo(row); - $('<div class="sidebar-version-control-commit-subject">').text(entry.subject).appendTo(container); - if (entry.refs) { - var refDiv = $('<div class="sidebar-version-control-commit-refs">').appendTo(container); - entry.refs.forEach(function(ref) { - var label = ref; - if (/HEAD -> /.test(ref)) { - label = ref.substring(8); - } - $('<span class="sidebar-version-control-commit-ref">').text(label).appendTo(refDiv); - }); - row.addClass('sidebar-version-control-commit-head'); - } - $('<div class="sidebar-version-control-commit-sha">').text(entry.sha.substring(0,7)).appendTo(container); - // $('<div class="sidebar-version-control-commit-user">').text(entry.author).appendTo(container); - $('<div class="sidebar-version-control-commit-date">').text(humanizeSinceDate(parseInt(entry.date))).appendTo(container); - } - } - }); - - - var closeBranchBox = function(done) { - localBranchButton.removeClass('selected') - localBranchBox.css("height","0"); - localCommitListShade.hide(); - - setTimeout(function() { - localBranchBox.hide(); - if (done) { done() } - },200); - } - var localBranchBox = $('<div class="sidebar-version-control-slide-box sidebar-version-control-slide-box-top" style="top:30px;"></div>').hide().appendTo(localHistory.content); - - $('<div class="sidebar-version-control-slide-box-header"></div>').text(RED._("sidebar.project.versionControl.changeLocalBranch")).appendTo(localBranchBox); - - var localBranchList = utils.createBranchList({ - placeholder: RED._("sidebar.project.versionControl.createBranchPlaceholder"), - container: localBranchBox, - onselect: function(body) { - if (body.current) { - return closeBranchBox(); - } - var spinner = utils.addSpinnerOverlay(localBranchBox); - var activeProject = RED.projects.getActiveProject(); - RED.deploy.setDeployInflight(true); - utils.sendRequest({ - url: "projects/"+activeProject.name+"/branches", - type: "POST", - requireCleanWorkspace: true, - cancel: function() { - spinner.remove(); - }, - responses: { - 0: function(error) { - spinner.remove(); - console.log(error); - // done(error,null); - }, - 200: function(data) { - // Changing branch will trigger a runtime event - // that leads to a project refresh. - closeBranchBox(function() { - spinner.remove(); - }); - }, - 400: { - 'git_local_overwrite': function(error) { - spinner.remove(); - RED.notify(RED._("sidebar.project.versionControl.localOverwrite"),{ - type:'error', - timeout: 8000 - }); - }, - 'unexpected_error': function(error) { - spinner.remove(); - console.log(error); - // done(error,null); - } - }, - } - },body).always(function(){ - setTimeout(function() { - RED.deploy.setDeployInflight(false); - },500); - }); - } - }); - - var remoteBox = $('<div class="sidebar-version-control-slide-box sidebar-version-control-slide-box-top" style="top:30px"></div>').hide().appendTo(localHistory.content); - var closeRemoteBox = function() { - $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked',false); - repoStatusButton.removeClass('selected') - remoteBox.css("height","0"); - localCommitListShade.hide(); - setTimeout(function() { - remoteBox.hide(); - closeRemoteBranchBox(); - },200); - } - - var closeRemoteBranchBox = function(done) { - if (remoteBranchButton.hasClass('selected')) { - remoteBranchButton.removeClass('selected'); - remoteBranchSubRow.height(0); - remoteBox.css("height","265px"); - setTimeout(function() { - remoteBranchSubRow.hide(); - if (done) { done(); } - },200); - } - } - $('<div class="sidebar-version-control-slide-box-header"></div>').text(RED._("sidebar.project.versionControl.manageRemoteBranch")).appendTo(remoteBox); - - var remoteBranchRow = $('<div style="margin-bottom: 5px;"></div>').appendTo(remoteBox); - var remoteBranchButton = $('<button id="sidebar-version-control-repo-branch" class="sidebar-version-control-repo-action editor-button"><i class="fa fa-code-fork"></i> '+RED._("sidebar.project.versionControl.remote")+': <span id="sidebar-version-control-remote-branch"></span></button>') - .appendTo(remoteBranchRow) - .click(function(evt) { - evt.preventDefault(); - if ($(this).hasClass('selected')) { - closeRemoteBranchBox(); - } else { - $(this).addClass('selected'); - var activeProject = RED.projects.getActiveProject(); - remoteBranchList.refresh("projects/"+activeProject.name+"/branches/remote"); - remoteBranchSubRow.show(); - setTimeout(function() { - remoteBranchSubRow.height(180); - remoteBox.css("height","445px"); - remoteBranchList.focus(); - },100); - } - }); - - $('<div id="sidebar-version-control-repo-toolbar-message" class="sidebar-version-control-slide-box-header" style="min-height: 100px;"></div>').appendTo(remoteBox); - - - var errorMessage = $('<div id="sidebar-version-control-repo-toolbar-error-message" class="sidebar-version-control-slide-box-header" style="min-height: 100px;"></div>').hide().appendTo(remoteBox); - $('<div style="margin-top: 10px;"><i class="fa fa-warning"></i> '+RED._("sidebar.project.versionControl.unableToAccess")+'</div>').appendTo(errorMessage) - var buttonRow = $('<div style="margin: 10px 30px; text-align: center"></div>').appendTo(errorMessage); - $('<button class="editor-button" style="width: 80%;"><i class="fa fa-refresh"></i> '+RED._("sidebar.project.versionControl.retry")+'</button>') - .appendTo(buttonRow) - .click(function(e) { - e.preventDefault(); - var activeProject = RED.projects.getActiveProject(); - var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain"); - utils.sendRequest({ - url: "projects/"+activeProject.name+"/branches/remote", - type: "GET", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(data) { - refresh(true); - }, - 400: { - 'git_connection_failed': function(error) { - RED.notify(error.message,'error'); - }, - 'git_not_a_repository': function(error) { - RED.notify(error.message,'error'); - }, - 'git_repository_not_found': function(error) { - RED.notify(error.message,'error'); - }, - 'unexpected_error': function(error) { - console.log(error); - // done(error,null); - } - } - } - }).always(function() { - spinner.remove(); - }); - }) - - $('<div class="sidebar-version-control-slide-box-header" style="height: 20px;"><label id="sidebar-version-control-repo-toolbar-set-upstream-row" for="sidebar-version-control-repo-toolbar-set-upstream" class="hide"><input type="checkbox" id="sidebar-version-control-repo-toolbar-set-upstream"> '+RED._("sidebar.project.versionControl.setUpstreamBranch")+'</label></div>').appendTo(remoteBox); - - var remoteBranchSubRow = $('<div style="height: 0;overflow:hidden; transition: height 0.2s ease-in-out;"></div>').hide().appendTo(remoteBranchRow); - var remoteBranchList = utils.createBranchList({ - placeholder: RED._("sidebar.project.versionControl.createRemoteBranchPlaceholder"), - currentLabel: RED._("sidebar.project.versionControl.upstream"), - remote: function() { - var project = RED.projects.getActiveProject(); - var remotes = Object.keys(project.git.remotes); - return remotes[0]; - }, - container: remoteBranchSubRow, - onselect: function(body) { - $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked',false); - $("#sidebar-version-control-repo-toolbar-set-upstream").prop('disabled',false); - $("#sidebar-version-control-remote-branch").text(body.name+(body.create?" *":"")); - var activeProject = RED.projects.getActiveProject(); - if (activeProject.git.branches.remote === body.name) { - delete activeProject.git.branches.remoteAlt; - } else { - activeProject.git.branches.remoteAlt = body.name; - } - $("#sidebar-version-control-repo-toolbar-set-upstream-row").toggle(!!activeProject.git.branches.remoteAlt); - closeRemoteBranchBox(function() { - if (!body.create) { - var start = Date.now(); - var spinner = utils.addSpinnerOverlay($('#sidebar-version-control-repo-toolbar-message')).addClass("projects-dialog-spinner-contain"); - $.getJSON("projects/"+activeProject.name+"/branches/remote/"+body.name+"/status", function(result) { - setTimeout(function() { - updateRemoteStatus(result.commits.ahead, result.commits.behind); - spinner.remove(); - },Math.max(400-(Date.now() - start),0)); - }) - } else { - if (!activeProject.git.branches.remote) { - $('#sidebar-version-control-repo-toolbar-message').text(RED._("sidebar.project.versionControl.trackedUpstreamBranch")); - $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked',true); - $("#sidebar-version-control-repo-toolbar-set-upstream").prop('disabled',true); - } else { - $('#sidebar-version-control-repo-toolbar-message').text(RED._("sidebar.project.versionControl.selectUpstreamBranch")); - } - $("#sidebar-version-control-repo-pull").attr('disabled',true); - $("#sidebar-version-control-repo-push").attr('disabled',false); - } - }); - } - }); - - - var row = $('<div style="margin-bottom: 5px;"></div>').appendTo(remoteBox); - - $('<button id="sidebar-version-control-repo-push" class="sidebar-version-control-repo-sub-action editor-button"><i class="fa fa-long-arrow-up"></i> <span data-i18n="sidebar.project.versionControl.push"></span></button>') - .appendTo(row) - .click(function(e) { - e.preventDefault(); - var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain"); - var activeProject = RED.projects.getActiveProject(); - var url = "projects/"+activeProject.name+"/push"; - if (activeProject.git.branches.remoteAlt) { - url+="/"+activeProject.git.branches.remoteAlt; - } - var setUpstream = $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked'); - if (setUpstream) { - url+="?u=true" - } - utils.sendRequest({ - url: url, - type: "POST", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(data) { - if (setUpstream && activeProject.git.branches.remoteAlt) { - activeProject.git.branches.remote = activeProject.git.branches.remoteAlt; - delete activeProject.git.branches.remoteAlt; - } - refresh(true); - closeRemoteBox(); - }, - 400: { - 'git_push_failed': function(err) { - // TODO: better message - RED.notify(RED._("sidebar.project.versionControl.pushFailed"),"error"); - }, - 'unexpected_error': function(error) { - console.log(error); - // done(error,null); - } - }, - } - },{}).always(function() { - spinner.remove(); - }); - }); - - var pullRemote = function(options) { - options = options || {}; - var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain"); - var activeProject = RED.projects.getActiveProject(); - var url = "projects/"+activeProject.name+"/pull"; - if (activeProject.git.branches.remoteAlt) { - url+="/"+activeProject.git.branches.remoteAlt; - } - if (options.setUpstream || options.allowUnrelatedHistories) { - url+="?"; - } - if (options.setUpstream) { - url += "setUpstream=true" - if (options.allowUnrelatedHistories) { - url += "&"; - } - } - if (options.allowUnrelatedHistories) { - url += "allowUnrelatedHistories=true" - } - utils.sendRequest({ - url: url, - type: "POST", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(data) { - if (options.setUpstream && activeProject.git.branches.remoteAlt) { - activeProject.git.branches.remote = activeProject.git.branches.remoteAlt; - delete activeProject.git.branches.remoteAlt; - } - refresh(true); - closeRemoteBox(); - }, - 400: { - 'git_local_overwrite': function(err) { - RED.notify(RED._("sidebar.project.versionControl.unablePull")+ - '<p><a href="#" onclick="RED.sidebar.versionControl.showLocalChanges(); return false;">'+RED._("sidebar.project.versionControl.showUnstagedChanges")+'</a></p>',"error",false,10000000); - }, - 'git_pull_merge_conflict': function(err) { - refresh(true); - closeRemoteBox(); - }, - 'git_connection_failed': function(err) { - RED.notify(RED._("sidebar.project.versionControl.connectionFailed")+err.toString(),"warning") - }, - 'git_pull_unrelated_history': function(error) { - var notification = RED.notify(RED._("sidebar.project.versionControl.pullUnrelatedHistory"),{ - type: 'error', - modal: true, - fixed: true, - buttons: [ - { - text: RED._("common.label.cancel"), - click: function() { - notification.close(); - } - },{ - text: RED._("sidebar.project.versionControl.pullChanges"), - click: function() { - notification.close(); - options.allowUnrelatedHistories = true; - pullRemote(options) - } - } - ] - }); - }, - '*': function(error) { - utils.reportUnexpectedError(error); - } - }, - } - },{}).always(function() { - spinner.remove(); - }); - } - $('<button id="sidebar-version-control-repo-pull" class="sidebar-version-control-repo-sub-action editor-button"><i class="fa fa-long-arrow-down"></i> <span data-i18n="sidebar.project.versionControl.pull"></span></button>') - .appendTo(row) - .click(function(e) { - e.preventDefault(); - pullRemote({ - setUpstream: $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked') - }); - }); - - $('<div class="component-shade sidebar-version-control-shade">').appendTo(sidebarContent); - - RED.sidebar.addTab({ - id: "version-control", - label: RED._("sidebar.project.versionControl.history"), - name: "Project History", - content: sidebarContent, - enableOnEdit: false, - pinned: true, - iconClass: "fa fa-code-fork", - onchange: function() { - setTimeout(function() { - sections.resize(); - },10); - } - }); - - } - - function humanizeSinceDate(date) { - var delta = (Date.now()/1000) - date; - - var daysDelta = Math.floor(delta / (60*60*24)); - if (daysDelta > 30) { - return (new Date(date*1000)).toLocaleDateString(); - } else if (daysDelta > 0) { - return RED._("sidebar.project.versionControl.daysAgo", {count:daysDelta}) - } - var hoursDelta = Math.floor(delta / (60*60)); - if (hoursDelta > 0) { - return RED._("sidebar.project.versionControl.hoursAgo", {count:hoursDelta}) - } - var minutesDelta = Math.floor(delta / 60); - if (minutesDelta > 0) { - return RED._("sidebar.project.versionControl.minsAgo", {count:minutesDelta}) - } - return RED._("sidebar.project.versionControl.secondsAgo"); - } - - function updateBulk(files,unstaged) { - var activeProject = RED.projects.getActiveProject(); - if (unstaged) { - bulkChangeSpinner = utils.addSpinnerOverlay(unstagedChangesList.parent()); - } else { - bulkChangeSpinner = utils.addSpinnerOverlay(stagedChangesList.parent()); - } - bulkChangeSpinner.addClass('projects-dialog-spinner-sidebar'); - var body = unstaged?{files:files}:undefined; - utils.sendRequest({ - url: "projects/"+activeProject.name+"/stage", - type: unstaged?"POST":"DELETE", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(data) { - refreshFiles(data); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - // done(error,null); - } - }, - } - },body); - } - - var refreshInProgress = false; - - function getCommits(url,targetList,spinnerTarget,limit,before) { - var spinner = utils.addSpinnerOverlay(spinnerTarget); - var fullUrl = url+"?limit="+(limit||20); - if (before) { - fullUrl+="&before="+before; - } - utils.sendRequest({ - url: fullUrl, - type: "GET", - responses: { - 0: function(error) { - console.log(error); - // done(error,null); - }, - 200: function(result) { - var lastSha; - result.commits.forEach(function(c) { - targetList.editableList('addItem',c); - lastSha = c.sha; - }) - if (targetList.loadMoreItem) { - targetList.editableList('removeItem',targetList.loadMoreItem); - delete targetList.loadMoreItem; - } - var totalKnown = targetList.editableList('length'); - if (totalKnown < result.total) { - targetList.loadMoreItem = { - totalKnown: totalKnown, - total: result.total, - url: url, - before: lastSha+"~1", - limit: limit, - }; - targetList.editableList('addItem',targetList.loadMoreItem); - } - spinner.remove(); - }, - 400: { - 'unexpected_error': function(error) { - console.log(error); - // done(error,null); - } - } - } - }); - } - function refreshLocalCommits() { - localCommitList.editableList('empty'); - var activeProject = RED.projects.getActiveProject(); - if (activeProject) { - getCommits("projects/"+activeProject.name+"/commits",localCommitList,localCommitList.parent()); - } - } - // function refreshRemoteCommits() { - // remoteCommitList.editableList('empty'); - // var spinner = utils.addSpinnerOverlay(remoteCommitList); - // var activeProject = RED.projects.getActiveProject(); - // if (activeProject) { - // getCommits("projects/"+activeProject.name+"/commits/origin",remoteCommitList,remoteCommitList.parent()); - // } - // } - - function refreshFiles(result) { - var files = result.files; - if (bulkChangeSpinner) { - bulkChangeSpinner.remove(); - bulkChangeSpinner = null; - } - isMerging = !!result.merging; - if (isMerging) { - sidebarContent.addClass("sidebar-version-control-merging"); - unmergedContent.show(); - } else { - sidebarContent.removeClass("sidebar-version-control-merging"); - unmergedContent.hide(); - } - unstagedChangesList.editableList('removeItem',emptyStagedItem); - stagedChangesList.editableList('removeItem',emptyStagedItem); - unmergedChangesList.editableList('removeItem',emptyMergedItem); - - var fileNames = Object.keys(files).filter(function(f) { return files[f].type === 'f'}) - fileNames.sort(); - var updateIndex = Date.now()+Math.floor(Math.random()*100); - fileNames.forEach(function(fn) { - var entry = files[fn]; - var addEntry = false; - if (entry.status) { - entry.file = fn; - entry.indexStatus = entry.status[0]; - entry.treeStatus = entry.status[1]; - if ((entry.indexStatus === 'A' && /[AU]/.test(entry.treeStatus)) || - (entry.indexStatus === 'U' && /[DAU]/.test(entry.treeStatus)) || - (entry.indexStatus === 'D' && /[DU]/.test(entry.treeStatus))) { - entry.unmerged = true; - } - if (allChanges[fn]) { - if (allChanges[fn].unmerged && !entry.unmerged) { - unmergedChangesList.editableList('removeItem', allChanges[fn]) - addEntry = true; - } else if (!allChanges[fn].unmerged && entry.unmerged) { - unstagedChangesList.editableList('removeItem', allChanges[fn]) - stagedChangesList.editableList('removeItem', allChanges[fn]) - } - // Known file - if (allChanges[fn].status !== entry.status) { - // Status changed. - if (allChanges[fn].treeStatus !== ' ') { - // Already in the unstaged list - if (entry.treeStatus === ' ') { - unstagedChangesList.editableList('removeItem', allChanges[fn]) - } else if (entry.treeStatus !== allChanges[fn].treeStatus) { - allChanges[fn].updateUnstaged(entry,entry.treeStatus); - } - } else { - addEntry = true; - } - if (allChanges[fn].indexStatus !== ' ' && allChanges[fn].indexStatus !== '?') { - // Already in the staged list - if (entry.indexStatus === ' '||entry.indexStatus === '?') { - stagedChangesList.editableList('removeItem', allChanges[fn]) - } else if (entry.indexStatus !== allChanges[fn].indexStatus) { - allChanges[fn].updateStaged(entry,entry.indexStatus); - } - } else { - addEntry = true; - } - } - allChanges[fn].status = entry.status; - allChanges[fn].indexStatus = entry.indexStatus; - allChanges[fn].treeStatus = entry.treeStatus; - allChanges[fn].oldName = entry.oldName; - allChanges[fn].unmerged = entry.unmerged; - - } else { - addEntry = true; - allChanges[fn] = entry; - } - allChanges[fn].updateIndex = updateIndex; - if (addEntry) { - if (entry.unmerged) { - unmergedChangesList.editableList('addItem', allChanges[fn]); - } else { - if (entry.treeStatus !== ' ') { - unstagedChangesList.editableList('addItem', allChanges[fn]) - } - if (entry.indexStatus !== ' ' && entry.indexStatus !== '?') { - stagedChangesList.editableList('addItem', allChanges[fn]) - } - } - } - } - }); - Object.keys(allChanges).forEach(function(fn) { - if (allChanges[fn].updateIndex !== updateIndex) { - unstagedChangesList.editableList('removeItem', allChanges[fn]); - stagedChangesList.editableList('removeItem', allChanges[fn]); - delete allChanges[fn]; - } - }); - - var stagedCount = stagedChangesList.editableList('length'); - var unstagedCount = unstagedChangesList.editableList('length'); - var unmergedCount = unmergedChangesList.editableList('length'); - - commitButton.attr('disabled',(isMerging && unmergedCount > 0)||(!isMerging && stagedCount === 0)); - stageAllButton.attr('disabled',unstagedCount === 0); - unstageAllButton.attr('disabled',stagedCount === 0); - - if (stagedCount === 0) { - stagedChangesList.editableList('addItem',emptyStagedItem); - } - if (unstagedCount === 0) { - unstagedChangesList.editableList('addItem',emptyStagedItem); - } - if (unmergedCount === 0) { - unmergedChangesList.editableList('addItem',emptyMergedItem); - } - } - - function refresh(full, includeRemote) { - if (refreshInProgress) { - return; - } - if (full) { - allChanges = {}; - unstagedChangesList.editableList('empty'); - stagedChangesList.editableList('empty'); - unmergedChangesList.editableList('empty'); - } - if (!RED.user.hasPermission("projects.write")) { - return; - } - - - refreshInProgress = true; - refreshLocalCommits(); - - var activeProject = RED.projects.getActiveProject(); - if (activeProject) { - var url = "projects/"+activeProject.name+"/status"; - if (includeRemote) { - url += "?remote=true" - } - $.getJSON(url,function(result) { - refreshFiles(result); - - $('#sidebar-version-control-local-branch').text(result.branches.local); - $('#sidebar-version-control-remote-branch').text(result.branches.remote||RED._("sidebar.project.versionControl.none")); - - var commitsAhead = result.commits.ahead || 0; - var commitsBehind = result.commits.behind || 0; - - if (activeProject.git.hasOwnProperty('remotes')) { - if (result.branches.hasOwnProperty("remoteError") && result.branches.remoteError.code !== 'git_remote_gone') { - $("#sidebar-version-control-repo-status-auth-issue").show(); - $("#sidebar-version-control-repo-status-stats").hide(); - $('#sidebar-version-control-repo-branch').attr('disabled',true); - $("#sidebar-version-control-repo-pull").attr('disabled',true); - $("#sidebar-version-control-repo-push").attr('disabled',true); - $('#sidebar-version-control-repo-toolbar-message').hide(); - $('#sidebar-version-control-repo-toolbar-error-message').show(); - } else { - $('#sidebar-version-control-repo-toolbar-message').show(); - $('#sidebar-version-control-repo-toolbar-error-message').hide(); - - $("#sidebar-version-control-repo-status-auth-issue").hide(); - $("#sidebar-version-control-repo-status-stats").show(); - - $('#sidebar-version-control-repo-branch').attr('disabled',false); - - $("#sidebar-version-control-repo-status-button").show(); - if (result.branches.hasOwnProperty('remote')) { - updateRemoteStatus(commitsAhead, commitsBehind); - } else { - $('#sidebar-version-control-commits-ahead').text(""); - $('#sidebar-version-control-commits-behind').text(""); - - $('#sidebar-version-control-repo-toolbar-message').text(RED._("sidebar.project.versionControl.notTracking")); - $("#sidebar-version-control-repo-pull").attr('disabled',true); - $("#sidebar-version-control-repo-push").attr('disabled',true); - } - } - } else { - $("#sidebar-version-control-repo-status-button").hide(); - } - refreshInProgress = false; - $('.sidebar-version-control-shade').hide(); - }).fail(function() { - refreshInProgress = false; - }); - } else { - $('.sidebar-version-control-shade').show(); - unstagedChangesList.editableList('empty'); - stagedChangesList.editableList('empty'); - unmergedChangesList.editableList('empty'); - } - } - - - function updateRemoteStatus(commitsAhead, commitsBehind) { - $('#sidebar-version-control-commits-ahead').text(commitsAhead); - $('#sidebar-version-control-commits-behind').text(commitsBehind); - if (isMerging) { - $('#sidebar-version-control-repo-toolbar-message').text(RED._("sidebar.project.versionControl.statusUnmergedChanged")); - $("#sidebar-version-control-repo-pull").attr('disabled',true); - $("#sidebar-version-control-repo-push").attr('disabled',true); - } else if (commitsAhead > 0 && commitsBehind === 0) { - $('#sidebar-version-control-repo-toolbar-message').text(RED._("sidebar.project.versionControl.commitsAhead", {count:commitsAhead})); - $("#sidebar-version-control-repo-pull").attr('disabled',true); - $("#sidebar-version-control-repo-push").attr('disabled',false); - } else if (commitsAhead === 0 && commitsBehind > 0) { - $('#sidebar-version-control-repo-toolbar-message').text(RED._("sidebar.project.versionControl.commitsBehind",{ count: commitsBehind })); - $("#sidebar-version-control-repo-pull").attr('disabled',false); - $("#sidebar-version-control-repo-push").attr('disabled',true); - } else if (commitsAhead > 0 && commitsBehind > 0) { - $('#sidebar-version-control-repo-toolbar-message').text( - RED._("sidebar.project.versionControl.commitsAheadAndBehind1",{ count:commitsBehind })+ - RED._("sidebar.project.versionControl.commitsAheadAndBehind2",{ count:commitsAhead })+ - RED._("sidebar.project.versionControl.commitsAheadAndBehind3",{ count:commitsBehind })); - $("#sidebar-version-control-repo-pull").attr('disabled',false); - $("#sidebar-version-control-repo-push").attr('disabled',true); - } else if (commitsAhead === 0 && commitsBehind === 0) { - $('#sidebar-version-control-repo-toolbar-message').text(RED._("sidebar.project.versionControl.repositoryUpToDate")); - $("#sidebar-version-control-repo-pull").attr('disabled',true); - $("#sidebar-version-control-repo-push").attr('disabled',true); - } - } - function show() { - refresh(); - RED.sidebar.show("version-control"); - } - function showLocalChanges() { - RED.sidebar.show("version-control"); - localChanges.expand(); - } - return { - init: init, - show: show, - refresh: refresh, - showLocalChanges: showLocalChanges - } -})(); -;/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -RED.touch = RED.touch||{}; -RED.touch.radialMenu = (function() { - - - var touchMenu = null; - var isActive = false; - var isOutside = false; - var activeOption = null; - - - function createRadial(obj,pos,options) { - isActive = true; - try { - var w = $("body").width(); - var h = $("body").height(); - - touchMenu = d3.select("body").append("div") - .style({ - position:"absolute", - top: 0, - left:0, - bottom:0, - right:0, - "z-index": 1000 - }) - .on('touchstart',function() { - hide(); - d3.event.preventDefault(); - }); - - - - - var menu = touchMenu.append("div") - .style({ - position: "absolute", - top: (pos[1]-80)+"px", - left:(pos[0]-80)+"px", - "border-radius": "80px", - width: "160px", - height: "160px", - background: "rgba(255,255,255,0.6)", - border: "1px solid #666" - }); - - var menuOpts = []; - var createMenuOpt = function(x,y,opt) { - opt.el = menu.append("div") - .style({ - position: "absolute", - top: (y+80-25)+"px", - left:(x+80-25)+"px", - "border-radius": "20px", - width: "50px", - height: "50px", - background: "#fff", - border: "2px solid #666", - "text-align": "center", - "line-height":"50px" - }); - - opt.el.html(opt.name); - - if (opt.disabled) { - opt.el.style({"border-color":"#ccc",color:"#ccc"}); - } - opt.x = x; - opt.y = y; - menuOpts.push(opt); - - opt.el.on('touchstart',function() { - opt.el.style("background","#999"); - d3.event.preventDefault(); - d3.event.stopPropagation(); - }); - opt.el.on('touchend',function() { - hide(); - opt.onselect(); - d3.event.preventDefault(); - d3.event.stopPropagation(); - }); - } - - var n = options.length; - var dang = Math.max(Math.PI/(n-1),Math.PI/4); - var ang = Math.PI; - for (var i=0;i<n;i++) { - var x = Math.floor(Math.cos(ang)*80); - var y = Math.floor(Math.sin(ang)*80); - if (options[i].name) { - createMenuOpt(x,y,options[i]); - } - ang += dang; - } - - - var hide = function() { - isActive = false; - activeOption = null; - touchMenu.remove(); - touchMenu = null; - } - - obj.on('touchend.radial',function() { - obj.on('touchend.radial',null); - obj.on('touchmenu.radial',null); - - if (activeOption) { - try { - activeOption.onselect(); - } catch(err) { - RED._debug(err); - } - hide(); - } else if (isOutside) { - hide(); - } - }); - - - - obj.on('touchmove.radial',function() { - try { - var touch0 = d3.event.touches.item(0); - var p = [touch0.pageX - pos[0],touch0.pageY-pos[1]]; - for (var i=0;i<menuOpts.length;i++) { - var opt = menuOpts[i]; - if (!opt.disabled) { - if (p[0]>opt.x-30 && p[0]<opt.x+30 && p[1]>opt.y-30 && p[1]<opt.y+30) { - if (opt !== activeOption) { - opt.el.style("background","#999"); - activeOption = opt; - } - } else if (opt === activeOption) { - opt.el.style("background","#fff"); - activeOption = null; - } else { - opt.el.style("background","#fff"); - } - } - } - if (!activeOption) { - var d = Math.abs((p[0]*p[0])+(p[1]*p[1])); - isOutside = (d > 80*80); - } - - } catch(err) { - RED._debug(err); - } - - - }); - - } catch(err) { - RED._debug(err); - } - } - - - return { - show: createRadial, - active: function() { - return isActive; - } - } - -})(); - diff --git a/packages/node_modules/@node-red/editor/public/red/red.min.js b/packages/node_modules/@node-red/editor/public/red/red.min.js deleted file mode 100644 index ef5cebf8b..000000000 --- a/packages/node_modules/@node-red/editor/public/red/red.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -var RED=function(){function s(e,i){i=i||function(){};var t,n=/<!-- --- \[red-module:(\S+)\] --- -->/.exec(e.trim());t=n?n[1]:"unknown";try{var a=!1,s=$("<div>"+e+"</div>");s.find("script").each(function(e,t){var n=$(t).attr("src");if(n&&!/^\s*(https?:|\/|\.)/.test(n)){$(t).remove();var o=document.createElement("script");o.onload=function(){$("body").append(s),i()},$("body").append(o),o.src=RED.settings.apiRootUrl+n,a=!0}}),a||($("body").append(s),i())}catch(e){RED.notify(RED._("notification.errors.failedToAppendNode",{module:t,error:e.toString()}),{type:"error",timeout:1e4}),console.log("["+t+"] "+e.toString()),i()}}function r(t){$.ajax({headers:{Accept:"application/json"},cache:!1,url:"icons",success:function(e){RED.nodes.setIconSets(e),t&&t()}})}function t(){$.ajax({headers:{Accept:"text/html"},cache:!1,url:"nodes",success:function(e){var t=e.trim().split(/(?=<!-- --- \[red-module:\S+\] --- -->)/),n=function(){0===t.length?($("body").i18n(),$("#palette > .palette-spinner").hide(),$(".palette-scroll").removeClass("hide"),$("#palette-search").removeClass("hide"),d(function(){RED.settings.theme("projects.enabled",!1)?RED.projects.refresh(function(e){RED.sidebar.info.refresh(),e||(RED.menu.setDisabled("menu-item-projects-open",!0),RED.menu.setDisabled("menu-item-projects-settings",!0),!1===e||RED.projects.showStartup()),o()}):(RED.sidebar.info.refresh(),o())})):s(t.shift(),n)};n()}})}function d(n){$.ajax({headers:{Accept:"application/json"},cache:!1,url:"flows",success:function(e){if(e){var t=window.location.hash;RED.nodes.version(e.rev),RED.nodes.import(e.flows),RED.nodes.dirty(!1),RED.view.redraw(!0),/^#flow\/.+$/.test(t)&&RED.workspaces.show(t.substring(6))}n()}})}function o(){var a={};RED.comms.subscribe("notification/#",function(e,n){var t=e.split("/")[1];if("runtime-deploy"!==t&&"node"!==t){if("project-update"===t)return RED.nodes.clear(),RED.history.clear(),RED.view.redraw(!0),void RED.projects.refresh(function(){d(function(){var e=RED.projects.getActiveProject(),t={"change-branch":RED._("notification.project.change-branch",{project:e.git.branches.local}),"merge-abort":RED._("notification.project.merge-abort"),loaded:RED._("notification.project.loaded",{project:n.project}),updated:RED._("notification.project.updated",{project:n.project}),pull:RED._("notification.project.pull",{project:n.project}),revert:RED._("notification.project.revert",{project:n.project}),"merge-complete":RED._("notification.project.merge-complete")}[n.action];RED.notify("<p>"+t+"</p>"),RED.sidebar.info.refresh()})});if(n.text){n.default=n.text;var o=RED._(n.text,n),i={type:n.type,fixed:void 0===n.timeout,timeout:n.timeout,id:t};"runtime-state"===t&&("missing-types"===n.error?(o+="<ul><li>"+n.types.join("</li><li>")+"</li></ul>",RED.projects.getActiveProject()?i.buttons=[{text:RED._("notification.label.manage-project-dep"),click:function(){a[t].hideNotification(),RED.projects.settings.show("deps")}}]:i.buttons=[{text:RED._("common.label.close"),click:function(){a[t].hideNotification()}}]):"credentials_load_failed"===n.error?RED.settings.theme("projects.enabled",!1)?RED.user.hasPermission("projects.write")&&(i.buttons=[{text:"Setup credentials",click:function(){a[t].hideNotification(),RED.projects.showCredentialsPrompt()}}]):i.buttons=[{text:"Close",click:function(){a[t].hideNotification()}}]:"missing_flow_file"===n.error?RED.user.hasPermission("projects.write")&&(i.buttons=[{text:"Setup project files",click:function(){a[t].hideNotification(),RED.projects.showFilesPrompt()}}]):"missing_package_file"===n.error?RED.user.hasPermission("projects.write")&&(i.buttons=[{text:"Create default package file",click:function(){a[t].hideNotification(),RED.projects.createDefaultPackageFile()}}]):"project_empty"===n.error?RED.user.hasPermission("projects.write")&&(i.buttons=[{text:"No thanks",click:function(){a[t].hideNotification()}},{text:"Create default project files",click:function(){a[t].hideNotification(),RED.projects.createDefaultFileSet()}}]):"git_merge_conflict"===n.error&&(RED.nodes.clear(),RED.sidebar.versionControl.refresh(!0),RED.user.hasPermission("projects.write")&&(i.buttons=[{text:"Show merge conflicts",click:function(){a[t].hideNotification(),RED.sidebar.versionControl.showLocalChanges()}}]))),a.hasOwnProperty(t)?a[t].update(o,i):a[t]=RED.notify(o,i)}else a.hasOwnProperty(t)&&(a[t].close(),delete a[t])}}),RED.comms.subscribe("status/#",function(e,t){var n=e.split("/"),o=RED.nodes.node(n[1]);o&&(t.hasOwnProperty("text")&&"."!==t.text[0]&&(t.text=o._(t.text.toString(),{defaultValue:t.text.toString()})),o.status=t,o.dirty=!0,RED.view.redraw())}),RED.comms.subscribe("notification/node/#",function(e,t){var n,o,i;if("notification/node/added"==e){var a=[];t.forEach(function(e){var t=e.id;RED.nodes.addNodeSet(e),a=a.concat(e.types),RED.i18n.loadNodeCatalog(t,function(){$.get("nodes/"+t,function(e){s(e)})})}),a.length&&(i="<ul><li>"+a.join("</li><li>")+"</li></ul>",RED.notify(RED._("palette.event.nodeAdded",{count:a.length})+i,"success")),r()}else if("notification/node/removed"==e){for(n=0;n<t.length;n++)o=t[n],RED.nodes.removeNodeSet(o.id).added&&(i="<ul><li>"+o.types.join("</li><li>")+"</li></ul>",RED.notify(RED._("palette.event.nodeRemoved",{count:o.types.length})+i,"success"));r()}else"notification/node/enabled"==e?t.types&&(RED.nodes.getNodeSet(t.id).added?(RED.nodes.enableNodeSet(t.id),i="<ul><li>"+t.types.join("</li><li>")+"</li></ul>",RED.notify(RED._("palette.event.nodeEnabled",{count:t.types.length})+i,"success")):$.get("nodes/"+t.id,function(e){s(e),i="<ul><li>"+t.types.join("</li><li>")+"</li></ul>",RED.notify(RED._("palette.event.nodeAdded",{count:t.types.length})+i,"success")})):"notification/node/disabled"==e?t.types&&(RED.nodes.disableNodeSet(t.id),i="<ul><li>"+t.types.join("</li><li>")+"</li></ul>",RED.notify(RED._("palette.event.nodeDisabled",{count:t.types.length})+i,"success")):"node/upgraded"==e&&(RED.notify(RED._("palette.event.nodeUpgraded",{module:t.module,version:t.version}),"success"),RED.nodes.registry.setModulePendingUpdated(t.module,t.version));RED.library.loadFlowLibrary()})}function n(){$.get("red/about",function(e){RED.sidebar.info.set('<div style="text-align:center;"><img width="50px" src="red/images/node-red-icon.svg" /></div>'+marked(e)),RED.sidebar.info.show()})}function i(){var e=[];RED.settings.theme("projects.enabled",!1)&&e.push({id:"menu-item-projects-menu",label:"Projects",options:[{id:"menu-item-projects-new",label:"New",disabled:!1,onselect:"core:new-project"},{id:"menu-item-projects-open",label:"Open",disabled:!1,onselect:"core:open-project"},{id:"menu-item-projects-settings",label:"Project Settings",disabled:!1,onselect:"core:show-project-settings"}]}),e.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[{id:"menu-item-sidebar",label:RED._("menu.label.sidebar.show"),toggle:!0,onselect:"core:toggle-sidebar",selected:!0},null]}),e.push(null),e.push({id:"menu-item-import",label:RED._("menu.label.import"),options:[{id:"menu-item-import-clipboard",label:RED._("menu.label.clipboard"),onselect:"core:show-import-dialog"},{id:"menu-item-import-library",label:RED._("menu.label.library"),options:[]}]}),e.push({id:"menu-item-export",label:RED._("menu.label.export"),options:[{id:"menu-item-export-clipboard",label:RED._("menu.label.clipboard"),onselect:"core:show-export-dialog"},{id:"menu-item-export-library",label:RED._("menu.label.library"),disabled:!0,onselect:"core:library-export"}]}),e.push(null),e.push({id:"menu-item-search",label:RED._("menu.label.search"),onselect:"core:search"}),e.push(null),e.push({id:"menu-item-config-nodes",label:RED._("menu.label.displayConfig"),onselect:"core:show-config-tab"}),e.push({id:"menu-item-workspace",label:RED._("menu.label.flows"),options:[{id:"menu-item-workspace-add",label:RED._("menu.label.add"),onselect:"core:add-flow"},{id:"menu-item-workspace-edit",label:RED._("menu.label.rename"),onselect:"core:edit-flow"},{id:"menu-item-workspace-delete",label:RED._("menu.label.delete"),onselect:"core:remove-flow"}]}),e.push({id:"menu-item-subflow",label:RED._("menu.label.subflows"),options:[{id:"menu-item-subflow-create",label:RED._("menu.label.createSubflow"),onselect:"core:create-subflow"},{id:"menu-item-subflow-convert",label:RED._("menu.label.selectionToSubflow"),disabled:!0,onselect:"core:convert-to-subflow"}]}),e.push(null),!1!==RED.settings.theme("palette.editable")&&(e.push({id:"menu-item-edit-palette",label:RED._("menu.label.editPalette"),onselect:"core:manage-palette"}),e.push(null)),e.push({id:"menu-item-user-settings",label:RED._("menu.label.settings"),onselect:"core:show-user-settings"}),e.push(null),e.push({id:"menu-item-keyboard-shortcuts",label:RED._("menu.label.keyboardShortcuts"),onselect:"core:show-help"}),e.push({id:"menu-item-help",label:RED.settings.theme("menu.menu-item-help.label",RED._("menu.label.help")),href:RED.settings.theme("menu.menu-item-help.url","http://nodered.org/docs")}),e.push({id:"menu-item-node-red-version",label:"v"+RED.settings.version,onselect:"core:show-about"}),RED.view.init(),RED.userSettings.init(),RED.user.init(),RED.library.init(),RED.keyboard.init(),RED.palette.init(),!1!==RED.settings.theme("palette.editable")?RED.palette.editor.init():console.log("Palette editor disabled"),RED.sidebar.init(),RED.settings.theme("projects.enabled",!1)?RED.projects.init():console.log("Projects disabled"),RED.subflow.init(),RED.workspaces.init(),RED.clipboard.init(),RED.search.init(),RED.editor.init(),RED.diff.init(),RED.menu.init({id:"btn-sidemenu",options:e}),RED.deploy.init(RED.settings.theme("deployButton",null)),RED.notifications.init(),RED.actions.add("core:show-about",n),RED.nodes.init(),RED.comms.connect(),$("#main-container").show(),$(".header-toolbar").show(),$.ajax({headers:{Accept:"application/json"},cache:!1,url:"nodes",success:function(e){RED.nodes.setNodeList(e),RED.i18n.loadNodeCatalogs(function(){r(t)})}})}var a=!1;return{init:function(e){if(a)throw new Error("RED already initialised");a=!0,ace.require("ace/ext/language_tools"),(e=e||{}).apiRootUrl=e.apiRootUrl||"",e.apiRootUrl&&!/\/$/.test(e.apiRootUrl)&&(e.apiRootUrl=e.apiRootUrl+"/"),RED.i18n.init(e,function(){RED.settings.init(e,i)})}}}();RED.events=function(){var i={};return{on:function(e,t){i[e]=i[e]||[],i[e].push(t)},off:function(e,t){var n=i[e];if(n)for(var o=0;o<n.length;o++)if(n[o]===t)return void n.splice(o,1)},emit:function(t,e){if(i[t])for(var n=0;n<i[t].length;n++)try{i[t][n](e)}catch(e){console.log("RED.events.emit error: ["+t+"] "+e.toString()),console.log(e)}}}}(),RED.i18n=function(){var a;return{init:function(e,t){a=e.apiRootUrl||"",i18n.init({resGetPath:a+"locales/__ns__?lng=__lng__",dynamicLoad:!1,load:"current",ns:{namespaces:["editor","node-red","jsonata","infotips"],defaultNs:"editor"},fallbackLng:["en-US"],useCookie:!1},function(){t()}),RED._=function(){return i18n.t.apply(null,arguments)}},loadNodeCatalog:function(n,o){var e=i18n.functions.toLanguages(i18n.detectLanguage()),i=e.length;e.forEach(function(t){$.ajax({headers:{Accept:"application/json"},cache:!1,url:a+"nodes/"+n+"/messages?lng="+t,success:function(e){i18n.addResourceBundle(t,n,e),0===--i&&o()}})})},loadNodeCatalogs:function(e){var t=i18n.functions.toLanguages(i18n.detectLanguage()),o=t.length;t.forEach(function(n){$.ajax({headers:{Accept:"application/json"},cache:!1,url:a+"nodes/messages?lng="+n,success:function(t){Object.keys(t).forEach(function(e){i18n.addResourceBundle(n,e,t[e])}),0===--o&&e()}})})}}}(),RED.settings=function(){var e,n={},o={},i=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}},a=function(o){$.ajax({headers:{Accept:"application/json"},dataType:"json",cache:!1,url:"settings",success:function(e){!function(e){for(var t in n)n.hasOwnProperty(t)&&RED.settings.hasOwnProperty(t)&&delete RED.settings[t];for(t in e)e.hasOwnProperty(t)&&(RED.settings[t]=e[t]);n=e}(e),RED.settings.user&&!RED.settings.user.anonymous||RED.settings.remove("auth-tokens"),console.log("Node-RED: "+e.version),t(o)},error:function(e,t,n){401===e.status?(/[?&]access_token=(.*?)(?:$|&)/.test(window.location.search)&&(window.location.search=""),RED.user.login(function(){a(o)})):console.log("Unexpected error loading settings:",e.status,t)}})};function t(t){$.ajax({headers:{Accept:"application/json"},dataType:"json",cache:!1,url:"settings/user",success:function(e){o=e,t()},error:function(e,t,n){console.log("Unexpected error loading user settings:",e.status,t)}})}function s(){RED.user.hasPermission("settings.write")&&(e&&clearTimeout(e),e=setTimeout(function(){e=null,$.ajax({method:"POST",contentType:"application/json",url:"settings/user",data:JSON.stringify(o),success:function(e){},error:function(e,t,n){console.log("Unexpected error saving user settings:",e.status,t)}})},300))}return{init:function(o,e){var t=/[?&]access_token=(.*?)(?:$|&)/.exec(window.location.search);if(t){var n=t[1];RED.settings.set("auth-tokens",{access_token:n}),window.location.search=""}RED.settings.apiRootUrl=o.apiRootUrl,$.ajaxSetup({beforeSend:function(e,t){if(!/^\s*(https?:|\/|\.)/.test(t.url)){o.apiRootUrl&&(t.url=o.apiRootUrl+t.url);var n=RED.settings.get("auth-tokens");n&&e.setRequestHeader("Authorization","Bearer "+n.access_token),e.setRequestHeader("Node-RED-API-Version","v2")}}}),a(e)},load:a,loadUserSettings:t,set:function(e,t){i()&&("auth-tokens"===e?localStorage.setItem(e,JSON.stringify(t)):(o[e]=t,s()))},get:function(e){if(i())return"auth-tokens"===e?JSON.parse(localStorage.getItem(e)):o[e]},remove:function(e){i()&&("auth-tokens"===e?localStorage.removeItem(e):(delete o[e],s()))},theme:function(e,t){if(!RED.settings.editorTheme)return t;var n=e.split("."),o=RED.settings.editorTheme;try{for(var i=0;i<n.length;i++)o=o[n[i]];return void 0===o?t:o}catch(e){return t}}}}(),RED.user=function(){function p(){$("#btn-usermenu-submenu li").remove(),RED.settings.user.anonymous?RED.menu.addItem("btn-usermenu",{id:"usermenu-item-login",label:RED._("menu.label.login"),onselect:function(){RED.user.login({cancelable:!0},function(){RED.settings.load(function(){RED.notify(RED._("user.loggedInAs",{name:RED.settings.user.username}),"success"),p(),RED.events.emit("login",RED.settings.user.username)})})}}):(RED.menu.addItem("btn-usermenu",{id:"usermenu-item-username",label:"<b>"+RED.settings.user.username+"</b>"}),RED.menu.addItem("btn-usermenu",{id:"usermenu-item-logout",label:RED._("menu.label.logout"),onselect:function(){RED.user.logout()}}))}var i=/^((.+)\.)?read$/,a=/^((.+)\.)?write$/;return{init:function(){if(RED.settings.user&&(!RED.settings.editorTheme||!RED.settings.editorTheme.hasOwnProperty("userMenu"))){var e=$('<li><a id="btn-usermenu" class="button hide" data-toggle="dropdown" href="#"></a></li>').prependTo(".header-toolbar");RED.settings.user.image?$('<span class="user-profile"></span>').css({backgroundImage:"url("+RED.settings.user.image+")"}).appendTo(e.find("a")):$('<i class="fa fa-user"></i>').appendTo(e.find("a")),RED.menu.init({id:"btn-usermenu",options:[]}),p()}},login:function(d,l){"function"==typeof d&&(l=d,d={});var c=$('<div id="node-dialog-login" class="hide"><div style="display: inline-block;width: 250px; vertical-align: top; margin-right: 10px; margin-bottom: 20px;"><img id="node-dialog-login-image" src=""/></div><div style="display: inline-block; width: 250px; vertical-align: bottom; margin-left: 10px; margin-bottom: 20px;"><form id="node-dialog-login-fields" class="form-horizontal" style="margin-bottom: 0px;"></form></div></div>');c.dialog({autoOpen:!1,dialogClass:"ui-dialog-no-close",modal:!0,closeOnEscape:!!d.cancelable,width:600,resizable:!1,draggable:!1}),$("#node-dialog-login-fields").empty(),$.ajax({dataType:"json",url:"auth/login",success:function(i){var e=0;if("credentials"==i.type){for(;e<i.prompts.length;e++){var t=i.prompts[e],n=$("<div/>",{class:"form-row"});$('<label for="node-dialog-login-'+t.id+'">'+RED._(t.label)+":</label><br/>").appendTo(n);var o=$('<input style="width: 100%" id="node-dialog-login-'+t.id+'" type="'+t.type+'" tabIndex="'+(e+1)+'"/>').appendTo(n);e<i.prompts.length-1&&o.keypress(function(){var t=n;return function(e){13==e.keyCode&&(t.next("div").find("input").focus(),e.preventDefault())}}()),n.appendTo("#node-dialog-login-fields")}$('<div class="form-row" style="text-align: right; margin-top: 10px;"><span id="node-dialog-login-failed" style="line-height: 2em;float:left;" class="hide">'+RED._("user.loginFailed")+'</span><img src="red/images/spin.svg" style="height: 30px; margin-right: 10px; " class="login-spinner hide"/>'+(d.cancelable?'<a href="#" id="node-dialog-login-cancel" style="margin-right: 20px;" tabIndex="'+(e+1)+'">'+RED._("common.label.cancel")+"</a>":"")+'<input type="submit" id="node-dialog-login-submit" style="width: auto;" tabIndex="'+(e+2)+'" value="'+RED._("user.login")+'"></div>').appendTo("#node-dialog-login-fields"),$("#node-dialog-login-submit").button(),$("#node-dialog-login-fields").submit(function(e){$("#node-dialog-login-submit").button("option","disabled",!0),$("#node-dialog-login-failed").hide(),$(".login-spinner").show();for(var t={client_id:"node-red-editor",grant_type:"password",scope:""},n=0;n<i.prompts.length;n++){var o=i.prompts[n];t[o.id]=$("#node-dialog-login-"+o.id).val()}$.ajax({url:"auth/token",type:"POST",data:t}).done(function(e,t,n){RED.settings.set("auth-tokens",e),$("#node-dialog-login").dialog("destroy").remove(),d.updateMenu&&p(),l()}).fail(function(e,t,n){RED.settings.remove("auth-tokens"),$("#node-dialog-login-failed").show()}).always(function(){$("#node-dialog-login-submit").button("option","disabled",!1),$(".login-spinner").hide()}),e.preventDefault()})}else if("strategy"==i.type)for(e=0;e<i.prompts.length;e++){t=i.prompts[e],n=$("<div/>",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields");var a=$('<a href="#"></a>',{style:"padding: 10px"}).appendTo(n).click(function(){document.location=t.url});if(t.image)$("<img>",{src:t.image}).appendTo(a);else if(t.label){var s=$("<span></span>").text(t.label);t.icon&&($("<i></i>",{class:"fa fa-2x "+t.icon,style:"vertical-align: middle"}).appendTo(a),s.css({verticalAlign:"middle",marginLeft:"8px"})),s.appendTo(a)}a.button()}d.cancelable&&$("#node-dialog-login-cancel").button().click(function(e){$("#node-dialog-login").dialog("destroy").remove()});var r=i.image||"red/images/node-red-256.png";$("#node-dialog-login-image").load(function(){c.dialog("open")}).attr("src",r)}})},logout:function(){var e=RED.settings.get("auth-tokens"),t=e?e.access_token:"";$.ajax({url:"auth/revoke",type:"POST",data:{token:t}}).done(function(e,t,n){RED.settings.remove("auth-tokens"),e&&e.redirect?document.location.href=e.redirect:document.location.reload(!0)}).fail(function(e,t,n){401===e.status?document.location.reload(!0):console.log(t)})},hasPermission:function(e){return""===e||!RED.settings.user||function e(t,n){if(""===n)return!0;var o;if(Array.isArray(n)){for(o=0;o<n.length;o++)if(!e(t,n[o]))return!1;return!0}if(Array.isArray(t)){if(0===t.length)return!1;for(o=0;o<t.length;o++)if(e(t[o],n))return!0;return!1}return"*"===t||t===n||("read"===t||"*.read"===t?i.test(n):("write"===t||"*.write"===t)&&a.test(n))}(RED.settings.user.permissions||"",e)}}}(),RED.comms=function(){var a,s=null,l=null,c=null,p=10,u={},f=!1,h=0,g=!1;return{connect:function r(){var e;if(g=!0,RED.settings.apiRootUrl){var t=/^(https?):\/\/(.*)$/.exec(RED.settings.apiRootUrl);t&&(console.log(t),e="ws"+("https"===t[1]?"s":"")+"://"+t[2]+"comms")}else{var n=location.hostname,o=location.port;0!==o.length&&(n=n+":"+o),n=(n+=document.location.pathname)+("/"==n.slice(-1)?"":"/")+"comms",e="ws"+("https:"==document.location.protocol?"s":"")+"://"+n}var i=RED.settings.get("auth-tokens");function d(){for(var e in u)u.hasOwnProperty(e)&&a.send(JSON.stringify({subscribe:e}))}f=null!=i,(a=new WebSocket(e)).onopen=function(){h=0,s&&(l=setTimeout(function(){s.close(),s=null},1e3)),f?a.send(JSON.stringify({auth:i.access_token})):d()},a.onmessage=function(e){for(var t=JSON.parse(e.data),n=0;n<t.length;n++){var o=t[n];if(f&&o.auth)"ok"===o.auth?(f=!1,d()):"fail"===o.auth&&(g=!1,RED.user.login({updateMenu:!0},function(){r()}));else if(o.topic)for(var i in u)if(u.hasOwnProperty(i)&&new RegExp("^"+i.replace(/([\[\]\?\(\)\\\\$\^\*\.|])/g,"\\$1").replace(/\+/g,"[^/]+").replace(/\/#$/,"(/.*)?")+"$").test(o.topic)){var a=u[i];if(a)for(var s=0;s<a.length;s++)a[s](o.topic,o.data)}}},a.onclose=function(){g&&(l&&(clearTimeout(l),l=null),++h<10?(setTimeout(r,1e3),5<h&&null==s&&(s=RED.notify(RED._("notification.errors.lostConnection"),"error",!0))):h<20?setTimeout(r,2e3):(p=60,c=setInterval(function(){if(0==--p)s.update(RED._("notification.errors.lostConnection")),clearInterval(c),r();else{var e=RED._("notification.errors.lostConnectionReconnect",{time:p})+' <a href="#">'+RED._("notification.errors.lostConnectionTry")+"</a>";s.update(e),$(s).find("a").click(function(e){e.preventDefault(),s.update(RED._("notification.errors.lostConnection")),clearInterval(c),r()})}},1e3)))}},subscribe:function(e,t){null==u[e]&&(u[e]=[]),u[e].push(t),a&&1==a.readyState&&a.send(JSON.stringify({subscribe:e}))},unsubscribe:function(e,t){if(u[e]){for(var n=0;n<u[e].length;n++)if(u[e][n]===t){u[e].splice(n,1);break}0===u[e].length&&delete u[e]}}}}(),RED.text={},RED.text.bidi=function(){var t="";function n(e){return"auto"==t?function(e){for(var t,n,o=e.length,i=0;i<o;i++){if(1488<=(n=e.charCodeAt(i))&&n<=1535||1536<=n&&n<=1631||1642<=n&&n<=1775||1786<=n&&n<=2047||64285<=n&&n<=65023||65136<=n&&n<=65276)return!0;if(64<(t=e.charCodeAt(i))&&t<91||96<t&&t<123)return!1}return!1}(e)?"rtl":"ltr":t}function o(){$(this).attr("dir",n($(this).val()))}return{setTextDirection:function(e){t=e,RED.nodes.eachNode(function(e){e.dirty=!0}),RED.view.redraw(),RED.palette.refresh(),$("#workspace").find("span.bidiAware").each(function(){$(this).attr("dir",n($(this).html()))}),$("#sidebar").find("span.bidiAware").each(function(){$(this).attr("dir",n($(this).text()))})},enforceTextDirectionWithUCC:function(e){if(e){var t=n(e);if("ltr"==t)return"‪"+e+"‬";if("rtl"==t)return"‫"+e+"‬"}return e},resolveBaseTextDir:n,prepareInput:function(e){e.on("keyup",o).on("paste",o).on("cut",o),o.call(e)}}}(),RED.text.format=function(){var f=function(e){this.content="",this.actual="",this.textDirection="",this.localGui="",this.isVisible=!0,this.isSeparator=!1,this.isParsed=!1,this.keep=!1,this.inBounds=!1,this.inPoints=!1;var t="";for(t in e)e.hasOwnProperty(t)&&(this[t]=e[t])},d=function(){function p(e){if(!e)return!1;void 0===e.start&&(e.start=""),void 0===e.end&&(e.end=""),void 0!==e.startAfter?(e.start=e.startAfter,e.after=!0):e.after=!1,void 0!==e.endBefore?(e.end=e.endBefore,e.before=!0):e.before=!1;var t=parseInt(e.startPos,10);isNaN(t)?e.usePos=!1:e.usePos=!0;var n=parseInt(e.length,10);return isNaN(n)?e.useLength=!1:e.useLength=!0,e.loops=void 0===e.loops||!!e.loops,!0}function u(e,t){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);var i=e.content,a=n.usePos&&n.startPos<i.length;a&&(n.start="",n.loops=!1),n.bStart=a?n.startPos:0<n.start.length?i.indexOf(n.start):0;var s=n.useLength&&0<n.length&&n.bStart+n.length<i.length;return s&&(n.end=""),n.bEnd=s?n.bStart+n.length:0<n.end.length?i.indexOf(n.end,n.bStart+n.start.length)+1:i.length,n.after||(n.start=""),n.before||(n.end=""),n}return{handleSubcontents:function(e,t,n,o,i){if(!n.content||"string"!=typeof n.content||0===n.content.length)return e;var a=!0;void 0!==n.loops&&(a=!!n.loops);for(var s=0;!(s>=e.length);s++)if(!(e[s].isParsed||e.keep||e[s].isSeparator)){var r=e[s].content,d=r.indexOf(n.content);if(!(d<0)){var l,c=0;if(n.continued)for(;c++,0===(l=r.indexOf(n.content,d+c*n.content.length)););else c=1;if(l=d+c*n.content.length,e.splice(s,1),0<d&&(e.splice(s,0,new f({content:r.substring(0,d),localGui:t.dir,keep:!0})),s++),e.splice(s,0,new f({content:r.substring(d,l),textDirection:n.subDir,localGui:t.dir})),l<r.length&&e.splice(s+1,0,new f({content:r.substring(l,r.length),localGui:t.dir,keep:!0})),!a)break}}},handleBounds:function(e,t,n,o,i){for(var a=0;a<n.length;a++)if(p(n[a]))for(var s=0;!(s>=e.length);s++)if(!(e[s].isParsed||e[s].inBounds||e.keep||e[s].isSeparator)){var r=u(e[s],n[a]),d=r.bStart,l=r.bEnd;if(!(d<0||l<0)){var c=e[s].content;if(e.splice(s,1),0<d&&(e.splice(s,0,new f({content:c.substring(0,d),localGui:t.dir,keep:!0})),s++),r.start&&(e.splice(s,0,new f({content:r.start,localGui:t.dir,isSeparator:!0})),s++),e.splice(s,0,new f({content:c.substring(d+r.start.length,l-r.end.length),textDirection:r.subDir,localGui:t.dir,inBounds:!0})),r.end&&(s++,e.splice(s,0,new f({content:r.end,localGui:t.dir,isSeparator:!0}))),l+r.end.length<c.length&&e.splice(s+1,0,new f({content:c.substring(l+r.end.length,c.length),localGui:t.dir,keep:!0})),!r.loops)break}}for(a=0;a<e.length;a++)e[a].inBounds=!1;return e},handleCases:function(e,t,n,o,i){if(0===n.length)return e;var a={};for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s]);for(var r=0;r<n.length;r++)n[r].handler&&"function"==typeof n[r].handler.handle||(n[r].handler=t.commonHandler),n[r].args?(a.cases=n[r].args.cases,a.points=n[r].args.points,a.bounds=n[r].args.bounds,a.subs=n[r].args.subs):(a.cases=[],a.points=[],a.bounds=[],a.subs={}),n[r].handler.handle(o,e,a,i);return e},handlePoints:function(e,t,n,o,i){for(var a=0;a<n.length;a++)for(var s=0;!(s>=e.length);s++)if(!(e[s].isParsed||e[s].keep||e[s].isSeparator)){var r=e[s].content,d=r.indexOf(n[a]);0<=d&&(e.splice(s,1),0<d&&(e.splice(s,0,new f({content:r.substring(0,d),textDirection:t.subDir,localGui:t.dir,inPoints:!0})),s++),e.splice(s,0,new f({content:n[a],localGui:t.dir,isSeparator:!0})),d+n[a].length+1<=r.length&&e.splice(s+1,0,new f({content:r.substring(d+n[a].length),textDirection:t.subDir,localGui:t.dir,inPoints:!0})))}for(a=0;a<e.length;a++)e[a].keep?e[a].keep=!1:e[a].inPoints&&(e[a].isParsed=!0,e[a].inPoints=!1);return e}}}(),r={handle:function(e,t,n,o){var i=[];Array.isArray(n.cases)&&(i=n.cases);var a=[];void 0!==n.points&&(Array.isArray(n.points)?a=n.points:"string"==typeof n.points&&(a=n.points.split("")));var s={};"object"==typeof n.subs&&(s=n.subs);var r=[];return Array.isArray(n.bounds)&&(r=n.bounds),d.handleBounds(t,n,r,e,o),d.handleSubcontents(t,n,s,e,o),d.handleCases(t,n,i,e,o),d.handlePoints(t,n,a,e,o),t}},p={LRE:"‪",RLE:"‫",PDF:"‬",LRM:"‎",RLM:"‏",LRO:"‭",RLO:"‮",getLocaleDetails:function(e){if(e||(e="undefined"==typeof navigator?"":navigator.language||navigator.userLanguage||""),e=e.toLowerCase(),(o=(n=e)?n.split("-")[0]:"")&&!(o.length<2)&&["iw","he","ar","fa","ur"].some(function(e){return e===o})){var t=e.split("-");return{lang:t[0],country:t[1]?t[1]:""}}var n,o;return{lang:"not-bidi"}},removeUcc:function(e){return e?e.replace(/[\u200E\u200F\u202A-\u202E]/g,""):e},removeTags:function(e){return e?e.replace(/<[^<]*>/g,""):e},getDirection:function(e,t,n,o){if("auto"!==t&&/^(rtl|ltr)$/i.test(t))return t;n=/^(rtl|ltr)$/i.test(n)?n:"ltr";var i=o?e.split("").reverse().join(""):e,a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(i);return a?a[0]<="z"?"ltr":"rtl":n},hasArabicChar:function(e){return!!/[\u0600-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(e)},showMarks:function(e,t){for(var n="",o=0;o<e.length;o++){var i=""+e.charAt(o);switch(i){case"‎":n+="<LRM>";break;case"‏":n+="<RLM>";break;case"‪":n+="<LRE>";break;case"‫":n+="<RLE>";break;case"‭":n+="<LRO>";break;case"‮":n+="<RLO>";break;case"‬":n+="<PDF>";break;default:n+=i}}var a=void 0!==t&&/^(rtl|ltr)$/i.test(t)?"rtl"===t?"‮":"‭":"";return a+n+(""===a?"":"‬")},hideMarks:function(e){return e.replace(/<LRM>/g,this.LRM).replace(/<RLM>/g,this.RLM).replace(/<LRE>/g,this.LRE).replace(/<RLE>/g,this.RLE).replace(/<LRO>/g,this.LRO).replace(/<RLO>/g,this.RLO).replace(/<PDF>/g,this.PDF)},showTags:function(e){return"<xmp>"+e+""},hideTags:function(e){return e.replace(//g,"").replace(/<\/xmp>/g,"")}},l=function(){var e={};function s(e,t){var n=Array.isArray(e)?e[0]:e;return n.guiDir||(n.guiDir="ltr"),n.dir||(n.dir=n.guiDir),t&&(void 0===n.points&&(n.points=[]),n.cases||(n.cases=[]),n.bounds||(n.bounds=[]),n.commonHandler=r),n}function i(e,t,n){if(!e||!t)return new f({content:""});var o=s(t,!0),i=[new f({content:e,actual:e,localGui:o.dir})],a=r.handle;return o.handler&&"function"==typeof o.handler&&(a=o.handler.handle),a(e,i,o,n),i}function a(e,t,n){var o=s(t,!1);return n?function(e,t,n){for(var o="",i="",a=0;a<e.length;a++)if(e[a].isVisible){var s=e[a].textDirection,r=e[a].localGui;if(""!==r&&""===i?o+="<bdi dir='"+("rtl"===r?"rtl":"ltr")+"'>":""===i||""!==r&&r===i&&!stop||(o+="</bdi>"+(a==e.length-1&&""!==r?"":"<span style='unicode-bidi: embed; direction: "+("rtl"===t.dir?"rtl":"ltr")+";'></span>"),""!==r&&(o+="<bdi dir='"+("rtl"===r?"rtl":"ltr")+"'>")),"auto"===s&&(s=p.getDirection(e[a].content,s,t.guiDir)),/^(rtl|ltr)$/i.test(s)?(o+="<bdi dir='"+("rtl"===s?"rtl":"ltr")+"'>"+e[a].content+"</bdi>",s):(o+=e[a].content,p.getDirection(e[a].content,s,t.guiDir,!0)),a<e.length-1){var d=r&&e[a+1].localGui?r:t.dir;o+="<span style='unicode-bidi: embed; direction: "+("rtl"===d?"rtl":"ltr")+";'></span>"}else""!==i&&(o+="</bdi>");i=r,stop=!1}else stop=!0;var l="auto"===t.dir?p.getDirection(e[0].actual,t.dir,t.guiDir):t.dir;l!==t.guiDir&&(o="<bdi dir='"+("rtl"===l?"rtl":"ltr")+"'>"+o+"</bdi>");return o}(e,o):function(e,t,n){for(var o="",i="",a=!1,s=0;s<e.length;s++)if(e[s].isVisible){var r=e[s].textDirection,d=e[s].localGui;if(""!==d&&""===i?o+="rtl"===d?p.RLE:p.LRE:""===i||""!==d&&d===i&&!a||(o+=p.PDF+(s==e.length-1&&""!==d?"":"rtl"===t.dir?p.RLM:p.LRM),""!==d&&(o+="rtl"===d?p.RLE:p.LRE)),"auto"===r&&(r=p.getDirection(e[s].content,r,t.guiDir)),/^(rtl|ltr)$/i.test(r)?(o+=("rtl"===r?p.RLE:p.LRE)+e[s].content+p.PDF,r):(o+=e[s].content,p.getDirection(e[s].content,r,t.guiDir,!0)),s<e.length-1){var l=d&&e[s+1].localGui?d:t.dir;o+="rtl"===l?p.RLM:p.LRM}else""!==i&&(o+=p.PDF);i=d,a=!1}else a=!0;var c="auto"===t.dir?p.getDirection(e[0].actual,t.dir,t.guiDir):t.dir;c!==t.guiDir&&(o=("rtl"===c?p.RLE:p.LRE)+o+p.PDF);return o}(e,o)}return e.parseAndDisplayStructure=function(e,t,n,o){return e&&t?a(i(e,t,o),t,n):e},e.parseStructure=i,e.displayStructure=a,e.restore=function(e,t){return e},e}(),t={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:t.dir?t.dir:n?"rtl":"ltr",subs:{content:">",continued:!0,subDir:n?"rtl":"ltr"},cases:[{args:{subs:{content:"<",continued:!0,subDir:n?"ltr":"rtl"}}}]};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},n={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:","};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},o={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:function(e,t){if("ar"!==p.getLocaleDetails(t).lang)return"ltr";var n=e.indexOf("@");return 0<n&&n<e.length-1&&p.hasArabicChar(e.substring(n+1))?"rtl":"ltr"}(e,i),points:"<>.:,;@",cases:[{handler:r,args:{bounds:[{startAfter:'"',endBefore:'"'},{startAfter:"(",endBefore:")"}],points:""}}]};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},i={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:"/\\:."};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},a={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:" /%^&[]<>=!?~:.,|()+-*{}"};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},s={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:"\t!#%&()*+,-./:;<=>?|[]{}",cases:[{handler:r,args:{bounds:[{startAfter:"/*",endBefore:"*/"},{startAfter:"--",end:"\n"},{startAfter:"--"}]}},{handler:r,args:{subs:{content:" ",continued:!0}}},{handler:r,args:{bounds:[{startAfter:"'",endBefore:"'"},{startAfter:'"',endBefore:'"'}]}}]};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},c={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:"_"};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},u={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:":?#/@.[]="};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},h={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:t.dir?t.dir:n?"rtl":"ltr",points:" ,.!?;:"};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},g={format:function(e,t,n,o,i,a){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:" /[]<>=!:@.|()+-*",cases:[{handler:r,args:{bounds:[{startAfter:'"',endBefore:'"'},{startAfter:"'",endBefore:"'"}],points:""}}]};return a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},v={format:function(e,t,n,o,i,a){var s={},r="",d=Array.isArray(t)?t[0]:t;for(r in d)d.hasOwnProperty(r)&&(s[r]=d[r]);return s.guiDir=n?"rtl":"ltr",s.dir=s.dir?s.dir:s.guiDir,a?l.parseStructure(e,s,!!o,i):l.parseAndDisplayStructure(e,s,!!o,i)}},m=(function(){var e={msgLang:"en",msgDir:"",phLang:"",phDir:"",phPacking:["{","}"],phStt:{type:"none",args:{}},guiDir:""},t=!1;function n(e){return"he"===e||"iw"===e||"ar"===e?"rtl":"ltr"}function o(e){0===e.msgDir.length&&(e.msgDir=n(e.msgLang)),e.msgDir="ltr"!==e.msgDir&&"rtl"!==e.msgDir&&"auto"!=e.msgDir?"ltr":e.msgDir,0===e.guiDir.length&&(e.guiDir=e.msgDir),e.guiDir="rtl"!==e.guiDir?"ltr":"rtl",0===e.phDir.length&&(e.phDir=0===e.phLang.length?e.msgDir:n(e.phLang)),e.phDir="ltr"!==e.phDir&&"rtl"!==e.phDir&&"auto"!=e.phDir?"ltr":e.phDir,"string"==typeof e.phPacking&&(e.phPacking=e.phPacking.split("")),e.phPacking.length<2&&(e.phPacking=["{","}"])}}(),null);function b(e){switch(e){case"breadcrumb":return t;case"comma":return n;case"email":return o;case"filepath":return i;case"formula":return a;case"sql":return s;case"underscore":return c;case"url":return u;case"word":return h;case"xpath":return g;default:return v}}function y(t,e,n,o,i){if(!t||1!=t.nodeType)return!1;m||(m=document.createEvent("Event")).initEvent("TF",!0,!0),t.setAttribute("data-tf-type",e);var a="undefined"===n?"{}":JSON.stringify(Array.isArray(n)?n[0]:n);t.setAttribute("data-tf-args",a);var s="ltr";if("undefined"===o&&(t.dir?s=t.dir:t.style&&t.style.direction&&(s=t.style.direction),o="rtl"===s.toLowerCase()),t.setAttribute("data-tf-dir",o),t.setAttribute("data-tf-locale",p.getLocaleDetails(i).lang),function(e){var t=window.navigator.userAgent;if(0<=t.indexOf("MSIE")||0<=t.indexOf("Trident")||0<=t.indexOf("Edge"))return!1;var n=document.createElement(e.tagName);n.contentEditable=!0;var o="oninput"in n;return o||(n.setAttribute("oninput","return;"),o="function"==typeof n.oninput),n=null,o}(t)){t.oninput;t.oninput=function(e){w(e.target)}}else t.onkeyup=function(e){w(e.target),t.dispatchEvent(m)},t.onmouseup=function(e){w(e.target),t.dispatchEvent(m)};return w(t),!0}function w(e){var t=e.textContent||"",n=document.getSelection();if(0===t.length||!n||n.rangeCount<=0)e.dispatchEvent(m);else{var o,i,a=n.getRangeAt(0),s=a.cloneRange();o=a.startContainer,i=a.startOffset;var r=0;3===o.nodeType&&(r+=i),s.setStart(e,0),s.setEndBefore(o);var d=document.createElement("div");d.appendChild(s.cloneContents()),r+=d.textContent.length,e.innerHTML=b(e.getAttribute("data-tf-type")).format(t,JSON.parse(e.getAttribute("data-tf-args")),"true"===e.getAttribute("data-tf-dir"),!0,e.getAttribute("data-tf-locale"));var l=e,c=e,p=0,u=!1;for(n.removeAllRanges(),a.setStart(e,0),a.setEnd(e,0);c;){if(3===c.nodeType){if(p+c.nodeValue.length>=r){a.setStart(c,r-p);break}p+=c.nodeValue.length,c=c.nextSibling}else{if(c.hasChildNodes()){c=(l=c).firstChild;continue}c=c.nextSibling}for(;!c;){if(l===e){u=!0;break}c=l.nextSibling,l=l.parentNode}if(u)break}n.addRange(a),e.dispatchEvent(m)}}return{getHtml:function(e,t,n,o,i){return b(t).format(e,n,o,!0,i)},attach:function(e,t,n,o,i){return y(e,t,n,o,i)}}}(),RED.state={DEFAULT:0,MOVING:1,JOINING:2,MOVING_ACTIVE:3,ADDING:4,EDITING:5,EXPORT:6,IMPORT:7,IMPORT_DRAGGING:8,QUICK_JOINING:9,PANNING:10},RED.nodes=function(){var q,W,p=[],H={},u=[],K={},s=[],a={},t=null,o=!1;var X=function(){var i={},a=[],s={},r={},n={},t={};n.tab={defaults:{label:{value:""},disabled:{value:!1},info:{value:""}}};var o={setModulePendingUpdated:function(e,t){i[e].pending_version=t,RED.events.emit("registry:module-updated",{module:e,version:t})},getModule:function(e){return i[e]},getNodeSetForType:function(e){return o.getNodeSet(r[e])},getModuleList:function(){return i},getNodeList:function(){return a},getNodeTypes:function(){return Object.keys(n)},setNodeList:function(e){a=[];for(var t=0;t<e.length;t++){var n=e[t];o.addNodeSet(n)}},addNodeSet:function(e){e.added=!1,s[e.id]=e;for(var t=0;t<e.types.length;t++)r[e.types[t]]=e.id;a.push(e),i[e.module]=i[e.module]||{name:e.module,version:e.version,local:e.local,sets:{}},e.pending_version&&(i[e.module].pending_version=e.pending_version),i[e.module].sets[e.name]=e,RED.events.emit("registry:node-set-added",e)},removeNodeSet:function(e){for(var t=s[e],n=0;n<t.types.length;n++)delete r[t.types[n]];delete s[e];for(var o=0;o<a.length;o++)if(a[o].id===e){a.splice(o,1);break}return delete i[t.module].sets[t.name],0===Object.keys(i[t.module].sets).length&&delete i[t.module],RED.events.emit("registry:node-set-removed",t),t},getNodeSet:function(e){return s[e]},enableNodeSet:function(e){var t=s[e];t.enabled=!0,RED.events.emit("registry:node-set-enabled",t)},disableNodeSet:function(e){var t=s[e];t.enabled=!1,RED.events.emit("registry:node-set-disabled",t)},registerNodeType:function(e,t){var o;"subflow:"!=((n[e]=t).type=e).substring(0,8)&&(t.set=s[r[e]],s[r[e]].added=!0,s[r[e]].enabled=!0,o="node-red"===t.set.module?"node-red":t.set.id,t._=function(){var e=Array.prototype.slice.call(arguments,0),t=e[0];-1===e[0].indexOf(":")&&(e[0]=o+":"+e[0]);var n=RED._.apply(null,e);return n===e[0]&&(n=t),n});RED.events.emit("registry:node-type-added",e)},removeNodeType:function(e){if("subflow:"!=e.substring(0,8))throw new Error("this api is subflow only. called with:",e);delete n[e],RED.events.emit("registry:node-type-removed",e)},getNodeType:function(e){return n[e]},setIconSets:function(e){t=e},getIconSets:function(){return t}};return o}();function Y(){return(1+4294967295*Math.random()).toString(16)}function Q(e){if(0!==e.type.indexOf("subflow")?e._=e._def._:e._=RED._,"config"==e._def.category)H[e.id]=e;else{if(e.ports=[],e.wires&&e.wires.length>e.outputs&&(e.outputs=e.wires.length),e.outputs)for(var t=0;t<e.outputs;t++)e.ports.push(t);if(e.dirty=!0,l(e),"subflows"==e._def.category&&void 0===e.i){var n=0;RED.nodes.eachNode(function(e){n=Math.max(n,e.i||0)}),e.i=n+1}p.push(e)}RED.events.emit("nodes:add",e)}function Z(e){u.push(e)}function f(e){if(e in H)return H[e];for(var t in p)if(p[t].id==e)return p[t];return null}function h(e){var t,o=[],i=[];if(e in H)t=H[e],delete H[e],RED.events.emit("nodes:remove",t),RED.workspaces.refresh();else if(t=f(e)){p.splice(p.indexOf(t),1),(o=u.filter(function(e){return e.source===t||e.target===t})).forEach(function(e){u.splice(u.indexOf(e),1)});var a=!1;for(var s in t._def.defaults)if(t._def.defaults.hasOwnProperty(s)){var r=t._def.defaults[s];if(r.type){var d=X.getNodeType(r.type);if(d&&"config"==d.category){var l=H[t[s]];if(l)if(a=!0,l._def.exclusive)h(t[s]),i.push(l);else{var c=l.users;c.splice(c.indexOf(t),1)}}}}a&&RED.workspaces.refresh();try{t._def.oneditdelete&&t._def.oneditdelete.call(t)}catch(e){console.log("oneditdelete",t.id,t.type,e.toString())}RED.events.emit("nodes:remove",t)}return t&&t._def.onremove&&(console.log("Deprecated API warning: node type ",t.type," has an onremove function - should be oneditremove - please report"),t._def.onremove.call(n)),{links:o,nodes:i}}function ee(e){(K[e.id]=e)._def=RED.nodes.getType("tab"),s.push(e.id)}function te(t,e){if(e){var n=Object.keys(a).map(function(e){return a[e].name});n.sort();var o=1,i=t.name;n.forEach(function(e){i==e&&(o++,i=t.name+" ("+o+")")}),t.name=i}a[t.id]=t,RED.nodes.registerType("subflow:"+t.id,{defaults:{name:{value:""}},info:t.info,icon:function(){return t.icon||"subflow.png"},category:t.category||"subflows",inputs:t.in.length,outputs:t.out.length,color:"#da9",label:function(){return this.name||RED.nodes.subflow(t.id).name},labelStyle:function(){return this.name?"node_label_italic":""},paletteLabel:function(){return RED.nodes.subflow(t.id).name},inputLabels:function(e){return t.inputLabels?t.inputLabels[e]:null},outputLabels:function(e){return t.outputLabels?t.outputLabels[e]:null},set:{module:"node-red"}}),t._def=RED.nodes.getType("subflow:"+t.id)}function ne(e){return a[e]}function oe(e,t){for(var n=0;n<p.length;n++){var o=p[n];if(o.z===e){var i=/^subflow:(.+)$/.exec(o.type);if(i){if(i[1]===t)return!0;if(oe(i[1],t))return!0}}}return!1}function g(e){var t={};for(var n in t.id=e.id,t.type=e.type,e._def.defaults)e._def.defaults.hasOwnProperty(n)&&(t[n]=e[n]);return t}function r(t,e){if("tab"===t.type)return g(t);e=e||!1;var n={};if(n.id=t.id,n.type=t.type,n.z=t.z,"unknown"==n.type)for(var o in t._orig)t._orig.hasOwnProperty(o)&&(n[o]=t._orig[o]);else{for(var i in t._def.defaults)t._def.defaults.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&t.credentials){var a={};for(var s in n.credentials={},t._def.credentials)t._def.credentials.hasOwnProperty(s)&&("password"==t._def.credentials[s].type?(!t.credentials._||t.credentials["has_"+s]!=t.credentials._["has_"+s]||t.credentials["has_"+s]&&t.credentials[s])&&(a[s]=t.credentials[s]):null==t.credentials[s]||t.credentials._&&t.credentials[s]==t.credentials._[s]||(a[s]=t.credentials[s]));0<Object.keys(a).length&&(n.credentials=a)}}if("config"!=t._def.category){n.x=t.x,n.y=t.y,n.wires=[];for(var r=0;r<t.outputs;r++)n.wires.push([]);for(var d=u.filter(function(e){return e.source===t}),l=0;l<d.length;l++){var c=d[l];"subflow"!=c.target.type&&c.sourcePort<n.wires.length&&n.wires[c.sourcePort].push(c.target.id)}if(0<t.inputs&&t.inputLabels&&!/^\s*$/.test(t.inputLabels.join(""))&&(n.inputLabels=t.inputLabels.slice()),0<t.outputs&&t.outputLabels&&!/^\s*$/.test(t.outputLabels.join(""))&&(n.outputLabels=t.outputLabels.slice()),(!t._def.defaults||!t._def.defaults.hasOwnProperty("icon"))&&t.icon){var p=RED.utils.getDefaultNodeIcon(t._def,t);t.icon!==p.module+"/"+p.file&&(n.icon=t.icon)}}return n}function v(a){var s={};return s.id=a.id,s.type=a.type,s.name=a.name,s.info=a.info,s.category=a.category,s.in=[],s.out=[],a.in.forEach(function(t){for(var e={x:t.x,y:t.y,wires:[]},n=u.filter(function(e){return e.source===t}),o=0;o<n.length;o++){var i=n[o];"subflow"!=i.target.type&&e.wires.push({id:i.target.id})}s.in.push(e)}),a.out.forEach(function(t,e){var n={x:t.x,y:t.y,wires:[]},o=u.filter(function(e){return e.target===t});for(i=0;i<o.length;i++)"subflow"!=o[i].source.type?n.wires.push({id:o[i].source.id,port:o[i].sourcePort}):n.wires.push({id:a.id,port:0});s.out.push(n)}),0<s.in.length&&a.inputLabels&&!/^\s*$/.test(a.inputLabels.join(""))&&(s.inputLabels=a.inputLabels.slice()),0<s.out.length&&a.outputLabels&&!/^\s*$/.test(a.outputLabels.join(""))&&(s.outputLabels=a.outputLabels.slice()),a.icon&&"node-red/subflow.png"!==a.icon&&(s.icon=a.icon),s}function m(e,t,n){var o=[];n=n||{},t=t||{};for(var i=0;i<e.length;i++){var a=e[i];if("subflow:"==a.type.substring(0,8)){var s=a.type.substring(8);if(!t[s]){t[s]=!0;var r=[ne(s)];RED.nodes.eachNode(function(e){e.z==s&&r.push(e)}),o=m(r,t,n).concat(o)}}if("subflow"!=a.type){var d=RED.nodes.convertNode(a);for(var l in a._def.defaults)if(a._def.defaults[l].type&&a[l]in H){var c=H[a[l]],p=X.getNodeType(a._def.defaults[l].type).exportable;null==p||p?a[l]in n||(n[a[l]]=!0,e.push(c)):d[l]=""}o.push(d)}else{var u=v(a);o.push(u)}}return o}function ie(s,r){var d,l=null;try{RED.nodes.eachSubflow(function(e){if(e.name==s.name&&e.info==s.info&&e.in.length==s.in.length&&e.out.length==s.out.length){var t=RED.nodes.filterNodes({z:e.id});if(t.length==r.length){var n=[s].concat(r),o=[e].concat(t),i=JSON.stringify(n),a=JSON.stringify(m(o));for(d=0;d<t.length;d++)i=i.replace(new RegExp('"'+r[d].id+'"',"g"),'"'+t[d].id+'"');if((i=i.replace(new RegExp('"'+s.id+'"',"g"),'"'+e.id+'"'))===a)throw l=e,new Error}}})}catch(e){console.log(e.stack)}return l}function ae(e,t,n){if(n&&e.id!=t.id)return!1;if(e.type!=t.type)return!1;var o=e._def;for(var i in o.defaults)if(o.defaults.hasOwnProperty(i)){var a=e[i],s=t[i];if(typeof a!=typeof s)return!1;if(null===a||"string"==typeof a||"number"==typeof a){if(a!==s)return!1}else if(JSON.stringify(a)!==JSON.stringify(s))return!1}return!0}function d(e,t,n){var o,i,a,s={};if("string"==typeof e){if(""===e)return;try{a=JSON.parse(e)}catch(h){var r=new Error(RED._("clipboard.invalidFlow",{message:h.message}));throw r.code="NODE_RED",r}}else a=e;$.isArray(a)||(a=[a]);var d=!1;W||(d=!0,W=JSON.parse(JSON.stringify(a)));var l=[];for(o=0;o<a.length;o++)"workspace"==(i=a[o]).type||"tab"==i.type||"subflow"==i.type||X.getNodeType(i.type)||"subflow:"==i.type.substring(0,8)||-1!=l.indexOf(i.type)||l.push(i.type),i.z&&(s[i.z]=s[i.z]||[],s[i.z].push(i));if(!d&&0<l.length){var c="<ul><li>"+l.join("</li><li>")+"</li></ul>";l.length;RED.notify("<p>"+RED._("clipboard.importUnrecognised",{count:l.length})+"</p>"+c,"error",!1,1e4)}var p=RED.workspaces.active(),u=ne(p);for(o=0;o<a.length;o++){var f=/^subflow:(.+)$/.exec(a[o].type);if(f){var h,g=f[1],v=ne(a[o].z||p);if(v)if(g===v.id&&(h=new Error(RED._("notification.errors.cannotAddSubflowToItself"))),oe(g,v.id)&&(h=new Error(RED._("notification.errors.cannotAddCircularReference"))),h)throw h.code="NODE_RED",h}}var m,b,y,w,D=[],E={},R=[],x={},T={},_={},k=[],j=[],C=null;for(o=0;o<a.length;o++)if("workspace"===(i=a[o]).type||"tab"===i.type)"workspace"===i.type&&(i.type="tab"),null==q&&(q=i),t&&(m=Y(),E[i.id]=m,i.id=m),ee(i),RED.workspaces.add(i),D.push(i);else if("subflow"===i.type){var S=ie(i,s[i.id]);S?T[i.id]=S:(x[i.id]=i,t&&(m=Y(),i.id=m),i.in.forEach(function(e,t){e.type="subflow",e.direction="in",e.z=i.id,e.i=t,e.id=Y()}),i.out.forEach(function(e,t){e.type="subflow",e.direction="out",e.z=i.id,e.i=t,e.id=Y()}),R.push(i),te(i,t))}for(null==q&&(ee(q={type:"tab",id:Y(),disabled:!1,info:"",label:RED._("workspace.defaultName",{number:1})}),RED.workspaces.add(q),D.push(q),p=RED.workspaces.active()),o=0;o<a.length;o++)if(i=a[o],(b=X.getNodeType(i.type))&&"config"==b.category){var O=null;if(t){if(i.z){if(T[i.z])continue;x[i.z]?i.z=x[i.z].id:(i.z=E[i.z],K[i.z]||(n?(null===C&&(C=RED.workspaces.add(null,!0),D.push(C)),i.z=C.id):i.z=p))}if((O=RED.nodes.node(i.id))&&i.z&&O.z!==i.z)for(var L in O=null,H)if(H.hasOwnProperty(L)&&H[L].z===i.z&&ae(H[L],i,!1)){O=H[L],_[i.id]=H[L];break}}if(!O||O._def.exclusive){for(w in y={id:i.id,z:i.z,type:i.type,users:[],_config:{}},b.defaults)b.defaults.hasOwnProperty(w)&&(y[w]=i[w],y._config[w]=JSON.stringify(i[w]));if(b.hasOwnProperty("credentials")&&i.hasOwnProperty("credentials"))for(w in y.credentials={},b.credentials)b.credentials.hasOwnProperty(w)&&i.credentials.hasOwnProperty(w)&&(y.credentials[w]=i.credentials[w]);y.label=b.label,y._def=b,t&&(y.id=Y()),_[i.id]=y,k.push(y),RED.nodes.add(y)}}for(o=0;o<a.length;o++)if("workspace"!==(i=a[o]).type&&"tab"!==i.type&&"subflow"!==i.type&&(!(b=X.getNodeType(i.type))||"config"!=b.category)){var P={x:i.x,y:i.y,z:i.z,type:0,wires:i.wires,inputLabels:i.inputLabels,outputLabels:i.outputLabels,icon:i.icon,changed:!1,_config:{}};if(t){if(T[i.z])continue;x[P.z]?P.z=x[P.z].id:(P.z=E[P.z],K[P.z]||(n?(null===C&&(C=RED.workspaces.add(null,!0),D.push(C)),P.z=C.id):P.z=p)),P.id=Y()}else P.id=i.id,null!=P.z&&(K[P.z]||x[P.z])||(n?(null===C&&(C=RED.workspaces.add(null,!0),D.push(C)),P.z=C.id):P.z=p);if(P.type=i.type,P._def=b,"subflow"===i.type.substring(0,7)){var N=i.type.split(":")[1],I=T[N]||x[N]||ne(N);t&&(N=I.id,P.type="subflow:"+N,P._def=X.getNodeType(P.type),delete P.i),P.name=i.name,P.outputs=I.out.length,P.inputs=I.in.length}else{if(!P._def){P.x&&P.y?P._def={color:"#fee",defaults:{},label:"unknown: "+i.type,labelStyle:"node_label_italic",outputs:i.outputs||i.wires.length,set:X.getNodeSet("node-red/unknown")}:(P._def={category:"config",set:X.getNodeSet("node-red/unknown")},P.users=[],delete P.x,delete P.y,delete P.wires,delete P.inputLabels,delete P.outputLabels);var A={};for(var z in i)i.hasOwnProperty(z)&&"x"!=z&&"y"!=z&&"z"!=z&&"id"!=z&&"wires"!=z&&(A[z]=i[z]);P._orig=A,P.name=i.type,P.type="unknown"}if("config"!=P._def.category){for(w in i.hasOwnProperty("inputs")?(P.inputs=i.inputs,P._config.inputs=JSON.stringify(i.inputs)):P.inputs=P._def.inputs,i.hasOwnProperty("outputs")?(P.outputs=i.outputs,P._config.outputs=JSON.stringify(i.outputs)):P.outputs=P._def.outputs,P.hasOwnProperty("wires")&&P.wires.length>P.outputs&&(P._def.defaults.hasOwnProperty("outputs")&&isNaN(parseInt(i.outputs))?P.outputs=P.wires.length:(console.log("Warning: node.wires longer than node.outputs - trimming wires:",P.id," wires:",P.wires.length," outputs:",P.outputs),P.wires=P.wires.slice(0,P.outputs))),P._def.defaults)P._def.defaults.hasOwnProperty(w)&&"inputs"!==w&&"outputs"!==w&&(P[w]=i[w],P._config[w]=JSON.stringify(i[w]));if(P._config.x=P.x,P._config.y=P.y,P._def.hasOwnProperty("credentials")&&i.hasOwnProperty("credentials"))for(w in P.credentials={},P._def.credentials)P._def.credentials.hasOwnProperty(w)&&i.credentials.hasOwnProperty(w)&&(P.credentials[w]=i.credentials[w])}}Q(P),RED.editor.validateNode(P),"unknown"!==(_[i.id]=P).type&&"config"===P._def.category||k.push(P)}var M={catch:"scope",status:"scope","link in":"links","link out":"links"};for(o=0;o<k.length;o++){if((i=k[o]).wires){for(var B=0;B<i.wires.length;B++)for(var U=i.wires[B]instanceof Array?i.wires[B]:[i.wires[B]],J=0;J<U.length;J++)if(_.hasOwnProperty(U[J]))if(i.z===_[U[J]].z){var V={source:i,sourcePort:B,target:_[U[J]]};Z(V),j.push(V)}else console.log("Warning: dropping link that crosses tabs:",i.id,"->",_[U[J]].id);delete i.wires}for(var F in i._def.defaults)if(i._def.defaults.hasOwnProperty(F))if(i._def.defaults[F].type&&_[i[F]])i[F]=_[i[F]].id,(y=RED.nodes.node(i[F]))&&-1===y.users.indexOf(i)&&y.users.push(i);else if(M.hasOwnProperty(i.type)&&M[i.type]===F&&void 0!==i[F]&&null!==i[F])for(var G=0;G<i[F].length;G++)_[i[F][G]]&&(i[F][G]=_[i[F][G]].id);u&&/^link /.test(i.type)&&i.links&&(i.links=i.links.filter(function(e){var t=RED.nodes.node(e);return t&&t.z===p})),RED.editor.validateNode(i)}for(o=0;o<R.length;o++)(i=R[o]).in.forEach(function(n){n.wires.forEach(function(e){var t={source:n,sourcePort:0,target:_[e.id]};Z(t),j.push(t)}),delete n.wires}),i.out.forEach(function(n){n.wires.forEach(function(e){var t;Z(t=x[e.id]&&x[e.id].id==i.id?{source:i.in[e.port],sourcePort:e.port,target:n}:{source:_[e.id]||x[e.id],sourcePort:e.port,target:n}),j.push(t)}),delete n.wires});return RED.workspaces.refresh(),[k,j,D,R,C]}function l(e){for(var t in e._def.defaults)if(e._def.defaults.hasOwnProperty(t)){var n=e._def.defaults[t];if(n.type){var o=X.getNodeType(n.type);if(o&&"config"==o.category){var i=H[e[t]];i&&-1===i.users.indexOf(e)&&i.users.push(e)}}}}return{init:function(){RED.events.on("registry:node-type-added",function(t){X.getNodeType(t);var n=[];if(RED.nodes.eachNode(function(e){"unknown"===e.type&&e.name===t&&n.push(e)}),RED.nodes.eachConfig(function(e){"unknown"===e.type&&e.name===t&&n.push(e)}),0<n.length){var o=[];n.forEach(function(e){H.hasOwnProperty(e.id)?delete H[e.id]:p.splice(p.indexOf(e),1),o.push(r(e))}),RED.view.redraw(!0);var e=d(o,!1),i={};e[0].forEach(function(e){i[e.id]=e}),RED.nodes.eachLink(function(e){i.hasOwnProperty(e.source.id)&&(e.source=i[e.source.id]),i.hasOwnProperty(e.target.id)&&(e.target=i[e.target.id])}),RED.view.redraw(!0)}})},registry:X,setNodeList:X.setNodeList,getNodeSet:X.getNodeSet,addNodeSet:X.addNodeSet,removeNodeSet:X.removeNodeSet,enableNodeSet:X.enableNodeSet,disableNodeSet:X.disableNodeSet,setIconSets:X.setIconSets,getIconSets:X.getIconSets,registerType:X.registerNodeType,getType:X.getNodeType,convertNode:r,add:Q,remove:h,clear:function(){p=[],u=[],H={},s=[],Object.keys(a).forEach(function(e){RED.subflow.removeSubflow(e)}),Object.keys(K).forEach(function(e){RED.workspaces.remove(K[e])}),W=q=null,RED.nodes.dirty(!1),RED.view.redraw(!0),RED.palette.refresh(),RED.workspaces.refresh(),RED.sidebar.config.refresh(),RED.sidebar.info.refresh()},addLink:Z,removeLink:function(e){var t=u.indexOf(e);-1!=t&&u.splice(t,1)},addWorkspace:ee,removeWorkspace:function(e){delete K[e],s.splice(s.indexOf(e),1);var t,n,o=[],i=[];for(t=0;t<p.length;t++)(n=p[t]).z==e&&o.push(n);for(t in H)H.hasOwnProperty(t)&&(n=H[t]).z==e&&o.push(n);for(t=0;t<o.length;t++){var a=h(o[t].id);i=i.concat(a.links)}return{nodes:o,links:i}},getWorkspaceOrder:function(){return s},setWorkspaceOrder:function(e){s=e},workspace:function(e){return K[e]},addSubflow:te,removeSubflow:function(e){delete a[e.id],X.removeNodeType("subflow:"+e.id)},subflow:ne,subflowContains:oe,eachNode:function(e){for(var t=0;t<p.length;t++)e(p[t])},eachLink:function(e){for(var t=0;t<u.length;t++)e(u[t])},eachConfig:function(e){for(var t in H)H.hasOwnProperty(t)&&e(H[t])},eachSubflow:function(e){for(var t in a)a.hasOwnProperty(t)&&e(a[t])},eachWorkspace:function(e){for(var t=0;t<s.length;t++)e(K[s[t]])},node:f,version:function(e){if(void 0===e)return t;t=e},originalFlow:function(e){if(void 0===e)return W;W=e},filterNodes:function(e){for(var t=[],n=0;n<p.length;n++){var o=p[n];e.hasOwnProperty("z")&&o.z!==e.z||e.hasOwnProperty("type")&&o.type!==e.type||t.push(o)}return t},filterLinks:function(e){for(var t=[],n=0;n<u.length;n++){var o=u[n];if(e.source){if(e.source.hasOwnProperty("id")&&o.source.id!==e.source.id)continue;if(e.source.hasOwnProperty("z")&&o.source.z!==e.source.z)continue}if(e.target){if(e.target.hasOwnProperty("id")&&o.target.id!==e.target.id)continue;if(e.target.hasOwnProperty("z")&&o.target.z!==e.target.z)continue}e.hasOwnProperty("sourcePort")&&o.sourcePort!==e.sourcePort||t.push(o)}return t},import:d,getAllFlowNodes:function(e){var t={};t[e.id]=!0;for(var n=[e],o=[e];0!==o.length;)for(var i=o.shift(),a=u.filter(function(e){return e.source===i||e.target===i}),s=0;s<a.length;s++){var r=a[s].source===i?a[s].target:a[s].source,d=r.id;d||(d=r.direction+":"+r.i),t[d]||(t[d]=!0,n.push(r),o.push(r))}return n},createExportableNodeSet:m,createCompleteNodeSet:function(e){void 0===e&&(e=!0);var t,n=[];for(t=0;t<s.length;t++)"tab"==K[s[t]].type&&n.push(g(K[s[t]]));for(t in a)a.hasOwnProperty(t)&&n.push(v(a[t]));for(t in H)H.hasOwnProperty(t)&&n.push(r(H[t],e));for(t=0;t<p.length;t++){var o=p[t];n.push(r(o,e))}return n},updateConfigNodeUsers:l,id:Y,dirty:function(e){if(null==e)return o;o=e,RED.events.emit("nodes:change",{dirty:o})}}}(),RED.history=function(){var t=[];return{markAllDirty:function(){for(var e=0;e<t.length;e++)t[e].dirty=!0},list:function(){return t},depth:function(){return t.length},push:function(e){t.push(e)},pop:function(){!function e(t){var n,o,i,a={};if(t){if("multi"==t.t)for(n=t.events.length-1;0<=n;n--)e(t.events[n]);else if("replace"==t.t)RED.nodes.clear(),RED.nodes.import(t.config)[0].forEach(function(e){t.changed[e.id]&&(e.changed=!0)}),RED.nodes.version(t.rev);else if("add"==t.t){if(t.nodes)for(n=0;n<t.nodes.length;n++)(o=RED.nodes.node(t.nodes[n])).z&&(a[o.z]=!0),RED.nodes.remove(t.nodes[n]);if(t.links)for(n=0;n<t.links.length;n++)RED.nodes.removeLink(t.links[n]);if(t.workspaces)for(n=0;n<t.workspaces.length;n++)RED.nodes.removeWorkspace(t.workspaces[n].id),RED.workspaces.remove(t.workspaces[n]);if(t.subflows)for(n=0;n<t.subflows.length;n++)RED.nodes.removeSubflow(t.subflows[n]),RED.workspaces.remove(t.subflows[n]);if(t.subflow&&(t.subflow.instances&&t.subflow.instances.forEach(function(e){var t=RED.nodes.node(e.id);t&&(t.changed=e.changed,t.dirty=!0)}),t.subflow.hasOwnProperty("changed")&&(i=RED.nodes.subflow(t.subflow.id))&&(i.changed=t.subflow.changed)),t.removedLinks)for(n=0;n<t.removedLinks.length;n++)RED.nodes.addLink(t.removedLinks[n])}else if("delete"==t.t){if(t.workspaces)for(n=0;n<t.workspaces.length;n++)RED.nodes.addWorkspace(t.workspaces[n]),RED.workspaces.add(t.workspaces[n]);if(t.subflow&&t.subflow.subflow&&RED.nodes.addSubflow(t.subflow.subflow),t.subflowInputs&&0<t.subflowInputs.length&&((i=RED.nodes.subflow(t.subflowInputs[0].z)).in.push(t.subflowInputs[0]),i.in[0].dirty=!0),t.subflowOutputs&&0<t.subflowOutputs.length)for(i=RED.nodes.subflow(t.subflowOutputs[0].z),t.subflowOutputs.sort(function(e,t){return e.i-t.i}),n=0;n<t.subflowOutputs.length;n++){var s=t.subflowOutputs[n];i.out.splice(s.i,0,s);for(var r=s.i+1;r<i.out.length;r++)i.out[r].i++,i.out[r].dirty=!0;RED.nodes.eachLink(function(e){e.source.type=="subflow:"+i.id&&e.sourcePort>=s.i&&e.sourcePort++})}if(t.subflow&&t.subflow.hasOwnProperty("instances")&&t.subflow.instances.forEach(function(e){var t=RED.nodes.node(e.id);t&&(t.changed=e.changed,t.dirty=!0)}),i&&RED.nodes.filterNodes({type:"subflow:"+i.id}).forEach(function(e){for(e.inputs=i.in.length,e.outputs=i.out.length;e.outputs>e.ports.length;)e.ports.push(e.ports.length);e.resize=!0,e.dirty=!0}),t.nodes)for(n=0;n<t.nodes.length;n++)RED.nodes.add(t.nodes[n]),a[t.nodes[n].z]=!0;if(t.links)for(n=0;n<t.links.length;n++)RED.nodes.addLink(t.links[n]);if(t.changes)for(n in t.changes)if(t.changes.hasOwnProperty(n)&&(o=RED.nodes.node(n))){for(var d in t.changes[n])t.changes[n].hasOwnProperty(d)&&(o[d]=t.changes[n][d]);o.dirty=!0}}else if("move"==t.t){for(n=0;n<t.nodes.length;n++){var l=t.nodes[n];l.n.x=l.ox,l.n.y=l.oy,l.n.dirty=!0,l.n.moved=l.moved}if(t.links)for(n=0;n<t.links.length;n++)RED.nodes.removeLink(t.links[n]);if(t.removedLinks)for(n=0;n<t.removedLinks.length;n++)RED.nodes.addLink(t.removedLinks[n])}else if("edit"==t.t){for(n in t.changes)if(t.changes.hasOwnProperty(n)){if(t.node._def.defaults&&t.node._def.defaults[n]&&t.node._def.defaults[n].type){var c=RED.nodes.node(t.node[n]);c&&c.users.splice(c.users.indexOf(t.node),1);var p=RED.nodes.node(t.changes[n]);p&&p.users.push(t.node)}t.node[n]=t.changes[n]}if(t.subflow)t.subflow.hasOwnProperty("inputCount")&&(t.node.in.length>t.subflow.inputCount?t.node.in.splice(t.subflow.inputCount):0<t.subflow.inputs.length&&(t.node.in=t.node.in.concat(t.subflow.inputs))),t.subflow.hasOwnProperty("outputCount")&&(t.node.out.length>t.subflow.outputCount?t.node.out.splice(t.subflow.outputCount):0<t.subflow.outputs.length&&(t.node.out=t.node.out.concat(t.subflow.outputs))),t.subflow.hasOwnProperty("instances")&&t.subflow.instances.forEach(function(e){var t=RED.nodes.node(e.id);t&&(t.changed=e.changed,t.dirty=!0)}),RED.editor.validateNode(t.node),RED.nodes.filterNodes({type:"subflow:"+t.node.id}).forEach(function(e){e.inputs=t.node.in.length,e.outputs=t.node.out.length,RED.editor.updateNodeProperties(e),RED.editor.validateNode(e)});else{var u;if(t.outputMap)for(var f in u={},t.outputMap)t.outputMap.hasOwnProperty(f)&&"-1"!==t.outputMap[f]&&(u[t.outputMap[f]]=f);RED.editor.updateNodeProperties(t.node,u),RED.editor.validateNode(t.node)}if(t.links)for(n=0;n<t.links.length;n++)RED.nodes.addLink(t.links[n]);t.node.dirty=!0,t.node.changed=t.changed}else if("createSubflow"==t.t){if(t.nodes)for(RED.nodes.filterNodes({z:t.subflow.subflow.id}).forEach(function(e){e.z=t.activeWorkspace,e.dirty=!0}),n=0;n<t.nodes.length;n++)RED.nodes.remove(t.nodes[n]);if(t.links)for(n=0;n<t.links.length;n++)RED.nodes.removeLink(t.links[n]);if(RED.nodes.removeSubflow(t.subflow.subflow),RED.workspaces.remove(t.subflow.subflow),t.removedLinks)for(n=0;n<t.removedLinks.length;n++)RED.nodes.addLink(t.removedLinks[n])}else"reorder"==t.t&&t.order&&RED.workspaces.order(t.order);Object.keys(a).forEach(function(e){var t=RED.nodes.subflow(e);t&&RED.editor.validateNode(t)}),RED.nodes.dirty(t.dirty),RED.view.redraw(!0),RED.palette.refresh(),RED.workspaces.refresh(),RED.sidebar.config.refresh()}}(t.pop())},peek:function(){return t[t.length-1]},clear:function(){t=[]}}}(),RED.validators={number:function(t){return function(e){return t&&(""===e||void 0===e)||""!==e&&!isNaN(e)}},regex:function(t){return function(e){return t.test(e)}},typedInput:function(n,o){return function(e){var t=$("#node-"+(o?"config-":"")+"input-"+n).val()||this[n];if("json"===t)try{return JSON.parse(e),!0}catch(e){return!1}else{if("msg"===t||"flow"===t||"global"===t)return RED.utils.validatePropertyExpression(e);if("num"===t)return/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(e)}return!0}}},RED.utils=function(){function P(e){return e.replace(/\r?\n/g,"&crarr;").replace(/\t/g,"&rarr;")}function N(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function I(e){var t;if(Array.isArray(e))t=$('<span class="debug-message-object-value debug-message-type-meta"></span>').text("array["+e.length+"]");else if(null===e)t=$('<span class="debug-message-object-value debug-message-type-null">null</span>');else if("object"==typeof e)t=e.hasOwnProperty("type")&&"Buffer"===e.type&&e.hasOwnProperty("data")?$('<span class="debug-message-object-value debug-message-type-meta"></span>').text("buffer["+e.length+"]"):e.hasOwnProperty("type")&&"array"===e.type&&e.hasOwnProperty("data")?$('<span class="debug-message-object-value debug-message-type-meta"></span>').text("array["+e.length+"]"):e.hasOwnProperty("type")&&"function"===e.type?$('<span class="debug-message-object-value debug-message-type-meta"></span>').text("function"):e.hasOwnProperty("type")&&"number"===e.type?$('<span class="debug-message-object-value debug-message-type-number"></span>').text(e.data):$('<span class="debug-message-object-value debug-message-type-meta">object</span>');else if("string"==typeof e){var n;n=30<e.length?N(e.substring(0,30))+"&hellip;":N(e),t=$('<span class="debug-message-object-value debug-message-type-string"></span>').html('"'+P(n)+'"')}else t="number"==typeof e?$('<span class="debug-message-object-value debug-message-type-number"></span>').text(""+e):$('<span class="debug-message-object-value debug-message-type-other"></span>').text(""+e);return t}function A(n,o,i,e){n.addClass("debug-message-expandable"),n.prop("toggle",function(){return function(e){var t=n.parent();if(t.hasClass("collapsed")){if(e)return o&&!t.hasClass("built")&&(o(),t.addClass("built")),t.removeClass("collapsed"),!0}else if(!e)return t.addClass("collapsed"),!0;return!1}}),n.click(function(e){var t=!$(this).parent().hasClass("collapsed");$(this).prop("toggle")(!t)&&i&&i(!t),e.preventDefault()}),e&&n.click()}var z={},r={};function M(e,t,n,o){if(t&&0<t.length){if(""===e&&void 0===n)return!0;for(var i=0;i<t.length;i++){var a=t[i];if(0===a.indexOf(e)&&("."===a[e.length]||"["===a[e.length])){if(void 0===n||"["!==a[e.length])return!0;var s=a.substring(e.length),r=/\[(\d+)\]/.exec(s);if(r){var d=parseInt(r[1]);return n<=d&&d<=o}}}}return!1}function B(e,t,n,o,i,a){var s=r[n]&&r[n][o]&&r[n][o].number||a||"dec";i?(s="dec"===s?13===t.toString().length&&t<=2147483647e3?"dateMS":10===t.toString().length&&t<=2147483647?"dateS":"hex":"dateMS"===s||"dateS"==s?"hex":"dec",r[n]=r[n]||{},r[n][o]=r[n][o]||{},r[n][o].number=s):void 0!==a&&(r[n]=r[n]||{},r[n][o]=r[n][o]||{},r[n][o].number=s),"dec"===s?e.text(""+t):"dateMS"===s?e.text(new Date(t).toISOString()):"dateS"===s?e.text(new Date(1e3*t).toISOString()):"hex"===s&&e.text("0x"+t.toString(16))}function U(e,t,n,o,i){var a=r[n]&&r[n][o]&&r[n][o].buffer||"raw";i&&(a="raw"===a?"string":"raw",r[n]=r[n]||{},r[n][o]=r[n][o]||{},r[n][o].buffer=a),"raw"===a?(t.text("raw"),e.removeClass("debug-message-buffer-string").addClass("debug-message-buffer-raw")):"string"===a&&(t.text("string"),e.addClass("debug-message-buffer-string").removeClass("debug-message-buffer-raw"))}function J(e){var t=e.length;if(0===t)throw new Error("Invalid property expression: zero-length");for(var n,o,i=[],a=0,s=!1,r=!1,d=0;d<t;d++){var l=e[d];if(s){if(l===n){if(d-a==0)throw new Error("Invalid property expression: zero-length string at position "+a);if(i.push(e.substring(a,d)),r&&!/\]/.test(e[d+1]))throw new Error("Invalid property expression: unexpected array expression at position "+a);if(!r&&d+1!==t&&!/[\[\.]/.test(e[d+1]))throw new Error("Invalid property expression: unexpected "+e[d+1]+" expression at position "+(d+1));a=d+1,s=!1}}else if("'"===l||'"'===l){if(d!=a)throw new Error("Invalid property expression: unexpected "+l+" at position "+d);s=!0,n=l,a=d+1}else if("."===l){if(0===d)throw new Error("Invalid property expression: unexpected . at position 0");if(a!=d&&(o=e.substring(a,d),/^\d+$/.test(o)?i.push(parseInt(o)):i.push(o)),d===t-1)throw new Error("Invalid property expression: unterminated expression");if(!/[a-z0-9\$\_]/i.test(e[d+1]))throw new Error("Invalid property expression: unexpected "+e[d+1]+" at position "+(d+1));a=d+1}else if("["===l){if(0===d)throw new Error("Invalid property expression: unexpected "+l+" at position "+d);if(a!=d&&i.push(e.substring(a,d)),d===t-1)throw new Error("Invalid property expression: unterminated expression");if(!/["'\d]/.test(e[d+1]))throw new Error("Invalid property expression: unexpected "+e[d+1]+" at position "+(d+1));a=d+1,r=!0}else if("]"===l){if(!r)throw new Error("Invalid property expression: unexpected "+l+" at position "+d);if(a!=d){if(o=e.substring(a,d),!/^\d+$/.test(o))throw new Error("Invalid property expression: unexpected array expression at position "+a);i.push(parseInt(o))}a=d+1,r=!1}else if(" "===l)throw new Error("Invalid property expression: unexpected ' ' at position "+d)}if(r||s)throw new Error("Invalid property expression: unterminated expression");return a<t&&i.push(e.substring(a)),i}function V(e,t){var n,o=null;return"string"==typeof t?(0===t.indexOf("msg.")&&(t=t.substring(4)),n=J(t)):n=t,n.reduce(function(e,t){return void 0===(o=void 0!==e[t]?e[t]:void 0)&&e.hasOwnProperty("type")&&e.hasOwnProperty("data")&&e.hasOwnProperty("length")&&(o=void 0!==e.data[t]?e.data[t]:void 0),o},e),o}function i(e){var t={module:"",file:""};if(e){var n=e.indexOf("/");-1!==n?(t.module=e.slice(0,n),t.file=e.slice(n+1)):t.file=e}return t}function o(t,e){var n;if(e&&"subflow"===e.type)n="node-red/subflow.png";else if("function"==typeof t.icon)try{n=t.icon.call(e)}catch(e){console.log("Definition error: "+t.type+".icon",e),n="arrow-in.png"}else n=t.icon;var o=i(n);return o.module||(t.set?o.module=t.set.module:o.module="node-red"),o}function a(e){var t=RED.nodes.getIconSets()[e.module];return!(!t||-1===t.indexOf(e.file))}var d={};return{createObjectElement:function r(n,e){var d,t,o,l,c,p,u=(e=e||{}).key,f=e.typeHint,i=e.hideKey,h=e.path,g=e.sourceId,v=e.rootPath,m=e.expandPaths,b=e.ontoggle,y=e.exposeApi,w={};void 0!==h&&void 0!==v&&(p=h.substring(v.length+("."===h[v.length]?1:0)));var D=$('<span class="debug-message-element"></span>');if(D.collapse=function(){D.find(".debug-message-expandable").parent().addClass("collapsed")},l=$('<span class="debug-message-row"></span>').appendTo(D),g&&function(n,o,t,i,e,a){z.hasOwnProperty(o)||(z[o]={});var s=$('<span class="debug-message-tools"></span>').appendTo(n),r=$('<span class="debug-message-tools-copy button-group"></span>').appendTo(s);if(t)var d=$('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(r).click(function(e){e.preventDefault(),e.stopPropagation(),RED.clipboard.copyText(t,d,"clipboard.copyMessagePath")});var l=$('<button class="editor-button editor-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(r).click(function(e){e.preventDefault(),e.stopPropagation(),RED.clipboard.copyText(i,l,"clipboard.copyMessageValue")});if(void 0!==a&&""!==a){var c=z[o].hasOwnProperty(a);$('<button class="editor-button editor-button-small debug-message-tools-pin"><i class="fa fa-map-pin"></i></button>').appendTo(s).click(function(e){if(e.preventDefault(),e.stopPropagation(),z[o].hasOwnProperty(a))delete z[o][a],$(this).removeClass("selected"),n.removeClass("debug-message-row-pinned");else{var t="$"+("["===a[0]?"":".")+a;z[o][a]=J(t),$(this).addClass("selected"),n.addClass("debug-message-row-pinned")}}).toggleClass("selected",c),n.toggleClass("debug-message-row-pinned",c)}}(l,g,h,n,0,p),u)i||($('<span class="debug-message-object-key"></span>').text(u).appendTo(l),$("<span>: </span>").appendTo(l));else if(D.addClass("debug-message-top-level"),g){var a=z[g];if(m=[],a){for(var s in a)if(a.hasOwnProperty(s))try{void 0!==V({$:n},a[s])&&m.push(s)}catch(e){}m.sort()}D.clearPinned=function(){D.find(".debug-message-row-pinned").removeClass("debug-message-row-pinned"),z[g]={}}}o=$('<span class="debug-message-object-value"></span>').appendTo(l);var E=Array.isArray(n),R=!1;if(n&&"object"==typeof n&&n.hasOwnProperty("type")&&n.hasOwnProperty("data")&&(n.__enc__&&"array"===n.type||"Buffer"===n.type)&&(R=E=!0),null==n)$('<span class="debug-message-type-null">'+n+"</span>").appendTo(o);else if(n.__enc__&&"number"===n.type)t=$('<span class="debug-message-type-number debug-message-object-header"></span>').text(n.data).appendTo(o);else if("function"===f||n.__enc__&&"function"===n.type)t=$('<span class="debug-message-type-meta debug-message-object-header"></span>').text("function").appendTo(o);else if("internal"===f||n.__enc__&&"internal"===n.type)t=$('<span class="debug-message-type-meta debug-message-object-header"></span>').text("[internal]").appendTo(o);else if("string"==typeof n)/[\t\n\r]/.test(n)&&(D.addClass("collapsed"),$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(l),A(l,function(){$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text(f||"string").appendTo(l);var e=$('<div class="debug-message-object-entry collapsed"></div>').appendTo(D);$('<pre class="debug-message-type-string"></pre>').text(n).appendTo(e)},function(e){b&&b(h,e)},M(p,m))),t=$('<span class="debug-message-type-string debug-message-object-header"></span>').html('"'+P(N(n))+'"').appendTo(o),/^#[0-9a-f]{6}$/i.test(n)&&$('<span class="debug-message-type-string-swatch"></span>').css("backgroundColor",n).appendTo(t);else if("number"==typeof n)t=$('<span class="debug-message-type-number"></span>').appendTo(o),Number.isInteger(n)&&0<=n&&(t.addClass("debug-message-type-number-toggle"),t.click(function(e){e.preventDefault(),B($(this),n,g,h,!0)})),B(t,n,g,h,!1,"hex"===f?"hex":void 0);else if(E){D.addClass("collapsed");var x=n.length;if(f){var T=/\[(\d+)\]/.exec(f);T&&(x=parseInt(T[1]))}var _=n,k="array";R?(_=n.data,void 0===x&&(x=_.length),_.__enc__&&(_=_.data),k=n.type.toLowerCase()):/buffer/.test(f)&&(k="buffer");var j=_.length;if(0<x){$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(l);var C=$('<div class="debug-message-array-rows"></div>').appendTo(D);D.addClass("debug-message-buffer-raw")}if(u)c=$('<span class="debug-message-type-meta"></span>').text(f||k+"["+x+"]").appendTo(o);else{c=$('<span class="debug-message-object-header"></span>').appendTo(o),$("<span>[ </span>").appendTo(c);var S=Math.min(x,10);for(d=0;d<S;d++)I(_[d]).appendTo(c),d<S-1&&$("<span>, </span>").appendTo(c);S<x&&$("<span> &hellip;</span>").appendTo(c),0===S&&$('<span class="debug-message-type-meta">empty</span>').appendTo(c),$("<span> ]</span>").appendTo(c)}0<x&&A(l,function(){if(u||(c=$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text(f||k+"["+x+"]").appendTo(l)),"buffer"===k){var e=$('<div class="debug-message-string-rows"></div>').appendTo(D),t=$('<div class="debug-message-object-entry collapsed"></div>').appendTo(e),n="";try{n=String.fromCharCode.apply(null,new Uint16Array(_))}catch(e){console.log(e)}$('<pre class="debug-message-type-string"></pre>').text(n).appendTo(t);var o=$('<span class="debug-message-buffer-opts"></span>').appendTo(c),i=$('<a href="#"></a>').addClass("selected").text("raw").appendTo(o).click(function(e){e.preventDefault(),e.stopPropagation(),U(D,$(this),g,h,!0)});U(D,i,g,h,!1)}var a;if(j<=10)for(d=0;d<j;d++)a=$('<div class="debug-message-object-entry collapsed"></div>').appendTo(C),w[h+"["+d+"]"]=r(_[d],{key:""+d,typeHint:"buffer"===k&&"hex",hideKey:!1,path:h+"["+d+"]",sourceId:g,rootPath:v,expandPaths:m,ontoggle:b,exposeApi:y}).appendTo(a);else{for(d=0;d<j;d+=10){var s=d;a=$('<div class="debug-message-object-entry collapsed"></div>').appendTo(C),l=$("<span></span>").appendTo(a),$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').appendTo(l),A(l,function(){var n=s,o=Math.min(j-1,s+9),i=a;return function(){for(var e=n;e<=o;e++){var t=$('<div class="debug-message-object-entry collapsed"></div>').appendTo(i);w[h+"["+e+"]"]=r(_[e],{key:""+e,typeHint:"buffer"===k&&"hex",hideKey:!1,path:h+"["+e+"]",sourceId:g,rootPath:v,expandPaths:m,ontoggle:b,exposeApi:y}).appendTo(t)}}}(),function(){var t=t+"["+d+"]";return function(e){b&&b(t,e)}}(),M(p,m,s,Math.min(j-1,s+9))),$('<span class="debug-message-object-key"></span>').html("["+s+" &hellip; "+Math.min(j-1,s+9)+"]").appendTo(l)}j<x&&$('<div class="debug-message-object-entry collapsed"><span class="debug-message-object-key">['+j+" &hellip; "+x+"]</span></div>").appendTo(C)}},function(e){b&&b(h,e)},M(p,m))}else if("object"==typeof n){D.addClass("collapsed");var O=Object.keys(n);if((u||0<O.length)&&($('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(l),A(l,function(){for(u||$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text("object").appendTo(l),d=0;d<O.length;d++){var e=$('<div class="debug-message-object-entry collapsed"></div>').appendTo(D),t=h;void 0!==t&&(/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(O[d])?t+=(0<t.length?".":"")+O[d]:t+='["'+O[d].replace(/"/,'\\"')+'"]'),w[t]=r(n[O[d]],{key:O[d],typeHint:!1,hideKey:!1,path:t,sourceId:g,rootPath:v,expandPaths:m,ontoggle:b,exposeApi:y}).appendTo(e)}0===O.length&&$('<div class="debug-message-object-entry debug-message-type-meta collapsed"></div>').text("empty").appendTo(D)},function(e){b&&b(h,e)},M(p,m))),u)$('<span class="debug-message-type-meta"></span>').text("object").appendTo(o);else{c=$('<span class="debug-message-object-header"></span>').appendTo(o),$("<span>{ </span>").appendTo(c);var L=Math.min(O.length,5);for(d=0;d<L;d++)$('<span class="debug-message-object-key"></span>').text(O[d]).appendTo(c),$("<span>: </span>").appendTo(c),I(n[O[d]]).appendTo(c),d<L-1&&$("<span>, </span>").appendTo(c);O.length>L&&$("<span> &hellip;</span>").appendTo(c),0===L&&$('<span class="debug-message-type-meta">empty</span>').appendTo(c),$("<span> }</span>").appendTo(c)}}else $('<span class="debug-message-type-other"></span>').text(""+n).appendTo(o);return y&&D.prop("expand",function(){return function(e,t){if(h===e)l.prop("toggle")&&l.prop("toggle")(t);else if(w[e]&&w[e].prop("expand"))w[e].prop("expand")(e,t);else for(var n in w)if(w.hasOwnProperty(n)&&0===e.indexOf(n)){w[n].prop("expand")&&w[n].prop("expand")(e,t);break}}}),D},getMessageProperty:V,normalisePropertyExpression:J,validatePropertyExpression:function(e){try{return J(e),!0}catch(e){return!1}},separateIconPath:i,getDefaultNodeIcon:o,getNodeIcon:function(e,t){if("config"===e.category)return RED.settings.apiRootUrl+"icons/node-red/cog.png";if(t&&"tab"===t.type)return RED.settings.apiRootUrl+"icons/node-red/subflow.png";if(t&&"unknown"===t.type)return RED.settings.apiRootUrl+"icons/node-red/alert.png";if(t&&t.icon&&a(n=i(t.icon)))return RED.settings.apiRootUrl+"icons/"+t.icon;var n=o(e,t);return"subflows"!==e.category||a(n)?RED.settings.apiRootUrl+"icons/"+n.module+"/"+n.file:RED.settings.apiRootUrl+"icons/node-red/subflow.png"},getNodeLabel:function(t,n){var o;if(n=n||"","tab"===t.type)o=t.label||n;else{o=t._def.label;try{o=("function"==typeof o?o.call(t):o)||n}catch(e){console.log("Definition error: "+t.type+".label",e),o=n}}return RED.text.bidi.enforceTextDirectionWithUCC(o)},getNodeColor:function(e,t){var n=t.color,o=RED.settings.theme("palette.theme")||[];if(0<o.length){if(!d.hasOwnProperty(e))for(var i=o.length,a=0;a<i;a++){var s=o[a];if((!s.hasOwnProperty("category")||(s.hasOwnProperty("_category")||(s._category=new RegExp(s.category)),s._category.test(t.category)))&&(!s.hasOwnProperty("type")||(s.hasOwnProperty("_type")||(s._type=new RegExp(s.type)),s._type.test(e)))){d[e]=s.color||t.color;break}}n=d[e]}return n},addSpinnerOverlay:function(e,t){var n=$('<div class="projects-dialog-spinner "><img src="red/images/spin.svg"/></div>').appendTo(e);return t&&n.addClass("projects-dialog-spinner-contain"),n},decodeObject:function(e,t){if("number"===t&&"NaN"===e)e=Number.NaN;else if("number"===t&&"Infinity"===e)e=1/0;else if("number"===t&&"-Infinity"===e)e=-1/0;else if("Object"===t||/^array/.test(t)||"boolean"===t||"number"===t)e=JSON.parse(e);else if(/error/i.test(t))e=((e=JSON.parse(e)).name?e.name+": ":"")+e.message;else if("null"===t)e=null;else if("undefined"===t)e=void 0;else if(/^buffer/.test(t)){var n=e;e=[];for(var o=0;o<n.length;o+=2)e.push(parseInt(n.substr(o,2),16))}return e},parseContextKey:function(e){var t={},n=/^#:\((\S+?)\)::(.*)$/.exec(e);return n?(t.store=n[1],t.key=n[2]):(t.key=e,RED.settings.context&&(t.store=RED.settings.context.default)),t}}}(),function(r){r.widget("nodered.editableList",{_create:function(){var e,n=this;(this.element.addClass("red-ui-editableList-list"),this.uiWidth=this.element.width(),this.uiContainer=this.element.wrap("<div>").parent(),this.options.header?(this.options.header.addClass("red-ui-editableList-header"),this.borderContainer=this.uiContainer.wrap("<div>").parent(),this.borderContainer.prepend(this.options.header),this.topContainer=this.borderContainer.wrap("<div>").parent()):this.topContainer=this.uiContainer.wrap("<div>").parent(),this.topContainer.addClass("red-ui-editableList"),this.options.class&&this.topContainer.addClass(this.options.class),!1!==this.options.addButton)&&(e="string"==typeof this.options.addButton?this.options.addButton:RED&&RED._?RED._("editableList.add"):"add",r('<a href="#" class="editor-button editor-button-small red-ui-editableList-addButton" style="margin-top: 4px;"><i class="fa fa-plus"></i> '+e+"</a>").appendTo(this.topContainer).click(function(e){e.preventDefault(),n.addItem({})}));"absolute"===this.element.css("position")&&(["top","left","bottom","right"].forEach(function(e){var t=n.element.css(e);"auto"!==t&&""!==t&&(n.topContainer.css(e,t),n.uiContainer.css(e,"0"),n.element.css(e,"auto"))}),this.element.css("position","static"),this.topContainer.css("position","absolute"),this.uiContainer.css("position","absolute")),this.options.header?this.borderContainer.addClass("red-ui-editableList-border"):this.uiContainer.addClass("red-ui-editableList-border"),this.uiContainer.addClass("red-ui-editableList-container"),this.uiHeight=this.element.height(),this.activeFilter=this.options.filter||null,this.activeSort=this.options.sort||null,this.scrollOnAdd=this.options.scrollOnAdd,void 0===this.scrollOnAdd&&(this.scrollOnAdd=!0);var t=this.element.css("minHeight");"0px"!==t&&(this.uiContainer.css("minHeight",t),this.element.css("minHeight",0));var o=this.element.css("maxHeight");"0px"!==o&&(this.uiContainer.css("maxHeight",o),this.element.css("maxHeight",null)),"auto"!==this.options.height&&(this.uiContainer.css("overflow-y","scroll"),isNaN(this.options.height)||(this.uiHeight=this.options.height)),this.element.height("auto");var i,a=this.element.attr("style");if(null!==(i=/width\s*:\s*(\d+%)/i.exec(a))&&(this.element.width("100%"),this.uiContainer.width(i[1])),this.options.sortable){var s={axis:"y",update:function(e,t){n.options.sortItems&&n.options.sortItems(n.items())},handle:"string"==typeof this.options.sortable?this.options.sortable:".red-ui-editableList-item-handle",cursor:"move",tolerance:"pointer",forcePlaceholderSize:!0,placeholder:"red-ui-editabelList-item-placeholder",start:function(e,t){t.placeholder.height(t.item.height()-4)}};this.options.connectWith&&(s.connectWith=this.options.connectWith),this.element.sortable(s)}this._resize()},_resize:function(){var e=this.topContainer.height()-this.uiContainer.height();if(0!==this.uiHeight&&this.uiContainer.height(this.uiHeight-e),this.options.resize&&this.options.resize(),this.options.resizeItem){var t=this;this.element.children().each(function(e){t.options.resizeItem(r(this).find(".red-ui-editableList-item-content"),e)})}},_destroy:function(){},_refreshFilter:function(){var o=this,i=0;return this.activeFilter?(this.items().each(function(e,t){var n=t.data("data");try{o.activeFilter(n)?(t.parent().show(),i++):t.parent().hide()}catch(e){console.log(e),t.parent().show(),i++}}),i):this.element.children().show()},_refreshSort:function(){if(this.activeSort){var e=this.element.children(),n=this;e.sort(function(e,t){return n.activeSort(r(e).find(".red-ui-editableList-item-content").data("data"),r(t).find(".red-ui-editableList-item-content").data("data"))}),r.each(e,function(e,t){n.element.append(t)})}},width:function(e){this.uiWidth=e,this._resize()},height:function(e){this.uiHeight=e,this._resize()},addItem:function(o){var i=this;o=o||{};var a=r("<li>"),s=!1;if(this.activeSort){this.items().each(function(e,t){if(!s){var n=t.data("data");i.activeSort(o,n)<0&&(a.insertBefore(t.closest("li")),s=!0)}})}s||a.appendTo(this.element);var n=r("<div/>").addClass("red-ui-editableList-item-content").appendTo(a);if(n.data("data",o),!0===this.options.sortable&&(r('<i class="red-ui-editableList-item-handle fa fa-bars"></i>').appendTo(a),a.addClass("red-ui-editableList-item-sortable")),this.options.removable){var e=r("<a/>",{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(a);r("<i/>",{class:"fa fa-remove"}).appendTo(e),a.addClass("red-ui-editableList-item-removable"),e.click(function(e){e.preventDefault();var t=n.data("data");a.addClass("red-ui-editableList-item-deleting"),a.fadeOut(300,function(){r(this).remove(),i.options.removeItem&&i.options.removeItem(t)})})}if(this.options.addItem){var t=i.element.children().length-1;setTimeout(function(){if(i.options.addItem(n,t,o),i.activeFilter)try{i.activeFilter(o)||a.hide()}catch(e){}!i.activeSort&&i.scrollOnAdd&&setTimeout(function(){i.uiContainer.scrollTop(i.element.height())},0)},0)}},addItems:function(e){for(var t=0;t<e.length;t++)this.addItem(e[t])},removeItem:function(t){this.element.children().filter(function(e){return t===r(this).find(".red-ui-editableList-item-content").data("data")}).remove(),this.options.removeItem&&this.options.removeItem(t)},items:function(){return this.element.children().map(function(e){return r(this).find(".red-ui-editableList-item-content")})},empty:function(){this.element.empty()},filter:function(e){return void 0!==e&&(this.activeFilter=e),this._refreshFilter()},sort:function(e){return void 0!==e&&(this.activeSort=e),this._refreshSort()},length:function(){return this.element.children().length}})}(jQuery),function(t){t.widget("nodered.checkboxSet",{_create:function(){var n=this;this.uiElement=this.element.wrap("<span>").parent(),this.uiElement.addClass("red-ui-checkboxSet"),this.options.parent&&(this.parent=this.options.parent,this.parent.checkboxSet("addChild",this.element)),this.children=[],this.partialFlag=!1,this.stateValue=0;var e=this.element.prop("checked");this.options=[t('<span class="red-ui-checkboxSet-option hide"><i class="fa fa-square-o"></i></span>').appendTo(this.uiElement),t('<span class="red-ui-checkboxSet-option hide"><i class="fa fa-check-square-o"></i></span>').appendTo(this.uiElement),t('<span class="red-ui-checkboxSet-option hide"><i class="fa fa-minus-square-o"></i></span>').appendTo(this.uiElement)],e?this.options[1].show():this.options[0].show(),this.element.change(function(){this.checked?(n.options[0].hide(),n.options[1].show()):(n.options[1].hide(),n.options[0].show()),n.options[2].hide();var t=this.checked;n.children.forEach(function(e){e.checkboxSet("state",t,!1,!0)})}),this.uiElement.click(function(e){e.stopPropagation(),n.state(!1===n.state())}),this.parent&&this.parent.checkboxSet("updateChild",this)},_destroy:function(){this.parent&&this.parent.checkboxSet("removeChild",this.element)},addChild:function(e){this.children.push(e)},removeChild:function(e){var t=this.children.indexOf(e);-1<t&&this.children.splice(t,1)},updateChild:function(e){var n=0;this.children.forEach(function(e,t){!0===e.checkboxSet("state")&&n++}),0===n?this.state(!1,!0):n===this.children.length?this.state(!0,!0):this.state(null,!0)},disable:function(){this.uiElement.addClass("disabled")},state:function(e,t,n){if(0===arguments.length)return this.partialFlag?null:this.element.is(":checked");this.partialFlag=null===e;var o=this.partialFlag||e;this.element.prop("checked",o),!0===e?(this.options[0].hide(),this.options[1].show(),this.options[2].hide()):!1===e?(this.options[2].hide(),this.options[1].hide(),this.options[0].show()):null===e&&(this.options[0].hide(),this.options[1].hide(),this.options[2].show()),t||this.element.trigger("change",null),!n&&this.parent&&this.parent.checkboxSet("updateChild",this)}})}(jQuery),RED.menu=function(){var d={};function l(i){var e,t;if(null!==i&&i.id&&!1===RED.settings.theme("menu."+i.id))return null;if(null===i)e=$('<li class="divider"></li>');else{e=$("<li></li>"),i.group&&e.addClass("menu-group-"+i.group);var n="<a "+(i.id?'id="'+i.id+'" ':"")+'tabindex="-1" href="#">';i.toggle&&(n+='<i class="fa fa-square pull-left"></i>',n+='<i class="fa fa-check-square pull-left"></i>'),void 0!==i.icon&&(/\.png/.test(i.icon)?n+='<img src="'+i.icon+'"/> ':n+='<i class="'+(i.icon?i.icon:'" style="display: inline-block;"')+'"></i> '),i.sublabel?n+='<span class="menu-label-container"><span class="menu-label">'+i.label+'</span><span class="menu-sublabel">'+i.sublabel+"</span></span>":n+='<span class="menu-label">'+i.label+"</span>",n+="</a>";var o=$(n).appendTo(e);if((d[i.id]=i).onselect?(o.click(function(e){if(e.preventDefault(),!$(this).parent().hasClass("disabled"))if(i.toggle){var t=p(i.id);if("string"==typeof i.toggle){if(!t){for(var n in d)if(d.hasOwnProperty(n)){var o=d[n];o.id!=i.id&&i.toggle==o.toggle&&u(o.id,!1)}u(i.id,!0)}}else u(i.id,!t)}else c(i.id)}),i.toggle&&(t=RED.settings.get("menu-"+i.id),i.setting&&(null!==t?(RED.settings.set(i.setting,t),RED.settings.remove("menu-"+i.id)):t=RED.settings.get(i.setting)),t?(o.addClass("active"),c(i.id,!0)):!1===t?(o.removeClass("active"),c(i.id,!1)):i.hasOwnProperty("selected")&&(i.selected?o.addClass("active"):o.removeClass("active"),c(i.id,i.selected)))):i.href?o.attr("target","_blank").attr("href",i.href):i.options||(e.addClass("disabled"),o.click(function(e){e.preventDefault()})),i.options){e.addClass("dropdown-submenu pull-left");for(var a=$('<ul id="'+i.id+'-submenu" class="dropdown-menu"></ul>').appendTo(e),s=0;s<i.options.length;s++){var r=l(i.options[s]);r&&r.appendTo(a)}}i.disabled&&e.addClass("disabled")}return e}function c(e,t){var n=d[e],o=n.onselect;"string"==typeof n.onselect&&(o=RED.actions.get(n.onselect)),o?o.call(n,t):console.log("No callback for",e,n.onselect)}function p(e){return $("#"+e).hasClass("active")}function u(e,t){if(p(e)!=t){var n=d[e];t?$("#"+e).addClass("active"):$("#"+e).removeClass("active"),n&&n.onselect&&c(n.id,t),RED.settings.set(n.setting||"menu-"+n.id,t)}}return{init:function(e){var t=$("#"+e.id),n=$("<ul/>",{id:e.id+"-submenu",class:"dropdown-menu pull-right"});1===t.length&&n.insertAfter(t);for(var o=!1,i=0;i<e.options.length;i++){var a=e.options[i];if(null!==a||!o){var s=l(a);s&&(s.appendTo(n),o=null===a)}}return n},setSelected:u,isSelected:p,toggleSelected:function(e){u(e,!p(e))},setDisabled:function(e,t){t?$("#"+e).parent().addClass("disabled"):$("#"+e).parent().removeClass("disabled")},addItem:function(e,t){var n=l(t);if(t.group){var o=$("#"+e+"-submenu").children(".menu-group-"+t.group);if(0===o.length)n.appendTo("#"+e+"-submenu");else{for(var i=0;i<o.length;i++){var a=o[i],s=$(a).find(".menu-label").html();if(t.label<s){$(a).before(n);break}}i===o.length&&n.appendTo("#"+e+"-submenu")}}else n.appendTo("#"+e+"-submenu")},removeItem:function(e){$("#"+e).parent().remove()},setAction:function(e,t){var n=d[e];n&&(n.onselect=t)}}}(),RED.panels={create:function(a){var s=a.container||$("#"+a.id),r=s.children();if(2!==r.length)throw new Error("Container must have exactly two children");s.addClass("red-ui-panels");var d,l,e=$('<div class="red-ui-panels-separator"></div>').insertAfter(r[0]),c=[],o=!1;return e.draggable({axis:"y",containment:s,scroll:!1,start:function(e,t){s.height(),d=t.position.top,c=[$(r[0]).height(),$(r[1]).height()]},drag:function(e,t){var n=s.height(),o=t.position.top-d,i=[c[0]+o,c[1]-o];$(r[0]).height(i[0]),$(r[1]).height(i[1]),a.resize&&a.resize(i[0],i[1]),t.position.top-=o,l=i[0]/n},stop:function(e,t){o=!0}}),{resize:function(e){var t=[$(r[0]).height(),$(r[1]).height()];if(s.height(e),o){var n=l*e;t=[n,e-n-48],$(r[0]).height(t[0]),$(r[1]).height(t[1])}a.resize&&a.resize(t[0],t[1])}}}},RED.popover=function(){var g={default:{top:10,leftRight:17,leftLeft:25,leftBottom:8},small:{top:5,leftRight:17,leftLeft:16,leftBottom:3}};return{create:function(e){var r=e.target,d=e.direction||"right",t=e.trigger,l=e.content,n=e.delay,o=e.autoClose,c=e.width||"auto",p=e.size||"default";if(!g[p])throw new Error("Invalid RED.popover size value:",p);var u,f,i=null,a=function(e){if(u){if(f=$('<div class="red-ui-popover red-ui-popover-'+d+'"></div>'),"default"!==p&&f.addClass("red-ui-popover-size-"+p),"function"==typeof l){var t=l.call(h);if(null===t)return;"string"==typeof t?f.text(t):f.append(t)}else f.html(l);"auto"!==c&&f.width(c),f.appendTo("body");var n=r.offset(),o=r.outerWidth(),i=r.outerHeight(),a=f.height(),s=f.width();"right"===d?f.css({top:n.top+i/2-a/2-g[p].top,left:n.left+o+g[p].leftRight}):"left"===d?f.css({top:n.top+i/2-a/2-g[p].top,left:n.left-g[p].leftLeft-s}):"bottom"===d&&f.css({top:n.top+i+g[p].top,left:n.left+o/2-s/2-g[p].leftBottom}),e?f.show():f.fadeIn("fast")}},s=function(e){u||f&&(e?$(this).remove():f.fadeOut("fast",function(){$(this).remove()}),f=null)};"hover"===t?(r.on("mouseenter",function(e){clearTimeout(i),u=!0,i=setTimeout(a,n.show)}),r.on("mouseleave",function(e){i&&clearTimeout(i),u=!1,setTimeout(s,n.hide)})):"click"===t?r.click(function(e){e.preventDefault(),e.stopPropagation(),(u=!u)?a():s()}):o&&setTimeout(function(){u=!1,s()},o);var h={setContent:function(e){return l=e,h},open:function(e){return u=!0,a(e),h},close:function(e){return u=!1,s(e),h}};return h},tooltip:function(e,t){RED.popover.create({target:e,trigger:"hover",size:"small",direction:"bottom",content:t,delay:{show:550,hide:10}})}}}(),function(n){n.widget("nodered.searchBox",{_create:function(){var t=this;this.currentTimeout=null,this.lastSent="",this.element.val(""),this.uiContainer=this.element.wrap("<div>").parent(),this.uiContainer.addClass("red-ui-searchBox-container"),n('<i class="fa fa-search"></i>').prependTo(this.uiContainer),this.clearButton=n('<a href="#"><i class="fa fa-times"></i></a>').appendTo(this.uiContainer),this.clearButton.on("click",function(e){e.preventDefault(),t.element.val(""),t._change("",!0),t.element.focus()}),this.resultCount=n("<span>",{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer),this.element.val(""),this.element.on("keydown",function(e){27===e.keyCode&&t.element.val("")}),this.element.on("keyup",function(e){t._change(n(this).val())}),this.element.on("focus",function(){n("body").one("mousedown",function(){t.element.blur()})})},_change:function(e,t){var n=!1;""===e?(this.clearButton.hide(),n=!0):(this.clearButton.show(),n=e.length>=(this.options.minimumLength||0));var o=this.element.val();if(n=n&&o!==this.lastSent)if(!t&&0<this.options.delay){clearTimeout(this.currentTimeout);var i=this;this.currentTimeout=setTimeout(function(){i.lastSent=i.element.val(),i._trigger("change")},this.options.delay)}else this._trigger("change")},value:function(e){if(void 0===e)return this.element.val();this.element.val(e),this._change(e)},count:function(e){null==e||""===e?this.resultCount.text("").hide():this.resultCount.text(e).show()},change:function(){this._trigger("change")}})}(jQuery),RED.tabs=function(){var E="fa fa-lemon-o";return{create:function(l){var s,c,o,i,p={},u=0,r=0,f=l.element||$("#"+l.id),d=f.wrap("<div>").parent(),h=f.wrap("<div>").parent();if(d.addClass("red-ui-tabs"),l.vertical&&d.addClass("red-ui-tabs-vertical"),l.addButton&&"function"==typeof l.addButton&&(d.addClass("red-ui-tabs-add"),$('<div class="red-ui-tab-button"><a href="#"><i class="fa fa-plus"></i></a></div>').appendTo(d).find("a").click(function(e){e.preventDefault(),l.addButton()})),l.scrollable&&(d.addClass("red-ui-tabs-scrollable"),h.addClass("red-ui-tabs-scroll-container"),h.scroll(m),(o=$('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(d).find("a")).on("mousedown",function(e){t(e,"-=150")}).on("click",function(e){e.preventDefault()}),(i=$('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(d).find("a")).on("mousedown",function(e){t(e,"+=150")}).on("click",function(e){e.preventDefault()})),l.collapsible){d.addClass("red-ui-tabs-collapsible");var g=$('<div class="red-ui-tab-link-buttons"></div>').appendTo(d),n=$('<a href="#"><i class="fa fa-caret-down"></i></a>').appendTo(g);n.addClass("red-ui-tab-link-button-menu"),n.click(function(e){if(e.preventDefault(),!c){var i=[],a=[];f.children().each(function(e,t){var n=$(t).data("tabId"),o={id:"red-ui-tabs-menu-option-"+n,icon:p[n].iconClass||E,label:p[n].name,onselect:function(){y(n)}};p[n].pinned?i.push(o):a.push(o)}),a=i.concat(a),(c=RED.menu.init({id:"debug-message-option-menu",options:a})).css({position:"absolute"}),c.on("mouseleave",function(){$(this).hide()}),c.on("mouseup",function(){$(this).hide()}),c.appendTo("body")}var t=n.offset();c.css({top:t.top+n.height()-20+"px",left:t.left-c.width()+n.width()+"px"}),c.toggle()})}function t(e,t){if(e.preventDefault(),!$(this).hasClass("disabled")){var n=h.scrollLeft();h.animate({scrollLeft:t},100);var o=setInterval(function(){var e=h.scrollLeft();e!==n?(n=e,h.animate({scrollLeft:t},100)):clearInterval(o)},100);$(this).one("mouseup",function(){clearInterval(o)})}}function v(){return l.onclick&&l.onclick(p[$(this).attr("href").slice(1)]),y($(this)),!1}function m(){if(0!==f.children().length){var e=h.scrollLeft(),t=h.width(),n=f.width();0===e?o.hide():o.show(),e===n-t?i.hide():i.show()}}function b(){return l.ondblclick&&l.ondblclick(p[$(this).attr("href").slice(1)]),!1}function y(e){if("string"==typeof e&&(e=f.find("a[href='#"+e+"']")),0!==e.length&&!e.parent().hasClass("active")){f.children().removeClass("active"),f.children().css({transition:"width 100ms"}),e.parent().addClass("active");var t=e.parent().attr("id");if(d.find(".red-ui-tab-link-button").removeClass("active selected"),$("#"+t+"-link-button").addClass("active selected"),l.scrollable){var n=e.parent().position().left;n-21<0?h.animate({scrollLeft:"+="+(n-50)},300):n+120>h.width()&&h.animate({scrollLeft:"+="+(n+140-h.width())},300)}l.onchange&&l.onchange(p[e.attr("href").slice(1)]),w(),setTimeout(function(){f.children().css({transition:""})},100)}}function w(){if(!l.vertical){var e=f.find("li.red-ui-tab"),t=d.width(),n=e.size();if(l.collapsible){if((i=t-g.width()-10)<198){for(var o=g.find("a:last").prev();o.is(":not(:visible)");)o=o.prev();o.hasClass("red-ui-tab-link-button-pinned")||o.hide(),i=t-g.width()-10}else 40<t-198-g.width()&&(g.find("a:not(:visible):first").show(),i=t-g.width()-10);e.css({width:i})}else{var i;if(r=(s=100*(i=(t-12-6*n)/n)/t+"%")+"%",l.scrollable){i=Math.max(i,140),s=i+"px",r=0;var a=Math.max(d.width(),12+(i+6)*n);f.width(a),m()}else l.hasOwnProperty("minimumActiveTabWidth")&&(i<l.minimumActiveTabWidth?(n-=1,i=(t-12-l.minimumActiveTabWidth-6*n)/n,s=100*i/t+"%",r=l.minimumActiveTabWidth+"px"):r=0);l.collapsible&&console.log(s),e.css({width:s}),i<50?(f.find(".red-ui-tab-close").hide(),f.find(".red-ui-tab-icon").hide(),f.find(".red-ui-tab-label").css({paddingLeft:Math.min(12,Math.max(0,i-38))+"px"})):(f.find(".red-ui-tab-close").show(),f.find(".red-ui-tab-icon").show(),f.find(".red-ui-tab-label").css({paddingLeft:""})),0!==r&&(f.find("li.red-ui-tab.active").css({width:l.minimumActiveTabWidth}),f.find("li.red-ui-tab.active .red-ui-tab-close").show(),f.find("li.red-ui-tab.active .red-ui-tab-icon").show(),f.find("li.red-ui-tab.active .red-ui-tab-label").css({paddingLeft:""}))}}}function D(e){var t=f.find("a[href='#"+e+"']").parent();if(t.hasClass("active")){var n=t.prev();0===n.size()&&(n=t.next()),y(n.find("a"))}t.remove(),p[e].pinned&&u--,l.onremove&&l.onremove(p[e]),delete p[e],w(),c=null}return f.children().first().addClass("active"),f.children().addClass("red-ui-tab"),f.find("li.red-ui-tab a").on("click",v).on("dblclick",b),setTimeout(function(){w()},0),{addTab:function(t){p[t.id]=t;var n=$("<li/>",{class:"red-ui-tab"}).appendTo(f);n.attr("id","red-ui-tab-"+t.id.replace(".","-")),n.data("tabId",t.id),l.maximumTabWidth&&n.css("maxWidth",l.maximumTabWidth+"px");var e=$("<a/>",{href:"#"+t.id,class:"red-ui-tab-label"}).appendTo(n);if(t.icon?$('<img src="'+t.icon+'" class="red-ui-tab-icon"/>').appendTo(e):t.iconClass&&$("<i>",{class:"red-ui-tab-icon "+t.iconClass}).appendTo(e),$("<span/>",{class:"bidiAware"}).text(t.label).appendTo(e).attr("dir",RED.text.bidi.resolveBaseTextDir(t.label)),l.collapsible){n.addClass("red-ui-tab-pinned");var o=$('<a href="#'+t.id+'" class="red-ui-tab-link-button"></a>');t.pinned?0===u?o.prependTo(g):o.insertAfter(g.find("a.red-ui-tab-link-button-pinned:last")):o.insertBefore(g.find("a:last")),o.attr("id",n.attr("id")+"-link-button"),t.iconClass?$("<i>",{class:t.iconClass}).appendTo(o):$("<i>",{class:E}).appendTo(o),o.click(function(e){e.preventDefault(),y(t.id)}),t.pinned&&(o.addClass("red-ui-tab-link-button-pinned"),u++),RED.popover.tooltip($(o),t.name)}if(e.on("click",v),e.on("dblclick",b),t.closeable){var i=$("<a/>",{href:"#",class:"red-ui-tab-close"}).appendTo(n);i.append('<i class="fa fa-times" />'),i.on("click",function(e){e.preventDefault(),D(t.id)})}if(l.onadd&&l.onadd(t),e.attr("title",t.label),1==f.find("li.red-ui-tab").size()&&y(e),l.onreorder){var a,s,r,d=[];n.draggable({axis:"x",distance:20,start:function(e,t){a=[],d=[],f.children().each(function(e){d[e]={el:$(this),text:$(this).text(),left:$(this).position().left,width:$(this).width()},$(this).is(n)&&(r=s=e),a.push($(this).data("tabId"))}),f.children().each(function(e){e!==s&&$(this).css({position:"absolute",left:d[e].left+"px",width:d[e].width+2,transition:"left 0.3s"})}),n.hasClass("active")||n.css({zIndex:1})},drag:function(e,t){t.position.left+=d[s].left+h.scrollLeft();for(var n=t.position.left+d[s].width/2-h.scrollLeft(),o=0;o<d.length;o++)if(o!==s&&n>d[o].left&&n<d[o].left+d[o].width){o<s?(d[o].left+=d[s].width+8,d[s].el.detach().insertBefore(d[o].el)):(d[o].left-=d[s].width+8,d[s].el.detach().insertAfter(d[o].el)),d[o].el.css({left:d[o].left+"px"}),d.splice(o,0,d.splice(s,1)[0]),s=o;break}},stop:function(e,t){f.children().css({position:"relative",left:"",transition:""}),n.hasClass("active")||n.css({zIndex:""}),w(),r!==s&&l.onreorder(a,$.makeArray(f.children().map(function(){return $(this).data("tabId")}))),y(d[s].el.data("tabId"))}})}setTimeout(function(){w()},10),c=null},removeTab:D,activateTab:y,nextTab:function(){var e=f.find("li.active").next();0<e.length&&y(e.find("a"))},previousTab:function(){var e=f.find("li.active").prev();0<e.length&&y(e.find("a"))},resize:w,count:function(){return f.find("li.red-ui-tab").size()},contains:function(e){return 0<f.find("a[href='#"+e+"']").length},renameTab:function(e,t){p[e].label=t;var n=f.find("a[href='#"+e+"']");n.attr("title",t),n.find("span.bidiAware").text(t).attr("dir",RED.text.bidi.resolveBaseTextDir(t)),w()},order:function(e){var t=$.makeArray(f.children().map(function(){return $(this).data("tabId")}));if(t.length===e.length){var n,o=!0;for(n=0;n<e.length;n++)if(e[n]!==t[n]){o=!1;break}if(!o){var i={};for(f.children().detach().each(function(){i[$(this).data("tabId")]=$(this)}),n=0;n<e.length;n++)i[e[n]].appendTo(f)}}}}}}}(),RED.stack={create:function(o){var i=o.container;i.addClass("red-ui-stack");var a=0,s=[],r=!0,d=function(){if(0<s.length){var t=0;s.forEach(function(e){t+=e.header.outerHeight()});var e=i.innerHeight();a=e-t-(s.length-1),s.forEach(function(e){e.contentWrap.height(a)})}};return o.fill&&o.singleExpanded&&($(window).resize(d),$(window).focus(d)),{add:function(t){s.push(t),t.container=$('<div class="palette-category">').appendTo(i),r||t.container.hide();var e=$('<div class="palette-header"></div>').appendTo(t.container);if(t.header=e,t.contentWrap=$("<div></div>",{style:"position:relative"}).appendTo(t.container),o.fill&&t.contentWrap.css("height",a),t.content=$("<div></div>").appendTo(t.contentWrap),!1!==t.collapsible){e.click(function(){if(o.singleExpanded){if(!t.isExpanded()){for(var e=0;e<s.length;e++)s[e].isExpanded()&&s[e].collapse();t.expand()}}else t.toggle()});var n=$('<i class="fa fa-angle-down"></i>').appendTo(e);t.expanded?(t.container.addClass("palette-category-expanded"),n.addClass("expanded")):t.contentWrap.hide()}else $('<i style="opacity: 0.5;" class="fa fa-angle-down expanded"></i>').appendTo(e),e.css("cursor","default");return t.title=$("<span></span>").html(t.title).appendTo(e),t.toggle=function(){return t.isExpanded()?(t.collapse(),!1):(t.expand(),!0)},t.expand=function(){if(!t.isExpanded())return t.onexpand&&t.onexpand.call(t),o.singleExpanded&&s.forEach(function(e){e!==t&&e.collapse()}),n.addClass("expanded"),t.container.addClass("palette-category-expanded"),t.contentWrap.slideDown(200),!0},t.collapse=function(){if(t.isExpanded())return n.removeClass("expanded"),t.container.removeClass("palette-category-expanded"),t.contentWrap.slideUp(200),!0},t.isExpanded=function(){return t.container.hasClass("palette-category-expanded")},o.fill&&o.singleExpanded&&d(),t},hide:function(){return r=!1,s.forEach(function(e){e.container.hide()}),this},show:function(){return r=!0,s.forEach(function(e){e.container.show()}),this},resize:function(){d()}}}},function(c){var e=function(e){var t=RED.utils.parseContextKey(e);return{option:t.store,value:t.key}},t=function(e,t){if(!t)return e;var n="string"==typeof t?t:t.value;return n!==RED.settings.context.default?"#:("+n+")::"+e:e},s={msg:{value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression},flow:{value:"flow",label:"flow.",hasValue:!0,options:[],validate:RED.utils.validatePropertyExpression,parse:e,export:t},global:{value:"global",label:"global.",hasValue:!0,options:[],validate:RED.utils.validatePropertyExpression,parse:e,export:t},str:{value:"str",label:"string",icon:"red/images/typedInput/az.png"},num:{value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/},bool:{value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]},json:{value:"json",label:"JSON",icon:"red/images/typedInput/json.png",validate:function(e){try{return JSON.parse(e),!0}catch(e){return!1}},expand:function(){var n=this,e=this.value();try{e=JSON.stringify(JSON.parse(e),null,4)}catch(e){}RED.editor.editJSON({value:e,complete:function(e){var t=e;try{t=JSON.stringify(JSON.parse(e))}catch(e){}n.value(t)}})}},re:{value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"},date:{value:"date",label:"timestamp",hasValue:!1},jsonata:{value:"jsonata",label:"expression",icon:"red/images/typedInput/expr.png",validate:function(e){try{return jsonata(e),!0}catch(e){return!1}},expand:function(){var t=this;RED.editor.editExpression({value:this.value().replace(/\t/g,"\n"),complete:function(e){t.value(e.replace(/\n/g,"\t"))}})}},bin:{value:"bin",label:"buffer",icon:"red/images/typedInput/bin.png",expand:function(){var t=this;RED.editor.editBuffer({value:this.value(),complete:function(e){t.value(e)}})}},env:{value:"env",label:"env variable",icon:"red/images/typedInput/env.png"}},r=!1;c.widget("nodered.typedInput",{_create:function(){try{if(!r&&RED&&RED._){for(var e in s)s.hasOwnProperty(e)&&(s[e].label=RED._("typedInput.type."+e,{defaultValue:s[e].label}));var t=RED.settings.context.stores.map(function(e){return{value:e,label:e,icon:'<i class="red-ui-typedInput-icon fa fa-database" style="color: #'+("memory"===e?"ddd":"777")+'"></i>'}});t.length<2?(s.flow.options=[],s.global.options=[]):(s.flow.options=t,s.global.options=t)}r=!0;var n=this;this.disarmClick=!1,this.input=c('<input type="text"></input>'),this.input.insertAfter(this.element),this.input.val(this.element.val()),this.element.addClass("red-ui-typedInput"),this.uiWidth=this.element.outerWidth(),this.elementDiv=this.input.wrap("<div>").parent().addClass("red-ui-typedInput-input"),this.uiSelect=this.elementDiv.wrap("<div>").parent();var o,i=this.element.attr("style");if(null!==(o=/width\s*:\s*(calc\s*\(.*\)|\d+(%|px))/i.exec(i))?(this.input.css("width","100%"),this.uiSelect.width(o[1]),this.uiWidth=null):this.uiSelect.width(this.uiWidth),["Right","Left"].forEach(function(e){var t=n.element.css("margin"+e);n.uiSelect.css("margin"+e,t),n.input.css("margin"+e,0)}),this.uiSelect.addClass("red-ui-typedInput-container"),this.element.attr("type","hidden"),this.options.types=this.options.types||Object.keys(s),this.selectTrigger=c('<button tabindex="0"></button>').prependTo(this.uiSelect),c('<i class="red-ui-typedInput-icon fa fa-sort-desc"></i>').toggle(1<this.options.types.length).appendTo(this.selectTrigger),this.selectLabel=c('<span class="red-ui-typedInput-type-label"></span>').appendTo(this.selectTrigger),this.types(this.options.types),this.options.typeField){this.typeField=c(this.options.typeField).hide();var a=this.typeField.val();a&&this.typeMap[a]&&(this.options.default=a)}else this.typeField=c("<input>",{type:"hidden"}).appendTo(this.uiSelect);this.input.on("focus",function(){n.uiSelect.addClass("red-ui-typedInput-focus")}),this.input.on("blur",function(){n.uiSelect.removeClass("red-ui-typedInput-focus")}),this.input.on("change",function(){n.validate(),n.element.val(n.value()),n.element.trigger("change",n.propertyType,n.value())}),this.selectTrigger.click(function(e){e.preventDefault(),n._showTypeMenu()}),this.selectTrigger.on("keydown",function(e){40===e.keyCode&&n._showTypeMenu()}).on("focus",function(){n.uiSelect.addClass("red-ui-typedInput-focus")}),this.optionSelectTrigger=c('<button tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-sort-desc"></i></span></button>').appendTo(this.uiSelect),this.optionSelectLabel=c('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger),RED.popover.tooltip(this.optionSelectLabel,function(){return n.optionValue}),this.optionSelectTrigger.click(function(e){e.preventDefault(),n._showOptionSelectMenu()}).on("keydown",function(e){40===e.keyCode&&n._showOptionSelectMenu()}).on("blur",function(){n.uiSelect.removeClass("red-ui-typedInput-focus")}).on("focus",function(){n.uiSelect.addClass("red-ui-typedInput-focus")}),this.optionExpandButton=c('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"><i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i></button>').appendTo(this.uiSelect),this.type(this.options.default||this.typeList[0].value)}catch(e){console.log(e.stack)}},_showTypeMenu:function(){1<this.typeList.length?(this._showMenu(this.menu,this.selectTrigger),this.menu.find("[value='"+this.propertyType+"']").focus()):this.input.focus()},_showOptionSelectMenu:function(){if(this.optionMenu){this.optionMenu.css({minWidth:this.optionSelectLabel.width()}),this._showMenu(this.optionMenu,this.optionSelectTrigger);var e=this.optionMenu.find("[value='"+this.optionValue+"']");0===e.length&&(e=this.optionMenu.children(":first")),e.focus()}},_hideMenu:function(e){c(document).off("mousedown.close-property-select"),e.hide(),this.elementDiv.is(":visible")?this.input.focus():this.optionSelectTrigger.is(":visible")?this.optionSelectTrigger.focus():this.selectTrigger.focus()},_createMenu:function(e,n){var o=this,i=c("<div>").addClass("red-ui-typedInput-options");return e.forEach(function(t){"string"==typeof t&&(t={value:t,label:t});var e=c('<a href="#"></a>').attr("value",t.value).appendTo(i);t.label&&e.text(t.label),t.icon?0===t.icon.indexOf("<")?c(t.icon).prependTo(e):-1!==t.icon.indexOf("/")?c("<img>",{src:t.icon,style:"margin-right: 4px; height: 18px;"}).prependTo(e):c("<i>",{class:"red-ui-typedInput-icon "+t.icon}).prependTo(e):e.css({paddingLeft:"18px"}),t.icon||t.label||e.text(t.value),e.click(function(e){e.preventDefault(),n(t.value),o._hideMenu(i)})}),i.css({display:"none"}),i.appendTo(document.body),i.on("keydown",function(e){40===e.keyCode?c(this).children(":focus").next().focus():38===e.keyCode?c(this).children(":focus").prev().focus():27===e.keyCode&&o._hideMenu(i)}),i},_showMenu:function(t,n){if(this.disarmClick)this.disarmClick=!1;else{var o=this,e=n.offset(),i=n.height(),a=t.height(),s=i+e.top-3;s+a>c(window).height()&&(s-=s+a-c(window).height()+5),t.css({top:s+"px",left:2+e.left+"px"}),t.slideDown(100),this._delay(function(){o.uiSelect.addClass("red-ui-typedInput-focus"),c(document).on("mousedown.close-property-select",function(e){c(e.target).closest(t).length||o._hideMenu(t),c(e.target).closest(n).length&&(o.disarmClick=!0,e.preventDefault())})})}},_getLabelWidth:function(e){var t=e.outerWidth();if(0===t){var n=c('<div class="red-ui-typedInput-container"></div>').css({position:"absolute",top:0,left:-1e3}).appendTo(document.body);t=e.clone().appendTo(n).outerWidth(),n.remove()}return t},_resize:function(){null!==this.uiWidth&&this.uiSelect.width(this.uiWidth);var e=this.typeMap[this.propertyType];if(e&&!1===e.hasValue)this.selectTrigger.addClass("red-ui-typedInput-full-width");else{this.selectTrigger.removeClass("red-ui-typedInput-full-width");var t=this._getLabelWidth(this.selectTrigger);if(this.elementDiv.css("left",t+"px"),this.optionExpandButton.is(":visible")?this.elementDiv.css("right","22px"):(this.elementDiv.css("right","0"),this.input.css({"border-top-right-radius":"4px","border-bottom-right-radius":"4px"})),this.optionSelectTrigger)if(e&&e.options&&!0===e.hasValue){this.optionSelectLabel.css({left:"auto"});var n=this._getLabelWidth(this.optionSelectLabel);this.optionSelectTrigger.css({width:23+n+"px"}),this.elementDiv.css("right",23+n+"px"),this.input.css({"border-top-right-radius":0,"border-bottom-right-radius":0})}else this.optionSelectLabel.css({left:"0"}),this.optionSelectTrigger.css({width:"calc( 100% - "+t+"px )"}),this.optionExpandButton.is(":visible")||(this.elementDiv.css({right:0}),this.input.css({"border-top-right-radius":"4px","border-bottom-right-radius":"4px"}))}},_updateOptionSelectLabel:function(e){var t=this.typeMap[this.propertyType];this.optionSelectLabel.empty(),e.icon?0===e.icon.indexOf("<")?c(e.icon).prependTo(this.optionSelectLabel):-1!==e.icon.indexOf("/")?c("<img>",{src:e.icon,style:"height: 18px;"}).prependTo(this.optionSelectLabel):c("<i>",{class:"red-ui-typedInput-icon "+e.icon}).prependTo(this.optionSelectLabel):e.label?this.optionSelectLabel.text(e.label):this.optionSelectLabel.text(e.value),t.hasValue&&(this.optionValue=e.value,this._resize(),this.input.trigger("change",this.propertyType,this.value()))},_destroy:function(){this.optionMenu&&this.optionMenu.remove(),this.menu.remove()},types:function(e){var n=this,t=this.type();this.typeMap={},this.typeList=e.map(function(e){var t;return t="string"==typeof e?s[e]:e,n.typeMap[t.value]=t}),this.selectTrigger.toggleClass("disabled",1===this.typeList.length),this.selectTrigger.find(".fa-sort-desc").toggle(1<this.typeList.length),this.menu&&this.menu.remove(),this.menu=this._createMenu(this.typeList,function(e){n.type(e)}),t&&!this.typeMap.hasOwnProperty(t)?this.type(this.typeList[0].value):(this.propertyType=null,this.type(t)),setTimeout(function(){n._resize()},0)},width:function(e){this.uiWidth=e,this._resize()},value:function(e){if(!arguments.length){var t=this.input.val();return this.typeMap[this.propertyType].export&&(t=this.typeMap[this.propertyType].export(t,this.optionValue)),t}var n;if(this.typeMap[this.propertyType].options){for(var o=0;o<this.typeMap[this.propertyType].options.length;o++){var i=this.typeMap[this.propertyType].options[o];if("string"==typeof i){if(i===e){n=this.activeOptions[i];break}}else if(i.value===e){n=i;break}}n||(n={value:""}),this._updateOptionSelectLabel(n)}this.input.val(e),this.input.trigger("change",this.type(),e)},type:function(e){if(!arguments.length)return this.propertyType;var t=this,n=this.typeMap[e];if(n&&this.propertyType!==e){var o,i;if(this.propertyType=e,this.typeField&&this.typeField.val(e),this.selectLabel.empty(),n.icon?((o=new Image).name=n.icon,o.src=n.icon,c("<img>",{src:n.icon,style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel)):this.selectLabel.text(n.label),n.options){if(this.optionExpandButton&&this.optionExpandButton.hide(),this.optionSelectTrigger)if(this.optionSelectTrigger.show(),n.hasValue?this.elementDiv.show():this.elementDiv.hide(),this.activeOptions={},n.options.forEach(function(e){"string"==typeof e?t.activeOptions[e]={label:e,value:e}:t.activeOptions[e.value]=e}),t.activeOptions.hasOwnProperty(t.optionValue)||(t.optionValue=null),this.optionMenu=this._createMenu(n.options,function(e){t._updateOptionSelectLabel(t.activeOptions[e]),n.hasValue||t.value(t.activeOptions[e].value)}),n.hasValue){var a=this.optionValue||n.options[0];if(n.parse){var s=n.parse(this.input.val());s.option&&(a=s.option,this.activeOptions.hasOwnProperty(a)||(s.option=Object.keys(this.activeOptions)[0],a=s.option)),this.input.val(s.value),n.export&&this.element.val(n.export(s.value,s.option||a))}"string"==typeof a?(this.optionValue=a,this.activeOptions.hasOwnProperty(a)||(a=Object.keys(this.activeOptions)[0]),a?this._updateOptionSelectLabel(this.activeOptions[a]):this.optionSelectTrigger.hide()):a?(this.optionValue=a.value,this._updateOptionSelectLabel(a)):this.optionSelectTrigger.hide()}else{for(var r=this.input.val(),d=!1,l=0;l<n.options.length;l++){if("string"==typeof(i=n.options[l])&&i===r){t._updateOptionSelectLabel({value:r}),d=!0;break}if(i.value===r){t._updateOptionSelectLabel(i),d=!0;break}}d||("string"==typeof(i=n.options[0])?(this.value(i),t._updateOptionSelectLabel({value:i})):(this.value(i.value),t._updateOptionSelectLabel(i)))}}else this.optionMenu&&(this.optionMenu.remove(),this.optionMenu=null),this.optionSelectTrigger&&this.optionSelectTrigger.hide(),!1===n.hasValue?(this.oldValue=this.input.val(),this.input.val(""),this.elementDiv.hide()):(void 0!==this.oldValue&&(this.input.val(this.oldValue),delete this.oldValue),this.elementDiv.show()),this.optionExpandButton&&(n.expand&&"function"==typeof n.expand?(this.optionExpandButton.show(),this.optionExpandButton.off("click"),this.optionExpandButton.on("click",function(e){e.preventDefault(),n.expand.call(t)})):this.optionExpandButton.hide()),this.input.trigger("change",this.propertyType,this.value());o?(o.onload=function(){t._resize()},o.onerror=function(){t._resize()}):this._resize()}},validate:function(){var e,t=this.value(),n=this.type();if(this.typeMap[n]&&this.typeMap[n].validate){var o=this.typeMap[n].validate;e="function"==typeof o?o(t):o.test(t)}else e=!0;return e?this.uiSelect.removeClass("input-error"):this.uiSelect.addClass("input-error"),e},show:function(){this.uiSelect.show(),this._resize()},hide:function(){this.uiSelect.hide()}})}(jQuery),RED.actions=function(){var o={};return{add:function(e,t){o[e]=t},remove:function(e){delete o[e]},get:function(e){return o[e]},invoke:function(e){o.hasOwnProperty(e)&&o[e]()},list:function(){var n=[];return Object.keys(o).forEach(function(e){var t=RED.keyboard.getShortcut(e);n.push({id:e,scope:t?t.scope:void 0,key:t?t.key:void 0,user:t?t.user:void 0})}),n}}}(),RED.deploy=function(){var t={full:{img:"red/images/deploy-full-o.png"},nodes:{img:"red/images/deploy-nodes-o.png"},flows:{img:"red/images/deploy-flows-o.png"}},g={unknown:!1,unusedConfig:!1,invalid:!1},v="full",m=!1,l=null;function a(e){v=e,$("#btn-deploy-icon").attr("src",t[e].img)}function b(e){var t="";if(e.z){var n=RED.nodes.workspace(e.z);t=n?n.label:(n=RED.nodes.subflow(e.z)).name}var o=RED.utils.getNodeLabel(e,e.id);return{tab:t,type:e.type,label:o}}function y(e,t){return e.tab<t.tab?-1:e.tab>t.tab?1:e.type<t.type?-1:e.type>t.type?1:e.name<t.name?-1:e.name>t.name?1:0}function w(e,t){var n=$("<div>");$('<p data-i18n="deploy.confirm.conflict"></p>').appendTo(n);var o=$('<div id="node-dialog-confirm-deploy-conflict-checking" class="node-dialog-confirm-conflict-row"><img src="red/images/spin.svg"/><div data-i18n="deploy.confirm.conflictChecking"></div></div>').appendTo(n),i=$('<div class="node-dialog-confirm-conflict-row"><i style="color: #3a3;" class="fa fa-check"></i><div data-i18n="deploy.confirm.conflictAutoMerge"></div></div>').hide().appendTo(n),a=$('<div id="node-dialog-confirm-deploy-conflict-manual-merge" class="node-dialog-confirm-conflict-row"><i style="color: #999;" class="fa fa-exclamation"></i><div data-i18n="deploy.confirm.conflictManualMerge"></div></div>').hide().appendTo(n);n.i18n(),l=null;var s=[{text:RED._("common.label.cancel"),click:function(){r.close()}},{id:"node-dialog-confirm-deploy-review",text:RED._("deploy.confirm.button.review"),class:"primary disabled",click:function(){$("#node-dialog-confirm-deploy-review").hasClass("disabled")||(RED.diff.showRemoteDiff(),r.close())}},{id:"node-dialog-confirm-deploy-merge",text:RED._("deploy.confirm.button.merge"),class:"primary disabled",click:function(){$("#node-dialog-confirm-deploy-merge").hasClass("disabled")||(RED.diff.mergeDiff(l),r.close())}}];t&&s.push({id:"node-dialog-confirm-deploy-overwrite",text:RED._("deploy.confirm.button.overwrite"),class:"primary",click:function(){E(!0,t),r.close()}});var r=RED.notify(n,{modal:!0,fixed:!0,width:600,buttons:s}),d=Date.now();RED.diff.getRemoteDiff(function(e){var t=Math.max(1e3-(Date.now()-d),0);l=e,setTimeout(function(){o.hide(),0===Object.keys(e.conflicts).length?(i.show(),$("#node-dialog-confirm-deploy-merge").removeClass("disabled")):a.show(),$("#node-dialog-confirm-deploy-review").removeClass("disabled")},t)})}function D(e){if(5<e.length){var t=e.length-5;(e=e.slice(0,5)).push(RED._("deploy.confirm.plusNMore",{count:t}))}return e}function E(e,t){if(!$("#btn-deploy").hasClass("disabled")){if(!RED.user.hasPermission("flows.write"))return void RED.notify(RED._("user.errors.deploy"),"error");if(!e){var n,o=!1,i=!1,a=[],s=[];RED.nodes.eachNode(function(e){o=o||!e.valid,e.valid||s.push(b(e)),"unknown"===e.type&&-1==a.indexOf(e.name)&&a.push(e.name)}),n=0<a.length;var r=[];RED.nodes.eachConfig(function(e){0===e.users.length&&!1!==e._def.hasUsers&&(r.push(b(e)),i=!0)});var d,l,c=!1,p=[];if(n&&!g.unknown?(c=!0,d="<p>"+RED._("deploy.confirm.unknown")+'</p><ul class="node-dialog-configm-deploy-list"><li>'+D(a).join("</li><li>")+"</li></ul><p>"+RED._("deploy.confirm.confirm")+"</p>",p=[{id:"node-dialog-confirm-deploy-deploy",text:RED._("deploy.confirm.button.confirm"),class:"primary",click:function(){E(!0),l.close()}}]):o&&!g.invalid&&(c=!0,s.sort(y),d="<p>"+RED._("deploy.confirm.improperlyConfigured")+'</p><ul class="node-dialog-configm-deploy-list"><li>'+D(s.map(function(e){return(e.tab?"["+e.tab+"] ":"")+e.label+" ("+e.type+")"})).join("</li><li>")+"</li></ul><p>"+RED._("deploy.confirm.confirm")+"</p>",p=[{id:"node-dialog-confirm-deploy-deploy",text:RED._("deploy.confirm.button.confirm"),class:"primary",click:function(){E(!0),l.close()}}]),c)return p.unshift({text:RED._("common.label.cancel"),click:function(){l.close()}}),void(l=RED.notify(d,{modal:!0,fixed:!0,buttons:p}))}var u=RED.nodes.createCompleteNodeSet(),f=Date.now();$(".deploy-button-content").css("opacity",0),$(".deploy-button-spinner").show(),$("#btn-deploy").addClass("disabled");var h={flows:u};t||(h.rev=RED.nodes.version()),m=!0,$("#header-shade").show(),$("#editor-shade").show(),$("#palette-shade").show(),$("#sidebar-shade").show(),$.ajax({url:"flows",type:"POST",data:JSON.stringify(h),contentType:"application/json; charset=utf-8",headers:{"Node-RED-Deployment-Type":v}}).done(function(e,t,n){RED.nodes.dirty(!1),RED.nodes.version(e.rev),RED.nodes.originalFlow(u),i?RED.notify("<p>"+RED._("deploy.successfulDeploy")+"</p><p>"+RED._("deploy.unusedConfigNodes")+' <a href="#" onclick="RED.sidebar.config.show(true); return false;">'+RED._("deploy.unusedConfigNodesLink")+"</a></p>","success",!1,6e3):RED.notify("<p>"+RED._("deploy.successfulDeploy")+"</p>","success"),RED.nodes.eachNode(function(e){e.changed&&(e.dirty=!0,e.changed=!1),e.moved&&(e.dirty=!0,e.moved=!1),e.credentials&&delete e.credentials}),RED.nodes.eachConfig(function(e){e.changed=!1,e.credentials&&delete e.credentials}),RED.nodes.eachSubflow(function(e){e.changed=!1}),RED.nodes.eachWorkspace(function(e){e.changed=!1}),RED.history.markAllDirty(),RED.view.redraw(),RED.events.emit("deploy")}).fail(function(e,t,n){RED.nodes.dirty(!0),$("#btn-deploy").removeClass("disabled"),401===e.status?RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error"):409===e.status?w(0,!0):e.responseText?RED.notify(RED._("deploy.deployFailed",{message:e.responseText}),"error"):RED.notify(RED._("deploy.deployFailed",{message:RED._("deploy.errors.noResponse")}),"error")}).always(function(){m=!1;var e=Math.max(0,300-(Date.now()-f));setTimeout(function(){$(".deploy-button-content").css("opacity",1),$(".deploy-button-spinner").hide(),$("#header-shade").hide(),$("#editor-shade").hide(),$("#palette-shade").hide(),$("#sidebar-shade").hide()},e)})}}return{init:function(e){var i,t=(e=e||{}).type||"default";if("default"==t)$('<li><span class="deploy-button-group button-group"><a id="btn-deploy" class="deploy-button disabled" href="#"><span class="deploy-button-content"><img id="btn-deploy-icon" src="red/images/deploy-full-o.png"> <span>'+RED._("deploy.deploy")+'</span></span><span class="deploy-button-spinner hide"><img src="red/images/spin.svg"/></span></a><a id="btn-deploy-options" data-toggle="dropdown" class="deploy-button" href="#"><i class="fa fa-caret-down"></i></a></span></li>').prependTo(".header-toolbar"),RED.menu.init({id:"btn-deploy-options",options:[{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected:!0,onselect:function(e){e&&a("full")}},{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"),onselect:function(e){e&&a("flows")}},{id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.png",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(e){e&&a("nodes")}}]});else if("simple"==t){var n=e.label||RED._("deploy.deploy"),o="red/images/deploy-full-o.png";e.hasOwnProperty("icon")&&(o=e.icon),$('<li><span class="deploy-button-group button-group"><a id="btn-deploy" class="deploy-button disabled" href="#"><span class="deploy-button-content">'+(o?'<img id="btn-deploy-icon" src="'+o+'"> ':"")+"<span>"+n+'</span></span><span class="deploy-button-spinner hide"><img src="red/images/spin.svg"/></span></a></span></li>').prependTo(".header-toolbar")}$("#btn-deploy").click(function(e){e.preventDefault(),E()}),RED.actions.add("core:deploy-flows",E),RED.events.on("nodes:change",function(e){e.dirty?(window.onbeforeunload=function(){return RED._("deploy.confirm.undeployedChanges")},$("#btn-deploy").removeClass("disabled")):(window.onbeforeunload=null,$("#btn-deploy").addClass("disabled"))}),RED.comms.subscribe("notification/runtime-deploy",function(e,t){if(!i){var n=RED.nodes.version();if(null===n||m||n===t.revision)return;var o=$("<p>").text(RED._("deploy.confirm.backgroundUpdate"));i=RED.notify(o,{modal:!0,fixed:!0,buttons:[{text:RED._("deploy.confirm.button.ignore"),click:function(){i.close(),i=null}},{text:RED._("deploy.confirm.button.review"),class:"primary",click:function(){i.close(),w(RED.nodes.createCompleteNodeSet(),!1),i=null}}]})}})},setDeployInflight:function(e){m=e}}}(),RED.diff=function(){var c=!1;function R(e,t,n){var o=$('<div class="node-dialog-view-diff-panel"></div>').appendTo(e),i=$('<div class="node-dialog-view-diff-headers"></div>').appendTo(o);"merge"===n.mode&&o.addClass("node-dialog-view-diff-panel-merge");var a,O,s,r=(a=o,O=t,(s=$('<ol class="node-dialog-view-diff-diff"></ol>').appendTo(a)).editableList({addButton:!1,height:"auto",scrollOnAdd:!1,addItem:function(e,t,n){var o=n.diff,i=n.remoteDiff,a=n.tab.n,s=n.def,r=O.conflicts,d=$("<div>",{class:"node-diff-tab"}).appendTo(e);d.addClass("collapsed");var l,c,p=$("<div>",{class:"node-diff-tab-title"}).appendTo(d),u=$("<div>").appendTo(d),f=$("<div>",{class:"node-diff-node-entry-cell"}).appendTo(p),h=$("<div>",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(p);i&&(l=$("<div>",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(p)),$('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(f),L(a,s).appendTo(f);var g=(n.newTab||n.tab).n,v=$("<span>",{class:"node-diff-tab-title-meta"}).appendTo(f);"tab"===g.type?v.text(g.label||g.id):"subflow"===a.type?v.text(g.name||g.id):v.text(RED._("diff.globalNodes"));var m={local:{addedCount:0,deletedCount:0,changedCount:0,unchangedCount:0},remote:{addedCount:0,deletedCount:0,changedCount:0,unchangedCount:0},conflicts:0};if(n.newTab||n.remoteTab){var b,y={node:o.newConfig.all[a.id],all:o.newConfig.all,diff:o};if(i&&(b={node:i.newConfig.all[a.id]||null,all:i.newConfig.all,diff:i}),void 0!==a.type){var w,D=$("<div>",{class:"node-diff-node-entry node-diff-node-props collapsed"}).appendTo(u),E=$("<div>",{class:"node-diff-node-entry-header"}).appendTo(D),R=$("<div>",{class:"node-diff-node-entry-cell"}).appendTo(E),x=$("<div>",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(E);o.newConfig.all[a.id]?o.added[a.id]?(x.addClass("node-diff-node-added"),$('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(x)):o.changed[a.id]?(x.addClass("node-diff-node-changed"),$('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(x)):(x.addClass("node-diff-node-unchanged"),$('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(x)):x.addClass("node-diff-empty"),i&&(w=$("<div>",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(E),i.newConfig.all[a.id]?i.added[a.id]?(w.addClass("node-diff-node-added"),$('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(w)):i.changed[a.id]?(w.addClass("node-diff-node-changed"),$('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(w)):(w.addClass("node-diff-node-unchanged"),$('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(w)):(w.addClass("node-diff-empty"),i.deleted[a.id])),$('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(R),$("<span>").text(RED._("diff.flowProperties")).appendTo(R),E.click(function(e){e.preventDefault(),$(this).parent().toggleClass("collapsed")}),N(s,a,y,b).appendTo(D),c="",r[a.id]?(m.conflicts++,x.hasClass("node-diff-empty")||$('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(x),w.hasClass("node-diff-empty")||$('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(w),D.addClass("node-diff-node-entry-conflict")):c=O.resolutions[a.id],I(a,D,x,w,!0,!r[a.id],c,O)}}var T=0,_=0,k={};if(n.tab.nodes.forEach(function(e){k[e.id]=!0,P(e,m,O).appendTo(u)}),n.newTab&&(T=n.newTab.nodes.length,n.newTab.nodes.forEach(function(e){k[e.id]||(k[e.id]=!0,P(e,m,O).appendTo(u))})),n.remoteTab&&(_=n.remoteTab.nodes.length,n.remoteTab.nodes.forEach(function(e){k[e.id]||P(e,m,O).appendTo(u)})),p.click(function(e){p.parent().toggleClass("collapsed"),$(this).parent().hasClass("collapsed")&&($(this).parent().find(".node-diff-node-entry").addClass("collapsed"),$(this).parent().find(".debug-message-element").addClass("collapsed"))}),o.deleted[a.id])$('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.flowDeleted"></span></span></span>').appendTo(h);else if(n.newTab)if(o.added[a.id])$('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.flowAdded"></span></span></span>').appendTo(h);else{a.id&&(o.changed[a.id]?m.local.changedCount++:m.local.unchangedCount++);var j=$("<span>",{class:"node-diff-tab-stats"}).appendTo(h);$('<span class="node-diff-status"></span>').text(RED._("diff.nodeCount",{count:T})).appendTo(j),0<m.conflicts+m.local.addedCount+m.local.changedCount+m.local.deletedCount&&($('<span class="node-diff-status"> [ </span>').appendTo(j),0<m.conflicts&&$('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i> '+m.conflicts+"</span></span>").appendTo(j),0<m.local.addedCount&&$('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> '+m.local.addedCount+"</span></span>").appendTo(j),0<m.local.changedCount&&$('<span class="node-diff-node-changed"><span class="node-diff-status"><i class="fa fa-square"></i> '+m.local.changedCount+"</span></span>").appendTo(j),0<m.local.deletedCount&&$('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> '+m.local.deletedCount+"</span></span>").appendTo(j),$('<span class="node-diff-status"> ] </span>').appendTo(j))}else h.addClass("node-diff-empty");if(i){if(i.deleted[a.id])$('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.flowDeleted"></span></span></span>').appendTo(l);else if(n.remoteTab)if(i.added[a.id])$('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.flowAdded"></span></span></span>').appendTo(l);else{a.id&&(i.changed[a.id]?m.remote.changedCount++:m.remote.unchangedCount++);var C=$("<span>",{class:"node-diff-tab-stats"}).appendTo(l);$('<span class="node-diff-status"></span>').text(RED._("diff.nodeCount",{count:_})).appendTo(C),0<m.conflicts+m.remote.addedCount+m.remote.changedCount+m.remote.deletedCount&&($('<span class="node-diff-status"> [ </span>').appendTo(C),0<m.conflicts&&$('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i> '+m.conflicts+"</span></span>").appendTo(C),0<m.remote.addedCount&&$('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-plus-square"></i> '+m.remote.addedCount+"</span></span>").appendTo(C),0<m.remote.changedCount&&$('<span class="node-diff-node-changed"><span class="node-diff-status"><i class="fa fa-square"></i> '+m.remote.changedCount+"</span></span>").appendTo(C),0<m.remote.deletedCount&&$('<span class="node-diff-node-deleted"><span class="node-diff-status"><i class="fa fa-minus-square"></i> '+m.remote.deletedCount+"</span></span>").appendTo(C),$('<span class="node-diff-status"> ] </span>').appendTo(C))}else l.addClass("node-diff-empty");if(c="",0<m.conflicts?p.addClass("node-diff-node-entry-conflict"):c=O.resolutions[a.id],a.id){var S=!(0<m.conflicts&&(o.deleted[a.id]||i.deleted[a.id]));I(a,p,h,l,!1,S,c,O)}}0===d.find(".node-diff-node-entry").length&&d.addClass("node-diff-tab-empty"),e.i18n()}}),s),d=t.localDiff,l=t.remoteDiff,c=(t.conflicts,d.currentConfig),p=d.newConfig;if(void 0!==l){o.addClass("node-diff-three-way");var u=n.oldRevTitle||RED._("diff.local"),f=n.newRevTitle||RED._("diff.remote");$("<div></div>").text(u).appendTo(i),$("<div></div>").text(f).appendTo(i)}else o.removeClass("node-diff-three-way");return{list:r,finish:function(){var e={diff:d,def:{category:"config",color:"#f0f0f0"},tab:{n:{},nodes:c.globals},newTab:{n:{},nodes:p.globals}};void 0!==l&&(e.remoteTab={n:{},nodes:l.newConfig.globals},e.remoteDiff=l),r.editableList("addItem",e);var t,o={};for(t in c.tabOrder.forEach(function(e){var t=c.tabs[e],n={diff:d,def:RED.nodes.getType("tab"),tab:t};p.tabs.hasOwnProperty(e)&&(n.newTab=p.tabs[e]),void 0!==l&&(n.remoteTab=l.newConfig.tabs[e],n.remoteDiff=l),o[e]=!0,r.editableList("addItem",n)}),p.tabOrder.forEach(function(e){if(!o[e]){o[e]=!0;var t=p.tabs[e],n={diff:d,def:RED.nodes.getType("tab"),tab:t,newTab:t};void 0!==l&&(n.remoteDiff=l),r.editableList("addItem",n)}}),void 0!==l&&l.newConfig.tabOrder.forEach(function(e){if(!o[e]){var t=l.newConfig.tabs[e],n={diff:d,remoteDiff:l,def:RED.nodes.getType("tab"),tab:t,remoteTab:t};r.editableList("addItem",n)}}),c.subflows)c.subflows.hasOwnProperty(t)&&(o[t]=!0,e={diff:d,def:{defaults:{},icon:"subflow.png",category:"subflows",color:"#da9"},tab:c.subflows[t]},p.subflows.hasOwnProperty(t)&&(e.newTab=p.subflows[t]),void 0!==l&&(e.remoteTab=l.newConfig.subflows[t],e.remoteDiff=l),r.editableList("addItem",e));for(t in p.subflows)p.subflows.hasOwnProperty(t)&&!o[t]&&(o[t]=!0,e={diff:d,def:{defaults:{},icon:"subflow.png",category:"subflows",color:"#da9"},tab:p.subflows[t],newTab:p.subflows[t]},void 0!==l&&(e.remoteDiff=l),r.editableList("addItem",e));if(void 0!==l)for(t in l.newConfig.subflows)l.newConfig.subflows.hasOwnProperty(t)&&!o[t]&&(e={diff:d,remoteDiff:l,def:{defaults:{},icon:"subflow.png",category:"subflows",color:"#da9"},tab:l.newConfig.subflows[t],remoteTab:l.newConfig.subflows[t]},r.editableList("addItem",e))}}}function E(e,i){var t=$("<div>",{class:"node-diff-property-wires"}),a=$("<ol></ol>"),s=0;return e.forEach(function(e,t){var n=$("<li>").appendTo(a);if(e&&0<e.length){$("<span>").text(t+1).appendTo(n);var o=$("<ul>").appendTo(n);e.forEach(function(e){s++;var t=$("<li>").appendTo(o),n=i[e];n?w(n,RED.nodes.getType(n.type)||{}).appendTo(t):t.text(e)})}else n.text("none")}),0===s?t.text("none"):a.appendTo(t),t}function L(e,t){var n=$("<div>",{class:"node-diff-node-entry-node"}),o=RED.utils.getNodeColor(e.type,t),i=RED.utils.getNodeIcon(t,e);"tab"===e.type&&(o="#C0DEED"),n.css("backgroundColor",o);var a=$("<div/>",{class:"palette_icon_container"}).appendTo(n);return $("<div/>",{class:"palette_icon",style:"background-image: url("+i+")"}).appendTo(a),n}function w(e,t){var n=$("<div>",{class:"node-diff-node-entry-title"});L(e,t).appendTo(n);var o=$("<div>",{class:"node-diff-node-description"}).appendTo(n),i=e.label||e.name||e.id;return $("<span>",{class:"node-diff-node-label"}).text(i).appendTo(o),n}function P(e,t,n){var o=n.localDiff,i=n.remoteDiff,a=n.conflicts[e.id],s=!0;o.added[e.id]&&(t.local.addedCount++,s=!1),i&&i.added[e.id]&&(t.remote.addedCount++,s=!1),o.deleted[e.id]&&(t.local.deletedCount++,s=!1),i&&i.deleted[e.id]&&(t.remote.deletedCount++,s=!1),o.changed[e.id]&&(t.local.changedCount++,s=!!0),i&&i.changed[e.id]&&(t.remote.changedCount++,s=!!0);var r=RED.nodes.getType(e.type);void 0===r&&(r=/^subflow:/.test(e.type)?{icon:"subflow.png",category:"subflows",color:"#da9",defaults:{name:{value:""}}}:{});var d,l=$("<div>",{class:"node-diff-node-entry collapsed"}),c=$("<div>",{class:"node-diff-node-entry-header"}).appendTo(l),p=$("<div>",{class:"node-diff-node-entry-cell"}).appendTo(c),u=$("<div>",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(c);if(i&&(d=$("<div>",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(c)),$('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(p),s)t.local.unchangedCount++,w(e,r).appendTo(p),u.addClass("node-diff-node-unchanged"),$('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(u),i&&(t.remote.unchangedCount++,d.addClass("node-diff-node-unchanged"),$('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(d)),l.addClass("node-diff-node-unchanged");else if(o.added[e.id])u.addClass("node-diff-node-added"),d&&d.addClass("node-diff-empty"),$('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(u),w(e,r).appendTo(p);else if(i&&i.added[e.id])u.addClass("node-diff-empty"),d.addClass("node-diff-node-added"),$('<span class="node-diff-status"><i class="fa fa-plus-square"></i> <span data-i18n="diff.type.added"></span></span>').appendTo(d),w(e,r).appendTo(p);else{if(w(e,r).appendTo(p),o.moved[e.id]){var f=o.newConfig.all[e.id];if(o.deleted[e.z]||e.z===f.z||""===e.z||o.newConfig.all[e.z]){u.addClass("node-diff-node-moved");var h="";h=e.z===f.z?RED._("diff.type.movedFrom",{id:o.currentConfig.all[e.id].z||"global"}):RED._("diff.type.movedTo",{id:f.z||"global"}),$('<span class="node-diff-status"><i class="fa fa-caret-square-o-right"></i> '+h+"</span>").appendTo(u)}else u.addClass("node-diff-empty");!0}else o.deleted[e.z]?(u.addClass("node-diff-empty"),!0):o.deleted[e.id]?(u.addClass("node-diff-node-deleted"),$('<span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.deleted"></span></span>').appendTo(u),!0):o.changed[e.id]?o.newConfig.all[e.id].z!==e.z?u.addClass("node-diff-empty"):(u.addClass("node-diff-node-changed"),$('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(u),!0):o.newConfig.all[e.id].z!==e.z?u.addClass("node-diff-empty"):(t.local.unchangedCount++,u.addClass("node-diff-node-unchanged"),$('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(u));if(i)if(i.moved[e.id]){var g=i.newConfig.all[e.id];if(i.deleted[e.z]||e.z===g.z||""===e.z||i.newConfig.all[e.z]){d.addClass("node-diff-node-moved");var v="";v=e.z===g.z?RED._("diff.type.movedFrom",{id:i.currentConfig.all[e.id].z||"global"}):RED._("diff.type.movedTo",{id:g.z||"global"}),$('<span class="node-diff-status"><i class="fa fa-caret-square-o-right"></i> '+v+"</span>").appendTo(d)}else d.addClass("node-diff-empty")}else i.deleted[e.z]?d.addClass("node-diff-empty"):i.deleted[e.id]?(d.addClass("node-diff-node-deleted"),$('<span class="node-diff-status"><i class="fa fa-minus-square"></i> <span data-i18n="diff.type.deleted"></span></span>').appendTo(d)):i.changed[e.id]?i.newConfig.all[e.id].z!==e.z?d.addClass("node-diff-empty"):(d.addClass("node-diff-node-changed"),$('<span class="node-diff-status"><i class="fa fa-square"></i> <span data-i18n="diff.type.changed"></span></span>').appendTo(d)):i.newConfig.all[e.id].z!==e.z?d.addClass("node-diff-empty"):(t.remote.unchangedCount++,d.addClass("node-diff-node-unchanged"),$('<span class="node-diff-status"><i class="fa fa-square-o"></i> <span data-i18n="diff.type.unchanged"></span></span>').appendTo(d))}var m,b={node:o.newConfig.all[e.id],all:o.newConfig.all,diff:o};i&&(m={node:i.newConfig.all[e.id]||null,all:i.newConfig.all,diff:i}),N(r,e,b,m).appendTo(l);var y="";return a?(t.conflicts++,u.hasClass("node-diff-empty")||$('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(u),d.hasClass("node-diff-empty")||$('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span>').prependTo(d),l.addClass("node-diff-node-entry-conflict")):y=n.resolutions[e.id],I(e,l,u,d,!1,!a,y,n),c.click(function(e){$(this).parent().toggleClass("collapsed")}),l}function N(t,o,i,a){var s,r={},d=i.node;a&&(s=a.node);var e=$("<div>",{class:"node-diff-node-entry-properties"}),n=$("<table>").appendTo(e),l=$("<colgroup><col/><col/></colgroup>").appendTo(n);void 0!==s&&$("<col/>").appendTo(l);var c,p,u,f,h,g,v,m=$("<tbody>").appendTo(n),b=!1,y=!1,w=!1;c=$("<tr>").appendTo(m),$("<td>",{class:"node-diff-property-cell-label"}).text("id").appendTo(c),p=$("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(c),d?(p.addClass("node-diff-node-unchanged"),$('<span class="node-diff-status"></span>').appendTo(p),f=$('<span class="node-diff-element"></span>').appendTo(p),r["local.id"]=RED.utils.createObjectElement(d.id).appendTo(f)):p.addClass("node-diff-empty"),void 0!==s&&((u=$("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(c)).addClass("node-diff-node-unchanged"),s?($('<span class="node-diff-status"></span>').appendTo(u),f=$('<span class="node-diff-element"></span>').appendTo(u),r["remote.id"]=RED.utils.createObjectElement(s.id).appendTo(f)):u.addClass("node-diff-empty")),o.hasOwnProperty("x")&&(d&&(d.x===o.x&&d.y===o.y||(b=!0,0)),s&&(s.x===o.x&&s.y===o.y||(y=!0,0)),(y&&b&&(d.x!==s.x||d.y!==s.y)||!b&&y&&i.diff.deleted[o.id]||b&&!y&&a.diff.deleted[o.id])&&(w=!0),c=$("<tr>").appendTo(m),$("<td>",{class:"node-diff-property-cell-label"}).text("position").appendTo(c),p=$("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(c),d?(p.addClass("node-diff-node-"+(b?"changed":"unchanged")),$('<span class="node-diff-status">'+(b?'<i class="fa fa-square"></i>':"")+"</span>").appendTo(p),f=$('<span class="node-diff-element"></span>').appendTo(p),r["local.position"]=RED.utils.createObjectElement({x:d.x,y:d.y},{path:"position",exposeApi:!0,ontoggle:function(e,t){r["remote."+e]&&r["remote."+e].prop("expand")(e,t)}}).appendTo(f)):p.addClass("node-diff-empty"),void 0!==s&&((u=$("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(c)).addClass("node-diff-node-"+(y?"changed":"unchanged")),s?($('<span class="node-diff-status">'+(y?'<i class="fa fa-square"></i>':"")+"</span>").appendTo(u),f=$('<span class="node-diff-element"></span>').appendTo(u),r["remote.position"]=RED.utils.createObjectElement({x:s.x,y:s.y},{path:"position",exposeApi:!0,ontoggle:function(e,t){r["local."+e]&&r["local."+e].prop("expand")(e,t)}}).appendTo(f)):u.addClass("node-diff-empty"))),b=y=w=!1,o.hasOwnProperty("wires")&&(h=JSON.stringify(o.wires),d&&(g=JSON.stringify(d.wires),h!==g&&(b=!0,0)),s&&(v=JSON.stringify(s.wires),h!==v&&(y=!0,0)),(y&&b&&g!==v||!b&&y&&i.diff.deleted[o.id]||b&&!y&&a.diff.deleted[o.id])&&(w=!0),c=$("<tr>").appendTo(m),$("<td>",{class:"node-diff-property-cell-label"}).text("wires").appendTo(c),p=$("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(c),d?(w?(p.addClass("node-diff-node-conflict"),$('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(p)):(p.addClass("node-diff-node-"+(b?"changed":"unchanged")),$('<span class="node-diff-status">'+(b?'<i class="fa fa-square"></i>':"")+"</span>").appendTo(p)),E(d.wires,i.all).appendTo(p)):p.addClass("node-diff-empty"),void 0!==s&&(u=$("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(c),s?(w?(u.addClass("node-diff-node-conflict"),$('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(u)):(u.addClass("node-diff-node-"+(y?"changed":"unchanged")),$('<span class="node-diff-status">'+(y?'<i class="fa fa-square"></i>':"")+"</span>").appendTo(u)),E(s.wires,a.all).appendTo(u)):u.addClass("node-diff-empty")));var D=Object.keys(o).filter(function(e){return!("inputLabels"==e||"outputLabels"==e||"z"==e||"wires"==e||"x"===e||"y"===e||"id"===e||"type"===e||t.defaults&&t.defaults.hasOwnProperty(e))});return t.defaults&&(D=D.concat(Object.keys(t.defaults))),"tab"!==o.type&&(D=D.concat(["inputLabels","outputLabels"])),D.forEach(function(n){w=y=b=!1,h=JSON.stringify(o[n]),d&&(g=JSON.stringify(d[n]),h!==g&&(b=!0,0)),s&&(v=JSON.stringify(s[n]),h!==v&&(y=!0,0)),(y&&b&&g!==v||!b&&y&&i.diff.deleted[o.id]||b&&!y&&a.diff.deleted[o.id])&&(w=!0),c=$("<tr>").appendTo(m);var e=$("<td>",{class:"node-diff-property-cell-label"}).text(n).appendTo(c);p=$("<td>",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(c),d?(w?(p.addClass("node-diff-node-conflict"),$('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(p)):(p.addClass("node-diff-node-"+(b?"changed":"unchanged")),$('<span class="node-diff-status">'+(b?'<i class="fa fa-square"></i>':"")+"</span>").appendTo(p)),f=$('<span class="node-diff-element"></span>').appendTo(p),r["local."+n]=RED.utils.createObjectElement(d[n],{path:n,exposeApi:!0,ontoggle:function(e,t){r["remote."+n]&&r["remote."+n].prop("expand")(e,t)}}).appendTo(f)):p.addClass("node-diff-empty"),void 0!==s&&(u=$("<td>",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(c),s?(w?(u.addClass("node-diff-node-conflict"),$('<span class="node-diff-status"><i class="fa fa-exclamation"></i></span>').appendTo(u)):(u.addClass("node-diff-node-"+(y?"changed":"unchanged")),$('<span class="node-diff-status">'+(y?'<i class="fa fa-square"></i>':"")+"</span>").appendTo(u)),f=$('<span class="node-diff-element"></span>').appendTo(u),r["remote."+n]=RED.utils.createObjectElement(s[n],{path:n,exposeApi:!0,ontoggle:function(e,t){r["local."+n]&&r["local."+n].prop("expand")(e,t)}}).appendTo(f)):u.addClass("node-diff-empty")),d&&s&&"string"==typeof d[n]&&(/\n/.test(d[n])||/\n/.test(s[n]))&&$('<button class="editor-button editor-button-small node-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').click(function(){k(d[n],s[n])}).appendTo(e)}),e}function I(i,a,e,t,s,n,o,r){var d="node-diff-selectbox-"+i.id.replace(/\./g,"-")+(s?"-props":""),l="";(i.z||s)&&(l="node-diff-selectbox-tab-"+(s?i.id:i.z).replace(/\./g,"-"));var c=!s&&("tab"===i.type||"subflow"===i.type),p=function(e){var t;if(void 0===i.type);else if(c)t="node-diff-selectbox-tab-"+i.id.replace(/\./g,"-"),$("."+t+"-"+this.value).prop("checked",!0),"local"===this.value?($("."+t+"-"+this.value).closest(".node-diff-node-entry").addClass("node-diff-select-local"),$("."+t+"-"+this.value).closest(".node-diff-node-entry").removeClass("node-diff-select-remote")):($("."+t+"-"+this.value).closest(".node-diff-node-entry").removeClass("node-diff-select-local"),$("."+t+"-"+this.value).closest(".node-diff-node-entry").addClass("node-diff-select-remote"));else{var n="node-diff-selectbox-"+(s?i.id:i.z).replace(/\./g,"-");$("#"+n+"-local").prop("checked",!1),$("#"+n+"-remote").prop("checked",!1);var o=$("#"+n+"-local").closest(".node-diff-tab").find(".node-diff-tab-title");o.removeClass("node-diff-select-local"),o.removeClass("node-diff-select-remote")}"local"===this.value?(a.removeClass("node-diff-select-remote"),a.addClass("node-diff-select-local")):"remote"===this.value&&(a.addClass("node-diff-select-remote"),a.removeClass("node-diff-select-local")),x(r)},u=$("<label>",{class:"node-diff-selectbox",for:d+"-local"}).click(function(e){e.stopPropagation()}).appendTo(e),f=$("<input>",{id:d+"-local",type:"radio",value:"local",name:d,class:l+"-local"+(c?"":" node-diff-select-node")}).data("node-id",i.id).change(p).appendTo(u),h=$("<label>",{class:"node-diff-selectbox",for:d+"-remote"}).click(function(e){e.stopPropagation()}).appendTo(t),g=$("<input>",{id:d+"-remote",type:"radio",value:"remote",name:d,class:l+"-remote"+(c?"":" node-diff-select-node")}).data("node-id",i.id).change(p).appendTo(h);"local"===o?f.prop("checked",!0):"remote"===o&&g.prop("checked",!0),(n||e.hasClass("node-diff-empty")||t.hasClass("node-diff-empty"))&&(u.hide(),h.hide())}function x(e){var t=0;$(".node-diff-selectbox>input:checked").each(function(){e.conflicts[$(this).data("node-id")]&&t++,e.resolutions[$(this).data("node-id")]=$(this).val()});var n=Object.keys(e.conflicts).length;n-t==0?$("#node-diff-toolbar-resolved-conflicts").html('<span class="node-diff-node-added"><span class="node-diff-status"><i class="fa fa-check"></i></span></span> '+RED._("diff.unresolvedCount",{count:n-t})):$("#node-diff-toolbar-resolved-conflicts").html('<span class="node-diff-node-conflict"><span class="node-diff-status"><i class="fa fa-exclamation"></i></span></span> '+RED._("diff.unresolvedCount",{count:n-t})),n===t&&($("#node-diff-view-diff-merge").removeClass("disabled"),$("#node-diff-view-resolve-diff").removeClass("disabled"))}function t(s){$.ajax({headers:{Accept:"application/json"},cache:!1,url:"flows",success:function(e){var t=RED.nodes.createCompleteNodeSet(),n=RED.nodes.originalFlow(),o=e.flows,i=T(n,t),a=T(n,o);a.rev=e.rev,s(_(i,a))}})}function n(e){void 0===e?t(n):function(i,a){if(c)return;(a=a||{}).mode,i.localDiff;var s=i.remoteDiff,r=i.conflicts,e={title:a.title||RED._("diff.reviewChanges"),width:1/0,overlay:!0,buttons:[{text:RED._("merge"===a.mode?"common.label.cancel":"common.label.close"),click:function(){RED.tray.close()}}],resize:function(e){},open:function(e){var t=e.find(".editor-tray-body"),n=($('<div class="node-diff-toolbar"><span><span id="node-diff-toolbar-resolved-conflicts"></span></span> </div>').prependTo(t),$('<div class="node-diff-container"></div>').appendTo(t)),o=R(n,i,a);o.list.hide(),s?($("#node-diff-view-diff-merge").show(),0===Object.keys(r).length?$("#node-diff-view-diff-merge").removeClass("disabled"):$("#node-diff-view-diff-merge").addClass("disabled")):$("#node-diff-view-diff-merge").hide(),x(i),setTimeout(function(){o.finish(),o.list.show()},300),$("#sidebar-shade").show()},close:function(){c=!1,$("#sidebar-shade").hide()},show:function(){}};"merge"===a.mode&&e.buttons.push({id:"node-diff-view-diff-merge",text:RED._("deploy.confirm.button.merge"),class:"primary disabled",click:function(){$("#node-diff-view-diff-merge").hasClass("disabled")||(x(i),o(i),RED.tray.close())}});RED.tray.show(e)}(e,{mode:"merge"})}function d(e){var t=[],n={},o={},i=[],a={};return e.forEach(function(e){"tab"===(a[e.id]=e).type?(t.push(e.id),n[e.id]={n:e,nodes:[]}):"subflow"===e.type&&(o[e.id]={n:e,nodes:[]})}),e.forEach(function(e){"tab"!==e.type&&"subflow"!==e.type&&(n[e.z]?n[e.z].nodes.push(e):o[e.z]?o[e.z].nodes.push(e):i.push(e))}),{all:a,tabOrder:t,tabs:n,subflows:o,globals:i}}function T(e,t){var n=d(e),o=d(t),i={},a={},s={},r={};return Object.keys(n.all).forEach(function(e){RED.nodes.workspace(e)||RED.nodes.subflow(e)||RED.nodes.node(e);o.all.hasOwnProperty(e)?JSON.stringify(n.all[e])!==JSON.stringify(o.all[e])&&(s[e]=!0,n.all[e].z!==o.all[e].z&&(r[e]=!0)):a[e]=!0}),Object.keys(o.all).forEach(function(e){n.all.hasOwnProperty(e)||(i[e]=!0)}),{currentConfig:n,newConfig:o,added:i,deleted:a,changed:s,moved:r}}function _(e,t){var n,o,i={},a={},s={localDiff:e,remoteDiff:t,conflicts:i,resolutions:a},r={};for(n in e.currentConfig.all)if(e.currentConfig.all.hasOwnProperty(n)){r[n]=!0;var d=e.newConfig.all[n];if(e.changed[n]&&t.deleted[n])i[n]=!0;else if(e.deleted[n]&&t.changed[n])i[n]=!0;else if(e.changed[n]&&t.changed[n]){var l=t.newConfig.all[n];JSON.stringify(d)!==JSON.stringify(l)&&(i[n]=!0)}i[n]||(t.added[n]||t.changed[n]||t.deleted[n]?a[n]="remote":a[n]="local")}for(n in e.added)e.added.hasOwnProperty(n)&&(o=e.newConfig.all[n],t.deleted[o.z]?i[n]=!0:a[n]="local");for(n in t.added)t.added.hasOwnProperty(n)&&(o=t.newConfig.all[n],e.deleted[o.z]?i[n]=!0:a[n]="remote");return s}function s(e){e.localDiff.currentConfig;var t,n=e.localDiff,o=e.remoteDiff,i=e.conflicts,a=e.resolutions;for(t in i)if(i.hasOwnProperty(t)&&!a.hasOwnProperty(t))throw console.log(e),new Error("No resolution for conflict on node",t);var s,r=[],d={},l={};for(t in n.newConfig.all)n.newConfig.all.hasOwnProperty(t)&&(s=RED.nodes.node(t),"local"===a[t]?(s&&(d[t]=s.changed),r.push(n.newConfig.all[t])):"remote"===a[t]?!o.deleted[t]&&o.newConfig.all.hasOwnProperty(t)&&(s&&(d[t]=s.changed),l[t]=!0,r.push(o.newConfig.all[t])):console.log("Unresolved",t));for(t in o.added)o.added.hasOwnProperty(t)&&((s=RED.nodes.node(t))&&(d[t]=s.changed),n.added.hasOwnProperty(t)||(l[t]=!0,r.push(o.newConfig.all[t])));return{config:r,nodeChangedStates:d,localChangedStates:l}}function o(e){var t=s(e),n=t.config,o=t.nodeChangedStates,i=t.localChangedStates,a={t:"replace",config:RED.nodes.createCompleteNodeSet(),changed:o,dirty:RED.nodes.dirty(),rev:RED.nodes.version()};RED.history.push(a),RED.nodes.clear(),RED.nodes.import(n)[0].forEach(function(e){(o[e.id]||i[e.id])&&(e.changed=!0)}),RED.nodes.version(e.remoteDiff.rev),RED.view.redraw(!0),RED.palette.refresh(),RED.workspaces.refresh(),RED.sidebar.config.refresh()}function k(y,w){var e={title:RED._("diff.compareChanges"),width:1/0,overlay:!0,buttons:[{text:RED._("common.label.close"),click:function(){RED.tray.close()}}],resize:function(e){},open:function(e){var t=e.find(".editor-tray-body"),n=$('<div class="node-text-diff"></div>').appendTo(t),o=$("<table>",{class:"node-text-diff-content"}).appendTo(n);$('<colgroup><col width="50"><col width="50%"><col width="50"><col width="50%"></colgroup>').appendTo(o);for(var i,a=$("<tbody>").appendTo(o),s=function(e,t,n){var o,i,a=e.split(/\r?\n/),s=t.split(/\r?\n/),r=a.length,d=s.length,l={a:[],b:[]},c=[];for(o=0;o<r+1;o++)for(c[o]=[],i=0;i<d+1;i++)c[o][i]=0;for(o=r-1;0<=o;o--)for(i=d-1;0<=i;i--)0,1!==C(a[o],s[i],n)?c[o][i]=c[o+1][i+1]+1:c[o][i]=Math.max(c[o+1][i],c[o][i+1]);i=o=0;for(;o<r&&i<d;){var p=C(a[o],s[i],n);if(1!==p){var u=0;0===p?u=0:2==p&&(u=3),l.a.push({i:o+1,j:i+1,line:a[o],type:u}),l.b.push({i:i+1,j:o+1,line:s[i],type:u}),o++,i++}else c[o+1][i]>=c[o][i+1]?(l.a.push({i:o+1,line:a[o],type:1}),o++):(l.b.push({i:i+1,line:s[i],type:4}),i++)}for(;o<r||i<d;)o==r?(l.b.push({i:i+1,line:s[i],type:4}),i++):i==d&&(l.a.push({i:o+1,line:a[o],type:1}),o++);return l}(y||"",w||""),r=0,d=0,l=Math.max(s.a.length,s.b.length),c=[],p=[],u=0,f=0,h=0;h<l;h++){s[h];var g=r<s.a.length?s.a[r]:{type:2,line:""},v=d<s.b.length?s.b[d]:{type:2,line:""};0===g.type&&0!==v.type?(g={type:2,line:""},d++):0===v.type&&0!==g.type?(v={type:2,line:""},r++):(r++,d++),c.push({a:g,b:v}),void 0===i?(i={start:h,end:h},f=(u=0)===g.type&&0===v.type?0:1):0===g.type&&0===v.type?0===f?(i.end=h,u++):1===f?(i.end=h,f=2,u=0):2===f&&(i.end=h,8===++u&&(i.end-=5,p.push(i),i={start:h-5,end:h-5},u=f=0)):(i.end=h,u++,0===f?(3<i.end&&(i.end-=3,i.empty=!0,p.push(i),i={start:h-3,end:h-3}),f=1):2===f&&(f=1))}0===f&&(i.empty=!0),i.end=l,p.push(i);for(var m=0;m<p.length;m++)if((i=p[m]).empty)D(i.start,i.end,c).appendTo(a);else for(h=i.start;h<i.end;h++){var b=j(c[h]).appendTo(a);h===i.start?b.addClass("start-block"):h===i.end-1&&b.addClass("end-block")}},close:function(){c=!1},show:function(){}};RED.tray.show(e)}function D(i,a,s){diffRow=$('<tr class="node-text-diff-header node-text-diff-expand">');var e=$('<td colspan="4"> <i class="fa fa-arrows-v"></i> </td>').appendTo(diffRow),r=$("<span></span>").appendTo(e);return a<s.length-1&&r.text("@@ -"+(s[a-1].a.i+1)+" +"+(s[a-1].b.i+1)),diffRow.click(function(e){if(20<a-i){var t=$(this).offset();if(0<i){for(var n=i;n<i+10;n++)j(s[n]).addClass("unchanged").insertBefore($(this));i+=10}if(a<s.length-1){for(n=a-1;a-11<n;n--)j(s[n]).addClass("unchanged").insertAfter($(this));a-=10}a<s.length-1&&r.text("@@ -"+(s[a-1].a.i+1)+" +"+(s[a-1].b.i+1));var o=$(this).offset().top-t.top;$(".node-text-diff").scrollTop($(".node-text-diff").scrollTop()+o)}else{for(n=i;n<a;n++)j(s[n]).addClass("unchanged").insertBefore($(this));$(this).remove()}}),diffRow}function j(e){var t=$("<tr>"),n=e.a,o=e.b,i=$('<td class="lineno">').text(2===n.type?"":n.i).appendTo(t),a=$('<td class="linetext">').text(n.line).appendTo(t);return 2===n.type?(i.addClass("blank"),a.addClass("blank")):4===n.type?(i.addClass("added"),a.addClass("added")):1===n.type&&(i.addClass("removed"),a.addClass("removed")),i=$('<td class="lineno">').text(2===o.type?"":o.i).appendTo(t),a=$('<td class="linetext">').text(o.line).appendTo(t),2===o.type?(i.addClass("blank"),a.addClass("blank")):4===o.type?(i.addClass("added"),a.addClass("added")):1===o.type&&(i.addClass("removed"),a.addClass("removed")),t}function C(e,t,n){return n?e===t?0:e.trim()===t.trime()?2:1:e===t?0:1}function p(e,E){var g=$("<div></div>");return e.forEach(function(v){var e=v.hunks,t=v.binary,n=$("<table>",{class:"node-text-diff-content"}).appendTo(g);$('<colgroup><col width="50"><col width="50"><col width="100%"></colgroup>').appendTo(n);var m=$("<tbody>").appendTo(n),o=$('<tr class="node-text-diff-file-header">').appendTo(m),i=$('<td colspan="3"></td>').appendTo(o);$('<i class="node-diff-chevron fa fa-angle-down"></i>').appendTo(i);o.click(function(e){o.toggleClass("collapsed");var t=o.hasClass("collapsed");o.nextUntil(".node-text-diff-file-header").toggle(!t)});$('<span class="filename"></span>').text(v.file).appendTo(i);var b,y=0,w=0,D={};if(E.project.files&&E.project.files.flow===v.file){E.unmerged&&$('<span style="float: right;"><span id="node-diff-toolbar-resolved-conflicts"></span></span>').appendTo(i);var a=$('<tr class="node-text-diff-header">').appendTo(m),l=$('<td class="flow-diff" colspan="3"></td>').appendTo(a),s=E.project.name,c=E.project.files.flow,p="projects/"+s+"/files/"+E.commonRev+"/"+c,u="projects/"+s+"/files/"+E.oldRev+"/"+c,r="projects/"+s+"/files/"+E.newRev+"/"+c,d=[$.Deferred(),$.Deferred(),$.Deferred()];if(E.commonRev){p="projects/"+s+"/files/"+E.commonRev+"/"+c;$.ajax({dataType:"json",url:p}).then(function(e){d[0].resolve(e)}).fail(function(){d[0].resolve(null)})}else d[0].resolve(null);$.ajax({dataType:"json",url:u}).then(function(e){d[1].resolve(e)}).fail(function(){d[1].resolve({content:"[]"})}),$.ajax({dataType:"json",url:r}).then(function(e){d[2].resolve(e)}).fail(function(){d[2].resolve({content:"[]"})}),$.when.apply($,d).always(function(e,t,n){var o,i,a;if(e)try{o=JSON.parse(e.content||"[]")}catch(e){return console.log(RED._("diff.commonVersionError"),p),void console.log(e)}try{i=JSON.parse(t.content||"[]")}catch(e){return console.log(RED._("diff.oldVersionError"),u),void console.log(e)}o||(o=i);try{a=JSON.parse(n.content||"[]")}catch(e){return console.log(RED._("diff.newVersionError"),a),void console.log(e)}var s=T(o,i),r=T(o,a);E.currentDiff=_(s,r);var d=R(l,E.currentDiff,{title:c,mode:E.commonRev?"merge":"view",oldRevTitle:E.oldRevTitle,newRevTitle:E.newRevTitle});d.list.hide(),x(E.currentDiff),setTimeout(function(){d.finish(),d.list.show()},300)})}else if(t){var f=$('<tr class="node-text-diff-header">').appendTo(m),h=$('<td colspan="3"></td>').appendTo(f);$("<span></span>").text(RED._("diff.noBinaryFileShowed")).appendTo(h)}else E.unmerged&&(b=$('<span style="float: right;">'+RED._("diff.conflictHeader",{resolved:w,unresolved:y})+"</span>").appendTo(i)),e.forEach(function(u){var e=$('<tr class="node-text-diff-header">').appendTo(m),t=$('<td colspan="3"></td>').appendTo(e),f=($("<span></span>").text(u.header).appendTo(t),u.conflict),h=u.localStartLine,g=u.remoteStartLine;f&&y++,u.lines.forEach(function(e,t){var n,o=u.diffStart+t,i=f&&/^\+\+(<<<<<<<|=======$|>>>>>>>)/.test(e),a=$("<tr>").appendTo(m),s=$('<td class="lineno">').appendTo(a);i?s.attr("colspan",2):n=$('<td class="lineno">').appendTo(a);var r=$('<td class="linetext">').appendTo(a),d=1;if(f&&(d=2),i){if(a.addClass("mergeHeader"),/^\+\+=======$/.test(e))u.changeSeparator=o,a.addClass("mergeHeader-separator");else{var l=/^..<<<<<<</.test(e);l?($("<span>").text("<<<<<<< Local Changes").appendTo(r),u.localChangeStart=o):(u.remoteChangeEnd=o,$("<span>").text(">>>>>>> Remote Changes").appendTo(r)),a.addClass("mergeHeader-"+(l?"ours":"theirs")),$('<button class="editor-button editor-button-small" style="float: right; margin-right: 20px;"><i class="fa fa-angle-double-'+(l?"down":"up")+'"></i> use '+(l?"local":"remote")+" changes</button>").appendTo(r).click(function(e){var t,n;e.preventDefault(),w++,l?((n=(t=a.nextUntil(".mergeHeader-separator")).last().next()).nextUntil(".mergeHeader").remove(),n.next().remove()):((n=(t=a.prevUntil(".mergeHeader-separator")).last().prev()).prevUntil(".mergeHeader").remove(),n.prev().remove()),n.remove(),a.remove(),t.find(".linetext").addClass("added"),b.empty(),$("<span>"+RED._("diff.conflictHeader",{resolved:w,unresolved:y})+"</span>").appendTo(b),D[v.file]=D[v.file]||{},D[v.file][u.localChangeStart]={changeStart:u.localChangeStart,separator:u.changeSeparator,changeEnd:u.remoteChangeEnd,selection:l?"A":"B"},E.resolveConflict&&E.resolveConflict({conflicts:y,resolved:w,resolutions:D})})}}else{var c=e[0];f&&!E.unmerged&&" "===c&&(c=e[1]),$('<span class="prefix">').text(c).appendTo(r);var p=!1;f&&E.unmerged?($('<span class="prefix">').text(e[1]).appendTo(r),"+"===e[0]&&(s.text(h++),p=!0),"+"===e[1]&&(n.text(g++),p=!0)):"+"===e[0]||f&&"+"===e[1]?(s.addClass("added"),n.addClass("added"),r.addClass("added"),n.text(g++),p=!0):("-"===e[0]||f&&"-"===e[1])&&(s.addClass("removed"),n.addClass("removed"),r.addClass("removed"),s.text(h++),p=!0),p||(r.addClass("unchanged"),0<h&&"\\"!==e[0]&&""!==e&&s.text(h++),0<g&&"\\"!==e[0]&&""!==e&&n.text(g++)),$("<span>").text(e.substring(d)).appendTo(r)}})})}),g}function r(e){var t;t=Array.isArray(e)?e:e.split("\n");for(var n,o,i=/^diff (?:(?:--git a\/(.*) b\/(.*))|(?:--cc (.*)))$/,a=/^\+\+\+ b\/(.*)\t?/,s=/^Binary files /,r=/^@@ -((\d+)(,(\d+))?) \+((\d+)(,(\d+))?) @@ ?(.*)$/,d=/^@+ -((\d+)(,(\d+))?) -((\d+)(,(\d+))?) \+((\d+)(,(\d+))?) @+/,l=[],c=0;c<t.length;c++){var p=t[c],u=i.exec(p);if(u)o&&(n.hunks.push(o),l.push(n)),o=null,n={file:u[1]||u[3],hunks:[]};else if(s.test(p))n&&(n.binary=!0);else{var f=a.exec(p);if(f)n.file=f[1];else{var h=r.exec(p);if(h){o&&n.hunks.push(o),o={header:p,localStartLine:h[2],localLength:h[4]||1,remoteStartLine:h[6],remoteLength:h[8]||1,lines:[],conflict:!1};continue}if(h=d.exec(p)){o&&n.hunks.push(o),o={header:p,localStartLine:h[2],localLength:h[4]||1,remoteStartLine:h[6],remoteLength:h[8]||1,diffStart:parseInt(h[10]),lines:[],conflict:!0};continue}o&&o.lines.push(p)}}}return o&&n.hunks.push(o),l.push(n),l}return{init:function(){RED.actions.add("core:show-remote-diff",n)},getRemoteDiff:t,showRemoteDiff:n,showUnifiedDiff:function(o){var t,e=o.diff,n=o.title,i=r(e);o.unmerged&&(o.resolveConflict=function(e){(t=e).conflicts===e.resolved&&$("#node-diff-view-resolve-diff").removeClass("disabled")});var a={title:n||RED._("diff.compareChanges"),width:1/0,overlay:!0,buttons:[{text:RED._(o.unmerged?"common.label.cancel":"common.label.close"),click:function(){o.oncancel&&o.oncancel(),RED.tray.close()}}],resize:function(e){},open:function(e){var t=e.find(".editor-tray-body"),n=$('<div class="node-text-diff"></div>').appendTo(t);p(i,o).appendTo(n)},close:function(){c=!1},show:function(){}};o.unmerged&&a.buttons.push({id:"node-diff-view-resolve-diff",text:RED._("diff.saveConflict"),class:"primary disabled",click:function(){if(!$("#node-diff-view-resolve-diff").hasClass("disabled")){if(o.currentDiff){var e=s(o.currentDiff);(t={resolutions:{}}).resolutions[o.project.files.flow]=JSON.stringify(e.config,"",4)}o.onresolve&&o.onresolve(t),RED.tray.close()}}}),RED.tray.show(a)},showCommitDiff:function(d){var l=function(e){for(var t={},n=e.split("\n"),o=[],i=0;i<n.length;i++)if(/^commit /.test(n[i]))t.sha=n[i].substring(7);else if(/^Author: /.test(n[i])){t.author=n[i].substring(8);var a=/^(.*) <(.*)>$/.exec(t.author);a&&(t.authorName=a[1],t.authorEmail=a[2])}else if(/^Date: /.test(n[i]))t.date=n[i].substring(8);else if(/^ /.test(n[i]))t.title?(4!==n[i].length||0<o.length)&&o.push(n[i].substring(4)):t.title=n[i].substring(4);else if(/^diff /.test(n[i])){t.files=r(n.slice(i));break}return t.comment=o.join("\n"),t}(d.commit),e={title:RED._("diff.viewCommitDiff"),width:1/0,overlay:!0,buttons:[{text:RED._("common.label.close"),click:function(){RED.tray.close()}}],resize:function(e){},open:function(e){var t=e.find(".editor-tray-body"),n=$('<div class="node-text-diff"></div>').appendTo(t),o=$("<table>",{class:"node-text-diff-content"}).appendTo(n);$('<colgroup><col width="50"><col width="50"><col width="100%"></colgroup>').appendTo(o);var i=$("<tbody>").appendTo(o),a=$('<tr class="node-text-diff-commit-header">').appendTo(i),s=$('<td colspan="3"></td>').appendTo(a);$("<h3>").text(l.title).appendTo(s),$('<div class="commit-body"></div>').text(l.comment).appendTo(s);var r=$('<div class="commit-summary"></div>').appendTo(s);$('<div style="float: right">').text("Commit "+l.sha).appendTo(r),$("<div>").text((l.authorName||l.author)+" - "+d.date).appendTo(r),l.files&&p(l.files,d).appendTo(n)},close:function(){c=!1},show:function(){}};RED.tray.show(e)},mergeDiff:o}}(),RED.keyboard=function(){var s,n=/Mac/i.test(window.navigator.platform),p={},a={left:37,up:38,right:39,down:40,escape:27,enter:13,backspace:8,delete:46,space:32,";":186,"=":187,",":188,"-":189,".":190,"/":191,"\\":220,"'":222,"?":191},t={16:!0,17:!0,18:!0,91:!0,93:!0},u={},r={},d={59:186,61:187,173:189};function f(e){for(var t,n=e.toLowerCase().split("-"),o={},i=0;i<n.length;i++)switch(n[i]){case"ctrl":case"cmd":o.ctrl=!0,o.meta=!0;break;case"alt":o.alt=!0;break;case"shift":o.shift=!0;break;case"":0,t=a["-"];break;default:if(a.hasOwnProperty(n[i]))t=a[n[i]];else{if(1<n[i].length)return null;t=n[i].toUpperCase().charCodeAt(0)}}return[t,o]}function l(e,t,n,o){var i=n,a=o;"function"!=typeof n&&"string"!=typeof n||(i={},a=n);var s=[],r=0;if("string"==typeof t){"string"==typeof a&&(u[a]={scope:e,key:t},"boolean"==typeof o&&(u[a].user=o));var d=t.split(" ");for(r=0;r<d.length;r++){var l=f(d[r]);if(!l)return;s.push(l)}}else s.push([t,i]);var c=p;for(r=0;r<s.length;r++)t=s[r][0],(i=s[r][1]).ctrl&&(c.ctrl=c.ctrl||{},c=c.ctrl),i.shift&&(c.shift=c.shift||{},c=c.shift),i.alt&&(c.alt=c.alt||{},c=c.alt),c[t]=c[t]||{},c=c[t];c.scope=e,c.ondown=a}function o(e,t){var n=t||{},o=[],i=0;if("string"==typeof e){var a=e.split(" ");for(i=0;i<a.length;i++){var s=f(a[i]);if(!s)return void console.log("Unrecognised key specifier:",e);o.push(s)}}else o.push([e,n]);var r=p;for(i=0;i<o.length;i++){if(e=o[i][0],(n=o[i][1]).ctrl&&(r=r.ctrl),r&&n.shift&&(r=r.shift),r&&n.alt&&(r=r.alt),!r[e])return;r=r[e]}"string"==typeof r.ondown&&("boolean"==typeof t&&t?u[r.ondown]={user:t}:delete u[r.ondown]),delete r.scope,delete r.ondown}d3.select(window).on("keydown",function(){if(!t[d3.event.keyCode]){var e=function e(t){var n=s||p;(t.ctrlKey||t.metaKey)&&(n=n.ctrl),n&&t.shiftKey&&(n=n.shift),n&&t.altKey&&(n=n.alt);var o=d[t.keyCode]||t.keyCode;if(n&&n[o]){var i=n[o];if(!i.scope)return s?(s=null,e(t)):(0<Object.keys(i).length&&(s=i,t.preventDefault()),null);if(i.scope&&"*"!==i.scope){for(var a=t.target;"BODY"!==a.nodeName&&a.id!==i.scope;)a=a.parentElement;"BODY"===a.nodeName&&(i=null)}return s=null,i}if(s)return s=null,e(t)}(d3.event);e&&e.ondown&&("string"==typeof e.ondown?RED.actions.invoke(e.ondown):e.ondown(),d3.event.preventDefault())}});function c(e){e.preventDefault();var a=$(this),s=a.data("data");if(!a.hasClass("keyboard-shortcut-entry-expanded")){h();var t=a.find(".keyboard-shortcut-entry-key"),n=a.find(".keyboard-shortcut-entry-scope");a.addClass("keyboard-shortcut-entry-expanded");var o=$('<input type="text">').attr("placeholder",RED._("keyboard.unassigned")).val(s.key||"").appendTo(t);o.on("keyup",function(e){if(13===e.keyCode)return h();var t=$(this).val(),n=""===(t=t.trim())||RED.keyboard.validateKey(t);$(this).toggleClass("input-error",!n)});var i=$('<select><option value="*" data-i18n="keyboard.global"></option><option value="workspace" data-i18n="keyboard.workspace"></option></select>').appendTo(n);i.i18n(),i.val(s.scope||"*");var r=$('<div class="keyboard-shortcut-edit button-group-vertical"></div>').appendTo(n),d=$('<button class="editor-button editor-button-small"><i class="fa fa-check"></i></button>').appendTo(r),l=$('<button class="editor-button editor-button-small"><i class="fa fa-reply"></i></button>').appendTo(r);d.click(function(e){e.stopPropagation(),h()}),l.click(function(e){e.stopPropagation(),RED.keyboard.revertToDefault(s.id),a.empty(),a.removeClass("keyboard-shortcut-entry-expanded");var t=RED.keyboard.getShortcut(s.id),n=RED.settings.get("keymap")||{},o=RED.settings.get("editor")||{};(n=o.keymap||{})[s.id]=null,o.keymap=n,RED.settings.set("editor",o);var i={id:s.id,scope:t?t.scope:void 0,key:t?t.key:void 0,user:t?t.user:void 0};g(a,i)}),o.focus()}}function h(e){var t=$(".keyboard-shortcut-entry-expanded");if(1===t.length){var n=t.data("data"),o=t.find(".keyboard-shortcut-entry-key input"),i=t.find(".keyboard-shortcut-entry-scope select");if(!e){var a=o.val().trim(),s=i.val();if(""===a||RED.keyboard.validateKey(a)){var r=RED.keyboard.getShortcut(n.id);if(!r&&a||r&&(r.scope!==s||r.key!==a)){var d=t.find(".keyboard-shortcut-entry-key"),l=t.find(".keyboard-shortcut-entry-scope");d.empty(),l.empty(),n.key&&RED.keyboard.remove(n.key,!0),t.find(".keyboard-shortcut-entry-text i").css("opacity",1),""===a?(d.parent().addClass("keyboard-shortcut-entry-unassigned"),d.append($("<span>").text(RED._("keyboard.unassigned"))),delete n.key,delete n.scope):(d.parent().removeClass("keyboard-shortcut-entry-unassigned"),d.append(RED.keyboard.formatKey(a)),$("<span>").text(s).appendTo(l),n.key=a,n.scope=s,RED.keyboard.add(n.scope,n.key,n.id,!0));var c=RED.settings.get("editor")||{},p=c.keymap||{};p[n.id]=RED.keyboard.getShortcut(n.id),c.keymap=p,RED.settings.set("editor",c)}}}o.remove(),i.remove(),$(".keyboard-shortcut-edit").remove(),t.removeClass("keyboard-shortcut-entry-expanded")}}function g(e,t){var n=$('<div class="keyboard-shortcut-entry">').appendTo(e);e.data("data",t);var o=t.id.replace(/(^.+:([a-z]))|(-([a-z]))/g,function(){return 0===arguments[5]?arguments[2].toUpperCase():" "+arguments[4].toUpperCase()}),i=$("<div>").addClass("keyboard-shortcut-entry-text").text(o).appendTo(n),a=$('<i class="fa fa-user"></i>').prependTo(i);t.user||a.css("opacity",0);var s=$('<div class="keyboard-shortcut-entry-key">').appendTo(n);t.key?s.append(RED.keyboard.formatKey(t.key)):(n.addClass("keyboard-shortcut-entry-unassigned"),s.append($("<span>").text(RED._("keyboard.unassigned"))));var r=$('<div class="keyboard-shortcut-entry-scope">').appendTo(n);$("<span>").text("*"===t.scope?"global":t.scope||"").appendTo(r),e.click(c)}function e(){var e=$('<div id="user-settings-tab-keyboard"></div>');$('<div class="keyboard-shortcut-entry keyboard-shortcut-list-header"><div class="keyboard-shortcut-entry-key keyboard-shortcut-entry-text"><input id="user-settings-tab-keyboard-filter" type="text" data-i18n="[placeholder]keyboard.filterActions"></div><div class="keyboard-shortcut-entry-key" data-i18n="keyboard.shortcut"></div><div class="keyboard-shortcut-entry-scope" data-i18n="keyboard.scope"></div></div>').appendTo(e),e.find("input").searchBox({delay:100,change:function(){var t=$(this).val().trim();""===t?n.editableList("filter",null):(t=t.replace(/\s/g,""),n.editableList("filter",function(e){return-1<e.id.toLowerCase().replace(/^.*:/,"").replace("-","").indexOf(t)}))}});var n=$('<ol class="keyboard-shortcut-list"></ol>').css({position:"absolute",top:"32px",bottom:"0",left:"0",right:"0"}).appendTo(e).editableList({addButton:!1,scrollOnAdd:!1,addItem:function(e,t,n){g(e,n)}}),t=RED.actions.list();return t.sort(function(e,t){var n=e.id.replace(/^.*:/,"").replace(/[ -]/g,"").toLowerCase(),o=t.id.replace(/^.*:/,"").replace(/[ -]/g,"").toLowerCase();return n.localeCompare(o)}),t.forEach(function(e){n.editableList("addItem",e)}),e}return{init:function(){!function(){if("localStorage"in window&&null!==window.localStorage){var e=localStorage.getItem("keymap");if(null!==e){localStorage.removeItem("keymap");var t=RED.settings.get("editor")||{};t.keymap=JSON.parse(e),RED.settings.set("editor",t)}}}();var s=(RED.settings.get("editor")||{}).keymap||{};$.getJSON("red/keymap.json",function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];for(var o in n)n.hasOwnProperty(o)&&(s.hasOwnProperty(n[o])||l(t,o,n[o],!1),r[n[o]]={scope:t,key:o,user:!1})}for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];a.hasOwnProperty("key")&&l(a.scope,a.key,i,!0)}}),RED.userSettings.add({id:"keyboard",title:RED._("keyboard.keyboard"),get:e,focus:function(){setTimeout(function(){$("#user-settings-tab-keyboard-filter").focus()},200)}})},add:l,remove:o,getShortcut:function(e){return u[e]},revertToDefault:function(e){var t=u[e];if(t&&o(t.key),r.hasOwnProperty(e)){var n=r[e];l(n.scope,n.key,e,!1)}},formatKey:function(e){var t=n?e.replace(/ctrl-?/,"&#8984;"):e;return'<span class="help-key-block"><span class="help-key">'+(t=(t=(t=(t=(t=(t=n?t.replace(/alt-?/,"&#8997;"):e).replace(/shift-?/,"&#8679;")).replace(/left/,"&#x2190;")).replace(/up/,"&#x2191;")).replace(/right/,"&#x2192;")).replace(/down/,"&#x2193;")).split(" ").join('</span> <span class="help-key">')+"</span></span>"},validateKey:function(e){var t=(e=e.trim()).split(" ");for(i=0;i<t.length;i++)if(!f(t[i]))return!1;return!0}}}(),RED.workspaces=function(){var l,n=0,o=0;function i(e,t){if(e)l.addTab(e),l.resize();else{for(var n=RED.nodes.id();o+=1,0!==$("#workspace-tabs a[title='"+RED._("workspace.defaultName",{number:o})+"']").size(););e={type:"tab",id:n,disabled:!1,info:"",label:RED._("workspace.defaultName",{number:o})},RED.nodes.addWorkspace(e),l.addTab(e),l.activateTab(n),t||(RED.history.push({t:"add",workspaces:[e],dirty:RED.nodes.dirty()}),RED.nodes.dirty(!0))}return RED.view.focus(),e}function a(e){if(1!==s){c(e);var t=RED.nodes.removeWorkspace(e.id);t.t="delete",t.dirty=RED.nodes.dirty(),t.workspaces=[e],RED.history.push(t),RED.nodes.dirty(!0),RED.sidebar.config.refresh()}}function t(e){var r,d=RED.nodes.workspace(e);RED.view.state(RED.state.EDITING);var t={title:RED._("workspace.editFlow",{name:d.label}),buttons:[{id:"node-dialog-delete",class:"leftButton"+(1===s?" disabled":""),text:RED._("common.label.delete"),click:function(){a(d),RED.tray.close()}},{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){RED.tray.close()}},{id:"node-dialog-ok",class:"primary",text:RED._("common.label.done"),click:function(){var e=$("#node-input-name").val(),t=!1,n={};d.label!=e&&(n.label=d.label,t=!0,d.label=e,l.renameTab(d.id,e));var o=$("#node-input-disabled").prop("checked");d.disabled!==o&&(n.disabled=d.disabled,t=!0,d.disabled=o);var i=r.getValue();if(d.info!==i&&(n.info=d.info,t=!0,d.info=i),$("#red-ui-tab-"+d.id.replace(".","-")).toggleClass("workspace-disabled",d.disabled),t){var a={t:"edit",changes:n,node:d,dirty:RED.nodes.dirty()};d.changed=!0,RED.history.push(a),RED.nodes.dirty(!0),RED.sidebar.config.refresh();var s=RED.view.selection();s.nodes||s.links||RED.sidebar.info.refresh(d)}RED.tray.close()}}],resize:function(e){for(var t=$("#dialog-form>div:not(.node-text-editor-row)"),n=($("#dialog-form>div.node-text-editor-row"),$("#dialog-form").height()),o=0;o<t.size();o++)n-=$(t[o]).outerHeight(!0);n-=parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")),n-=28,$(".node-text-editor").css("height",n+"px"),r.resize()},open:function(e){var t=e.find(".editor-tray-body"),n=$('<form id="dialog-form" class="form-horizontal"></form>').appendTo(t);$('<div class="form-row"><label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label><input type="text" id="node-input-name"></div>').appendTo(n),$('<div class="form-row"><label for="node-input-disabled-btn" data-i18n="editor:workspace.status"></label><button id="node-input-disabled-btn" class="editor-button"><i class="fa fa-toggle-on"></i> <span id="node-input-disabled-label"></span></button> <input type="checkbox" id="node-input-disabled" style="display: none;"/></div>').appendTo(n),$('<div class="form-row node-text-editor-row"><label for="node-input-info" data-i18n="editor:workspace.info" style="width:300px;"></label><div style="height:250px;" class="node-text-editor" id="node-input-info"></div></div>').appendTo(n),r=RED.editor.createEditor({id:"node-input-info",mode:"ace/mode/markdown",value:""}),$('<div class="form-tips" data-i18n="editor:workspace.tip"></div>').appendTo(n),n.find("#node-input-disabled-btn").on("click",function(e){var t=$(this).find("i");t.hasClass("fa-toggle-off")?(t.addClass("fa-toggle-on"),t.removeClass("fa-toggle-off"),$("#node-input-disabled").prop("checked",!1),$("#node-input-disabled-label").text(RED._("editor:workspace.enabled"))):(t.addClass("fa-toggle-off"),t.removeClass("fa-toggle-on"),$("#node-input-disabled").prop("checked",!0),$("#node-input-disabled-label").text(RED._("editor:workspace.disabled")))}),d.hasOwnProperty("disabled")?($("#node-input-disabled").prop("checked",d.disabled),d.disabled?(n.find("#node-input-disabled-btn i").removeClass("fa-toggle-on").addClass("fa-toggle-off"),$("#node-input-disabled-label").text(RED._("editor:workspace.disabled"))):$("#node-input-disabled-label").text(RED._("editor:workspace.enabled"))):(d.disabled=!1,$("#node-input-disabled-label").text(RED._("editor:workspace.enabled"))),$('<input type="text" style="display: none;" />').prependTo(n),n.submit(function(e){e.preventDefault()}),$("#node-input-name").val(d.label),RED.text.bidi.prepareInput($("#node-input-name")),r.getSession().setValue(d.info||"",-1),n.i18n()},close:function(){RED.view.state()!=RED.state.IMPORT_DRAGGING&&RED.view.state(RED.state.DEFAULT),RED.sidebar.info.refresh(d),r.destroy()}};RED.tray.show(t)}var s=0;function e(){l=RED.tabs.create({id:"workspace-tabs",onchange:function(e){var t={old:n};n=e.id,t.workspace=n,RED.events.emit("workspace:change",t),window.location.hash="flow/"+e.id,RED.sidebar.config.refresh(),RED.view.focus()},onclick:function(e){RED.view.focus()},ondblclick:function(e){"subflow"!=e.type?t(e.id):RED.editor.editSubflow(RED.nodes.subflow(e.id))},onadd:function(e){"tab"===e.type&&s++,$('<span class="workspace-disabled-icon"><i class="fa fa-ban"></i> </span>').prependTo("#red-ui-tab-"+e.id.replace(".","-")+" .red-ui-tab-label"),e.disabled&&$("#red-ui-tab-"+e.id.replace(".","-")).addClass("workspace-disabled"),RED.menu.setDisabled("menu-item-workspace-delete",s<=1),1===s&&($("#workspace .red-ui-tabs").show(),$("#chart").show(),$("#workspace-footer").children().show())},onremove:function(e){"tab"===e.type&&s--,RED.menu.setDisabled("menu-item-workspace-delete",s<=1),0===s&&r()},onreorder:function(e,t){RED.history.push({t:"reorder",order:e,dirty:RED.nodes.dirty()}),RED.nodes.dirty(!0),p(t)},minimumActiveTabWidth:150,scrollable:!0,addButton:function(){i()}}),s=0}function r(){$("#workspace .red-ui-tabs").hide(),$("#chart").hide(),$("#workspace-footer").children().hide()}function d(e){t(e||n)}function c(e){e?l.contains(e.id)&&l.removeTab(e.id):a(RED.nodes.workspace(n)),e.id===n&&(n=0)}function p(e){RED.nodes.setWorkspaceOrder(e.filter(function(e){return void 0!==RED.nodes.workspace(e)})),l.order(e)}return{init:function(){e(),RED.events.on("sidebar:resize",l.resize),RED.actions.add("core:show-next-tab",l.nextTab),RED.actions.add("core:show-previous-tab",l.previousTab),RED.menu.setAction("menu-item-workspace-delete",function(){a(RED.nodes.workspace(n))}),$(window).resize(function(){l.resize()}),RED.actions.add("core:add-flow",i),RED.actions.add("core:edit-flow",d),RED.actions.add("core:remove-flow",c),r()},add:i,remove:c,order:p,edit:d,contains:function(e){return l.contains(e)},count:function(){return s},active:function(){return n},show:function(e){if(!l.contains(e)){var t=RED.nodes.subflow(e);if(!t)return;i({type:"subflow",id:e,icon:"red/images/subflow_tab.png",label:t.name,closeable:!0})}l.activateTab(e)},refresh:function(){RED.nodes.eachWorkspace(function(e){l.renameTab(e.id,e.label)}),RED.nodes.eachSubflow(function(e){l.contains(e.id)&&l.renameTab(e.id,e.name)}),RED.sidebar.config.refresh()},resize:function(){l.resize()}}}(),RED.view=function(){var x,T,_=5e3,k=5e3,w=.75,c=1,D=100,E=30,g=1e3,v=0,m=[],b=0,a={},j=20,C=!1,S=!1,R=null,r=[],d=[],l=[],O=null,f=null,L=null,P=null,N=0,h=null,I=[0,0],A=null,z=0,M=[],B=null,U=!1,p=null,u=null,y=0,J=0,V=[],F=!1,G=null,s="",q={red:"#c00",green:"#5a8",yellow:"#F9DF31",blue:"#53A3F3",grey:"#d3d3d3"},W=1,H=0,K=$("#chart"),X=d3.select("#chart").append("svg:svg").attr("width",_).attr("height",k).attr("pointer-events","all").style("cursor","crosshair").on("mousedown",function(){Pe()}).on("contextmenu",function(){d3.event.preventDefault()}),Y=X.append("svg:g").on("dblclick.zoom",null).append("svg:g").attr("class","innerCanvas").on("mousemove",ie).on("mousedown",function(){var l;if(1===d3.event.button)return z=RED.state.PANNING,A=[d3.event.pageX,d3.event.pageY],void(V=[K.scrollLeft(),K.scrollTop()]);L||f||(O=null,pe());0===z&&B&&(B.remove(),B=null);if((0===z||z===RED.state.QUICK_JOINING)&&(d3.event.metaKey||d3.event.ctrlKey)){l=d3.mouse(this),d3.event.stopPropagation();var e=$("#main-container").position();z!==RED.state.QUICK_JOINING&&(z=RED.state.QUICK_JOINING,$(window).on("keyup",De)),F=!0,RED.typeSearch.show({x:d3.event.clientX-e.left-D/2,y:d3.event.clientY-e.top-E/2,cancel:function(){F=!1,we()},add:function(e){F=!1;var t=oe(e);if(t){var n=t.node,o=t.historyEvent;if(n.x=l[0],n.y=l[1],z===RED.state.QUICK_JOINING||G){if(G||0<Q.length){var i,a,s=G||Q[0],r=null;if(s.portType===H&&0<n.inputs?(r=s.node,a=s.port,i=n):s.portType===W&&0<n.outputs&&(r=n,i=s.node,a=0),null!==r){var d={source:r,sourcePort:a,target:i};RED.nodes.addLink(d),o.links=[d],ee(),!G&&s.portType===H&&0<n.outputs?Z([{node:n,port:0,portType:H}]):!G&&s.portType===W&&0<n.inputs?Z([{node:n,port:0,portType:W}]):we()}else ee(),we()}else 0<n.outputs?Z([{node:n,port:0,portType:H}]):0<n.inputs?Z([{node:n,port:0,portType:W}]):we();G=null}RED.history.push(o),RED.nodes.add(n),RED.editor.validateNode(n),RED.nodes.dirty(!0),le(),n.selected=!0,M.push({n:n}),te(),pe(),Le()}}}),te(),pe(),Le()}0!==z||d3.event.metaKey||d3.event.ctrlKey||b||(l=d3.mouse(this),B=Y.append("rect").attr("ox",l[0]).attr("oy",l[1]).attr("rx",1).attr("ry",1).attr("x",l[0]).attr("y",l[1]).attr("width",0).attr("height",0).attr("class","lasso"),d3.event.preventDefault())}).on("mouseup",i).on("mouseenter",function(){B?1!==d3.event.buttons&&(B.remove(),B=null):z===RED.state.PANNING&&4!==d3.event.buttons&&we()}).on("touchend",function(){clearTimeout(b),b=null,RED.touch.radialMenu.active()||(B&&e.attr("fill","#fff"),i.call(this))}).on("touchcancel",i).on("touchstart",function(){var e;if(1<d3.event.touches.length){clearTimeout(b),b=null,d3.event.preventDefault(),e=d3.event.touches.item(0);var t=d3.event.touches.item(1),n=e.pageY-t.pageY,o=e.pageX-t.pageX,i=$("#chart").offset(),a=[$("#chart").scrollLeft(),$("#chart").scrollTop()];m=[(t.pageX+o/2-i.left+a[0])/c,(t.pageY+n/2-i.top+a[1])/c],[t.pageX+o/2,t.pageY+n/2],v=Math.sqrt(n*n+o*o)}else{var s=d3.select(document.body),r=[(e=d3.event.touches.item(0)).pageX,e.pageY];m=[e.pageX,e.pageY],v=0;d3.touches(this)[0];b=setTimeout(function(){b=null,Oe(s,r)},g)}}).on("touchmove",function(){var e;if(RED.touch.radialMenu.active())d3.event.preventDefault();else if(d3.event.touches.length<2){if(b){var t=(e=d3.event.touches.item(0)).pageX-m[0],n=e.pageY-m[1];64<Math.abs(t*t+n*n)&&(clearTimeout(b),b=null)}else B&&d3.event.preventDefault();ie.call(this)}else{e=d3.event.touches.item(0);var o=d3.event.touches.item(1),i=e.pageY-o.pageY,a=e.pageX-o.pageX,s=($("#chart").offset(),[$("#chart").scrollLeft(),$("#chart").scrollTop()]),r=Math.sqrt(i*i+a*a),d=[o.pageX+a/2,o.pageY+i/2];if(!isNaN(r)){oldScaleFactor=c,c=Math.min(2,Math.max(.3,c+Math.floor(100*r-100*v)/1e4));var l=[m[0]*(c-oldScaleFactor),m[1]*(c-oldScaleFactor)];v=r,d,$("#chart").scrollLeft(s[0]+l[0]),$("#chart").scrollTop(s[1]+l[1]),Le()}}}),e=Y.append("svg:rect").attr("width",_).attr("height",k).attr("fill","#fff"),n=Y.append("g");function t(){for(var e=[],t=0;t<_;t+=+j)e.push(t);n.selectAll("line.horizontal").remove(),n.selectAll("line.horizontal").data(e).enter().append("line").attr({class:"horizontal",x1:0,x2:_,y1:function(e){return e},y2:function(e){return e},fill:"none","shape-rendering":"crispEdges",stroke:"#eee","stroke-width":"1px"}),n.selectAll("line.vertical").remove(),n.selectAll("line.vertical").data(e).enter().append("line").attr({class:"vertical",y1:0,y2:_,x1:function(e){return e},x2:function(e){return e},fill:"none","shape-rendering":"crispEdges",stroke:"#eee","stroke-width":"1px"})}t();var o=Y.append("g"),Q=[];function Z(e){for(var t=0;t<e.length;t++){var n=e[t];n.el=o.append("svg:path").attr("class","drag_line"),Q.push(n)}}function ee(){for(;Q.length;){var e=Q.pop();e.el&&e.el.remove()}}function te(){var e=RED.workspaces.active();r=RED.nodes.filterNodes({z:e}),d=RED.nodes.filterLinks({source:{z:e},target:{z:e}})}function ne(e,t,n,o,i){var a=o-t,s=n-e,r=Math.sqrt(a*a+s*s),d=w;if(0<s*i?r<D&&(d=.75-(D-r)/D*.75):d=.4-.2*Math.max(0,(D-Math.min(Math.abs(s),Math.abs(a)))/D),0<s*i)return"M "+e+" "+t+" C "+(e+i*(D*d))+" "+(t+0*E)+" "+(n-i*d*D)+" "+(o-0*E)+" "+n+" "+o;var l=Math.floor(n-s/2),c=Math.floor(o-a/2);0===a&&(c=o+E);var p=E/2,u=(o+c)/2,f=e+i*D*d,h=0<a?Math.min(u-a/2,t+p):Math.max(u-a/2,t-p),g=n-i*D*d,v=0<a?Math.max(u,o-p):Math.min(u,o+p),m=(e+f)/2,b=0<a?1:-1,y=[[m,t],[f,0<a?Math.max(t,h-p):Math.min(t,h+p)],[m,0<a?Math.min(c,h+p):Math.max(c,h-p)],[g,0<a?Math.max(c,v-p):Math.min(c,v+p)],[(n+g)/2,o]];return y[2][1]===h+b*p&&(Math.abs(a)<10*p&&(y[1][1]=h-b*p/2,y[3][1]=v-b*p/2),y[2][0]=f),"M "+e+" "+t+" C "+y[0][0]+" "+y[0][1]+" "+y[1][0]+" "+y[1][1]+" "+f+" "+h+" S "+y[2][0]+" "+y[2][1]+" "+l+" "+c+" S "+y[3][0]+" "+y[3][1]+" "+g+" "+v+" S "+y[4][0]+" "+y[4][1]+" "+n+" "+o}function oe(e,t,n){var o=/^subflow:(.+)$/.exec(e);if(R&&o){if(o[1]===R.id)return void RED.notify(RED._("notification.error",{message:RED._("notification.errors.cannotAddSubflowToItself")}),"error");if(RED.nodes.subflowContains(o[1],R.id))return void RED.notify(RED._("notification.error",{message:RED._("notification.errors.cannotAddCircularReference")}),"error")}var i={id:RED.nodes.id(),z:RED.workspaces.active()};if(i.type=e,i._def=RED.nodes.getType(i.type),o){var a=RED.nodes.subflow(o[1]);i.name="",i.inputs=a.in.length,i.outputs=a.out.length}else{for(var s in i.inputs=i._def.inputs||0,i.outputs=i._def.outputs,i._def.defaults)i._def.defaults.hasOwnProperty(s)&&void 0!==i._def.defaults[s].value&&(i[s]=JSON.parse(JSON.stringify(i._def.defaults[s].value)));if(i._def.onadd)try{i._def.onadd.call(i)}catch(e){console.log("Definition error: "+i.type+".onadd:",e)}}i.changed=!0,i.moved=!0,i.w=D,i.h=Math.max(E,15*(i.outputs||0));var r={t:"add",nodes:[i.id],dirty:RED.nodes.dirty()};if(R){var d=RED.subflow.refresh(!0);d&&(r.subflow={id:R.id,changed:R.changed,instances:d.instances})}return{node:i,historyEvent:r}}function ie(){var e,p;if(z===RED.state.PANNING){var t=[d3.event.pageX,d3.event.pageY],n=[A[0]-t[0],A[1]-t[1]];return K.scrollLeft(V[0]+n[0]),void K.scrollTop(V[1]+n[1])}if(A=d3.touches(this)[0]||d3.mouse(this),B){var o,i,a=parseInt(B.attr("ox")),s=parseInt(B.attr("oy")),r=parseInt(B.attr("x")),d=parseInt(B.attr("y"));return o=A[0]<a?a-(r=A[0]):A[0]-r,i=A[1]<s?s-(d=A[1]):A[1]-d,void B.attr("x",r).attr("y",d).attr("width",o).attr("height",i)}if(z==RED.state.QUICK_JOINING||z==RED.state.IMPORT_DRAGGING||L||null!=O){var l;if(z==RED.state.JOINING||z===RED.state.QUICK_JOINING){if(0===Q.length&&null!==P){if(d3.event.shiftKey){var c,u=[],f=[];if(O&&(P===H&&O.source===L&&O.sourcePort===N||P===W&&O.target===L))f=[O];else c=P===H?{source:L,sourcePort:N}:{target:L},f=RED.nodes.filterLinks(c);for(e=0;e<f.length;e++){var h=f[e];RED.nodes.removeLink(h),u.push({link:h,node:P===H?h.target:h.source,port:P===H?0:h.sourcePort,portType:P===H?W:H})}0===u.length?(we(),Le()):(Z(u),z=0,te(),Le(),z=RED.state.JOINING)}else L&&Z([{node:L,port:N,portType:P}]);O=null}for(l=A,e=0;e<Q.length;e++){var g=Q[e],v=-((g.portType===H&&g.node.outputs||1)-1)/2*13+13*g.port,m=g.portType===H?1:-1;g.el.attr("d",ne(g.node.x+m*g.node.w/2,g.node.y+v,l[0],l[1],m))}d3.event.preventDefault()}else if(z==RED.state.MOVING){l=d3.mouse(document.body),isNaN(l[0])&&(l=d3.touches(document.body)[0]),3<(I[0]-l[0])*(I[0]-l[0])+(I[1]-l[1])*(I[1]-l[1])&&(z=RED.state.MOVING_ACTIVE,J=0,S=!1,1===M.length&&(p=M[0],S=p.n.hasOwnProperty("_def")&&0<p.n._def.inputs&&0<p.n._def.outputs&&0===RED.nodes.filterLinks({source:p.n}).length&&0===RED.nodes.filterLinks({target:p.n}).length))}else if(z==RED.state.MOVING_ACTIVE||z==RED.state.IMPORT_DRAGGING){l=A;for(var b=0,y=0,w=_,D=k,E=0;E<M.length;E++)p=M[E],d3.event.shiftKey&&(p.n.ox=p.n.x,p.n.oy=p.n.y),p.n.x=l[0]+p.dx,p.n.y=l[1]+p.dy,p.n.dirty=!0,b=Math.min(p.n.x-p.n.w/2-5,b),y=Math.min(p.n.y-p.n.h/2-5,y),w=Math.max(p.n.x+p.n.w/2+5,w),D=Math.max(p.n.y+p.n.h/2+5,D);if(0!==b||0!==y)for(e=0;e<M.length;e++)(p=M[e]).n.x-=b,p.n.y-=y;if(w!==_||D!==k)for(e=0;e<M.length;e++)(p=M[e]).n.x-=w-_,p.n.y-=D-k;if(C!=d3.event.shiftKey&&0<M.length){var R=[0,0];if(p=M[0],R[0]=p.n.x-(j*Math.floor((p.n.x-p.n.w/2)/j)+p.n.w/2),R[1]=p.n.y-j*Math.floor(p.n.y/j),0!==R[0]||0!==R[1])for(e=0;e<M.length;e++)(p=M[e]).n.x-=R[0],p.n.y-=R[1],p.n.x==p.n.ox&&p.n.y==p.n.oy&&(p.dirty=!1)}z!=RED.state.MOVING_ACTIVE&&z!=RED.state.IMPORT_DRAGGING||1!==M.length||(p=M[0],S&&(T||(T=setTimeout(function(){var e=[],t=1/0,n=null,o=p.n.x,i=p.n.y;if(X[0][0].getIntersectionList){var a=X[0][0].createSVGRect();a.x=o,a.y=i,a.width=1,a.height=1,e=X[0][0].getIntersectionList(a,X[0][0])}else e=RED.view.getLinksAtPoint(o,i);for(var s=0;s<e.length;s++)if(d3.select(e[s]).classed("link_background"))for(var r=e[s].getTotalLength(),d=0;d<r;d+=10){var l=e[s].getPointAtLength(d),c=(l.x-o)*(l.x-o)+(l.y-i)*(l.y-i);c<200&&c<t&&(t=c,n=e[s])}x&&x!==n&&d3.select(x.parentNode).classed("link_splice",!1),n?d3.select(n.parentNode).classed("link_splice",!0):d3.select(".link_splice").classed("link_splice",!1),x=n,T=null},100))))}0!==z&&Le()}}function i(){var e,t;if(z!==RED.state.PANNING){if(z!==RED.state.QUICK_JOINING){if(L&&z==RED.state.JOINING){var n=[];for(e=0;e<Q.length;e++)Q[e].link&&n.push(Q[e].link);t={t:"delete",links:n,dirty:RED.nodes.dirty()},RED.history.push(t),ee()}if(B){var o=parseInt(B.attr("x")),i=parseInt(B.attr("y")),a=o+parseInt(B.attr("width")),s=i+parseInt(B.attr("height"));d3.event.ctrlKey||le(),RED.nodes.eachNode(function(e){e.z!=RED.workspaces.active()||e.selected||(e.selected=e.x>o&&e.x<a&&e.y>i&&e.y<s,e.selected&&(e.dirty=!0,M.push({n:e})))}),R&&(R.in.forEach(function(e){e.selected=e.x>o&&e.x<a&&e.y>i&&e.y<s,e.selected&&(e.dirty=!0,M.push({n:e}))}),R.out.forEach(function(e){e.selected=e.x>o&&e.x<a&&e.y>i&&e.y<s,e.selected&&(e.dirty=!0,M.push({n:e}))})),pe(),B.remove(),B=null}else z!=RED.state.DEFAULT||null!=f||d3.event.ctrlKey||d3.event.metaKey||(le(),pe());if(z==RED.state.MOVING_ACTIVE&&0<M.length){for(var r=[],d=0;d<M.length;d++){var l=M[d];l.ox===l.n.x&&l.oy===l.n.y||(r.push({n:l.n,ox:l.ox,oy:l.oy,moved:l.n.moved}),l.n.dirty=!0,l.n.moved=!0)}if(0<r.length){if(t={t:"move",nodes:r,dirty:RED.nodes.dirty()},x){var c=d3.select(x).data()[0];RED.nodes.removeLink(c);var p={source:c.source,sourcePort:c.sourcePort,target:M[0].n},u={source:M[0].n,sourcePort:0,target:c.target};RED.nodes.addLink(p),RED.nodes.addLink(u),t.links=[p,u],t.removedLinks=[c],te()}RED.nodes.dirty(!0),RED.history.push(t)}}if(z==RED.state.MOVING||z==RED.state.MOVING_ACTIVE)for(e=0;e<M.length;e++)delete M[e].ox,delete M[e].oy;z==RED.state.IMPORT_DRAGGING&&(RED.keyboard.remove("escape"),te(),RED.nodes.dirty(!0)),we(),Le()}}else we()}function ae(){c<2&&(c+=.1,RED.view.navigator.resize(),Le())}function se(){.3<c&&(c-=.1,RED.view.navigator.resize(),Le())}function re(){c=1,RED.view.navigator.resize(),Le()}function de(){RED.nodes.eachNode(function(e){e.z==RED.workspaces.active()&&(e.selected||(e.selected=!0,e.dirty=!0,M.push({n:e})))}),R&&(R.in.forEach(function(e){e.selected||(e.selected=!0,e.dirty=!0,M.push({n:e}))}),R.out.forEach(function(e){e.selected||(e.selected=!0,e.dirty=!0,M.push({n:e}))})),O=null,pe(),Le()}function le(){for(var e=0;e<M.length;e++){var t=M[e];t.n.dirty=!0,t.n.selected=!1}M=[],O=null}var ce=null;function pe(){var e={};0<M.length&&(e.nodes=M.map(function(e){return e.n})),null!=O&&(e.link=O);var t=RED.workspaces.active();d=RED.nodes.filterLinks({source:{z:t},target:{z:t}});RED.nodes.getWorkspaceOrder();var n={};l=[];for(var o=0;o<M.length;o++)if("link out"===M[o].n.type||"link in"===M[o].n.type){var i=M[o].n,a={};i.links.forEach(function(e){var t=RED.nodes.node(e);t&&("link out"===i.type?t.z===i.z?n[i.id+":"+t.id]||(d.push({source:i,sourcePort:0,target:t,link:!0}),n[i.id+":"+t.id]=!0):(a[t.z]=a[t.z]||[],a[t.z].push(t)):t.z===i.z?n[t.id+":"+i.id]||(d.push({source:t,sourcePort:0,target:i,link:!0}),n[t.id+":"+i.id]=!0):(a[t.z]=a[t.z]||[],a[t.z].push(t)))}),0<Object.keys(a).length&&l.push({refresh:Math.floor(1e4*Math.random()),node:i,links:a})}var s=t+":"+JSON.stringify(e,function(e,t){return"nodes"===e?t.map(function(e){return e.id}):"link"===e?t.source.id+":"+t.sourcePort+":"+t.target.id:t});s!==ce&&(ce=s,RED.events.emit("view:selection-changed",e))}function ue(){if(fe=!1,0<M.length){for(var e=[],t=0;t<M.length;t++)e.push({n:M[t].n,ox:M[t].ox,oy:M[t].oy,moved:M[t].n.moved}),M[t].n.moved=!0,M[t].n.dirty=!0,delete M[t].ox,delete M[t].oy;Le(),RED.history.push({t:"move",nodes:e,dirty:RED.nodes.dirty()}),RED.nodes.dirty(!0)}}var fe=!1;function he(e,t){if(0<M.length){fe||($(document).one("keyup",ue),fe=!0);for(var n,o=0,i=0,a=0;a<M.length;a++)(n=M[a]).n.moved=!0,n.n.dirty=!0,null==n.ox&&null==n.oy&&(n.ox=n.n.x,n.oy=n.n.y),n.n.x+=e,n.n.y+=t,n.n.dirty=!0,o=Math.min(n.n.x-n.n.w/2-5,o),i=Math.min(n.n.y-n.n.h/2-5,i);if(0!==o||0!==i)for(var s=0;s<M.length;s++)(n=M[s]).n.x-=o,n.n.y-=i;Le()}}function ge(){if(0<M.length){var e=M[0].n;"subflow"===e.type?RED.editor.editSubflow(R):RED.editor.edit(e)}}function ve(){if(0<M.length||null!=O){var e,t=[],n=[],o=[],i=[],a=[],s=RED.nodes.dirty();if(0<M.length){for(var r=0;r<M.length;r++){var d=M[r].n;if(d.selected=!1,"subflow"!=d.type){d.x<0&&(d.x=25);var l=RED.nodes.remove(d.id);t.push(d),t=t.concat(l.nodes),n=n.concat(l.links)}else"out"===d.direction?o.push(d):"in"===d.direction&&i.push(d),d.dirty=!0}0<o.length&&(e=RED.subflow.removeOutput(o))&&(n=n.concat(e.links)),1==i.length&&(e=RED.subflow.removeInput())&&(n=n.concat(e.links));var c=RED.subflow.refresh(!0);c&&(a=c.instances),M=[],(0<t.length||0<o.length||0<i.length)&&RED.nodes.dirty(!0)}O&&(RED.nodes.removeLink(O),n.push(O),RED.nodes.dirty(!0));var p={t:"delete",nodes:t,links:n,subflowOutputs:o,subflowInputs:i,subflow:{instances:a},dirty:s};RED.history.push(p),O=null,te(),pe(),Le()}}function me(){if(0<M.length){for(var e=[],t=0;t<M.length;t++){var n=M[t].n;if("subflow"!=n.type){for(var o in n._def.defaults)if(n._def.defaults.hasOwnProperty(o)&&n._def.defaults[o].type){var i=RED.nodes.node(n[o]);i&&i._def.exclusive&&e.push(RED.nodes.convertNode(i))}e.push(RED.nodes.convertNode(n))}}s=JSON.stringify(e),RED.notify(RED._("clipboard.nodeCopied",{count:e.length}))}}function be(e,t,n){return ye(e,t,n,0)[0]}function ye(e,t,n,o){var i=document.createElement("span");i.className=t,i.style.position="absolute",i.style.top="-1000px",i.textContent=e||"",document.body.appendChild(i);var a=i.offsetWidth,s=i.offsetHeight;return document.body.removeChild(i),[n+a,o+s]}function we(){z=0,x=P=f=h=L=null,S=!1,d3.select(".link_splice").classed("link_splice",!1),T&&(clearTimeout(T),T=null)}function De(e){17!==e.keyCode&&"Meta"!==e.key&&91!==e.keyCode||(F&&0<Q.length&&(G=Q[0]),we(),ee(),Le(),$(window).off("keyup",De))}function Ee(e,t,n){1!==d3.event.button&&(L=e,P=t,N=n||0,z!==RED.state.QUICK_JOINING&&(z=RED.state.JOINING,document.body.style.cursor="crosshair",(d3.event.ctrlKey||d3.event.metaKey)&&(z=RED.state.QUICK_JOINING,Z([{node:L,port:N,portType:P}]),$(window).on("keyup",De))),d3.event.stopPropagation(),d3.event.preventDefault())}function Re(e,o,i){var t;if(!(z===RED.state.QUICK_JOINING&&0<Q.length&&Q[0].node===e)&&(document.body.style.cursor="",z==RED.state.JOINING||z==RED.state.QUICK_JOINING)){"undefined"!=typeof TouchEvent&&d3.event instanceof TouchEvent?RED.nodes.eachNode(function(e){if(e.z==RED.workspaces.active()){var t=e.w/2,n=e.h/2;e.x-t<A[0]&&e.x+t>A[0]&&e.y-n<A[1]&&e.y+n>A[1]&&(o=0<(h=e).inputs?W:H,i=0)}}):h=e;var n=[],a=[];for(t=0;t<Q.length;t++)Q[t].link&&a.push(Q[t].link);for(t=0;t<Q.length;t++)if(o!=Q[t].portType&&h!==Q[t].node){var s,r,d,l=Q[t];if(l.portType===H?(s=l.node,d=l.port,r=h):l.portType===W&&(s=h,r=l.node,d=i),!(0!==RED.nodes.filterLinks({source:s,target:r,sourcePort:d}).length)){var c={source:s,sourcePort:d,target:r};RED.nodes.addLink(c),n.push(c)}}if(0<n.length||0<a.length){var p={t:"add",links:n,removedLinks:a,dirty:RED.nodes.dirty()};if(R){var u=RED.subflow.refresh(!0);u&&(p.subflow={id:R.id,changed:R.changed,instances:u.instances})}RED.history.push(p),te(),RED.nodes.dirty(!0)}if(z===RED.state.QUICK_JOINING)return 0<n.length&&(ee(),o===W&&0<e.outputs?Z([{node:e,port:0,portType:H}]):o===H&&0<e.inputs?Z([{node:e,port:0,portType:W}]):we()),void Le();we(),ee(),O=null,Le()}}var $e=null,xe=null;function Te(l,c,p,u){clearTimeout($e);var e=z!=RED.state.JOINING||0<Q.length&&Q[0].portType!==p;e&&(p===W&&(c._def&&c._def.inputLabels||c.inputLabels)||p===H&&(c._def&&c._def.outputLabels||c.outputLabels))&&($e=setTimeout(function(){var e=function(t,n,e){var o,i=n===W?t.inputLabels:t.outputLabels;if(i&&i[e])return i[e];var a=n===W?t._def.inputLabels:t._def.outputLabels;if("string"==typeof a)o=a;else if("function"==typeof a)try{o=a.call(t,e)}catch(e){console.log("Definition error: "+t.type+"."+(n===W?"inputLabels":"outputLabels"),e),o=null}else $.isArray(a)&&(o=a[e]);return o}(c,p,u);if(e){var t=function e(t){var n=d3.select(t);if("innerCanvas"===n.attr("class"))return[0,0];var o=[0,0];if("g"===t.nodeName.toLowerCase()){var i=n.attr("transform");i&&(o=d3.transform(i).translate)}else o=[n.attr("x")||0,n.attr("y")||0];var a=e(t.parentNode);return[o[0]+a[0],o[1]+a[1]]}(l.node());$e=null,xe=Y.append("g").attr("transform","translate("+(t[0]+(p===W?-2:12))+","+(t[1]+5)+")").attr("class","port_tooltip");var n=e.split("\n"),o=0,i=4,a=[];n.forEach(function(e){var t=ye(e,"port_tooltip_label",8,0);o=Math.max(o,t[0]),a.push(.8*t[1]),i+=.8*t[1]});var s=i/2-5-2,r=i-4;xe.append("path").attr("d",p===W?"M0 0 l -5 -5 v -"+s+" q 0 -2 -2 -2 h -"+o+" q -2 0 -2 2 v "+r+" q 0 2 2 2 h "+o+" q 2 0 2 -2 v -"+s+" l 5 -5":"M0 0 l 5 -5 v -"+s+" q 0 -2 2 -2 h "+o+" q 2 0 2 2 v "+r+" q 0 2 -2 2 h -"+o+" q -2 0 -2 -2 v -"+s+" l -5 -5");var d=-i/2-2;n.forEach(function(e,t){d+=a[t],xe.append("svg:text").attr("class","port_tooltip_label").attr("x",p===W?-10:10).attr("y",d).attr("text-anchor",p===W?"end":"start").text(e)})}},500)),l.classed("port_hovered",e)}function _e(e,t,n,o){clearTimeout($e),xe&&(xe.remove(),xe=null),e.classed("port_hovered",!1)}function ke(e){if(u&&L==e&&0<J&&J<750)return z=RED.state.DEFAULT,"subflow"!=e.type?RED.editor.edit(e):RED.editor.editSubflow(R),J=0,void d3.event.stopPropagation();Re(e,e._def?0<e.inputs?1:0:"in"==e.direction?0:1,0)}function je(e){if(Pe(),1!==d3.event.button){if(z==RED.state.IMPORT_DRAGGING){if(RED.keyboard.remove("escape"),x){var t=d3.select(x).data()[0];RED.nodes.removeLink(t);var n={source:t.source,sourcePort:t.sourcePort,target:M[0].n},o={source:M[0].n,sourcePort:0,target:t.target};RED.nodes.addLink(n),RED.nodes.addLink(o);var i=RED.history.peek();i.links=[n,o],i.removedLinks=[t],te()}return pe(),RED.nodes.dirty(!0),Le(),we(),void d3.event.stopPropagation()}if(z!=RED.state.QUICK_JOINING){L=e;var a,s=Date.now();if(J=s-y,y=s,u=!(p!=L||1!==d3.event.buttons||d3.event.shiftKey||d3.event.metaKey||d3.event.altKey||d3.event.ctrlKey),p=L,e.selected&&(d3.event.ctrlKey||d3.event.metaKey)){for(L.selected=!1,a=0;a<M.length;a+=1)if(M[a].n===L){M.splice(a,1);break}}else{if(d3.event.shiftKey){le();for(var r=RED.nodes.getAllFlowNodes(L),d=0;d<r.length;d++)r[d].selected=!0,r[d].dirty=!0,M.push({n:r[d]})}else e.selected||(d3.event.ctrlKey||d3.event.metaKey||le(),L.selected=!0,M.push({n:L}));if(O=null,2!=d3.event.button){z=RED.state.MOVING;var l=d3.touches(this)[0]||d3.mouse(this);for(l[0]+=e.x-e.w/2,l[1]+=e.y-e.h/2,a=0;a<M.length;a++)M[a].ox=M[a].n.x,M[a].oy=M[a].n.y,M[a].dx=M[a].n.x-l[0],M[a].dy=M[a].n.y-l[1];I=d3.mouse(document.body),isNaN(I[0])&&(I=d3.touches(document.body)[0])}}e.dirty=!0,pe(),Le(),d3.event.stopPropagation()}else d3.event.stopPropagation()}}function Ce(e){var t=!0;return e._def.button.hasOwnProperty("enabled")&&(t="function"==typeof e._def.button.enabled?e._def.button.enabled.call(e):e._def.button.enabled),t}function Se(t){if(R)RED.notify(RED._("notification.warning",{message:RED._("notification.warnings.nodeActionDisabled")}),"warning");else{if(t._def.button.toggle&&(t[t._def.button.toggle]=!t[t._def.button.toggle],t.dirty=!0),t._def.button.onclick)try{t._def.button.onclick.call(t)}catch(e){console.log("Definition error: "+t.type+".onclick",e)}t.dirty&&Le()}d3.event.preventDefault()}function Oe(e,t){var n=L,o=[];o.push({name:"delete",disabled:0===M.length&&null===O,onselect:function(){ve()}}),o.push({name:"cut",disabled:0===M.length,onselect:function(){me(),ve()}}),o.push({name:"copy",disabled:0===M.length,onselect:function(){me()}}),o.push({name:"paste",disabled:0===s.length,onselect:function(){Ne(s,!1,!0)}}),o.push({name:"edit",disabled:1!=M.length,onselect:function(){RED.editor.edit(n)}}),o.push({name:"select",onselect:function(){de()}}),o.push({name:"undo",disabled:0===RED.history.depth(),onselect:function(){RED.history.pop()}}),RED.touch.radialMenu.show(e,t,o),we()}function Le(){if(Y.attr("transform","scale("+c+")"),X.attr("width",_*c).attr("height",k*c),z!=RED.state.JOINING){var w={};if(R){var e=Y.selectAll(".subflowoutput").data(R.out,function(e,t){return e.id});e.exit().remove();var t=e.enter().insert("svg:g").attr("class","node subflowoutput").attr("transform",function(e){return"translate("+(e.x-20)+","+(e.y-20)+")"});t.each(function(e,t){e.w=40,e.h=40}),t.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40).on("mouseup",ke).on("mousedown",je).on("touchstart",function(e){var t=d3.select(this),n=d3.event.touches.item(0),o=[n.pageX,n.pageY];m=[n.pageX,n.pageY],v=0,b=setTimeout(function(){Oe(t,o)},g),je.call(this,e)}).on("touchend",function(e){clearTimeout(b),b=null,RED.touch.radialMenu.active()?d3.event.stopPropagation():ke.call(this,e)}),t.append("g").attr("transform","translate(-5,15)").append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10).on("mousedown",function(e,t){Ee(e,W,0)}).on("touchstart",function(e,t){Ee(e,W,0)}).on("mouseup",function(e,t){Re(e,W,0)}).on("touchend",function(e,t){Re(e,W,0)}).on("mouseover",function(e){Te(d3.select(this),e,W,0)}).on("mouseout",function(e){_e(d3.select(this))}),t.append("svg:text").attr("class","port_label").attr("x",20).attr("y",8).style("font-size","10px").text("output"),t.append("svg:text").attr("class","port_label port_index").attr("x",20).attr("y",24).text(function(e,t){return t+1});var n=Y.selectAll(".subflowinput").data(R.in,function(e,t){return e.id});n.exit().remove();var o=n.enter().insert("svg:g").attr("class","node subflowinput").attr("transform",function(e){return"translate("+(e.x-20)+","+(e.y-20)+")"});o.each(function(e,t){e.w=40,e.h=40}),o.append("rect").attr("class","subflowport").attr("rx",8).attr("ry",8).attr("width",40).attr("height",40).on("mouseup",ke).on("mousedown",je).on("touchstart",function(e){var t=d3.select(this),n=d3.event.touches.item(0),o=[n.pageX,n.pageY];m=[n.pageX,n.pageY],v=0,b=setTimeout(function(){Oe(t,o)},g),je.call(this,e)}).on("touchend",function(e){clearTimeout(b),b=null,RED.touch.radialMenu.active()?d3.event.stopPropagation():ke.call(this,e)}),o.append("g").attr("transform","translate(35,15)").append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10).on("mousedown",function(e,t){Ee(e,H,t)}).on("touchstart",function(e,t){Ee(e,H,t)}).on("mouseup",function(e,t){Re(e,H,t)}).on("touchend",function(e,t){Re(e,H,t)}).on("mouseover",function(e){Te(d3.select(this),e,H,0)}).on("mouseout",function(e){_e(d3.select(this))}),o.append("svg:text").attr("class","port_label").attr("x",18).attr("y",20).style("font-size","10px").text("input"),e.each(function(e,t){if(e.dirty){var n=d3.select(this);n.selectAll(".subflowport").classed("node_selected",function(e){return e.selected}),n.selectAll(".port_index").text(function(e){return e.i+1}),n.attr("transform",function(e){return"translate("+(e.x-e.w/2)+","+(e.y-e.h/2)+")"}),(w[e.id]=e).dirty=!1}}),n.each(function(e,t){if(e.dirty){var n=d3.select(this);n.selectAll(".subflowport").classed("node_selected",function(e){return e.selected}),n.attr("transform",function(e){return"translate("+(e.x-e.w/2)+","+(e.y-e.h/2)+")"}),(w[e.id]=e).dirty=!1}})}else Y.selectAll(".subflowoutput").remove(),Y.selectAll(".subflowinput").remove();var i=Y.selectAll(".nodegroup").data(r,function(e){return e.id});i.exit().remove(),i.enter().insert("svg:g").attr("class","node nodegroup").classed("node_subflow",function(e){return null!=R}).classed("node_link",function(e){return"link in"===e.type||"link out"===e.type}).each(function(e,t){var n=d3.select(this),o="link in"===e.type||"link out"===e.type;n.attr("id",e.id);var i=RED.utils.getNodeLabel(e);if(e.w=o?E:Math.max(D,20*Math.ceil((be(i,"node_label",50)+(0<e._def.inputs?7:0))/20)),e.h=Math.max(E,15*(e.outputs||0)),e._def.badge){var a=n.append("svg:g").attr("class","node_badge_group"),s=a.append("rect").attr("class","node_badge").attr("rx",5).attr("ry",5).attr("width",40).attr("height",15);a.append("svg:text").attr("class","node_badge_label").attr("x",35).attr("y",11).attr("text-anchor","end").text(e._def.badge()),e._def.onbadgeclick&&s.attr("cursor","pointer").on("click",function(e){e._def.onbadgeclick.call(e),d3.event.preventDefault()})}if(e._def.button){var r=n.append("svg:g").attr("transform",function(e){return"translate("+("right"==e._def.align?94:-25)+",2)"}).attr("class",function(e){return"node_button "+("right"==e._def.align?"node_right_button":"node_left_button")});r.append("rect").attr("rx",5).attr("ry",5).attr("width",32).attr("height",E-4).attr("fill","#eee"),r.append("rect").attr("class","node_button_button").attr("x",function(e){return"right"==e._def.align?11:5}).attr("y",4).attr("rx",4).attr("ry",4).attr("width",16).attr("height",E-12).attr("fill",function(e){return RED.utils.getNodeColor(e.type,e._def)}).attr("cursor","pointer").on("mousedown",function(e){!B&&Ce(e)&&(Pe(),d3.select(this).attr("fill-opacity",.2),d3.event.preventDefault(),d3.event.stopPropagation())}).on("mouseup",function(e){!B&&Ce(e)&&(d3.select(this).attr("fill-opacity",.4),d3.event.preventDefault(),d3.event.stopPropagation())}).on("mouseover",function(e){!B&&Ce(e)&&d3.select(this).attr("fill-opacity",.4)}).on("mouseout",function(e){if(!B&&Ce(e)){var t=1;e._def.button.toggle&&(t=e[e._def.button.toggle]?1:.2),d3.select(this).attr("fill-opacity",t)}}).on("click",Se).on("touchstart",Se)}n.append("rect").attr("class","node").classed("node_unknown",function(e){return"unknown"==e.type}).attr("rx",5).attr("ry",5).attr("fill",function(e){return RED.utils.getNodeColor(e.type,e._def)}).on("mouseup",ke).on("mousedown",je).on("touchstart",function(e){var t=d3.select(this),n=d3.event.touches.item(0),o=[n.pageX,n.pageY];m=[n.pageX,n.pageY],v=0,b=setTimeout(function(){Oe(t,o)},g),je.call(this,e)}).on("touchend",function(e){clearTimeout(b),b=null,RED.touch.radialMenu.active()?d3.event.stopPropagation():ke.call(this,e)}).on("mouseover",function(e){0===z&&d3.select(this).classed("node_hovered",!0)}).on("mouseout",function(e){d3.select(this).classed("node_hovered",!1)});if(e._def.icon){var d=RED.utils.getNodeIcon(e._def,e),l=n.append("g").attr("class","node_icon_group").attr("x",0).attr("y",0),c=(l.append("rect").attr("x",0).attr("y",0).attr("class","node_icon_shade").attr("width","30").attr("stroke","none").attr("fill","#000").attr("fill-opacity","0.05").attr("height",function(e){return Math.min(50,e.h-4)}),l.append("image").attr("xlink:href",d).attr("class","node_icon").attr("x",0).attr("width","30").attr("height","30")),p=l.append("path").attr("d",function(e){return"M 30 1 l 0 "+(e.h-2)}).attr("class","node_icon_shade_border").attr("stroke-opacity","0.1").attr("stroke","#000").attr("stroke-width","1");"right"==e._def.align&&(l.attr("class","node_icon_group node_icon_group_"+e._def.align),p.attr("d",function(e){return"M 0 1 l 0 "+(e.h-2)}));var u=new Image;u.src=d,u.onload=function(){c.attr("width",Math.min(u.width,30)),c.attr("height",Math.min(u.height,30)),c.attr("x",15-Math.min(u.width,30)/2)},l.style("pointer-events","none")}if(!o){var f=n.append("svg:text").attr("class","node_label").attr("x",38).attr("dy",".35em").attr("text-anchor","start");e._def.align&&(f.attr("class","node_label node_label_"+e._def.align),"right"===e._def.align&&f.attr("text-anchor","end"));var h=n.append("svg:g").attr("class","node_status_group").style("display","none");h.append("rect").attr("class","node_status").attr("x",6).attr("y",1).attr("width",9).attr("height",9).attr("rx",2).attr("ry",2).attr("stroke-width","3"),h.append("svg:text").attr("class","node_status_label").attr("x",20).attr("y",9)}n.append("image").attr("class","node_error hidden").attr("xlink:href","icons/node-red/node-error.png").attr("x",0).attr("y",-6).attr("width",10).attr("height",9),n.append("image").attr("class","node_changed hidden").attr("xlink:href","icons/node-red/node-changed.png").attr("x",12).attr("y",-6).attr("width",10).attr("height",10)}),i.each(function(e,t){if(e.dirty){var n="link in"===e.type||"link out"===e.type;if(w[e.id]=e,!n&&e.resize){var o=RED.utils.getNodeLabel(e),i=e.w;e.w=Math.max(D,20*Math.ceil((be(o,"node_label",50)+(0<e._def.inputs?7:0))/20)),e.h=Math.max(E,15*(e.outputs||0)),e.x+=(e.w-i)/2,e.resize=!1}var a=d3.select(this);if(a.attr("transform",function(e){return"translate("+(e.x-e.w/2)+","+(e.y-e.h/2)+")"}),z!=RED.state.MOVING_ACTIVE){a.selectAll(".node").attr("width",function(e){return e.w}).attr("height",function(e){return e.h}).classed("node_selected",function(e){return e.selected}).classed("node_highlighted",function(e){return e.highlighted}),a.selectAll(".node_icon_group_right").attr("transform",function(e){return"translate("+(e.w-30)+",0)"}),a.selectAll(".node_label_right").attr("x",function(e){return e.w-38});var s=a.selectAll(".port_input");if(0!==e.inputs||s.empty()){if(1===e.inputs&&s.empty()){a.append("g").attr("class","port_input").append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10).on("mousedown",function(e){Ee(e,W,0)}).on("touchstart",function(e){Ee(e,W,0)}).on("mouseup",function(e){Re(e,W,0)}).on("touchend",function(e){Re(e,W,0)}).on("mouseover",function(e){Te(d3.select(this),e,W,0)}).on("mouseout",function(e){_e(d3.select(this))})}}else s.remove();var r=e.outputs,d=e.h/2-(r-1)/2*13;if(e.ports=e.ports||d3.range(r),e._ports=a.selectAll(".port_output").data(e.ports),e._ports.enter().append("g").attr("class","port_output").append("rect").attr("class","port").attr("rx",3).attr("ry",3).attr("width",10).attr("height",10).on("mousedown",(y=e,function(e,t){Ee(y,H,t)})).on("touchstart",(b=e,function(e,t){Ee(b,H,t)})).on("mouseup",(m=e,function(e,t){Re(m,H,t)})).on("touchend",(v=e,function(e,t){Re(v,H,t)})).on("mouseover",(g=e,function(e,t){Te(d3.select(this),g,H,t)})).on("mouseout",function(e,t){_e(d3.select(this))}),e._ports.exit().remove(),e._ports){r=e.outputs||1,d=e.h/2-(r-1)/2*13;var l=e.w-5;e._ports.each(function(e,t){d3.select(this).attr("transform",function(e){return"translate("+l+","+(d+13*t-5)+")"})})}if(a.selectAll("text.node_label").text(function(t,e){var n="";if(t._def.label){n=t._def.label;try{n=("function"==typeof n?n.call(t):n)||"",n=RED.text.bidi.enforceTextDirectionWithUCC(n)}catch(e){console.log("Definition error: "+t.type+".label",e),n=t.type}}return n}).attr("y",function(e){return e.h/2-1}).attr("class",function(t){var n="";if(t._def.labelStyle){n=t._def.labelStyle;try{n=("function"==typeof n?n.call(t):n)||""}catch(e){console.log("Definition error: "+t.type+".labelStyle",e),n=""}n=" "+n}return"node_label"+(t._def.align?" node_label_"+t._def.align:"")+n}),e._def.icon){icon=a.select(".node_icon");var c=icon.attr("xlink:href"),p=RED.utils.getNodeIcon(e._def,e);if(p!==c){icon.attr("xlink:href",p);var u=new Image;u.src=p,u.onload=function(){icon.attr("width",Math.min(u.width,30)),icon.attr("height",Math.min(u.height,30)),icon.attr("x",15-Math.min(u.width,30)/2)}}}a.selectAll(".node_tools").attr("x",function(e){return e.w-35}).attr("y",function(e){return e.h-20}),a.selectAll(".node_changed").attr("x",function(e){return e.w-10}).classed("hidden",function(e){return!(e.changed||e.moved)}),a.selectAll(".node_error").attr("x",function(e){return e.w-10-(e.changed||e.moved?13:0)}).classed("hidden",function(e){return e.valid}),a.selectAll(".port_input").each(function(e,t){d3.select(this).attr("transform",function(e){return"translate(-5,"+(e.h/2-5)+")"})}),a.selectAll(".node_icon").attr("y",function(e){return(e.h-d3.select(this).attr("height"))/2}),a.selectAll(".node_icon_shade").attr("height",function(e){return e.h}),a.selectAll(".node_icon_shade_border").attr("d",function(e){return"M "+("right"==e._def.align?0:30)+" 1 l 0 "+(e.h-2)}),a.selectAll(".node_button").attr("opacity",function(e){return R||!Ce(e)?.4:1}),a.selectAll(".node_button_button").attr("cursor",function(e){return R||!Ce(e)?"":"pointer"}),a.selectAll(".node_right_button").attr("transform",function(e){var t=e.w-6;return e._def.button.toggle&&!e[e._def.button.toggle]&&(t-=8),"translate("+t+",2)"}),a.selectAll(".node_right_button rect").attr("fill-opacity",function(e){return e._def.button.toggle?e[e._def.button.toggle]?1:.2:1}),a.selectAll(".node_badge_group").attr("transform",function(e){return"translate("+(e.w-40)+","+(e.h+3)+")"}),a.selectAll("text.node_badge_label").text(function(t,e){if(t._def.badge){if("function"!=typeof t._def.badge)return t._def.badge;try{return t._def.badge.call(t)}catch(e){return console.log("Definition error: "+t.type+".badge",e),""}}return""})}if(U&&e.status){a.selectAll(".node_status_group").style("display","inline").attr("transform","translate(3,"+(e.h+3)+")");var f,h=q[e.status.fill];if(null==e.status.shape&&null==h)a.selectAll(".node_status").style("display","none");else null==e.status.shape||"dot"==e.status.shape?f={display:"inline",fill:h,stroke:h}:"ring"==e.status.shape&&(f={display:"inline",fill:"#fff",stroke:h}),a.selectAll(".node_status").style(f);e.status.text?a.selectAll(".node_status_label").text(e.status.text):a.selectAll(".node_status_label").text("")}else a.selectAll(".node_status_group").style("display","none");e.dirty=!1}var g,v,m,b,y});var a=Y.selectAll(".link").data(d,function(e){return e.source.id+":"+e.sourcePort+":"+e.target.id+":"+e.target.i});a.enter().insert("g",".node").attr("class","link").each(function(e,t){var n=d3.select(this);e.added=!0,n.append("svg:path").attr("class","link_background link_path").on("mousedown",function(e){f=e,le(),O=f,pe(),Le(),Pe(),d3.event.stopPropagation()}).on("touchstart",function(e){f=e,le(),O=f,pe(),Le(),Pe(),d3.event.stopPropagation();var t=d3.select(document.body),n=d3.event.touches.item(0),o=[n.pageX,n.pageY];b=setTimeout(function(){b=null,Oe(t,o)},g)}),n.append("svg:path").attr("class","link_outline link_path"),n.append("svg:path").attr("class","link_line link_path").classed("link_link",function(e){return e.link}).classed("link_subflow",function(e){return!e.link&&R})}),a.exit().remove(),Y.selectAll(".link_path").each(function(e){var t=d3.select(this);(e.added||e===O||e.selected||w[e.source.id]||w[e.target.id])&&t.attr("d",function(e){var t=-((e.source.outputs||1)-1)/2*13+13*(e.sourcePort||0);return e.x1=e.source.x+e.source.w/2,e.y1=e.source.y+t,e.x2=e.target.x-e.target.w/2,e.y2=e.target.y,ne(e.x1,e.y1,e.x2,e.y2,1)})}),a.classed("link_selected",function(e){return e===O||e.selected}),a.classed("link_unknown",function(e){return delete e.added,"unknown"==e.target.type||"unknown"==e.source.type});var s=Y.selectAll(".link_flow_link_g").data(l,function(e){return e.node.id+":"+e.refresh});s.enter().insert("g",".node").attr("class","link_flow_link_g").each(function(n,e){var t=d3.select(this),i=1,a="start";"link in"===n.node.type&&(i=-1,a="end");var s=30*i,r=20*i,o=(t.append("svg:path").attr("class","link_flow_link").attr("class","link_link").attr("d","M 0 0 h "+s),n.links),d=Object.keys(o),l=RED.nodes.getWorkspaceOrder();d.sort(function(e,t){return l.indexOf(e)-l.indexOf(t)});var c=E,p=-(d.length-1)*c/2,u=t.selectAll(".link_group").data(d);u.enter().append("g").attr("class","link_group").on("mouseover",function(){d3.select(this).classed("link_group_active",!0)}).on("mouseout",function(){d3.select(this).classed("link_group_active",!1)}).on("mousedown",function(){d3.event.preventDefault(),d3.event.stopPropagation()}).on("mouseup",function(e){d3.event.stopPropagation();var t=n.links[e];RED.workspaces.show(e),t.forEach(function(e){e.selected=!0,e.dirty=!0,M.push({n:e})}),pe(),Le()}).each(function(e){var t=d3.select(this);t.append("svg:path").attr("class","link_flow_link").attr("class","link_link").attr("d","M "+s+" 0 C "+(s+1.7*r)+" 0 "+(s+.1*r)+" "+p+" "+(s+1.5*r)+" "+p+" "),t.append("svg:path").attr("class","link_port").attr("d","M "+(s+1.5*r+17*i)+" "+(p-12)+" h "+10*-i+" a 3 3 45 0 "+(1===i?"0":"1")+" "+-3*i+" 3 v 18 a 3 3 45 0 "+(1===i?"0":"1")+" "+3*i+" 3 h "+10*i),t.append("svg:path").attr("class","link_port").attr("d","M "+(s+1.5*r+20*i)+" "+(p-12)+" h "+30*i+" M "+(s+1.5*r+20*i)+" "+(p+12)+" h "+30*i).style("stroke-dasharray","12 3 8 4 3"),t.append("rect").attr("class","port link_port").attr("x",s+1.5*r-4+4*i).attr("y",p-4).attr("rx",2).attr("ry",2).attr("width",8).attr("height",8),t.append("rect").attr("x",s+1.5*r-(-1===i?D:0)).attr("y",p-12).attr("width",D).attr("height",24).style("stroke","none").style("fill","transparent");var n,o=RED.nodes.workspace(e);o&&(n=o.label||o.id),t.append("svg:text").attr("class","port_label").attr("x",s+1.5*r+15*i).attr("y",p+1).style("font-size","10px").style("text-anchor",a).text(n),p+=c}),u.exit().remove()}),s.exit().remove(),(s=Y.selectAll(".link_flow_link_g")).each(function(e){var t=1;"link in"===e.node.type&&(t=-1),d3.select(this).attr("transform",function(e){return"translate("+(e.node.x+t*e.node.w/2)+","+e.node.y+")"})})}else Y.selectAll(".link_selected").data(d,function(e){return e.source.id+":"+e.sourcePort+":"+e.target.id+":"+e.target.i}).classed("link_selected",!1);RED.view.navigator.refresh(),d3.event&&d3.event.preventDefault()}function Pe(){try{var e=window.parent.window.scrollX,t=window.parent.window.scrollY;$("#chart").focus(),window.parent.window.scrollTo(e,t)}catch(e){$("#chart").focus()}}function Ne(e,t,n){try{var o;R&&(o=R.changed);var i=RED.nodes.import(e,!0,t);if(i){var a=i[0],s=i[1],r=i[2],d=i[3],l=i[4];t&&l&&RED.workspaces.show(l.id);var c=a.filter(function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")&&e.z==RED.workspaces.active()}).map(function(e){return{n:e}}),p=a.map(function(e){return e.id});if(0<c.length){var u=c[0].n,f=u.x,h=u.y;null==A&&(A=[0,0]);var g,v,m=0,b=0;for(g=0;g<c.length;g++)(v=c[g]).n.selected=!0,v.n.changed=!0,v.n.moved=!0,v.n.x-=f-A[0],v.n.y-=h-A[1],v.dx=v.n.x-A[0],v.dy=v.n.y-A[1],m=Math.min(v.n.x-D/2-5,m),b=Math.min(v.n.y-E/2-5,b);for(g=0;g<c.length;g++)if((v=c[g]).n.x-=m,v.n.y-=b,v.dx-=m,v.dy-=b,v.n._def.onadd)try{v.n._def.onadd.call(v.n)}catch(e){console.log("Definition error: "+v.n.type+".onadd:",e)}n||(z=RED.state.IMPORT_DRAGGING,S=!1,1===c.length&&(v=c[0],S=v.n.hasOwnProperty("_def")&&0<v.n._def.inputs&&0<v.n._def.outputs)),RED.keyboard.add("*","escape",function(){RED.keyboard.remove("escape"),le(),RED.history.pop(),z=0}),le(),M=c}var y={t:"add",nodes:p,links:s,workspaces:r,subflows:d,dirty:RED.nodes.dirty()};if(0===c.length&&RED.nodes.dirty(!0),R){var w=RED.subflow.refresh(!0);w&&(y.subflow={id:R.id,changed:o,instances:w.instances})}RED.history.push(y),te(),Le()}}catch(e){"NODE_RED"!=e.code?(console.log(e.stack),RED.notify(RED._("notification.error",{message:e.toString()}),"error")):RED.notify(RED._("notification.error",{message:e.message}),"error")}}return{init:function(){RED.events.on("workspace:change",function(e){0!==e.old&&(a[e.old]={left:K.scrollLeft(),top:K.scrollTop()});var t=K.scrollLeft(),n=K.scrollTop();R=RED.nodes.subflow(e.workspace),RED.menu.setDisabled("menu-item-workspace-edit",R),RED.menu.setDisabled("menu-item-workspace-delete",1==RED.workspaces.count()||R),a[e.workspace]?(K.scrollLeft(a[e.workspace].left),K.scrollTop(a[e.workspace].top)):(K.scrollLeft(0),K.scrollTop(0));var o=K.scrollLeft()-t,i=K.scrollTop()-n;null!=A&&(A[0]+=o,A[1]+=i),le(),RED.nodes.eachNode(function(e){e.dirty=!0}),pe(),te(),Le()}),RED.view.navigator.init(),$("#btn-zoom-out").click(function(){se()}),$("#btn-zoom-zero").click(function(){re()}),$("#btn-zoom-in").click(function(){ae()}),$("#chart").on("DOMMouseScroll mousewheel",function(e){e.altKey&&(e.preventDefault(),e.stopPropagation(),(-e.originalEvent.detail||e.originalEvent.wheelDelta)<=0?se():ae())}),$("#chart").droppable({accept:".palette_node",drop:function(e,t){d3.event=e;var n=oe(t.draggable[0].type);if(n){var o=n.historyEvent,i=n.node,a=d3.touches(t.helper.get(0))[0]||d3.mouse(t.helper.get(0)),s=d3.touches(this)[0]||d3.mouse(this);s[1]+=this.scrollTop+(i.h/2-a[1]),s[0]+=this.scrollLeft+(i.w/2-a[0]),s[1]/=c,s[0]/=c,C&&(s[0]=j*Math.ceil(s[0]/j),s[1]=j*Math.ceil(s[1]/j)),i.x=s[0],i.y=s[1];var r=$(t.helper).data("splice");if(r){RED.nodes.removeLink(r);var d={source:r.source,sourcePort:r.sourcePort,target:i},l={source:i,sourcePort:0,target:r.target};RED.nodes.addLink(d),RED.nodes.addLink(l),o.links=[d,l],o.removedLinks=[r]}RED.history.push(o),RED.nodes.add(i),RED.editor.validateNode(i),RED.nodes.dirty(!0),le(),i.selected=!0,M.push({n:i}),te(),pe(),Le(),i._def.autoedit&&RED.editor.edit(i)}}}),$("#chart").focus(function(){$("#workspace-tabs").addClass("workspace-focussed")}),$("#chart").blur(function(){$("#workspace-tabs").removeClass("workspace-focussed")}),RED.actions.add("core:copy-selection-to-internal-clipboard",me),RED.actions.add("core:cut-selection-to-internal-clipboard",function(){me(),ve()}),RED.actions.add("core:paste-from-internal-clipboard",function(){Ne(s)}),RED.actions.add("core:delete-selection",ve),RED.actions.add("core:edit-selected-node",ge),RED.actions.add("core:undo",RED.history.pop),RED.actions.add("core:select-all-nodes",de),RED.actions.add("core:zoom-in",ae),RED.actions.add("core:zoom-out",se),RED.actions.add("core:zoom-reset",re),RED.actions.add("core:toggle-show-grid",function(e){void 0===e?RED.userSettings.toggle("view-show-grid"):e?n.style("visibility","visible"):n.style("visibility","hidden")}),RED.actions.add("core:toggle-snap-grid",function(e){void 0===e?RED.userSettings.toggle("view-snap-grid"):(C=e,Le())}),RED.actions.add("core:toggle-status",function(e){void 0===e?RED.userSettings.toggle("view-node-status"):(U=e,RED.nodes.eachNode(function(e){e.dirty=!0}),Le())}),RED.actions.add("core:move-selection-up",function(){he(0,-1)}),RED.actions.add("core:step-selection-up",function(){he(0,-20)}),RED.actions.add("core:move-selection-right",function(){he(1,0)}),RED.actions.add("core:step-selection-right",function(){he(20,0)}),RED.actions.add("core:move-selection-down",function(){he(0,1)}),RED.actions.add("core:step-selection-down",function(){he(0,20)}),RED.actions.add("core:move-selection-left",function(){he(-1,0)}),RED.actions.add("core:step-selection-left",function(){he(-20,0)})},state:function(e){if(null==e)return z;z=e},redraw:function(e){e&&(te(),pe()),Le()},focus:Pe,importNodes:Ne,calculateTextWidth:be,select:function(e){if(void 0!==e&&(le(),"string"==typeof e)){var t=RED.nodes.node(e);t&&(t.selected=!0,t.dirty=!0,M=[{n:t}])}pe(),Le()},selection:function(){var e={};return 0<M.length&&(e.nodes=M.map(function(e){return e.n})),null!=O&&(e.link=O),e},scale:function(){return c},getLinksAtPoint:function(e,t){for(var n=[],o=X.selectAll(".link_background")[0],i=0;i<o.length;i++){var a=o[i].getBBox();e>=a.x&&t>=a.y&&e<=a.x+a.width&&t<=a.y+a.height&&n.push(o[i])}return n},reveal:function(e){if(RED.nodes.workspace(e)||RED.nodes.subflow(e))RED.workspaces.show(e);else{var t=RED.nodes.node(e);if("config"!==t._def.category&&t.z){t.highlighted=!0,t.dirty=!0,RED.workspaces.show(t.z);var n=[$("#chart").width(),$("#chart").height()],o=[$("#chart").scrollLeft(),$("#chart").scrollTop()];if(t.x<o[0]||t.y<o[1]||t.x>n[0]+o[0]||t.y>n[1]+o[1]){var i="-="+(o[0]-t.x+n[0]/2),a="-="+(o[1]-t.y+n[1]/2);$("#chart").animate({scrollLeft:i,scrollTop:a},200)}if(!t._flashing){t._flashing=!0;var s=22,r=function(){s--,t.dirty=!0,0<=s?(t.highlighted=!t.highlighted,setTimeout(r,100)):(t.highlighted=!1,delete t._flashing),RED.view.redraw()};r()}}else"config"===t._def.category&&RED.sidebar.config.show(e)}},gridSize:function(e){if(void 0===e)return j;j=Math.max(5,e),t()},getActiveNodes:function(){return r}}}(),RED.view.navigator=function(){var t,e,n,o,i,a,s,r,d,l=25,c=5e3/l,p=5e3/l,u=!1;function f(){if(u){var e=o.selectAll(".navnode").data(RED.view.getActiveNodes(),function(e){return e.id});e.exit().remove(),e.enter().insert("rect").attr("class","navnode").attr("pointer-events","none"),e.each(function(e){d3.select(this).attr("x",function(e){return(e.x-e.w/2)/l}).attr("y",function(e){return(e.y-e.h/2)/l}).attr("width",function(e){return Math.max(9,e.w/l)}).attr("height",function(e){return Math.max(3,e.h/l)}).attr("fill",function(e){return RED.utils.getNodeColor(e.type,e._def)})})}}function h(){d||g()}function g(){n&&(a=RED.view.scale(),s=[$("#chart").width(),$("#chart").height()],i=[$("#chart").scrollLeft(),$("#chart").scrollTop()],n.attr("x",i[0]/l).attr("y",i[1]/l).attr("width",s[0]/l/a).attr("height",s[1]/l/a))}return{init:function(){$(window).resize(g),RED.events.on("sidebar:resize",g),t=$("<div>").css({position:"absolute",bottom:$("#workspace-footer").height(),right:0,zIndex:1}).appendTo("#workspace").hide(),(e=d3.select(t[0]).append("svg:svg").attr("width",c).attr("height",p).attr("pointer-events","all").style({position:"absolute",bottom:0,right:0,zIndex:101,"border-left":"1px solid #ccc","border-top":"1px solid #ccc",background:"rgba(245,245,245,0.5)","box-shadow":"-1px 0 3px rgba(0,0,0,0.1)"})).append("rect").attr("x",0).attr("y",0).attr("width",c).attr("height",p).style({fill:"none",stroke:"none",pointerEvents:"all"}).on("mousedown",function(){a=RED.view.scale(),s=[$("#chart").width(),$("#chart").height()],r=[s[0]/l/a,s[1]/l/a];var e=Math.max(0,Math.min(d3.event.offsetX+r[0]/2,c)-r[0]),t=Math.max(0,Math.min(d3.event.offsetY+r[1]/2,p)-r[1]);n.attr("x",e).attr("y",t),d=!0,$("#chart").scrollLeft(e*l*a),$("#chart").scrollTop(t*l*a)}).on("mousemove",function(){if(d)if(0!==d3.event.buttons){var e=Math.max(0,Math.min(d3.event.offsetX+r[0]/2,c)-r[0]),t=Math.max(0,Math.min(d3.event.offsetY+r[1]/2,p)-r[1]);n.attr("x",e).attr("y",t),$("#chart").scrollLeft(e*l*a),$("#chart").scrollTop(t*l*a)}else d=!1}).on("mouseup",function(){d=!1}),n=e.append("rect").attr("stroke-dasharray","5,5").attr("pointer-events","none").style({stroke:"#999",strokeWidth:1,fill:"white"}),o=e.append("svg:g"),$("#btn-navigate").click(function(e){e.preventDefault(),u?(u=!1,t.fadeOut(100),$("#chart").off("scroll",h),$("#btn-navigate").removeClass("selected")):(u=!0,$("#btn-navigate").addClass("selected"),g(),f(),$("#chart").on("scroll",h),t.fadeIn(200))})},refresh:f,resize:g}}(),RED.sidebar=function(){var a=RED.tabs.create({id:"sidebar-tabs",onchange:function(e){$("#sidebar-content").children().hide(),$("#sidebar-footer").children().hide(),e.onchange&&e.onchange.call(e),$(e.wrapper).show(),e.toolbar&&$(e.toolbar).show()},onremove:function(e){$(e.wrapper).hide(),e.onremove&&e.onremove.call(e)},collapsible:!0}),s={};var r={};function t(e){e?($("#main-container").removeClass("sidebar-closed"),a.resize()):$("#main-container").addClass("sidebar-closed"),RED.events.emit("sidebar:resize")}function d(e){e&&(n(e)||a.addTab(s[e]),a.activateTab(e),RED.menu.isSelected("menu-item-sidebar")||RED.menu.setSelected("menu-item-sidebar",!0))}function n(e){return a.contains(e)}return $("#sidebar-separator").draggable({axis:"x",start:function(e,t){r.closing=!1,r.opening=!1;var n=$(window).width();if(r.start=t.position.left,r.chartWidth=$("#workspace").width(),r.chartRight=n-$("#workspace").width()-$("#workspace").offset().left-2,!RED.menu.isSelected("menu-item-sidebar")){r.opening=!0;$("#sidebar").addClass("closing"),$("#workspace").css("right",7),$("#editor-stack").css("right",8),$("#sidebar").width(0),RED.menu.setSelected("menu-item-sidebar",!0),RED.events.emit("sidebar:resize")}r.width=$("#sidebar").width()},drag:function(e,t){var n=t.position.left-r.start,o=r.width-n;r.opening&&(o-=3),150<o&&r.chartWidth+n<200&&(t.position.left=200+r.start-r.chartWidth,n=t.position.left-r.start,o=r.width-n),o<150?(r.closing||($("#sidebar").addClass("closing"),r.closing=!0),r.opening||(o=150,t.position.left=r.width-(150-r.start),n=t.position.left-r.start)):150<o&&(r.closing||r.opening)&&(r.closing=!1,$("#sidebar").removeClass("closing"));var i=r.chartRight-n;$("#workspace").css("right",i),$("#editor-stack").css("right",i+1),$("#sidebar").width(o),a.resize(),RED.events.emit("sidebar:resize")},stop:function(e,t){r.closing&&($("#sidebar").removeClass("closing"),RED.menu.setSelected("menu-item-sidebar",!1),$("#sidebar").width()<180&&($("#sidebar").width(180),$("#workspace").css("right",187),$("#editor-stack").css("right",188))),$("#sidebar-separator").css("left","auto"),$("#sidebar-separator").css("right",$("#sidebar").width()+2+"px"),RED.events.emit("sidebar:resize")}}),{init:function(){RED.actions.add("core:toggle-sidebar",function(e){void 0===e?RED.menu.toggleSelected("menu-item-sidebar"):t(e)}),d(),RED.sidebar.info.init(),RED.sidebar.config.init(),RED.sidebar.context.init(),$(window).width()<600&&RED.menu.setSelected("menu-item-sidebar",!1)},addTab:function(e,t,n,o){var i;"string"==typeof e?i={id:t.id,label:e,name:e,content:t,closeable:n,visible:o}:"object"==typeof e&&(i=e),delete i.closeable,i.wrapper=$("<div>",{style:"height:100%"}).appendTo("#sidebar-content"),i.wrapper.append(i.content),i.wrapper.hide(),i.enableOnEdit||(i.shade=$("<div>",{class:"sidebar-shade hide"}).appendTo(i.wrapper)),i.toolbar&&($("#sidebar-footer").append(i.toolbar),$(i.toolbar).hide()),i.id,RED.menu.addItem("menu-item-view-menu",{id:"menu-item-view-menu-"+i.id,label:i.name,onselect:function(){d(i.id)},group:"sidebar-tabs"}),i.iconClass=i.iconClass||"fa fa-square-o",!1!==(s[i.id]=i).visible&&a.addTab(s[i.id])},removeTab:function(e){a.removeTab(e),$(s[e].wrapper).remove(),s[e].footer&&s[e].footer.remove(),delete s[e],RED.menu.removeItem("menu-item-view-menu-"+e)},show:d,containsTab:n,toggleSidebar:t}}(),RED.palette=function(){var E=["config","unknown","deprecated"],R=["subflows","input","output","function","social","mobile","storage","analysis","advanced"],x={};function T(e,t,n,o){0===$("#palette-base-category-"+t).length&&i(e,t,o+":palette.label."+t),$("#palette-container-"+t).show(),0===$("#palette-"+n).length&&$("#palette-base-category-"+t).append('<div id="palette-'+n+'"></div>')}function i(e,t,n){var o=RED._(n,{defaultValue:t});o=(o||t).replace(/_/g," ");var i=$('<div id="palette-container-'+t+'" class="palette-category palette-close hide"><div id="palette-header-'+t+'" class="palette-header"><i class="expanded fa fa-angle-down"></i><span>'+o+'</span></div><div class="palette-content" id="palette-base-category-'+t+'"><div id="palette-'+t+'-input"></div><div id="palette-'+t+'-output"></div><div id="palette-'+t+'-function"></div></div></div>').appendTo("#palette-container");i.data("category",e),i.data("label",o),x[t]={container:i,close:function(){i.removeClass("palette-open"),i.addClass("palette-closed"),$("#palette-base-category-"+t).slideUp(),$("#palette-header-"+t+" i").removeClass("expanded")},open:function(){i.addClass("palette-open"),i.removeClass("palette-closed"),$("#palette-base-category-"+t).slideDown(),$("#palette-header-"+t+" i").addClass("expanded")},toggle:function(){i.hasClass("palette-open")?x[t].close():x[t].open()}},$("#palette-header-"+t).on("click",function(e){x[t].toggle()})}function _(t,e,n,o){for(var i=n.split(/[ -]/),a=[],s=i[0],r=(RED.view.calculateTextWidth(s,"palette_label",0),1);r<i.length;r++){var d=RED.view.calculateTextWidth(s+" "+i[r],"palette_label",0);d<82?(s+=" "+i[r],d):(a.push(s),s=i[r],RED.view.calculateTextWidth(s,"palette_label",0))}a.push(s);var l,c=a.join("<br/>"),p=8+20*a.length;e.css({height:p+"px"}),e.find(".palette_label").html(c).attr("dir",RED.text.bidi.resolveBaseTextDir(c)),e.find(".palette_port").css({top:p/2-5+"px"});try{var u="<p><b>"+RED.text.bidi.enforceTextDirectionWithUCC(n)+"</b></p>";n!=t&&(u="<p><b>"+RED.text.bidi.enforceTextDirectionWithUCC(n)+"</b><br/><i>"+t+"</i></p>"),l=$(u+(o||($("script[data-help-name='"+t+"']").html()||"<p>"+RED._("palette.noInfo")+"</p>")).trim()).filter(function(e){return 1==this.nodeType&&"P"==this.nodeName||3==this.nodeType&&0<this.textContent.trim().length}).slice(0,2)}catch(e){console.log("Error generating pop-over label for ",t),console.log(e.toString()),l="<p><b>"+n+"</b></p><p>"+RED._("palette.noInfo")+"</p>"}e.data("popover").setContent(l)}function k(e){return e.replace(" ","_").replace(".","_").replace(":","_")}function n(t,n){var e=k(t);if(!$("#palette_node_"+e).length&&-1===E.indexOf(n.category)){n.category;var o=n.category.replace(/ /g,"_"),i=o.split("-")[0],a=document.createElement("div");a.id="palette_node_"+e,a.type=t;var s=/^(.*?)([ -]in|[ -]out)?$/.exec(t)[1];if(void 0!==n.paletteLabel)try{s=("function"==typeof n.paletteLabel?n.paletteLabel.call(n):n.paletteLabel)||""}catch(e){console.log("Definition error: "+t+".paletteLabel",e)}if($("<div/>",{class:"palette_label"+("right"==n.align?" palette_label_right":"")}).appendTo(a),a.className="palette_node",n.icon){var r=RED.utils.getNodeIcon(n),d=$("<div/>",{class:"palette_icon_container"+("right"==n.align?" palette_icon_container_right":"")}).appendTo(a);$("<div/>",{class:"palette_icon",style:"background-image: url("+r+")"}).appendTo(d)}if(a.style.backgroundColor=RED.utils.getNodeColor(t,n),0<n.outputs){var l=document.createElement("div");l.className="palette_port palette_port_output",a.appendChild(l)}if(0<n.inputs){var c=document.createElement("div");c.className="palette_port palette_port_input",a.appendChild(c)}T(n.category,i,o,-1!==R.indexOf(i)?"node-red":n.set.id),$("#palette-"+o).append(a),$(a).data("category",i),a.onmousedown=function(e){e.preventDefault()};var p=RED.popover.create({target:$(a),trigger:"hover",width:"300px",content:"hi",delay:{show:750,hide:50}});$(a).data("popover",p),$(a).click(function(){var e;RED.view.focus(),e=0===t.indexOf("subflow:")?marked(RED.nodes.subflow(t.substring(8)).info||"")||'<span class="node-info-none">'+RED._("sidebar.info.none")+"</span>":$("script[data-help-name='"+a.type+"']").html()||'<span class="node-info-none">'+RED._("sidebar.info.none")+"</span>",RED.sidebar.info.set(e,RED._("sidebar.info.nodeHelp"))});var u,f,h,g,v,m,b=$("#chart"),y=b.offset(),w=$("#chart>svg").get(0);$(a).draggable({helper:"clone",appendTo:"body",revert:!0,revertDuration:50,containment:"#main-container",start:function(){v=$("#palette").width(),m=$("#palette").parent().position().top+$("#palette-container").position().top,RED.view.focus()},stop:function(){d3.select(".link_splice").classed("link_splice",!1),g&&(clearTimeout(g),g=null)},drag:function(e,l){l.position.left+=17.5,0<n.inputs&&0<n.outputs&&(f=l.position.left-v+l.helper.width()/2-y.left+b.scrollLeft(),h=l.position.top-m+l.helper.height()/2-y.top+b.scrollTop(),g||(g=setTimeout(function(){var e=[],t=1/0,n=null;if(w.getIntersectionList){var o=w.createSVGRect();o.x=f,o.y=h,o.width=1,o.height=1,e=w.getIntersectionList(o,w),f/=RED.view.scale(),h/=RED.view.scale()}else f/=RED.view.scale(),h/=RED.view.scale(),e=RED.view.getLinksAtPoint(f,h);for(var i=0;i<e.length;i++)if(d3.select(e[i]).classed("link_background"))for(var a=e[i].getTotalLength(),s=0;s<a;s+=10){var r=e[i].getPointAtLength(s),d=(r.x-f)*(r.x-f)+(r.y-h)*(r.y-h);d<200&&d<t&&(t=d,n=e[i])}u&&u!==n&&d3.select(u.parentNode).classed("link_splice",!1),n?d3.select(n.parentNode).classed("link_splice",!0):d3.select(".link_splice").classed("link_splice",!1),u!==n&&(n?$(l.helper).data("splice",d3.select(n).data()[0]):$(l.helper).removeData("splice")),u=n,g=null},200)))}});var D=null;0===t.indexOf("subflow:")&&($(a).dblclick(function(e){RED.workspaces.show(t.substring(8)),e.preventDefault()}),D=marked(n.info||"")),_(t,$(a),s,D),1===$("#palette-container-"+o).find(".palette_node").length&&x[o].open()}}function o(e){var t=k(e),n=$("#palette_node_"+t),o=n.closest(".palette-category");n.remove(),0===o.find(".palette_node").length&&o.find("i").hasClass("expanded")&&(o.find(".palette-content").slideToggle(),o.find("i").toggleClass("expanded"))}function a(e){var t=k(e),n=$("#palette_node_"+t);n.hide();for(var o=n.closest(".palette-category"),i=o.find(".palette_node"),a=0,s=0;s<i.length;s++)"none"===$(i[s]).css("display")&&(a+=1);a===i.length&&o.hide()}function s(e){var t=k(e),n=$("#palette_node_"+t);n.closest(".palette-category").show(),n.show()}return{init:function(){RED.events.on("registry:node-type-added",function(e){var t=RED.nodes.getType(e);n(e,t),t.onpaletteadd&&"function"==typeof t.onpaletteadd&&t.onpaletteadd.call(t)}),RED.events.on("registry:node-type-removed",function(e){o(e)}),RED.events.on("registry:node-set-enabled",function(e){for(var t=0;t<e.types.length;t++){s(e.types[t]);var n=RED.nodes.getType(e.types[t]);n&&n.onpaletteadd&&"function"==typeof n.onpaletteadd&&n.onpaletteadd.call(n)}}),RED.events.on("registry:node-set-disabled",function(e){for(var t=0;t<e.types.length;t++){a(e.types[t]);var n=RED.nodes.getType(e.types[t]);n&&n.onpaletteremove&&"function"==typeof n.onpaletteremove&&n.onpaletteremove.call(n)}}),RED.events.on("registry:node-set-removed",function(e){if(e.added)for(var t=0;t<e.types.length;t++){o(e.types[t]);var n=RED.nodes.getType(e.types[t]);n&&n.onpaletteremove&&"function"==typeof n.onpaletteremove&&n.onpaletteremove.call(n)}}),$("#palette > .palette-spinner").show(),$("#palette-search input").searchBox({delay:100,change:function(){!function(o){var i=new RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i");for(var e in $("#palette-container .palette_node").each(function(e,t){var n=$(t).find(".palette_label").text();""===o||i.test(t.id)||i.test(n)?$(this).show():$(this).hide()}),x)x.hasOwnProperty(e)&&(0===x[e].container.find(".palette_node").filter(function(){return"none"!==$(this).css("display")}).length?x[e].close():x[e].open())}($(this).val())}});var e=R;RED.settings.paletteCategories?e=RED.settings.paletteCategories:RED.settings.theme("palette.categories")&&(e=RED.settings.theme("palette.categories")),Array.isArray(e)||(e=R),e.forEach(function(e){i(e,e,"palette.label."+e)}),$("#palette-collapse-all").on("click",function(e){for(var t in e.preventDefault(),x)x.hasOwnProperty(t)&&x[t].close()}),$("#palette-expand-all").on("click",function(e){for(var t in e.preventDefault(),x)x.hasOwnProperty(t)&&x[t].open()})},add:n,remove:o,hide:a,show:s,refresh:function(){RED.nodes.eachSubflow(function(e){var t,n,o,i=$("#palette_node_subflow_"+e.id.replace(".","_")),a=i.find(".palette_port_input"),s=i.find(".palette_port_output");if(0===a.length&&0<e.in.length){var r=document.createElement("div");r.className="palette_port palette_port_input",i.append(r)}else 0!==a.length&&0===e.in.length&&a.remove();if(0===s.length&&0<e.out.length){var d=document.createElement("div");d.className="palette_port palette_port_output",i.append(d)}else 0!==s.length&&0===e.out.length&&s.remove();_(e.type+":"+e.id,i,e.name,marked(e.info||"")),t=e,n=i.find(".palette_icon"),o=RED.utils.getNodeIcon(t._def,t),n.attr("style","background-image: url("+o+")");var l=i.data("category"),c=e.category||"subflows";if(l!==c){var p=c.replace(/ /g,"_");T(c,p,p,"node-red");var u=i.closest(".palette-category"),f=$("#palette-"+p);f.append(i),1===f.find(".palette_node").length&&x[p].open(),i.data("category",c),0===u.find(".palette_node").length&&u.find("i").hasClass("expanded")&&(u.find(".palette-content").slideToggle(),u.find("i").toggleClass("expanded"))}})},getCategories:function(){var n=[];return $("#palette-container .palette-category").each(function(e,t){n.push({id:$(t).data("category"),label:$(t).data("label")})}),n}}}(),RED.sidebar.info=function(){var o,T,_,k,l;marked.setOptions({renderer:new marked.Renderer,gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1});var j={property:!1};function i(){RED.sidebar.show("info")}function a(e){if(void 0!==e){var t;T.show(),$(_.content).empty(),$(k.content).empty();var n,o,i=$('<table class="node-info"></table>').appendTo(_.content),a=$("<tbody>").appendTo(i),s=RED.projects.getActiveProject();if(s&&(t=$('<tr class="node-info-node-row"><td>Project</td><td></td></tr>').appendTo(a),$(t.children()[1]).text(s.name||""),$('<tr class="node-info-property-expand blank"><td colspan="2"></td></tr>').appendTo(a),$('<button class="editor-button editor-button-small" style="position:absolute;right:2px;"><i class="fa fa-ellipsis-h"></i></button>').appendTo(t.children()[1]).click(function(e){e.preventDefault(),RED.projects.editProject()})),k.container.show(),null!==e)if(Array.isArray(e))k.container.hide(),t=$('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.selection")+"</td><td></td></tr>").appendTo(a),$(t.children()[1]).text(RED._("sidebar.info.nodes",{count:e.length}));else{var r=/^subflow(:(.+))?$/.exec(e.type);if(r){n=r[2]?RED.nodes.subflow(r[2]):e,o=0;var d="subflow:"+n.id;RED.nodes.eachNode(function(e){e.type===d&&o++})}if("tab"===e.type||"subflow"===e.type){if(t=$('<tr class="node-info-node-row"><td>'+RED._("sidebar.info."+("tab"===e.type?"flow":"subflow"))+"</td><td></td></tr>").appendTo(a),RED.utils.createObjectElement(e.id).appendTo(t.children()[1]),t=$('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.tabName")+"</td><td></td></tr>").appendTo(a),$(t.children()[1]).text(e.label||e.name||""),"tab"===e.type)t=$('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.status")+"</td><td></td></tr>").appendTo(a),$(t.children()[1]).text(e.disabled?RED._("sidebar.info.disabled"):RED._("sidebar.info.enabled"));else if("subflow"===e.type){t=$('<tr class="node-info-node-row"><td>'+RED._("subflow.category")+"</td><td></td></tr>").appendTo(a);var l=e.category||"subflows";$(t.children()[1]).text(RED._("palette.label."+l,{defaultValue:l}))}}else{var c;if(t=$('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.node")+"</td><td></td></tr>").appendTo(a),RED.utils.createObjectElement(e.id).appendTo(t.children()[1]),"subflow"!==e.type&&"unknown"!==e.type&&e.name&&(t=$('<tr class="node-info-node-row"><td>'+RED._("common.label.name")+"</td><td></td></tr>").appendTo(a),$('<span class="bidiAware" dir="'+RED.text.bidi.resolveBaseTextDir(e.name)+'"></span>').text(e.name).appendTo(t.children()[1])),r||(t=$('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.type")+"</td><td></td></tr>").appendTo(a),$(t.children()[1]).text("unknown"===e.type?e._orig.type:e.type),"unknown"===e.type&&$('<span style="float: right; font-size: 0.8em"><i class="fa fa-warning"></i></span>').prependTo($(t.children()[1]))),!r&&"subflow"!=e.type&&"comment"!=e.type)if("unknown"===e.type?(c={},Object.keys(e._orig).forEach(function(e){"type"!==e&&(c[e]={})})):e._def&&(c=e._def.defaults),c){var p=0;for(var u in c)if("name"!=u&&c.hasOwnProperty(u)){var f=e[u];if(p++,t=$('<tr class="node-info-property-row'+(j.property?"":" hide")+'"><td>'+u+"</td><td></td></tr>").appendTo(a),c[u].type){var h=RED.nodes.node(f);if(h){var g=RED.utils.getNodeLabel(h,f),v=t.children()[1],m=$("<span>",{class:""}).appendTo(v),b=$("<div>",{class:"palette_node palette_node_small"}).appendTo(m),y=RED.utils.getNodeColor(h.type,h._def),w=RED.utils.getNodeIcon(h._def);b.css({backgroundColor:y,cursor:"pointer"});var D=$("<div/>",{class:"palette_icon_container"}).appendTo(b);$("<div/>",{class:"palette_icon",style:"background-image: url("+w+")"}).appendTo(D);$("<span></span>").css({verticalAlign:"top",marginLeft:"6px"}).text(g).appendTo(v);b.on("dblclick",function(){RED.editor.editConfig("",h.type,h.id)})}else RED.utils.createObjectElement(void 0).appendTo(t.children()[1])}else RED.utils.createObjectElement(f).appendTo(t.children()[1])}0<p&&$('<tr class="node-info-property-expand blank"><td colspan="2"><a href="#" class=" node-info-property-header'+(j.property?" expanded":"")+'"><span class="node-info-property-show-more">'+RED._("sidebar.info.showMore")+'</span><span class="node-info-property-show-less">'+RED._("sidebar.info.showLess")+'</span> <i class="fa fa-caret-down"></i></a></td></tr>').appendTo(a)}"tab"!==e.type&&r&&($('<tr class="blank"><th colspan="2">'+RED._("sidebar.info.subflow")+"</th></tr>").appendTo(a),$('<tr class="node-info-subflow-row"><td>'+RED._("common.label.name")+'</td><td><span class="bidiAware" dir="'+RED.text.bidi.resolveBaseTextDir(n.name)+'">'+n.name+"</span></td></tr>").appendTo(a))}if(r){t=$('<tr class="node-info-node-row"><td>'+RED._("subflow.category")+"</td><td></td></tr>").appendTo(a);l=n.category||"subflows";$(t.children()[1]).text(RED._("palette.label."+l,{defaultValue:l})),$('<tr class="node-info-subflow-row"><td>'+RED._("sidebar.info.instances")+"</td><td>"+o+"</td></tr>").appendTo(a)}var E="";if(n||"comment"===e.type||"tab"===e.type)"tab"===e.type&&(k.title.text(RED._("sidebar.info.flowDesc")),E=marked(e.info||"")||'<span class="node-info-none">'+RED._("sidebar.info.none")+"</span>");else k.title.text(RED._("sidebar.info.nodeHelp")),E=$("script[data-help-name='"+e.type+"']").html()||'<span class="node-info-none">'+RED._("sidebar.info.none")+"</span>";if(n)E+=marked(n.info||"")||'<span class="node-info-none">'+RED._("sidebar.info.none")+"</span>",k.title.text(RED._("sidebar.info.subflowDesc"));else if(e._def&&e._def.info){k.title.text(RED._("sidebar.info.nodeHelp"));var R=e._def.info,x="function"==typeof R?R.call(e):R;E+=marked(x)}E&&C(E),$(".node-info-property-header").click(function(e){e.preventDefault(),j.property=!j.property,$(this).toggleClass("expanded",j.property),$(".node-info-property-row").toggle(j.property)})}}else S()}function C(e){var t,n=(t=$('<div class="node-help"><span class="bidiAware" dir="'+RED.text.bidi.resolveBaseTextDir(e)+'">'+e+"</span></div>"),$(t).find("a").each(function(e){var t=$(this).attr("href");/^https?:/.test(t)&&$(this).attr("target","_blank")}),t).appendTo(k.content);n.find(".bidiAware").contents().filter(function(){return 3===this.nodeType&&""!==this.textContent.trim()}).wrap("<span></span>");n.find("H3").wrapInner('<a class="node-info-header expanded" href="#"></a>').find("a").prepend('<i class="fa fa-angle-right">').click(function(e){e.preventDefault();for(var t=$(this).hasClass("expanded"),n=$(this).parent().next();1===n.length&&"H3"!==n[0].nodeName;)n.toggle(!t),n=n.next();$(this).toggleClass("expanded",!t)})}var s=function(){var i,a,t=!0,s=15e3,r=-1;function e(){for(var e,t=Math.floor(Math.random()*r),n=RED._("infotips:info.tip"+t);e=/({{(.*?)}})/.exec(n);){var o=RED.keyboard.getShortcut(e[2]);if(!o)return;n=n.replace(e[1],RED.keyboard.formatKey(o.key))}for(;e=/(\[(.*?)\])/.exec(n);)n=n.replace(e[1],RED.keyboard.formatKey(e[2]));l.html(n).fadeIn(200),i&&(i=null,a=setInterval(d,s))}function d(){l.fadeOut(300,function(){e()})}function n(){if($(".sidebar-node-info").addClass("show-tips"),t&&!i&&!a){if(-1===r)for(;r++,RED._("infotips:info.tip"+r)!=="infotips:info.tip"+r;);i=setTimeout(e,1e3)}}function o(){$(".sidebar-node-info").removeClass("show-tips"),clearInterval(a),clearTimeout(i),i=a=null}return RED.actions.add("core:toggle-show-tips",function(e){void 0===e?RED.userSettings.toggle("view-show-tips"):(t=e)?n():o()}),{start:n,stop:o,next:function(){clearInterval(a),i=!0,e()},enabled:function(){return t}}}();function S(e){if(void 0===e&&(e=RED.view.selection()),e.nodes)if(1==e.nodes.length){var t=e.nodes[0];"subflow"===t.type&&t.direction?a(RED.nodes.subflow(t.z)):a(t)}else a(e.nodes);else{var n=RED.workspaces.active(),o=RED.nodes.workspace(n)||RED.nodes.subflow(n);if(o)a(o);else{var i=RED.nodes.workspace(RED.workspaces.active());i&&i.info?a(i):a(null)}}}return RED.events.on("view:selection-changed",S),{init:function(){(o=document.createElement("div")).className="sidebar-node-info",RED.actions.add("core:show-info-tab",i);var e=$("<div>",{class:"sidebar-node-info-stack"}).appendTo(o);T=RED.stack.create({container:e}).hide(),(_=T.add({title:RED._("sidebar.info.info"),collapsible:!0})).expand(),(k=T.add({title:RED._("sidebar.info.nodeHelp"),collapsible:!0})).expand(),k.content.css("padding","6px"),k.container.css("border-bottom","none");var t=$('<div class="node-info-tips"></div>').appendTo(o);l=$('<div class="node-info-tip"></div>').appendTo(t);var n=$('<div class="node-info-tips-buttons"></div>').appendTo(t);$('<a href="#" class="workspace-footer-button"><i class="fa fa-refresh"></a>').appendTo(n).click(function(e){e.preventDefault(),s.next()}),$('<a href="#" class="workspace-footer-button"><i class="fa fa-times"></a>').appendTo(n).click(function(e){e.preventDefault(),RED.actions.invoke("core:toggle-show-tips"),RED.notify(RED._("sidebar.info.showTips"))}),RED.sidebar.addTab({id:"info",label:RED._("sidebar.info.label"),name:RED._("sidebar.info.name"),iconClass:"fa fa-info",content:o,pinned:!0,enableOnEdit:!0}),s.enabled()?s.start():s.stop()},show:i,refresh:a,clear:function(){a(null)},set:function(e,t){k.title.text(t||""),a(null),$(k.content).empty(),C(e),$(".sidebar-node-info-stack").scrollTop(0)}}}(),RED.sidebar.config=function(){var e=document.createElement("div");e.className="sidebar-node-config",$('<div class="button-group sidebar-header"><a class="sidebar-header-button-toggle selected" id="workspace-config-node-filter-all" href="#"><span data-i18n="sidebar.config.filterAll"></span></a><a class="sidebar-header-button-toggle" id="workspace-config-node-filter-unused" href="#"><span data-i18n="sidebar.config.filterUnused"></span></a> </div>').appendTo(e);var t=$('<div><a class="sidebar-footer-button" id="workspace-config-node-collapse-all" href="#"><i class="fa fa-angle-double-up"></i></a> <a class="sidebar-footer-button" id="workspace-config-node-expand-all" href="#"><i class="fa fa-angle-double-down"></i></a></div>'),i=$("<div>").appendTo(e),a=$("<div>").appendTo(e),s=$("<div>").appendTo(e),r=!1,d={};function l(e,t,n){if(e=e.replace(/\./i,"-"),d[e])d[e].label!==n&&(d[e].list.parent().find(".config-node-label").text(n),d[e].label=n);else{var o=$('<div class="palette-category workspace-config-node-category" id="workspace-config-node-category-'+e+'"></div>').appendTo(t),i=$('<div class="workspace-config-node-tray-header palette-header"><i class="fa fa-angle-down expanded"></i></div>').appendTo(o);n?$('<span class="config-node-label"/>').text(n).appendTo(i):$('<span class="config-node-label" data-i18n="sidebar.config.'+e+'">').appendTo(i),$('<span class="config-node-filter-info"></span>').appendTo(i),category=$('<ul class="palette-content config-node-list"></ul>').appendTo(o),o.i18n();var a=i.find("i"),s={label:n,list:category,size:function(){return s.list.find("li:not(.config_node_none)").length},open:function(e){a.hasClass("expanded")||(a.addClass("expanded"),e?s.list.show():s.list.slideDown())},close:function(e){a.hasClass("expanded")&&(a.removeClass("expanded"),e?s.list.hide():s.list.slideUp())},isOpen:function(){return a.hasClass("expanded")}};i.on("click",function(e){s.isOpen()?s.close():s.open()}),d[e]=s}return d[e]}function c(e,t){var n=l(e.replace(/\./i,"-")),i=n.list;if(t.sort(function(e,t){return e.type<t.type?-1:e.type>t.type?1:0}),r){var o=t.length;0<(o-=(t=t.filter(function(e){return!1!==e._def.hasUsers&&0===e.users.length})).length)?i.parent().find(".config-node-filter-info").text(RED._("sidebar.config.filtered",{count:o})).show():i.parent().find(".config-node-filter-info").hide()}else i.parent().find(".config-node-filter-info").hide();if(i.empty(),0===t.length)$('<li class="config_node_none" data-i18n="sidebar.config.none">NONE</li>').i18n().appendTo(i),n.close(!0);else{var a="";t.forEach(function(t){var e=RED.utils.getNodeLabel(t,t.id);t.type!=a&&($('<li class="config_node_type">'+t.type+"</li>").appendTo(i),a=t.type);var n=$('<li class="palette_node config_node palette_node_id_'+t.id.replace(/\./g,"-")+'"></li>').appendTo(i);if($('<div class="palette_label"></div>').text(e).appendTo(n),!1!==t._def.hasUsers){$("<div/>",{class:"palette_icon_container palette_icon_container_right"}).text(t.users.length).appendTo(n);0===t.users.length&&n.addClass("config_node_unused")}n.on("click",function(e){RED.sidebar.info.refresh(t)}),n.on("dblclick",function(e){RED.editor.editConfig("",t.type,t.id)});var o=t.users.map(function(e){return e.id});n.on("mouseover",function(e){RED.nodes.eachNode(function(e){-1!=o.indexOf(e.id)&&(e.highlighted=!0,e.dirty=!0)}),RED.view.redraw()}),n.on("mouseout",function(e){RED.nodes.eachNode(function(e){e.highlighted&&(e.highlighted=!1,e.dirty=!0)}),RED.view.redraw()})}),n.open(!0)}}function n(){var t={global:!0};l("global",i),RED.nodes.eachWorkspace(function(e){t[e.id.replace(/\./g,"-")]=!0,l(e.id,a,e.label)}),RED.nodes.eachSubflow(function(e){t[e.id.replace(/\./g,"-")]=!0,l(e.id,s,e.name)}),$(".workspace-config-node-category").each(function(){var e=$(this).attr("id").substring("workspace-config-node-category-".length);t[e]||($(this).remove(),delete d[e])});var n=[],o={};for(var e in RED.nodes.eachConfig(function(e){e.z?(o[e.z.replace(/\./g,"-")]=o[e.z.replace(/\./g,"-")]||[],o[e.z.replace(/\./g,"-")].push(e)):e.z||n.push(e)}),t)t.hasOwnProperty(e)&&c(e,o[e]||[]);c("global",n)}return{init:function(){RED.sidebar.addTab({id:"config",label:RED._("sidebar.config.label"),name:RED._("sidebar.config.name"),content:e,toolbar:t,iconClass:"fa fa-cog",onchange:function(){n()}}),RED.actions.add("core:show-config-tab",function(){RED.sidebar.show("config")}),$("#workspace-config-node-collapse-all").on("click",function(e){for(var t in e.preventDefault(),d)d.hasOwnProperty(t)&&d[t].close()}),$("#workspace-config-node-expand-all").on("click",function(e){for(var t in e.preventDefault(),d)d.hasOwnProperty(t)&&0<d[t].size()&&d[t].open()}),$("#workspace-config-node-filter-all").on("click",function(e){e.preventDefault(),r&&($(this).addClass("selected"),$("#workspace-config-node-filter-unused").removeClass("selected"),r=!r,n())}),$("#workspace-config-node-filter-unused").on("click",function(e){e.preventDefault(),r||($(this).addClass("selected"),$("#workspace-config-node-filter-all").removeClass("selected"),r=!r,n())})},show:function(r){"boolean"==typeof r&&(r?$("#workspace-config-node-filter-unused").click():$("#workspace-config-node-filter-all").click()),n(),"string"==typeof r&&($("#workspace-config-node-filter-all").click(),r=r.replace(/\./g,"-"),setTimeout(function(){var e=$(".palette_node_id_"+r),t=e.position().top,n=e.height(),o=$(".sidebar-node-config"),i=o.height();i<t+n?o.animate({scrollTop:"-="+(i-(t+n)-30)},150):t<0&&o.animate({scrollTop:"+="+(t-10)},150);var a=21,s=function(){a%2==0?e.removeClass("node_highlighted"):e.addClass("node_highlighted"),0<=--a&&setTimeout(s,100)};s()},100)),RED.sidebar.show("config")},refresh:n}}(),RED.sidebar.context=function(){var i,a,s,r,d,l,c;function p(e,t){l=e,t?e?f(s,"context/node/"+e.id,e.id):f(s):($(s.table).empty(),e?$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.refresh"></td></tr>').appendTo(s.table).i18n():$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.none"></td></tr>').appendTo(s.table).i18n(),s.timestamp.html("&nbsp;"))}function u(e){(c=e)?f(r,"context/flow/"+e.id,e.id):f(r)}function f(e,t,n){var i,c,p,u,f,o=e.table;n?(i=e,c=t,p=n,u=RED.settings.context.stores,f=i.table,$.getJSON(c,function(e){$(f).empty();var r={};for(var t in e)if(e.hasOwnProperty(t))for(var n in e[t])e[t].hasOwnProperty(n)&&(r.hasOwnProperty(n)||(r[n]=[]),e[t][n].store=t,r[n].push(e[t][n]));var d=Object.keys(r);d.sort();for(var o=d.length,l=0;l<o;l++)r[d[l]].forEach(function(t){var o=d[l],i=(r[o].length,$('<tr class="node-info-node-row"><td class="sidebar-context-property"></td><td></td></tr>').appendTo(f)),e=$(i.children()[0]);e.text(o);var n=$('<span class="debug-message-tools button-group"></span>').appendTo(e),a=($('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(n).click(function(e){e.preventDefault(),e.stopPropagation(),$.getJSON(c+"/"+o+"?store="+t.store,function(e){$(i.children()[1]).empty();var t=e.msg,n=e.format;t=RED.utils.decodeObject(t,n),RED.utils.createObjectElement(t,{typeHint:e.format,sourceId:p+"."+o}).appendTo(i.children()[1])})}),t.msg),s=t.format;a=RED.utils.decodeObject(a,s),RED.utils.createObjectElement(a,{typeHint:t.format,sourceId:p+"."+o}).appendTo(i.children()[1]),1<u.length&&$("<span>",{class:"sidebar-context-property-storename"}).text(t.store).appendTo($(i.children()[0]))});0===o&&$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.empty"></td></tr>').appendTo(f).i18n(),$(i.timestamp).text((new Date).toLocaleString())})):($(o).empty(),$('<tr class="node-info-node-row red-ui-search-empty blank" colspan="2"><td data-i18n="sidebar.context.none"></td></tr>').appendTo(o).i18n())}function h(){RED.sidebar.show("context")}return{init:function(){(i=$("<div>").css({position:"relative",height:"100%"})).className="sidebar-context";var e=$("<div></div>"),t=$("<div>",{class:"sidebar-context-stack"}).appendTo(i);a=RED.stack.create({container:t}),(s=a.add({title:RED._("sidebar.context.node"),collapsible:!0})).expand(),s.content.css({height:"100%"}),s.timestamp=$('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(s.content);var n=$('<table class="node-info"></table>').appendTo(s.content);s.table=$("<tbody>").appendTo(n);var o=$('<div style="float: right"></div>').appendTo(s.header);$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(o).click(function(e){e.stopPropagation(),e.preventDefault(),p(l,!0)}),(r=a.add({title:RED._("sidebar.context.flow"),collapsible:!0})).expand(),r.content.css({height:"100%"}),r.timestamp=$('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(r.content),n=$('<table class="node-info"></table>').appendTo(r.content),r.table=$("<tbody>").appendTo(n),o=$('<div style="float: right"></div>').appendTo(r.header),$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(o).click(function(e){e.stopPropagation(),e.preventDefault(),u(c)}),(d=a.add({title:RED._("sidebar.context.global"),collapsible:!0})).expand(),d.content.css({height:"100%"}),d.timestamp=$('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(d.content),n=$('<table class="node-info"></table>').appendTo(d.content),d.table=$("<tbody>").appendTo(n),o=$('<div style="float: right"></div>').appendTo(d.header),$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(o).click(function(e){e.stopPropagation(),e.preventDefault(),f(d,"context/global","global")}),RED.actions.add("core:show-context-tab",h),RED.sidebar.addTab({id:"context",label:RED._("sidebar.context.label"),name:RED._("sidebar.context.name"),iconClass:"fa fa-database",content:i,toolbar:e,enableOnEdit:!1}),RED.events.on("view:selection-changed",function(e){p(e.nodes&&1===e.nodes.length&&e.nodes[0])}),RED.events.on("workspace:change",function(e){u(RED.nodes.workspace(e.workspace))}),f(d,"context/global","global")}}}(),RED.palette.editor=function(){var c,p,u,m,f,a,h=[],g=[],w={},b={},y={},t={},v="";function s(e,t){var n=Date.now()-e;n=n<300?300:0,setTimeout(function(){t()},n)}function D(e,t,o,i){o.show();var a=Date.now();$.ajax({url:"nodes/"+e,type:"PUT",data:JSON.stringify({enabled:t}),contentType:"application/json; charset=utf-8"}).done(function(e,t,n){s(a,function(){o.hide(),i()})}).fail(function(e,t,n){s(a,function(){o.hide(),i(e)})})}function E(e,t,o){var n={module:e};t&&(n.version=t),$.ajax({url:"nodes",type:"POST",data:JSON.stringify(n),contentType:"application/json; charset=utf-8"}).done(function(e,t,n){o()}).fail(function(e,t,n){o(e)})}function R(e){t.hasOwnProperty(e)||(t[e]=setTimeout(function(){delete t[e],n(e)},100))}function x(e){var t=/^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)[,)]/.exec(e);if(t){var n=parseInt(t[1]),o=parseInt(t[2]),i=parseInt(t[3]);if(160<(299*n+587*o+114*i)/1e3)return"rgb("+(n=Math.floor(.8*n))+","+(o=Math.floor(.8*o))+","+(i=Math.floor(.8*i))+")"}return e}function n(e){if(y.hasOwnProperty(e)){var t=y[e].info,n=y[e].elements;if(n){var o=0,i=0,a=0;for(var s in n.errorList.empty(),y[e].totalUseCount=0,y[e].setUseCount={},t.sets)if(t.sets.hasOwnProperty(s)){var r=0,d=t.sets[s],l=n.sets[s];d.err&&(a++,$("<li>").text(d.err).appendTo(n.errorList)),d.enabled&&(o+=d.types.length),i+=d.types.length;for(var c=0;c<t.sets[s].types.length;c++){var p=t.sets[s].types[c];r+=b[p]||0;var u=l.swatches[p];if(d.enabled){var f=RED.nodes.getType(p);f&&f.color?(u.css({background:RED.utils.getNodeColor(p,f)}),u.css({border:"1px solid "+x(u.css("backgroundColor"))})):u.css({background:"#eee",border:"1px dashed #999"})}else u.css({background:"#eee",border:"1px dashed #999"})}y[e].setUseCount[s]=r,y[e].totalUseCount+=r,0<r?(l.enableButton.text(RED._("palette.editor.inuse")),l.enableButton.addClass("disabled")):(l.enableButton.removeClass("disabled"),d.enabled?l.enableButton.text(RED._("palette.editor.disable")):l.enableButton.text(RED._("palette.editor.enable"))),l.setRow.toggleClass("palette-module-set-disabled",!d.enabled)}0===a?n.errorRow.hide():n.errorRow.show();var h=o===i?i:o+" / "+i;n.setCount.text(RED._("palette.editor.nodeCount",{count:i,label:h})),0<y[e].totalUseCount?(n.enableButton.text(RED._("palette.editor.inuse")),n.enableButton.addClass("disabled"),n.removeButton.hide()):(n.enableButton.removeClass("disabled"),t.local&&n.removeButton.css("display","inline-block"),0===o?n.enableButton.text(RED._("palette.editor.enableall")):n.enableButton.text(RED._("palette.editor.disableall")),n.container.toggleClass("disabled",0===o))}t.pending_version?(n.versionSpan.html(t.version+' <i class="fa fa-long-arrow-right"></i> '+t.pending_version).appendTo(n.metaRow),n.updateButton.text(RED._("palette.editor.updated")).addClass("disabled").show()):w.hasOwnProperty(e)&&1===function(e,t){for(var n=e.split(".").map(function(e){return parseInt(e)}),o=t.split(".").map(function(e){return parseInt(e)}),i=0;i<3;i++){var a=n[i]-o[i];if(a<0)return-1;if(0<a)return 1}return 0}(w[e].version,t.version)?(n.updateButton.show(),n.updateButton.text(RED._("palette.editor.update",{version:w[e].version}))):n.updateButton.hide()}else{y[e]={info:RED.nodes.registry.getModule(e)};var g=[e];for(var v in y[e].info.sets)y[e].info.sets.hasOwnProperty(v)&&(g.push(v),g=g.concat(y[e].info.sets[v].types));y[e].index=g.join(",").toLowerCase(),m.editableList("addItem",y[e])}}var r,T,d=[],l=!1,_=C;function i(e,t,n,o){if(d.push(e||o),e?l=!0:(o.modules&&(o.modules.forEach(function(e){(w[e.id]=e).index=[e.id],e.keywords&&(e.index=e.index.concat(e.keywords)),e.updated_at?e.timestamp=new Date(e.updated_at).getTime():e.timestamp=0,e.index=e.index.join(",").toLowerCase()}),h=h.concat(o.modules)),u.searchBox("count",h.length)),1<a&&$(".palette-module-shade-status").html(RED._("palette.editor.loading")+"<br>"+d.length+"/"+a),d.length===a){l&&RED.notify(RED._("palette.editor.errors.catalogLoadFailed",{url:t}),"error",!1,8e3);var i=250-(Date.now()-r);setTimeout(function(){$("#palette-module-install-shade").hide()},Math.max(i,0))}}function k(){if(0===h.length){h=[],w={},f.editableList("empty"),$(".palette-module-shade-status").text(RED._("palette.editor.loading"));var e=RED.settings.theme("palette.catalogues")||["https://catalogue.nodered.org/catalogue.json"];l=!(d=[]),a=e.length,1<e.length&&$(".palette-module-shade-status").html(RED._("palette.editor.loading")+"<br>0/"+e.length),$("#palette-module-install-shade").show(),r=Date.now();var t=0;e.forEach(function(o,e){$.getJSON(o,{_:(new Date).getTime()},function(e){i(null,o,0,e),function(){for(var e in y)y.hasOwnProperty(e)&&n(e)}()}).fail(function(e,t,n){i(e,o)}).always(function(){++t===a&&u.searchBox("change")})})}}function j(){if(f.editableList("empty"),""!==u.searchBox("value").trim()){g.sort(_);for(var e=0;e<Math.min(10,g.length);e++)f.editableList("addItem",g[e]);0===g.length&&f.editableList("addItem",{}),10<g.length&&f.editableList("addItem",{start:10,more:g.length-10})}else f.editableList("addItem",{count:h.length})}function C(e,t){return e.info.id.localeCompare(t.info.id)}function S(e,t){return-1*(e.info.timestamp-t.info.timestamp)}function e(){return k(),c.activateTab("nodes"),T}function O(n,e,o){if(!1!==RED.settings.theme("palette.editable")){var t=[{text:RED._("common.label.cancel"),click:function(){i.close()}}];n.url&&t.push({text:RED._("palette.editor.confirm.button.review"),class:"primary palette-module-install-confirm-button-install",click:function(){var e=n.url||"";window.open(e)}}),t.push({text:RED._("palette.editor.confirm.button.install"),class:"primary palette-module-install-confirm-button-install",click:function(){var t=RED.utils.addSpinnerOverlay(e,!0);E(n.id,n.version,function(e){t.remove(),e&&e.responseJSON&&RED.notify(RED._("palette.editor.errors.installFailed",{module:n.id,message:e.responseJSON.message})),o(e)}),i.close()}});var i=RED.notify(RED._("palette.editor.confirm.install.body",{module:n.id}),{modal:!0,fixed:!0,buttons:t})}else o(new Error("Palette not editable"))}return{init:function(){!1!==RED.settings.theme("palette.editable")&&(function(){T=$('<div id="user-settings-tab-palette"></div>');var t=$('<div id="palette-editor"><ul id="palette-editor-tabs"></ul></div>').appendTo(T);c=RED.tabs.create({element:T.find("#palette-editor-tabs"),onchange:function(e){t.find(".palette-editor-tab").hide(),e.content.show(),p&&p.searchBox("value",""),u&&u.searchBox("value",""),"install"===e.id?u&&u.focus():p&&p.focus()},minimumActiveTabWidth:110});var e=$("<div>",{class:"palette-editor-tab"}).appendTo(t);c.addTab({id:"nodes",label:RED._("palette.editor.tab-nodes"),content:e});var n=$("<div>",{class:"palette-search"}).appendTo(e);p=$('<input type="text" data-i18n="[placeholder]palette.filter"></input>').appendTo(n).searchBox({delay:200,change:function(){!function(e){v=e.toLowerCase();var t=m.editableList("filter"),n=m.editableList("length");""===e?p.searchBox("count"):p.searchBox("count",t+" / "+n)}($(this).val())}}),m=$("<ol>",{id:"palette-module-list",style:"position: absolute;top: 35px;bottom: 0;left: 0;right: 0px;"}).appendTo(e).editableList({addButton:!1,scrollOnAdd:!1,sort:function(e,t){return e.info.name.localeCompare(t.info.name)},filter:function(e){return""===v||""===v||-1<e.index.indexOf(v)},addItem:function(t,e,s){var r=s.info;if(r){var n=$("<div>",{class:"palette-module-header"}).appendTo(t),o=$('<div class="palette-module-meta palette-module-name"><i class="fa fa-cube"></i></div>').appendTo(n);$("<span>").text(r.name).appendTo(o);var i=$('<div class="palette-module-meta palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(n),a=$("<span>").text(r.version).appendTo(i),d=$('<div class="palette-module-meta palette-module-errors"><i class="fa fa-warning"></i></div>').hide().appendTo(n),l=$('<ul class="palette-module-error-list"></ul>').appendTo(d),c=$("<div>",{class:"palette-module-meta"}).appendTo(n),p=$('<a href="#" class="editor-button editor-button-small palette-module-set-button"><i class="fa fa-angle-right palette-module-node-chevron"></i> </a>').appendTo(c),u=$("<span>").appendTo(p),f=$("<div>",{class:"palette-module-button-group"}).appendTo(c),h=$('<a href="#" class="editor-button editor-button-small"></a>').text(RED._("palette.editor.update")).appendTo(f);h.attr("id","up_"+Math.floor(1e9*Math.random())),h.click(function(e){e.preventDefault(),$(this).hasClass("disabled")||function(n,e,o,i){if(!1===RED.settings.theme("palette.editable"))return i(new Error("Palette not editable"));var a=RED.notify(RED._("palette.editor.confirm.update.body",{module:n.name}),{modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){a.close()}},{text:RED._("palette.editor.confirm.button.update"),class:"primary palette-module-install-confirm-button-update",click:function(){var t=RED.utils.addSpinnerOverlay(o,!0);E(n.name,e,function(e){t.remove(),e&&e.responseJSON&&RED.notify(RED._("palette.editor.errors.updateFailed",{module:n.name,message:e.responseJSON.message})),i(e)}),a.close()}}]})}(r,w[r.name].version,t,function(e){})});var g=$('<a href="#" class="editor-button editor-button-small"></a>').text(RED._("palette.editor.remove")).appendTo(f);g.attr("id","up_"+Math.floor(1e9*Math.random())),g.click(function(e){e.preventDefault(),function(n,i,e){if(!1===RED.settings.theme("palette.editable"))return e(new Error("Palette not editable"));var a=RED.notify(RED._("palette.editor.confirm.remove.body",{module:n.name}),{modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){a.close()}},{text:RED._("palette.editor.confirm.button.remove"),class:"primary palette-module-install-confirm-button-remove",click:function(){var e,o,t=RED.utils.addSpinnerOverlay(i,!0);e=n.name,o=function(e){t.remove(),e&&e.responseJSON&&RED.notify(RED._("palette.editor.errors.removeFailed",{module:n.name,message:e.responseJSON.message}))},$.ajax({url:"nodes/"+e,type:"DELETE"}).done(function(e,t,n){o()}).fail(function(e,t,n){o(e)}),a.close()}}]})}(r,t,function(e){})}),r.local||g.hide();var v=$('<a href="#" class="editor-button editor-button-small"></a>').text(RED._("palette.editor.disableall")).appendTo(f),m=$("<div>",{class:"palette-module-content"}).appendTo(t),b=$('<div class="palette-module-shade hide"><img src="red/images/spin.svg" class="palette-spinner"/></div>').appendTo(t);s.elements={updateButton:h,removeButton:g,enableButton:v,errorRow:d,errorList:l,setCount:u,container:t,shade:b,versionSpan:a,sets:{}},p.click(function(e){e.preventDefault(),t.hasClass("expanded")?(t.removeClass("expanded"),m.slideUp()):(t.addClass("expanded"),m.slideDown())});var y=Object.keys(r.sets);y.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),y.forEach(function(o){var i=r.sets[o],n=$("<div>",{class:"palette-module-set"}).appendTo(m),e=$("<div>",{class:"palette-module-set-button-group"}).appendTo(n),a={};i.types.forEach(function(e){var t=$("<div>",{class:"palette-module-type"}).appendTo(n);a[e]=$("<span>",{class:"palette-module-type-swatch"}).appendTo(t),$("<span>",{class:"palette-module-type-node"}).text(e).appendTo(t)});var t=$('<a href="#" class="editor-button editor-button-small"></a>').appendTo(e);t.click(function(e){if(e.preventDefault(),0===s.setUseCount[o]){var t=RED.nodes.registry.getNodeSet(i.id);b.show();var n=!t.enabled;D(i.id,n,b,function(e){e&&e.responseJSON&&RED.notify(RED._("palette.editor.errors."+(n?"enable":"disable")+"Failed",{module:id,message:e.responseJSON.message}))})}}),s.elements.sets[i.name]={setRow:n,enableButton:t,swatches:a}}),v.click(function(e){e.preventDefault(),0===s.totalUseCount&&D(r.name,t.hasClass("disabled"),b,function(e){e&&e.responseJSON&&RED.notify(RED._("palette.editor.errors.installFailed",{module:id,message:e.responseJSON.message}))})}),R(r.name)}else $("<div>",{class:"red-ui-search-empty"}).text(RED._("search.empty")).appendTo(t)}});var o=$("<div>",{class:"palette-editor-tab hide"}).appendTo(t);c.addTab({id:"install",label:RED._("palette.editor.tab-install"),content:o});var i=$("<div>",{class:"palette-editor-toolbar"}).appendTo(o),a=$("<div>",{class:"palette-search"}).appendTo(o);u=$('<input type="text" data-i18n="[placeholder]palette.search"></input>').appendTo(a).searchBox({delay:300,change:function(){var t=$(this).val().trim().toLowerCase();0<t.length?(g=h.filter(function(e){return-1<e.index.indexOf(t)}).map(function(e){return{info:e}}),j(),u.searchBox("count",g.length+" / "+h.length)):(u.searchBox("count",h.length),f.editableList("empty"),f.editableList("addItem",{count:h.length}))}}),$("<span>").text(RED._("palette.editor.sort")+" ").appendTo(i);var s=$('<span class="button-group"></span>').appendTo(i),r=$('<a href="#" class="sidebar-header-button-toggle selected" data-i18n="palette.editor.sortAZ"></a>').appendTo(s),d=$('<a href="#" class="sidebar-header-button-toggle" data-i18n="palette.editor.sortRecent"></a>').appendTo(s);r.click(function(e){e.preventDefault(),$(this).hasClass("selected")||($(this).addClass("selected"),d.removeClass("selected"),_=C,j())}),d.click(function(e){e.preventDefault(),$(this).hasClass("selected")||($(this).addClass("selected"),r.removeClass("selected"),_=S,j())});var l=$("<span>").appendTo(i);$('<a href="#" class="sidebar-header-button"><i class="fa fa-refresh"></i></a>').appendTo(l).click(function(e){e.preventDefault(),h=[],w={},k()}),f=$("<ol>",{style:"position: absolute;top: 78px;bottom: 0;left: 0;right: 0px;"}).appendTo(o).editableList({addButton:!1,scrollOnAdd:!1,addItem:function(t,e,n){if(n.count)$("<div>",{class:"red-ui-search-empty"}).text(RED._("palette.editor.moduleCount",{count:n.count})).appendTo(t);else if(n.more){t.addClass("palette-module-more");var o=$("<div>",{class:"palette-module-header palette-module"}).appendTo(t),i=$('<a href="#"></a>').text(RED._("palette.editor.more",{count:n.more})).appendTo(o);i.click(function(e){e.preventDefault(),f.editableList("removeItem",n);for(var t=n.start;t<Math.min(n.start+10,n.start+n.more);t++)f.editableList("addItem",g[t]);10<n.more&&f.editableList("addItem",{start:n.start+10,more:n.more-10})})}else if(n.info){var a=n.info,s=$("<div>",{class:"palette-module-header"}).appendTo(t),r=$('<div class="palette-module-meta"><i class="fa fa-cube"></i></div>').appendTo(s);$("<span>",{class:"palette-module-name"}).text(a.name||a.id).appendTo(r),$('<a target="_blank" class="palette-module-link"><i class="fa fa-external-link"></i></a>').attr("href",a.url).appendTo(r);var d=$('<div class="palette-module-meta"></div>').appendTo(s);$("<div>",{class:"palette-module-description"}).text(a.description).appendTo(d);var l=$('<div class="palette-module-meta"></div>').appendTo(s);$('<span class="palette-module-version"><i class="fa fa-tag"></i> '+a.version+"</span>").appendTo(l),$('<span class="palette-module-updated"><i class="fa fa-calendar"></i> '+function(e){new Date,new Date(e);var t=(Date.now()-new Date(e).getTime())/1e3;if(t<60)return RED._("palette.editor.times.seconds");if((t=Math.floor(t/60))<10)return RED._("palette.editor.times.minutes");if(t<60)return RED._("palette.editor.times.minutesV",{count:t});if((t=Math.floor(t/60))<24)return RED._("palette.editor.times.hoursV",{count:t});if((t=Math.floor(t/24))<7)return RED._("palette.editor.times.daysV",{count:t});var n=Math.floor(t/7);if(n<4)return RED._("palette.editor.times.weeksV",{count:n});var o=Math.floor(n/4);if(n%=4,o<12)return RED._("palette.editor.times.monthsV",{count:o});var i=Math.floor(o/12);return 0==(o%=12)?RED._("palette.editor.times.yearsV",{count:i}):RED._("palette.editor.times.year"+(1<i?"s":"")+"MonthsV",{y:i,count:o})}(a.updated_at)+"</span>").appendTo(l);var c=$("<div>",{class:"palette-module-meta"}).appendTo(s),p=$("<div>",{class:"palette-module-button-group"}).appendTo(c),u=$('<a href="#" class="editor-button editor-button-small"></a>').text(RED._("palette.editor.install")).appendTo(p);u.click(function(e){e.preventDefault(),$(this).hasClass("disabled")||O(a,t,function(e){})}),y.hasOwnProperty(a.id)&&(u.addClass("disabled"),u.text(RED._("palette.editor.installed"))),n.elements={installButton:u}}else $("<div>",{class:"red-ui-search-empty"}).text(RED._("search.empty")).appendTo(t)}}),$('<div id="palette-module-install-shade" class="palette-module-shade hide"><div class="palette-module-shade-status"></div><img src="red/images/spin.svg" class="palette-spinner"/></div>').appendTo(o)}(),RED.userSettings.add({id:"palette",title:RED._("palette.editor.palette"),get:e,close:function(){T.detach()},focus:function(){c.resize(),setTimeout(function(){p.focus()},200)}}),RED.actions.add("core:manage-palette",function(){RED.userSettings.show("palette")}),RED.events.on("registry:module-updated",function(e){R(e.module)}),RED.events.on("registry:node-set-enabled",function(e){R(e.module)}),RED.events.on("registry:node-set-disabled",function(e){R(e.module)}),RED.events.on("registry:node-type-added",function(e){/^subflow:/.test(e)||R(RED.nodes.registry.getNodeSetForType(e).module)}),RED.events.on("registry:node-type-removed",function(e){/^subflow:/.test(e)||R(RED.nodes.registry.getNodeSetForType(e).module)}),RED.events.on("registry:node-set-added",function(e){R(e.module);for(var t=0;t<g.length;t++)if(g[t].info.id===e.module){var n=g[t].elements.installButton;n.addClass("disabled"),n.text(RED._("palette.editor.installed"));break}}),RED.events.on("registry:node-set-removed",function(e){if(!RED.nodes.registry.getModule(e.module)){var t=y[e.module];if(t){m.editableList("removeItem",t),delete y[e.module];for(var n=0;n<g.length;n++)if(g[n].info.id===e.module){var o=g[n].elements.installButton;o.removeClass("disabled"),o.text(RED._("palette.editor.install"));break}}}}),RED.events.on("nodes:add",function(e){/^subflow:/.test(e.type)||(b[e.type]=(b[e.type]||0)+1,1===b[e.type]&&R(RED.nodes.registry.getNodeSetForType(e.type).module))}),RED.events.on("nodes:remove",function(e){b.hasOwnProperty(e.type)&&(b[e.type]--,0===b[e.type]&&(delete b[e.type],R(RED.nodes.registry.getNodeSetForType(e.type).module)))}))},install:O}}(),RED.editor=function(){var r=[],n={};function T(e){var t,n,o,i=e.valid,a=e.changed;if(e.valid=!0,0===e.type.indexOf("subflow:"))n=(t=RED.nodes.subflow(e.type.substring(8))).valid,o=t.changed,void 0===n&&(n=T(t),o=t.changed),e.valid=n&&c(e,e._def.defaults,e),e.changed=e.changed||o;else if(e._def)e.valid=c(e,e._def.defaults,e),e._def._creds&&(e.valid=e.valid&&c(e,e._def.credentials,e._def._creds));else if("subflow"==e.type){for(var s=RED.nodes.filterNodes({z:e.id}),r=0;r<s.length;r++)n=s[r].valid,o=s[r].changed,void 0===n&&(n=T(s[r]),o=s[r].changed),e.valid=e.valid&&n,e.changed=e.changed||o;var d=RED.nodes.filterNodes({type:"subflow:"+e.id}),l={};for(r=0;r<d.length;r++)d[r].valid=e.valid,d[r].changed=d[r].changed||e.changed,d[r].dirty=!0,l[d[r].z]=!0;Object.keys(l).forEach(function(e){var t=RED.nodes.subflow(e);t&&T(t)})}return i===e.valid&&a===e.changed||(e.dirty=!0,(t=RED.nodes.subflow(e.z))&&T(t)),e.valid}function c(e,t,n){var o=!0;for(var i in t)t.hasOwnProperty(i)&&(s(e,t,i,n[i])||(o=!1));return o}function s(t,e,n,o){var i=!0;if(/^\$\([a-zA-Z_][a-zA-Z0-9_]*\)$/.test(o))return!0;if("required"in e[n]&&e[n].required&&(i=""!==o),i&&"validate"in e[n])try{i=e[n].validate.call(t,o)}catch(e){console.log("Validation error:",t.type,t.id,"property: "+n,"value:",o,e)}if(i&&e[n].type&&RED.nodes.getType(e[n].type)&&!("validate"in e[n]))if(o&&"_ADD_"!=o){var a=RED.nodes.node(o);i=null!==a&&(null==a.valid||a.valid)}else i=e[n].hasOwnProperty("required")&&!e[n].required;return i}function l(e,t){for(var n in e._def.defaults)e._def.defaults.hasOwnProperty(n)&&o(e,e._def.defaults,n,t);if(e._def.credentials)for(n in e._def.credentials)e._def.credentials.hasOwnProperty(n)&&o(e,e._def.credentials,n,t)}function o(e,t,n,o){var i=$("#"+o+"-"+n);if(0<i.length){var a=i.val();t[n].hasOwnProperty("format")&&""!==t[n].format&&"DIV"===i[0].nodeName&&(a=i.text()),s(e,t,n,a)?i.removeClass("input-error"):i.addClass("input-error")}}function _(t,n){t.resize=!0,t.dirty=!0;var o=[];if(t.ports)if(n&&RED.nodes.eachLink(function(e){e.source===t&&n.hasOwnProperty(e.sourcePort)&&("-1"===n[e.sourcePort]?o.push(e):e.sourcePort=n[e.sourcePort])}),t.outputs<t.ports.length){for(;t.outputs<t.ports.length;)t.ports.pop();RED.nodes.eachLink(function(e){e.source===t&&e.sourcePort>=t.outputs&&-1===o.indexOf(e)&&o.push(e)})}else if(t.outputs>t.ports.length)for(;t.outputs>t.ports.length;)t.ports.push(t.ports.length);0===t.inputs&&o.concat(RED.nodes.filterLinks({target:t}));for(var e=0;e<o.length;e++)RED.nodes.removeLink(o[e]);return o}function p(e,t,n,o){var i=$("#"+o+"-"+t);if(0!==i.length){var a,s=i.width(),r=i.attr("style");s=null!==(a=/width\s*:\s*(\d+(%|[a-z]+))/i.exec(r))?a[1]:"70%";var d=$("<div></div>").css({display:"inline-block",position:"relative"}),l=$("<div></div>").css({position:"absolute",left:0,right:"40px"}).appendTo(d),c=$('<select id="'+o+"-"+t+'"></select>').appendTo(l);d.width(s).height(i.height()),0===d.width()&&d.width("70%"),i.replaceWith(d),c.attr("style","width:100%"),R(t,n,e[t],o),$('<a id="'+o+"-lookup-"+t+'" class="editor-button"><i class="fa fa-pencil"></i></a>').css({position:"absolute",right:0,top:0}).appendTo(d),$("#"+o+"-lookup-"+t).click(function(e){m(t,n,c.find(":selected").val(),o),e.preventDefault()});var p="",u=RED.nodes.node(e[t]);RED.nodes.getType(n);u&&(p=RED.utils.getNodeLabel(u,u.id)),i.val(p)}}function u(e,t,n,o){var i=$("#"+o+"-"+t);i.val(e[t]),i.attr("type","hidden");var a=$("<a>",{id:o+"-edit-"+t,class:"editor-button"});i.after(a),e[t]?a.text(RED._("editor.configEdit")):a.text(RED._("editor.configAdd")),a.click(function(e){m(t,n,i.val()||"_ADD_",o),e.preventDefault()})}function f(e,t,n,o){var i=$("#"+n+"-"+t);if(0!==i.length)if("checkbox"===i.attr("type"))i.prop("checked",e[t]);else{var a=e[t];null==a&&(a=""),void 0!==o&&o[t].hasOwnProperty("format")&&""!==o[t].format&&"DIV"===i[0].nodeName?(i.html(RED.text.format.getHtml(a,o[t].format,{},!1,"en")),RED.text.format.attach(i[0],o[t].format,{},!1,"en")):(i.val(a),"INPUT"!==i[0].nodeName&&"TEXTAREA"!==i[0].nodeName||RED.text.bidi.prepareInput(i))}}function h(n,e,t,o){var i=$("#"+o+"-"+t);void 0!==e&&"format"in e[t]&&""!==e[t].format&&"DIV"===i[0].nodeName?$("#"+o+"-"+t).on("change keyup",function(e,t){t||l(n,o)}):$("#"+o+"-"+t).change(function(e,t){t||l(n,o)})}function g(e,t,n,o){var i;for(i in t)t.hasOwnProperty(i)&&("password"==t[i].type?n[i]?$("#"+o+"-"+i).val(n[i]):n["has_"+i]?$("#"+o+"-"+i).val("__PWRD__"):$("#"+o+"-"+i).val(""):f(n,i,o,t),h(e,t,i,o))}function k(e,t,n){var o=!1;for(var i in e.credentials||(e.credentials={_:{}}),t)if(t.hasOwnProperty(i)){var a=$("#"+n+"-"+i).val();if("password"==t[i].type){if(e.credentials["has_"+i]=""!==a,"__PWRD__"==a)continue;o=!0}(e.credentials[i]=a)!=e.credentials._[i]&&(o=!0)}return o}function b(t,n,o,i){for(var e in n.defaults)if(n.defaults.hasOwnProperty(e)){if(n.defaults[e].type){var a=RED.nodes.getType(n.defaults[e].type);a?a.exclusive?u(t,e,n.defaults[e].type,o):p(t,e,n.defaults[e].type,o):(console.log("Unknown type:",n.defaults[e].type),f(t,e,o,n.defaults))}else f(t,e,o,n.defaults);h(t,n.defaults,e,o)}var s,r,d=function(){if(n.oneditprepare)try{n.oneditprepare.call(t)}catch(e){console.log("oneditprepare",t.id,t.type,e.toString())}for(var e in n.defaults)n.defaults.hasOwnProperty(e)&&$("#"+o+"-"+e).trigger("change",[!0]);if(n.credentials)for(e in n.credentials)n.credentials.hasOwnProperty(e)&&$("#"+o+"-"+e).trigger("change",[!0]);l(t,o),i&&i()};n.credentials?t.credentials?(g(t,n.credentials,t.credentials,o),d()):$.getJSON((s=t.type,r=t.id,"credentials/"+s.replace(/\s+/g,"-")+"/"+r),function(e){t.credentials=e,t.credentials._=$.extend(!0,{},e),g(t,n.credentials,t.credentials,o),d()}):d()}function y(){for(var e,t=r.length-1;t<r.length;t++){var n=r[t];if(e=n.type,"_expression"===n.type)e=RED._("expressionEditor.title");else if("_js"===n.type)e=RED._("jsEditor.title");else if("_json"===n.type)e=RED._("jsonEditor.title");else if("_markdown"===n.type)e=RED._("markdownEditor.title");else if("_buffer"===n.type)e=RED._("bufferEditor.title");else if("subflow"===n.type)e=RED._("subflow.editSubflow",{name:n.name});else if(0===n.type.indexOf("subflow:")){var o=RED.nodes.subflow(n.type.substring(8));e=RED._("subflow.editSubflow",{name:o.name})}else{if(void 0!==n._def.paletteLabel)try{e=("function"==typeof n._def.paletteLabel?n._def.paletteLabel.call(n._def):n._def.paletteLabel)||""}catch(e){console.log("Definition error: "+n.type+".paletteLabel",e)}t===r.length-1&&(e=RED.nodes.node(n.id)?RED._("editor.editNode",{type:e}):RED._("editor.addNewConfig",{type:e}))}"<li>"+e+"</li>"}return"</ul>",e}function w(e,t,n,a){var o=$('<form id="'+t+'" class="form-horizontal" autocomplete="off"></form>').appendTo(e);return o.html($("script[data-template-name='"+n+"']").html()),a=a||"node-red",o.find("[data-i18n]").each(function(){for(var e=$(this).attr("data-i18n").split(";"),t=0;t<e.length;t++){var n=e[t];if(-1===n.indexOf(":")){var o="";if(0===n.indexOf("[")){var i=n.split("]");o=i[0]+"]",n=i[1]}e[t]=o+a+":"+n}}$(this).attr("data-i18n",e.join(";"))}),$('<input type="password" style="display: none;" />').prependTo(o),$('<input type="text" style="display: none;" />').prependTo(o),o.submit(function(e){e.preventDefault()}),o}function D(e,t,n,o){var i=$("<div>",{class:"node-label-form-row"});if(void 0===e)$("<span>").text(RED._("editor.noDefaultLabel")).appendTo(i),i.addClass("node-label-form-none");else{i.addClass("");var a="node-label-form-"+e+"-"+t;$("<label>",{for:a}).text(t+1+".").appendTo(i);var s=$("<input>",{type:"text",id:a,placeholder:o}).val(n).appendTo(i);$('<button class="editor-button editor-button-small"><i class="fa fa-times"></i></button>').appendTo(i).click(function(e){e.preventDefault(),s.val("")})}return i}function v(e,o){var t=$('<form class="dialog-form form-horizontal" autocomplete="off"></form>').appendTo(e),n=o.inputs||o._def.inputs||0,i=o.outputs||o._def.outputs||0;"subflow"===o.type&&(n=o.in.length,i=o.out.length);var a,s=o.inputLabels||[],r=o.outputLabels||[],d=o._def.inputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"),l=o._def.outputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel");$('<div class="form-row"><span data-i18n="editor.labelInputs"></span><div id="node-label-form-inputs"></div></div>').appendTo(t);var c=$("#node-label-form-inputs");if(0<n)for(a=0;a<n;a++)D("input",a,s[a],d).appendTo(c);else D().appendTo(c);$('<div class="form-row"><span data-i18n="editor.labelOutputs"></span><div id="node-label-form-outputs"></div></div>').appendTo(t);var p=$("#node-label-form-outputs");if(0<i)for(a=0;a<i;a++)D("output",a,r[a],l).appendTo(p);else D().appendTo(p);if(!o._def.defaults||!o._def.defaults.hasOwnProperty("icon")){$("<hr>").appendTo(t);var u=$('<div class="form-row"></div>').appendTo(t);$('<label style="width: 50px" data-i18n="editor.settingIcon">').appendTo(u);var f=$('<button class="editor-button">').appendTo(u),h=$("<div>",{class:"red-ui-search-result-node"}).appendTo(f),g=RED.utils.getNodeColor(o.type,o._def),v=RED.utils.getNodeIcon(o._def,o);h.css("backgroundColor",g);var m=$("<div/>",{class:"palette_icon_container"}).appendTo(h),b=$("<div/>",{class:"palette_icon",style:"background-image: url("+v+")"}).appendTo(m);f.click(function(e){var t;e.preventDefault();var n=$("#node-settings-icon").text()||"";t=n?RED.utils.separateIconPath(n):RED.utils.getDefaultNodeIcon(o._def,o),function(e,r,d,l){var t=e.offset(),n=$("<div>").css({position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:20}).appendTo("body"),o=t.top-30;o+280>$(window).height()&&(o=$(window).height()-280);var i=$('<div class="red-ui-icon-picker">').css({top:o+"px",left:t.left+"px"}).appendTo("body"),c=function(){n.remove(),i.remove(),RED.keyboard.remove("escape")};RED.keyboard.add("*","escape",function(){c()}),n.on("mousedown",c);var a=$("<div>",{class:"red-ui-search-container"}).appendTo(i);searchInput=$('<input type="text">').attr("placeholder",RED._("editor.searchIcons")).appendTo(a).searchBox({delay:50,change:function(){var n=$(this).val().trim();""===n?(p.find(".red-ui-icon-list-module").show(),p.find(".red-ui-icon-list-icon").show()):(p.find(".red-ui-icon-list-module").hide(),p.find(".red-ui-icon-list-icon").each(function(e,t){-1===$(t).data("icon").indexOf(n)?$(t).hide():$(t).show()}))}}),$("<div>").appendTo(i);var p=$('<div class="red-ui-icon-list">').appendTo(i),s=$('<div class="red-ui-icon-meta"></div>').appendTo(i),u=$("<span>").appendTo(s),f=($('<button class="editor-button editor-button-small">'+RED._("editor.useDefault")+"</button>").appendTo(s).click(function(e){e.preventDefault(),c(),l(null)}),RED.nodes.getIconSets());Object.keys(f).forEach(function(s){var e=f[s];if(0<e.length){var t=$('<div class="red-ui-icon-list-module"></div>').text(s).appendTo(p);$('<i class="fa fa-cube"></i>').prependTo(t),e.forEach(function(e){var t=$("<div>",{class:"red-ui-icon-list-icon"}).appendTo(p),n=$("<div>",{class:"red-ui-search-result-node"}).appendTo(t),o=RED.utils.getNodeColor(r.type,r._def),i="icons/"+s+"/"+e;t.data("icon",i),n.css("backgroundColor",o);var a=$("<div/>",{class:"palette_icon_container"}).appendTo(n);$("<div/>",{class:"palette_icon",style:"background-image: url("+i+")"}).appendTo(a),d.module===s&&d.file===e&&t.addClass("selected"),t.on("mouseover",function(){u.text(e)}),t.on("mouseout",function(){u.html("&nbsp;")}),t.click(function(){c(),l(s+"/"+e)})})}}),i.slideDown(100),searchInput.focus()}(u,o,t,function(e){$("#node-settings-icon").text(e||"");var t=RED.utils.getNodeIcon(o._def,{type:o.type,icon:e});b.css("backgroundImage","url("+t+")")})}),$('<div class="uneditable-input" id="node-settings-icon">').text(o.icon).appendTo(u)}}function j(e,t,n){var o=$("#node-label-form-inputs").children().find("input"),i=$("#node-label-form-outputs").children().find("input"),a=!1,s=!1,r=o.map(function(){var e=$(this).val();return a=a||""!==e,e}).toArray().slice(0,e.inputs);return(void 0===e.inputLabels&&a||void 0!==e.inputLabels&&JSON.stringify(r)!==JSON.stringify(e.inputLabels))&&(t.inputLabels=e.inputLabels,e.inputLabels=r,s=!0),a=!1,r=new Array(e.outputs),i.each(function(){var e=$(this).attr("id").substring(23);if(!n||!n.hasOwnProperty(e)||-1!==(e=parseInt(n[e]))){var t=$(this).val();a=a||""!==t,r[e]=t}}),(void 0===e.outputLabels&&a||void 0!==e.outputLabels&&JSON.stringify(r)!==JSON.stringify(e.outputLabels))&&(t.outputLabels=e.outputLabels,e.outputLabels=r,s=!0),s}function m(f,h,e,g){var n,v="_ADD_"==e,s=RED.nodes.getType(h),m=RED.nodes.node(e);n="node-red"===s.set.module?"node-red":s.set.id;var t="",o=RED.nodes.subflow(RED.workspaces.active());if(o&&(t=o.id),null==m){for(var i in m={id:RED.nodes.id(),_def:s,type:h,z:t,users:[]},s.defaults)s.defaults[i].value&&(m[i]=JSON.parse(JSON.stringify(s.defaults[i].value)));m._=s._}r.push(m),RED.view.state(RED.state.EDITING);var a={title:y(),resize:function(){if(m&&m._def.oneditresize){var e=$("#node-config-dialog-edit-form");try{m._def.oneditresize.call(m,{width:e.width(),height:e.height()})}catch(e){console.log("oneditresize",m.id,m.type,e.toString())}}},open:function(e,i){e.find(".editor-tray-header");var t=e.find(".editor-tray-footer");!1!==s.hasUsers&&t.prepend('<div id="node-config-dialog-user-count"><i class="fa fa-info-circle"></i> <span></span></div>'),t.append('<span id="node-config-dialog-scope-container"><span id="node-config-dialog-scope-warning" data-i18n="[title]editor.errors.scopeChange"><i class="fa fa-warning"></i></span><select id="node-config-dialog-scope"></select></span>');var a=w(e.find(".editor-tray-body"),"node-config-dialog-edit-form",h,n);b(m,s,"node-config-input",function(){m._def.exclusive?$("#node-config-dialog-scope").hide():$("#node-config-dialog-scope").show(),$("#node-config-dialog-scope-warning").hide();var n={};m.users.forEach(function(e){n[e.z]=!0});var t=Object.keys(n).length,o=$("#node-config-dialog-scope").empty();o.off("change"),o.append('<option value=""'+(m.z?"":" selected")+' data-i18n="sidebar.config.global"></option>'),o.append('<option disabled data-i18n="sidebar.config.flows"></option>'),RED.nodes.eachWorkspace(function(e){var t=e.label;n[e.id]&&(t="* "+t),o.append('<option value="'+e.id+'"'+(e.id==m.z?" selected":"")+">"+t+"</option>")}),o.append('<option disabled data-i18n="sidebar.config.subflows"></option>'),RED.nodes.eachSubflow(function(e){var t=e.name;n[e.id]&&(t="* "+t),o.append('<option value="'+e.id+'"'+(e.id==m.z?" selected":"")+">"+t+"</option>")}),0<t&&o.on("change",function(){var e=$(this).val();""===e?$("#node-config-dialog-scope-warning").hide():!n[e]||1<t?$("#node-config-dialog-scope-warning").show():$("#node-config-dialog-scope-warning").hide()}),o.i18n(),a.i18n(),!1!==s.hasUsers&&$("#node-config-dialog-user-count").find("span").text(RED._("editor.nodesUse",{count:m.users.length})).parent().show(),i()})},close:function(){RED.workspaces.refresh(),r.pop()},show:function(){m&&RED.sidebar.info.refresh(m)}};a.buttons=[{id:"node-config-dialog-cancel",text:RED._("common.label.cancel"),click:function(){var t=h,n=m.id,e=RED.nodes.getType(t);if(e.oneditcancel&&e.oneditcancel){var o=RED.nodes.node(n);if(o)try{e.oneditcancel.call(o,!1)}catch(e){console.log("oneditcancel",o.id,o.type,e.toString())}else try{e.oneditcancel.call({id:n},!0)}catch(e){console.log("oneditcancel",n,t,e.toString())}}RED.tray.close()}},{id:"node-config-dialog-ok",text:v?RED._("editor.configAdd"):RED._("editor.configUpdate"),class:"primary",click:function(){var e,t,n=f,o=(m.id,h),i=v,a=RED.nodes.getType(o),s=$("#node-config-dialog-scope").val();if(a.oneditsave)try{a.oneditsave.call(m)}catch(e){console.log("oneditsave",m.id,m.type,e.toString())}for(e in a.defaults){var r;if(a.defaults.hasOwnProperty(e))if(null!=(r="checkbox"===(t=$("#node-config-input-"+e)).attr("type")?t.prop("checked"):"format"in a.defaults[e]&&""!==a.defaults[e].format&&"DIV"===t[0].nodeName?t.text():t.val())&&r!==m[e]){if(m._def.defaults[e].type){"_ADD_"==r&&(r="");var d=RED.nodes.node(m[e]);if(d){var l=d.users;l.splice(l.indexOf(m),1)}(d=RED.nodes.node(r))&&d.users.push(m)}m[e]=r}}m.label=a.label,(m.z=s)&&(m.users=m.users.filter(function(e){var t=!0;for(var n in e._def.defaults)e._def.defaults.hasOwnProperty(n)&&e._def.defaults[n].type===m.type&&e[n]===m.id&&e.z!==s&&(t=!1,e[n]=null,e.dirty=!0,e.changed=!0,T(e));return t})),i&&RED.nodes.add(m),a.credentials&&k(m,a.credentials,"node-config-input"),T(m);var c={};c[m.id]=!0;for(var p=m.users.slice();0<p.length;){var u=p.pop();c[u.id]||(c[u.id]=!0,u.users&&(p=p.concat(u.users)),T(u))}RED.nodes.dirty(!0),RED.view.redraw(!0),i||RED.events.emit("editor:save",m),RED.tray.close(function(){R(n,o,m.id,g)})}}],v||a.buttons.unshift({class:"leftButton",text:RED._("editor.configDelete"),click:function(){var e=f,t=m.id,n=h,o=RED.nodes.getType(n);try{o.ondelete&&(console.log("Deprecated API warning: config node type ",n," has an ondelete function - should be oneditdelete"),o.ondelete.call(m)),o.oneditdelete&&o.oneditdelete.call(m)}catch(e){console.log("oneditdelete",m.id,m.type,e.toString())}for(var i={t:"delete",nodes:[m],changes:{},dirty:RED.nodes.dirty()},a=0;a<m.users.length;a++){var s=m.users[a];for(var r in i.changes[s.id]={changed:s.changed,valid:s.valid},s._def.defaults)s._def.defaults.hasOwnProperty(r)&&s[r]==t&&(i.changes[s.id][r]=t,s[r]="",s.changed=!0,s.dirty=!0);T(s)}RED.nodes.remove(t),RED.nodes.dirty(!0),RED.view.redraw(!0),RED.history.push(i),RED.tray.close(function(){R(e,n,"",g)})}}),RED.tray.show(a)}function E(e,t){return e.__label__<t.__label__?-1:e.__label__>t.__label__?1:0}function R(e,n,t,o){if(o){var i=$("#"+o+"-edit-"+e);if(i.length)t?i.text(RED._("editor.configEdit")):i.text(RED._("editor.configAdd")),$("#"+o+"-"+e).val(t);else{var a=$("#"+o+"-"+e),s=RED.nodes.getType(n);a.children().remove();var r=RED.nodes.workspace(RED.workspaces.active());r||(r=RED.nodes.subflow(RED.workspaces.active()));var d=[];RED.nodes.eachConfig(function(e){if(e.type==n&&(!e.z||e.z===r.id)){var t=RED.utils.getNodeLabel(e,e.id);e.__label__=t,d.push(e)}});var l=E;"function"==typeof s.sort&&(l=s.sort);try{d.sort(l)}catch(e){console.log("Definition error: "+s.type+".sort",e)}d.forEach(function(e){a.append('<option value="'+e.id+'"'+(t==e.id?" selected":"")+">"+RED.text.bidi.enforceTextDirectionWithUCC(e.__label__)+"</option>"),delete e.__label__}),a.append('<option value="_ADD_"'+(""===t?" selected":"")+">"+RED._("editor.addNewType",{type:n})+"</option>"),window.setTimeout(function(){a.change()},50)}}}function t(e,t){RED.editor.types.hasOwnProperty(e)?(0<r.length&&(t.parent=r[r.length-1].id),r.push({type:e}),t.title=t.title||y(),t.onclose=function(){r.pop()},RED.editor.types[e].show(t)):console.log("Unknown type editor:",e)}return{init:function(){for(var e in RED.tray.init(),RED.actions.add("core:confirm-edit-tray",function(){$("#node-dialog-ok").click(),$("#node-config-dialog-ok").click()}),RED.actions.add("core:cancel-edit-tray",function(){$("#node-dialog-cancel").click(),$("#node-config-dialog-cancel").click()}),RED.editor.types)RED.editor.types.hasOwnProperty(e)&&RED.editor.types[e].init()},types:{},edit:function(d){var E,R,x=d;r.push(d),RED.view.state(RED.state.EDITING);var l=d.type;"subflow:"==d.type.substring(0,8)&&(l="subflow");var e={title:y(),buttons:[{id:"node-dialog-delete",class:"leftButton",text:RED._("common.label.delete"),click:function(){var e=RED.nodes.dirty(),t=[],n=[],o=RED.nodes.remove(x.id);t.push(x);var i={t:"delete",nodes:t=t.concat(o.nodes),links:n=n.concat(o.links),changes:{},dirty:e};RED.nodes.dirty(!0),RED.view.redraw(!0),RED.history.push(i),RED.tray.close()}},{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){if(x._def){if(x._def.oneditcancel)try{x._def.oneditcancel.call(x)}catch(e){console.log("oneditcancel",x.id,x.type,e.toString())}for(var e in x._def.defaults)if(x._def.defaults.hasOwnProperty(e)){var t=x._def.defaults[e];if(t.type){var n=RED.nodes.getType(t.type);if(n&&n.exclusive){var o=$("#node-input-"+e).val()||"";""===o||x[e]||RED.nodes.remove(o)}}}}RED.tray.close()}},{id:"node-dialog-ok",text:RED._("common.label.done"),class:"primary",click:function(){var e,t,n,o={},i=!1,a=RED.nodes.dirty();if(x._def.oneditsave){var s={};for(e in x._def.defaults)x._def.defaults.hasOwnProperty(e)&&("string"==typeof x[e]||"number"==typeof x[e]?s[e]=x[e]:s[e]=$.extend(!0,{},{v:x[e]}).v);try{!0===x._def.oneditsave.call(x)&&(i=!0)}catch(e){console.log("oneditsave",x.id,x.type,e.toString())}for(e in x._def.defaults)x._def.defaults.hasOwnProperty(e)&&(null===s[e]||"string"==typeof s[e]||"number"==typeof s[e]?s[e]!==x[e]&&(o[e]=s[e],i=!0):JSON.stringify(s[e])!==JSON.stringify(x[e])&&(o[e]=s[e],i=!0))}if(x._def.defaults)for(e in x._def.defaults)if(x._def.defaults.hasOwnProperty(e)){var r=$("#node-input-"+e);if(null!=(n="checkbox"===r.attr("type")?r.prop("checked"):"format"in x._def.defaults[e]&&""!==x._def.defaults[e].format&&"DIV"===r[0].nodeName?r.text():r.val())){if("outputs"===e){if(""===n.trim())continue;if(isNaN(n)){t=JSON.parse(n);var d=0,l=!1;Object.keys(t).forEach(function(e){isNaN(e)?(d++,delete t[e]):(t[e]=t[e]+"","-1"!==t[e]?(d++,t[e]!==e?l=!0:delete t[e]):l=!0)}),n=d,l&&(i=!0)}else n=parseInt(n)}if(x[e]!=n){if(x._def.defaults[e].type){"_ADD_"==n&&(n="");var c=RED.nodes.node(x[e]);if(c){var p=c.users;p.splice(p.indexOf(x),1)}(c=RED.nodes.node(n))&&c.users.push(x)}o[e]=x[e],x[e]=n,i=!0}}}if(x._def.credentials){var u=x._def.credentials,f=k(x,u,"node-input");i=i||f}var h=_(x,t);if(j(x,o,t)&&(i=!0),!x._def.defaults||!x._def.defaults.hasOwnProperty("icon")){var g=$("#node-settings-icon").text()||"";if(E)if(g!==R)o.icon=x.icon,x.icon=g,i=!0;else{var v=RED.utils.getDefaultNodeIcon(x._def,x),m=v.module+"/"+v.file;R!==m&&(o.icon=x.icon,x.icon=m,i=!0)}else g!==x.icon&&(o.icon=x.icon,x.icon=g,i=!0)}if(i){var b=x.changed;x.changed=!0,RED.nodes.dirty(!0);var y=RED.nodes.subflow(RED.workspaces.active()),w=null;y&&(w=[],RED.nodes.eachNode(function(e){e.type=="subflow:"+RED.workspaces.active()&&(w.push({id:e.id,changed:e.changed}),e.changed=!0,e.dirty=!0,_(e))}));var D={t:"edit",node:x,changes:o,links:h,dirty:a,changed:b};t&&(D.outputMap=t),w&&(D.subflow={instances:w}),RED.history.push(D)}x.dirty=!0,T(x),RED.events.emit("editor:save",x),RED.tray.close()}}],resize:function(e){n[l]=e.width,$(".editor-tray-content").height(e.height-78);var t=$(".editor-tray-content form").height(e.height-78-40);if(x&&x._def.oneditresize)try{x._def.oneditresize.call(x,{width:t.width(),height:t.height()})}catch(e){console.log("oneditresize",x.id,x.type,e.toString())}},open:function(e,t){e.find(".editor-tray-footer");var n=e.find(".editor-tray-body");n.parent().css("overflow","hidden");var o=RED.stack.create({container:n,singleExpanded:!0}),i=o.add({title:RED._("editor.nodeProperties"),expanded:!0});i.content.addClass("editor-tray-content");var a,s=o.add({title:RED._("editor.portLabels"),onexpand:function(){!function(e,t){var n,o,i=t._def.inputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"),a=t._def.outputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel"),s=$("#node-label-form-inputs"),r=$("#node-label-form-outputs"),d=t.inputs||t._def.inputs||0,l=s.children(),c=l.length;if(1===c&&$(l[0]).hasClass("node-label-form-none")&&c--,c<d)for(0===c&&$(l[0]).remove(),o=c;o<d;o++)D("input",o,"",i).appendTo(s);else if(d<c){for(o=d;o<c;o++)$(l[o]).remove();0===n&&D().appendTo(s)}var p=$("#node-input-outputs").val();if(void 0===p)n=t.outputs||t._def.outputs||0;else if(isNaN(p)){var u=JSON.parse(p),f=Object.keys(u);l=r.children(),1===(c=l.length)&&$(l[0]).hasClass("node-label-form-none")&&c--,n=0;var h=[];f.forEach(function(e){var t=$("#node-label-form-output-"+e).parent();0===t.length&&-1!==u[e]?(0===c&&($(l[0]).remove(),c=-1),t=D("output",e,"",a)):t.detach(),-1!==u[e]&&(n++,h.push({i:parseInt(u[e]),r:t}))}),h.sort(function(e,t){return e.i-t.i}),h.forEach(function(e,t){e.r.find("label").text(t+1+"."),e.r.appendTo(r)}),0===h.length&&D("output",o,"").appendTo(r)}else n=Math.max(0,parseInt(p));if(l=r.children(),1===(c=l.length)&&$(l[0]).hasClass("node-label-form-none")&&c--,c<n)for(0===c&&$(l[0]).remove(),o=c;o<n;o++)D("output",o,"").appendTo(r);else if(n<c){for(o=n;o<c;o++)$(l[o]).remove();0===n&&D().appendTo(r)}}(this.content,d)}});s.content.addClass("editor-tray-content"),x&&RED.sidebar.info.refresh(x),a="node-red"===d._def.set.module?"node-red":d._def.set.id;var r=RED.utils.getDefaultNodeIcon(d._def,d);R=r.module+"/"+r.file,E=!d.icon||d.icon===R,w(i.content,"dialog-form",l,a),v(s.content,d),b(d,d._def,"node-input",function(){n.i18n(),t()})},close:function(){RED.view.state()!=RED.state.IMPORT_DRAGGING&&RED.view.state(RED.state.DEFAULT),x&&RED.sidebar.info.refresh(x),RED.workspaces.refresh(),RED.view.redraw(!0),r.pop()},show:function(){x&&RED.sidebar.info.refresh(x)}};if(n.hasOwnProperty(l)&&(e.width=n[l]),"subflow"===l){var t=x.type.substring(8);e.buttons.unshift({class:"leftButton",text:RED._("subflow.edit"),click:function(){RED.workspaces.show(t),$("#node-dialog-ok").click()}})}RED.tray.show(e)},editConfig:m,editSubflow:function(d){var c,p=d;r.push(d),RED.view.state(RED.state.EDITING);var e={title:y(),buttons:[{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){RED.tray.close()}},{id:"node-dialog-ok",class:"primary",text:RED._("common.label.done"),click:function(){var e={},t=!1,n=RED.nodes.dirty(),o=$("#subflow-input-name").val();o!=p.name&&(e.name=p.name,p.name=o,t=!0);var i=c.getValue();i!=p.info&&(e.info=p.info,p.info=i,t=!0),j(p,e,null)&&(t=!0);var a=$("#node-settings-icon").text()||"";(void 0===p.icon&&"node-red/subflow.png"!==a||void 0!==p.icon&&p.icon!==a)&&(e.icon=p.icon,p.icon=a,t=!0);var s=$("#subflow-input-category").val().trim();if("_custom_"===s&&""===(s=$("#subflow-input-custom-category").val().trim())&&(s=p.category),"subflows"===s&&(s=""),s!=p.category&&(e.category=p.category,p.category=s,t=!0),RED.palette.refresh(),t){var r=p.changed;p.changed=!0,T(p);var d=[];RED.nodes.eachNode(function(e){e.type=="subflow:"+p.id&&(d.push({id:e.id,changed:e.changed}),e.changed=!0,e.dirty=!0,_(e),T(e))}),RED.nodes.dirty(!0);var l={t:"edit",node:p,changes:e,dirty:n,changed:r,subflow:{instances:d}};RED.history.push(l)}p.dirty=!0,RED.tray.close()}}],resize:function(e){$(".editor-tray-content").height(e.height-78),$(".editor-tray-content form").height(e.height-78-40);for(var t=$("#dialog-form>div:not(.node-text-editor-row)"),n=($("#dialog-form>div.node-text-editor-row"),$("#dialog-form").height()),o=0;o<t.size();o++)n-=$(t[o]).outerHeight(!0);n-=parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")),$(".node-text-editor").css("height",n+"px"),c.resize()},open:function(e){e.find(".editor-tray-footer");var t=e.find(".editor-tray-body");t.parent().css("overflow","hidden");var n=RED.stack.create({container:t,singleExpanded:!0}),o=n.add({title:RED._("editor.nodeProperties"),expanded:!0});o.content.addClass("editor-tray-content");var i=n.add({title:RED._("editor.portLabels")});i.content.addClass("editor-tray-content"),p&&RED.sidebar.info.refresh(p),w(o.content,"dialog-form","subflow-template"),c=RED.editor.createEditor({id:"subflow-input-info-editor",mode:"ace/mode/markdown",value:""}),$("#subflow-input-name").val(d.name),RED.text.bidi.prepareInput($("#subflow-input-name")),$("#subflow-input-category").empty();var a=RED.palette.getCategories();a.sort(function(e,t){return e.label.localeCompare(t.label)}),a.forEach(function(e){$("#subflow-input-category").append($("<option></option>").val(e.id).text(e.label))}),$("#subflow-input-category").append($("<option></option>").attr("disabled",!0).text("---")),$("#subflow-input-category").append($("<option></option>").val("_custom_").text(RED._("palette.addCategory"))),$("#subflow-input-category").change(function(){"_custom_"===$(this).val()?($("#subflow-input-category").width(120),$("#subflow-input-custom-category").show()):($("#subflow-input-category").width(250),$("#subflow-input-custom-category").hide())}),$("#subflow-input-category").val(d.category||"subflows"),c.getSession().setValue(d.info||"",-1);var s=0,r="subflow:"+p.id;RED.nodes.eachNode(function(e){e.type===r&&s++}),$("#subflow-dialog-user-count").text(RED._("subflow.subflowInstances",{count:s})).show(),v(i.content,d),t.i18n()},close:function(){RED.view.state()!=RED.state.IMPORT_DRAGGING&&RED.view.state(RED.state.DEFAULT),RED.sidebar.info.refresh(p),RED.workspaces.refresh(),c.destroy(),r.pop(),p=null},show:function(){}};RED.tray.show(e)},editJavaScript:function(e){t("_js",e)},editExpression:function(e){t("_expression",e)},editJSON:function(e){t("_json",e)},editMarkdown:function(e){t("_markdown",e)},editBuffer:function(e){t("_buffer",e)},buildEditForm:w,validateNode:T,updateNodeProperties:_,createEditor:function(e){var t=ace.edit(e.id||e.element);t.setTheme("ace/theme/tomorrow");var o=t.getSession();return o.on("changeAnnotation",function(){for(var e=o.getAnnotations()||[],t=e.length,n=e.length;t--;)/doctype first\. Expected/.test(e[t].text)?e.splice(t,1):/Unexpected End of file\. Expected/.test(e[t].text)&&e.splice(t,1);n>e.length&&o.setAnnotations(e)}),e.mode&&o.setMode(e.mode),e.foldStyle?o.setFoldStyle(e.foldStyle):o.setFoldStyle("markbeginend"),e.options?t.setOptions(e.options):t.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0}),e.readOnly&&(t.setOption("readOnly",e.readOnly),t.container.classList.add("ace_read-only")),e.hasOwnProperty("lineNumbers")&&t.renderer.setOption("showGutter",e.lineNumbers),t.$blockScrolling=1/0,e.value&&o.setValue(e.value,-1),e.globals&&setTimeout(function(){o.$worker&&o.$worker.send("setOptions",[{globals:e.globals,esversion:6,sub:!0,asi:!0,maxerr:1e3}])},100),t}}}(),RED.editor.types._buffer={init:function(){$('<script type="text/x-red" data-template-name="_buffer"><div id="node-input-buffer-panels"><div id="node-input-buffer-panel-str" class="red-ui-panel"><div class="form-row" style="margin-bottom: 3px; text-align: right;"><span class="node-input-buffer-type"><i class="fa fa-exclamation-circle"></i> <span id="node-input-buffer-type-string" data-i18n="bufferEditor.modeString"></span><span id="node-input-buffer-type-array" data-i18n="bufferEditor.modeArray"></span></span></div><div class="form-row node-text-editor-row"><div class="node-text-editor" id="node-input-buffer-str"></div></div></div><div id="node-input-buffer-panel-bin" class="red-ui-panel"><div class="form-row node-text-editor-row" style="margin-top: 10px"><div class="node-text-editor" id="node-input-buffer-bin"></div></div></div></div><\/script>').appendTo(document.body)},show:function(e){var a=e.value,t=e.complete;RED.view.state(RED.state.EDITING);var r,s,d=[],n={title:e.title,width:"inherit",buttons:[{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){RED.tray.close()}},{id:"node-dialog-ok",text:RED._("common.label.done"),class:"primary",click:function(){t(JSON.stringify(r)),RED.tray.close()}}],resize:function(e){var t=$("#dialog-form").height();s&&s.resize(t)},open:function(e){e.find(".editor-tray-body");var t,n=RED.editor.buildEditForm(e.find(".editor-tray-body"),"dialog-form","_buffer","editor");(d=RED.editor.createEditor({id:"node-input-buffer-str",value:"",mode:"ace/mode/text"})).getSession().setValue(a||"",-1),bufferBinEditor=RED.editor.createEditor({id:"node-input-buffer-bin",value:"",mode:"ace/mode/text",readOnly:!0});var o=function(e){var t=!0,n="string"==typeof e,o=[],i=0,a=(r=n?function(e){var t=[],n=0,o=e.length;for(n=0;n<o;n++){var i=e.charCodeAt(n);i<128?t.push(i):(i<2048?t.push(192|i>>6):(i<55296||57344<=i?t.push(224|i>>12):(n++,i=65536+((1023&i)<<10|1023&e.charAt(n)),t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return t}(e):e).length;for(i=0;i<a;i++){var s=parseInt(r[i]);if(!n&&(isNaN(s)||s<0||255<s)){t=!1;break}0<i&&(i%8==0?i%16==0?o.push("\n"):o.push(" "):o.push(" ")),o.push((s<16?"0":"")+s.toString(16).toUpperCase())}return t&&($("#node-input-buffer-type-string").toggle(n),$("#node-input-buffer-type-array").toggle(!n),bufferBinEditor.setValue(o.join(""),1)),t},i=function(){var e=d.getValue(),t=!1;if(/^[\s]*\[[\s\S]*\][\s]*$/.test(e)){t=!0;try{var n=JSON.parse(e);t=o(n)}catch(e){t=!1}}t||o(e)};d.getSession().on("change",function(){clearTimeout(t),t=setTimeout(i,200)}),i(),n.i18n(),s=RED.panels.create({id:"node-input-buffer-panels",resize:function(e,t){var n=$("#node-input-buffer-panel-str");e-=$(n.children()[0]).outerHeight(!0);var o=$(n.children()[1]);e-=parseInt(o.css("marginTop"))+parseInt(o.css("marginBottom")),$("#node-input-buffer-str").css("height",e-5+"px"),d.resize();var i=$("#node-input-buffer-panel-bin");o=$(i.children()[0]),t-=parseInt(o.css("marginTop"))+parseInt(o.css("marginBottom")),$("#node-input-buffer-bin").css("height",t-5+"px"),bufferBinEditor.resize()}}),$(".node-input-buffer-type").click(function(e){e.preventDefault(),RED.sidebar.info.set(RED._("bufferEditor.modeDesc")),RED.sidebar.info.show()})},close:function(){e.onclose&&e.onclose(),d.destroy(),bufferBinEditor.destroy()},show:function(){}};RED.tray.show(n)}},RED.editor.types._expression=function(){var g={};return{init:function(){$('<script type="text/x-red" data-template-name="_expression"><div id="node-input-expression-panels"><div id="node-input-expression-panel-expr" class="red-ui-panel"><div class="form-row" style="margin-bottom: 3px; text-align: right;"><span class="node-input-expression-legacy"><i class="fa fa-exclamation-circle"></i> <span data-i18n="expressionEditor.compatMode"></span></span><button id="node-input-expression-reformat" class="editor-button editor-button-small"><span data-i18n="expressionEditor.format"></span></button></div><div class="form-row node-text-editor-row"><div class="node-text-editor" id="node-input-expression"></div></div></div><div id="node-input-expression-panel-info" class="red-ui-panel"><div class="form-row"><ul id="node-input-expression-tabs"></ul><div id="node-input-expression-tab-help" class="node-input-expression-tab-content hide"><div><select id="node-input-expression-func"></select><button id="node-input-expression-func-insert" class="editor-button" data-i18n="expressionEditor.insert"></button></div><div id="node-input-expression-help"></div></div><div id="node-input-expression-tab-test" class="node-input-expression-tab-content hide"><div><span style="display: inline-block; width: calc(50% - 5px);"><span data-i18n="expressionEditor.data"></span><button style="float: right; margin-right: 5px;" id="node-input-example-reformat" class="editor-button editor-button-small"><span data-i18n="jsonEditor.format"></span></button></span><span style="display: inline-block; width: calc(50% - 5px);" data-i18n="expressionEditor.result"></span></div><div style="display: inline-block; width: calc(50% - 5px);" class="node-text-editor" id="node-input-expression-test-data"></div><div style="display: inline-block; width: calc(50% - 5px);" class="node-text-editor" id="node-input-expression-test-result"></div></div></div></div></div><\/script>').appendTo(document.body)},show:function(e){var u,d,f,a,s=e.parent||"_",r=e.value,t=e.complete;RED.view.state(RED.state.EDITING);var h={title:e.title,width:"inherit",buttons:[{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){RED.tray.close()}},{id:"node-dialog-ok",text:RED._("common.label.done"),class:"primary",click:function(){$("#node-input-expression-help").text(""),t(u.getValue()),RED.tray.close()}}],resize:function(e){var t=$("#dialog-form").height();a&&a.resize(t)},open:function(e){e.find(".editor-tray-body").addClass("node-input-expression-editor");var t=RED.editor.buildEditForm(e.find(".editor-tray-body"),"dialog-form","_expression","editor"),l=$("#node-input-expression-func");Object.keys(jsonata.functions).forEach(function(e){l.append($("<option></option>").val(e).text(e))}),l.change(function(e){var t=$(this).val(),n="<h5>"+t+"("+RED._("jsonata:"+t+".args",{defaultValue:""})+")</h5>",o=marked(RED._("jsonata:"+t+".desc",{defaultValue:""}));$("#node-input-expression-help").html(n+"<p>"+o+"</p>")}),u=RED.editor.createEditor({id:"node-input-expression",value:"",mode:"ace/mode/jsonata",options:{enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}});var c=null,p=-1;u.getSession().setValue(r||"",-1),u.on("changeSelection",function(){var e=u.getCursorPosition(),t=u.getSession().getTokenAt(e.row,e.column);if(t!==c||t&&/paren/.test(t.type)&&e.column!==p){var n,o,i=null;if((c=t)&&"keyword"===t.type)n=e.row,i=t;else{var a=0,s=!1;for(t?("paren.rparen"===t.type&&(p=e.column,a=e.column-(t.start+t.value.length)),n=e.row,o=t.index):(n=e.row-1,o=-1);null===i&&-1<n;){var r=u.getSession().getTokens(n);for(-1===o&&(o=r.length-1);-1<o;){var d=r[o].type;if(s){if("keyword"===d){i=r[o];break}s=!1}"paren.lparen"===d?a-=r[o].value.length:"paren.rparen"===d&&(a+=r[o].value.length),a<0&&(s=!0,a=0),o--}i||n--}}u.session.removeMarker(null),i&&l.val(i.value).change()}}),t.i18n(),$("#node-input-expression-func-insert").click(function(e){e.preventDefault();u.getCursorPosition();var t=l.val(),n=jsonata.getFunctionSnippet(t);u.insertSnippet(n),u.focus()}),$("#node-input-expression-reformat").click(function(e){e.preventDefault();var t=u.getValue()||"";try{t=jsonata.format(t)}catch(e){}u.getSession().setValue(t||"",-1)});var n,o=RED.tabs.create({element:$("#node-input-expression-tabs"),onchange:function(e){$(".node-input-expression-tab-content").hide(),e.content.show(),h.resize()}});o.addTab({id:"expression-help",label:RED._("expressionEditor.functionReference"),content:$("#node-input-expression-tab-help")}),o.addTab({id:"expression-tests",label:RED._("expressionEditor.test"),content:$("#node-input-expression-tab-test")}),d=RED.editor.createEditor({id:"node-input-expression-test-data",value:g[s]||'{\n "payload": "hello world"\n}',mode:"ace/mode/json",lineNumbers:!1}),$(".node-input-expression-legacy").click(function(e){e.preventDefault(),RED.sidebar.info.set(RED._("expressionEditor.compatModeDesc")),RED.sidebar.info.show()});var i=function(){var e,t,n=d.getValue(),o=u.getValue(),i=!1,a=/(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(o);$(".node-input-expression-legacy").toggle(a);try{(t=jsonata(o)).assign("flowContext",function(e){return i=!0,null}),t.assign("globalContext",function(e){return i=!0,null})}catch(e){return void f.setValue(RED._("expressionEditor.errors.invalid-expr",{message:e.message}),-1)}try{e=JSON.parse(n)}catch(e){return void f.setValue(RED._("expressionEditor.errors.invalid-msg",{message:e.toString()}))}try{var s,r=t.evaluate(a?{msg:e}:e);if(i)return void f.setValue(RED._("expressionEditor.errors.context-unsupported"),-1);s=void 0!==r?JSON.stringify(r,null,4):RED._("expressionEditor.noMatch"),f.setValue(s,-1)}catch(e){f.setValue(RED._("expressionEditor.errors.eval",{message:e.message}),-1)}};d.getSession().on("change",function(){clearTimeout(n),n=setTimeout(i,200),g[s]=d.getValue()}),u.getSession().on("change",function(){clearTimeout(n),n=setTimeout(i,200)}),f=RED.editor.createEditor({id:"node-input-expression-test-result",value:"",mode:"ace/mode/json",lineNumbers:!1,readOnly:!0}),a=RED.panels.create({id:"node-input-expression-panels",resize:function(e,t){var n=$("#node-input-expression-panel-expr");e-=$(n.children()[0]).outerHeight(!0);var o=$(n.children()[1]);e-=parseInt(o.css("marginTop"))+parseInt(o.css("marginBottom")),$("#node-input-expression").css("height",e-5+"px"),u.resize(),t-=$("#node-input-expression-panel-info > .form-row > div:first-child").outerHeight(!0)+20,$(".node-input-expression-tab-content").height(t),$("#node-input-expression-test-data").css("height",t-5+"px"),d.resize(),$("#node-input-expression-test-result").css("height",t-5+"px"),f.resize()}}),$("#node-input-example-reformat").click(function(e){e.preventDefault();var t=d.getValue()||"";try{t=JSON.stringify(JSON.parse(t),null,4)}catch(e){}d.getSession().setValue(t||"",-1)}),i()},close:function(){e.onclose&&e.onclose(),u.destroy(),d.destroy()},show:function(){}};RED.tray.show(h)}}}(),RED.editor.types._js={init:function(){$('<script type="text/x-red" data-template-name="_js"><div class="form-row node-text-editor-row" style="width: 700px"><div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-js"></div></div><\/script>').appendTo(document.body)},show:function(n){var i,o=n.value,e=n.complete;RED.view.state(RED.state.EDITING);var t={title:n.title,width:"inherit",buttons:[{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){RED.tray.close()}},{id:"node-dialog-ok",text:RED._("common.label.done"),class:"primary",click:function(){e(i.getValue(),i.getCursorPosition()),RED.tray.close()}}],resize:function(e){for(var t=$("#dialog-form>div:not(.node-text-editor-row)"),n=($("#dialog-form>div.node-text-editor-row"),$("#dialog-form").height()),o=0;o<t.size();o++)n-=$(t[o]).outerHeight(!0);n-=parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")),$(".node-text-editor").css("height",n+"px"),i.resize()},open:function(e){e.find(".editor-tray-body");var t=RED.editor.buildEditForm(e.find(".editor-tray-body"),"dialog-form","_js","editor");i=RED.editor.createEditor({id:"node-input-js",mode:"ace/mode/javascript",value:o,globals:{msg:!0,context:!0,RED:!0,util:!0,flow:!0,global:!0,console:!0,Buffer:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0}}),n.cursor&&i.gotoLine(n.cursor.row+1,n.cursor.column,!1),t.i18n()},close:function(){i.destroy(),n.onclose&&n.onclose()},show:function(){}};RED.tray.show(t)}},RED.editor.types._json={init:function(){$('<script type="text/x-red" data-template-name="_json"><div class="form-row" style="margin-bottom: 3px; text-align: right;"><button id="node-input-json-reformat" class="editor-button editor-button-small"><span data-i18n="jsonEditor.format"></span></button></div><div class="form-row node-text-editor-row"><div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-json"></div></div><\/script>').appendTo(document.body)},show:function(n){var i,o,a=n.value,e=n.complete;RED.view.state(RED.state.EDITING);var s=function(){var e=i.getValue();try{return JSON.parse(e),$("#node-dialog-ok").removeClass("disabled"),!0}catch(e){return $("#node-dialog-ok").addClass("disabled"),!1}},t={title:n.title,width:"inherit",buttons:[{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){RED.tray.close()}},{id:"node-dialog-ok",text:RED._("common.label.done"),class:"primary",click:function(){n.requireValid&&!s()||(e(i.getValue()),RED.tray.close())}}],resize:function(e){for(var t=$("#dialog-form>div:not(.node-text-editor-row)"),n=($("#dialog-form>div.node-text-editor-row"),$("#dialog-form").height()),o=0;o<t.size();o++)n-=$(t[o]).outerHeight(!0);n-=parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")),$(".node-text-editor").css("height",n+"px"),i.resize()},open:function(e){e.find(".editor-tray-body");var t=RED.editor.buildEditForm(e.find(".editor-tray-body"),"dialog-form","_json","editor");(i=RED.editor.createEditor({id:"node-input-json",value:"",mode:"ace/mode/json"})).getSession().setValue(a||"",-1),n.requireValid&&(i.getSession().on("change",function(){clearTimeout(o),o=setTimeout(s,200)}),s()),$("#node-input-json-reformat").click(function(e){e.preventDefault();var t=i.getValue()||"";try{t=JSON.stringify(JSON.parse(t),null,4)}catch(e){}i.getSession().setValue(t||"",-1)}),t.i18n()},close:function(){i.destroy(),n.onclose&&n.onclose()},show:function(){}};RED.tray.show(t)}},RED.editor.types._markdown={init:function(){$('<script type="text/x-red" data-template-name="_markdown"><div class="form-row" id="node-input-markdown-title" style="margin-bottom: 3px; text-align: right;"></div><div class="form-row node-text-editor-row"><div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-markdown"></div></div><\/script>').appendTo(document.body)},show:function(n){var i,o=n.value,e=n.complete;RED.view.state(RED.state.EDITING);var t={title:n.title,width:"inherit",buttons:[{id:"node-dialog-cancel",text:RED._("common.label.cancel"),click:function(){RED.tray.close()}},{id:"node-dialog-ok",text:RED._("common.label.done"),class:"primary",click:function(){e(i.getValue()),RED.tray.close()}}],resize:function(e){for(var t=$("#dialog-form>div:not(.node-text-editor-row)"),n=($("#dialog-form>div.node-text-editor-row"),$("#dialog-form").height()),o=0;o<t.size();o++)n-=$(t[o]).outerHeight(!0);n-=parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")),$(".node-text-editor").css("height",n+"px"),i.resize()},open:function(e){e.find(".editor-tray-body");var t=RED.editor.buildEditForm(e.find(".editor-tray-body"),"dialog-form","_markdown","editor");i=RED.editor.createEditor({id:"node-input-markdown",value:o,mode:"ace/mode/markdown"}),n.header&&n.header.appendTo(e.find("#node-input-markdown-title")),t.i18n()},close:function(){i.destroy(),n.onclose&&n.onclose()},show:function(){}};RED.tray.show(t)}},RED.tray=function(){var v=[],m=$("#editor-stack"),b=!1;function n(e){var n=$('<div class="editor-tray"></div>'),t=$('<div class="editor-tray-header"></div>').appendTo(n),o=$('<div class="editor-tray-body-wrapper"></div>').appendTo(n),i=$('<div class="editor-tray-body"></div>').appendTo(o),a=$('<div class="editor-tray-footer"></div>').appendTo(n),s=$('<div class="editor-tray-resize-handle"></div>').appendTo(n);if(e.title){var r=v.map(function(e){return e.options.title});r.push(e.title);var d='<ul class="editor-tray-breadcrumbs"><li>'+r.join("</li><li>")+"</li></ul>";$('<div class="editor-tray-titlebar">'+d+"</div>").appendTo(t)}e.width===1/0&&(e.maximized=!0,s.addClass("editor-tray-resize-maximised"));var l,c=$('<div class="editor-tray-toolbar"></div>').appendTo(t);if(e.buttons)for(var p=0;p<e.buttons.length;p++){var u=e.buttons[p],f=$("<button>").button().appendTo(c);u.id&&f.attr("id",u.id),u.text&&f.text(u.text),u.click&&f.click(function(t){return function(e){$(this).hasClass("disabled")||t(e)}}(u.click)),u.class&&(f.addClass(u.class),"primary"===u.class&&(l=u))}n.appendTo(m);var h={tray:n,header:t,body:i,footer:a,options:e,primaryButton:l};function g(){$("#header-shade").show(),$("#editor-shade").show(),$("#palette-shade").show(),$(".sidebar-shade").show(),h.preferredWidth=Math.max(n.width(),500),e.maximized||i.css({minWidth:h.preferredWidth-40}),e.width?(e.width>$("#editor-stack").position().left-8&&(e.width=$("#editor-stack").position().left-8),n.width(e.width)):n.width(h.preferredWidth),h.width=n.width(),h.width>$("#editor-stack").position().left-8&&(h.width=Math.max(0,$("#editor-stack").position().left-8),n.width(h.width)),n.css({right:-(n.width()+10)+"px",transition:"right 0.25s ease"}),$("#workspace").scrollLeft(0),y(),b=!0,setTimeout(function(){setTimeout(function(){e.width||n.width(Math.min(h.preferredWidth,$("#editor-stack").position().left-8)),e.resize&&e.resize({width:n.width()}),e.show&&e.show(),setTimeout(function(){b=!1},200),i.find(":focusable:first").focus()},150),n.css({right:0})},0)}v.push(h),e.maximized||n.draggable({handle:s,axis:"x",start:function(e,t){n.width("auto")},drag:function(e,t){var n=m.position().left+t.position.left;n<7?t.position.left+=7-n:t.position.left>-h.preferredWidth-1&&(t.position.left=-Math.min(m.position().left-7,h.preferredWidth-1)),h.options.resize&&setTimeout(function(){h.options.resize({width:-t.position.left})},0),h.width=-t.position.left},stop:function(e,t){n.width(-t.position.left),n.css({left:""}),h.options.resize&&h.options.resize({width:-t.position.left}),h.width=-t.position.left}}),e.open?1===e.open.length?(e.open(n),g()):e.open(n,g):g()}function y(){if(0<v.length){var e=v[v.length-1],t=e.tray.height()-e.header.outerHeight()-e.footer.outerHeight();e.body.height(t),e.options.maximized||e.width>$("#editor-stack").position().left-8?(e.width=$("#editor-stack").position().left-8,e.tray.width(e.width)):e.width<e.preferredWidth&&(e.width=Math.min($("#editor-stack").position().left-8,e.preferredWidth),e.tray.width(e.width)),e.options.resize&&e.options.resize({width:e.width,height:t})}}return{init:function(){$(window).resize(y),RED.events.on("sidebar:resize",y),$("#editor-shade").click(function(){if(!b){var e=v[v.length-1];e&&e.primaryButton&&e.primaryButton.click()}})},show:function(e){if(0<v.length&&!e.overlay){var t=v[v.length-1];"inherit"===e.width&&(e.width=t.tray.width()),t.tray.css({right:-(t.tray.width()+10)+"px"}),setTimeout(function(){t.tray.detach(),n(e)},250)}else RED.events.emit("editor:open"),n(e)},close:function(t){if(0<v.length){var n=v.pop();n.tray.css({right:-(n.tray.width()+10)+"px"}),setTimeout(function(){if(n.options.close&&n.options.close(),n.tray.remove(),0<v.length){var e=v[v.length-1];e.options.overlay?(y(),e.options.show&&e.options.show()):(e.tray.appendTo("#editor-stack"),setTimeout(function(){y(),e.tray.css({right:0}),e.options.show&&e.options.show()},0))}t&&t(),0===v.length&&($("#header-shade").hide(),$("#editor-shade").hide(),$("#palette-shade").hide(),$(".sidebar-shade").hide(),RED.events.emit("editor:close"),RED.view.focus())},250)}}}}(),RED.clipboard=function(){var e,t,n,o,i=!1;function a(){var t=$("#clipboard-import"),n=t.val();n=n.substring(n.indexOf("["),n.lastIndexOf("]")+1);try{JSON.parse(n),t.removeClass("input-error"),t.val(n),$("#clipboard-dialog-ok").button("enable")}catch(e){""!==n&&t.addClass("input-error"),$("#clipboard-dialog-ok").button("disable")}}function s(){i||(t.empty(),t.append($(o)),t.i18n(),$("#clipboard-dialog-ok").show(),$("#clipboard-dialog-cancel").show(),$("#clipboard-dialog-close").hide(),$("#clipboard-dialog-copy").hide(),$("#clipboard-dialog-ok").button("disable"),$("#clipboard-import").keyup(a),$("#clipboard-import").on("paste",function(){setTimeout(a,10)}),$("#import-tab > a").click(function(e){e.preventDefault(),$(this).hasClass("disabled")||$(this).hasClass("selected")||($(this).parent().children().removeClass("selected"),$(this).addClass("selected"))}),e.dialog("option","title",RED._("clipboard.importNodes")).dialog("open"))}function r(){if(!i){t.empty(),t.append($(n)),t.i18n();var r=RED.settings.flowFilePretty?"export-format-full":"export-format-mini";$("#export-format-group > a").click(function(e){if(e.preventDefault(),$(this).hasClass("disabled")||$(this).hasClass("selected"))$("#clipboard-export").focus();else{$(this).parent().children().removeClass("selected"),$(this).addClass("selected");var t=$("#clipboard-export").val();if(0<t.length){var n=JSON.parse(t);t="export-format-full"===(r=$(this).attr("id"))?JSON.stringify(n,null,4):JSON.stringify(n),$("#clipboard-export").val(t),$("#clipboard-export").focus()}}}),$("#export-range-group > a").click(function(e){if(e.preventDefault(),$(this).hasClass("disabled")||$(this).hasClass("selected"))$("#clipboard-export").focus();else{$(this).parent().children().removeClass("selected"),$(this).addClass("selected");var t=$(this).attr("id"),n="",o=null;if("export-range-selected"===t){var i=RED.view.selection();o=RED.nodes.createExportableNodeSet(i.nodes.filter(function(e){return"subflow"!==e.type}))}else if("export-range-flow"===t){var a=RED.workspaces.active();o=RED.nodes.filterNodes({z:a});var s=RED.nodes.workspace(a)||RED.nodes.subflow(a);o.unshift(s),o=RED.nodes.createExportableNodeSet(o)}else"export-range-full"===t&&(o=RED.nodes.createCompleteNodeSet(!1));null!==o&&(n="export-format-full"===r?JSON.stringify(o,null,4):JSON.stringify(o)),0<n.length?$("#export-copy").removeClass("disabled"):$("#export-copy").addClass("disabled"),$("#clipboard-export").val(n),$("#clipboard-export").focus()}}),$("#clipboard-dialog-ok").hide(),$("#clipboard-dialog-cancel").hide(),$("#clipboard-dialog-copy").hide(),$("#clipboard-dialog-close").hide(),RED.view.selection().nodes?$("#export-range-selected").click():($("#export-range-selected").addClass("disabled").removeClass("selected"),$("#export-range-flow").click()),"export-format-full"===r?$("#export-format-full").click():$("#export-format-mini").click(),$("#clipboard-export").focus(function(){var e=$(this);e.select(),e.mouseup(function(){return e.unbind("mouseup"),!1})}),e.dialog("option","title",RED._("clipboard.exportNodes")).dialog("open"),$("#clipboard-export").focus(),document.queryCommandSupported("copy")?($("#clipboard-dialog-cancel").show(),$("#clipboard-dialog-copy").show()):($("#clipboard-dialog-cancel").hide(),$("#clipboard-dialog-close").show())}}function d(){$("#dropTarget").hide(),RED.keyboard.remove("escape")}return{init:function(){e=$('<div id="clipboard-dialog" class="hide node-red-dialog"><form class="dialog-form form-horizontal"></form></div>').appendTo("body").dialog({modal:!0,autoOpen:!1,width:500,resizable:!1,buttons:[{id:"clipboard-dialog-cancel",text:RED._("common.label.cancel"),click:function(){$(this).dialog("close")}},{id:"clipboard-dialog-close",class:"primary",text:RED._("common.label.close"),click:function(){$(this).dialog("close")}},{id:"clipboard-dialog-copy",class:"primary",text:RED._("clipboard.export.copy"),click:function(){$("#clipboard-export").select(),document.execCommand("copy"),document.getSelection().removeAllRanges(),RED.notify(RED._("clipboard.nodesExported")),$(this).dialog("close")}},{id:"clipboard-dialog-ok",class:"primary",text:RED._("common.label.import"),click:function(){RED.view.importNodes($("#clipboard-import").val(),"import-tab-new"===$("#import-tab > a.selected").attr("id")),$(this).dialog("close")}}],open:function(e){$(this).parent().find(".ui-dialog-titlebar-close").hide()},close:function(e){}}),t=e.children(".dialog-form"),n='<div class="form-row"><label style="width:auto;margin-right: 10px;" data-i18n="clipboard.export.copy"></label><span id="export-range-group" class="button-group"><a id="export-range-selected" class="editor-button toggle" href="#" data-i18n="clipboard.export.selected"></a><a id="export-range-flow" class="editor-button toggle" href="#" data-i18n="clipboard.export.current"></a><a id="export-range-full" class="editor-button toggle" href="#" data-i18n="clipboard.export.all"></a></span></div><div class="form-row"><textarea readonly style="resize: none; width: 100%; border-radius: 4px;font-family: monospace; font-size: 12px; background:#f3f3f3; padding-left: 0.5em; box-sizing:border-box;" id="clipboard-export" rows="5"></textarea></div><div class="form-row" style="text-align: right;"><span id="export-format-group" class="button-group"><a id="export-format-mini" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.compact"></a><a id="export-format-full" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.formatted"></a></span></div>',o='<div class="form-row"><textarea style="resize: none; width: 100%; border-radius: 0px;font-family: monospace; font-size: 12px; background:#eee; padding-left: 0.5em; box-sizing:border-box;" id="clipboard-import" rows="5" placeholder="'+RED._("clipboard.pasteNodes")+'"></textarea></div><div class="form-row"><label style="width:auto;margin-right: 10px;" data-i18n="clipboard.import.import"></label><span id="import-tab" class="button-group"><a id="import-tab-current" class="editor-button toggle selected" href="#" data-i18n="clipboard.export.current"></a><a id="import-tab-new" class="editor-button toggle" href="#" data-i18n="clipboard.import.newFlow"></a></span></div>',$('<input type="text" id="clipboard-hidden">').appendTo("body"),RED.actions.add("core:show-export-dialog",r),RED.actions.add("core:show-import-dialog",s),RED.events.on("editor:open",function(){i=!0}),RED.events.on("editor:close",function(){i=!1}),RED.events.on("search:open",function(){i=!0}),RED.events.on("search:close",function(){i=!1}),RED.events.on("type-search:open",function(){i=!0}),RED.events.on("type-search:close",function(){i=!1}),$("#chart").on("dragenter",function(e){-1==$.inArray("text/plain",e.originalEvent.dataTransfer.types)&&-1==$.inArray("Files",e.originalEvent.dataTransfer.types)||($("#dropTarget").css({display:"table"}),RED.keyboard.add("*","escape",d))}),$("#dropTarget").on("dragover",function(e){-1==$.inArray("text/plain",e.originalEvent.dataTransfer.types)&&-1==$.inArray("Files",e.originalEvent.dataTransfer.types)||e.preventDefault()}).on("dragleave",function(e){d()}).on("drop",function(e){if(-1!=$.inArray("text/plain",e.originalEvent.dataTransfer.types)){var t=e.originalEvent.dataTransfer.getData("text/plain");t=t.substring(t.indexOf("["),t.lastIndexOf("]")+1),RED.view.importNodes(t)}else if(-1!=$.inArray("Files",e.originalEvent.dataTransfer.types)){var n=e.originalEvent.dataTransfer.files;if(1===n.length){var o=n[0],i=new FileReader;i.onload=function(e){RED.view.importNodes(e.target.result)},i.readAsText(o)}}d(),e.preventDefault()})},import:s,export:r,copyText:function(e,t,n){var o=!1;"string"!=typeof e&&(e=JSON.stringify(e,function(e,t){if(null!==t&&"object"==typeof t&&t.__enc__){if(t.hasOwnProperty("data")&&t.hasOwnProperty("length"))return o=t.data.length!==t.length,t.data;if("function"===t.type||"internal"===t.type)return;if("number"===t.type)return null}return t})),o&&(n+="_truncated"),$("#clipboard-hidden").val(e).select();var i=document.execCommand("copy");if(i&&t){var a=RED.popover.create({target:t,direction:"left",size:"small",content:RED._(n)});setTimeout(function(){a.close()},1e3),a.open()}return i}}}(),RED.library=function(){var t,p="node-input-";function e(){$.getJSON("library/flows",function(e){var t,r=function(e,t){var n,o,i,a=document.createElement("ul");if(""===t&&(a.id="menu-item-import-library-submenu"),a.className="dropdown-menu",e.d)for(n in e.d)if(e.d.hasOwnProperty(n)){(o=document.createElement("li")).className="dropdown-submenu pull-left",(i=document.createElement("a")).href="#";var s=n.replace(/^@.*\//,"").replace(/^node-red-contrib-/,"").replace(/^node-red-node-/,"").replace(/-/," ").replace(/_/," ");i.innerHTML=s,o.appendChild(i),o.appendChild(r(e.d[n],t+(""!==t?"/":"")+n)),a.appendChild(o)}if(e.f)for(n in e.f)e.f.hasOwnProperty(n)&&(o=document.createElement("li"),(i=document.createElement("a")).href="#",i.innerHTML=e.f[n],i.flowName=t+(""!==t?"/":"")+e.f[n],i.onclick=function(){$.get("library/flows/"+this.flowName,function(e){RED.view.importNodes(e)})},o.appendChild(i),a.appendChild(o));return a};e.d&&e.d._examples_&&(t=e.d._examples_,delete e.d._examples_);var n=r(e,"");$("#menu-item-import-examples").remove(),t&&(RED.menu.addItem("menu-item-import",{id:"menu-item-import-examples",label:RED._("menu.label.examples"),options:[]}),$("#menu-item-import-examples-submenu").replaceWith(r(t,"_examples_"))),$("#menu-item-import-library-submenu").replaceWith(n)})}function n(){var e=RED.nodes.createExportableNodeSet(RED.view.selection().nodes);$("#node-input-library-filename").attr("nodes",JSON.stringify(e)),t.dialog("open")}return{init:function(){$('<div id="node-dialog-library-save" class="hide"><form class="form-horizontal"><div class="form-row"><label for="node-dialog-library-save-folder" data-i18n="[append]library.folder"><i class="fa fa-folder-open"></i> </label><input type="text" id="node-dialog-library-save-folder" data-i18n="[placeholder]library.folderPlaceholder"></div><div class="form-row"><label for="node-dialog-library-save-filename" data-i18n="[append]library.filename"><i class="fa fa-file"></i> </label><input type="text" id="node-dialog-library-save-filename" data-i18n="[placeholder]library.filenamePlaceholder"></div></form></div>').appendTo(document.body),$('<div id="node-dialog-library-save-confirm" class="hide"><form class="form-horizontal"><div style="text-align: center; padding-top: 30px;" id="node-dialog-library-save-content"></div></form></div>').appendTo(document.body),$('<div id="node-dialog-library-lookup" class="hide"><form class="form-horizontal"><div class="form-row"><ul id="node-dialog-library-breadcrumbs" class="breadcrumb"><li class="active"><a href="#" data-i18n="[append]library.breadcrumb"></a></li></ul></div><div class="form-row"><div style="vertical-align: top; display: inline-block; height: 100%; width: 30%; padding-right: 20px;"><div id="node-select-library" style="border: 1px solid #999; width: 100%; height: 100%; overflow:scroll;"><ul></ul></div></div><div style="vertical-align: top; display: inline-block;width: 65%; height: 100%;"><div style="height: 100%; width: 95%;" class="node-text-editor" id="node-select-library-text" ></div></div></div></form></div>').appendTo(document.body),RED.actions.add("core:library-export",n),RED.events.on("view:selection-changed",function(e){e.nodes?RED.menu.setDisabled("menu-item-export-library",!1):RED.menu.setDisabled("menu-item-export-library",!0)}),!1!==RED.settings.theme("menu.menu-item-import-library")&&e(),(t=$('<div id="library-dialog" class="hide"><form class="dialog-form form-horizontal"></form></div>').appendTo("body").dialog({modal:!0,autoOpen:!1,width:500,resizable:!1,title:RED._("library.exportToLibrary"),buttons:[{id:"library-dialog-cancel",text:RED._("common.label.cancel"),click:function(){$(this).dialog("close")}},{id:"library-dialog-ok",class:"primary",text:RED._("common.label.export"),click:function(){var e=$("#node-input-library-filename").val();/^\s*$/.test(e)||$.ajax({url:"library/flows/"+e,type:"POST",data:$("#node-input-library-filename").attr("nodes"),contentType:"application/json; charset=utf-8"}).done(function(){RED.library.loadFlowLibrary(),RED.notify(RED._("library.savedNodes"),"success")}).fail(function(e,t,n){401===e.status?RED.notify(RED._("library.saveFailed",{message:RED._("user.notAuthorized")}),"error"):RED.notify(RED._("library.saveFailed",{message:e.responseText}),"error")}),$(this).dialog("close")}}],open:function(e){$(this).parent().find(".ui-dialog-titlebar-close").hide()},close:function(e){}})).children(".dialog-form").append($('<div class="form-row"><label for="node-input-library-filename" data-i18n="[append]editor:library.filename"><i class="fa fa-file"></i> </label><input type="text" id="node-input-library-filename" data-i18n="[placeholder]editor:library.fullFilenamePlaceholder"><input type="text" style="display: none;" /></div>'))},create:function(d){var s=null,r=null;function l(e){var t=document.createElement("li");return t.onmouseover=function(e){$(this).addClass("list-hover")},t.onmouseout=function(e){$(this).removeClass("list-hover")},t}function c(i,e){for(var t,n=document.createElement("ul"),o=0;o<e.length;o++){var a=e[o];"string"==typeof a?((t=l()).onclick=function(){var o=a;return function(e){var t=$('<li class="active"><span class="divider">/</span> <a href="#">'+o+"</a></li>");$("a",t).click(function(e){$(this).parent().nextAll().remove(),$.getJSON("library/"+d.url+i+o,function(e){$("#node-select-library").children().first().replaceWith(c(i+o+"/",e))}),e.stopPropagation()});var n=$("#node-dialog-library-breadcrumbs");$(".active",n).removeClass("active"),n.append(t),$.getJSON("library/"+d.url+i+o,function(e){$("#node-select-library").children().first().replaceWith(c(i+o+"/",e))})}}(),t.innerHTML='<i class="fa fa-folder"></i> '+a+"</i>"):((t=l()).innerHTML=a.name,t.onclick=function(){var t=a;return function(e){$(".list-selected",n).removeClass("list-selected"),$(this).addClass("list-selected"),$.get("library/"+d.url+i+t.fn,function(e){s=t,r.setValue(e,-1)})}}()),n.appendChild(t)}return n}function e(e){var t=$("#"+p+"name").val().replace(/(^\s*)|(\s*$)/g,"");""===t&&(t=RED._("library.unnamedType",{type:d.type}));var n=$("#node-dialog-library-save-filename").val().replace(/(^\s*)|(\s*$)/g,""),o=$("#node-dialog-library-save-folder").val().replace(/(^\s*)|(\s*$)/g,"");if(""!==n&&/.+\.js$/.test(n)){for(var i=o+(""===o?"":"/")+n,a={},s=0;s<d.fields.length;s++){var r=d.fields[s];"name"==r?a.name=t:a[r]=$("#"+p+r).val()}a.text=d.editor.getValue(),$.ajax({url:"library/"+d.url+"/"+i,type:"POST",data:JSON.stringify(a),contentType:"application/json; charset=utf-8"}).done(function(e,t,n){RED.notify(RED._("library.savedType",{type:d.type}),"success")}).fail(function(e,t,n){401===e.status?RED.notify(RED._("library.saveFailed",{message:RED._("user.notAuthorized")}),"error"):RED.notify(RED._("library.saveFailed",{message:e.responseText}),"error")})}else RED.notify(RED._("library.invalidFilename"),"warning")}p=d.elementPrefix||"node-input-",d.editor.setText&&(d.editor.setValue=function(e,t){d.editor.setText.call(d.editor,e)}),d.editor.getText&&(d.editor.getValue=d.editor.getText),$("#"+p+"name").css("width","calc(100% - 52px)").after('<div class="btn-group" style="margin-left:5px;"><a id="node-input-'+d.type+'-lookup" class="editor-button" data-toggle="dropdown"><i class="fa fa-book"></i> <i class="fa fa-caret-down"></i></a><ul class="dropdown-menu pull-right" role="menu"><li><a id="node-input-'+d.type+'-menu-open-library" tabindex="-1" href="#">'+RED._("library.openLibrary")+'</a></li><li><a id="node-input-'+d.type+'-menu-save-library" tabindex="-1" href="#">'+RED._("library.saveToLibrary")+"</a></li></ul></div>"),$("#node-input-"+d.type+"-menu-open-library").click(function(e){$("#node-select-library").children().remove(),$("#node-dialog-library-breadcrumbs").children().first().nextAll().remove(),r.setValue("",-1),$.getJSON("library/"+d.url,function(t){$("#node-select-library").append(c("/",t)),$("#node-dialog-library-breadcrumbs a").click(function(e){$(this).parent().nextAll().remove(),$("#node-select-library").children().first().replaceWith(c("/",t)),e.stopPropagation()}),$("#node-dialog-library-lookup").dialog("open")}),e.preventDefault()}),$("#node-input-"+d.type+"-menu-save-library").click(function(e){var t=$("#"+p+"name").val().replace(/(^\s*)|(\s*$)/g,"");$("#node-dialog-library-save-folder").attr("value","");var n=t.replace(/[^\w-]/g,"-");""===n&&(n="unnamed-"+d.type),$("#node-dialog-library-save-filename").attr("value",n+".js"),$("#node-dialog-library-save").dialog("open"),e.preventDefault()}),(r=ace.edit("node-select-library-text")).setTheme("ace/theme/tomorrow"),d.mode&&r.getSession().setMode(d.mode),r.setOptions({readOnly:!0,highlightActiveLine:!1,highlightGutterLine:!1}),r.renderer.$cursorLayer.element.style.opacity=0,r.$blockScrolling=1/0,$("#node-dialog-library-lookup").dialog({title:RED._("library.typeLibrary",{type:d.type}),modal:!0,autoOpen:!1,width:800,height:450,buttons:[{text:RED._("common.label.cancel"),click:function(){$(this).dialog("close")}},{text:RED._("common.label.load"),class:"primary",click:function(){if(s){for(var e=0;e<d.fields.length;e++){var t=d.fields[e];$("#"+p+t).val(s[t])}d.editor.setValue(r.getValue(),-1)}$(this).dialog("close")}}],open:function(e){var t=$("form",this);t.height(t.parent().height()-30),$("#node-select-library-text").height("100%"),$(".form-row:last-child",t).children().height(t.height()-60)},resize:function(e){var t=$("form",this);t.height(t.parent().height()-30),$(".form-row:last-child",t).children().height(t.height()-60)}}),$("#node-dialog-library-save-confirm").dialog({title:RED._("library.saveToLibrary"),modal:!0,autoOpen:!1,width:530,height:230,buttons:[{text:RED._("common.label.cancel"),click:function(){$(this).dialog("close")}},{text:RED._("common.label.save"),class:"primary",click:function(){e(),$(this).dialog("close")}}]}),$("#node-dialog-library-save").dialog({title:RED._("library.saveToLibrary"),modal:!0,autoOpen:!1,width:530,height:230,buttons:[{text:RED._("common.label.cancel"),click:function(){$(this).dialog("close")}},{text:RED._("common.label.save"),class:"primary",click:function(){e(),$(this).dialog("close")}}]})},loadFlowLibrary:e,export:n}}(),RED.notifications=function(){var m,b={},y=[],w=0;function e(e,t,n,o){var i={};if(null!==t&&"object"==typeof t&&(n=(i=t).fixed,o=i.timeout,t=i.type),i.modal&&$("#full-shade").show(),4<y.length)for(var a=y.length,s=0;4<a&&s<y.length;s+=1){var r=y[s];r.fixed||(window.clearTimeout(r.timeoutid),r.close(),a-=1)}var d,l,c,p,u,f=document.createElement("div");if(f.id="red-notification-"+w,f.className="notification",f.fixed=n,t&&(f.className="notification notification-"+t),i.width){var h=$("#notifications").width();if(i.width>h){var g=-(i.width-h)/2;$(f).css({width:i.width+"px",marginLeft:g+"px"})}}if(f.style.display="none","string"==typeof e?(/<p>/i.test(e)||(e="<p>"+e+"</p>"),f.innerHTML=e):$(f).append(e),i.buttons){var v=$('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(f);i.buttons.forEach(function(e){var t=$("<button>").html(e.text).click(e.click).appendTo(v);e.id&&t.attr("id",e.id),e.class&&t.addClass(e.class)})}return $("#notifications").append(f),$(f).slideDown(300),f.close=(d=f,function(){d.closed||(d.closed=!0,y.splice(y.indexOf(d),1),i.id&&(delete b[i.id],0===Object.keys(b).length&&m.hide()),$(d).slideUp(300,function(){d.parentNode.removeChild(d)}),i.modal&&$("#full-shade").hide())}),f.hideNotification=(l=f,function(){l.closed||(l.hidden=!0,$(l).slideUp(300))}),f.showNotification=(c=f,function(){!c.closed&&c.hidden&&(c.hidden=!1,$(c).slideDown(300))}),f.update=(p=f,function(e,t){var n;if("string"==typeof e?(/<p>/i.test(e)||(e="<p>"+e+"</p>"),p.innerHTML=e):$(p).empty().append(e),"number"==typeof t)n=t;else if(void 0!==t&&(n=t.timeout,t.buttons)){var o=$('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(p);t.buttons.forEach(function(e){var t=$("<button>").text(e.text).click(e.click).appendTo(o);e.id&&t.attr("id",e.id),e.class&&t.addClass(e.class)})}void 0!==n&&0<n?(window.clearTimeout(p.timeoutid),p.timeoutid=window.setTimeout(p.close,n)):window.clearTimeout(p.timeoutid),p.hidden&&p.showNotification()}),n||($(f).click((u=f,function(){u.close(),window.clearTimeout(u.timeoutid)})),f.timeoutid=window.setTimeout(f.close,o||5e3)),y.push(f),i.id&&(b[i.id]=f,m.show()),w+=1,f}return{init:function(){m=$('<li><a id="btn-notifications" class="button" href="#"><i class="fa fa-warning"></i></a></li>').prependTo(".header-toolbar").hide(),$("#btn-notifications").click(function(){!function(){for(var e in b)b.hasOwnProperty(e)&&b[e].showNotification()}()})},notify:RED.notify=e}}(),RED.search=function(){var n,d,e=!1,o=null,l=-1,t=!1,c={},p=[],u=[];function i(t,n,e){if("string"==typeof e||"number"==typeof e)e=(""+e).toLowerCase(),c[e]=c[e]||{},c[e][t.id]={node:t,label:n};else if(Array.isArray(e))e.forEach(function(e){i(t,n,e)});else if("object"==typeof e)for(var o in e)e.hasOwnProperty(o)&&i(t,n,e[o])}function a(e){var t=RED.utils.getNodeLabel(e);t&&(t=(""+t).toLowerCase(),c[t]=c[t]||{},c[t][e.id]={node:e,label:t}),t=t||e.label||e.name||e.id||"";var n=["id","type","name","label","info"];e._def&&e._def.defaults&&(n=n.concat(Object.keys(e._def.defaults)));for(var o=0;o<n.length;o++)e.hasOwnProperty(n[o])&&i(e,t,e[n[o]])}function s(){var e=d.find("li.selected");if(1===e.length){var t=d.parent(),n=t.height(),o=(t.scrollTop(),e.position().top),i=e.height();n<o+i?t.animate({scrollTop:"-="+(n-(o+i)-10)},50):o<0&&t.animate({scrollTop:"+="+(o-10)},50)}}function r(){o=$("<div>",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#main-container");var e=$("<div>",{class:"red-ui-search-container"}).appendTo(o);(n=$('<input type="text" data-i18n="[placeholder]menu.label.searchInput">').appendTo(e).searchBox({delay:200,change:function(){!function(e){if(d.editableList("empty"),l=-1,u=[],0<e.length){var t,n;e=e.toLowerCase();var o=[],i={};for(t=0;t<p.length;t++){var a=p[t],s=p[t].indexOf(e);if(-1<s)for(n=0;n<c[a].length;n++){var r=c[a][n];i[r.node.id]=i[r.node.id]=r,i[r.node.id].index=Math.min(i[r.node.id].index||1/0,s)}}for((o=Object.keys(i)).sort(function(e,t){return i[e].index-i[t].index}),t=0;t<o.length;t++)u.push(i[o[t]]);if(0<u.length)for(t=0;t<Math.min(u.length,25);t++)d.editableList("addItem",u[t]);else d.editableList("addItem",{})}}($(this).val())}})).on("keydown",function(e){var t;0<u.length&&(40===e.keyCode?(t=d.children(),l<t.length-1&&(-1<l&&$(t[l]).removeClass("selected"),l++),$(t[l]).addClass("selected"),s(),e.preventDefault()):38===e.keyCode?(t=d.children(),0<l&&(l<t.length&&$(t[l]).removeClass("selected"),l--),$(t[l]).addClass("selected"),s(),e.preventDefault()):13===e.keyCode&&0<u.length&&f(u[Math.max(0,l)].node))}),n.i18n();var t=$("<div>",{class:"red-ui-search-results-container"}).appendTo(o);d=$("<ol>",{id:"search-result-list",style:"position: absolute;top: 5px;bottom: 5px;left: 5px;right: 5px;"}).appendTo(t).editableList({addButton:!1,addItem:function(e,t,n){var o=n.node;if(void 0===o)$("<div>",{class:"red-ui-search-empty"}).text(RED._("search.empty")).appendTo(e);else{var i=o._def,a=$("<a>",{href:"#",class:"red-ui-search-result"}).appendTo(e),s=$("<div>",{class:"red-ui-search-result-node"}).appendTo(a),r=RED.utils.getNodeColor(o.type,i),d=RED.utils.getNodeIcon(i,o);"tab"===o.type&&(r="#C0DEED"),s.css("backgroundColor",r);var l=$("<div/>",{class:"palette_icon_container"}).appendTo(s);$("<div/>",{class:"palette_icon",style:"background-image: url("+d+")"}).appendTo(l);var c=$("<div>",{class:"red-ui-search-result-description"}).appendTo(a);if(o.z){var p=RED.nodes.workspace(o.z);p=p?"flow:"+p.label:"subflow:"+(p=RED.nodes.subflow(o.z)).name,$("<div>",{class:"red-ui-search-result-node-flow"}).text(p).appendTo(c)}$("<div>",{class:"red-ui-search-result-node-label"}).text(n.label||o.id).appendTo(c),$("<div>",{class:"red-ui-search-result-node-type"}).text(o.type).appendTo(c),$("<div>",{class:"red-ui-search-result-node-id"}).text(o.id).appendTo(c),a.click(function(e){e.preventDefault(),f(o)})}},scrollOnAdd:!1})}function f(e){g(),RED.view.reveal(e.id)}function h(){e||(t||(RED.keyboard.add("*","escape",function(){g()}),$("#header-shade").show(),$("#editor-shade").show(),$("#palette-shade").show(),$("#sidebar-shade").show(),$("#sidebar-separator").hide(),c={},RED.nodes.eachWorkspace(a),RED.nodes.eachSubflow(a),RED.nodes.eachConfig(a),RED.nodes.eachNode(a),(p=Object.keys(c)).sort(),p.forEach(function(t){c[t]=Object.keys(c[t]).map(function(e){return c[t][e]})}),null===o&&r(),o.slideDown(300),RED.events.emit("search:open"),t=!0),n.focus())}function g(){t&&(RED.keyboard.remove("escape"),t=!1,$("#header-shade").hide(),$("#editor-shade").hide(),$("#palette-shade").hide(),$("#sidebar-shade").hide(),$("#sidebar-separator").show(),null!==o&&o.slideUp(200,function(){n.searchBox("value","")}),RED.events.emit("search:close"))}return{init:function(){RED.actions.add("core:search",h),RED.events.on("editor:open",function(){e=!0}),RED.events.on("editor:close",function(){e=!1}),RED.events.on("type-search:open",function(){e=!0}),RED.events.on("type-search:close",function(){e=!1}),$("#header-shade").on("mousedown",g),$("#editor-shade").on("mousedown",g),$("#palette-shade").on("mousedown",g),$("#sidebar-shade").on("mousedown",g)},show:h,hide:g}}(),RED.typeSearch=function(){var r,d,t,n,o,i=null,l=-1,a=!1,s="",c={};function p(){var e=d.find("li.selected");if(1===e.length){var t=d.parent(),n=t.height(),o=(t.scrollTop(),e.position().top),i=e.height();n<o+i?t.animate({scrollTop:"-="+(n-(o+i)-10)},50):o<0&&t.animate({scrollTop:"+="+(o-10)},50)}}function u(){i=$("<div>",{id:"red-ui-type-search",class:"red-ui-search red-ui-type-search"}).appendTo("#main-container");var e=$("<div>",{class:"red-ui-search-container"}).appendTo(i);(r=$('<input type="text">').attr("placeholder",RED._("search.addNode")).appendTo(e).searchBox({delay:50,change:function(){var e;e=$(this).val(),s=e.toLowerCase(),d.editableList("filter"),d.editableList("sort"),setTimeout(function(){l=0,d.children().removeClass("selected"),d.children(":visible:first").addClass("selected")},100)}})).on("keydown",function(e){var t=d.children(":visible");if(0<t.length)if(40===e.keyCode)l<t.length-1&&(-1<l&&$(t[l]).removeClass("selected"),l++),$(t[l]).addClass("selected"),p(),e.preventDefault();else if(38===e.keyCode)0<l&&(l<t.length&&$(t[l]).removeClass("selected"),l--),$(t[l]).addClass("selected"),p(),e.preventDefault();else if(13===e.keyCode){var n=Math.max(0,l);n<t.length&&f($(t[n]).find(".red-ui-editableList-item-content").data("data"))}}),t=$("<div>",{class:"red-ui-search-results-container"}).appendTo(i),d=$("<ol>",{id:"search-result-list",style:"position: absolute;top: 0;bottom: 0;left: 0;right: 0;"}).appendTo(t).editableList({addButton:!1,filter:function(e){return""===s||!e.recent&&!e.common&&(""===s||-1<e.index.indexOf(s))},sort:function(e,t){if(""===s)return e.i-t.i;var n=e.index.indexOf(s),o=t.index.indexOf(s);return-1===n?1:-1===o?-1:n===o?m(e,t):n-o},addItem:function(e,t,n){var o=n.def;n.index=n.type.toLowerCase(),n.separator&&e.addClass("red-ui-search-result-separator");var i=$("<a>",{href:"#",class:"red-ui-search-result"}).appendTo(e),a=$("<div>",{class:"red-ui-search-result-node"}).appendTo(i),s=RED.utils.getNodeColor(n.type,o),r=RED.utils.getNodeIcon(o);a.css("backgroundColor",s);var d=$("<div/>",{class:"palette_icon_container"}).appendTo(a);$("<div/>",{class:"palette_icon",style:"background-image: url("+r+")"}).appendTo(d),0<o.inputs&&$("<div/>",{class:"red-ui-search-result-node-port"}).appendTo(a),0<o.outputs&&$("<div/>",{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(a);var l=$("<div>",{class:"red-ui-search-result-description"}).appendTo(i),c=n.label;n.index+="|"+c.toLowerCase(),$("<div>",{class:"red-ui-search-result-node-label"}).text(c).appendTo(l),i.click(function(e){e.preventDefault(),f(n)})},scrollOnAdd:!1})}function f(e){g(),c[e.type]=Date.now(),n(e.type)}function h(e){if(a){for(var t=$(e.target);"body"!==t.prop("nodeName").toLowerCase();){if("red-ui-type-search"===t.attr("id"))return;t=t.parent()}g(!0),o&&o()}}function g(e){a&&(RED.keyboard.remove("escape"),a=!1,null!==i&&t.slideUp(e?50:200,function(){i.hide(),r.searchBox("value","")}),RED.events.emit("type-search:close"),RED.view.focus(),$(document).off("mousedown.type-search"),$(document).off("mouseup.type-search"),$(document).off("click.type-search"))}function v(t,e){var n=t;if(void 0!==e.paletteLabel)try{n=("function"==typeof e.paletteLabel?e.paletteLabel.call(e):e.paletteLabel)||"",n+=" ("+t+")"}catch(e){console.log("Definition error: "+t+".paletteLabel",e)}return n}function m(e,t){var n=e.label.toLowerCase(),o=t.label.toLowerCase();return n<o?-1:n===o?0:1}return{show:function(e){a?(i.hide(),t.hide()):(RED.keyboard.add("*","escape",function(){g(),o&&o()}),null===i&&u(),a=!0,setTimeout(function(){$(document).on("mousedown.type-search",h),$(document).on("mouseup.type-search",h),$(document).on("click.type-search",h)},200)),function(){var e;d.editableList("empty"),r.searchBox("value",""),l=-1;var t=["inject","debug","function","change","switch"],n=Object.keys(c);n.sort(function(e,t){return c[t]-c[e]}),n=n.filter(function(e){return-1===t.indexOf(e)});var o=[];RED.nodes.registry.getNodeTypes().forEach(function(e){var t=RED.nodes.getType(e);"config"!==t.category&&"unknown"!==e&&"tab"!==e&&o.push({type:e,def:t,label:v(e,t)})}),o.sort(m);var i,a=0;for(e=0;e<t.length;e++){var s=RED.nodes.getType(t[e]);s&&((i={type:t[e],common:!0,def:s,i:a++}).label=v(i.type,i.def),e===t.length-1&&(i.separator=!0),d.editableList("addItem",i))}for(e=0;e<Math.min(5,n.length);e++)(i={type:n[e],def:RED.nodes.getType(n[e]),recent:!0,i:a++}).label=v(i.type,i.def),e===n.length-1&&(i.separator=!0),d.editableList("addItem",i);for(e=0;e<o.length;e++)o[e].i=a++,d.editableList("addItem",o[e]);setTimeout(function(){l=0,d.children(":first").addClass("selected")},100)}(),n=e.add,closeCallback=e.close,RED.events.emit("type-search:open"),i.css({left:e.x+"px",top:e.y+"px"}).show(),t.slideDown(300),setTimeout(function(){t.find(".red-ui-editableList-container").scrollTop(0),r.focus()},100)},hide:g}}(),RED.subflow=function(){function d(e,t){var n={x:50,y:30};t||(n.x+=110);for(var o=0;o<e.out.length+e.in.length;o++){var i;(i=o<e.out.length?e.out[o]:e.in[o-e.out.length]).x==n.x&&i.y==n.y&&(n.x+=55,o=0)}return n}function s(){var t=RED.nodes.subflow(RED.workspaces.active());if(0!==t.in.length){var n=t.in[0],o=[];return RED.nodes.eachLink(function(e){"subflow"==e.source.type&&e.source.z==t.id&&e.source.i==n.i?o.push(e):e.target.type=="subflow:"+t.id&&o.push(e)}),o.forEach(function(e){RED.nodes.removeLink(e)}),t.in=[],$("#workspace-subflow-input-add").removeClass("active"),$("#workspace-subflow-input-remove").addClass("active"),t.changed=!0,{subflowInputs:[n],links:o}}}function r(e){var t=RED.nodes.subflow(RED.workspaces.active());if(0!==t.out.length){void 0===e&&(e=[t.out[t.out.length-1]]);var n=[];for(e.sort(function(e,t){return t.i-e.i}),i=0;i<e.length;i++){var o=e[i];t.out.splice(o.i,1);var a=[],s=[];RED.nodes.eachLink(function(e){"subflow"==e.target.type&&e.target.z==t.id&&e.target.i==o.i&&a.push(e),e.source.type=="subflow:"+t.id&&(e.sourcePort==o.i?a.push(e):e.sourcePort>o.i&&s.push(e))}),a.forEach(function(e){RED.nodes.removeLink(e)}),s.forEach(function(e){e.sourcePort--}),n=n.concat(a);for(var r=o.i;r<t.out.length;r++)t.out[r].i--,t.out[r].dirty=!0}return t.changed=!0,{subflowOutputs:e,links:n}}}function l(t){var n=RED.nodes.subflow(RED.workspaces.active());c(n);var o=[];if(n)return RED.nodes.filterNodes({type:"subflow:"+n.id}).forEach(function(e){for(o.push({id:e.id,changed:e.changed}),t&&(e.changed=!0),e.inputs=n.in.length,e.outputs=n.out.length;e.outputs<e.ports.length;)e.ports.pop();e.resize=!0,e.dirty=!0,RED.editor.updateNodeProperties(e)}),RED.editor.validateNode(n),{instances:o}}function c(e){e&&($("#workspace-subflow-input-add").toggleClass("active",0!==e.in.length),$("#workspace-subflow-input-remove").toggleClass("active",0===e.in.length),$("#workspace-subflow-output .spinner-value").text(e.out.length))}function n(a){var e=$("#workspace-toolbar");e.empty(),$('<a class="button" id="workspace-subflow-edit" href="#" data-i18n="[append]subflow.editSubflowProperties"><i class="fa fa-pencil"></i> </a>').appendTo(e),$('<span style="margin-left: 5px;" data-i18n="subflow.input"></span> <div style="display: inline-block;" class="button-group"><a id="workspace-subflow-input-remove" class="button active" href="#">0</a><a id="workspace-subflow-input-add" class="button" href="#">1</a></div>').appendTo(e),$('<span style="margin-left: 5px;" data-i18n="subflow.output"></span> <div id="workspace-subflow-output" style="display: inline-block;" class="button-group spinner-group"><a id="workspace-subflow-output-remove" class="button" href="#"><i class="fa fa-minus"></i></a><div class="spinner-value">3</div><a id="workspace-subflow-output-add" class="button" href="#"><i class="fa fa-plus"></i></a></div>').appendTo(e),$('<a class="button" id="workspace-subflow-delete" href="#" data-i18n="[append]subflow.deleteSubflow"><i class="fa fa-trash"></i> </a>').appendTo(e),e.i18n(),$("#workspace-subflow-output-remove").click(function(e){e.preventDefault();var t=RED.nodes.dirty(),n=a.changed,o=r();if(o){var i=l(!0);RED.history.push({t:"delete",links:o.links,subflowOutputs:o.subflowOutputs,changed:n,dirty:t,subflow:{instances:i.instances}}),RED.view.select(),RED.nodes.dirty(!0),RED.view.redraw(!0)}}),$("#workspace-subflow-output-add").click(function(e){e.preventDefault(),function(e){var t=RED.nodes.subflow(RED.workspaces.active()),n=d(t,!1),o={type:"subflow",direction:"out",z:t.id,i:t.out.length,x:n.x,y:n.y,id:RED.nodes.id()},i=t.out.length;t.out.push(o),t.dirty=!0;var a=RED.nodes.dirty(),s=t.changed;t.changed=!0;var r={t:"edit",node:t,dirty:a,changed:s,subflow:{outputCount:i,instances:l(!0).instances}};RED.history.push(r),RED.view.select(),RED.nodes.dirty(!0),RED.view.redraw(),$("#workspace-subflow-output .spinner-value").text(t.out.length)}()}),$("#workspace-subflow-input-add").click(function(e){e.preventDefault(),function(){var e=RED.nodes.subflow(RED.workspaces.active());if(1!==e.in.length){var t=d(e,!0),n={type:"subflow",direction:"in",z:e.id,i:e.in.length,x:t.x,y:t.y,id:RED.nodes.id()},o=e.in.length;e.in.push(n),e.dirty=!0;var i=RED.nodes.dirty(),a=e.changed;e.changed=!0;var s={t:"edit",node:e,dirty:i,changed:a,subflow:{inputCount:o,instances:l(!0).instances}};RED.history.push(s),RED.view.select(),RED.nodes.dirty(!0),RED.view.redraw(),$("#workspace-subflow-input-add").addClass("active"),$("#workspace-subflow-input-remove").removeClass("active")}}()}),$("#workspace-subflow-input-remove").click(function(e){e.preventDefault();var t=RED.nodes.dirty(),n=a.changed;a.changed=!0;var o=s();if(o){var i=l(!0);RED.history.push({t:"delete",links:o.links,changed:n,subflowInputs:o.subflowInputs,dirty:t,subflow:{instances:i.instances}}),RED.view.select(),RED.nodes.dirty(!0),RED.view.redraw(!0)}}),$("#workspace-subflow-edit").click(function(e){RED.editor.editSubflow(RED.nodes.subflow(RED.workspaces.active())),e.preventDefault()}),$("#workspace-subflow-delete").click(function(e){e.preventDefault();var t=RED.nodes.dirty(),n=o(RED.workspaces.active());n.t="delete",n.dirty=t,RED.history.push(n)}),c(a),$("#chart").css({"margin-top":"40px"}),$("#workspace-toolbar").show()}function o(e){var t=[],n=[],o=RED.nodes.subflow(e);RED.nodes.eachNode(function(e){e.type=="subflow:"+o.id&&t.push(e),e.z==o.id&&t.push(e)}),RED.nodes.eachConfig(function(e){e.z==o.id&&t.push(e)});for(var i=[],a=0;a<t.length;a++){var s=RED.nodes.remove(t[a].id);n=n.concat(s.links),i=i.concat(s.nodes)}return t=t.concat(i),RED.nodes.removeSubflow(o),RED.workspaces.remove(o),RED.nodes.dirty(!0),RED.view.redraw(),{nodes:t,links:n,subflow:{subflow:o}}}function e(){var n=0;RED.nodes.eachSubflow(function(e){var t=new RegExp("^Subflow (\\d+)$").exec(e.name);t&&(n=Math.max(n,t[1]))});var e="Subflow "+(n+1),t=RED.nodes.id(),o={type:"subflow",id:t,name:e,info:"",in:[],out:[]};RED.nodes.addSubflow(o),RED.history.push({t:"createSubflow",subflow:{subflow:o},dirty:RED.nodes.dirty()}),RED.workspaces.show(t),RED.nodes.dirty(!0)}function t(){var e=RED.view.selection();if(e.nodes){var t,i,a={},o=[],n=[],s=[],r=[],d={},l=[e.nodes[0].x,e.nodes[0].y,e.nodes[0].x,e.nodes[0].y];for(t=0;t<e.nodes.length;t++)i=e.nodes[t],a[i.id]={n:i,outputs:{}},l=[Math.min(l[0],i.x),Math.min(l[1],i.y),Math.max(l[2],i.x),Math.max(l[3],i.y)];var c=[(l[2]+l[0])/2,(l[3]+l[1])/2];RED.nodes.eachLink(function(e){a[e.source.id]&&a[e.target.id],a[e.source.id]&&!a[e.target.id]&&(r.push(e),n.push(e)),!a[e.source.id]&&a[e.target.id]&&(s.push(e),d[e.target.id]=e.target,n.push(e))});var p={};if((r=r.filter(function(e){return p[e.source.id+":"+e.sourcePort]?(p[e.source.id+":"+e.sourcePort].targets.push(e.target),!1):(e.targets=[],e.targets.push(e.target),p[e.source.id+":"+e.sourcePort]=e,!0)})).sort(function(e,t){return e.source.y-t.source.y}),1<Object.keys(d).length)RED.notify(RED._("subflow.errors.multipleInputsToSelection"),"error");else{var u=0;RED.nodes.eachSubflow(function(e){var t=new RegExp("^Subflow (\\d+)$").exec(e.name);t&&(u=Math.max(u,t[1]))});var f="Subflow "+(u+1),h=RED.nodes.id(),g={type:"subflow",id:h,name:f,info:"",in:Object.keys(d).map(function(e,t){var n=t;return{type:"subflow",direction:"in",x:d[e].x-d[e].w/2-80,y:d[e].y,z:h,i:n,id:RED.nodes.id(),wires:[{id:d[e].id}]}}),out:r.map(function(e,t){var n=t;return{type:"subflow",direction:"in",x:e.source.x+e.source.w/2+80,y:e.source.y,z:h,i:n,id:RED.nodes.id(),wires:[{id:e.source.id,port:e.sourcePort}]}})};RED.nodes.addSubflow(g);var v={id:RED.nodes.id(),type:"subflow:"+g.id,x:c[0],y:c[1],z:RED.workspaces.active(),inputs:g.in.length,outputs:g.out.length,h:Math.max(30,15*(g.out.length||0)),changed:!0};for(v._def=RED.nodes.getType(v.type),RED.editor.validateNode(v),RED.nodes.add(v),s.forEach(function(e){var t={source:e.source,sourcePort:e.sourcePort,target:v};o.push(t),RED.nodes.addLink(t)}),r.forEach(function(e,n){e.targets.forEach(function(e){var t={source:v,sourcePort:n,target:e};o.push(t),RED.nodes.addLink(t)})}),g.in.forEach(function(n){n.wires.forEach(function(e){var t={source:n,sourcePort:0,target:RED.nodes.node(e.id)};o.push(t),RED.nodes.addLink(t)})}),g.out.forEach(function(n,e){n.wires.forEach(function(e){var t={source:RED.nodes.node(e.id),sourcePort:e.port,target:n};o.push(t),RED.nodes.addLink(t)})}),t=0;t<n.length;t++)RED.nodes.removeLink(n[t]);for(t=0;t<e.nodes.length;t++)i=e.nodes[t],/^link /.test(i.type)&&(i.links=i.links.filter(function(e){var t=a.hasOwnProperty(e);if(!t){var n=RED.nodes.node(e);if(n&&n.links){var o=n.links.indexOf(i.id);-1<o&&n.links.splice(o,1)}}return t})),i.z=g.id;RED.history.push({t:"createSubflow",nodes:[v.id],links:o,subflow:{subflow:g},activeWorkspace:RED.workspaces.active(),removedLinks:n,dirty:RED.nodes.dirty()}),RED.view.select(null),RED.editor.validateNode(g),RED.nodes.dirty(!0),RED.view.redraw(!0)}}else RED.notify(RED._("subflow.errors.noNodesSelected"),"error")}return{init:function(){RED.events.on("workspace:change",function(e){var t=RED.nodes.subflow(e.workspace);t?n(t):($("#workspace-toolbar").hide().empty(),$("#chart").css({"margin-top":"0"}))}),RED.events.on("view:selection-changed",function(e){e.nodes?RED.menu.setDisabled("menu-item-subflow-convert",!1):RED.menu.setDisabled("menu-item-subflow-convert",!0)}),RED.actions.add("core:create-subflow",e),RED.actions.add("core:convert-to-subflow",t),$('<script type="text/x-red" data-template-name="subflow"><div class="form-row"><label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label><input type="text" id="node-input-name"></div><\/script>').appendTo(document.body),$('<script type="text/x-red" data-template-name="subflow-template"><div class="form-row"><i class="fa fa-tag"></i><label for="subflow-input-name" data-i18n="common.label.name"></label><input type="text" id="subflow-input-name"></div><div class="form-row" style="margin-bottom: 0px;"><label for="subflow-input-info" data-i18n="editor:subflow.info"></label><a href="https://help.github.com/articles/markdown-basics/" style="font-size: 0.8em; float: right;" data-i18n="[html]subflow.format"></a></div><div class="form-row node-text-editor-row"><div style="height: 250px;" class="node-text-editor" id="subflow-input-info-editor"></div></div><div class="form-row form-tips" id="subflow-dialog-user-count"></div><\/script>').appendTo(document.body)},createSubflow:e,convertToSubflow:t,removeSubflow:o,refresh:l,removeInput:s,removeOutput:r}}(),RED.userSettings=function(){var t=700,n=!1,r=[];function e(e){r.push(e)}function o(s){if(!n)if(RED.user.hasPermission("settings.write")){n=!0;var e={title:RED._("menu.label.userSettings"),buttons:[{id:"node-dialog-ok",text:RED._("common.label.close"),class:"primary",click:function(){RED.tray.close()}}],resize:function(e){t=e.width},open:function(e){var t=e.find(".editor-tray-body"),n=$("<div></div>").appendTo(t),o=$("<div></div>",{id:"user-settings-tabs-container"}).appendTo(n);$("<ul></ul>",{id:"user-settings-tabs"}).appendTo(o);var i=RED.tabs.create({id:"user-settings-tabs",vertical:!0,onchange:function(e){setTimeout(function(){$("#user-settings-tabs-content").children().hide(),$("#"+e.id).show(),e.pane.focus&&e.pane.focus()},50)}}),a=$("<div></div>",{id:"user-settings-tabs-content"}).appendTo(n);r.forEach(function(e){i.addTab({id:"user-settings-tab-"+e.id,label:e.title,pane:e}),e.get().hide().appendTo(a)}),n.i18n(),i.activateTab("user-settings-tab-"+(s||"view")),$("#sidebar-shade").show()},close:function(){n=!1,r.forEach(function(e){e.close&&e.close()}),$("#sidebar-shade").hide()},show:function(){}};null!==t&&(e.width=t),RED.tray.show(e)}else RED.notify(RED._("user.errors.settings"),"error")}var s=[{title:"menu.label.view.grid",options:[{setting:"view-show-grid",oldSetting:"menu-menu-item-view-show-grid",label:"menu.label.view.showGrid",toggle:!0,onchange:"core:toggle-show-grid"},{setting:"view-snap-grid",oldSetting:"menu-menu-item-view-snap-grid",label:"menu.label.view.snapGrid",toggle:!0,onchange:"core:toggle-snap-grid"},{setting:"view-grid-size",label:"menu.label.view.gridSize",type:"number",default:20,onchange:RED.view.gridSize}]},{title:"menu.label.nodes",options:[{setting:"view-node-status",oldSetting:"menu-menu-item-status",label:"menu.label.displayStatus",default:!0,toggle:!0,onchange:"core:toggle-status"}]},{title:"menu.label.other",options:[{setting:"view-show-tips",oldSettings:"menu-menu-item-show-tips",label:"menu.label.showTips",toggle:!0,default:!0,onchange:"core:toggle-show-tips"}]}],d={};function l(){var o=$('<div id="user-settings-tab-view" class="node-help"></div>'),i=RED.settings.get("editor")||{};return i.view=i.view||{},s.forEach(function(e){$("<h3></h3>").text(RED._(e.title)).appendTo(o),e.options.forEach(function(e){var t=i.view[e.setting],n=$('<div class="user-settings-row"></div>').appendTo(o);e.toggle?$('<label for="user-settings-'+e.setting+'"><input id="user-settings-'+e.setting+'" type="checkbox"> '+RED._(e.label)+"</label>").appendTo(n).find("input").prop("checked",t):($('<label for="user-settings-'+e.setting+'">'+RED._(e.label)+"</label>").appendTo(n),$('<input id="user-settings-'+e.setting+'" type="'+(e.type||"text")+'">').appendTo(n).val(t))})}),o}function c(e,t){var n=d[e],o=RED.settings.get("editor")||{};o.view=o.view||{},o.view[n.setting]=t,RED.settings.set("editor",o);var i=n.onchange;"string"==typeof i&&(i=RED.actions.get(i)),i&&i.call(n,t)}return{init:function(){RED.actions.add("core:show-user-settings",o),RED.actions.add("core:show-help",function(){o("keyboard")}),e({id:"view",title:RED._("menu.label.view.view"),get:l,close:function(){s.forEach(function(e){e.options.forEach(function(e){var t=$("#user-settings-"+e.setting);e.toggle?c(e.setting,t.prop("checked")):c(e.setting,t.val())})})}});var i=RED.settings.get("editor")||{};i.view=i.view||{};var a=!1;s.forEach(function(e){e.options.forEach(function(e){if(e.oldSetting){var t=RED.settings.get(e.oldSetting);null!=t&&(i.view[e.setting]=t,a=!0,RED.settings.remove(e.oldSetting))}if((d[e.setting]=e).onchange){var n=i.view[e.setting];null==n&&e.hasOwnProperty("default")&&(n=e.default,i.view[e.setting]=n,a=!0);var o=e.onchange;"string"==typeof o&&(o=RED.actions.get(o)),o&&o.call(e,n)}})}),a&&RED.settings.set("editor",i)},toggle:function(e){var t=d[e],n=RED.settings.get("editor")||{};n.view=n.view||{},c(e,!n.view[t.setting])},show:o,add:e}}(),RED.projects=function(){var u,a,B;function v(e){var t;"git_missing_user"===e.error?t=RED.notify("<p>"+RED._("projects.errors.no-username-email")+"</p>",{fixed:!0,type:"error",buttons:[{text:RED._("common.label.cancel"),click:function(){t.close()}},{text:RED._("projects.config-git"),click:function(){RED.userSettings.show("gitconfig"),t.close()}}]}):(console.log(e),t=RED.notify("<p>"+RED._("projects.errors.unexpected")+":</p><p>"+e.message+"</p><small>"+RED._("projects.errors.code")+": "+e.error+"</small>",{fixed:!0,modal:!0,type:"error",buttons:[{text:RED._("common.label.close"),click:function(){t.close()}}]}))}var s={};function t(){var b=$('<div class="projects-dialog-screen-start-hero"></div>');$('<span><i class="fa fa-files-o fa-2x"></i> &nbsp; &nbsp; <i class="fa fa-long-arrow-right fa-2x"></i> &nbsp; &nbsp; <i class="fa fa-archive fa-2x"></i></span>').appendTo(b),$("<hr>").appendTo(b);var T,_,k,j,C,S,O,L,P,N,I,A,c,d,l,y,w,D,E,R,x,z,M,f,h,r,p,g={};s={welcome:{content:function(e){var t=$('<div class="projects-dialog-screen-start"></div>');b.appendTo(t);var n=$('<div class="projects-dialog-screen-start-body"></div>').appendTo(t);$("<p>").text(RED._("projects.welcome.hello")).appendTo(n),$("<p>").text(RED._("projects.welcome.desc0")).appendTo(n),$("<p>").text(RED._("projects.welcome.desc1")).appendTo(n),$("<p>").text(RED._("projects.welcome.desc2")).appendTo(n);var o=$('<div style="text-align: center"></div>').appendTo(n),i=$('<button data-type="empty" class="editor-button projects-dialog-screen-create-type"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-asterisk"></i><br/>'+RED._("projects.welcome.create")+"</button>").appendTo(o),a=$('<button data-type="clone" class="editor-button projects-dialog-screen-create-type"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.welcome.clone")+"</button>").appendTo(o);return i.click(function(e){e.preventDefault(),g={action:"create"},m("git-config")}),a.click(function(e){e.preventDefault(),g={action:"clone"},m("git-config")}),t},buttons:[{text:RED._("projects.welcome.not-right-now"),click:function(){g={},$(this).dialog("close")}}]},"git-config":{content:function(e){var t=!1,n=RED.settings.get("git");n&&n.user?n=n.user:RED.settings.git&&RED.settings.git.globalUser&&(t=!0,n=RED.settings.git.globalUser);var o=function(){var e=r.val().trim(),t=p.val().trim(),n=0<e.length&&0<t.length;$("#projects-dialog-git-config").prop("disabled",!n).toggleClass("disabled ui-button-disabled ui-state-disabled",!n)},i=$('<div class="projects-dialog-screen-start"></div>');b.appendTo(i);var a=$('<div class="projects-dialog-screen-start-body"></div>').appendTo(i);$("<p>").text(RED._("projects.git-config.setup")).appendTo(a),$("<p>").text(RED._("projects.git-config.desc0")).appendTo(a),$("<p>").text(RED._("projects.git-config.desc1")).appendTo(a),t&&$("<p>").text(RED._("projects.git-config.desc2")).appendTo(a),$("<p>").text(RED._("projects.git-config.desc3")).appendTo(a);var s=$('<div class="form-row"></div>').appendTo(a);return $('<label for="">'+RED._("projects.git-config.username")+"</label>").appendTo(s),(r=$('<input type="text">').val(n&&n.name||"").appendTo(s)).on("change keyup paste",o),s=$('<div class="form-row"></div>').appendTo(a),$('<label for="">'+RED._("projects.git-config.email")+"</label>").appendTo(s),(p=$('<input type="text">').val(n&&n.email||"").appendTo(s)).on("change keyup paste",o),setTimeout(function(){r.focus(),o()},50),i},buttons:[{text:RED._("common.label.back"),click:function(){m("welcome")}},{id:"projects-dialog-git-config",text:RED._("common.label.next"),class:"primary",click:function(){var e=RED.settings.get("git")||{};e.user=e.user||{},e.user.name=r.val(),e.user.email=p.val(),RED.settings.set("git",e),"create"===g.action?m("project-details"):"clone"===g.action&&m("clone-project")}}]},"project-details":{content:function(e){var n=null,o=!1;$.getJSON("projects",function(e){n={},e.projects.forEach(function(e){n[e]=!0,o&&(o=!1,a())})});var t=$('<div class="projects-dialog-screen-start"></div>');b.appendTo(t);var i=$('<div class="projects-dialog-screen-start-body"></div>').appendTo(t);$("<p>").text(RED._("projects.project-details.create")).appendTo(i),$("<p>").text(RED._("projects.project-details.desc0")).appendTo(i),$("<p>").text(RED._("projects.project-details.desc1")).appendTo(i),$("<p>").text(RED._("projects.project-details.desc2")).appendTo(i);var a=function(){var e=f.val(),t=!0;if(p){if(null===n)return void(o=!0);c.empty(),!/^[a-zA-Z0-9\-_]+$/.test(e)||n[e]?(f.addClass("input-error"),$('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>').appendTo(c),t=d=!1,n[e]?projectNameSublabel.text(RED._("projects.project-details.already-exists")):projectNameSublabel.text(RED._("projects.project-details.must-contain"))):(f.removeClass("input-error"),$('<i style="margin-top: 8px;" class="fa fa-check"></i>').appendTo(c),projectNameSublabel.text(RED._("projects.project-details.must-contain")),d=!0),u=e}t=d,$("#projects-dialog-create-name").prop("disabled",!t).toggleClass("disabled ui-button-disabled ui-state-disabled",!t)},s=$('<div class="form-row"></div>').appendTo(i);$('<label for="projects-dialog-screen-create-project-name">'+RED._("projects.project-details.project-name")+"</label>").appendTo(s);var r=$('<div style="position:relative;"></div>').appendTo(s);f=$('<input id="projects-dialog-screen-create-project-name" type="text"></input>').val(g.name||"").appendTo(r);var d,l,c=$('<div class="projects-dialog-screen-input-status"></div>').appendTo(r),p=!1,u="";return f.on("change keyup paste",function(){if(p=f.val()!==u,l)clearTimeout(l);else if(p&&(c.empty(),$('<img src="red/images/spin.svg"/>').appendTo(c),""===f.val()))return void a();l=setTimeout(function(){a(),l=null},300)}),projectNameSublabel=$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.project-details.must-contain")+"</small></label>").appendTo(s).find("small"),s=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(i),$('<label for="projects-dialog-screen-create-project-desc">'+RED._("projects.project-details.desc")+"</label>").appendTo(s),h=$('<input id="projects-dialog-screen-create-project-desc" type="text">').val(g.summary||"").appendTo(s),$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.project-details.opt")+"</small></label>").appendTo(s),setTimeout(function(){f.focus(),f.change()},50),t},buttons:function(e){return[{text:RED._("common.label.back"),click:function(){m("git-config")}},{id:"projects-dialog-create-name",disabled:!0,text:RED._("common.label.next"),class:"primary disabled",click:function(){g.name=f.val(),g.summary=h.val(),m("default-files",e)}}]}},"clone-project":{content:function(e){var t=$('<div class="projects-dialog-screen-start"></div>');b.appendTo(t);var n=$('<div class="projects-dialog-screen-start-body"></div>').appendTo(t);$("<p>").text(RED._("projects.clone-project.clone")).appendTo(n),$("<p>").text(RED._("projects.clone-project.desc0")).appendTo(n);var i=null,a=!1;$.getJSON("projects",function(e){i={},e.projects.forEach(function(e){i[e]=!0,a&&(a=!1,s())})});var o,s=function(){var e=y.val(),t=!0;if(p){if(null===i)return void(a=!0);c.empty(),!/^[a-zA-Z0-9\-_]+$/.test(e)||i[e]?(y.addClass("input-error"),$('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>').appendTo(c),t=d=!1,i[e]?x.text(RED._("projects.clone-project.already-exists")):x.text(RED._("projects.clone-project.must-contain"))):(y.removeClass("input-error"),$('<i style="margin-top: 8px;" class="fa fa-check"></i>').appendTo(c),x.text(RED._("projects.clone-project.must-contain")),d=!0),u=e}t=d;var n=D.val(),o=0<n.length&&!/\s/.test(n);/^https?:\/\/[^/]+@/i.test(n)&&($("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.no-info-in-url")),o=!1),o?D.removeClass("input-error"):(h&&D.addClass("input-error"),t=!1),/^https?:\/\//.test(n)?($(".projects-dialog-screen-create-row-creds").show(),$(".projects-dialog-screen-create-row-sshkey").hide()):/^(?:ssh|[\S]+?@[\S]+?):(?:\/\/)?/.test(n)?($(".projects-dialog-screen-create-row-creds").hide(),$(".projects-dialog-screen-create-row-sshkey").show()):($(".projects-dialog-screen-create-row-creds").hide(),$(".projects-dialog-screen-create-row-sshkey").hide()),$("#projects-dialog-clone-project").prop("disabled",!t).toggleClass("disabled ui-button-disabled ui-state-disabled",!t)};o=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty projects-dialog-screen-create-row-clone"></div>').appendTo(n),$('<label for="projects-dialog-screen-create-project-name">'+RED._("projects.clone-project.project-name")+"</label>").appendTo(o);var r=$('<div style="position:relative;"></div>').appendTo(o);y=$('<input id="projects-dialog-screen-create-project-name" type="text"></input>').appendTo(r);var d,l,c=$('<div class="projects-dialog-screen-input-status"></div>').appendTo(r),p=!1,u="",f="";y.on("change keyup paste",function(){if(p=y.val()!==u,l)clearTimeout(l);else if(p&&(c.empty(),$('<img src="red/images/spin.svg"/>').appendTo(c),""===y.val()))return void s();l=setTimeout(function(){s(),l=null},300)}),x=$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.clone-project.must-contain")+"</small></label>").appendTo(o).find("small"),o=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(n),$('<label for="projects-dialog-screen-create-project-repo">'+RED._("projects.clone-project.git-url")+"</label>").appendTo(o),D=$('<input id="projects-dialog-screen-create-project-repo" type="text" placeholder="https://git.example.com/path/my-project.git"></input>').appendTo(o),$('<label id="projects-dialog-screen-create-project-repo-label" class="projects-edit-form-sublabel"><small>'+RED._("projects.clone-project.protocols")+"</small></label>").appendTo(o);var h=!1,g="";D.on("change keyup paste",function(){h=!0;var e=$(this).val();g!==e&&$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.protocols"));var t=/\/([^/]+?)(?:\.git)?$/.exec(g=e);if(t){var n=y.val();""!==n&&n!==f||(f=t[1],y.val(f),y.change())}s()});var v=$('<div class="projects-dialog-screen-create-row"></div>').appendTo(n);o=$('<div class="form-row projects-dialog-screen-create-row-auth-error"></div>').hide().appendTo(v),$('<div><i class="fa fa-warning"></i> '+RED._("projects.clone-project.auth-failed")+"</div>").appendTo(o),o=$('<div class="hide form-row projects-dialog-screen-create-row-creds"></div>').hide().appendTo(v),r=$('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(o),$('<label for="projects-dialog-screen-create-project-repo-user">'+RED._("projects.clone-project.username")+"</label>").appendTo(r),E=$('<input id="projects-dialog-screen-create-project-repo-user" type="text"></input>').appendTo(r),r=$('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(o),$('<label for="projects-dialog-screen-create-project-repo-pass">'+RED._("projects.clone-project.passwd")+"</label>").appendTo(r),R=$('<input id="projects-dialog-screen-create-project-repo-pass" type="password"></input>').appendTo(r),o=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').hide().appendTo(v),r=$('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(o),$('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.clone-project.ssh-key")+"</label>").appendTo(r),z=$("<select>",{style:"width: 100%"}).appendTo(r),$.getJSON("settings/user/keys",function(e){var t=0;e.keys.forEach(function(e){z.append($("<option></option>").val(e.name).text(e.name)),t++}),0===t?(z.addClass("input-error"),z.attr("disabled",!0),m.show()):(z.removeClass("input-error"),z.attr("disabled",!1),m.hide())}),r=$('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(o),$('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.clone-project.passphrase")+"</label>").appendTo(r),M=$('<input id="projects-dialog-screen-create-project-repo-passphrase" type="password"></input>').appendTo(r),r=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').appendTo(v);var m=$('<div class="projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(r);return $('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.clone-project.ssh-key-desc")+"</div>").appendTo(m),r=$('<div style="text-align: center">').appendTo(m),$('<button class="editor-button">'+RED._("projects.clone-project.ssh-key-add")+"</button>").appendTo(r).click(function(e){e.preventDefault(),$("#projects-dialog-cancel").click(),RED.userSettings.show("gitconfig"),setTimeout(function(){$("#user-settings-gitconfig-add-key").click()},500)}),o=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(n),$("<label>"+RED._("projects.clone-project.credential-key")+"</label>").appendTo(o),w=$('<input type="password"></input>').appendTo(o),t},buttons:function(e){return[{text:RED._("common.label.back"),click:function(){m("git-config")}},{id:"projects-dialog-clone-project",disabled:!0,text:RED._("common.label.clone"),class:"primary disabled",click:function(){$(".projects-dialog-screen-create-type.selected").data("type");var e={name:y.val()};e.credentialSecret=w.val();var t=D.val();if(/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(t)){var n=z.val();if(!n)return void console.log(RED._("projects.clone-project.cant-get-ssh-key"));e.git={remotes:{origin:{url:t,keyFile:n,passphrase:M.val()}}}}else e.git={remotes:{origin:{url:t,username:E.val(),password:R.val()}}};$(".projects-dialog-screen-create-row-auth-error").hide(),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.protocols")),E.removeClass("input-error"),R.removeClass("input-error"),z.removeClass("input-error"),M.removeClass("input-error"),RED.deploy.setDeployInflight(!0),RED.projects.settings.switchProject(e.name),U({url:"projects",type:"POST",handleAuthFail:!1,responses:{200:function(e){u.dialog("close")},400:{project_exists:function(e){console.log(RED._("projects.clone-project.already-exists2"))},git_error:function(e){console.log(RED._("projects.clone-project.git-error"),e)},git_connection_failed:function(e){D.addClass("input-error"),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.connection-failed"))},git_not_a_repository:function(e){D.addClass("input-error"),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.not-git-repo"))},git_repository_not_found:function(e){D.addClass("input-error"),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.clone-project.repo-not-found"))},git_auth_failed:function(e){$(".projects-dialog-screen-create-row-auth-error").show(),E.addClass("input-error"),R.addClass("input-error"),z.addClass("input-error"),M.addClass("input-error")},missing_flow_file:function(e){u.dialog("close")},project_empty:function(e){u.dialog("close")},credentials_load_failed:function(e){u.dialog("close")},"*":function(e){v(e),$(u).dialog("close")}}}},e).then(function(){RED.events.emit("project:change",{name:name})}).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})}}]}},"default-files":{content:function(e){var t=$('<div class="projects-dialog-screen-start"></div>');b.appendTo(t);var n=$('<div class="projects-dialog-screen-start-body"></div>').appendTo(t);$("<p>").text(RED._("projects.default-files.create")).appendTo(n),$("<p>").text(RED._("projects.default-files.desc0")).appendTo(n),$("<p>").text(RED._("projects.default-files.desc1")).appendTo(n),!e.existingProject&&RED.settings.files&&$("<p>").text(RED._("projects.default-files.desc2")).appendTo(n);var o=function(){var e=!0,t=d.val();""!==t&&/\.json$/.test(t)?(d.hasClass("input-error")&&(d.removeClass("input-error"),d.next().empty()),l.hasClass("input-error")&&(l.removeClass("input-error"),l.next().empty()),l.text(t.substring(0,t.length-5)+"_cred.json")):(e=!1,d.hasClass("input-error")||(d.addClass("input-error"),d.next().empty().append('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>')),l.text(""),l.hasClass("input-error")||(l.addClass("input-error"),l.next().empty().append('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>'))),$("#projects-dialog-create-default-files").prop("disabled",!e).toggleClass("disabled ui-button-disabled ui-state-disabled",!e)},i=$('<div class="form-row"></div>').appendTo(n);$('<label for="projects-dialog-screen-create-project-file">'+RED._("projects.default-files.flow-file")+"</label>").appendTo(i);var a=$('<div style="position:relative;"></div>').appendTo(i),s=g.files&&g.files.flow||RED.settings.files&&RED.settings.files.flow||"flow.json";d=$('<input id="projects-dialog-screen-create-project-file" type="text">').val(s).on("change keyup paste",o).appendTo(a),$('<div class="projects-dialog-screen-input-status"></div>').appendTo(a),$('<label class="projects-edit-form-sublabel"><small>*.json</small></label>').appendTo(i);var r=g.files&&g.files.credentials||RED.settings.files&&RED.settings.files.credentials||"flow_cred.json";return i=$('<div class="form-row"></div>').appendTo(n),$('<label for="projects-dialog-screen-create-project-credfile">'+RED._("projects.default-files.credentials-file")+"</label>").appendTo(i),a=$('<div style="position:relative;"></div>').appendTo(i),l=$('<div style="width: 100%" class="uneditable-input" id="projects-dialog-screen-create-project-credentials">').text(r).appendTo(a),$('<div class="projects-dialog-screen-input-status"></div>').appendTo(a),setTimeout(function(){d.focus(),o()},50),t},buttons:function(e){return[{text:RED._(e.existingProject?"common.label.cancel":"common.label.back"),click:function(){e.existingProject?$(this).dialog("close"):m("project-details",e)}},{id:"projects-dialog-create-default-files",text:RED._("common.label.next"),class:"primary",click:function(){g.files={flow:d.val(),credentials:l.text()},e.existingProject||(g.migrateFiles=!0),m("encryption-config",e)}}]}},"encryption-config":{content:function(e){var t=$('<div class="projects-dialog-screen-start"></div>');b.appendTo(t);var n=$('<div class="projects-dialog-screen-start-body"></div>').appendTo(t);$("<p>").text(RED._("projects.encryption-config.setup")).appendTo(n),e.existingProject?($("<p>").text(RED._("projects.encryption-config.desc0")).appendTo(n),$("<p>").text(RED._("projects.encryption-config.desc1")).appendTo(n)):"disabled"===RED.settings.flowEncryptionType?($("<p>").text(RED._("projects.encryption-config.desc2")).appendTo(n),$("<p>").text(RED._("projects.encryption-config.desc3")).appendTo(n),$("<p>").text(RED._("projects.encryption-config.desc4")).appendTo(n)):("user"===RED.settings.flowEncryptionType?$("<p>").text(RED._("projects.encryption-config.desc5")).appendTo(n):"system"===RED.settings.flowEncryptionType&&$("<p>").text(RED._("projects.encryption-config.desc6")).appendTo(n),$("<p>").text(RED._("projects.encryption-config.desc7")).appendTo(n));var o=function(){var e=!0;"enabled"===$("input[name=projects-encryption-type]:checked").val()&&"custom"===$("input[name=projects-encryption-key]:checked").val()&&(e=e&&""!==c.val()),$("#projects-dialog-create-encryption").prop("disabled",!e).toggleClass("disabled ui-button-disabled ui-state-disabled",!e)},i=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(n);$("<label>"+RED._("projects.encryption-config.credentials")+"</label>").appendTo(i);var a=$('<div style="width: 550px">').appendTo(i),s=$('<div style="min-height:150px; box-sizing: border-box; float: right; vertical-align: top; width: 331px; margin-left: -1px; padding: 15px; margin-top: -15px; border: 1px solid #ccc; border-radius: 3px; display: inline-block">').appendTo(a),r=$('<div style="vertical-align: top; width: 220px; display: inline-block">').appendTo(a),d=$('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid #ccc;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: white;"></div>').appendTo(r);$('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="enabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-lock"></i> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.enable")+"</span></label>").appendTo(d);var l=$('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid white;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: #ccc; "></div>').appendTo(r);return $('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="disabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-unlock"></i> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.disable")+"</span></label>").appendTo(l),r.find("input[name=projects-encryption-type]").click(function(e){var t,n;"enabled"===$(this).val()?(t=d,n=l,$(".projects-encryption-enabled-row").show(),$(".projects-encryption-disabled-row").hide(),"custom"===$("input[name=projects-encryption-key]:checked").val()&&c.focus()):(n=d,t=l,$(".projects-encryption-enabled-row").hide(),$(".projects-encryption-disabled-row").show()),t.css({borderColor:"#ccc",borderRightColor:"white"}),n.css({borderColor:"white",borderRightColor:"#ccc"}),o()}),i=$('<div class="form-row projects-encryption-enabled-row"></div>').appendTo(s),$('<label class="projects-edit-form-inline-label '+("user"!==RED.settings.flowEncryptionType?"disabled":"")+'" style="margin-left: 5px"><input '+("user"!==RED.settings.flowEncryptionType?RED._("projects.encryption-config.disabled"):"")+' type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" value="default" name="projects-encryption-key"> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.copy")+"</span></label>").appendTo(i),i=$('<div class="form-row projects-encryption-enabled-row"></div>').appendTo(s),$('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" value="custom" name="projects-encryption-key"> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.use-custom")+"</span></label>").appendTo(i),i=$('<div class="projects-encryption-enabled-row"></div>').appendTo(s),(c=$('<input disabled type="password" style="margin-left: 25px; width: calc(100% - 30px);"></input>').appendTo(i)).on("change keyup paste",o),i=$('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(s),$('<div class="" style="padding: 5px 20px;"><i class="fa fa-warning"></i> '+RED._("projects.encryption-config.desc8")+"</div>").appendTo(i),s.find("input[name=projects-encryption-key]").click(function(){var e=$(this).val();c.attr("disabled","default"===e),"custom"===e&&c.focus(),o()}),setTimeout(function(){r.find("input[name=projects-encryption-type][value=enabled]").click(),"user"!==RED.settings.flowEncryptionType?s.find("input[name=projects-encryption-key][value=custom]").click():s.find("input[name=projects-encryption-key][value=default]").click(),o()},100),t},buttons:function(o){return[{text:RED._("common.label.back"),click:function(){m("default-files",o)}},{id:"projects-dialog-create-encryption",text:RED._(o.existingProject?"projects.encryption-config.create-project-files":"projects.encryption-config.create-project"),class:"primary disabled",disabled:!0,click:function(){"enabled"===$("input[name=projects-encryption-type]:checked").val()?"custom"===$("input[name=projects-encryption-key]:checked").val()&&(g.credentialSecret=c.val()):g.credentialSecret=!1,RED.deploy.setDeployInflight(!0),RED.projects.settings.switchProject(g.name);var e="POST",t="projects";o.existingProject&&(g.initialise=!0,e="PUT",t="projects/"+B.name);var n=this;U({url:t,type:e,requireCleanWorkspace:!0,handleAuthFail:!1,responses:{200:function(e){g={},o.existingProject?$(n).dialog("close"):(m("create-success"),RED.menu.setDisabled("menu-item-projects-open",!1),RED.menu.setDisabled("menu-item-projects-settings",!1))},400:{project_exists:function(e){console.log(RED._("projects.encryption-config.already-exists"))},git_error:function(e){console.log(RED._("projects.encryption-config.git-error"),e)},git_connection_failed:function(e){projectRepoInput.addClass("input-error")},git_auth_failed:function(e){projectRepoUserInput.addClass("input-error"),projectRepoPasswordInput.addClass("input-error"),console.log(RED._("projects.encryption-config.git-auth-error"),e)},"*":function(e){v(e),$(u).dialog("close")}}}},g).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})}}]}},"create-success":{content:function(e){var t=$('<div class="projects-dialog-screen-start"></div>');b.appendTo(t);var n=$('<div class="projects-dialog-screen-start-body"></div>').appendTo(t);return $("<p>").text(RED._("projects.create-success.success")).appendTo(n),$("<p>").text(RED._("projects.create-success.desc0")).appendTo(n),$("<p>").text(RED._("projects.create-success.desc1")).appendTo(n),$("<p>").text(RED._("projects.create-success.desc2")).appendTo(n),t},buttons:[{text:RED._("common.label.done"),click:function(){$(this).dialog("close")}}]},create:{title:RED._("projects.create.projects"),content:function(e){var s=null;A=null;var r=!1;$.getJSON("projects",function(e){s={},e.projects.forEach(function(e){s[e]=!0,r&&(r=!1,o())})});var t,n=$('<div class="projects-dialog-screen-create"></div>'),o=function(){var e=T.val(),t=!0;if(f){if(null===s)return void(r=!0);u.empty(),!/^[a-zA-Z0-9\-_]+$/.test(e)||s[e]?(T.addClass("input-error"),$('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>').appendTo(u),t=c=!1,s[e]?P.text(RED._("projects.create.already-exists")):P.text(RED._("projects.create.must-contain"))):(T.removeClass("input-error"),$('<i style="margin-top: 8px;" class="fa fa-check"></i>').appendTo(u),P.text(RED._("projects.create.must-contain")),c=!0),h=e}t=c;var n=$(".projects-dialog-screen-create-type.selected").data("type");if("copy"===n)t=!1;else if("clone"===n){var o=C.val(),i=0<o.length&&!/\s/.test(o);/^https?:\/\/[^/]+@/i.test(o)&&($("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.no-info-in-url")),i=!1),i?C.removeClass("input-error"):(D&&C.addClass("input-error"),t=!1),/^https?:\/\//.test(o)?($(".projects-dialog-screen-create-row-creds").show(),$(".projects-dialog-screen-create-row-sshkey").hide()):/^(?:ssh|[\S]+?@[\S]+?):(?:\/\/)?/.test(o)?($(".projects-dialog-screen-create-row-creds").hide(),$(".projects-dialog-screen-create-row-sshkey").show()):($(".projects-dialog-screen-create-row-creds").hide(),$(".projects-dialog-screen-create-row-sshkey").hide())}else if("empty"===n){var a=k.val();""!==a&&/\.json$/.test(a)?k.hasClass("input-error")&&(k.removeClass("input-error"),k.next().empty()):(t=!1,k.hasClass("input-error")||(k.addClass("input-error"),k.next().empty().append('<i style="margin-top: 8px;" class="fa fa-exclamation-triangle"></i>'))),"enabled"===$("input[name=projects-encryption-type]:checked").val()&&"custom"===$("input[name=projects-encryption-key]:checked").val()&&(t=t&&""!==S.val())}else"open"===n&&(t=!!A);$("#projects-dialog-create").prop("disabled",!t).toggleClass("disabled ui-button-disabled ui-state-disabled",!t)};t=$('<div class="form-row button-group"></div>').appendTo(n);var i=$('<button data-type="open" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-folder-open"></i><br/>'+RED._("projects.create.open")+"</button>").appendTo(t),a=$('<button data-type="empty" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-asterisk"></i><br/>'+RED._("projects.create.create")+"</button>").appendTo(t),d=$('<button data-type="clone" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.create.clone")+"</button>").appendTo(t);t.find(".projects-dialog-screen-create-type").click(function(e){switch(e.preventDefault(),n.find(".projects-dialog-screen-create-type").removeClass("selected"),$(this).addClass("selected"),n.find(".projects-dialog-screen-create-row").hide(),n.find(".projects-dialog-screen-create-row-"+$(this).data("type")).show(),o(),T.focus(),$(this).data("type")){case"open":$("#projects-dialog-create").text(RED._("projects.create.open"));break;case"empty":$("#projects-dialog-create").text(RED._("projects.create.create"));break;case"clone":$("#projects-dialog-create").text(RED._("projects.create.clone"))}}),t=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-open"></div>').hide().appendTo(n),function(r){(r=r||{}).height;var o,e=$("<div></div>",{class:"projects-dialog-project-list-container"}),t="",n=$("<div>",{class:"red-ui-search-container"}).appendTo(e),i=$('<input id="projects-dialog-project-list-search" type="text" placeholder="'+RED._("projects.create-project-list.search")+'">').appendTo(n).searchBox({delay:200,change:function(){t=$(this).val().toLowerCase(),l.editableList("filter"),o&&!o.is(":visible")&&o.children().children().removeClass("selected"),(o=l.children(":visible").first()).children().children().addClass("selected"),r.select&&r.select(o.children().data("data")),d()}});i.on("keydown",function(e){if(40===e.keyCode){e.preventDefault();var t=o;if(o){for(;0!==(t=t.next()).length&&!t.is(":visible"););if(0===t.length)return;o.children().children().removeClass("selected")}else t=l.children(":visible").first();(o=t).children().children().addClass("selected"),r.select&&r.select(o.children().data("data")),d()}else if(38===e.keyCode){e.preventDefault();var n=o;if(o){for(;0!==(n=n.prev()).length&&!n.is(":visible"););if(0===n.length)return;o.children().children().removeClass("selected")}else n=l.children(":visible").first();(o=n).children().children().addClass("selected"),r.select&&r.select(o.children().data("data")),d()}else 13===e.keyCode&&(e.preventDefault(),o&&r.dblclick&&r.dblclick(o.children().data("data")))}),i.i18n();var d=function(){var e=l.find(".projects-dialog-project-list-entry.selected").parent().parent();if(1===e.length){var t=a,n=t.height(),o=(t.scrollTop(),e.position().top),i=e.height();n<o+i?t.animate({scrollTop:"-="+(n-o-i)},50):o<0&&t.animate({scrollTop:"+="+o},50)}},a=$("<div></div>",{class:"projects-dialog-project-list-inner-container"}).appendTo(e),l=$("<ol>",{class:"projects-dialog-project-list"}).appendTo(a).editableList({addButton:!1,height:"auto",scrollOnAdd:!1,addItem:function(a,e,s){var t=$("<div></div>",{class:"projects-dialog-project-list-entry"}).appendTo(a);if($('<span class="projects-dialog-project-list-entry-icon"><i class="fa fa-archive"></i></span>').appendTo(t),$('<span class="projects-dialog-project-list-entry-name" style=""></span>').text(s.name).appendTo(t),!B||B.name!==s.name||(t.addClass("projects-list-entry-current"),$('<span class="projects-dialog-project-list-entry-current">'+RED._("projects.create-project-list.current")+"</span>").appendTo(t),!1!==r.canSelectActive)){t.addClass("selectable");var n=$('<div class="projects-dialog-project-list-entry-tools"></div>').appendTo(t);$('<button class="editor-button editor-button-small" style="float: right;"><i class="fa fa-trash"></i></button>').appendTo(n).click(function(e){var t,n,o,i;e.stopPropagation(),e.preventDefault(),t=a,n=s.name,o=function(e){e||a.fadeOut(300,function(){l.editableList("removeItem",s),r.delete&&r.delete(s)})},i=$("<div>").css({background:"white",position:"absolute",top:0,right:0,bottom:0,left:"100%",overflow:"hidden",padding:"5px 20px",transition:"left 0.4s",whitespace:"nowrap",width:"1000px"}).click(function(e){e.stopPropagation()}).appendTo(t),$("<span>").css({lineHeight:"40px"}).text(RED._("projects.delete.confirm")).appendTo(i),$('<button style="margin-left:20px" class="editor-button">'+RED._("common.label.cancel")+"</button>").appendTo(i).click(function(e){e.stopPropagation(),i.remove(),o(!0)}),$('<button style="margin-left:20px" class="editor-button primary">'+RED._("common.label.delete")+"</button>").appendTo(i).click(function(e){e.stopPropagation(),i.remove(),U({url:"projects/"+n,type:"DELETE",responses:{200:function(e){o(!1)},400:{unexpected_error:function(e){i.remove(),o(!0)}}}})}),setTimeout(function(){i.css("left",0)},50)}),a.click(function(e){$(".projects-dialog-project-list-entry").removeClass("selected"),t.addClass("selected"),o=a.parent(),r.select&&r.select(s),d(),i.focus()}),r.dblclick&&a.dblclick(function(e){e.preventDefault(),r.dblclick(s)})}},filter:function(e){return""===t||-1!==e.name.toLowerCase().indexOf(t)}});return $.getJSON("projects",function(e){e.projects.forEach(function(e){l.editableList("addItem",{name:e})})}),e}({canSelectActive:!1,dblclick:function(e){A=e,$("#projects-dialog-create").click()},select:function(e){A=e,o()},delete:function(e){s&&delete s[e.name],A=null,o()}}).appendTo(t),t=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty projects-dialog-screen-create-row-clone"></div>').appendTo(n),$('<label for="projects-dialog-screen-create-project-name">'+RED._("projects.create.project-name")+"</label>").appendTo(t);var l=$('<div style="position:relative;"></div>').appendTo(t);T=$('<input id="projects-dialog-screen-create-project-name" type="text"></input>').appendTo(l);var c,p,u=$('<div class="projects-dialog-screen-input-status"></div>').appendTo(l),f=!1,h="",g="";T.on("change keyup paste",function(){if(f=T.val()!==h,p)clearTimeout(p);else if(f&&(u.empty(),$('<img src="red/images/spin.svg"/>').appendTo(u),""===T.val()))return void o();p=setTimeout(function(){o(),p=null},300)}),P=$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.create.must-contain")+"</small></label>").appendTo(t).find("small"),t=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(n),$('<label for="projects-dialog-screen-create-project-desc">'+RED._("projects.create.desc")+"</label>").appendTo(t),_=$('<input id="projects-dialog-screen-create-project-desc" type="text">').appendTo(t),$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.create.opt")+"</small></label>").appendTo(t),t=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(n),$('<label for="projects-dialog-screen-create-project-file">'+RED._("projects.create.flow-file")+"</label>").appendTo(t),l=$('<div style="position:relative;"></div>').appendTo(t),k=$('<input id="projects-dialog-screen-create-project-file" type="text">').val("flow.json").on("change keyup paste",o).appendTo(l),$('<div class="projects-dialog-screen-input-status"></div>').appendTo(l),$('<label class="projects-edit-form-sublabel"><small>*.json</small></label>').appendTo(t),t=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-empty"></div>').appendTo(n),$("<label>"+RED._("projects.create.credentials")+"</label>").appendTo(t);var v=$('<div style="width: 550px">').appendTo(t),m=$('<div style="min-height:150px; box-sizing: border-box; float: right; vertical-align: top; width: 331px; margin-left: -1px; padding: 15px; margin-top: -15px; border: 1px solid #ccc; border-radius: 3px; display: inline-block">').appendTo(v),b=$('<div style="vertical-align: top; width: 220px; display: inline-block">').appendTo(v),y=$('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid #ccc;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: white;"></div>').appendTo(b);$('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" checked style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="enabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-lock"></i> <span style="vertical-align: middle;">'+RED._("projects.create.enable-encryption")+"</span></label>").appendTo(y);var w=$('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid white;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: #ccc; "></div>').appendTo(b);$('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="disabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-unlock"></i> <span style="vertical-align: middle;">'+RED._("projects.create.disable-encryption")+"</span></label>").appendTo(w),b.find("input[name=projects-encryption-type]").click(function(e){var t,n;"enabled"===$(this).val()?(t=y,n=w,$(".projects-encryption-enabled-row").show(),$(".projects-encryption-disabled-row").hide(),"custom"===$("input[name=projects-encryption-key]:checked").val()&&S.focus()):(n=y,t=w,$(".projects-encryption-enabled-row").hide(),$(".projects-encryption-disabled-row").show()),t.css({borderColor:"#ccc",borderRightColor:"white"}),n.css({borderColor:"white",borderRightColor:"#ccc"}),o()}),t=$('<div class="form-row projects-encryption-enabled-row"></div>').appendTo(m),$('<label class="projects-edit-form-inline-label">'+RED._("projects.create.encryption-key")+"</label>").appendTo(t),(S=$('<input type="password"></input>').appendTo(t)).on("change keyup paste",o),$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.create.desc0")+"</small></label>").appendTo(t),t=$('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(m),$('<div class="" style="padding: 5px 20px;"><i class="fa fa-warning"></i> '+RED._("projects.create.desc1")+"</div>").appendTo(t),m.find("input[name=projects-encryption-key]").click(function(){var e=$(this).val();S.attr("disabled","default"===e),"custom"===e&&S.focus(),o()}),t=$('<div class="hide form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(n),$('<label for="projects-dialog-screen-create-project-repo">'+RED._("projects.create.git-url")+"</label>").appendTo(t),C=$('<input id="projects-dialog-screen-create-project-repo" type="text" placeholder="https://git.example.com/path/my-project.git"></input>').appendTo(t),$('<label id="projects-dialog-screen-create-project-repo-label" class="projects-edit-form-sublabel"><small>'+RED._("projects.create.protocols")+"</small></label>").appendTo(t);var D=!1,E="";C.on("change keyup paste",function(){D=!0;var e=$(this).val();E!==e&&$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.protocols"));var t=/\/([^/]+?)(?:\.git)?$/.exec(E=e);if(t){var n=T.val();""!==n&&n!==g||(g=t[1],T.val(g),T.change())}o()});var R=$('<div class="hide projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').hide().appendTo(n);t=$('<div class="form-row projects-dialog-screen-create-row-auth-error"></div>').hide().appendTo(R),$('<div><i class="fa fa-warning"></i> '+RED._("projects.create.auth-failed")+"</div>").appendTo(t),t=$('<div class="hide form-row projects-dialog-screen-create-row-creds"></div>').hide().appendTo(R),l=$('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(t),$('<label for="projects-dialog-screen-create-project-repo-user">'+RED._("projects.create.username")+"</label>").appendTo(l),O=$('<input id="projects-dialog-screen-create-project-repo-user" type="text"></input>').appendTo(l),l=$('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(t),$('<label for="projects-dialog-screen-create-project-repo-pass">'+RED._("projects.create.password")+"</label>").appendTo(l),L=$('<input id="projects-dialog-screen-create-project-repo-pass" type="password"></input>').appendTo(l),t=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').hide().appendTo(R),l=$('<div style="width: calc(50% - 10px); display:inline-block;"></div>').appendTo(t),$('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.create.ssh-key")+"</label>").appendTo(l),N=$("<select>",{style:"width: 100%"}).appendTo(l),$.getJSON("settings/user/keys",function(e){var t=0;e.keys.forEach(function(e){N.append($("<option></option>").val(e.name).text(e.name)),t++}),0===t?(N.addClass("input-error"),N.attr("disabled",!0),x.show()):(N.removeClass("input-error"),N.attr("disabled",!1),x.hide())}),l=$('<div style="width: calc(50% - 10px); margin-left: 20px; display:inline-block;"></div>').appendTo(t),$('<label for="projects-dialog-screen-create-project-repo-passphrase">'+RED._("projects.create.passphrase")+"</label>").appendTo(l),I=$('<input id="projects-dialog-screen-create-project-repo-passphrase" type="password"></input>').appendTo(l),l=$('<div class="form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-sshkey"></div>').appendTo(R);var x=$('<div class="projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(l);switch($('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.create.desc2")+"</div>").appendTo(x),l=$('<div style="text-align: center">').appendTo(x),$('<button class="editor-button">'+RED._("projects.create.add-ssh-key")+"</button>").appendTo(l).click(function(e){e.preventDefault(),$("#projects-dialog-cancel").click(),RED.userSettings.show("gitconfig"),setTimeout(function(){$("#user-settings-gitconfig-add-key").click()},500)}),t=$('<div class="hide form-row projects-dialog-screen-create-row projects-dialog-screen-create-row-clone"></div>').appendTo(n),$("<label>"+RED._("projects.create.credentials-encryption-key")+"</label>").appendTo(t),j=$('<input type="password"></input>').appendTo(t),e.screen||"empty"){case"empty":a.click();break;case"open":i.click();break;case"clone":d.click()}return setTimeout(function(){"open"!==(e.screen||"empty")?T.focus():$("#projects-dialog-project-list-search").focus()},50),n},buttons:function(e){var t;switch(e.screen||"empty"){case"open":t=RED._("projects.create.open");break;case"empty":t=RED._("projects.create.create");break;case"clone":t=RED._("projects.create.clone")}return[{id:"projects-dialog-cancel",text:RED._("common.label.cancel"),click:function(){$(this).dialog("close")}},{id:"projects-dialog-create",text:t,class:"primary disabled",disabled:!0,click:function(){var e,t,n=$(".projects-dialog-screen-create-type.selected").data("type"),o={name:T.val()};if("empty"===n){o.summary=_.val(),o.files={flow:k.val()};var i=$("input[name=projects-encryption-type]:checked").val();o.credentialSecret="enabled"===i&&S.val()}else if("copy"===n)o.copy=(void 0).name;else if("clone"===n){o.credentialSecret=j.val();var a=C.val();if(/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(a)){var s=N.val();if(!s)return void console.log(RED._("projects.create.cant-get-ssh-key-path"));o.git={remotes:{origin:{url:a,keyFile:s,passphrase:I.val()}}}}else o.git={remotes:{origin:{url:a,username:O.val(),password:L.val()}}}}else if("open"===n)return e=A.name,t=function(e,t){u.dialog("close"),e&&"credentials_load_failed"!==e.error&&console.log(RED._("projects.create.unexpected_error"),e)},RED.deploy.setDeployInflight(!0),RED.projects.settings.switchProject(e),void U({url:"projects/"+e,type:"PUT",requireCleanWorkspace:!0,responses:{200:function(e){t(null,e)},400:{"*":t}}},{active:!0}).then(function(){RED.events.emit("project:change",{name:e})}).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)});$(".projects-dialog-screen-create-row-auth-error").hide(),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.protocols")),O.removeClass("input-error"),L.removeClass("input-error"),N.removeClass("input-error"),I.removeClass("input-error"),RED.deploy.setDeployInflight(!0),RED.projects.settings.switchProject(o.name),U({url:"projects",type:"POST",handleAuthFail:!1,responses:{200:function(e){u.dialog("close")},400:{project_exists:function(e){console.log(RED._("projects.create.already-exists-2"))},git_error:function(e){console.log(RED._("projects.create.git-error"),e)},git_connection_failed:function(e){C.addClass("input-error"),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.con-failed"))},git_not_a_repository:function(e){C.addClass("input-error"),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.not-git"))},git_repository_not_found:function(e){C.addClass("input-error"),$("#projects-dialog-screen-create-project-repo-label small").text(RED._("projects.create.no-resource"))},git_auth_failed:function(e){$(".projects-dialog-screen-create-row-auth-error").show(),O.addClass("input-error"),L.addClass("input-error"),N.addClass("input-error"),I.addClass("input-error")},missing_flow_file:function(e){u.dialog("close")},project_empty:function(e){u.dialog("close")},credentials_load_failed:function(e){u.dialog("close")},"*":function(e){v(e),$(u).dialog("close")}}}},o).then(function(){RED.events.emit("project:change",{name:name})}).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})}}]}}}}function m(e,t){u||RED.projects.init();var n=s[e],o=n.content(t||{});a.empty();var i=n.buttons;"function"==typeof i&&(i=i(t||{})),u.dialog("option","buttons",i),a.append(o),u.dialog("option","title",n.title||""),u.dialog("open"),u.dialog({position:{my:"center top",at:"center top+10%",of:window}})}function e(e){if(RED.nodes.dirty())var t=RED._("projects.require-clean.confirm"),n=RED.notify(t,{type:"info",fixed:!0,modal:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){n.close(),e(!0)}},{text:RED._("common.label.cont"),click:function(){n.close(),e(!1)}}]})}function U(c,p){var t,n;if(c.requireCleanWorkspace&&RED.nodes.dirty())return e(function(e){e?c.cancel&&(c.cancel(),n&&n()):(delete c.requireCleanWorkspace,U(c,p).then(function(){t&&t()}).always(function(){n&&n()}))}),{then:function(e){return t=e,{always:function(e){n=e}}},always:function(e){n=e}};var u,f,o=Date.now();return $(".projects-dialog-spinner").show(),$("#projects-dialog").parent().find(".ui-dialog-buttonset").children().css("visibility","hidden"),p&&(c.data=JSON.stringify(p),c.contentType="application/json; charset=utf-8"),$.ajax(c).done(function(e,t,n){c.responses&&c.responses[200]&&(u=c.responses[200],f=e)}).fail(function(n,e,t){if(c.responses&&c.responses[n.status]){var o=c.responses[n.status];if("function"==typeof o)return void(f={error:(u=o).statusText});if(!1!==c.handleAuthFail&&"git_auth_failed"===n.responseJSON.error){var i=B.git.remotes[n.responseJSON.remote||c.remote||"origin"].fetch,a=$('<div><div class="form-row">'+RED._("projects.send-req.auth-req")+':</div><div class="form-row"><div style="margin-left: 20px;">'+i+"</div></div></div>"),s=!1;if(/^https?:\/\//.test(i))$('<div class="form-row"><label for="projects-user-auth-username">'+RED._("projects.send-req.username")+'</label><input id="projects-user-auth-username" type="text"></input></div><div class="form-row"><label for=projects-user-auth-password">'+RED._("projects.send-req.password")+'</label><input id="projects-user-auth-password" type="password"></input></div>').appendTo(a);else if(/^(?:ssh|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?/.test(i)){s=!0;var r=$('<div class="form-row"></div>').appendTo(a);$('<label for="projects-user-auth-key">SSH Key</label>').appendTo(r);var d=$('<select id="projects-user-auth-key">').width("70%").appendTo(r);$.getJSON("settings/user/keys",function(e){e.keys.forEach(function(e){d.append($("<option></option>").val(e.name).text(e.name)),0})}),r=$('<div class="form-row"></div>').appendTo(a),$('<label for="projects-user-auth-passphrase">'+RED._("projects.send-req.passphrase")+"</label>").appendTo(r),$('<input id="projects-user-auth-passphrase" type="password"></input>').appendTo(r)}var l=RED.notify(a,{type:"error",fixed:!0,modal:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){l.close()}},{text:'<span><i class="fa fa-refresh"></i> '+RED._("projects.send-req.retry")+"</span>",click:function(){p=p||{};var e={};s?(e.keyFile=$("#projects-user-auth-key").val(),e.passphrase=$("#projects-user-auth-passphrase").val()):(e.username=$("#projects-user-auth-username").val(),e.password=$("#projects-user-auth-password").val());var t=function(e){e?(console.log(RED._("projects.send-req.update-failed")),console.log(e)):(U(c,p),l.close())};U({url:"projects/"+B.name+"/remotes/"+(n.responseJSON.remote||c.remote||"origin"),type:"PUT",responses:{0:function(e){t(e)},200:function(e){t(null)},400:{unexpected_error:function(e){t(e)}}}},{auth:e})}}]});return}if(o[n.responseJSON.error])return u=o[n.responseJSON.error],void(f=n.responseJSON);if(o["*"])return u=o["*"],void(f=n.responseJSON)}console.log(RED._("projects.send-req.unhandled")+":"),console.log(n),console.log(e),console.log(t)}).always(function(){var e=Date.now()-o;e=Math.max(0,500-e),setTimeout(function(){$(".projects-dialog-spinner").hide(),$("#projects-dialog").parent().find(".ui-dialog-buttonset").children().css("visibility",""),u&&u(f)},e)})}function n(i){var a,n="",o=[],s="",r=$('<div class="projects-branch-list">').appendTo(i.container),d=$('<input type="text">').attr("placeholder",i.placeholder).appendTo(r).searchBox({delay:200,change:function(){n=$(this).val(),/(\.\.|\/\.|[?*[~^: \\]|\/\/|\/.$|\/$)/.test(n)?(a.hasClass("input-error")||(a.addClass("input-error"),a.find("i").addClass("fa-warning").removeClass("fa-code-fork")),a.find("span").text(RED._("projects.create-branch-list.invalid")+": "+s+n)):(a.hasClass("input-error")&&(a.removeClass("input-error"),a.find("i").removeClass("fa-warning").addClass("fa-code-fork")),a.find(".sidebar-version-control-branch-list-entry-create-name").text(s+n)),l.editableList("filter")}}),l=$("<ol>",{style:"height: 130px;"}).appendTo(r);return l.editableList({addButton:!1,scrollOnAdd:!1,addItem:function(e,t,n){var o=$('<div class="sidebar-version-control-branch-list-entry">').appendTo(e);n.hasOwnProperty("commit")?($('<i class="fa fa-code-fork"></i>').appendTo(o),$("<span>").text(n.name).appendTo(o),n.current&&(o.addClass("selected"),$('<span class="current"></span>').text(i.currentLabel||RED._("projects.create-branch-list.current")).appendTo(o))):(a=o,$('<i class="fa fa-code-fork"></i>').appendTo(o),$("<span>").text(RED._("projects.create-branch-list.create")+":").appendTo(o),$('<div class="sidebar-version-control-branch-list-entry-create-name" style="margin-left: 10px;">').text(n.name).appendTo(o)),o.click(function(e){if(e.preventDefault(),!$(this).hasClass("input-error")){var t={};n.hasOwnProperty("commit")?($(this).hasClass("selected")&&(t.current=!0),t.name=n.name):(t.name=d.val(),t.create=!0,i.remote&&(t.name=i.remote()+"/"+t.name)),i.onselect&&i.onselect(t)}})},filter:function(e){var t=!e.hasOwnProperty("commit");return t&&""!==n&&-1===o.indexOf(s+n)||!t&&-1!==e.name.indexOf(n)}}),{refresh:function(e){d.searchBox("value",""),l.editableList("empty");var t=Date.now(),n=c(r).addClass("projects-dialog-spinner-contain");s=i.remote?i.remote()+"/":"",U({url:e,type:"GET",responses:{0:function(e){console.log(e)},200:function(e){o=e.branches,e.branches.forEach(function(e){l.editableList("addItem",e)}),l.editableList("addItem",{}),setTimeout(function(){n.remove()},Math.max(300-(Date.now()-t),0))},400:{git_connection_failed:function(e){RED.notify(e.message,"error")},git_not_a_repository:function(e){RED.notify(e.message,"error")},git_repository_not_found:function(e){RED.notify(e.message,"error")},unexpected_error:function(e){v(e)}}}})},filter:function(){l.editableList("filter")},focus:function(){d.focus()}}}function c(e){return $('<div class="projects-dialog-spinner"><img src="red/images/spin.svg"/></div>').appendTo(e)}function o(){createProjectOptions={},B?m("create",{screen:"empty"}):m("welcome")}return{init:function(){u=$('<div id="projects-dialog" class="hide node-red-dialog projects-edit-form"><form class="form-horizontal"></form><div class="projects-dialog-spinner hide"><img src="red/images/spin.svg"/></div></div>').appendTo("body").dialog({modal:!0,autoOpen:!1,width:600,resizable:!1,open:function(e){$(this).parent().find(".ui-dialog-titlebar-close").hide()},close:function(e){}}),a=u.find("form"),RED.actions.add("core:new-project",RED.projects.newProject),RED.actions.add("core:open-project",RED.projects.selectProject),RED.actions.add("core:show-project-settings",RED.projects.settings.show);var e={sendRequest:U,createBranchList:n,addSpinnerOverlay:c,reportUnexpectedError:v};RED.projects.settings.init(e),RED.projects.userSettings.init(e),RED.sidebar.versionControl.init(e),t()},showStartup:function(){RED.user.hasPermission("projects.write")?m("welcome"):RED.notify(RED._("user.errors.notAuthorized"),"error")},newProject:function(){if(RED.user.hasPermission("projects.write"))return RED.nodes.dirty()?e(function(e){e||o()}):void o();RED.notify(RED._("user.errors.notAuthorized"),"error")},selectProject:function(){RED.user.hasPermission("projects.write")?m("create",{screen:"open"}):RED.notify(RED._("user.errors.notAuthorized"),"error")},showCredentialsPrompt:function(){RED.user.hasPermission("projects.write")?RED.projects.settings.show("settings"):RED.notify(RED._("user.errors.notAuthorized"),"error")},showFilesPrompt:function(){RED.user.hasPermission("projects.write")?RED.projects.settings.show("settings"):RED.notify(RED._("user.errors.notAuthorized"),"error")},showProjectDependencies:function(){RED.projects.settings.show("deps")},createDefaultFileSet:function(){if(!B)throw new Error(RED._("projects.create-default-file-set.no-active"));if(!B.empty)throw new Error(RED._("projects.create-default-file-set.no-empty"));RED.user.hasPermission("projects.write")?(createProjectOptions={},m("default-files",{existingProject:!0})):RED.notify(RED._("user.errors.notAuthorized"),"error")},createDefaultPackageFile:function(){RED.deploy.setDeployInflight(!0),RED.projects.settings.switchProject(B.name),U({url:"projects/"+B.name,type:"PUT",requireCleanWorkspace:!0,handleAuthFail:!1,responses:{200:function(e){},400:{git_error:function(e){console.log(RED._("projects.create-default-file-set.git-error"),e)},missing_flow_file:function(e){$(u).dialog("close")},"*":function(e){v(e),$(u).dialog("close")}}}},{initialise:!0}).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})},refresh:function(t){$.getJSON("projects",function(e){e.active?$.getJSON("projects/"+e.active,function(e){B=e,RED.sidebar.versionControl.refresh(!0),t&&t(B)}):t&&t(null)})},editProject:function(){RED.projects.settings.show()},getActiveProject:function(){return B}}}(),RED.projects.settings=function(){var S,O,t=700,n=!1,d=[];function o(e){d.push(e)}function s(e,t){var n,o;t.empty(),n=e.description?marked(e.description):'<span class="node-info-none">No description available</span>',(o=$('<span class="bidiAware" dir="'+RED.text.bidi.resolveBaseTextDir(n)+'">'+n+"</span>"),$(o).find("a").each(function(e){var t=$(this).attr("href");/^https?:/.test(t)&&$(this).attr("target","_blank")}),o).appendTo(t).find(".bidiAware").contents().filter(function(){return 3===this.nodeType&&""!==this.textContent.trim()}).wrap("<span></span>")}function c(e,t){t.empty(),e?t.text(e).removeClass("node-info-node"):t.text(RED._("sidebar.project.projectSettings.noSummaryAvailable")).addClass("node-info-none")}function i(t){var e=$('<div id="project-settings-tab-main" class="project-settings-tab-pane node-help"></div>');$("<h1>").text(t.name).appendTo(e);var n=$('<div style="position: relative">').appendTo(e),o=$("<div></div>",{style:"color: #999"}).appendTo(n);c(t.summary,o),RED.user.hasPermission("projects.write")&&$('<button class="editor-button editor-button-small" style="float: right;">'+RED._("sidebar.project.editDescription")+"</button>").prependTo(n).click(function(e){e.preventDefault(),function i(a,s,r){var d=r.prev();d.hide(),r.empty();var e=$('<span class="button-row" style="position: relative; float: right; margin-right:0;"></span>').appendTo(r),l=$('<input type="text" style="width: calc(100% - 150px); margin-right: 10px;">').val(s||"").appendTo(r);$('<button class="editor-button">'+RED._("common.label.cancel")+"</button>").appendTo(e).click(function(e){e.preventDefault(),c(a.summary,r),d.show()}),$('<button class="editor-button">'+RED._("common.label.save")+"</button>").appendTo(e).click(function(e){e.preventDefault();var n=l.val();c(n,r);var o=O.addSpinnerOverlay(r),t=function(e,t){if(e)return o.remove(),i(a,s,r);a.summary=n,o.remove(),c(a.summary,r),d.show()};O.sendRequest({url:"projects/"+a.name,type:"PUT",responses:{0:function(e){t(e)},200:function(e){RED.sidebar.versionControl.refresh(!0),t(null)},400:{"*":function(e){O.reportUnexpectedError(e),t(e)}}}},{summary:n})})}(t,t.summary,o)}),$("<hr>").appendTo(e);var i=$('<div class="node-help" style="position: relative"></div>').appendTo(e),a=$("<div>",{style:"min-height: 200px"}).appendTo(i);return s(t,a),RED.user.hasPermission("projects.write")&&$('<button class="editor-button editor-button-small" style="float: right;">'+RED._("sidebar.project.editReadme")+"</button>").prependTo(i).click(function(e){e.preventDefault(),function o(i,a){RED.editor.editMarkdown({title:RED._("sidebar.project.editDescription"),header:$('<span><i class="fa fa-book"></i> README.md</span>'),value:i.description,complete:function(n){a.empty();var e=O.addSpinnerOverlay(a),t=function(e,t){if(e)return o(i,a);i.description=n,s(i,a)};O.sendRequest({url:"projects/"+i.name,type:"PUT",responses:{0:function(e){t(e)},200:function(e){t(null),RED.sidebar.versionControl.refresh(!0)},400:{"*":function(e){O.reportUnexpectedError(e),t(e)}}}},{description:n}).always(function(){e.remove()})}})}(t,a)}),e}function r(e,t){t.editableList("empty");var n=0;for(var o in h)h.hasOwnProperty(o)&&(t.editableList("addItem",{id:h[o].module,version:h[o].version,count:h[o].count,known:e.dependencies.hasOwnProperty(o),installed:!0}),n++,0===h[o].count&&0,e.dependencies.hasOwnProperty(o)||0);if(e.dependencies)for(var o in e.dependencies)if(e.dependencies.hasOwnProperty(o)&&!h.hasOwnProperty(o)){var i=!!RED.nodes.registry.getModule(o);t.editableList("addItem",{id:o,version:e.dependencies[o],count:0,known:!0,installed:i}),n++,i?0:0}0===n&&t.editableList("addItem",{index:0,label:RED._("sidebar.project.projectSettings.none")})}function p(e,t,n,o){var i=RED.projects.getActiveProject(),a=O.addSpinnerOverlay(t).addClass("projects-dialog-spinner-contain"),s=function(e,t){if(a.remove(),e)return o(e);i.dependencies=n,RED.sidebar.versionControl.refresh(!0),o()};O.sendRequest({url:"projects/"+i.name,type:"PUT",responses:{0:function(e){s(e)},200:function(e){RED.sidebar.versionControl.refresh(!0),s(null)},400:{"*":function(e){s(e)}}}},{dependencies:n})}function a(l){var t=$('<div id="project-settings-tab-deps" class="project-settings-tab-pane node-help"></div>');RED.user.hasPermission("projects.write")&&$('<button class="editor-button editor-button-small" style="margin-top:10px;float: right;">'+RED._("sidebar.project.projectSettings.edit")+"</button>").appendTo(t).click(function(e){e.preventDefault(),function o(i,e,a,s){var t=e||JSON.stringify(i.dependencies||{},"",4);"{}"===t&&(t="{\n\n}"),RED.editor.editJSON({title:RED._("sidebar.project.editDependencies"),value:t,requireValid:!0,complete:function(t){try{var n=JSON.parse(t);p(0,a,n,function(e){if(e)return o(i,t,a,s);i.dependencies=n,r(i,s)})}catch(e){o(i,t,a,s)}}})}(l,null,t,c)});var c=$("<ol>",{style:"position: absolute;top: 60px;bottom: 20px;left: 20px;right: 20px;"}).appendTo(t);return c.editableList({addButton:!1,addItem:function(n,e,o){var i=$("<div>",{class:"palette-module-header"}).appendTo(n);if(o.label)0===o.index?i.addClass("red-ui-search-empty"):n.parent().addClass("palette-module-section"),i.text(o.label);else{i.addClass("palette-module-header"),o.installed?0===o.count?i.addClass("palette-module-unused"):o.known||i.addClass("palette-module-unknown"):i.addClass("palette-module-not-installed"),o.element=i;var t=$('<div class="palette-module-meta palette-module-name"></div>').appendTo(i),a="fa-cube";o.installed||(a="fa-warning");var s=$('<i class="fa '+a+'"></i>').appendTo(t);o.icon=s,$("<span>").text(o.id).appendTo(t);var r=$('<div class="palette-module-meta palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(i);$("<span>").text(o.version).appendTo(r);r=$('<div class="palette-module-meta"></div>').appendTo(i);var d=$('<div class="palette-module-button-group"></div>').appendTo(r);RED.user.hasPermission("projects.write")&&(o.installed||!1===RED.settings.theme("palette.editable")?o.known&&0===o.count?$('<a href="#" class="editor-button editor-button-small">'+RED._("sidebar.project.projectSettings.removeFromProject")+"</a>").appendTo(d).click(function(e){e.preventDefault();var t=$.extend(!0,{},l.dependencies);delete t[o.id],p(0,n,t,function(e){e?console.log(e):n.fadeOut(200,function(){c.editableList("removeItem",o)})})}):o.known||$('<a href="#" class="editor-button editor-button-small">'+RED._("sidebar.project.projectSettings.addToProject")+"</a>").appendTo(d).click(function(e){e.preventDefault();var t=$.extend(!0,{},l.dependencies);t[o.id]=h[o.id].version,p(0,n,t,function(e){e?console.log(e):(d.remove(),i.removeClass("palette-module-unknown"))})}):$('<a href="#" class="editor-button editor-button-small">'+RED._("sidebar.project.projectSettings.install")+"</a>").appendTo(d).click(function(e){e.preventDefault(),RED.palette.editor.install(o,n,function(e){if(!e){o.installed=!0;RED.utils.addSpinnerOverlay(n,!0);setTimeout(function(){c.editableList("removeItem",o),h={},RED.nodes.eachNode(f),RED.nodes.eachConfig(f),o.count=h[o.id].count,c.editableList("addItem",o)},500)}})}))}},sort:function(e,t){return e.id.localeCompare(t.id)}}),r(l,c),t}function L(e,t,o,a,s){var r=$('<div class="project-file-listing-container"></div>',{style:"position: relative; min-height: 175px; height: 175px;"}).hide().appendTo(e),d=O.addSpinnerOverlay(r);return $.getJSON("projects/"+t.name+"/files",function(t){var e=Object.keys(t);e=e.filter(function(e){return!t[e].status||!/D/.test(t[e].status)});var n={};e.sort(),e.forEach(function(e){e.split("/").reduce(function(e,t,n,o){if(t)return n<o.length-1?e[t]=e[t]||{}:e[t]=!0,e[t]},n)});var i=function(e,t,n){var o={name:e||"/",path:n+(n?"/":"")+e};return!0===t?o.type="f":(o.type="d",o.children=[],o.path=o.path,Object.keys(t).forEach(function(e){o.children.push(i(e,t[e],o.path))}),o.children.sort(function(e,t){return e.hasOwnProperty("children")&&!t.hasOwnProperty("children")?-1:!e.hasOwnProperty("children")&&t.hasOwnProperty("children")?1:e.name.localeCompare(t.name)})),o};n=i("",n,"");!function s(e,t,r,d,l,n){n=n||"";var o=$("<ol>",{class:"projects-dialog-file-list",style:n}).appendTo(e).editableList({addButton:!1,scrollOnAdd:!1,addItem:function(e,t,n){var o=$("<div></div>",{class:"projects-dialog-file-list-entry"}).appendTo(e);if(n.children){if($('<span class="projects-dialog-file-list-entry-folder"><i class="fa fa-angle-right"></i> <i class="fa fa-folder-o"></i></span>').appendTo(o),0<n.children.length){var i=$("<div></div>",{style:"padding-left: 20px;"}).appendTo(e);0===r.indexOf(n.path+"/")?o.addClass("expanded"):i.hide(),s(i,n.children,r,d,l),o.addClass("selectable"),o.click(function(e){$(this).hasClass("expanded")?($(this).removeClass("expanded"),i.slideUp(200)):($(this).addClass("expanded"),i.slideDown(200))})}}else{var a="fa-file-o";/\.json$/i.test(n.name)?a="fa-file-code-o":/\.md$/i.test(n.name)?a="fa-book":/^\.git/i.test(n.name)&&(a="fa-code-fork",o.addClass("projects-dialog-file-list-entry-file-type-git")),$('<span class="projects-dialog-file-list-entry-file"> <i class="fa '+a+'"></i></span>').appendTo(o),d.test(n.name)?(o.addClass("selectable"),n.path===r&&o.addClass("selected"),o.click(function(e){$(".projects-dialog-file-list-entry.selected").removeClass("selected"),$(this).addClass("selected"),l(n.path)}),o.dblclick(function(e){e.preventDefault(),l(n.path,!0)})):o.addClass("unselectable")}$('<span class="projects-dialog-file-list-entry-name" style=""></span>').text(n.name).appendTo(o)}});n||o.parent().css("overflow-y","");t.forEach(function(e){o.editableList("addItem",e)})}(r,n.children,o,a,s,"height: 175px"),d.remove()}),r}function l(s,e){$("<h3></h3>").text(RED._("sidebar.project.projectSettings.versionControl")).appendTo(e),function(d,e){var t=$('<div class="user-settings-section"></div>').appendTo(e);$("<h4></h4>").text(RED._("sidebar.project.projectSettings.branches")).appendTo(t);var n=$('<div class="user-settings-row projects-dialog-list"></div>').appendTo(t),l=$("<ol>").appendTo(n).editableList({height:"auto",addButton:!1,scrollOnAdd:!1,addItem:function(i,e,a){var t=$('<div class="projects-dialog-list-entry">').appendTo(i);if(a.empty)return t.addClass("red-ui-search-empty"),void t.text(RED._("sidebar.project.projectSettings.noBranches"));a.current&&t.addClass("current"),$('<span class="entry-icon"><i class="fa fa-code-fork"></i></span>').appendTo(t);var n=$("<span>").appendTo(t),o=$("<div>").appendTo(n);if($('<span class="entry-name">').text(a.name).appendTo(o),a.commit&&$('<span class="entry-detail">').text(a.commit.sha).appendTo(o),a.remote){var s=$("<div>").appendTo(n);$('<span class="entry-detail entry-remote-name">').text(a.remote||"").appendTo(s),0<a.status.ahead+a.status.behind&&$('<span class="entry-detail"><i class="fa fa-long-arrow-up"></i> <span>'+a.status.ahead+'</span> <i class="fa fa-long-arrow-down"></i> <span>'+a.status.behind+"</span></span>").appendTo(s)}if(!a.current){var r=$('<span class="entry-tools">').appendTo(t);$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>').appendTo(r).click(function(e){e.preventDefault();var n=O.addSpinnerOverlay(i).addClass("projects-dialog-spinner-contain"),o=RED.notify(RED._("sidebar.project.projectSettings.deleteConfirm",{name:a.name}),{type:"warning",modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){n.remove(),o.close()}},{text:"Delete branch",click:function(){o.close();var t={url:"projects/"+d.name+"/branches/"+a.name,type:"DELETE",responses:{200:function(e){i.fadeOut(200,function(){l.editableList("removeItem",a),n.remove()})},400:{git_delete_branch_unmerged:function(e){o=RED.notify(RED._("sidebar.project.projectSettings.unmergedConfirm",{name:a.name}),{type:"warning",modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){n.remove(),o.close()}},{text:RED._("sidebar.project.projectSettings.deleteUnmergedBranch"),click:function(){t.url+="?force=true",o.close(),O.sendRequest(t)}}]})},"*":function(e){O.reportUnexpectedError(e),n.remove()}}}};O.sendRequest(t)}}]})})}}});$.getJSON("projects/"+d.name+"/branches",function(e){e.branches&&(0<e.branches.length?(e.branches.sort(function(e,t){return e.current?-1:t.current?1:e.name.localeCompare(t.name)}),e.branches.forEach(function(e){l.editableList("addItem",e)})):l.editableList("addItem",{empty:!0}))})}(s,e);var t=$('<div class="user-settings-section"></div>').appendTo(e),n=$("<h4></h4>").text(RED._("sidebar.project.projectSettings.gitRemotes")).appendTo(t),o=$('<button class="editor-button editor-button-small" style="float: right; margin-right: 10px;">'+RED._("sidebar.project.projectSettings.addRemote")+"</button>").appendTo(n).click(function(e){o.attr("disabled",!0),a.slideDown(200,function(){a[0].scrollIntoView(),d?(h.val("origin"),g.focus()):h.focus(),p()})}),r={empty:!0},d=!0,i=$('<div class="user-settings-row"></div>').appendTo(t),a=$('<div class="projects-dialog-list-dialog"></div>').hide().appendTo(i);i=$('<div class="user-settings-row projects-dialog-list"></div>').appendTo(t);var l=$("<ol>").appendTo(i);l.editableList({addButton:!1,height:"auto",addItem:function(o,e,i){var t=$('<div class="projects-dialog-list-entry">').appendTo(o);if(i.empty)return t.addClass("red-ui-search-empty"),void t.text(RED._("sidebar.project.projectSettings.noRemotes"));$('<span class="entry-icon"><i class="fa fa-globe"></i></span>').appendTo(t);var n=$("<span>").appendTo(t);$('<div class="entry-name">').text(i.name).appendTo(n),i.urls.fetch===i.urls.push?$('<div class="entry-detail">').text(i.urls.fetch).appendTo(n):($('<div class="entry-detail">').text("fetch: "+i.urls.fetch).appendTo(n),$('<div class="entry-detail">').text("push: "+i.urls.push).appendTo(n));var a=$('<span class="entry-tools">').appendTo(t);$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>').appendTo(a).click(function(e){e.preventDefault();var t=O.addSpinnerOverlay(o).addClass("projects-dialog-spinner-contain"),n=RED.notify(RED._("sidebar.project.projectSettings.deleteRemoteConfrim",{name:i.name}),{type:"warning",modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){t.remove(),n.close()}},{text:RED._("sidebar.project.projectSettings.deleteRemote"),click:function(){n.close(),s.git.branches.remote&&0===s.git.branches.remote.indexOf(i.name+"/")&&delete s.git.branches.remote,s.git.branches.remoteAlt&&0===s.git.branches.remoteAlt.indexOf(i.name+"/")&&delete s.git.branches.remoteAlt;var e={url:"projects/"+s.name+"/remotes/"+i.name,type:"DELETE",responses:{200:function(e){o.fadeOut(200,function(){l.editableList("removeItem",i),setTimeout(t.remove,100),0===e.remotes.length?(delete s.git.remotes,d=!0,l.editableList("addItem",r)):(s.git.remotes={},e.remotes.forEach(function(e){var t=e.name;delete e.name,s.git.remotes[t]=e})),delete s.git.branches.remoteAlt,RED.sidebar.versionControl.refresh()})},400:{"*":function(e){O.reportUnexpectedError(e),t.remove()}}}};O.sendRequest(e)}}]})})}});var c,p=function(){var e=/^[a-zA-Z0-9\-_]+$/.test(h.val()),t=g.val(),n=0<t.length&&!/\s/.test(t);/^https?:\/\/[^/]+@/i.test(t)?(v.text(RED._("sidebar.project.projectSettings.urlRule2")),n=!1):v.text(RED._("sidebar.project.projectSettings.urlRule")),y.attr("disabled",!e||!n),h.toggleClass("input-error",u&&!e),g.toggleClass("input-error",f&&!n),c&&(c.close(),c=null)},u=!1,f=!1;$('<div class="projects-dialog-list-dialog-header">').text(RED._("sidebar.project.projectSettings.addRemote2")).appendTo(a),i=$('<div class="user-settings-row"></div>').appendTo(a),$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.remoteName")).appendTo(i);var h=$('<input type="text">').appendTo(i).on("change keyup paste",function(){u=!0,p()});$('<label class="projects-edit-form-sublabel"><small>'+RED._("sidebar.project.projectSettings.nameRule")+"</small></label>").appendTo(i).find("small"),i=$('<div class="user-settings-row"></div>').appendTo(a),$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.url")).appendTo(i);var g=$('<input type="text">').appendTo(i).on("change keyup paste",function(){f=!0,p()}),v=$('<label class="projects-edit-form-sublabel"><small>'+RED._("sidebar.project.projectSettings.urlRule")+"</small></label>").appendTo(i).find("small"),m=function(){o.attr("disabled",!1),a.hide(),h.val(""),g.val(""),c&&(c.close(),c=null)},b=$('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>').appendTo(a);$('<button class="editor-button">'+RED._("common.label.cancel")+"</button>").appendTo(b).click(function(e){e.preventDefault(),m()});var y=$('<button class="editor-button">'+RED._("sidebar.project.projectSettings.addRemote2")+"</button>").appendTo(b).click(function(e){e.preventDefault();var t=O.addSpinnerOverlay(a).addClass("projects-dialog-spinner-contain"),n={name:h.val(),url:g.val()},o=function(e){t.remove(),e||m()};RED.deploy.setDeployInflight(!0),O.sendRequest({url:"projects/"+s.name+"/remotes",type:"POST",responses:{0:function(e){o(e)},200:function(e){s.git.remotes={},e.remotes.forEach(function(e){var t=e.name;delete e.name,s.git.remotes[t]=e}),w(),RED.sidebar.versionControl.refresh(),o()},400:{git_remote_already_exists:function(e){c=RED.popover.create({target:h,direction:"right",size:"small",content:"Remote already exists",autoClose:6e3}).open(),h.addClass("input-error"),o(e)},"*":function(e){O.reportUnexpectedError(e),o(e)}}}},n)}),w=function(){l.editableList("empty");var e=0;if(s.git.hasOwnProperty("remotes"))for(var t in s.git.remotes)s.git.remotes.hasOwnProperty(t)&&(e++,l.editableList("addItem",{name:t,urls:s.git.remotes[t]}));(d=0===e)&&l.editableList("addItem",r)};w()}function u(e){var t=$('<div id="project-settings-tab-settings" class="project-settings-tab-pane node-help"></div>');return function(i,e){var t,n=$("<h3></h3>").text(RED._("sidebar.project.projectSettings.files")).appendTo(e),a=$('<div class="user-settings-section"></div>').appendTo(e);if(RED.user.hasPermission("projects.write"))var o=$('<button class="editor-button editor-button-small" style="float: right;">'+RED._("sidebar.project.projectSettings.edit")+"</button>").appendTo(n).click(function(e){e.preventDefault(),k.show(),o.hide(),r.hide(),d.show(),l.show(),c.hide(),p.show(),d.focus(),f.addClass("uneditable-input"),$(".user-settings-row-credentials").show(),f.css("height","auto"),m.hide(),h.show()});t=$('<div class="user-settings-row"></div>').appendTo(a),$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.flow")).appendTo(t);var s=$('<div class="uneditable-input" style="padding:0">').appendTo(t),r=$('<span style="display:inline-block; padding: 6px">').text(i.files.flow).appendTo(s),d=$('<input id="" type="text" style="margin-bottom: 0;width: 100%; border: none;">').val(i.files.flow).hide().appendTo(s),l=$('<button class="editor-button" style="border-top-right-radius: 4px; border-bottom-right-radius: 4px; width: 36px; height: 34px; position: absolute; top: -1px; right: -1px;"><i class="fa fa-folder-open-o"></i></button>').hide().appendTo(s).click(function(e){if($(this).hasClass("selected"))$(this).removeClass("selected"),s.find(".project-file-listing-container").slideUp(200,function(){$(this).remove(),s.css("height","")}),s.css("color","");else{$(this).addClass("selected"),s.css("color","inherit");var t=L(s,i,d.val(),/.*\.json$/,function(e,t){e&&d.val(e),t&&$(l).click(),u()});s.css("height","auto"),setTimeout(function(){t.slideDown(200)},50)}});t=$('<div class="user-settings-row"></div>').appendTo(a),$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.credentials")).appendTo(t);var c=$('<div class="uneditable-input">').text(i.files.credentials).appendTo(t),p=$('<div class="uneditable-input">').text(i.files.credentials).hide().insertAfter(c),u=function(){var e,t=d.val(),n=/^(.+?)(\.[^.]*)?$/.exec(t);n?p.text(n[1]+"_cred"+(n[2]||".json")):""===t&&p.text("");var o=""===t||/\.\./.test(t)||/\/$/.test(t);e=o||""===p.text(),E.is(":visible")&&(E.toggleClass("input-error",""===E.val()),e=e||""===E.val()),x.is(":visible")&&(x.toggleClass("input-error",""===x.val()),e=e||""===x.val()),d.toggleClass("input-error",o),p.toggleClass("input-error",""===p.text()),j.toggleClass("disabled",e),j.prop("disabled",e)};d.on("change keyup paste",u),i.files.flow||$('<span class="form-warning"><i class="fa fa-warning"></i> Missing</span>').appendTo(r),i.files.credentials||$('<span class="form-warning"><i class="fa fa-warning"></i> Missing</span>').appendTo(c),t=$('<div class="user-settings-row"></div>').appendTo(a),$("<label></label>").appendTo(t);var f=$('<span><i class="user-settings-credentials-state-icon fa"></i> <span class="user-settings-credentials-state"></span></span>').appendTo(t),h=$('<span class="button-group" style="margin-left: -72px;">').hide().appendTo(t);f.css("color","#666"),h.css("vertical-align","top");var g=$('<button class="editor-button" style="vertical-align: top; width: 36px; margin-bottom: 10px"><i class="fa fa-trash-o"></i></button>').appendTo(h).click(function(e){e.preventDefault(),$(this).hasClass("selected")?($(this).removeClass("selected"),m.hide()):(x.val(""),D.hide(),R.show(),$(this).addClass("selected"),v.removeClass("selected"),w.show(),T.show(),b.hide(),y.hide(),m.show()),u()}),v=$('<button class="editor-button" style="border-top-right-radius: 4px; border-bottom-right-radius: 4px; vertical-align: top; width: 36px; margin-bottom: 10px"><i class="fa fa-pencil"></i></button>').appendTo(h).click(function(e){e.preventDefault(),$(this).hasClass("selected")?($(this).removeClass("selected"),m.hide()):(E.val(""),x.val(""),i.settings.credentialSecretInvalid||!i.settings.credentialsEncrypted?(b.show(),y.hide(),D.hide()):(D.show(),b.hide(),y.show()),R.show(),v.addClass("selected"),g.removeClass("selected"),w.hide(),T.hide(),m.show()),u()});t=$('<div class="user-settings-row user-settings-row-credentials"></div>').hide().appendTo(a);var m=$("<div>",{style:"margin-top:10px"}).hide().appendTo(f),b=$('<div style="margin: 20px 0 10px 5px;">'+RED._("sidebar.project.projectSettings.setTheEncryptionKey")+"</div>").hide().appendTo(m),y=$('<div style="margin: 20px 0 10px 5px;">'+RED._("sidebar.project.projectSettings.changeTheEncryptionKey")+"</div>").hide().appendTo(m),w=$('<div style="margin: 20px 0 10px 5px;">'+RED._("sidebar.project.projectSettings.resetTheEncryptionKey")+"</div>").hide().appendTo(m),D=$('<div class="user-settings-row user-settings-row-credentials"></div>').appendTo(m);$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.currentKey")).appendTo(D);var E=$('<input type="password">').appendTo(D).on("change keyup paste",function(){S&&(S.close(),S=null),u()}),R=$('<div class="user-settings-row user-settings-row-credentials"></div>').appendTo(m);$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.newKey")).appendTo(R);var x=$('<input type="password">').appendTo(R).on("change keyup paste",u),T=$('<div class="form-tips form-warning" style="margin: 10px;"><i class="fa fa-warning"></i>'+RED._("sidebar.project.projectSettings.credentialsAlert")+"</div>").hide().appendTo(m),_=function(){o.show(),k.hide(),r.show(),d.hide(),l.hide(),c.show(),p.hide(),f.removeClass("uneditable-input"),f.css("height",""),l.removeClass("selected"),s.find(".project-file-listing-container").remove(),s.css("height",""),s.css("color",""),$(".user-settings-row-credentials").hide(),m.hide(),h.hide(),g.removeClass("selected"),v.removeClass("selected")},k=$('<span class="button-row" style="position: relative; float: right; margin-right:0;"></span>').hide().appendTo(a);$('<button class="editor-button">'+RED._("common.label.cancel")+"</button>").appendTo(k).click(function(e){e.preventDefault(),_()});var j=$('<button class="editor-button">'+RED._("common.label.save")+"</button>").appendTo(k).click(function(e){e.preventDefault();var t=O.addSpinnerOverlay(a),n=function(e){t.remove(),e?O.reportUnexpectedError(e):(r.text(d.val()),c.text(p.text()),_())},o={files:{flow:d.val(),credentials:p.text()}};g.hasClass("selected")&&(o.resetCredentialSecret=!0),(g.hasClass("selected")||v.hasClass("selected"))&&(o.credentialSecret=x.val(),E.is(":visible")&&(o.currentCredentialSecret=E.val())),RED.deploy.setDeployInflight(!0),O.sendRequest({url:"projects/"+i.name,type:"PUT",responses:{0:function(e){n(e)},200:function(e){i=e,RED.sidebar.versionControl.refresh(!0),C(),n()},400:{credentials_load_failed:function(e){n(e)},missing_current_credential_key:function(e){E.addClass("input-error"),S=RED.popover.create({target:E,direction:"right",size:"small",content:"Incorrect key",autoClose:3e3}).open(),n(e)},"*":function(e){n(e)}}}},o).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})}),C=function(){i.settings.credentialSecretInvalid?(f.find(".user-settings-credentials-state-icon").removeClass().addClass("user-settings-credentials-state-icon fa fa-warning"),f.find(".user-settings-credentials-state").text(RED._("sidebar.project.projectSettings.invalidEncryptionKey"))):i.settings.credentialsEncrypted?(f.find(".user-settings-credentials-state-icon").removeClass().addClass("user-settings-credentials-state-icon fa fa-lock"),f.find(".user-settings-credentials-state").text(RED._("sidebar.project.projectSettings.encryptionEnabled"))):(f.find(".user-settings-credentials-state-icon").removeClass().addClass("user-settings-credentials-state-icon fa fa-unlock"),f.find(".user-settings-credentials-state").text(RED._("sidebar.project.projectSettings.encryptionDisabled"))),g.toggleClass("disabled",!i.settings.credentialSecretInvalid&&!i.settings.credentialsEncrypted),g.prop("disabled",!i.settings.credentialSecretInvalid&&!i.settings.credentialsEncrypted)};u(),C()}(e,t),l(e,t),t}function f(e){if(!/^subflow:/.test(e.type)){var t=RED.nodes.registry.getNodeSetForType(e.type).module;"node-red"!==t&&(h.hasOwnProperty(t)||(h[t]={module:t,version:RED.nodes.registry.getModule(t).version,count:0,known:!1}),h[t].count++)}}var h={};return{init:function(e){O=e,o({id:"main",title:RED._("sidebar.project.name"),get:i,close:function(){}}),o({id:"deps",title:RED._("sidebar.project.dependencies"),get:a,close:function(){}}),o({id:"settings",title:RED._("sidebar.project.settings"),get:u,close:function(){S&&(S.close(),S=null)}}),RED.events.on("nodes:add",f),RED.events.on("nodes:remove",function(e){if(!/^subflow:/.test(e.type)){var t=RED.nodes.registry.getNodeSetForType(e.type).module;"node-red"!==t&&h.hasOwnProperty(t)&&(h[t].count--,0===h[t].count&&(h[t].known||delete h[t]))}})},show:function(r){if(!n)if(RED.user.hasPermission("projects.write")){n=!0;var e={title:RED._("menu.label.userSettings"),buttons:[{id:"node-dialog-ok",text:RED._("common.label.close"),class:"primary",click:function(){RED.tray.close()}}],resize:function(e){t=e.width},open:function(e){var t=RED.projects.getActiveProject(),n=e.find(".editor-tray-body"),o=$("<div></div>").appendTo(n),i=$("<div></div>",{id:"user-settings-tabs-container"}).appendTo(o);$("<ul></ul>",{id:"user-settings-tabs"}).appendTo(i);var a=RED.tabs.create({id:"user-settings-tabs",vertical:!0,onchange:function(e){setTimeout(function(){$("#user-settings-tabs-content").children().hide(),$("#"+e.id).show(),e.pane.focus&&e.pane.focus()},50)}}),s=$("<div></div>",{id:"user-settings-tabs-content"}).appendTo(o);d.forEach(function(e){a.addTab({id:"project-settings-tab-"+e.id,label:e.title,pane:e}),e.get(t).hide().appendTo(s)}),o.i18n(),a.activateTab("project-settings-tab-"+(r||"main")),$("#sidebar-shade").show()},close:function(){n=!1,d.forEach(function(e){e.close&&e.close()}),$("#sidebar-shade").hide()},show:function(){}};null!==t&&(e.width=t),RED.tray.show(e)}else RED.notify(RED._("user.errors.notAuthorized"),"error")},switchProject:function(e){h={}}}}(),RED.projects.userSettings=function(){var i,D,E;function t(e){var t=$('<div id="user-settings-tab-gitconfig" class="project-settings-tab-pane node-help"></div>');return function(e){var t=RED.settings.get("git")||{};t.user=t.user||{},$("<h3></h3>").text(RED._("editor:sidebar.project.userSettings.committerDetail")).appendTo(e);var n=$('<div class="user-settings-section"></div>').appendTo(e);$('<div style="color:#aaa;"></div>').appendTo(n).text(RED._("editor:sidebar.project.userSettings.committerTip"));var o=$('<div class="user-settings-row"></div>').appendTo(n);$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.userName")).appendTo(o),(i=$('<input type="text">').appendTo(o)).val(t.user.name||""),o=$('<div class="user-settings-row"></div>').appendTo(n),$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.email")).appendTo(o),(D=$('<input type="text">').appendTo(o)).val(t.user.email||"")}(t),function(e){var o,t=$('<div class="user-settings-section"></div>').appendTo(e),n=($("<h3></h3>").text(RED._("editor:sidebar.project.userSettings.sshKeys")).appendTo(t),$('<div style="color:#aaa;"></div>').appendTo(t).text(RED._("editor:sidebar.project.userSettings.sshKeysTip"))),i=$('<button id="user-settings-gitconfig-add-key" class="editor-button editor-button-small" style="float: right; margin-right: 10px;">'+RED._("editor:sidebar.project.userSettings.add")+"</button>").appendTo(n).click(function(e){i.attr("disabled",!0),v.attr("disabled",!0),r.slideDown(200),c.focus()}),a=function(){var e=/^[a-zA-Z0-9\-_]+$/.test(c.val());c.toggleClass("input-error",l&&!e);var t=u.val(),n=0===t.length||8<=t.length;u.toggleClass("input-error",!n),n?0===t.length?f.text(RED._("editor:sidebar.project.userSettings.optional")):f.text(""):f.text(RED._("editor:sidebar.project.userSettings.passphraseShort")),e=e&&n,v.attr("disabled",!e),o&&(o.close(),o=null)},s=$('<div class="user-settings-row"></div>').appendTo(t),r=$('<div class="projects-dialog-list-dialog"></div>').hide().appendTo(s);$('<div class="projects-dialog-list-dialog-header">').text(RED._("editor:sidebar.project.userSettings.addSshKey")).appendTo(r);var d=$("<div>").appendTo(r);s=$('<div class="user-settings-row"></div>').appendTo(d),$('<div style="color:#aaa;"></div>').appendTo(s).text(RED._("editor:sidebar.project.userSettings.addSshKeyTip")),s=$('<div class="user-settings-row"></div>').appendTo(d),$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.name")).appendTo(s);var l=!1,c=$('<input type="text">').appendTo(s).on("change keyup paste",function(){l=!0,a()});$('<label class="projects-edit-form-sublabel"><small>'+RED._("editor:sidebar.project.userSettings.nameRule")+"</small></label>").appendTo(s).find("small");var p=$("<div>").appendTo(d);s=$('<div class="user-settings-row"></div>').appendTo(p),$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.passphrase")).appendTo(s);var u=$('<input type="password">').appendTo(s).on("change keyup paste",a),f=$('<label class="projects-edit-form-sublabel"><small>'+RED._("editor:sidebar.project.userSettings.optional")+"</small></label>").appendTo(s).find("small"),h=function(){i.attr("disabled",!1),r.hide(),c.val(""),l=!1,u.val(""),o&&(o.close(),o=null)},g=$('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>').appendTo(r);$('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.cancel")+"</button>").appendTo(g).click(function(e){e.preventDefault(),h()});var v=$('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.generate")+"</button>").appendTo(g).click(function(e){e.preventDefault();var t=E.addSpinnerOverlay(r).addClass("projects-dialog-spinner-contain"),n={name:c.val(),type:"generate"};n.comment=D.val(),n.password=u.val(),n.size=4096;var o=function(e){t.remove(),e||h()};RED.deploy.setDeployInflight(!0),E.sendRequest({url:"settings/user/keys",type:"POST",responses:{0:function(e){o(e)},200:function(e){w(n.name),o()},400:{unexpected_error:function(e){console.log(e),o(e)}}}},n)});s=$('<div class="user-settings-row projects-dialog-list"></div>').appendTo(t);var m={empty:!0},b=function(e,t){var n=$('<div class="projects-dialog-ssh-public-key">',{style:"position:relative"}).appendTo(e),o=$("<pre>",{style:"min-height: 80px"}).appendTo(n),i=E.addSpinnerOverlay(o).addClass("projects-dialog-spinner-contain"),a={url:"settings/user/keys/"+t.name,type:"GET",responses:{200:function(e){o.text(e.publickey),i.remove()},400:{unexpected_error:function(e){console.log(e),i.remove()}}}};E.sendRequest(a);var s=$('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>').appendTo(n);return $('<button class="editor-button editor-button-small">'+RED._("editor:sidebar.project.userSettings.copyPublicKey")+"</button>").appendTo(s).click(function(e){try{e.stopPropagation(),e.preventDefault(),document.getSelection().selectAllChildren(o[0]),document.execCommand("copy"),document.getSelection().empty()}catch(e){}}),n},y=$('<ol class="projects-dialog-ssh-key-list">').appendTo(s).editableList({height:"auto",addButton:!1,scrollOnAdd:!1,addItem:function(o,e,i){var t=$('<div class="projects-dialog-list-entry">').appendTo(o);if(i.empty)return t.addClass("red-ui-search-empty"),void t.text(RED._("editor:sidebar.project.userSettings.noSshKeys"));var n=$('<div class="projects-dialog-ssh-key-header">').appendTo(t);$('<span class="entry-icon"><i class="fa fa-key"></i></span>').appendTo(n),$('<span class="entry-name">').text(i.name).appendTo(n);var a,s=$('<span class="button-row entry-tools">').appendTo(n);n.click(function(e){a?a.slideUp(200,function(){a.remove(),a=null}):a=b(t,i)}),i.system||$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>').appendTo(s).click(function(e){e.stopPropagation();var t=E.addSpinnerOverlay(o).addClass("projects-dialog-spinner-contain"),n=RED.notify(RED._("editor:sidebar.project.userSettings.deleteConfirm",{name:i.name}),{type:"warning",modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){t.remove(),n.close()}},{text:RED._("editor:sidebar.project.userSettings.delete"),click:function(){n.close();var e={url:"settings/user/keys/"+i.name,type:"DELETE",responses:{200:function(e){o.fadeOut(200,function(){y.editableList("removeItem",i),setTimeout(t.remove,100),0===y.editableList("length")&&y.editableList("addItem",m)})},400:{unexpected_error:function(e){console.log(e),t.remove()}}}};E.sendRequest(e)}}]})}),i.expand&&(a=b(t,i))}}),w=function(t){$.getJSON("settings/user/keys",function(e){e.keys&&(e.keys.sort(function(e,t){return e.name.localeCompare(t.name)}),y.editableList("empty"),e.keys.forEach(function(e){e.name===t&&(e.expand=!0),y.editableList("addItem",e)}),0===y.editableList("length")&&y.editableList("addItem",m))})};w()}(t),t}return{init:function(e){E=e,RED.userSettings.add({id:"gitconfig",title:RED._("editor:sidebar.project.userSettings.gitConfig"),get:t,close:function(){var e=RED.settings.get("git")||{};e.user=e.user||{},e.user.name=i.val(),e.user.email=D.val(),RED.settings.set("git",e)}})}}}(),RED.sidebar.versionControl=function(){var S,O,L,P,N,I,r,A,z,M,B,U,J,d,V,F,G,q={};function W(n,s,e,r){n.addClass("sidebar-version-control-change-entry");var o=$("<div>").appendTo(n);if(s.label){if(n.addClass("node-info-none"),o.text(s.label),s.button){o.css({display:"inline-block",maxWidth:"300px",textAlign:"left"});var t=$('<div style="float: right; margin: 5px; height: 50px;"></div>').appendTo(o);$('<button class="editor-button editor-button-small"></button>').text(s.button.label).appendTo(t).click(s.button.click)}}else{var i,a,d=$('<i class=""></i>').appendTo(o),l=$('<a href="#">').appendTo(o).click(function(e){var o,i,a,t;e.preventDefault(),o=s,i=r,a=RED.projects.getActiveProject(),t="staged"===i?"index":"tree",V.sendRequest({url:"projects/"+a.name+"/diff/"+t+"/"+encodeURIComponent(o.file),type:"GET",responses:{0:function(e){console.log(e)},200:function(e){var t;t="unstaged"===i?RED._("sidebar.project.versionControl.unstagedChanges")+" : "+o.file:"staged"===i?RED._("sidebar.project.versionControl.stagedChanges")+" : "+o.file:RED._("sidebar.project.versionControl.resolveConflicts")+" : "+o.file;var n={diff:e.diff,title:t,unmerged:"unmerged"===i,project:a};"unstaged"==i?(n.oldRevTitle=" "===o.indexStatus?RED._("sidebar.project.versionControl.head"):RED._("sidebar.project.versionControl.staged"),n.newRevTitle=RED._("sidebar.project.versionControl.unstaged"),n.oldRev=" "===o.indexStatus?"@":":0",n.newRev="_"):"staged"===i?(n.oldRevTitle=RED._("sidebar.project.versionControl.head"),n.newRevTitle=RED._("sidebar.project.versionControl.staged"),n.oldRev="@",n.newRev=":0"):(n.oldRevTitle=RED._("sidebar.project.versionControl.local"),n.newRevTitle=RED._("sidebar.project.versionControl.remote"),n.commonRev=":1",n.oldRev=":2",n.newRev=":3",n.onresolve=function(e){V.sendRequest({url:"projects/"+a.name+"/resolve/"+encodeURIComponent(o.file),type:"POST",responses:{0:function(e){console.log(e)},200:function(e){Q(!0)},400:{unexpected_error:function(e){console.log(e)}}}},{resolutions:e.resolutions[o.file]})}),RED.diff.showUnifiedDiff(n)},400:{unexpected_error:function(e){console.log(e)}}}})}),c=$("<span>").appendTo(l),p=$('<div class="sidebar-version-control-change-entry-tools">').appendTo(n);"unstaged"===r&&(i=$('<span class="button-group" style="margin-right: 5px;"></span>').appendTo(p),a=$('<button class="editor-button editor-button-small"><i class="fa fa-reply"></i></button>').appendTo(i).click(function(e){e.preventDefault();var t=V.addSpinnerOverlay(o).addClass("projects-dialog-spinner-contain"),n=RED.notify(RED._("sidebar.project.versionControl.revert",{file:s.file}),{type:"warning",modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){t.remove(),n.close()}},{text:RED._("sidebar.project.versionControl.revertChanges"),click:function(){n.close();var e={url:"projects/"+RED.projects.getActiveProject().name+"/files/_/"+s.file,type:"DELETE",responses:{200:function(e){t.remove()},400:{unexpected_error:function(e){t.remove(),console.log(e)}}}};RED.deploy.setDeployInflight(!0),V.sendRequest(e).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})}}]})})),i=$('<span class="button-group"></span>').appendTo(p),"unmerged"!==r&&$('<button class="editor-button editor-button-small"><i class="fa fa-'+("unstaged"===r?"plus":"minus")+'"></i></button>').appendTo(i).click(function(e){e.preventDefault();var t=RED.projects.getActiveProject();s.spinner=V.addSpinnerOverlay(n).addClass("projects-version-control-spinner-sidebar"),V.sendRequest({url:"projects/"+t.name+"/stage/"+encodeURIComponent(s.file),type:"unstaged"===r?"POST":"DELETE",responses:{0:function(e){console.log(e)},200:function(e){Y(e)},400:{unexpected_error:function(e){console.log(e)}}}},{})}),s["update"+("unstaged"===r?"Unstaged":"Staged")]=function(e,t){o.removeClass();var n="";"A"===t?(o.addClass("node-diff-added"),n="fa-plus-square"):"?"===t?(o.addClass("node-diff-unchanged"),n="fa-question-circle-o"):"D"===t?(o.addClass("node-diff-deleted"),n="fa-minus-square"):"M"===t?(o.addClass("node-diff-changed"),n="fa-square"):"R"===t?(o.addClass("node-diff-changed"),n="fa-toggle-right"):("U"===t&&o.addClass("node-diff-conflicted"),n="fa-exclamation-triangle"),c.empty(),$("<span>").text(e.file.replace(/\\(.)/g,"$1")).appendTo(c),e.oldName&&($('<i class="fa fa-long-arrow-right"></i>').prependTo(c),$("<span>").text(e.oldName.replace(/\\(.)/g,"$1")).prependTo(c)),d.removeClass(),d.addClass("fa "+n),e.spinner&&(e.spinner.remove(),delete e.spinner),a&&a.toggle("?"!==t),l.toggleClass("disabled","D"===t||"?"===t)},s["update"+("unstaged"===r?"Unstaged":"Staged")](s,e)}}function H(e){var t=Date.now()/1e3-e,n=Math.floor(t/86400);if(30<n)return new Date(1e3*e).toLocaleDateString();if(0<n)return RED._("sidebar.project.versionControl.daysAgo",{count:n});var o=Math.floor(t/3600);if(0<o)return RED._("sidebar.project.versionControl.hoursAgo",{count:o});var i=Math.floor(t/60);return 0<i?RED._("sidebar.project.versionControl.minsAgo",{count:i}):RED._("sidebar.project.versionControl.secondsAgo")}function K(e,t){var n=RED.projects.getActiveProject();(r=t?V.addSpinnerOverlay(L.parent()):V.addSpinnerOverlay(N.parent())).addClass("projects-dialog-spinner-sidebar");var o=t?{files:e}:void 0;V.sendRequest({url:"projects/"+n.name+"/stage",type:t?"POST":"DELETE",responses:{0:function(e){console.log(e)},200:function(e){Y(e)},400:{unexpected_error:function(e){console.log(e)}}}},o)}var i=!1;function X(o,i,e,a,t){var s=V.addSpinnerOverlay(e),n=o+"?limit="+(a||20);t&&(n+="&before="+t),V.sendRequest({url:n,type:"GET",responses:{0:function(e){console.log(e)},200:function(e){var t;e.commits.forEach(function(e){i.editableList("addItem",e),t=e.sha}),i.loadMoreItem&&(i.editableList("removeItem",i.loadMoreItem),delete i.loadMoreItem);var n=i.editableList("length");n<e.total&&(i.loadMoreItem={totalKnown:n,total:e.total,url:o,before:t+"~1",limit:a},i.editableList("addItem",i.loadMoreItem)),s.remove()},400:{unexpected_error:function(e){console.log(e)}}}})}function Y(e){var o=e.files;r&&(r.remove(),r=null),(d=!!e.merging)?(S.addClass("sidebar-version-control-merging"),A.show()):(S.removeClass("sidebar-version-control-merging"),A.hide()),L.editableList("removeItem",F),N.editableList("removeItem",F),z.editableList("removeItem",G);var t=Object.keys(o).filter(function(e){return"f"===o[e].type});t.sort();var i=Date.now()+Math.floor(100*Math.random());t.forEach(function(e){var t=o[e],n=!1;t.status&&(t.file=e,t.indexStatus=t.status[0],t.treeStatus=t.status[1],("A"===t.indexStatus&&/[AU]/.test(t.treeStatus)||"U"===t.indexStatus&&/[DAU]/.test(t.treeStatus)||"D"===t.indexStatus&&/[DU]/.test(t.treeStatus))&&(t.unmerged=!0),q[e]?(q[e].unmerged&&!t.unmerged?(z.editableList("removeItem",q[e]),n=!0):!q[e].unmerged&&t.unmerged&&(L.editableList("removeItem",q[e]),N.editableList("removeItem",q[e])),q[e].status!==t.status&&(" "!==q[e].treeStatus?" "===t.treeStatus?L.editableList("removeItem",q[e]):t.treeStatus!==q[e].treeStatus&&q[e].updateUnstaged(t,t.treeStatus):n=!0," "!==q[e].indexStatus&&"?"!==q[e].indexStatus?" "===t.indexStatus||"?"===t.indexStatus?N.editableList("removeItem",q[e]):t.indexStatus!==q[e].indexStatus&&q[e].updateStaged(t,t.indexStatus):n=!0),q[e].status=t.status,q[e].indexStatus=t.indexStatus,q[e].treeStatus=t.treeStatus,q[e].oldName=t.oldName,q[e].unmerged=t.unmerged):(n=!0,q[e]=t),q[e].updateIndex=i,n&&(t.unmerged?z.editableList("addItem",q[e]):(" "!==t.treeStatus&&L.editableList("addItem",q[e])," "!==t.indexStatus&&"?"!==t.indexStatus&&N.editableList("addItem",q[e]))))}),Object.keys(q).forEach(function(e){q[e].updateIndex!==i&&(L.editableList("removeItem",q[e]),N.editableList("removeItem",q[e]),delete q[e])});var n=N.editableList("length"),a=L.editableList("length"),s=z.editableList("length");M.attr("disabled",d&&0<s||!d&&0===n),P.attr("disabled",0===a),I.attr("disabled",0===n),0===n&&N.editableList("addItem",F),0===a&&L.editableList("addItem",F),0===s&&z.editableList("addItem",G)}function Q(e,t){if(!i&&(e&&(q={},L.editableList("empty"),N.editableList("empty"),z.editableList("empty")),RED.user.hasPermission("projects.write"))){i=!0,function(){U.editableList("empty");var e=RED.projects.getActiveProject();e&&X("projects/"+e.name+"/commits",U,U.parent())}();var o=RED.projects.getActiveProject();if(o){var n="projects/"+o.name+"/status";t&&(n+="?remote=true"),$.getJSON(n,function(e){Y(e),$("#sidebar-version-control-local-branch").text(e.branches.local),$("#sidebar-version-control-remote-branch").text(e.branches.remote||RED._("sidebar.project.versionControl.none"));var t=e.commits.ahead||0,n=e.commits.behind||0;o.git.hasOwnProperty("remotes")?e.branches.hasOwnProperty("remoteError")&&"git_remote_gone"!==e.branches.remoteError.code?($("#sidebar-version-control-repo-status-auth-issue").show(),$("#sidebar-version-control-repo-status-stats").hide(),$("#sidebar-version-control-repo-branch").attr("disabled",!0),$("#sidebar-version-control-repo-pull").attr("disabled",!0),$("#sidebar-version-control-repo-push").attr("disabled",!0),$("#sidebar-version-control-repo-toolbar-message").hide(),$("#sidebar-version-control-repo-toolbar-error-message").show()):($("#sidebar-version-control-repo-toolbar-message").show(),$("#sidebar-version-control-repo-toolbar-error-message").hide(),$("#sidebar-version-control-repo-status-auth-issue").hide(),$("#sidebar-version-control-repo-status-stats").show(),$("#sidebar-version-control-repo-branch").attr("disabled",!1),$("#sidebar-version-control-repo-status-button").show(),e.branches.hasOwnProperty("remote")?Z(t,n):($("#sidebar-version-control-commits-ahead").text(""),$("#sidebar-version-control-commits-behind").text(""),$("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.notTracking")),$("#sidebar-version-control-repo-pull").attr("disabled",!0),$("#sidebar-version-control-repo-push").attr("disabled",!0))):$("#sidebar-version-control-repo-status-button").hide(),i=!1,$(".sidebar-version-control-shade").hide()}).fail(function(){i=!1})}else $(".sidebar-version-control-shade").show(),L.editableList("empty"),N.editableList("empty"),z.editableList("empty")}}function Z(e,t){$("#sidebar-version-control-commits-ahead").text(e),$("#sidebar-version-control-commits-behind").text(t),d?($("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.statusUnmergedChanged")),$("#sidebar-version-control-repo-pull").attr("disabled",!0),$("#sidebar-version-control-repo-push").attr("disabled",!0)):0<e&&0===t?($("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.commitsAhead",{count:e})),$("#sidebar-version-control-repo-pull").attr("disabled",!0),$("#sidebar-version-control-repo-push").attr("disabled",!1)):0===e&&0<t?($("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.commitsBehind",{count:t})),$("#sidebar-version-control-repo-pull").attr("disabled",!1),$("#sidebar-version-control-repo-push").attr("disabled",!0)):0<e&&0<t?($("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.commitsAheadAndBehind1",{count:t})+RED._("sidebar.project.versionControl.commitsAheadAndBehind2",{count:e})+RED._("sidebar.project.versionControl.commitsAheadAndBehind3",{count:t})),$("#sidebar-version-control-repo-pull").attr("disabled",!1),$("#sidebar-version-control-repo-push").attr("disabled",!0)):0===e&&0===t&&($("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.repositoryUpToDate")),$("#sidebar-version-control-repo-pull").attr("disabled",!0),$("#sidebar-version-control-repo-push").attr("disabled",!0))}function ee(){Q(),RED.sidebar.show("version-control")}return{init:function(e){V=e,RED.actions.add("core:show-version-control-tab",ee),RED.events.on("deploy",function(){var e=RED.projects.getActiveProject();e&&(q={},L.editableList("empty"),N.editableList("empty"),z.editableList("empty"),$.getJSON("projects/"+e.name+"/status",function(e){Y(e)}))}),RED.events.on("login",function(){Q(!0)}),S=$("<div>",{class:"sidebar-version-control"});var t=$("<div>",{class:"sidebar-version-control-stack"}).appendTo(S);O=RED.stack.create({container:t,fill:!0,singleExpanded:!0}),(B=O.add({title:RED._("sidebar.project.versionControl.localChanges"),collapsible:!0})).expand(),B.content.css({height:"100%"});var n=$('<div style="float: right"></div>').appendTo(B.header);$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(n).click(function(e){e.preventDefault(),Q(!0)}),F={label:RED._("sidebar.project.versionControl.none")},G={label:RED._("sidebar.project.versionControl.conflictResolve")};var o=$('<div class="sidebar-version-control-change-container"></div>').appendTo(B.content),i=$('<div class="sidebar-version-control-change-header">'+RED._("sidebar.project.versionControl.localFiles")+"</div>").appendTo(o);P=$('<button class="editor-button editor-button-small" style="float: right"><i class="fa fa-plus"></i> '+RED._("sidebar.project.versionControl.all")+"</button>").appendTo(i).click(function(e){e.preventDefault(),e.stopPropagation(),K(Object.keys(q).filter(function(e){return" "!==q[e].treeStatus}),!0)}),(L=$("<ol>",{style:"position: absolute; top: 30px; bottom: 0; right:0; left:0;"}).appendTo(o)).editableList({addButton:!1,scrollOnAdd:!1,addItem:function(e,t,n){W(e,n,n.treeStatus,"unstaged")},sort:function(e,t){return"?"===e.treeStatus&&"?"!==t.treeStatus?1:"?"!==e.treeStatus&&"?"===t.treeStatus?-1:e.file.localeCompare(t.file)}}),A=$('<div class="sidebar-version-control-change-container"></div>').appendTo(B.content),i=$('<div class="sidebar-version-control-change-header">'+RED._("sidebar.project.versionControl.unmergedChanges")+"</div>").appendTo(A),n=$('<div style="float: right"></div>').appendTo(i);var a=$('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.abortMerge")+"</button>").appendTo(n).click(function(e){e.preventDefault(),e.stopPropagation();var t=V.addSpinnerOverlay(A),n=RED.projects.getActiveProject();RED.deploy.setDeployInflight(!0),V.sendRequest({url:"projects/"+n.name+"/merge",type:"DELETE",responses:{0:function(e){console.log(e)},200:function(e){t.remove(),Q(!0)},400:{unexpected_error:function(e){console.log(e)}}}}).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})});(z=$("<ol>",{style:"position: absolute; top: 30px; bottom: 0; right:0; left:0;"}).appendTo(A)).editableList({addButton:!1,scrollOnAdd:!1,addItem:function(e,t,n){n===G&&(n.button={label:RED._("sidebar.project.versionControl.commit"),click:function(e){e.preventDefault(),e.stopPropagation(),r()}}),W(e,n,n.treeStatus,"unmerged")},sort:function(e,t){return"?"===e.treeStatus&&"?"!==t.treeStatus?1:"?"!==e.treeStatus&&"?"===t.treeStatus?-1:e.file.localeCompare(t.file)}});var s=$('<div class="sidebar-version-control-change-container"></div>').appendTo(B.content);i=$('<div class="sidebar-version-control-change-header">'+RED._("sidebar.project.versionControl.changeToCommit")+"</div>").appendTo(s),n=$('<div style="float: right"></div>').appendTo(i);var r=function(){d.val(""),p.attr("disabled",!0),o.css("height","30px"),A.is(":visible")?(A.css("height","30px"),s.css("height","calc(100% - 60px - 175px)")):s.css("height","calc(100% - 30px - 175px)"),commitBox.show(),setTimeout(function(){commitBox.css("height","175px")},10),P.attr("disabled",!0),I.attr("disabled",!0),M.attr("disabled",!0),a.attr("disabled",!0),d.focus()};M=$('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.commit")+"</button>").appendTo(n).click(function(e){e.preventDefault(),e.stopPropagation(),r()}),I=$('<button class="editor-button editor-button-small"><i class="fa fa-minus"></i> '+RED._("sidebar.project.versionControl.all")+"</button>").appendTo(n).click(function(e){e.preventDefault(),e.stopPropagation(),K(Object.keys(q).filter(function(e){return" "!==q[e].indexStatus&&"?"!==q[e].indexStatus}),!1)}),(N=$("<ol>",{style:"position: absolute; top: 30px; bottom: 0; right:0; left:0;"}).appendTo(s)).editableList({addButton:!1,scrollOnAdd:!1,addItem:function(e,t,n){W(e,n,n.indexStatus,"staged")},sort:function(e,t){return e.file.localeCompare(t.file)}}),commitBox=$('<div class="sidebar-version-control-slide-box sidebar-version-control-slide-box-bottom"></div>').hide().appendTo(B.content);var d=$("<textarea placeholder="+RED._("sidebar.project.versionControl.commitPlaceholder")+"></textarea>").appendTo(commitBox).on("change keyup paste",function(){p.attr("disabled",""===$(this).val().trim())}),l=$('<div class="sidebar-version-control-slide-box-toolbar button-group">').appendTo(commitBox),c=$('<button class="editor-button">'+RED._("sidebar.project.versionControl.cancelCapital")+"</button>").appendTo(l).click(function(e){e.preventDefault(),d.val(""),o.css("height",""),A.css("height",""),s.css("height",""),commitBox.css("height",0),setTimeout(function(){commitBox.hide()},200),P.attr("disabled",!1),I.attr("disabled",!1),M.attr("disabled",!1),a.attr("disabled",!1)}),p=$('<button class="editor-button">'+RED._("sidebar.project.versionControl.commitCapital")+"</button>").appendTo(l).click(function(e){e.preventDefault();var t=V.addSpinnerOverlay(p).addClass("projects-dialog-spinner-sidebar"),n=RED.projects.getActiveProject();RED.deploy.setDeployInflight(!0),V.sendRequest({url:"projects/"+n.name+"/commit",type:"POST",responses:{0:function(e){console.log(e)},200:function(e){t.remove(),c.click(),Q(!0)},400:{"*":function(e){V.reportUnexpectedError(e)}}}},{message:d.val()}).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})}),u=O.add({title:RED._("sidebar.project.versionControl.commitHistory"),collapsible:!0});n=$('<div style="float: right"></div>').appendTo(u.header),$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(n).click(function(e){e.preventDefault(),Q(!0,!0)});var f=$('<div class="sidebar-version-control-change-header" style="text-align: right;"></div>').appendTo(u.content),h=$('<button class="editor-button editor-button-small"><i class="fa fa-code-fork"></i> '+RED._("sidebar.project.versionControl.branch")+' <span id="sidebar-version-control-local-branch"></span></button>').appendTo(f).click(function(e){if(e.preventDefault(),$(this).hasClass("selected"))v();else{w(),J.show(),$(this).addClass("selected");var t=RED.projects.getActiveProject();b.refresh("projects/"+t.name+"/branches"),m.show(),setTimeout(function(){m.css("height","215px"),b.focus()},100)}}),g=$('<button class="editor-button editor-button-small" style="margin-left: 10px;" id="sidebar-version-control-repo-status-button"><span id="sidebar-version-control-repo-status-stats"><i class="fa fa-long-arrow-up"></i> <span id="sidebar-version-control-commits-ahead"></span> <i class="fa fa-long-arrow-down"></i> <span id="sidebar-version-control-commits-behind"></span></span><span id="sidebar-version-control-repo-status-auth-issue"><i class="fa fa-warning"></i></span></button>').appendTo(f).click(function(e){if(e.preventDefault(),$(this).hasClass("selected"))w();else{v(),J.show(),$(this).addClass("selected");var t=RED.projects.getActiveProject();$("#sidebar-version-control-repo-toolbar-set-upstream-row").toggle(!!t.git.branches.remoteAlt),y.show(),setTimeout(function(){y.css("height","265px")},100)}});U=$("<ol>",{style:"position: absolute; top: 30px; bottom: 0px; right:0; left:0;"}).appendTo(u.content),J=$('<div class="component-shade" style="z-Index: 3"></div>').css("top","30px").hide().appendTo(u.content),U.editableList({addButton:!1,scrollOnAdd:!1,addItem:function(t,e,n){if(t.addClass("sidebar-version-control-commit-entry"),n.url)t.addClass("sidebar-version-control-commit-more"),t.text("+ "+(n.total-n.totalKnown)+RED._("sidebar.project.versionControl.moreCommits")),t.click(function(e){e.preventDefault(),X(n.url,U,t,n.limit,n.before)});else{t.click(function(e){var t=RED.projects.getActiveProject();t&&$.getJSON("projects/"+t.name+"/commits/"+n.sha,function(e){e.project=t,e.parents=n.parents,e.oldRev=n.sha+"~1",e.newRev=n.sha,e.oldRevTitle=RED._("sidebar.project.versionControl.commitCapital")+" "+n.sha.substring(0,7)+"~1",e.newRevTitle=RED._("sidebar.project.versionControl.commitCapital")+" "+n.sha.substring(0,7),e.date=H(parseInt(n.date)),RED.diff.showCommitDiff(e)})});var o=$("<div>").appendTo(t);if($('<div class="sidebar-version-control-commit-subject">').text(n.subject).appendTo(o),n.refs){var i=$('<div class="sidebar-version-control-commit-refs">').appendTo(o);n.refs.forEach(function(e){var t=e;/HEAD -> /.test(e)&&(t=e.substring(8)),$('<span class="sidebar-version-control-commit-ref">').text(t).appendTo(i)}),t.addClass("sidebar-version-control-commit-head")}$('<div class="sidebar-version-control-commit-sha">').text(n.sha.substring(0,7)).appendTo(o),$('<div class="sidebar-version-control-commit-date">').text(H(parseInt(n.date))).appendTo(o)}}});var v=function(e){h.removeClass("selected"),m.css("height","0"),J.hide(),setTimeout(function(){m.hide(),e&&e()},200)},m=$('<div class="sidebar-version-control-slide-box sidebar-version-control-slide-box-top" style="top:30px;"></div>').hide().appendTo(u.content);$('<div class="sidebar-version-control-slide-box-header"></div>').text(RED._("sidebar.project.versionControl.changeLocalBranch")).appendTo(m);var b=V.createBranchList({placeholder:RED._("sidebar.project.versionControl.createBranchPlaceholder"),container:m,onselect:function(e){if(e.current)return v();var t=V.addSpinnerOverlay(m),n=RED.projects.getActiveProject();RED.deploy.setDeployInflight(!0),V.sendRequest({url:"projects/"+n.name+"/branches",type:"POST",requireCleanWorkspace:!0,cancel:function(){t.remove()},responses:{0:function(e){t.remove(),console.log(e)},200:function(e){v(function(){t.remove()})},400:{git_local_overwrite:function(e){t.remove(),RED.notify(RED._("sidebar.project.versionControl.localOverwrite"),{type:"error",timeout:8e3})},unexpected_error:function(e){t.remove(),console.log(e)}}}},e).always(function(){setTimeout(function(){RED.deploy.setDeployInflight(!1)},500)})}}),y=$('<div class="sidebar-version-control-slide-box sidebar-version-control-slide-box-top" style="top:30px"></div>').hide().appendTo(u.content),w=function(){$("#sidebar-version-control-repo-toolbar-set-upstream").prop("checked",!1),g.removeClass("selected"),y.css("height","0"),J.hide(),setTimeout(function(){y.hide(),D()},200)},D=function(e){R.hasClass("selected")&&(R.removeClass("selected"),_.height(0),y.css("height","265px"),setTimeout(function(){_.hide(),e&&e()},200))};$('<div class="sidebar-version-control-slide-box-header"></div>').text(RED._("sidebar.project.versionControl.manageRemoteBranch")).appendTo(y);var E=$('<div style="margin-bottom: 5px;"></div>').appendTo(y),R=$('<button id="sidebar-version-control-repo-branch" class="sidebar-version-control-repo-action editor-button"><i class="fa fa-code-fork"></i> '+RED._("sidebar.project.versionControl.remote")+': <span id="sidebar-version-control-remote-branch"></span></button>').appendTo(E).click(function(e){if(e.preventDefault(),$(this).hasClass("selected"))D();else{$(this).addClass("selected");var t=RED.projects.getActiveProject();k.refresh("projects/"+t.name+"/branches/remote"),_.show(),setTimeout(function(){_.height(180),y.css("height","445px"),k.focus()},100)}});$('<div id="sidebar-version-control-repo-toolbar-message" class="sidebar-version-control-slide-box-header" style="min-height: 100px;"></div>').appendTo(y);var x=$('<div id="sidebar-version-control-repo-toolbar-error-message" class="sidebar-version-control-slide-box-header" style="min-height: 100px;"></div>').hide().appendTo(y);$('<div style="margin-top: 10px;"><i class="fa fa-warning"></i> '+RED._("sidebar.project.versionControl.unableToAccess")+"</div>").appendTo(x);var T=$('<div style="margin: 10px 30px; text-align: center"></div>').appendTo(x);$('<button class="editor-button" style="width: 80%;"><i class="fa fa-refresh"></i> '+RED._("sidebar.project.versionControl.retry")+"</button>").appendTo(T).click(function(e){e.preventDefault();var t=RED.projects.getActiveProject(),n=V.addSpinnerOverlay(y).addClass("projects-dialog-spinner-contain");V.sendRequest({url:"projects/"+t.name+"/branches/remote",type:"GET",responses:{0:function(e){console.log(e)},200:function(e){Q(!0)},400:{git_connection_failed:function(e){RED.notify(e.message,"error")},git_not_a_repository:function(e){RED.notify(e.message,"error")},git_repository_not_found:function(e){RED.notify(e.message,"error")},unexpected_error:function(e){console.log(e)}}}}).always(function(){n.remove()})}),$('<div class="sidebar-version-control-slide-box-header" style="height: 20px;"><label id="sidebar-version-control-repo-toolbar-set-upstream-row" for="sidebar-version-control-repo-toolbar-set-upstream" class="hide"><input type="checkbox" id="sidebar-version-control-repo-toolbar-set-upstream"> '+RED._("sidebar.project.versionControl.setUpstreamBranch")+"</label></div>").appendTo(y);var _=$('<div style="height: 0;overflow:hidden; transition: height 0.2s ease-in-out;"></div>').hide().appendTo(E),k=V.createBranchList({placeholder:RED._("sidebar.project.versionControl.createRemoteBranchPlaceholder"),currentLabel:RED._("sidebar.project.versionControl.upstream"),remote:function(){var e=RED.projects.getActiveProject();return Object.keys(e.git.remotes)[0]},container:_,onselect:function(e){$("#sidebar-version-control-repo-toolbar-set-upstream").prop("checked",!1),$("#sidebar-version-control-repo-toolbar-set-upstream").prop("disabled",!1),$("#sidebar-version-control-remote-branch").text(e.name+(e.create?" *":""));var o=RED.projects.getActiveProject();o.git.branches.remote===e.name?delete o.git.branches.remoteAlt:o.git.branches.remoteAlt=e.name,$("#sidebar-version-control-repo-toolbar-set-upstream-row").toggle(!!o.git.branches.remoteAlt),D(function(){if(e.create)o.git.branches.remote?$("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.selectUpstreamBranch")):($("#sidebar-version-control-repo-toolbar-message").text(RED._("sidebar.project.versionControl.trackedUpstreamBranch")),$("#sidebar-version-control-repo-toolbar-set-upstream").prop("checked",!0),$("#sidebar-version-control-repo-toolbar-set-upstream").prop("disabled",!0)),$("#sidebar-version-control-repo-pull").attr("disabled",!0),$("#sidebar-version-control-repo-push").attr("disabled",!1);else{var t=Date.now(),n=V.addSpinnerOverlay($("#sidebar-version-control-repo-toolbar-message")).addClass("projects-dialog-spinner-contain");$.getJSON("projects/"+o.name+"/branches/remote/"+e.name+"/status",function(e){setTimeout(function(){Z(e.commits.ahead,e.commits.behind),n.remove()},Math.max(400-(Date.now()-t),0))})}})}}),j=$('<div style="margin-bottom: 5px;"></div>').appendTo(y);$('<button id="sidebar-version-control-repo-push" class="sidebar-version-control-repo-sub-action editor-button"><i class="fa fa-long-arrow-up"></i> <span data-i18n="sidebar.project.versionControl.push"></span></button>').appendTo(j).click(function(e){e.preventDefault();var t=V.addSpinnerOverlay(y).addClass("projects-dialog-spinner-contain"),n=RED.projects.getActiveProject(),o="projects/"+n.name+"/push";n.git.branches.remoteAlt&&(o+="/"+n.git.branches.remoteAlt);var i=$("#sidebar-version-control-repo-toolbar-set-upstream").prop("checked");i&&(o+="?u=true"),V.sendRequest({url:o,type:"POST",responses:{0:function(e){console.log(e)},200:function(e){i&&n.git.branches.remoteAlt&&(n.git.branches.remote=n.git.branches.remoteAlt,delete n.git.branches.remoteAlt),Q(!0),w()},400:{git_push_failed:function(e){RED.notify(RED._("sidebar.project.versionControl.pushFailed"),"error")},unexpected_error:function(e){console.log(e)}}}},{}).always(function(){t.remove()})});var C=function(n){n=n||{};var e=V.addSpinnerOverlay(y).addClass("projects-dialog-spinner-contain"),t=RED.projects.getActiveProject(),o="projects/"+t.name+"/pull";t.git.branches.remoteAlt&&(o+="/"+t.git.branches.remoteAlt),(n.setUpstream||n.allowUnrelatedHistories)&&(o+="?"),n.setUpstream&&(o+="setUpstream=true",n.allowUnrelatedHistories&&(o+="&")),n.allowUnrelatedHistories&&(o+="allowUnrelatedHistories=true"),V.sendRequest({url:o,type:"POST",responses:{0:function(e){console.log(e)},200:function(e){n.setUpstream&&t.git.branches.remoteAlt&&(t.git.branches.remote=t.git.branches.remoteAlt,delete t.git.branches.remoteAlt),Q(!0),w()},400:{git_local_overwrite:function(e){RED.notify(RED._("sidebar.project.versionControl.unablePull")+'<p><a href="#" onclick="RED.sidebar.versionControl.showLocalChanges(); return false;">'+RED._("sidebar.project.versionControl.showUnstagedChanges")+"</a></p>","error",!1,1e7)},git_pull_merge_conflict:function(e){Q(!0),w()},git_connection_failed:function(e){RED.notify(RED._("sidebar.project.versionControl.connectionFailed")+e.toString(),"warning")},git_pull_unrelated_history:function(e){var t=RED.notify(RED._("sidebar.project.versionControl.pullUnrelatedHistory"),{type:"error",modal:!0,fixed:!0,buttons:[{text:RED._("common.label.cancel"),click:function(){t.close()}},{text:RED._("sidebar.project.versionControl.pullChanges"),click:function(){t.close(),n.allowUnrelatedHistories=!0,C(n)}}]})},"*":function(e){V.reportUnexpectedError(e)}}}},{}).always(function(){e.remove()})};$('<button id="sidebar-version-control-repo-pull" class="sidebar-version-control-repo-sub-action editor-button"><i class="fa fa-long-arrow-down"></i> <span data-i18n="sidebar.project.versionControl.pull"></span></button>').appendTo(j).click(function(e){e.preventDefault(),C({setUpstream:$("#sidebar-version-control-repo-toolbar-set-upstream").prop("checked")})}),$('<div class="component-shade sidebar-version-control-shade">').appendTo(S),RED.sidebar.addTab({id:"version-control",label:RED._("sidebar.project.versionControl.history"),name:"Project History",content:S,enableOnEdit:!1,pinned:!0,iconClass:"fa fa-code-fork",onchange:function(){setTimeout(function(){O.resize()},10)}})},show:ee,refresh:Q,showLocalChanges:function(){RED.sidebar.show("version-control"),B.expand()}}}(),RED.touch=RED.touch||{},RED.touch.radialMenu=function(){var f=null,h=!1,g=!1,v=null;return{show:function(e,a,t){h=!0;try{$("body").width(),$("body").height();for(var o=(f=d3.select("body").append("div").style({position:"absolute",top:0,left:0,bottom:0,right:0,"z-index":1e3}).on("touchstart",function(){u(),d3.event.preventDefault()})).append("div").style({position:"absolute",top:a[1]-80+"px",left:a[0]-80+"px","border-radius":"80px",width:"160px",height:"160px",background:"rgba(255,255,255,0.6)",border:"1px solid #666"}),s=[],n=function(e,t,n){n.el=o.append("div").style({position:"absolute",top:t+80-25+"px",left:e+80-25+"px","border-radius":"20px",width:"50px",height:"50px",background:"#fff",border:"2px solid #666","text-align":"center","line-height":"50px"}),n.el.html(n.name),n.disabled&&n.el.style({"border-color":"#ccc",color:"#ccc"}),n.x=e,n.y=t,s.push(n),n.el.on("touchstart",function(){n.el.style("background","#999"),d3.event.preventDefault(),d3.event.stopPropagation()}),n.el.on("touchend",function(){u(),n.onselect(),d3.event.preventDefault(),d3.event.stopPropagation()})},i=t.length,r=Math.max(Math.PI/(i-1),Math.PI/4),d=Math.PI,l=0;l<i;l++){var c=Math.floor(80*Math.cos(d)),p=Math.floor(80*Math.sin(d));t[l].name&&n(c,p,t[l]),d+=r}var u=function(){h=!1,v=null,f.remove(),f=null};e.on("touchend.radial",function(){if(e.on("touchend.radial",null),e.on("touchmenu.radial",null),v){try{v.onselect()}catch(e){RED._debug(e)}u()}else g&&u()}),e.on("touchmove.radial",function(){try{for(var e=d3.event.touches.item(0),t=[e.pageX-a[0],e.pageY-a[1]],n=0;n<s.length;n++){var o=s[n];o.disabled||(t[0]>o.x-30&&t[0]<o.x+30&&t[1]>o.y-30&&t[1]<o.y+30?o!==v&&(o.el.style("background","#999"),v=o):o===v?(o.el.style("background","#fff"),v=null):o.el.style("background","#fff"))}if(!v){var i=Math.abs(t[0]*t[0]+t[1]*t[1]);g=6400<i}}catch(e){RED._debug(e)}})}catch(e){RED._debug(e)}},active:function(){return h}}}(); \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/red/style.min.css b/packages/node_modules/@node-red/editor/public/red/style.min.css deleted file mode 100644 index 5bc2bf8ca..000000000 --- a/packages/node_modules/@node-red/editor/public/red/style.min.css +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright JS Foundation and other contributors, http://js.foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -.button-group-vertical{display:inline-block;vertical-align:middle}.button-group:not(:last-child){margin-right:10px}.component-shade{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(160,160,160,0.5);z-index:5}/*! - * Extracted from Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */button,input,select,div[contenteditable="true"],textarea{margin:0;font-size:100%;vertical-align:middle}button,div[contenteditable="true"],input{*overflow:visible;line-height:normal}button::-moz-focus-inner,div[contenteditable="true"]::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999999}label,input,div[contenteditable="true"],button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,div[contenteditable="true"],button,select,textarea{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],div[contenteditable="true"],.uneditable-input{box-sizing:border-box;display:inline-block;height:34px;padding:6px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555555;vertical-align:middle;border-radius:4px}input,textarea,div[contenteditable="true"],.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],div[contenteditable="true"],.uneditable-input{background-color:#ffffff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,div[contenteditable="true"]:focus,.uneditable-input:focus{border-color:rgba(85,150,230,0.8);outline:0;outline:thin dotted \9}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:34px;*margin-top:4px;line-height:34px}select{width:220px;background-color:#ffffff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:2px auto rgba(85,150,230,0.8);outline-offset:-3px}.uneditable-input,.uneditable-textarea{color:#999999;cursor:not-allowed;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#bbb}input:-ms-input-placeholder,div[contenteditable="true"]:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#bbb}input::-webkit-input-placeholder,div[contenteditable="true"]::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#bbb}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,div[contenteditable="true"],.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}label.disabled{color:#bbb !important;cursor:default}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning div[contenteditable="true"],.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning div[contenteditable="true"],.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning div[contenteditable="true"]:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error div[contenteditable="true"],.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error div[contenteditable="true"],.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error div[contenteditable="true"]:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success div[contenteditable="true"],.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success div[contenteditable="true"],.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success div[contenteditable="true"]:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info div[contenteditable="true"],.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info div[contenteditable="true"],.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info div[contenteditable="true"]:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,div[contenteditable="true"]:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,div[contenteditable="true"]:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append div[contenteditable="true"],.input-prepend div[contenteditable="true"],.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append div[contenteditable="true"],.input-prepend div[contenteditable="true"],.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append div[contenteditable="true"]:focus,.input-prepend div[contenteditable="true"]:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append div[contenteditable="true"],.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append div[contenteditable="true"],.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search div[contenteditable="true"],.form-inline div[contenteditable="true"],.form-horizontal div[contenteditable="true"],.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}.form-row div[contenteditable="true"]{white-space:nowrap;overflow:hidden}.ui-widget{font-size:14px !important;font-family:'Helvetica Neue', Arial, Helvetica, sans-serif !important}.ui-widget input,.ui-widget div[contenteditable="true"],.ui-widget select,.ui-widget textarea,.ui-widget button{font-size:14px !important;font-family:'Helvetica Neue', Arial, Helvetica, sans-serif !important}.ui-widget input,.ui-widget div[contenteditable="true"]{box-shadow:none}.ui-tabs .ui-tabs-panel{padding:0px}.ui-autocomplete{max-height:250px;overflow-x:hidden;overflow-y:scroll}.ui-dialog{border-radius:1px;background:#fff;padding:0;border:1px solid #ddd;box-shadow:1px 1px 4px rgba(0,0,0,0.2)}.ui-dialog .ui-dialog-content{padding:25px 25px 10px 25px}.ui-dialog .ui-dialog-title{width:auto}.ui-dialog .ui-dialog-titlebar{padding:10px;background:#f3f3f3;border:none;border-bottom:1px solid #999;border-radius:0}.ui-corner-all{border-radius:1px}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{background:#f3f3f3}.ui-dialog-no-close .ui-dialog-titlebar-close{display:none}.ui-dialog-buttonset{text-align:right}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:none}.ui-dialog-buttonset button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;font-size:14px;padding:6px 14px;margin-right:8px;border-radius:2px;color:#999;background:#fff}.ui-dialog-buttonset button.disabled,.ui-dialog-buttonset button:disabled{cursor:default;color:#ccc !important}.ui-dialog-buttonset button:hover,.ui-dialog-buttonset button:focus{text-decoration:none}.ui-dialog-buttonset button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.ui-dialog-buttonset button:not(.disabled):not(:disabled):focus{color:#999 !important}.ui-dialog-buttonset button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .ui-dialog-buttonset button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .ui-dialog-buttonset button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .ui-dialog-buttonset button{display:block;min-width:22px}.button-group-vertical .ui-dialog-buttonset button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .ui-dialog-buttonset button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .ui-dialog-buttonset button:not(:first-child){margin-left:15px}.ui-dialog-buttonset button:focus{outline:1px solid rgba(85,150,230,0.2)}.ui-dialog-buttonset button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.ui-dialog-buttonset button.primary.disabled,.ui-dialog-buttonset button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.ui-dialog-buttonset button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.ui-dialog-buttonset button.leftButton{float:left;margin-top:7px}.ui-dialog-buttonset button:not(.leftButton):not(:last-child){margin-right:16px}.ui-dialog-buttonset button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.ui-dialog-buttonset button.primary:not(.disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.ui-dialog-buttonset button.primary.disabled{border-color:#ccc;color:#ccc !important;background:#fff}.ui-dialog-buttonset button.disabled{background:none}.ui-dialog-buttonset button.disabled{background:none}.ui-dialog-buttonset button.disabled:focus{outline:none}.ui-dialog-buttonset button .ui-button-text{padding:0}.ui-dialog .ui-dialog-buttonpane{padding:.3em 1em .5em 1em}.ui-spinner{border-radius:4px;padding:0;border:1px solid #ccc}.ui-spinner input{margin:0 17px 0 0;padding:6px;border:none;border-top-right-radius:0px;border-bottom-right-radius:0px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.ui-spinner input:focus{outline:none}.ui-widget-overlay{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(160,160,160,0.5);z-index:5;z-index:100;opacity:1}.popover-title{display:none}div.btn-group,a.btn{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dropdown-menu>li>a{color:#444}.ace_gutter{border-top-left-radius:4px;border-bottom-left-radius:4px}.ace_scroller{border-top-right-radius:4px;border-bottom-right-radius:4px}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{background:#999}.dropdown-menu * .fa-check-square{display:none;color:#e0e0e0;margin-left:-25px;margin-top:3px}.dropdown-menu * a.active>.fa-check-square{display:inline-block}.dropdown-menu * .fa-square{display:inline-block;color:#e0e0e0;margin-left:-25px;margin-top:3px}.dropdown-menu * a.active>.fa-square{display:none}.dropdown-menu>li.disabled>a:hover>[class^="icon-"]{background-image:url("vendor/bootstrap/img/glyphicons-halflings.png") !important}.dropdown-menu{border-radius:0;width:200px !important;margin-left:0px !important}.dropdown-menu>li>a>i{width:10px;text-align:center;margin-left:-8px}.dropdown-menu>li>a{padding-left:38px;text-indent:-8px;white-space:normal !important}.dropdown-submenu>a:after{display:none}.dropdown-submenu>a:before{display:block;float:left;width:0;height:0;margin-top:5px;margin-left:-30px;border-color:transparent;border-right-color:#e0e0e0;border-style:solid;border-width:5px 5px 5px 0;content:" "}.dropdown-submenu.disabled>a:before{border-right-color:#444}.dropdown-submenu.pull-left>.dropdown-menu{border-radius:0}#header{position:absolute;top:0;left:0;width:100%;height:40px;background:#000;box-sizing:border-box;padding:0px 0px 0px 20px;color:#C7C7C7;font-size:14px}span.logo{float:left;margin-top:5px;font-size:30px;line-height:30px;text-decoration:none}span.logo span{vertical-align:middle;font-size:16px !important}span.logo img{height:18px}span.logo a{color:inherit}span.logo a:hover{text-decoration:none}.header-toolbar{padding:0;margin:0;list-style:none;float:right}.header-toolbar>li{display:inline-block;padding:0;margin:0;position:relative}.button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#header .button{min-width:20px;text-align:center;line-height:40px;display:inline-block;font-size:20px;padding:0px 12px;text-decoration:none;color:#C7C7C7;margin:auto 5px;vertical-align:middle;border-left:2px solid #000;border-right:2px solid #000}#header .button:hover{border-color:#323232}#header .button-group{display:inline-block;margin:auto 15px;vertical-align:middle;clear:both}#header .button-group>a{display:inline-block;position:relative;float:left;line-height:22px;font-size:14px;text-decoration:none;padding:4px 8px;margin:0}.deploy-button{background:#8C101C;color:#eee !important}.deploy-button:hover{background:#6E0A1E}.deploy-button:active{background:#4C0A17;color:#ccc !important}.deploy-button-spinner{position:absolute;left:0;top:0;right:0;bottom:0;text-align:center}.deploy-button-spinner img{opacity:0.8;height:100%}#btn-deploy{padding:4px 12px}#btn-deploy.disabled{cursor:default;background:#444;color:#999 !important}#btn-deploy.disabled .deploy-button-content>img{opacity:0.3}#btn-deploy.disabled+#btn-deploy-options{background:#444;color:#ddd}#btn-deploy.disabled+#btn-deploy-options:hover{background:#555}#btn-deploy.disabled+#btn-deploy-options:active{background:#444}#btn-deploy .deploy-button-content>img{margin-right:8px}.deploy-button-group.open #btn-deploy-options{background:#121212 !important}#header .button:active,#header .button.active{background:#121212}#header .button:focus{outline:none}#header li.open .button{background:#121212;border-color:#121212}#header ul.dropdown-menu{background:#121212;width:250px !important;margin-top:0}#header ul.dropdown-menu li a{color:#C7C7C7;padding:3px 40px}#header ul.dropdown-menu li a img{margin-right:10px;padding:4px;border:3px solid rgba(0,0,0,0)}#header ul.dropdown-menu li a.active img{border:3px solid #777677}#header ul.dropdown-menu li a span.menu-label-container{width:180px;vertical-align:top;display:inline-block;text-indent:0px}#header ul.dropdown-menu li a span.menu-label{font-size:14px;display:inline-block;text-indent:0px}#header ul.dropdown-menu li a span.menu-sublabel{color:#aeaeae;font-size:13px;display:inline-block;text-indent:0px}#header ul.dropdown-menu>li:hover>a,#header ul.dropdown-menu>li:focus>a{background:#323232 !important}#header ul.dropdown-menu li.divider{background:#464646;border-bottom-color:#323232}#header ul.dropdown-menu li.disabled a{color:#666}#header ul.dropdown-menu>li.disabled:hover>a,#header ul.dropdown-menu>li.disabled:focus>a{background:none !important}#header ul#btn-deploy-options-submenu{width:300px !important}#header ul#btn-deploy-options-submenu li a span.menu-label{font-size:16px;display:inline-block;text-indent:0px}#header ul#btn-deploy-options-submenu li a{padding:10px 30px;color:#fff}#header ul#btn-deploy-options-submenu li a>i.fa{display:none !important}#header ul#btn-usermenu-submenu li a#btn-username>.menu-label{font-size:16px;color:#fff}#btn-usermenu .user-profile{background-position:center center;background-repeat:no-repeat;background-size:contain;display:inline-block;width:40px;height:35px;vertical-align:middle}#palette{position:absolute;top:0px;bottom:0px;left:0px;background:#f3f3f3;width:180px;text-align:center;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #bbb;box-sizing:border-box;transition:width 0.2s ease-in-out}.palette-expanded #palette{width:380px;box-shadow:1px 0 6px rgba(0,0,0,0.1)}.palette-expanded #workspace{left:379px !important}.palette-expanded #palette-collapse-all{display:none}.palette-expanded #palette-expand-all{display:none}.palette-expanded #palette-container{display:none !important}.palette-expanded #palette-search{display:none !important}.palette-expanded #palette-edit{background:#efefef}.palette-expanded #palette-editor{display:block !important}.palette-scroll{position:absolute;top:35px;right:0;bottom:25px;left:0;padding:0;overflow-y:auto;box-sizing:border-box}#palette>.palette-spinner{padding-top:80px}.palette-search{position:relative;overflow:hidden;background:#ffffff;text-align:center;height:35px;padding:3px;border-bottom:1px solid #bbb;box-sizing:border-box}#palette-footer{border-top:1px solid #bbb;background:#f3f3f3;text-align:right;position:absolute;bottom:0;left:0;right:0;height:25px;line-height:23px;padding:0 10px;user-select:none}#palette-footer .button-group:not(:last-child){margin-right:5px}.palette-button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;font-size:11px;line-height:17px;width:18px;height:18px}.palette-button.disabled,.palette-button:disabled{cursor:default;color:#ccc !important}.palette-button:hover,.palette-button:focus{text-decoration:none}.palette-button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.palette-button:not(.disabled):not(:disabled):focus{color:#999 !important}.palette-button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .palette-button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .palette-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .palette-button{display:block;min-width:22px}.button-group-vertical .palette-button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .palette-button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .palette-button:not(:first-child){margin-left:15px}.palette-button:focus{outline:1px solid rgba(85,150,230,0.2)}.palette-button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.palette-button.primary.disabled,.palette-button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.palette-button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.palette-button.text-button{width:auto;padding:0 5px}.palette-category{border-bottom:1px solid #ccc}.palette-content{background:#fff;padding:3px}.palette-header{position:relative;background:#f3f3f3;cursor:pointer;text-align:left;padding:9px;font-weight:bold;padding-left:30px;overflow:hidden;user-select:none}.palette-header>i{position:absolute;left:11px;top:12px;-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg)}.palette-header i.expanded{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg)}.palette-header span{clear:both}.palette_label{font-size:13px;margin:4px 0 4px 32px;line-height:20px;overflow:hidden;text-align:center;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.palette_label_right{margin:4px 32px 4px 0}.palette_node{display:block;cursor:move;background:#ddd;margin:10px auto;height:25px;border-radius:5px;border:1px solid #999;background-position:5% 50%;background-repeat:no-repeat;width:120px;background-size:contain;position:relative}.palette_node:hover{border-color:#ff7f0e;background-color:#eee}.palette_port{position:absolute;top:8px;left:-5px;box-sizing:border-box;-moz-box-sizing:border-box;background:#d9d9d9;border-radius:3px;width:10px;height:10px;border:1px solid #999}.palette_port_output{left:auto;right:-6px}.palette_node:hover .palette_port{border-color:#999;background-color:#eee}.palette_icon_container{position:absolute;text-align:center;top:0;bottom:0;left:0;width:30px;border-right:1px solid rgba(0,0,0,0.1);background-color:rgba(0,0,0,0.05)}.palette_icon_container_right{left:auto;right:0;border-right:none;border-left:1px solid rgba(0,0,0,0.1)}.palette_icon{display:inline-block;width:20px;height:100%;background-position:50% 50%;background-size:contain;background-repeat:no-repeat}.palette_node_small{display:inline-block;position:relative;width:18px;height:15px;margin:3px 0px;vertical-align:middle;cursor:default}.palette_node_small .palette_icon_container{width:18px;border-right:none}.palette_node_small .palette_icon{margin-left:-1px;width:15px}#sidebar{position:absolute;top:0px;right:0px;bottom:0px;width:315px;background:#fff;box-sizing:border-box;z-index:10;border:1px solid #bbb;box-sizing:border-box}#sidebar.closing{background:#eee;border-color:#900;border-style:dashed}#sidebar-content{position:absolute;top:35px;right:0;bottom:25px;left:0px;overflow-y:auto}#sidebar-separator{position:absolute;top:5px;right:315px;bottom:10px;width:7px;z-index:11;background:#f3f3f3 url(images/grip.png) no-repeat 50% 50%;cursor:col-resize}.sidebar-closed>#sidebar{display:none}.sidebar-closed>#sidebar-separator{right:0px !important}.sidebar-closed>#workspace{right:7px !important}.sidebar-closed>#editor-stack{right:8px !important}#sidebar .button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;line-height:18px;font-size:12px;margin-right:5px;padding:2px 8px}#sidebar .button.disabled,#sidebar .button:disabled{cursor:default;color:#ccc !important}#sidebar .button:hover,#sidebar .button:focus{text-decoration:none}#sidebar .button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}#sidebar .button:not(.disabled):not(:disabled):focus{color:#999 !important}#sidebar .button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group #sidebar .button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group #sidebar .button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical #sidebar .button{display:block;min-width:22px}.button-group-vertical #sidebar .button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical #sidebar .button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row #sidebar .button:not(:first-child){margin-left:15px}#sidebar .button:focus{outline:1px solid rgba(85,150,230,0.2)}#sidebar .button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}#sidebar .button.primary.disabled,#sidebar .button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}#sidebar .button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.sidebar-header{color:#666;text-align:right;padding:8px 10px;background:#f3f3f3;border-bottom:1px solid #ddd;white-space:nowrap}#sidebar-footer{border-top:1px solid #bbb;background:#f3f3f3;text-align:right;position:absolute;bottom:0;left:0;right:0;height:25px;line-height:23px;padding:0 10px;user-select:none}#sidebar-footer .button-group:not(:last-child){margin-right:5px}.sidebar-footer-button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;font-size:11px;line-height:17px;width:18px;height:18px}.sidebar-footer-button.disabled,.sidebar-footer-button:disabled{cursor:default;color:#ccc !important}.sidebar-footer-button:hover,.sidebar-footer-button:focus{text-decoration:none}.sidebar-footer-button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.sidebar-footer-button:not(.disabled):not(:disabled):focus{color:#999 !important}.sidebar-footer-button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .sidebar-footer-button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .sidebar-footer-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .sidebar-footer-button{display:block;min-width:22px}.button-group-vertical .sidebar-footer-button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .sidebar-footer-button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .sidebar-footer-button:not(:first-child){margin-left:15px}.sidebar-footer-button:focus{outline:1px solid rgba(85,150,230,0.2)}.sidebar-footer-button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.sidebar-footer-button.primary.disabled,.sidebar-footer-button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.sidebar-footer-button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.sidebar-footer-button.text-button{width:auto;padding:0 5px}.sidebar-footer-button-toggle{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;color:#999 !important;background:#efefef;margin-bottom:1px;font-size:11px;line-height:17px;height:18px;width:18px}.sidebar-footer-button-toggle.disabled,.sidebar-footer-button-toggle:disabled{cursor:default;color:#ccc !important}.sidebar-footer-button-toggle:hover,.sidebar-footer-button-toggle:focus{text-decoration:none}.sidebar-footer-button-toggle:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.sidebar-footer-button-toggle:not(.disabled):not(:disabled):focus{color:#999 !important}.sidebar-footer-button-toggle:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .sidebar-footer-button-toggle:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .sidebar-footer-button-toggle:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .sidebar-footer-button-toggle{display:block;min-width:22px}.button-group-vertical .sidebar-footer-button-toggle:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .sidebar-footer-button-toggle:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .sidebar-footer-button-toggle:not(:first-child){margin-left:15px}.sidebar-footer-button-toggle:focus{outline:1px solid rgba(85,150,230,0.2)}.sidebar-footer-button-toggle.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.sidebar-footer-button-toggle.primary.disabled,.sidebar-footer-button-toggle.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.sidebar-footer-button-toggle.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.sidebar-footer-button-toggle.selected:not(.disabled):not(:disabled){color:#888 !important;background:#fff;border-bottom-width:2px;border-bottom-color:#aaa;margin-bottom:0}.sidebar-footer-button-toggle.selected:not(.disabled):not(:disabled):not(.single){cursor:default}.sidebar-footer-button-toggle.disabled,.sidebar-footer-button-toggle:disabled{color:#ddd !important}.sidebar-footer-button-toggle.text-button{width:auto;padding:0 5px}.sidebar-header-button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;font-size:13px;line-height:13px;padding:5px 8px}.sidebar-header-button.disabled,.sidebar-header-button:disabled{cursor:default;color:#ccc !important}.sidebar-header-button:hover,.sidebar-header-button:focus{text-decoration:none}.sidebar-header-button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.sidebar-header-button:not(.disabled):not(:disabled):focus{color:#999 !important}.sidebar-header-button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .sidebar-header-button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .sidebar-header-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .sidebar-header-button{display:block;min-width:22px}.button-group-vertical .sidebar-header-button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .sidebar-header-button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .sidebar-header-button:not(:first-child){margin-left:15px}.sidebar-header-button:focus{outline:1px solid rgba(85,150,230,0.2)}.sidebar-header-button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.sidebar-header-button.primary.disabled,.sidebar-header-button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.sidebar-header-button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.sidebar-header-button-toggle{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;color:#999 !important;background:#efefef;margin-bottom:1px;font-size:13px;line-height:13px;padding:5px 8px}.sidebar-header-button-toggle.disabled,.sidebar-header-button-toggle:disabled{cursor:default;color:#ccc !important}.sidebar-header-button-toggle:hover,.sidebar-header-button-toggle:focus{text-decoration:none}.sidebar-header-button-toggle:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.sidebar-header-button-toggle:not(.disabled):not(:disabled):focus{color:#999 !important}.sidebar-header-button-toggle:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .sidebar-header-button-toggle:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .sidebar-header-button-toggle:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .sidebar-header-button-toggle{display:block;min-width:22px}.button-group-vertical .sidebar-header-button-toggle:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .sidebar-header-button-toggle:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .sidebar-header-button-toggle:not(:first-child){margin-left:15px}.sidebar-header-button-toggle:focus{outline:1px solid rgba(85,150,230,0.2)}.sidebar-header-button-toggle.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.sidebar-header-button-toggle.primary.disabled,.sidebar-header-button-toggle.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.sidebar-header-button-toggle.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.sidebar-header-button-toggle.selected:not(.disabled):not(:disabled){color:#888 !important;background:#fff;border-bottom-width:2px;border-bottom-color:#aaa;margin-bottom:0}.sidebar-header-button-toggle.selected:not(.disabled):not(:disabled):not(.single){cursor:default}.sidebar-header-button-toggle.disabled,.sidebar-header-button-toggle:disabled{color:#ddd !important}.sidebar-header-button:not(:first-child){border-left:none}.sidebar-shade{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(160,160,160,0.5);z-index:5}#chart{overflow:auto;background:#e3e3e3;position:absolute;bottom:25px;top:35px;left:0px;right:0px;box-sizing:border-box;transition:right 0.2s ease}#chart:focus{outline:none}#workspace{position:absolute;margin:0;top:0px;left:179px;bottom:0px;right:322px;overflow:hidden;border:1px solid #bbb;box-sizing:border-box;transition:left 0.2s ease-in-out}.workspace-footer-button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;font-size:11px;line-height:17px;width:18px;height:18px}.workspace-footer-button.disabled,.workspace-footer-button:disabled{cursor:default;color:#ccc !important}.workspace-footer-button:hover,.workspace-footer-button:focus{text-decoration:none}.workspace-footer-button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.workspace-footer-button:not(.disabled):not(:disabled):focus{color:#999 !important}.workspace-footer-button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .workspace-footer-button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .workspace-footer-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .workspace-footer-button{display:block;min-width:22px}.button-group-vertical .workspace-footer-button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .workspace-footer-button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .workspace-footer-button:not(:first-child){margin-left:15px}.workspace-footer-button:focus{outline:1px solid rgba(85,150,230,0.2)}.workspace-footer-button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.workspace-footer-button.primary.disabled,.workspace-footer-button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.workspace-footer-button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.workspace-footer-button.text-button{width:auto;padding:0 5px}.workspace-footer-button-toggle{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;color:#999 !important;background:#efefef;margin-bottom:1px;font-size:11px;line-height:17px;height:18px;width:18px}.workspace-footer-button-toggle.disabled,.workspace-footer-button-toggle:disabled{cursor:default;color:#ccc !important}.workspace-footer-button-toggle:hover,.workspace-footer-button-toggle:focus{text-decoration:none}.workspace-footer-button-toggle:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.workspace-footer-button-toggle:not(.disabled):not(:disabled):focus{color:#999 !important}.workspace-footer-button-toggle:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .workspace-footer-button-toggle:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .workspace-footer-button-toggle:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .workspace-footer-button-toggle{display:block;min-width:22px}.button-group-vertical .workspace-footer-button-toggle:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .workspace-footer-button-toggle:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .workspace-footer-button-toggle:not(:first-child){margin-left:15px}.workspace-footer-button-toggle:focus{outline:1px solid rgba(85,150,230,0.2)}.workspace-footer-button-toggle.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.workspace-footer-button-toggle.primary.disabled,.workspace-footer-button-toggle.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.workspace-footer-button-toggle.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.workspace-footer-button-toggle.selected:not(.disabled):not(:disabled){color:#888 !important;background:#fff;border-bottom-width:2px;border-bottom-color:#aaa;margin-bottom:0}.workspace-footer-button-toggle.selected:not(.disabled):not(:disabled):not(.single){cursor:default}.workspace-footer-button-toggle.disabled,.workspace-footer-button-toggle:disabled{color:#ddd !important}.workspace-footer-button-toggle.text-button{width:auto;padding:0 5px}#workspace-footer{border-top:1px solid #bbb;background:#f3f3f3;text-align:right;position:absolute;bottom:0;left:0;right:0;height:25px;line-height:23px;padding:0 10px;user-select:none}#workspace-footer .button-group:not(:last-child){margin-right:5px}#workspace-tabs:not(.workspace-focussed){opacity:0.8}#workspace-tabs:not(.workspace-focussed) li.red-ui-tab.active a{color:#666}.workspace-disabled-icon{display:none}.workspace-disabled.red-ui-tab{border-top-style:dashed;border-left-style:dashed;border-right-style:dashed}.workspace-disabled.red-ui-tab a{font-style:italic;color:#aaa !important}.workspace-disabled.red-ui-tab.active a{font-weight:normal;color:#999 !important}.workspace-disabled.red-ui-tab .workspace-disabled-icon{display:inline}#workspace-toolbar{display:none;color:#888;font-size:12px;line-height:18px;position:absolute;top:35px;left:0;right:0;padding:7px;height:40px;box-sizing:border-box;background:#fff;border-bottom:1px solid #ddd;white-space:nowrap;transition:right 0.2s ease;overflow:hidden}#workspace-toolbar .button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;margin-right:10px;padding:2px 8px}#workspace-toolbar .button.disabled,#workspace-toolbar .button:disabled{cursor:default;color:#ccc !important}#workspace-toolbar .button:hover,#workspace-toolbar .button:focus{text-decoration:none}#workspace-toolbar .button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}#workspace-toolbar .button:not(.disabled):not(:disabled):focus{color:#999 !important}#workspace-toolbar .button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group #workspace-toolbar .button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group #workspace-toolbar .button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical #workspace-toolbar .button{display:block;min-width:22px}.button-group-vertical #workspace-toolbar .button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical #workspace-toolbar .button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row #workspace-toolbar .button:not(:first-child){margin-left:15px}#workspace-toolbar .button:focus{outline:1px solid rgba(85,150,230,0.2)}#workspace-toolbar .button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}#workspace-toolbar .button.primary.disabled,#workspace-toolbar .button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}#workspace-toolbar .button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}#workspace-toolbar .button-group{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#workspace-toolbar .button-group .button:first-child{margin-right:0}#workspace-toolbar .button-group:not(.spinner-group) .button:not(:first-child){border-left:none}#workspace-toolbar .button-group .button.active{background:#efefef;cursor:default}#workspace-toolbar .spinner-value{width:25px;color:#888;padding:0 5px;display:inline-block;text-align:center;border-top:1px solid #ddd;border-bottom:1px solid #ddd;margin:0;height:24px;font-size:12px;background:#f9f9f9;line-height:22px;box-sizing:border-box}#notifications{z-index:100;width:500px;margin-left:-250px;left:50%;position:absolute;top:1px}.notification{box-sizing:border-box;position:relative;padding:14px 18px;margin-bottom:4px;box-shadow:0 1px 1px 1px rgba(0,0,0,0.15);background-color:#fff;color:#666;border:1px solid #325C80;border-left-width:16px;overflow:hidden}.notification p:first-child{font-size:1.1em;font-weight:400}.notification a{text-decoration:none}.notification a:hover{text-decoration:underline}.notification-success{border-color:#4B8400}.notification-warning{border-color:#D74108}.notification-error{border-color:#AD1625}#editor-stack{position:absolute;margin:0;top:0;bottom:0px;right:323px;width:0;z-index:5}.editor-tray{position:absolute;margin:0;top:0;width:auto;right:-1000px;bottom:0;background:#fff;border-left:1px solid #ddd;border-bottom:1px solid #bbb;box-sizing:content-box}.editor-tray.open{right:0}.editor-tray-body-wrapper{width:100%;box-sizing:border-box;overflow:auto}.editor-tray-body{position:relative;box-sizing:border-box;padding:0.1px}.editor-tray-body .dialog-form,.editor-tray-body #dialog-form,.editor-tray-body #node-config-dialog-edit-form{margin:20px;height:calc(100% - 40px)}.editor-tray-content{overflow:auto}.editor-tray-header{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;box-sizing:border-box;font-weight:bold;border-bottom:1px solid #ddd;background:#f3f3f3}.editor-tray-header:after{content:"";display:table;clear:both}.editor-tray-footer{border-top:1px solid #bbb;background:#f3f3f3;text-align:right;position:absolute;bottom:0;left:0;right:0;height:25px;line-height:23px;padding:0 10px;user-select:none;height:35px}.editor-tray-footer .button-group:not(:last-child){margin-right:5px}.editor-tray-footer button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;font-size:14px;padding:6px 14px;margin-right:8px;color:#999 !important;background:#fff;padding:3px 7px;font-size:11px}.editor-tray-footer button.disabled,.editor-tray-footer button:disabled{cursor:default;color:#ccc !important}.editor-tray-footer button:hover,.editor-tray-footer button:focus{text-decoration:none}.editor-tray-footer button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.editor-tray-footer button:not(.disabled):not(:disabled):focus{color:#999 !important}.editor-tray-footer button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .editor-tray-footer button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .editor-tray-footer button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .editor-tray-footer button{display:block;min-width:22px}.button-group-vertical .editor-tray-footer button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .editor-tray-footer button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .editor-tray-footer button:not(:first-child){margin-left:15px}.editor-tray-footer button:focus{outline:1px solid rgba(85,150,230,0.2)}.editor-tray-footer button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.editor-tray-footer button.primary.disabled,.editor-tray-footer button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.editor-tray-footer button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.editor-tray-footer button.disabled{background:none}.editor-tray-footer button.disabled:focus{outline:none}.editor-tray-footer button.leftButton{float:left;margin-top:1px}.editor-tray-footer button:not(.leftButton):not(:last-child){margin-right:16px}.editor-tray-footer button.ui-state-disabled{opacity:1}.editor-tray-toolbar{text-align:right;padding:6px}.editor-tray-toolbar button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;font-size:14px;padding:6px 14px;margin-right:8px;color:#999 !important;background:#fff}.editor-tray-toolbar button.disabled,.editor-tray-toolbar button:disabled{cursor:default;color:#ccc !important}.editor-tray-toolbar button:hover,.editor-tray-toolbar button:focus{text-decoration:none}.editor-tray-toolbar button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.editor-tray-toolbar button:not(.disabled):not(:disabled):focus{color:#999 !important}.editor-tray-toolbar button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .editor-tray-toolbar button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .editor-tray-toolbar button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .editor-tray-toolbar button{display:block;min-width:22px}.button-group-vertical .editor-tray-toolbar button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .editor-tray-toolbar button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .editor-tray-toolbar button:not(:first-child){margin-left:15px}.editor-tray-toolbar button:focus{outline:1px solid rgba(85,150,230,0.2)}.editor-tray-toolbar button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.editor-tray-toolbar button.primary.disabled,.editor-tray-toolbar button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.editor-tray-toolbar button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.editor-tray-toolbar button.disabled{background:none}.editor-tray-toolbar button.disabled:focus{outline:none}.editor-tray-toolbar button.leftButton{float:left;margin-top:1px}.editor-tray-toolbar button:not(.leftButton):not(:last-child){margin-right:16px}.editor-tray-toolbar button.ui-state-disabled{opacity:1}.editor-tray-toolbar button.toggle{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;color:#999 !important;background:#efefef;margin-bottom:1px}.editor-tray-toolbar button.toggle.disabled,.editor-tray-toolbar button.toggle:disabled{cursor:default;color:#ccc !important}.editor-tray-toolbar button.toggle:hover,.editor-tray-toolbar button.toggle:focus{text-decoration:none}.editor-tray-toolbar button.toggle:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.editor-tray-toolbar button.toggle:not(.disabled):not(:disabled):focus{color:#999 !important}.editor-tray-toolbar button.toggle:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .editor-tray-toolbar button.toggle:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .editor-tray-toolbar button.toggle:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .editor-tray-toolbar button.toggle{display:block;min-width:22px}.button-group-vertical .editor-tray-toolbar button.toggle:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .editor-tray-toolbar button.toggle:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .editor-tray-toolbar button.toggle:not(:first-child){margin-left:15px}.editor-tray-toolbar button.toggle:focus{outline:1px solid rgba(85,150,230,0.2)}.editor-tray-toolbar button.toggle.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.editor-tray-toolbar button.toggle.primary.disabled,.editor-tray-toolbar button.toggle.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.editor-tray-toolbar button.toggle.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.editor-tray-toolbar button.toggle.selected:not(.disabled):not(:disabled){color:#888 !important;background:#fff;border-bottom-width:2px;border-bottom-color:#aaa;margin-bottom:0}.editor-tray-toolbar button.toggle.selected:not(.disabled):not(:disabled):not(.single){cursor:default}.editor-tray-toolbar button.toggle.disabled,.editor-tray-toolbar button.toggle:disabled{color:#ddd !important}.editor-tray-titlebar{border-bottom:1px solid #ddd;padding:8px}.editor-tray-breadcrumbs{list-style-type:none;margin:0;padding:0}.editor-tray-breadcrumbs li{display:inline-block;padding:0;margin:0}.editor-tray-breadcrumbs li:not(:last-child){color:#999;font-weight:normal}.editor-tray-breadcrumbs li:not(:last-child):after{display:inline-block;content:'>';margin:0 5px}.editor-tray-resize-handle{position:absolute;top:0px;bottom:0px;width:7px;left:-9px;background:#f3f3f3 url(images/grip.png) no-repeat 50% 50%;cursor:col-resize;border-left:1px solid #bbb;box-shadow:-1px 0 6px rgba(0,0,0,0.1)}.editor-tray-resize-handle.editor-tray-resize-maximised{background:#f3f3f3;cursor:default}.editor-tray-resize-button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;display:block;height:37px;line-height:35px;border:none;border-bottom:1px solid #ddd;margin:0;background:#f3f3f3;color:#888}.editor-tray-resize-button.disabled,.editor-tray-resize-button:disabled{cursor:default;color:#ccc !important}.editor-tray-resize-button:hover,.editor-tray-resize-button:focus{text-decoration:none}.editor-tray-resize-button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.editor-tray-resize-button:not(.disabled):not(:disabled):focus{color:#999 !important}.editor-tray-resize-button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .editor-tray-resize-button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .editor-tray-resize-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .editor-tray-resize-button{display:block;min-width:22px}.button-group-vertical .editor-tray-resize-button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .editor-tray-resize-button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .editor-tray-resize-button:not(:first-child){margin-left:15px}.editor-tray-resize-button:focus{outline:1px solid rgba(85,150,230,0.2)}.editor-tray-resize-button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.editor-tray-resize-button.primary.disabled,.editor-tray-resize-button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.editor-tray-resize-button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}#palette-shade,#editor-shade,#header-shade,#sidebar-shade{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(160,160,160,0.5);z-index:5;z-index:2}#sidebar-shade{left:-8px;top:-1px;bottom:-1px}#full-shade{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(160,160,160,0.5);z-index:5;z-index:15}.dialog-form,#dialog-form,#node-config-dialog-edit-form{height:100%}.input-error{border-color:#d6615f !important}.form-row{clear:both;color:#444;margin-bottom:12px}.form-row label{display:inline-block;width:100px}.form-row input,.form-row div[contenteditable="true"]{width:70%}.form-tips{background:#ffe;padding:8px;border-radius:2px;border:1px solid #ddd;max-width:450px}.form-tips code{border:none;padding:auto}.form-tips a{text-decoration:underline}.form-warning{border-color:#d6615f}.node-text-editor{border:1px solid #ccc;border-radius:5px;overflow:hidden;font-size:14px !important;font-family:Menlo, Consolas, 'DejaVu Sans Mono', Courier, monospace !important}.editor-button{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;height:34px;line-height:32px;font-size:13px;border-radius:2px;padding:0 10px;white-space:nowrap;text-overflow:ellipsis}.editor-button.disabled,.editor-button:disabled{cursor:default;color:#ccc !important}.editor-button:hover,.editor-button:focus{text-decoration:none}.editor-button:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.editor-button:not(.disabled):not(:disabled):focus{color:#999 !important}.editor-button:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .editor-button:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .editor-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .editor-button{display:block;min-width:22px}.button-group-vertical .editor-button:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .editor-button:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .editor-button:not(:first-child){margin-left:15px}.editor-button:focus{outline:1px solid rgba(85,150,230,0.2)}.editor-button.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.editor-button.primary.disabled,.editor-button.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.editor-button.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.editor-button.toggle{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;color:#999 !important;background:#efefef;margin-bottom:1px}.editor-button.toggle.disabled,.editor-button.toggle:disabled{cursor:default;color:#ccc !important}.editor-button.toggle:hover,.editor-button.toggle:focus{text-decoration:none}.editor-button.toggle:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.editor-button.toggle:not(.disabled):not(:disabled):focus{color:#999 !important}.editor-button.toggle:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .editor-button.toggle:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .editor-button.toggle:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .editor-button.toggle{display:block;min-width:22px}.button-group-vertical .editor-button.toggle:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .editor-button.toggle:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .editor-button.toggle:not(:first-child){margin-left:15px}.editor-button.toggle:focus{outline:1px solid rgba(85,150,230,0.2)}.editor-button.toggle.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.editor-button.toggle.primary.disabled,.editor-button.toggle.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.editor-button.toggle.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.editor-button.toggle.selected:not(.disabled):not(:disabled){color:#888 !important;background:#fff;border-bottom-width:2px;border-bottom-color:#aaa;margin-bottom:0}.editor-button.toggle.selected:not(.disabled):not(:disabled):not(.single){cursor:default}.editor-button.toggle.disabled,.editor-button.toggle:disabled{color:#ddd !important}.editor-button-small{height:20px;min-width:20px;line-height:18px;font-size:10px;border-radius:2px;padding:0 5px}#node-config-dialog-scope-container{cursor:auto;float:right;font-size:12px !important;line-height:35px}#node-config-dialog-scope-warning{display:inline-block;margin-right:5px;color:#AD1625;vertical-align:middle}#node-config-dialog-scope{margin:1px 0 0 0;padding:0;height:22px;width:200px}#node-config-dialog-user-count{vertical-align:middle;display:inline-block;margin-right:20px;float:left;font-size:12px;line-height:35px}.node-input-expression-editor #dialog-form{margin:0;height:100%}.node-input-expression-editor #dialog-form .red-ui-panel:first-child{padding:20px 20px 0}.node-input-expression-editor #dialog-form .red-ui-panel:last-child{padding-bottom:20px}.node-input-expression-tab-content{position:relative;padding:0 20px}#node-input-expression-help{position:absolute;top:35px;left:0;right:0;bottom:0;padding:0 20px;overflow:auto;box-sizing:border-box}#node-input-expression-panel-info>.form-row{margin:0}#node-input-expression-panel-info>.form-row>div:first-child{margin-top:10px}.node-input-expression-legacy,.node-input-buffer-type{font-size:0.8em;float:left;cursor:pointer;border:1px solid white;padding:2px 5px;border-radius:2px}.node-input-expression-legacy:hover,.node-input-buffer-type:hover{border-color:#ccc}.node-input-buffer-type{float:none;text-align:right}#clipboard-hidden{position:absolute;top:-3000px}.node-label-form-row{margin:5px 0}.node-label-form-row label{margin-right:20px;text-align:right;width:30px}.node-label-form-row button{margin-left:10px}.node-label-form-row input{width:calc(100% - 100px)}.node-label-form-row #node-settings-icon-module{width:calc(55% - 50px)}.node-label-form-row #node-settings-icon-file{width:calc(45% - 55px);margin-left:5px}.node-label-form-none span{padding-left:50px;width:100px;color:#999}.ace_read-only{background:#eee !important}.ace_read-only .ace_cursor{color:transparent !important}#node-settings-icon{margin-left:10px;width:calc(100% - 163px)}.red-ui-icon-picker{position:absolute;border:1px solid #bbb;box-shadow:0 1px 6px -3px black;background:white;z-Index:21;display:none}.red-ui-icon-picker select{box-sizing:border-box;margin:3px;width:calc(100% - 6px)}.red-ui-icon-list{width:308px;height:200px;overflow-y:scroll;line-height:0px}.red-ui-icon-list-icon{display:inline-block;margin:2px;padding:4px;cursor:pointer;border-radius:4px}.red-ui-icon-list-icon:hover{background:#ffb574}.red-ui-icon-list-icon.selected{background:#ffb574}.red-ui-icon-list-icon.selected .red-ui-search-result-node{border-color:white}.red-ui-icon-list-module{background:#f3f3f3;font-size:0.9em;padding:3px;color:#666;clear:both}.red-ui-icon-list-module i{margin-right:5px}.red-ui-icon-meta{border-top:1px solid #ddd}.red-ui-icon-meta span{padding:4px;color:#666;font-size:0.9em}.red-ui-icon-meta button{float:right;margin:2px}#node-select-library{overflow:hidden}#node-select-library ul{list-style:none;padding:0px;margin:2px}#node-select-library li{cursor:pointer}#node-select-library li.list-selected{background:#eee}#node-select-library li.list-hover{background:#ffffd0}.red-ui-search{z-index:1000;display:none;position:absolute;width:500px;background:white;left:50%;margin-left:-250px;top:0px;border:1px solid #bbb;box-shadow:0 0 10px rgba(0,0,0,0.4)}.red-ui-type-search-shade{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(160,160,160,0.5);z-index:5;z-index:20;position:fixed;background:rgba(255,255,255,0.05)}.red-ui-type-search{box-shadow:0 1px 6px -3px black;background:none;width:300px;margin-left:0px;border:none}.red-ui-type-search .red-ui-search-container{border-top-left-radius:5px;border-top-right-radius:5px;border:1px dashed #aaa;border-bottom:none;padding:0}.red-ui-type-search .red-ui-search-results-container{display:none;height:150px}.red-ui-type-search .red-ui-search-results-container .red-ui-editableList-container{border:1px dashed #aaa;border-top:1px solid #ccc}.red-ui-type-search .red-ui-search-result{padding:2px 2px 2px 5px;font-size:13px;border-left-width:3px;border-right-width:3px}.red-ui-type-search .red-ui-search-result-separator{border-bottom:3px solid #ddd}.red-ui-type-search .red-ui-search-result-node{position:relative;width:18px;height:15px;margin-top:1px}.red-ui-type-search .red-ui-search-result-node-port{position:absolute;border-radius:2px;border:1px solid #999;width:6px;height:7px;top:4px;left:-4px;background:#eee;box-sizing:border-box}.red-ui-type-search .red-ui-search-result-node-output{left:16px}.red-ui-type-search .palette_icon_container{width:18px}.red-ui-type-search .palette_icon{width:15px}.red-ui-type-search .red-ui-search-result-description{margin-left:28px}.red-ui-type-search .red-ui-search-result-node-label{color:#999}.red-ui-search-container{padding:3px;border-bottom:1px solid #ddd}.red-ui-search-results-container{position:relative;height:300px;padding:5px;background:#f9f9f9}.red-ui-search-results-container .red-ui-editableList-container{background:white;padding:0;background:#f9f9f9}.red-ui-search-results-container .red-ui-editableList-container li{padding:0}.red-ui-search-results-container .red-ui-editableList-container li.selected{background:#efefef}.red-ui-search-results-container .red-ui-editableList-container li.selected .red-ui-search-result{border-left-color:#999;border-right-color:#999}.red-ui-search-result{padding:8px 2px 8px 5px;display:block;cursor:pointer;color:#444;border-left:3px solid #fff;border-right:3px solid #fff}.red-ui-search-result:hover{text-decoration:none;color:#444;background:#efefef;border-left-color:#efefef;border-right-color:#efefef}.red-ui-search-result:after{content:"";display:table;clear:both}.red-ui-search-result-node{display:inline-block;width:30px;float:left;height:25px;background:#ddd;border-radius:5px;border:1px solid #999;background-position:5% 50%;background-repeat:no-repeat;background-size:contain;position:relative}.red-ui-search-result-node .palette_icon_container{border-right:none}.red-ui-search-result-description{margin-left:40px;margin-right:5px}.red-ui-search-result-node-label{color:#222}.red-ui-search-result-node-type{font-style:italic;font-size:0.9em}.red-ui-search-result-node-flow{float:right;font-size:0.8em}.red-ui-search-result-node-id{display:none;font-size:0.8em}.red-ui-search-empty{padding:10px;text-align:center;font-style:italic;color:#bbb}.red-ui-panels{position:relative}.red-ui-panels>div{box-sizing:border-box}.red-ui-panels-separator{border-top:1px solid #ddd;border-bottom:1px solid #ddd;height:7px;box-sizing:border-box;cursor:ns-resize;background:#f3f3f3 url(images/grip.png) no-repeat 50% 50%}.red-ui-panel{overflow:auto;height:calc(50% - 4px)}.red-ui-tabs{position:relative;background:#fff;overflow:hidden;height:35px;box-sizing:border-box}.red-ui-tabs .red-ui-tabs-scroll-container{height:60px;overflow-x:scroll;overflow-y:hidden}.red-ui-tabs .red-ui-tabs-scroll-container::-webkit-scrollbar{display:none}.red-ui-tabs ul{list-style-type:none;padding:0;margin:0;display:block;height:35px;box-sizing:border-box;border-bottom:1px solid #bbb;white-space:nowrap;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.red-ui-tabs ul li{box-sizing:border-box;display:inline-block;border-left:1px solid #bbb;border-top:1px solid #bbb;border-right:1px solid #bbb;border-bottom:1px solid #bbb;background:#f0f0f0;margin:3px 3px 0 3px;height:32px;line-height:29px;max-width:200px;width:14%;overflow:hidden;white-space:nowrap;position:relative}.red-ui-tabs ul li a.red-ui-tab-label{display:block;font-size:14px;padding-left:12px;width:100%;height:100%;color:#666}.red-ui-tabs ul li a:hover{text-decoration:none}.red-ui-tabs ul li a:focus{text-decoration:none}.red-ui-tabs ul li:not(.active) a:hover+a.red-ui-tab-close{background:#ddd}.red-ui-tabs ul li.active{background:#fff;font-weight:bold;border-bottom:1px solid #fff;z-index:2}.red-ui-tabs ul li.active a{color:#333}.red-ui-tabs ul li.active a.red-ui-tab-close{color:#aaa;background:#fff}.red-ui-tabs ul li.active a.red-ui-tab-close:hover{background:#ddd !important;color:#666}.red-ui-tabs ul li.active img.red-ui-tab-icon{opacity:0.2}.red-ui-tabs ul li:not(.active) a:hover{color:#666;background:#ddd}.red-ui-tabs.red-ui-tabs-scrollable{padding-left:21px;padding-right:21px}.red-ui-tabs.red-ui-tabs-add{padding-right:35px}.red-ui-tabs.red-ui-tabs-add.red-ui-tabs-scrollable{padding-right:59px}.red-ui-tabs.red-ui-tabs-collapsible li:not(.active){display:none}.red-ui-tabs.red-ui-tabs-collapsible li:not(.active).red-ui-tab-pinned{width:32px}.red-ui-tabs.red-ui-tabs-collapsible li:not(.active).red-ui-tab-pinned a{padding-left:0;text-align:center}.red-ui-tabs.red-ui-tabs-collapsible li:not(.active).red-ui-tab-pinned span{display:none}.red-ui-tabs.red-ui-tabs-vertical{box-sizing:border-box;height:100%;border-right:1px solid #bbb;margin:0;background:#f3f3f3;overflow:visible}.red-ui-tabs.red-ui-tabs-vertical .red-ui-tabs-scroll-container{height:auto;overflow-x:visible;overflow-y:scroll}.red-ui-tabs.red-ui-tabs-vertical ul{padding:0;height:auto;border:none;width:calc(100% + 1px)}.red-ui-tabs.red-ui-tabs-vertical ul li{width:100%;display:block;margin:0;border:none;border-right:1px solid #bbb;height:auto}.red-ui-tabs.red-ui-tabs-vertical ul li:not(:first-child){border-top:1px solid #ddd}.red-ui-tabs.red-ui-tabs-vertical ul li:last-child{border-bottom:1px solid #ddd}.red-ui-tabs.red-ui-tabs-vertical ul li a.red-ui-tab-label{padding:9px}.red-ui-tabs.red-ui-tabs-vertical ul li.active{border-right:1px solid #fff}.red-ui-tabs .red-ui-tabs-select{position:absolute;top:0;bottom:0;left:0;right:0;opacity:0.4;background:red}.red-ui-tab-button{position:absolute;box-sizing:border-box;top:0;right:0;height:35px;background:#fff;border-bottom:1px solid #bbb;z-index:2}.red-ui-tab-button a{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;line-height:32px;height:32px;width:32px;margin-top:3px;margin-right:3px;margin-left:3px;border:1px solid #bbb;z-index:2}.red-ui-tab-button a.disabled,.red-ui-tab-button a:disabled{cursor:default;color:#ccc !important}.red-ui-tab-button a:hover,.red-ui-tab-button a:focus{text-decoration:none}.red-ui-tab-button a:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.red-ui-tab-button a:not(.disabled):not(:disabled):focus{color:#999 !important}.red-ui-tab-button a:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .red-ui-tab-button a:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .red-ui-tab-button a:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .red-ui-tab-button a{display:block;min-width:22px}.button-group-vertical .red-ui-tab-button a:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .red-ui-tab-button a:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .red-ui-tab-button a:not(:first-child){margin-left:15px}.red-ui-tab-button a:focus{outline:1px solid rgba(85,150,230,0.2)}.red-ui-tab-button a.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.red-ui-tab-button a.primary.disabled,.red-ui-tab-button a.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.red-ui-tab-button a.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.red-ui-tab-link-buttons{position:absolute;box-sizing:border-box;top:0;right:0;height:35px;background:#fff;border-bottom:1px solid #bbb;z-index:2}.red-ui-tab-link-buttons a{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;display:inline-block;color:#888 !important;background:#fff;border:1px solid #ccc;text-align:center;margin:0;text-decoration:none;cursor:pointer;color:#999 !important;background:#efefef;margin-bottom:1px;line-height:26px;height:28px;width:28px;margin:4px 3px 3px;z-index:2}.red-ui-tab-link-buttons a.disabled,.red-ui-tab-link-buttons a:disabled{cursor:default;color:#ccc !important}.red-ui-tab-link-buttons a:hover,.red-ui-tab-link-buttons a:focus{text-decoration:none}.red-ui-tab-link-buttons a:not(.disabled):not(:disabled):hover{color:#666 !important;background:#ddd}.red-ui-tab-link-buttons a:not(.disabled):not(:disabled):focus{color:#999 !important}.red-ui-tab-link-buttons a:not(.disabled):not(:disabled):active{color:#666 !important;background:#efefef;text-decoration:none}.button-group .red-ui-tab-link-buttons a:not(:first-child){border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.button-group .red-ui-tab-link-buttons a:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.button-group-vertical .red-ui-tab-link-buttons a{display:block;min-width:22px}.button-group-vertical .red-ui-tab-link-buttons a:not(:first-child){border-top:none;border-top-left-radius:0;border-top-right-radius:0}.button-group-vertical .red-ui-tab-link-buttons a:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.button-row .red-ui-tab-link-buttons a:not(:first-child){margin-left:15px}.red-ui-tab-link-buttons a:focus{outline:1px solid rgba(85,150,230,0.2)}.red-ui-tab-link-buttons a.primary{border-color:#AD1625;color:#eee !important;background:#AD1625}.red-ui-tab-link-buttons a.primary.disabled,.red-ui-tab-link-buttons a.primary.ui-state-disabled{background:none;color:#999 !important;border-color:#ccc}.red-ui-tab-link-buttons a.primary:not(.disabled):not(.ui-button-disabled):hover{border-color:#6E0A1E;background:#6E0A1E;color:#eee !important}.red-ui-tab-link-buttons a.selected:not(.disabled):not(:disabled){color:#888 !important;background:#fff;border-bottom-width:2px;border-bottom-color:#aaa;margin-bottom:0}.red-ui-tab-link-buttons a.selected:not(.disabled):not(:disabled):not(.single){cursor:default}.red-ui-tab-link-buttons a.disabled,.red-ui-tab-link-buttons a:disabled{color:#ddd !important}.red-ui-tab-link-buttons a.red-ui-tab-link-button:not(.active){background:#eee}.red-ui-tab-link-buttons a.red-ui-tab-link-button-menu{border-color:white}.red-ui-tab-scroll{width:21px;top:0}.red-ui-tab-scroll a{height:35px;width:21px;display:block;color:#888;font-size:22px;text-align:center;margin:0;border-left:none;border-right:none;border-top:none}.red-ui-tab-scroll-left{left:0}.red-ui-tab-scroll-left a{border-right:1px solid #bbb}.red-ui-tab-scroll-right{right:0px}.red-ui-tab-scroll-right a{border-left:1px solid #bbb}.red-ui-tabs.red-ui-tabs-add .red-ui-tab-scroll-right{right:38px}img.red-ui-tab-icon{margin-left:-8px;margin-right:3px;margin-top:-2px;opacity:0.1;width:20px;height:20px;vertical-align:middle}i.red-ui-tab-icon{opacity:0.7;width:18px;height:20px}.red-ui-tabs-badges{position:absolute;top:2px;right:2px}.red-ui-tab-closeable .red-ui-tabs-badges{right:22px}.red-ui-tab.node_changed img.node_changed{display:inline-block}.red-ui-tab.node_error img.node_error{display:inline-block}.red-ui-tabs-badges img{width:10px;height:10px;margin-right:2px;vertical-align:top}.red-ui-tab-close{background:#f0f0f0;opacity:0.8;position:absolute;right:0px;top:0px;display:block;width:20px;height:30px;line-height:28px;text-align:center;padding:0px;color:#aaa}.red-ui-tab-close:hover{background:#ddd !important;opacity:1}.sidebar-node-config{position:relative;background:#f3f3f3;height:100%;overflow-y:auto;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.config-node-list{margin:0;list-style-type:none}.config-node-list .palette_label{margin-left:8px;line-height:24px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.config-node-list .palette_icon_container{font-size:12px;line-height:30px;background-color:#e8e8e8;border-top-right-radius:4px;border-bottom-right-radius:4px}.config_node{width:160px;height:30px;background:#f3f3f3;color:#666;cursor:pointer}.config_node_type{color:#999;text-align:right;padding-right:3px}.config_node_type:not(:first-child){margin-top:20px}.config_node_none{color:#ddd;text-align:right;padding-right:3px}.config_node_unused{border-color:#aaa;background:#f9f9f9;border-style:dashed;color:#aaa}.config-node-filter-info{position:absolute;top:0;right:0;height:38px;line-height:38px;padding:0 8px;background:#f3f3f3;font-size:0.8em;color:#999;font-weight:normal}.sidebar-context-stack{position:absolute;top:0;bottom:0;left:0;right:0;overflow-y:scroll}.sidebar-context-stack .palette-category:not(.palette-category-expanded) button{display:none}.sidebar-context-property{position:relative}.sidebar-context-property .debug-message-tools{right:0px;margin-right:5px;display:none}.sidebar-context-property:hover .debug-message-tools{display:inline-block}.sidebar-context-updated{text-align:right;font-size:11px;color:#bbb;padding:1px 3px}.sidebar-context-property-storename{display:block;font-size:0.8em;font-style:italic;color:#aaa}.sidebar-node-info hr{margin:10px 0}table.node-info{font-size:14px;margin:0 0 10px;width:100%}table.node-info tr:not(.blank){border-top:1px solid #ddd;border-bottom:1px solid #ddd}.node-info-property-expand{font-size:0.8em;text-align:right;line-height:0.9em}.node-info-property-expand a{padding-bottom:5px}table.node-info tr.blank{border:none}table.node-info tr.blank th{text-align:left;font-weight:500;color:#444;padding:6px 3px 3px}table.node-info tr.blank>*{padding-top:8px;border:none;padding-left:0px}table.node-info tr.blank a{display:block;color:#666}table.node-info tr.blank a:hover,table.node-info tr.blank a:focus{color:#666;text-decoration:none}table.node-info tr.blank a:not(.expanded) .node-info-property-show-more{display:inline}table.node-info tr.blank a:not(.expanded) .node-info-property-show-less{display:none}table.node-info tr.blank a i{width:10px;text-align:center;transition:transform 0.2s ease-in-out}table.node-info tr.blank a.expanded .node-info-property-show-more{display:none}table.node-info tr.blank a.expanded .node-info-property-show-less{display:inline}table.node-info tr.blank a.expanded i{transform:rotate(180deg)}table.node-info tr.blank.node-info-info-row>td{padding-left:5px}.node-info-none{font-style:italic;color:#aaa}table.node-info tr:not(.blank) td:first-child{color:#444;vertical-align:top;width:90px;padding:3px 3px 3px 6px;background:#f9f9f9;border-right:1px solid #ddd}table.node-info tr:not(.blank) td:last-child{padding:3px 3px 3px 6px;color:#666;overflow-y:hidden}div.node-info{margin:5px}.node-help{font-size:14px;line-height:1.5em}.node-help h1{font-weight:500;font-size:1.296em;line-height:1.3em;margin:8px auto}.node-help h2{font-weight:500;font-size:1.215em;margin:8px auto;line-height:1.3em}.node-help h3{font-weight:500;font-size:1.138em;margin:7px auto 5px;line-height:1.3em}.node-help h4,.node-help h5{font-weight:500;font-size:1.067em;line-height:1.3em;margin:8px auto 5px}.node-help dl.message-properties{border:1px solid #ddd;border-radius:2px;margin:5px auto 10px}.node-help dl.message-properties>dt{padding:0px 3px 2px 3px;font-family:monospace;font-weight:normal;margin:5px 3px 1px;color:#AD1625;white-space:nowrap}.node-help dl.message-properties>dt.optional{font-style:italic}.node-help dl.message-properties>dt .property-type{font-family:'Helvetica Neue', Arial, Helvetica, sans-serif;color:#666;font-style:italic;font-size:11px;float:right}.node-help dl.message-properties>dt:after{content:"";display:table;clear:both}.node-help dl.message-properties>dd{margin:0px 8px 2px 13px;vertical-align:top}.node-help ol.node-ports{margin:0}.node-help ol.node-ports li{border:1px solid #ddd;border-radius:2px;list-style-position:inside;padding:3px;margin-bottom:5px}.node-help ol.node-ports li dl.message-properties{border:none}.node-help .node-info-header{color:#333}.node-help .node-info-header i{width:10px;text-align:center;transition:transform 0.2s ease-in-out;margin-right:4px}.node-help .node-info-header:hover,.node-help .node-info-header:focus{text-decoration:none}.node-help .node-info-header.expanded i{transform:rotate(90deg)}.sidebar-node-info-stack{position:absolute;top:0;bottom:0;left:0;right:0;overflow-y:scroll}.node-info-tips{display:none;position:absolute;left:0;right:0;bottom:0;height:150px;box-sizing:border-box;border-top:1px solid #ddd;background-color:#fff;padding:20px;box-shadow:0 5px 20px 0px rgba(0,0,0,0.3);overflow-y:auto}.sidebar-node-info.show-tips .sidebar-node-info-stack{bottom:150px}.sidebar-node-info.show-tips .node-info-tips{display:block}.node-info-tips:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em}.node-info-tip{display:inline-block;vertical-align:middle;width:100%;font-size:16px;text-align:center;line-height:1.9em;color:#bbb;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.node-info-tips-buttons{position:absolute;top:4px;right:6px}.node-info-tips-buttons a{color:#ddd !important;border-color:#d9d9d9 !important;margin-left:4px}.node-info-property-config-node{border:1px solid #eee;border-radius:4px;padding:2px 4px 2px}.red-ui-popover{display:none;position:absolute;width:auto;padding:10px;height:auto;background:#fff;z-index:1000;font-size:14px;line-height:1.4em;border:1px solid #ddd;box-shadow:1px 1px 4px rgba(0,0,0,0.2)}.red-ui-popover:after,.red-ui-popover:before{border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.red-ui-popover.red-ui-popover-right:after,.red-ui-popover.red-ui-popover-right:before{top:50%;right:100%}.red-ui-popover.red-ui-popover-left:after,.red-ui-popover.red-ui-popover-left:before{top:50%;left:100%}.red-ui-popover.red-ui-popover-bottom:after,.red-ui-popover.red-ui-popover-bottom:before{bottom:100%;left:50%}.red-ui-popover.red-ui-popover-right:after{border-color:rgba(136,183,213,0);border-right-color:#fff;border-width:10px;margin-top:-10px}.red-ui-popover.red-ui-popover-right:before{border-color:rgba(194,225,245,0);border-right-color:#bbb;border-width:11px;margin-top:-11px}.red-ui-popover.red-ui-popover-left:after{border-color:rgba(136,183,213,0);border-left-color:#fff;border-width:10px;margin-top:-10px}.red-ui-popover.red-ui-popover-left:before{border-color:rgba(194,225,245,0);border-left-color:#bbb;border-width:11px;margin-top:-11px}.red-ui-popover.red-ui-popover-bottom:after{border-color:rgba(136,183,213,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}.red-ui-popover.red-ui-popover-bottom:before{border-color:rgba(194,225,245,0);border-bottom-color:#bbb;border-width:11px;margin-left:-11px}.red-ui-popover-size-small{font-size:11px;padding:5px}.red-ui-popover-size-small.red-ui-popover-right:after{border-width:5px;margin-top:-5px}.red-ui-popover-size-small.red-ui-popover-right:before{border-width:6px;margin-top:-6px}.red-ui-popover-size-small.red-ui-popover-left:after{border-width:5px;margin-top:-5px}.red-ui-popover-size-small.red-ui-popover-left:before{border-width:6px;margin-top:-6px}.red-ui-popover-size-small.red-ui-popover-bottom:after{border-width:5px;margin-left:-5px}.red-ui-popover-size-small.red-ui-popover-bottom:before{border-width:6px;margin-left:-6px}.hidden{display:none}.lasso{stroke-width:1px;stroke:#ff7f0e;fill:rgba(20,125,255,0.1);stroke-dasharray:10 5}.group-box{stroke-width:1px;stroke:#aaaaaa;fill:rgba(208,211,238,0.1);stroke-dasharray:3 3}.group-box-active{fill:#fff;stroke:#ff7f0e}.group_label{stroke-width:0;fill:#999;font-size:11px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pull-right{margin-left:20px}.node_label_italic{font-style:italic}.node_label_unknown{font-style:italic;fill:#e00 !important}.node_label_white{fill:#eee !important}.node_label{stroke-width:0;fill:#333;font-size:14px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.port_label{stroke-width:0;fill:#888;font-size:16px;alignment-baseline:middle;text-anchor:middle;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.function_label{font-size:12px}.node{stroke:#999;cursor:move;stroke-width:1}.node_unknown{stroke-dasharray:10,4;stroke:#f33}.tool_arrow{stroke-width:1;stroke:#999;fill:#999;cursor:pointer}.node_tools{fill:#ddd;stroke:#999;cursor:move;stroke-width:1;cursor:pointer}.node_tools_hovered{stroke:#ff7f0e;fill:#eee}.node_button{fill:inherit}.port{stroke:#999;stroke-width:1;fill:#ddd;cursor:crosshair}.port_highlight{stroke:#6DA332;stroke-width:3;fill:#fff;pointer-events:none;fill-opacity:0.5}.node_error{stroke:#ff0000;stroke-width:2;fill:#ff7f0e}.node_badge{stroke:#5d7291;stroke-width:1;fill:#bed1ff}.node_badge_label{stroke-width:0;fill:#fff;font-size:11px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.node_invalid{stroke:#ff0000}.node_selected{stroke-width:2;stroke:#ff7f0e !important}.node_highlighted{border-color:#dd1616 !important;border-style:dashed !important;stroke:#dd1616;stroke-width:2;stroke-dasharray:10, 4}.node_subflow .node{stroke-dasharray:8, 3}.node_quickadd *{stroke-dasharray:12,3}.node_status_label{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;stroke-width:0;fill:#888;font-size:9pt;stroke:#000;text-anchor:start}.port_hovered{stroke:#ff7f0e;fill:#ff7f0e}.port_quick_link{stroke:#ff7f0e;fill:#ff7f0e}.subflowport{stroke-dasharray:5,5;fill:#eee;stroke:#999}.drag_line{stroke:#ff7f0e;stroke-width:3;fill:none;pointer-events:none}.drag_line_hidden{stroke:#ff7f0e;stroke-width:0;pointer-events:none;fill:none}.link_line{stroke:#888;stroke-width:3;fill:none;pointer-events:none}.link_link{stroke-width:2;stroke-dasharray:10,5;stroke:#ccc;fill:none;stroke-dasharray:15,2;pointer-events:none}.link_port{fill:#fff;stroke:#ccc;stroke-width:1}.link_group_active .link_port{stroke:#ff7f0e}.link_group:hover{cursor:pointer}.link_subflow{stroke:#bbb;stroke-dasharray:10,5;stroke-width:2}.link_outline{stroke:#fff;stroke-width:5;cursor:crosshair;fill:none;pointer-events:none}.link_background{stroke:#fff;opacity:0;stroke-width:20;cursor:crosshair;fill:none}.link_splice>.link_line{stroke-dasharray:15,8}g.link_selected path.link_line{stroke:#ff7f0e}g.link_unknown path.link_line{stroke:red;stroke-width:2;stroke-dasharray:10, 4}@keyframes port_tooltip_fadeIn{from{opacity:0}to{opacity:1}}.port_tooltip{opacity:0;animation:0.1s ease-in 0s 1 normal forwards port_tooltip_fadeIn;pointer-events:none}.port_tooltip path{fill:white;stroke:#999;stroke-width:1}.port_tooltip_label{stroke-width:0;fill:#666;font-size:12px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#user-settings-tab-palette{height:100%}#palette-editor{text-align:left;position:absolute;top:0px;right:0;bottom:0;left:0;padding:0;box-sizing:border-box;background:#fff}#palette-editor .red-ui-editableList-container{border:none;border-radius:0;padding:0px}#palette-editor .red-ui-editableList-container li{padding:0px}#palette-editor .red-ui-editableList-container li .disabled{background:#f3f3f3}#palette-editor .red-ui-editableList-container li .disabled .palette-module-name{font-style:italic;color:#aaa}#palette-editor .red-ui-editableList-container li .disabled .palette-module-version{color:#aaa}#palette-editor .red-ui-editableList-container li .disabled .palette-module-errors .fa-warning{opacity:0.5}#palette-editor .red-ui-editableList-container li .disabled ul.palette-module-error-list li{color:#aaa}#palette-editor .red-ui-editableList-container li .red-ui-editableList-item-content{padding:12px 16px}#palette-editor .palette-editor-tab{position:absolute;top:35px;left:0;right:0;bottom:0}#palette-editor .palette-editor-toolbar{background:#f3f3f3;box-sizing:border-box;padding:8px 10px;border-bottom:1px solid #bbb;text-align:right}#palette-editor .palette-module-shade-status{color:#666}#palette-editor .palette-module-updated{margin-left:10px}#palette-editor .palette-module-link{margin-left:5px}#palette-editor .palette-module-description{margin-left:20px;font-size:0.9em;color:#999}#palette-editor .palette-module-count{border-radius:4px;background:#eee;padding:2px 8px;font-size:12px}#palette-editor .palette-module-content{display:none;padding:10px 3px}#palette-editor i.fa.palette-module-node-chevron{width:8px;margin-right:0;transform:rotate(0deg);transition:transform 0.2s ease-in-out}#palette-editor .expanded i.fa.palette-module-node-chevron{transform:rotate(90deg)}#palette-editor .expanded .palette-module-set-button{background:#f3f3f3 !important}#palette-editor .palette-module-set{border:1px solid #ddd;border-radius:0;padding:5px;position:relative}#palette-editor .palette-module-set:not(:last-child){border-bottom:none}#palette-editor .palette-module-set:first-child{border-top-right-radius:2px;border-top-left-radius:2px}#palette-editor .palette-module-set:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}#palette-editor .palette-module-type{color:#666;padding-left:5px;font-size:0.9em;-webkit-user-select:auto;-khtml-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}#palette-editor .palette-module-type-swatch{display:inline-block;width:12px;height:12px;border-radius:3px;vertical-align:middle;margin-right:5px;background:#fff;border:1px solid #fff}#palette-editor .palette-module-set-button-group{position:absolute;right:4px;top:4px}#palette-editor .palette-module-set-disabled{background:#eee}#palette-editor .palette-module-set-disabled .palette-module-type{color:#999}#palette-editor .palette-module-more{padding:0 !important;margin-top:10px;margin-bottom:10px;background:#f0f0f0}#palette-editor .palette-module-more a{display:block;text-align:center;padding:12px 8px;color:#AD1625}#palette-editor .palette-module-more a:hover{text-decoration:none;background:#ddd}.palette-module-meta{color:#666;position:relative}.palette-module-meta.disabled{color:#ccc}.palette-module-meta .fa{width:15px;text-align:center;margin-right:5px}.palette-module-name{white-space:nowrap;-webkit-user-select:auto;-khtml-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.palette-module-version,.palette-module-updated,.palette-module-link{font-style:italic;font-size:0.8em;-webkit-user-select:auto;-khtml-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.palette-module-section{padding:0 !important;background:#f9f9f9 !important;font-size:0.9em;color:#666}.palette-module-button-group{position:absolute;right:0;bottom:0}.palette-module-button-group a{margin-left:5px}.palette-module-meta .fa-warning{color:#AD1625}ul.palette-module-error-list{display:inline-block;list-style-type:none;margin:0;font-size:0.9em}ul.palette-module-error-list li{border:none;background:none}.palette-module-shade{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(160,160,160,0.5);z-index:5;text-align:center;padding-top:20px}#palette-module-install-shade{padding-top:80px}.node-dialog-view-diff-panel{padding:5px;padding-top:30px;position:relative}.node-dialog-view-diff-panel .red-ui-editableList-container{border-radius:1px;padding:0;background:#f9f9f9}.node-dialog-view-diff-panel .node-dialog-view-diff-diff li{background:#f9f9f9;padding:0px;border:none;min-height:0}.node-dialog-view-diff-panel .red-ui-editableList-item-content{padding:5px}.node-diff-container{position:absolute;top:40px;right:0;bottom:0;left:0;overflow-y:scroll}.node-dialog-view-diff-headers{position:absolute;left:232px;right:12px;top:5px;height:25px}.node-dialog-view-diff-headers div{height:25px;display:inline-block;box-sizing:border-box;padding-top:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:50%;background:#f9f9f9;text-align:center;border-top:1px solid #ddd;border-color:#ddd;border-left:1px solid #ddd}.node-dialog-view-diff-headers div:last-child{border-right:1px solid #ddd}.node-diff-toolbar{box-sizing:border-box;color:#666;text-align:right;padding:8px 10px;background:#f3f3f3;border-bottom:1px solid #ddd;white-space:nowrap}.node-diff-tab{background:#fff;border:1px solid #ddd;border-radius:1px;overflow:hidden}.node-diff-tab.collapsed .node-diff-tab-title .node-diff-chevron{transform:rotate(-90deg)}.node-diff-tab.collapsed .node-diff-node-entry{display:none}.node-diff-tab-stats{font-size:0.9em}.node-diff-chevron{display:inline-block;width:15px;text-align:center;margin-left:3px;transition:transform 0.1s ease-in-out}.node-diff-node-entry{margin-left:20px;font-size:0.9em}.node-diff-node-entry:first-child{border-top:1px solid #ddd}.node-diff-node-entry:not(:last-child){border-bottom:1px solid #ddd}.node-diff-node-entry.collapsed .node-diff-chevron{transform:rotate(-90deg)}.node-diff-node-entry.collapsed .node-diff-node-entry-properties{display:none}.node-diff-node-entry table{border-collapse:collapse;table-layout:fixed;width:calc(100% - 20px);margin-left:20px}.node-diff-node-entry col:first-child{width:180px}.node-diff-node-entry col:not(:first-child){width:100%}.node-diff-node-entry td,.node-diff-node-entry th{border-top:1px solid #f3f3f3;border-left:1px solid #ddd;padding:0 0 0 3px;text-align:left;overflow-x:auto}.node-diff-node-entry td:first-child,.node-diff-node-entry th:first-child{border-left:none}.node-diff-node-entry tr{vertical-align:top}.node-diff-node-entry tr:first-child td{white-space:nowrap;overflow:hidden}.node-diff-node-entry tr:hover{background:#f9f9f9}.node-diff-node-entry td .node-diff-status{margin-left:0}.node-diff-node-entry tr:not(.node-diff-property-header) .node-diff-status{width:12px;margin-left:0;margin-top:0;margin-bottom:0;margin-right:5px}.node-diff-three-way .node-diff-node-entry-cell{width:calc((100% - 220px) / 2)}.node-diff-three-way .node-diff-node-entry-cell:first-child{width:220px}.node-diff-three-way col:not(:first-child){width:50%}.node-diff-three-way .node-diff-node-entry .node-diff-node-entry-cell{width:calc((100% + 20px - 220px) / 2)}.node-diff-three-way .node-diff-node-entry .node-diff-node-entry-cell:first-child{width:200px}.node-diff-column{display:inline-block;height:100%;width:50%;box-sizing:border-box;white-space:nowrap;overflow:hidden}.node-diff-column:first-child{border-right:1px solid #ddd}.node-diff-tab-title{cursor:pointer;padding:0}.node-diff-tab-title:hover{background:#f9f9f9}.node-diff-tab-title-meta{vertical-align:middle;display:inline-block;padding-top:2px}.node-diff-node-entry-header{cursor:pointer}.node-diff-node-entry-header:hover{background:#f9f9f9}.node-diff-node-entry-node{vertical-align:middle;display:inline-block;margin:5px;width:18px;height:15px;background:#ddd;border-radius:2px;border:1px solid #999;background-position:5% 50%;background-repeat:no-repeat;background-size:contain;position:relative}.node-diff-node-entry-node .palette_icon{background-position:49% 50%;width:15px}.node-diff-node-entry-node .palette_icon_container{width:18px}.node-diff-tab-empty .node-diff-chevron i{display:none}.node-diff-tab-empty .node-diff-tab-title{cursor:default}.node-diff-tab-empty .node-diff-tab-title:hover{background:none}.node-diff-node-deleted{cursor:default !important}.node-diff-node-deleted .node-diff-status{color:#f80000}.node-diff-node-deleted .node-diff-node-entry-node{opacity:0.5}.node-diff-node-deleted .node-diff-node-description{opacity:0.5;text-decoration:line-through}.node-diff-node-added{cursor:default !important}.node-diff-node-added .node-diff-status{color:#009900}.node-diff-node-moved .node-diff-status{color:#3f81b3}.node-diff-node-changed .node-diff-status{color:#f89406}.node-diff-node-unchanged .node-diff-status{color:#bbb}.node-diff-node-conflict .node-diff-status{color:#9b45ce}.node-diff-node-entry-title{display:inline-block}.node-diff-node-entry-title .node-diff-status{margin-left:15px}.node-diff-node-entry-properties{margin:0;color:#666}.node-diff-status{display:inline-block;height:20px;margin-left:5px;vertical-align:top;margin-top:6px;margin-bottom:6px;text-align:center}.node-diff-element{display:inline-block;width:calc(100% - 20px)}.node-diff-node-description{color:#444;margin-right:5px;padding-top:5px;display:inline-block}.node-diff-node-description:after{content:"";display:table;clear:both}.node-diff-node-meta{float:right;color:#999;margin-top:7px;margin-right:10px}.node-diff-count{color:#999}.node-diff-added{color:#009900}.node-diff-deleted{color:#f80000}.node-diff-changed{color:#f89406}.node-diff-unchanged{color:#bbb}.node-diff-conflicted{color:purple}.node-diff-node-entry-cell{display:inline-block;vertical-align:top;box-sizing:border-box;width:calc( (100% - 20px) / 2);height:32px;border-left:1px solid #ddd;padding-top:2px;white-space:nowrap;overflow:hidden;position:relative}.node-diff-empty{background:#f3f3f3;background:repeating-linear-gradient(20deg, #fff, #fff 5px, #f6f6f6 5px, #f6f6f6 10px)}.node-diff-node-entry-cell:first-child{border-left:none}.node-diff-property-cell-label{margin-left:20px;vertical-align:top;box-sizing:border-box;padding-left:8px;width:120px}.node-diff-property-wires{display:inline-block}.node-diff-property-wires .node-diff-node-entry-node{width:18px;height:15px}.node-diff-property-wires .palette_icon_container{width:18px}.node-diff-property-wires .palette_icon{width:15px}.node-diff-property-wires ul,.node-diff-property-wires li,.node-diff-property-wires ol{background:none !important}.node-diff-property-wires ul{vertical-align:middle;display:inline-block;margin-left:5px}.node-diff-property-wires li{list-style-type:none !important}.node-diff-property-wires ol{font-size:0.9em;margin:0}.node-diff-property-wires ol>span{vertical-align:middle;display:inline-block;width:30px;text-align:center}.node-diff-property-wires ol>li:not(:last-child){border-bottom:1px solid #999}.node-diff-node-props .node-diff-node-entry-cell:first-child{padding:6px 0px}.node-diff-node-props .node-diff-node-entry-cell:first-child span:not(.node-diff-chevron){margin-left:5px}.node-diff-property-cell.node-diff-node-changed{background:#fff2e1 !important}.node-diff-property-cell.node-diff-node-conflict{background:#ffdad4 !important}.node-diff-selectbox{position:absolute;top:0;right:0;bottom:0;width:35px;text-align:center;border-left:1px solid #eee;margin:0}.node-diff-selectbox input{margin-top:8px}.node-diff-selectbox:hover{background:#f3f3f3}.node-diff-node-entry-conflict.node-diff-select-remote .node-diff-node-remote{background:#e7ffe3}.node-diff-node-entry-conflict.node-diff-select-remote .node-diff-node-remote label{border-left-color:#b8daad}.node-diff-node-entry-conflict.node-diff-select-remote .node-diff-node-local{background:#ffe1e1}.node-diff-node-entry-conflict.node-diff-select-remote .node-diff-node-local label{border-left-color:#e4bcbc}.node-diff-node-entry-conflict.node-diff-select-local .node-diff-node-local{background:#e7ffe3}.node-diff-node-entry-conflict.node-diff-select-local .node-diff-node-local label{border-left-color:#b8daad}.node-diff-node-entry-conflict.node-diff-select-local .node-diff-node-remote{background:#ffe1e1}.node-diff-node-entry-conflict.node-diff-select-local .node-diff-node-remote label{border-left-color:#e4bcbc}ul.node-dialog-configm-deploy-list{font-size:0.9em;width:400px;margin:10px auto;text-align:left}.node-dialog-confirm-conflict-row img{vertical-align:middle;height:30px;margin-right:10px}.node-dialog-confirm-conflict-row i{vertical-align:middle;text-align:center;font-size:30px;width:30px;margin-right:10px}.node-dialog-confirm-conflict-row div{vertical-align:middle;width:calc(100% - 60px);display:inline-block}#node-diff-toolbar-resolved-conflicts .node-diff-status{margin:0}.node-diff-text-diff-button{float:right;margin:2px 3px;line-height:14px;height:16px}.node-text-diff{height:100%;overflow-y:auto}.node-text-diff table.node-text-diff-content{margin:10px;border:1px solid #ddd;border-radius:3px;table-layout:fixed;width:calc(100% - 20px)}.node-text-diff table.node-text-diff-content td{vertical-align:top;word-wrap:break-word}.node-text-diff table.node-text-diff-content td.lineno{font-family:monospace;text-align:right;color:#aaa;background:#f6f6f6;padding:1px 5px}.node-text-diff table.node-text-diff-content td.lineno:nth-child(3){border-left:1px solid #ddd}.node-text-diff table.node-text-diff-content td.linetext{font-family:monospace;white-space:pre-wrap;padding:1px 5px}.node-text-diff table.node-text-diff-content td.linetext span.prefix{width:30px;display:inline-block;text-align:center;color:#999}.node-text-diff table.node-text-diff-content td.blank{background:#f6f6f6}.node-text-diff table.node-text-diff-content td.added{background:#eefaee}.node-text-diff table.node-text-diff-content td.removed{background:#fadddd}.node-text-diff table.node-text-diff-content tr.mergeHeader td{color:#800080;background:#e5f9ff;height:26px;vertical-align:middle}.node-text-diff table.node-text-diff-content tr.mergeHeader-separator td{color:#800080;background:#b2edff;height:0px}.node-text-diff table.node-text-diff-content tr.mergeHeader-ours td{border-top:2px solid #b2edff}.node-text-diff table.node-text-diff-content tr.mergeHeader-theirs td{border-bottom:2px solid #b2edff}.node-text-diff table.node-text-diff-content td.unchanged{color:#999}.node-text-diff table.node-text-diff-content tr.unchanged{background:#fefefe}.node-text-diff table.node-text-diff-content tr.start-block{border-top:1px solid #f0f0f0}.node-text-diff table.node-text-diff-content tr.end-block{border-bottom:1px solid #f0f0f0}.node-text-diff table.node-text-diff-content tr.node-text-diff-file-header td{background:#f3f3f3;padding:5px 10px 5px 0;color:#333;cursor:pointer}.node-text-diff table.node-text-diff-content tr.node-text-diff-file-header td .filename{font-family:monospace}.node-text-diff table.node-text-diff-content tr.node-text-diff-file-header td i.node-diff-chevron{width:30px}.node-text-diff table.node-text-diff-content tr.node-text-diff-file-header.collapsed td i.node-diff-chevron{transform:rotate(-90deg)}.node-text-diff table.node-text-diff-content tr.node-text-diff-commit-header td{background:#f3f3f3;padding:5px 10px;color:#333}.node-text-diff table.node-text-diff-content tr.node-text-diff-commit-header td h3{font-size:1.4em;margin:0}.node-text-diff table.node-text-diff-content tr.node-text-diff-commit-header td .commit-summary{border-top:1px solid #ddd;padding-top:5px;color:#999}.node-text-diff table.node-text-diff-content tr.node-text-diff-commit-header td .commit-body{margin-bottom:15px;white-space:pre;line-height:1.2em}.node-text-diff table.node-text-diff-content tr.node-text-diff-header>td:not(.flow-diff){font-family:monospace;padding:5px 10px;text-align:left;color:#666;background:#ffd;height:30px;vertical-align:middle;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0}.node-text-diff table.node-text-diff-content tr.node-text-diff-expand td{cursor:pointer}.node-text-diff table.node-text-diff-content tr.node-text-diff-expand td:hover{background:#ffc}#user-settings-tabs-container{position:absolute;top:0;left:0;bottom:0;width:120px;background:#f3f3f3}#user-settings-tabs-content{position:absolute;top:0;left:120px;right:0;bottom:0;padding:0}#user-settings-tabs-content h3:not(:first-child){border-top:1px solid #ddd;margin-top:15px;margin-bottom:10px;padding-top:20px}#user-settings-tabs-content label{display:inline-block;min-width:100px;vertical-align:top;margin-top:5px}#user-settings-tabs-content label input{vertical-align:top;padding-bottom:0}#user-settings-tabs-content div.uneditable-input{position:relative}#user-settings-tabs-content input[type='number']{width:60px}#user-settings-tabs-content h4{margin-top:20px;margin-bottom:10px}#user-settings-tab-view{padding:8px 20px 20px}.user-settings-row{padding:5px 10px 2px}.user-settings-section{position:relative}.user-settings-section:after{content:"";display:table;clear:both}.user-settings-section .uneditable-input,.user-settings-section input,.user-settings-section textarea{width:calc(100% - 150px)}.user-settings-section textarea{resize:none;height:10em}#projects-dialog .red-ui-editableList-container{padding:0px}#project-settings-tab-settings{overflow-y:scroll}.sidebar-version-control-shade{background:#f3f3f3}.projects-edit-form form{margin:0}.projects-edit-form form .form-row{margin-bottom:15px}.projects-edit-form form .form-row label{color:#555;width:100%;display:block}.projects-edit-form form .form-row label.projects-edit-form-inline-label{font-weight:normal;color:inherit;width:auto}.projects-edit-form form .form-row input[type=text],.projects-edit-form form .form-row input[type=password],.projects-edit-form form .form-row textarea{width:100%}.projects-edit-form form .form-row input[type=checkbox],.projects-edit-form form .form-row input[type=radio]{width:auto;vertical-align:top}.projects-edit-form-sublabel{color:#999;text-align:right;margin-bottom:-15px;font-weight:normal}.project-settings-tab-pane * .projects-edit-form-sublabel{margin-right:50px;margin-top:-10px;margin-bottom:5px}.projects-dialog-spinner{position:absolute;top:1px;bottom:1px;left:1px;right:1px;text-align:center;padding:40px;background:white}.projects-dialog-spinner:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em}.projects-dialog-spinner img{display:inline-block;vertical-align:middle;width:80px}.projects-dialog-spinner.projects-dialog-spinner-sidebar{background:white;padding:0}.projects-dialog-spinner.projects-dialog-spinner-sidebar img{width:40px}.projects-dialog-spinner.projects-version-control-spinner-sidebar{background:white;padding:0}.projects-dialog-spinner.projects-version-control-spinner-sidebar img{width:20px}.projects-dialog-spinner.projects-dialog-spinner-contain{padding:0}.projects-dialog-spinner.projects-dialog-spinner-contain img{width:auto;height:100%;max-height:50px}.projects-dialog-screen-start .projects-dialog-screen-start-hero{text-align:center;font-size:2em;padding:10px;min-height:60px;color:#555}.projects-dialog-screen-start .projects-dialog-screen-start-hero h1{text-align:center;color:#f0f0f0;font-size:2em;font-weight:normal}.projects-dialog-screen-start .projects-dialog-screen-start-body{min-height:400px;line-height:1.6em}.projects-dialog-screen-start .projects-dialog-screen-start-body p{font-size:1.1em;margin-bottom:20px}.projects-dialog-screen-start .projects-dialog-screen-start-body p:first-child{font-weight:500;font-size:1.2em}.projects-dialog-screen-start button.editor-button{width:calc(50% - 80px);margin:20px;height:auto;line-height:2em;padding:10px;border-color:#aaa}.projects-dialog-screen-start button.editor-button i{color:#aaa}.projects-dialog-screen-start button.editor-button:hover i{color:#999}.projects-dialog-screen-start .button-group{text-align:center}.projects-dialog-screen-create{min-height:500px}.projects-dialog-screen-create button.projects-dialog-screen-create-type{height:auto;padding:10px}.projects-dialog-screen-create .button-group{text-align:center}.projects-dialog-screen-secret{min-height:auto}.projects-dialog-project-list-container{border:1px solid #ddd;border-radius:2px}.projects-dialog-project-list-inner-container{height:300px;overflow-y:scroll;position:relative}.projects-dialog-project-list-inner-container .red-ui-editableList-border{border:none}.projects-dialog-project-list li{padding:0 !important}.projects-dialog-project-list-entry{padding:12px 0;border-left:3px solid #fff;border-right:3px solid #fff}.projects-dialog-project-list-entry.projects-list-entry-current:not(.selectable){background:#f9f9f9}.projects-dialog-project-list-entry.projects-list-entry-current i{color:#999}.projects-dialog-project-list-entry.selectable{cursor:pointer}.projects-dialog-project-list-entry.selectable:hover{background:#f3f3f3}.projects-dialog-project-list-entry .projects-dialog-project-list-entry-icon i{color:#ccc;font-size:2em}.projects-dialog-project-list-entry.selected{background:#efefef;border-left-color:#999;border-right-color:#999}.projects-dialog-project-list-entry span{display:inline-block;vertical-align:middle}.projects-dialog-project-list-entry .projects-dialog-project-list-entry-icon{margin:0 10px 0 5px}.projects-dialog-project-list-entry .projects-dialog-project-list-entry-name{font-size:1.2em}.projects-dialog-project-list-entry .projects-dialog-project-list-entry-current{float:right;margin-right:20px;font-size:0.9em;color:#999;padding-top:4px}.projects-dialog-project-list-entry .projects-dialog-project-list-entry-tools{position:absolute;top:16px;right:30px;display:none;color:#999}.projects-dialog-project-list-entry:hover .projects-dialog-project-list-entry-tools{display:block}.projects-dialog-screen-create-type.editor-button.toggle.selected:not(.disabled):not(:disabled){background:#fff !important;color:#666 !important}.projects-dialog-screen-input-status{text-align:right;position:absolute;top:2px;right:8px;width:70px;height:30px;color:#999}.sidebar-version-control{height:100%}.sidebar-version-control-stack-info{height:100px;box-sizing:border-box;border-bottom:1px solid #ddd;color:#333}.sidebar-version-control-stack-info i{color:#999}.sidebar-version-control-stack{position:absolute;top:0px;bottom:0;left:0;right:0;overflow:hidden}.sidebar-version-control-stack .palette-category:not(.palette-category-expanded) button{display:none}#project-settings-tab-deps .red-ui-editableList-container{padding:0}#project-settings-tab-deps .red-ui-editableList-border{border-radius:0}#project-settings-tab-deps .red-ui-editableList-item-content{padding:0px 6px}#project-settings-tab-deps .palette-module-header{padding:6px 4px}#project-settings-tab-deps .palette-module-button{float:right}#project-settings-tab-deps .palette-module-unused>*{color:#bbb}#project-settings-tab-deps .palette-module-unknown{border:1px dashed #aaa;background:#fafafa}#project-settings-tab-deps .palette-module-not-installed{border:1px dashed #b07575;background:#fee}#project-settings-tab-deps .palette-module-not-installed i.fa-warning{color:#b07575}.project-settings-tab-pane{position:absolute;top:0;left:0;right:0;bottom:0;overflow-y:auto;padding:8px 20px 20px}.sidebar-version-control .red-ui-editableList-container{background:#f9f9f9;padding:0}.sidebar-version-control .red-ui-editableList-container li{padding:0;background:#fff}.sidebar-version-control .red-ui-editableList-border{border:none;border-radius:0}.sidebar-version-control-change-container{position:relative;height:50%;box-sizing:border-box;transition:height 0.2s ease-in-out}.sidebar-version-control-merging .sidebar-version-control-change-container{height:33%}.sidebar-version-control-slide-box{position:absolute;bottom:0;left:0;right:0;height:0;transition:height 0.2s ease-in-out;background:#f6f6f6;box-sizing:border-box;overflow:hidden}.sidebar-version-control-slide-box.sidebar-version-control-slide-box-top{z-index:4;top:0px;left:auto;width:100%;max-width:280px;border-left:1px solid #bbb;border-right:1px solid #bbb;border-bottom:1px solid #bbb;box-shadow:1px 1px 4px rgba(0,0,0,0.2);color:#666;background:#f6f6f6;padding:10px;box-sizing:border-box}.sidebar-version-control-slide-box.sidebar-version-control-slide-box-bottom{bottom:0px;border-top:1px solid #ddd}.sidebar-version-control-slide-box textarea{height:110px;margin:10px;width:calc(100% - 20px);box-sizing:border-box;border-radius:1px;resize:none}.projects-branch-list{position:relative}.projects-branch-list .red-ui-searchBox-container{border-top:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #ddd;border-top-left-radius:2px;border-top-right-radius:2px;overflow:hidden}.projects-branch-list .red-ui-editableList{border:1px solid #ddd;border-bottom-left-radius:2px;border-bottom-right-radius:2px}.projects-branch-list .red-ui-editableList>.red-ui-editableList-border{border-radius:0;border:none}.projects-branch-list .red-ui-editableList .red-ui-editableList-container{padding:0}.projects-branch-list .red-ui-editableList .red-ui-editableList-container li{padding:0;background:#fff}.uneditable-input .projects-branch-list .red-ui-editableList{border-left:none;border-bottom:none;border-right:none}.uneditable-input .projects-branch-list .red-ui-searchBox-container{border-left:none;border-right:none}.sidebar-version-control-slide-box-header{margin-bottom:10px}.sidebar-version-control-slide-box-toolbar{padding:0 20px;text-align:right}.sidebar-version-control-branch-list-entry{padding:5px 8px;color:#666;cursor:pointer;border-left:2px solid #fff;border-right:2px solid #fff;margin:0 1px}.sidebar-version-control-branch-list-entry.selected{border-left-color:#999;border-right-color:#999}.sidebar-version-control-branch-list-entry i{width:16px;text-align:center}.sidebar-version-control-branch-list-entry.input-error{cursor:default}.sidebar-version-control-branch-list-entry:not(.input-error):hover{background:#f3f3f3;border-left-color:#999;border-right-color:#999}.sidebar-version-control-branch-list-entry span{margin-left:5px}.sidebar-version-control-branch-list-entry span.current{float:right;font-size:0.8em;color:#999}.sidebar-version-control-change-entry{height:20px;padding:5px 10px;position:relative;white-space:nowrap}.sidebar-version-control-change-entry span{margin:0 6px}.sidebar-version-control-change-entry a{color:currentColor}.sidebar-version-control-change-entry a.disabled{pointer-events:none}.sidebar-version-control-change-entry .sidebar-version-control-change-entry-tools{position:absolute;top:4px;right:4px;display:none}.sidebar-version-control-change-entry .sidebar-version-control-change-entry-tools button{width:24px}.sidebar-version-control-change-entry:hover .sidebar-version-control-change-entry-tools{display:block}.sidebar-version-control-change-entry.node-info-none{text-align:center;background:#fefefe;white-space:normal;height:auto}.sidebar-version-control-commit-entry{min-height:20px;padding:5px 10px;position:relative;white-space:nowrap;overflow:hidden;cursor:pointer}.sidebar-version-control-commit-entry:hover{background:#eee}.sidebar-version-control-commit-more{color:#999;text-align:center;padding:10px;font-style:italic}.sidebar-version-control-commit-sha{float:right;font-family:monospace;color:#c38888;display:inline-block;font-size:0.85em;margin-left:5px}.sidebar-version-control-commit-subject{color:#666}.sidebar-version-control-commit-refs{min-height:22px}.sidebar-version-control-commit-ref{color:#aaa;font-size:0.7em;border:1px solid #ccc;border-radius:10px;padding:2px 5px;margin-right:5px}.sidebar-version-control-commit-date{color:#999;font-size:0.85em}.sidebar-version-control-commit-user{float:right;color:#999;font-size:0.85em}.sidebar-version-control-change-header{color:#666;background:#f6f6f6;padding:4px 10px;height:30px;box-sizing:border-box;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.sidebar-version-control-change-header i{transition:all 0.2s ease-in-out}.sidebar-version-control-repo-toolbar{color:#666;background:#f6f6f6;padding:10px;box-sizing:border-box}.sidebar-version-control-repo-count{margin-right:8px;display:none}.sidebar-version-control-repo-action{text-align:left;width:100%}.sidebar-version-control-repo-sub-action{width:calc(50% - 5px);margin-right:5px}.sidebar-version-control-repo-sub-action:not(:first-child){margin-right:0;margin-left:5px}.project-file-listing-container>.red-ui-editableList>.red-ui-editableList-border{border-radius:0;border:none;border-top:1px solid #ddd}.red-ui-editableList-container .projects-dialog-file-list .red-ui-editableList-border{border:none}.red-ui-editableList-container .projects-dialog-file-list li{padding:0 !important;border:none}.red-ui-editableList-container .projects-dialog-file-list .red-ui-editableList-container{padding:0}.projects-dialog-file-list-entry{padding:3px 0;border-left:2px solid #fff;border-right:2px solid #fff}.projects-dialog-file-list-entry.projects-list-entry-current:not(.selectable){background:#f9f9f9}.projects-dialog-file-list-entry.projects-list-entry-current i{color:#999}.projects-dialog-file-list-entry.selectable{cursor:pointer}.projects-dialog-file-list-entry.selectable:hover{background:#f3f3f3;border-left-color:#999;border-right-color:#999}.projects-dialog-file-list-entry.unselectable{color:#ccc}.projects-dialog-file-list-entry i{color:#999;width:16px;text-align:center}.projects-dialog-file-list-entry.selected{background:#efefef;border-left-color:#999;border-right-color:#999}.projects-dialog-file-list-entry span{display:inline-block;vertical-align:middle}.projects-dialog-file-list-entry .projects-dialog-file-list-entry-folder{margin:0 10px 0 0px}.projects-dialog-file-list-entry .projects-dialog-file-list-entry-folder .fa-angle-right{color:#333;transition:all 0.2s ease-in-out}.projects-dialog-file-list-entry .projects-dialog-file-list-entry-file{margin:0 10px 0 20px}.projects-dialog-file-list-entry .projects-dialog-file-list-entry-name{font-size:1em}.projects-dialog-file-list-entry.expanded .fa-angle-right{transform:rotate(90deg)}.projects-dialog-file-list-entry-file-type-git{color:#999}.projects-dialog-remote-list .red-ui-editableList-container{padding:0}.projects-dialog-remote-list .red-ui-editableList-container li{padding:0;border:none;border-radius:4px;overflow:hidden}.projects-dialog-sshkey-list li{padding:0 !important}.projects-dialog-sshkey-list.projects-dialog-sshkey-list-small .projects-dialog-sshkey-list-entry{padding:6px 0}.projects-dialog-sshkey-list.projects-dialog-sshkey-list-small .projects-dialog-sshkey-list-entry i{font-size:1em}.projects-dialog-sshkey-list.projects-dialog-sshkey-list-small .projects-dialog-sshkey-list-entry-name{font-size:1em}.projects-dialog-sshkey-list.projects-dialog-sshkey-list-small .projects-dialog-sshkey-list-entry-current{margin-right:10px;padding-top:2px}.red-ui-editableList-container .projects-dialog-sshkey-list li:last-child{border-bottom:0px none}.projects-dialog-sshkey-list-entry{padding:12px 0;border-left:3px solid #fff;border-right:3px solid #fff}.projects-dialog-sshkey-list-entry.sshkey-list-entry-current:not(.selectable){background:#f9f9f9}.projects-dialog-sshkey-list-entry.sshkey-list-entry-current i{color:#999}.projects-dialog-sshkey-list-entry.selectable{cursor:pointer}.projects-dialog-sshkey-list-entry.selectable:hover{background:#f3f3f3;border-left-color:#aaa;border-right-color:#aaa}.projects-dialog-sshkey-list-entry i{color:#ccc;font-size:2em}.projects-dialog-sshkey-list-entry.selected{background:#efefef;border-left-color:#999;border-right-color:#999}.projects-dialog-sshkey-list-entry span{display:inline-block;vertical-align:middle}.projects-dialog-sshkey-list-entry .projects-dialog-sshkey-list-entry-icon{margin:0 10px 0 5px}.projects-dialog-sshkey-list-entry .projects-dialog-sshkey-list-entry-name{font-size:1.2em}.projects-dialog-sshkey-list-entry .projects-dialog-sshkey-list-entry-current{float:right;margin-right:20px;font-size:0.9em;color:#999;padding-top:4px}.projects-dialog-sshkey-list-entry .projects-dialog-sshkey-list-button-remove{position:absolute;right:4px}div.projects-dialog-ssh-public-key{position:relative;padding:15px 20px 0}div.projects-dialog-ssh-public-key pre{position:relative;word-break:break-all}div.projects-dialog-ssh-public-key:after{content:"";display:table;clear:both}.projects-dialog-ssh-key-list li{padding:0 !important}.projects-dialog-ssh-key-list .projects-dialog-ssh-key-header{padding:10px 5px;cursor:pointer}.projects-dialog-ssh-key-list .projects-dialog-ssh-key-header:hover{background:#f3f3f3}.projects-dialog-list{position:relative}.projects-dialog-list .red-ui-editableList-container{padding:1px;background:#f6f6f6}.projects-dialog-list .red-ui-editableList-container li:last-child{border-bottom:none}.projects-dialog-list-entry.red-ui-search-empty{padding:0}.projects-dialog-list-entry span{display:inline-block}.projects-dialog-list-entry .entry-icon{text-align:center;min-width:30px;vertical-align:top;color:#999}.projects-dialog-list-entry .entry-name{min-width:250px}.projects-dialog-list-entry.current .entry-name{font-weight:bold}.projects-dialog-list-entry .entry-detail{color:#aaa;font-size:0.9em}.projects-dialog-list-entry .entry-remote-name{min-width:250px}.projects-dialog-list-entry .entry-tools{float:right;margin-right:10px}.projects-dialog-list-dialog{position:relative;margin-top:10px;margin-bottom:20px;background:white;border-radius:4px;border:1px solid #ddd}.projects-dialog-list-dialog .projects-edit-form-sublabel{margin-top:-8px !important;display:block !important;width:auto !important}.projects-dialog-list-dialog:after{content:"";display:table;clear:both}.projects-dialog-list-dialog .projects-dialog-list-dialog-header{font-weight:bold;background:#f3f3f3;margin-top:0 !important;padding:5px 10px;margin-bottom:10px}.red-ui-editableList-border{border:1px solid #ccc;border-radius:4px}.red-ui-editableList-border .red-ui-editableList-header{border-bottom:1px solid #ccc;padding:2px 16px 2px 4px;font-size:0.9em}.red-ui-editableList-container{padding:5px;margin:0;vertical-align:middle;box-sizing:border-box}.red-ui-editableList-container .red-ui-editableList-list{list-style-type:none;margin:0}.red-ui-editableList-container .red-ui-editabelList-item-placeholder{border:2px dashed #ddd !important}.red-ui-editableList-container li{box-sizing:border-box;position:relative;background:#fff;margin:0;padding:8px 0px;border-bottom:1px solid #ddd;min-height:20px}.red-ui-editableList-container li .red-ui-editableList-item-handle{position:absolute;top:50%;left:2px;margin-top:-7px;color:#eee;cursor:move}.red-ui-editableList-container li .red-ui-editableList-item-remove{position:absolute;top:50%;right:0px;margin-top:-9px}.red-ui-editableList-container li.ui-sortable-helper{border-top:1px solid #ddd}.red-ui-editableList-container li.red-ui-editableList-item-sortable .red-ui-editableList-item-content{margin-left:22px}.red-ui-editableList-container li.red-ui-editableList-item-removable .red-ui-editableList-item-content{margin-right:28px}.red-ui-editableList-container li.red-ui-editableList-item-deleting{background:#fee}.red-ui-searchBox-container{position:relative}.red-ui-searchBox-container i{font-size:10px;color:#666}.red-ui-searchBox-container i.fa-search{position:absolute;pointer-events:none;left:8px;top:9px}.red-ui-searchBox-container i.fa-times{position:absolute;right:5px;top:9px}.red-ui-searchBox-container input{border-radius:0;border:none;width:100%;box-shadow:none;-webkit-box-shadow:none;padding:3px 17px 3px 22px;margin:0px;height:30px;box-sizing:border-box}.red-ui-searchBox-container input:focus{border:none;box-shadow:none;-webkit-box-shadow:none}.red-ui-searchBox-container a{position:absolute;right:0;top:0;bottom:0;width:20px;display:none}.red-ui-searchBox-container .red-ui-searchBox-resultCount{position:absolute;right:18px;top:4px;background:#eee;color:#666;padding:1px 8px;font-size:9px;border-radius:4px}.red-ui-typedInput-container{border:1px solid #ccc;border-radius:4px;height:34px;display:inline-block;padding:0;margin:0;vertical-align:middle;box-sizing:border-box;overflow:visible;position:relative}.red-ui-typedInput-container .red-ui-typedInput-input{position:absolute;left:0;right:0;top:0;bottom:0;outline:red}.red-ui-typedInput-container input{width:100%;padding:0 0 0 3px;margin:0;height:32px;border:none;border-top-left-radius:0;border-bottom-left-radius:0;box-shadow:none;vertical-align:middle}.red-ui-typedInput-container.red-ui-typedInput-focus:not(.input-error){border-color:rgba(85,150,230,0.8) !important}.red-ui-typedInput-container button{text-align:left;border:none;position:absolute;box-sizing:border-box;border-top-left-radius:4px;border-bottom-left-radius:4px;padding:0 1px 0 5px;display:inline-block;background:#efefef;height:32px;line-height:32px;vertical-align:middle;color:#555}.red-ui-typedInput-container button i.red-ui-typedInput-icon{position:relative;top:-3px;margin-left:1px;margin-right:2px;margin-top:1px;vertical-align:middle}.red-ui-typedInput-container button i.red-ui-typedInput-icon.fa-ellipsis-h{top:-1px}.red-ui-typedInput-container button.disabled{cursor:default}.red-ui-typedInput-container button.disabled i.red-ui-typedInput-icon{color:#bbb}.red-ui-typedInput-container button .red-ui-typedInput-type-label,.red-ui-typedInput-container button .red-ui-typedInput-option-label{display:inline-block;height:100%;padding:0 1px 0 5px}.red-ui-typedInput-container button:not(.disabled):hover{text-decoration:none;background:#ddd}.red-ui-typedInput-container button:focus{text-decoration:none;outline:none;box-shadow:inset 0 0 0 1px rgba(85,150,230,0.8)}.red-ui-typedInput-container button:not(.disabled):active{background:#ddd;text-decoration:none}.red-ui-typedInput-container button.red-ui-typedInput-full-width{width:100%;border-top-right-radius:4px;border-bottom-right-radius:4px}.red-ui-typedInput-container button.red-ui-typedInput-option-expand{border-top-right-radius:4px;border-bottom-right-radius:4px;border-top-left-radius:0;border-bottom-left-radius:0;right:0}.red-ui-typedInput-container button.red-ui-typedInput-option-trigger{border-top-left-radius:0px;border-bottom-left-radius:0px;border-top-right-radius:4px;border-bottom-right-radius:4px;padding:0 0 0 0;position:absolute;right:0}.red-ui-typedInput-container button.red-ui-typedInput-option-trigger .red-ui-typedInput-option-label{background:#efefef;position:absolute;left:0;right:23px;top:0;padding:0 5px 0 8px}.red-ui-typedInput-container button.red-ui-typedInput-option-trigger .red-ui-typedInput-option-label i.red-ui-typedInput-icon{margin-right:4px;margin-top:4px}.red-ui-typedInput-container button.red-ui-typedInput-option-trigger .red-ui-typedInput-option-caret{top:0;position:absolute;right:0;width:17px;padding-left:6px}.red-ui-typedInput-container button.red-ui-typedInput-option-trigger:focus{box-shadow:none}.red-ui-typedInput-container button.red-ui-typedInput-option-trigger:focus .red-ui-typedInput-option-caret{box-shadow:inset 0 0 0 1px rgba(85,150,230,0.8)}.red-ui-typedInput-options{border:1px solid #ddd;box-shadow:1px 1px 4px rgba(0,0,0,0.2);position:absolute;border:1px solid #bbb;background:#fff;z-index:2000}.red-ui-typedInput-options a{padding:6px 18px 6px 6px;display:block;border-bottom:1px solid #ddd;color:#333}.red-ui-typedInput-options a:hover{text-decoration:none;background:#ddd}.red-ui-typedInput-options a:focus{text-decoration:none;background:#ddd;outline:none}.red-ui-typedInput-options a:active{text-decoration:none;background:#ddd}.red-ui-typedInput-options .red-ui-typedInput-icon{margin-right:4px}.red-ui-nodeList .red-ui-editableList-container{padding:0}.red-ui-nodeList .red-ui-editableList-container li{padding:2px 5px;margin:0;white-space:nowrap;border:none;background:#fefefe}.red-ui-nodeList .red-ui-editableList-container li:hover{background:#f0f0f0}.red-ui-nodeList .red-ui-editableList-container li i.fa-angle-right{text-align:center;width:15px;transition:transform 0.1s ease-in-out}.red-ui-nodeList .red-ui-editableList-container li .expandable{cursor:pointer}.red-ui-nodeList .red-ui-editableList-container li .expanded i.fa-angle-right{transform:rotate(90deg)}.red-ui-nodeList .red-ui-editableList-container li .meta{float:right}.red-ui-nodeList .red-ui-editableList-container li .meta input[type="checkbox"]{margin:0}.red-ui-nodeList .red-ui-editableList-container li .red-ui-editableList-item-content.disabled{color:#ccc}.red-ui-nodeList .red-ui-editableList-container li.red-ui-editableList-section-header{background:#f0f0f0}.red-ui-nodeList .red-ui-editableList-container li.red-ui-editableList-section-header .red-ui-editableList-item-content.disabled{color:#bbb}.red-ui-nodeList .red-ui-editableList-header{text-align:left}.red-ui-nodeList .red-ui-editableList-header>span:last-child{float:right;font-size:14px}.red-ui-checkboxSet{width:15px;display:inline-block;color:#888;cursor:pointer}.red-ui-checkboxSet input{display:none}.red-ui-checkboxSet.disabled{pointer-events:none;color:#ddd}.red-ui-stack{background:white}.red-ui-stack .palette-category{background:white}.red-ui-stack .palette-category:last-child{border-bottom:none}#dropTarget{position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,0.1);display:table;width:100%;height:100%;display:none;z-index:100}#dropTarget div{display:table-cell;vertical-align:middle;text-align:center;font-size:40px;color:#fff}#dropTarget div i{font-size:80px}#keyboard-help-dialog{font-size:0.9em;padding-top:10px}#user-settings-tab-keyboard .red-ui-editableList-container{border-radius:0;border:none;padding:0}.keyboard-shortcut-entry.keyboard-shortcut-list-header{padding:0 5px 0 5px}.keyboard-shortcut-entry.keyboard-shortcut-list-header div{color:#666 !important}.keyboard-shortcut-entry.keyboard-shortcut-list-header .red-ui-searchBox-container{width:calc(100% - 20px)}.keyboard-shortcut-entry.keyboard-shortcut-list-header .keyboard-shortcut-entry-scope{text-align:center}.keyboard-shortcut-list-header{border-bottom:1px solid #bbb}.keyboard-shortcut-list{position:absolute;top:30px;left:10px;right:10px;bottom:10px}.keyboard-shortcut-list li{padding:0}.keyboard-shortcut-list li .red-ui-editableList-item-content{padding:8px;cursor:pointer}.keyboard-shortcut-list li:hover{background:#f6f6f6}.keyboard-shortcut-entry div{display:inline-block}.keyboard-shortcut-entry select{margin:0;width:calc(100% - 30px);font-size:0.9em;margin-right:5px}.keyboard-shortcut-entry-key{width:160px;vertical-align:middle}.keyboard-shortcut-entry-key input{margin:0;width:calc(100% - 5px)}.keyboard-shortcut-entry-text{vertical-align:middle;width:calc(100% - 160px - 100px - 10px);overflow:hidden}.keyboard-shortcut-entry-text i{color:#ccc;margin-right:5px}.keyboard-shortcut-entry-scope{width:100px;color:#999;vertical-align:middle;text-align:right}.keyboard-shortcut-entry:not(.keyboard-shortcut-list-header) .keyboard-shortcut-entry-scope{font-size:0.8em}.keyboard-shortcut-entry-unassigned{color:#999}.keyboard-shortcut-entry-unassigned .keyboard-shortcut-entry-key{font-style:italic}.keyboard-shortcut-entry-expanded .keyboard-shortcut-entry-key{width:150px}.keyboard-shortcut-entry-expanded .keyboard-shortcut-entry-scope{width:110px}.keyboard-shortcut-entry-expanded span{display:none}.help-key{border:1px solid #ddd;padding:4px;border-radius:3px;background:#f6f6f6;font-family:Courier, monospace;box-shadow:#999 1px 1px 1px}.help-key-block{white-space:nowrap}.debug-window{padding:0;margin:0;background:#fff;line-height:20px}.debug-window .debug-message-payload{font-size:14px}.debug-content{position:absolute;top:43px;bottom:0px;left:0px;right:0px;overflow-y:scroll}.debug-filter-box{position:absolute;top:42px;left:0px;right:0px;z-index:20;background:#f9f9f9;padding:10px;border-bottom:1px solid #ddd;box-shadow:0 2px 6px rgba(0,0,0,0.1)}.debug-filter-row .red-ui-nodeList{margin:10px 0}.debug-message{position:relative;border-bottom:1px solid #eee;border-left:8px solid #eee;border-right:8px solid #eee;padding:2px}.debug-message>.debug-message-meta .debug-message-tools{display:none}.debug-message.debug-message-hover{border-right-color:#999}.debug-message.debug-message-hover>.debug-message-meta .debug-message-tools{display:inline-block}.debug-message-row .debug-message-tools-pin{display:none}.debug-message-row.debug-message-row-pinned .debug-message-tools-pin{display:inline-block}.debug-message-row:hover{background:#f3f3f3}.debug-message-row:hover>.debug-message-tools .debug-message-tools-copy{display:inline-block}.debug-message-row:hover>.debug-message-tools .debug-message-tools-pin{display:inline-block}.debug-message-meta .debug-message-tools .editor-button-small{font-size:11px}.debug-message-tools .button-group:not(:last-child){margin-right:3px}.debug-message-tools .editor-button-small{height:16px;line-height:14px;font-size:8px;border-radius:1px;padding:0 3px;min-width:18px}.debug-message-tools .editor-button-small i.fa-terminal{color:#4d4c4c !important}.debug-message-tools .editor-button-small.selected{color:#919090 !important;background:#d6d5d5}.debug-message-meta{background:#fff;font-size:11px;color:#707070}.debug-message-date{padding:1px 5px 1px 1px}.debug-message-topic{display:block;color:#a66}.debug-message-name{padding:1px 5px;color:#707070}.debug-message-tools{position:absolute;top:3px;right:1px}.debug-message-tools .debug-message-tools-copy{display:none}.debug-message-payload{display:block;padding:2px;background:#fff}.debug-message-level-log{border-left-color:#eee;border-right-color:#eee}.debug-message-level-30{border-left-color:#ffdf9d;border-right-color:#ffdf9d}.debug-message-level-20{border-left-color:#f99;border-right-color:#f99}.debug-message-object-entry{position:relative;padding-left:15px}.debug-message-element{color:#333;font-family:Menlo, monospace;font-size:13px !important;line-height:1.3em}.debug-message-object-key{color:#792e90}.debug-message-object-handle{color:#666;font-size:1em;width:1em;text-align:center;transition:transform 0.1s ease-in-out;transform:rotate(90deg)}.debug-message-element:not(.debug-message-top-level)>.debug-message-expandable>.debug-message-object-handle{margin-left:-1em}.debug-message-object-entry>.debug-message-expandable>.debug-message-object-handle{margin-left:-1em}.debug-message-object-entry.collapsed>span>.debug-message-object-handle{transform:rotate(0deg)}.debug-message-element.collapsed>span>.debug-message-object-handle{transform:rotate(0deg)}.debug-message-object-entry.collapsed>.debug-message-object-entry{display:none}.debug-message-element.collapsed .debug-message-object-entry{display:none}.debug-message-element:not(.collapsed)>.debug-message-expandable>.debug-message-object-value>.debug-message-object-header{display:none}.debug-message-element.collapsed .debug-message-buffer-opts{display:none}.debug-message-element.collapsed .debug-message-object-type-header{display:none}.debug-message-object-entry pre{font-family:Menlo, monospace;font-size:13px;line-height:1.2em;margin:0 0 0 -1em}.debug-message-type-other{color:#2033d6}.debug-message-type-string{color:#b72828}.debug-message-type-null{color:#666;font-style:italic}.debug-message-type-meta{color:#666;font-style:italic}.debug-message-type-number{color:#2033d6}.debug-message-type-number-toggle{cursor:pointer}.debug-message-row{display:block;padding:4px 2px 2px;position:relative}.debug-message-row.debug-message-row-pinned{background:#f6f6f6}.debug-message-expandable{cursor:pointer}.debug-message-expandable:hover .debug-message-object-handle{color:#b72828 !important}.debug-message-buffer-opts a{font-size:9px;color:#bbb;border:1px solid #bbb;border-radius:2px;padding:2px 5px;margin-left:5px}.debug-message-buffer-opts a:hover{text-decoration:none;color:#999;border:1px solid #999;background:#f3f3f3}.debug-message-buffer-raw>.debug-message-string-rows{display:none}.debug-message-buffer-string>.debug-message-array-rows{display:none}.debug-message-type-string-swatch{display:inline-block;width:1.1em;height:0.9em;vertical-align:middle;border-radius:3px;margin:0 4px}body{font-size:14px;font-family:'Helvetica Neue', Arial, Helvetica, sans-serif;padding-top:100px;background:#f3f3f3}#main-container{position:absolute;top:40px;left:0;bottom:0;right:0;overflow:hidden}i.spinner{display:inline-block;width:14px;height:14px;line-height:14px;vertical-align:text-top;margin-top:0px;background:url(images/spin.svg) no-repeat 50% 50%;background-size:contain}code,pre{padding:0 3px 2px;font-family:monospace;font-size:14px;color:#333333;border-radius:1px}code{padding:0px 3px 2px 3px;margin:1px;color:#AD1625;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8;border-radius:2px}pre{display:block;padding:9.5px;margin:0 0 10px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:2px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.hide{display:none} diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/LICENSE b/packages/node_modules/@node-red/editor/public/vendor/ace/LICENSE deleted file mode 100644 index 4760be2a6..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2010, Ajax.org B.V. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Ajax.org B.V. nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/ace.js b/packages/node_modules/@node-red/editor/public/vendor/ace/ace.js deleted file mode 100644 index 6fbed550c..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/ace.js +++ /dev/null @@ -1,14 +0,0 @@ -(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMESPACE = "ace",e=function(){return this}();!e&&typeof window!="undefined"&&(e=window);if(!ACE_NAMESPACE&&typeof requirejs!="undefined")return;var t=function(e,n,r){if(typeof e!="string"){t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)};t.modules={},t.payloads={};var n=function(e,t,n){if(typeof t=="string"){var i=s(e,t);if(i!=undefined)return n&&n(),i}else if(Object.prototype.toString.call(t)==="[object Array]"){var o=[];for(var u=0,a=t.length;u<a;++u){var f=s(e,t[u]);if(f==undefined&&r.original)return;o.push(f)}return n&&n.apply(null,o)||!0}},r=function(e,t){var i=n("",e,t);return i==undefined&&r.original?r.original.apply(this,arguments):i},i=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return i(e,n[0])+"!"+i(e,n[1])}if(t.charAt(0)=="."){var r=e.split("/").slice(0,-1).join("/");t=r+"/"+t;while(t.indexOf(".")!==-1&&s!=t){var s=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,r){r=i(e,r);var s=t.modules[r];if(!s){s=t.payloads[r];if(typeof s=="function"){var o={},u={id:r,uri:"",exports:o,packaged:!0},a=function(e,t){return n(r,e,t)},f=s(a,o,u);o=f||u.exports,t.modules[r]=o,delete t.payloads[r]}s=t.modules[r]=o||s}return s};o(ACE_NAMESPACE)})(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";function o(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,"")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,""),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e=="string"&&t){!i&&t.length>1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _=" \n \f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";var r="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.hasCssClass=function(e,t){var n=(e.className+"").split(/\s+/g);return n.indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){var n=e.className.split(/\s+/g);for(;;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){var n=e.className.split(/\s+/g),r=!0;for(;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;t=t||document;if(t.createStyleSheet&&(r=t.styleSheets)){while(n<r.length)if(r[n++].owningElement.id===e)return!0}else if(r=t.getElementsByTagName("style"))while(n<r.length)if(r[n++].id===e)return!0;return!1},t.importCssString=function(n,r,i){i=i||document;if(r&&t.hasCssString(r,i))return null;var s;r&&(n+="\n/*# sourceURL=ace/css/"+r+" */"),i.createStyleSheet?(s=i.createStyleSheet(),s.cssText=n,r&&(s.owningElement.id=r)):(s=t.createElement("style"),s.appendChild(i.createTextNode(n)),r&&(s.id=r),t.getDocumentHead(i).appendChild(s))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var r=t.createElement("link");r.rel="stylesheet",r.href=e,t.getDocumentHead(n).appendChild(r)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var s=e.documentElement;s.appendChild(r);var o=n.offsetWidth;i.overflow="scroll";var u=n.offsetWidth;return o==u&&(u=r.clientWidth),s.removeChild(r),o-u};if(typeof document=="undefined"){t.importCssString=function(){};return}window.pageYOffset!==undefined?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var r=e("./oop"),i=function(){var e={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},t,n;for(n in e.FUNCTION_KEYS)t=e.FUNCTION_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);for(n in e.PRINTABLE_KEYS)t=e.PRINTABLE_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);return r.mixin(e,e.MODIFIER_KEYS),r.mixin(e,e.PRINTABLE_KEYS),r.mixin(e,e.FUNCTION_KEYS),e.enter=e["return"],e.escape=e.esc,e.del=e["delete"],e[173]="-",function(){var t=["cmd","ctrl","alt","shift"];for(var n=Math.pow(2,t.length);n--;)e.KEY_MODS[n]=t.filter(function(t){return n&e.KEY_MODS[t]}).join("-")+"-"}(),e.KEY_MODS[0]="",e.KEY_MODS[-1]="input-",e}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};if(typeof navigator!="object")return;var r=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),i=navigator.userAgent;t.isWin=r=="win",t.isMac=r=="mac",t.isLinux=r=="linux",t.isIE=navigator.appName=="Microsoft Internet Explorer"||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&window.navigator.product==="Gecko",t.isOldGecko=t.isGecko&&parseInt((i.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",t.isWebKit=parseFloat(i.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(i.split(" Chrome/")[1])||undefined,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function a(e,t,n){var a=u(t);if(!i.isMac&&s){t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(a|=8);if(s.altGr){if((3&a)==3)return;s.altGr=0}if(n===18||n===17){var f="location"in t?t.location:t.keyLocation;if(n===17&&f===1)s[n]==1&&(o=t.timeStamp);else if(n===18&&a===3&&f===2){var l=t.timeStamp-o;l<50&&(s.altGr=!0)}}}n in r.MODIFIER_KEYS&&(n=-1),a&8&&n>=91&&n<=93&&(n=-1);if(!a&&n===13){var f="location"in t?t.location:t.keyLocation;if(f===3){e(t,a,-n);if(t.defaultPrevented)return}}if(i.isChromeOS&&a&8){e(t,a,n);if(t.defaultPrevented)return;a&=-9}return!!a||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?e(t,a,n):!1}function f(){s=Object.create(null)}var r=e("./keys"),i=e("./useragent"),s=null,o=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return e.type=="dblclick"?0:e.type=="contextmenu"||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,r){function i(e){n&&n(e),r&&r(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",i,!0),t.removeListener(document,"dragstart",i,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",i,!0),t.addListener(document,"dragstart",i,!0),i},t.addTouchMoveListener=function(e,n){var r,i;t.addListener(e,"touchstart",function(e){var t=e.touches,n=t[0];r=n.clientX,i=n.clientY}),t.addListener(e,"touchmove",function(e){var t=e.touches;if(t.length>1)return;var s=t[0];e.wheelX=r-s.clientX,e.wheelY=i-s.clientY,r=s.clientX,i=s.clientY,n(e)})},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=(e.deltaX||0)*5,e.wheelY=(e.deltaY||0)*5}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=(e.detail||0)*5,e.wheelY=0):(e.wheelX=0,e.wheelY=(e.detail||0)*5),n(e)})},t.addMultiMouseDownListener=function(e,n,r,s){function c(e){t.getButton(e)!==0?o=0:e.detail>1?(o++,o>4&&(o=1)):o=1;if(i.isIE){var c=Math.abs(e.clientX-u)>5||Math.abs(e.clientY-a)>5;if(!f||c)o=1;f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),o==1&&(u=e.clientX,a=e.clientY)}e._clicks=o,r[s]("mousedown",e);if(o>4)o=0;else if(o>1)return r[s](l[o],e)}function h(e){o=2,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),r[s]("mousedown",e),r[s](l[o],e)}var o=0,u,a,f,l={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",c),i.isOldIE&&t.addListener(e,"dblclick",h)})};var u=!i.isMac||!i.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};t.getModifierString=function(e){return r.KEY_MODS[u(e)]},t.addCommandKeyListener=function(e,n){var r=t.addListener;if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var o=null;r(e,"keydown",function(e){o=e.keyCode}),r(e,"keypress",function(e){return a(n,e,o)})}else{var u=null;r(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=a(n,e,e.keyCode);return u=e.defaultPrevented,t}),r(e,"keypress",function(e){u&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),u=null)}),r(e,"keyup",function(e){s[e.keyCode]=null}),s||(f(),r(window,"focus",f))}};if(typeof window=="object"&&window.postMessage&&!i.isOldIE){var l=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+l;t.addListener(n,"message",function i(s){s.data==r&&(t.stopPropagation(s),t.removeListener(n,"message",i),e())}),n.postMessage(r,"*")}}t.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function s(e){if(typeof e!="object"||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=s(e[n]);return t}if(Object.prototype.toString.call(e)!=="[object Object]")return e;t={};for(var n in e)t[n]=s(e[n]);return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),u=e("../lib/keys"),a=u.KEY_MODS,f=i.isChrome<18,l=i.isIE,c=function(e,t){function x(e){if(m)return;m=!0;if(k)t=0,n=e?0:c.value.length-1;else var t=4,n=5;try{c.setSelectionRange(t,n)}catch(r){}m=!1}function T(){if(m)return;c.value=h,i.isWebKit&&S.schedule()}function R(){clearTimeout(q),q=setTimeout(function(){g&&(c.style.cssText=g,g=""),t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}var n=this,c=s.createElement("textarea");c.className=i.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",i.isTouchPad&&c.setAttribute("x-palm-disable-auto-cap",!0),c.setAttribute("wrap","off"),c.setAttribute("autocorrect","off"),c.setAttribute("autocapitalize","off"),c.setAttribute("spellcheck",!1),c.style.opacity="0",e.insertBefore(c,e.firstChild);var h="\n aaaa a\n",p=!1,d=!1,v=!1,m=!1,g="",y=!0;try{var b=document.activeElement===c}catch(w){}r.addListener(c,"blur",function(e){t.onBlur(e),b=!1}),r.addListener(c,"focus",function(e){b=!0,t.onFocus(e),x()}),this.focus=function(){if(g)return c.focus();c.style.position="fixed",c.focus()},this.blur=function(){c.blur()},this.isFocused=function(){return b};var E=o.delayedCall(function(){b&&x(y)}),S=o.delayedCall(function(){m||(c.value=h,b&&x())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=y&&(y=!y,E.schedule())}),T(),b&&t.onFocus();var N=function(e){return e.selectionStart===0&&e.selectionEnd===e.value.length},C=function(e){N(c)?(t.selectAll(),x()):k&&x(t.selection.isEmpty())},k=null;this.setInputHandler=function(e){k=e},this.getInputHandler=function(){return k};var L=!1,A=function(e){if(c.selectionStart===4&&c.selectionEnd===5)return;k&&(e=k(e),k=null),v?(x(),e&&t.onPaste(e),v=!1):e==h.substr(0)&&c.selectionStart===4?L?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):p||(e.substring(0,9)==h&&e.length>h.length?e=e.substr(9):e.substr(0,4)==h.substr(0,4)?e=e.substr(4,e.length-h.length+1):e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e!=h.charAt(0)&&e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),p&&(p=!1),L&&(L=!1)},O=function(e){if(m)return;var t=c.value;A(t),T()},M=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(!r||f)return;var i=l||n?"Text":"text/plain";try{return t?r.setData(i,t)!==!1:r.getData(i)}catch(e){if(!n)return M(e,t,!0)}},_=function(e,n){var s=t.getCopyText();if(!s)return r.preventDefault(e);M(e,s)?(i.isIOS&&(d=n,c.value="\n aa"+s+"a a\n",c.setSelectionRange(4,4+s.length),p={value:s}),n?t.onCut():t.onCopy(),i.isIOS||r.preventDefault(e)):(p=!0,c.value=s,c.select(),setTimeout(function(){p=!1,T(),x(),n?t.onCut():t.onCopy()}))},D=function(e){_(e,!0)},P=function(e){_(e,!1)},H=function(e){var n=M(e);typeof n=="string"?(n&&t.onPaste(n,e),i.isIE&&setTimeout(x),r.preventDefault(e)):(c.value="",v=!0)};r.addCommandKeyListener(c,t.onCommandKey.bind(t)),r.addListener(c,"select",C),r.addListener(c,"input",O),r.addListener(c,"cut",D),r.addListener(c,"copy",P),r.addListener(c,"paste",H);var B=function(e){if(m||!t.onCompositionStart||t.$readOnly)return;m={},m.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(j,0),t.on("mousedown",F),m.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup()},j=function(){if(!m||!t.onCompositionUpdate||t.$readOnly)return;var e=c.value.replace(/\x01/g,"");if(m.lastValue===e)return;t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.canUndo&&(m.lastValue=e);if(m.lastValue){var n=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}},F=function(e){if(!t.onCompositionEnd||t.$readOnly)return;var n=m;m=!1;var r=setTimeout(function(){r=null;var e=c.value.replace(/\x01/g,"");if(m)return;e==n.lastValue?T():!n.lastValue&&e&&(T(),A(e))});k=function(i){return r&&clearTimeout(r),i=i.replace(/\x01/g,""),i==n.lastValue?"":(n.lastValue&&r&&t.undo(),i)},t.onCompositionEnd(),t.removeListener("mousedown",F),e.type=="compositionend"&&n.range&&t.selection.setRange(n.range);var s=!!i.isChrome&&i.isChrome>=53||!!i.isWebKit&&i.isWebKit>=603;s&&O()},I=o.delayedCall(j,50);r.addListener(c,"compositionstart",B),i.isGecko?r.addListener(c,"text",function(){I.schedule()}):(r.addListener(c,"keyup",function(){I.schedule()}),r.addListener(c,"keydown",function(){I.schedule()})),r.addListener(c,"compositionend",F),this.getElement=function(){return c},this.setReadOnly=function(e){c.readOnly=e},this.onContextMenu=function(e){L=!0,x(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){g||(g=c.style.cssText),c.style.cssText=(n?"z-index:100000;":"")+"height:"+c.style.height+";"+(i.isIE?"opacity:0.1;":"");var o=t.container.getBoundingClientRect(),u=s.computedStyle(t.container),a=o.top+(parseInt(u.borderTopWidth)||0),f=o.left+(parseInt(o.borderLeftWidth)||0),l=o.bottom-a-c.clientHeight-2,h=function(e){c.style.left=e.clientX-f-2+"px",c.style.top=Math.min(e.clientY-a-2,l)+"px"};h(e);if(e.type!="mousedown")return;t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(q),i.isWin&&r.capture(t.container,h,R)},this.onContextMenuClose=R;var q,U=function(e){t.textInput.onContextMenu(e),R()};r.addListener(c,"mouseup",U),r.addListener(c,"mousedown",function(e){e.preventDefault(),R()}),r.addListener(t.renderer.scroller,"contextmenu",U),r.addListener(c,"contextmenu",U);if(i.isIOS){var z=null,W=!1;e.addEventListener("keydown",function(e){z&&clearTimeout(z),W=!0}),e.addEventListener("keyup",function(e){z=setTimeout(function(){W=!1},100)});var X=function(e){if(document.activeElement!==c)return;if(W)return;if(d)return setTimeout(function(){d=!1},100);var n=c.selectionStart,r=c.selectionEnd;c.setSelectionRange(4,5);if(n==r)switch(n){case 0:t.onCommandKey(null,0,u.up);break;case 1:t.onCommandKey(null,0,u.home);break;case 2:t.onCommandKey(null,a.option,u.left);break;case 4:t.onCommandKey(null,0,u.left);break;case 5:t.onCommandKey(null,0,u.right);break;case 7:t.onCommandKey(null,a.option,u.right);break;case 8:t.onCommandKey(null,0,u.end);break;case 9:t.onCommandKey(null,0,u.down)}else{switch(r){case 6:t.onCommandKey(null,a.shift,u.right);break;case 7:t.onCommandKey(null,a.shift|a.option,u.right);break;case 8:t.onCommandKey(null,a.shift,u.end);break;case 9:t.onCommandKey(null,a.shift,u.down)}switch(n){case 0:t.onCommandKey(null,a.shift,u.up);break;case 1:t.onCommandKey(null,a.shift,u.home);break;case 2:t.onCommandKey(null,a.shift|a.option,u.left);break;case 3:t.onCommandKey(null,a.shift,u.left)}}};document.addEventListener("selectionchange",X),t.on("destroy",function(){document.removeEventListener("selectionchange",X)})}};t.TextInput=c}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),u=i.isChrome<18,a=i.isIE,f=e("./textinput_ios").TextInput,l=function(e,t){function w(e){if(p)return;p=!0;if(T)var t=0,r=e?0:n.value.length-1;else var t=e?2:1,r=2;try{n.setSelectionRange(t,r)}catch(i){}p=!1}function E(){if(p)return;n.value=l,i.isWebKit&&b.schedule()}function F(){clearTimeout(j),j=setTimeout(function(){d&&(n.style.cssText=d,d=""),t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}if(i.isIOS)return f.call(this,e,t);var n=s.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var l="\u2028\u2028",c=!1,h=!1,p=!1,d="",v=!0;try{var m=document.activeElement===n}catch(g){}r.addListener(n,"blur",function(e){t.onBlur(e),m=!1}),r.addListener(n,"focus",function(e){m=!0,t.onFocus(e),w()}),this.focus=function(){if(d)return n.focus();var e=n.style.top;n.style.position="fixed",n.style.top="0px",n.focus(),setTimeout(function(){n.style.position="",n.style.top=="0px"&&(n.style.top=e)},0)},this.blur=function(){n.blur()},this.isFocused=function(){return m};var y=o.delayedCall(function(){m&&w(v)}),b=o.delayedCall(function(){p||(n.value=l,m&&w())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=v&&(v=!v,y.schedule())}),E(),m&&t.onFocus();var S=function(e){return e.selectionStart===0&&e.selectionEnd===e.value.length},x=function(e){c?c=!1:S(n)?(t.selectAll(),w()):T&&w(t.selection.isEmpty())},T=null;this.setInputHandler=function(e){T=e},this.getInputHandler=function(){return T};var N=!1,C=function(e){T&&(e=T(e),T=null),h?(w(),e&&t.onPaste(e),h=!1):e==l.charAt(0)?N?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==l?e=e.substr(2):e.charAt(0)==l.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==l.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==l.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),N&&(N=!1)},k=function(e){if(p)return;var t=n.value;C(t),E()},L=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(!r||u)return;var i=a||n?"Text":"text/plain";try{return t?r.setData(i,t)!==!1:r.getData(i)}catch(e){if(!n)return L(e,t,!0)}},A=function(e,i){var s=t.getCopyText();if(!s)return r.preventDefault(e);L(e,s)?(i?t.onCut():t.onCopy(),r.preventDefault(e)):(c=!0,n.value=s,n.select(),setTimeout(function(){c=!1,E(),w(),i?t.onCut():t.onCopy()}))},O=function(e){A(e,!0)},M=function(e){A(e,!1)},_=function(e){var s=L(e);typeof s=="string"?(s&&t.onPaste(s,e),i.isIE&&setTimeout(w),r.preventDefault(e)):(n.value="",h=!0)};r.addCommandKeyListener(n,t.onCommandKey.bind(t)),r.addListener(n,"select",x),r.addListener(n,"input",k),r.addListener(n,"cut",O),r.addListener(n,"copy",M),r.addListener(n,"paste",_),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&r.addListener(e,"keydown",function(e){if(i.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:M(e);break;case 86:_(e);break;case 88:O(e)}});var D=function(e){if(p||!t.onCompositionStart||t.$readOnly)return;p={},p.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(P,0),t.on("mousedown",H),p.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup()},P=function(){if(!p||!t.onCompositionUpdate||t.$readOnly)return;var e=n.value.replace(/\u2028/g,"");if(p.lastValue===e)return;t.onCompositionUpdate(e),p.lastValue&&t.undo(),p.canUndo&&(p.lastValue=e);if(p.lastValue){var r=t.selection.getRange();t.insert(p.lastValue),t.session.markUndoGroup(),p.range=t.selection.getRange(),t.selection.setRange(r),t.selection.clearSelection()}},H=function(e){if(!t.onCompositionEnd||t.$readOnly)return;var r=p;p=!1;var s=setTimeout(function(){s=null;var e=n.value.replace(/\u2028/g,"");if(p)return;e==r.lastValue?E():!r.lastValue&&e&&(E(),C(e))});T=function(n){return s&&clearTimeout(s),n=n.replace(/\u2028/g,""),n==r.lastValue?"":(r.lastValue&&s&&t.undo(),n)},t.onCompositionEnd(),t.removeListener("mousedown",H),e.type=="compositionend"&&r.range&&t.selection.setRange(r.range);var o=!!i.isChrome&&i.isChrome>=53||!!i.isWebKit&&i.isWebKit>=603;o&&k()},B=o.delayedCall(P,50);r.addListener(n,"compositionstart",D),i.isGecko?r.addListener(n,"text",function(){B.schedule()}):(r.addListener(n,"keyup",function(){B.schedule()}),r.addListener(n,"keydown",function(){B.schedule()})),r.addListener(n,"compositionend",H),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){N=!0,w(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,o){d||(d=n.style.cssText),n.style.cssText=(o?"z-index:100000;":"")+"height:"+n.style.height+";"+(i.isIE?"opacity:0.1;":"");var u=t.container.getBoundingClientRect(),a=s.computedStyle(t.container),f=u.top+(parseInt(a.borderTopWidth)||0),l=u.left+(parseInt(u.borderLeftWidth)||0),c=u.bottom-f-n.clientHeight-2,h=function(e){n.style.left=e.clientX-l-2+"px",n.style.top=Math.min(e.clientY-f-2,c)+"px"};h(e);if(e.type!="mousedown")return;t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(j),i.isWin&&r.capture(t.container,h,F)},this.onContextMenuClose=F;var j,I=function(e){t.textInput.onContextMenu(e),F()};r.addListener(n,"mouseup",I),r.addListener(n,"mousedown",function(e){e.preventDefault(),F()}),r.addListener(t.renderer.scroller,"contextmenu",I),r.addListener(n,"contextmenu",I)};t.TextInput=l}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function a(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function f(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function l(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var n=t.column-4;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=0,u=250;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(i!==0){var o=r.getSelectionRange(),u=o.isEmpty();r.$blockScrolling++,(u||i==1)&&r.selection.moveToPosition(n),r.$blockScrolling--,i==2&&(r.textInput.onContextMenu(e.domEvent),s.isMozilla||e.preventDefault());return}this.mousedownEvent.time=Date.now();if(t&&!r.isFocused()){r.focus();if(this.$focusTimout&&!this.$clickSelection&&!r.inMultiSelectMode){this.setState("focusWait"),this.captureMouse(e);return}}return this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);t.$blockScrolling++;if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=l(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);n.$blockScrolling++;if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=l(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>o||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(e.getAccelKey())return;e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,s=e.wheelX/i,o=e.wheelY/i;i<u&&(s=(s+n.vx)/2,o=(o+n.vy)/2);var a=Math.abs(s/o),f=!1;a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(f=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(f=!0);if(f)n.allowed=r;else if(r-n.allowed<u){var l=Math.abs(s)<=1.1*Math.abs(n.vx)&&Math.abs(o)<=1.1*Math.abs(n.vy);l?(f=!0,n.allowed=r):n.allowed=0}n.t=r,n.vx=s,n.vy=o;if(f)return t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()},this.onTouchMove=function(e){this.editor._emit("mousewheel",e)}}).call(a.prototype),t.DefaultHandlers=a}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function s(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var r=e("./lib/oop"),i=e("./lib/dom");(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){i.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){e!=null&&this.setText(e),t!=null&&n!=null&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(s.prototype),t.Tooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";function u(e){function l(){var r=u.getDocumentPosition().row,s=n.$annotations[r];if(!s)return c();var o=t.session.getLength();if(r==o){var a=t.renderer.pixelToScreenCoordinates(0,u.y).row,l=u.$pos;if(a>t.session.documentToScreenRow(l.row,l.column))return c()}if(f==s)return;f=s.text.join("<br/>"),i.setHtml(f),i.show(),t._signal("showGutterTooltip",i),t.on("mousewheel",c);if(e.$tooltipFollowsMouse)h(u);else{var p=u.domEvent.target,d=p.getBoundingClientRect(),v=i.getElement().style;v.left=d.right+"px",v.top=d.bottom+"px"}}function c(){o&&(o=clearTimeout(o)),f&&(i.hide(),f=null,t._signal("hideGutterTooltip",i),t.removeEventListener("mousewheel",c))}function h(e){i.setPosition(e.x,e.y)}var t=e.editor,n=t.renderer.$gutterLayer,i=new a(t.container);e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused()||r.getButton()!=0)return;var i=n.getRegion(r);if(i=="foldWidgets")return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(r),r.preventDefault()});var o,u,f;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(r.hasCssClass(n,"ace_fold-widget"))return c();f&&e.$tooltipFollowsMouse&&h(t),u=t;if(o)return;o=setTimeout(function(){o=null,u&&!e.isMousePressed?l():c()},50)}),s.addListener(t.renderer.$gutter,"mouseout",function(e){u=null;if(!f||o)return;o=setTimeout(function(){o=null,c()},50)}),t.on("changeSession",c)}function a(e){o.call(this,e)}var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event"),o=e("../tooltip").Tooltip;i.inherits(a,o),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),s=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+s>r&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=u}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function f(e){function T(e,n){var r=Date.now(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;if(!S||i||s)t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,S=r,x={x:p,y:d};else{var o=l(x.x,x.y,p,d);o>a?S=null:r-S>=u&&(t.renderer.scrollCursorIntoView(),S=null)}}function N(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,u=t.renderer.scroller.getBoundingClientRect(),a={x:{left:p-u.left,right:u.right-p},y:{top:d-u.top,bottom:u.bottom-d}},f=Math.min(a.x.left,a.x.right),l=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};f/s<=2&&(c.column+=a.x.left<a.x.right?-3:2),l/i<=1&&(c.row+=a.y.top<a.y.bottom?-1:1);var h=e.row!=c.row,v=e.column!=c.column,m=!n||e.row!=n.row;h||v&&!m?E?r-E>=o&&t.renderer.scrollCursorIntoView(c):E=r:E=null}function C(){var e=g;g=t.renderer.screenToTextCoordinates(p,d),T(g,e),N(g,e)}function k(){m=t.selection.toOrientedRange(),h=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),C(),v=setInterval(C,20),y=0,i.addListener(document,"mousemove",O)}function L(){clearInterval(v),t.session.removeMarker(h),h=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(m),t.$blockScrolling-=1,t.isFocused()&&!w&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),m=null,g=null,y=0,E=null,S=null,i.removeListener(document,"mousemove",O)}function O(){A==null&&(A=setTimeout(function(){A!=null&&h&&L()},20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e=="text/plain"||e=="Text"})}function _(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var c=t.container,h,p,d,v,m,g,y=0,b,w,E,S,x;this.onDragStart=function(e){if(this.cancelDrag||!c.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}m=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",s.isOpera&&(t.container.appendChild(n),n.scrollTop=0),i.setDragImage&&i.setDragImage(n,0,0),s.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),w=!0,this.setState("drag")},this.onDragEnd=function(e){c.draggable=!1,w=!1,this.setState(null);if(!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!b&&n=="move"&&t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||k(),y++,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||(k(),y++),A!==null&&(A=null),e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragLeave=function(e){y--;if(y<=0&&h)return L(),b=null,i.preventDefault(e)},this.onDrop=function(e){if(!g)return;var n=e.dataTransfer;if(w)switch(b){case"move":m.contains(g.row,g.column)?m={start:g,end:g}:m=t.moveText(m,g);break;case"copy":m=t.moveText(m,g,!0)}else{var r=n.getData("Text");m={start:g,end:t.session.insert(g,r)},t.focus(),b=null}return L(),i.preventDefault(e)},i.addListener(c,"dragstart",this.onDragStart.bind(e)),i.addListener(c,"dragend",this.onDragEnd.bind(e)),i.addListener(c,"dragenter",this.onDragEnter.bind(e)),i.addListener(c,"dragover",this.onDragOver.bind(e)),i.addListener(c,"dragleave",this.onDragLeave.bind(e)),i.addListener(c,"drop",this.onDrop.bind(e));var A=null}function l(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=200,u=200,a=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=s.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&this.state=="dragReady"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state==="dragWait"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(!this.$dragEnabled)return;this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(i===1&&r===0&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on");if(t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var u=t.container;u.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}).call(f.prototype),t.DragdropHandler=f}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){if(n||!i.readyState||i.readyState=="loaded"||i.readyState=="complete")i=i.onload=i.onreadystatechange=null,n||t()}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";function o(e){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}function u(e,t){var n=new Error(e);n.data=t,typeof console=="object"&&console.error&&console.error(n),setTimeout(function(){throw n})}var r=e("./oop"),i=e("./event_emitter").EventEmitter,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]===t)return;var n=this.$options[e];if(!n)return o('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:o('misspelled option "'+e+'"')}},a=function(){this.$defaultOptions={}};(function(){r.implement(this,i),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r=="string"&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),r.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},this.setDefaultValue=function(e,t,n){var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=o,this.reportError=u}).call(a.prototype),t.AppConfig=a}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,n){"no use strict";function f(r){if(!u||!u.document)return;a.packaged=r||e.packaged||n.packaged||u.define&&define.packaged;var i={},s="",o=document.currentScript||document._currentScript,f=o&&o.ownerDocument||document,c=f.getElementsByTagName("script");for(var h=0;h<c.length;h++){var p=c[h],d=p.src||p.getAttribute("src");if(!d)continue;var v=p.attributes;for(var m=0,g=v.length;m<g;m++){var y=v[m];y.name.indexOf("data-ace-")===0&&(i[l(y.name.replace(/^data-ace-/,""))]=y.value)}var b=d.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);b&&(s=b[1])}s&&(i.base=i.base||s,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var w in i)typeof i[w]!="undefined"&&t.set(w,i[w])}function l(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./lib/net"),o=e("./lib/app_config").AppConfig;n.exports=t=new o;var u=function(){return this||typeof window!="undefined"&&window}(),a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);a[e]=t},t.all=function(){return r.copyObject(a)},t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var r=t=="snippets"?"/":"-",i=n[n.length-1];if(t=="worker"&&r=="-"){var s=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(s,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var o=a[t+"Path"];return o==null?o=a.basePath:r=="/"&&(t=r=""),o&&o.slice(-1)!="/"&&(o+="/"),o+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(u){}if(i&&!t.$loading[n])return r&&r(i);t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r);if(t.$loading[n].length>1)return;var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,o),a)},t.init=f}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,u=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,f=e("../config"),l=function(e){var t=this;this.editor=e,new s(this),new o(this),new a(this);var n=function(t){var n=!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement());n&&window.focus(),e.focus()},u=e.renderer.getMouseEventTarget();r.addListener(u,"click",this.onMouseEvent.bind(this,"click")),r.addListener(u,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener([u,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),r.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var f=e.renderer.$gutter;r.addListener(f,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(f,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(f,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(f,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),r.addListener(u,"mousedown",n),r.addListener(f,"mousedown",n),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n),r.addListener(e.renderer.scrollBarH.element,"mousedown",n)),e.on("mousemove",function(n){if(t.state||t.$dragDelay||!t.$dragEnabled)return;var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),s=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?s.setCursorStyle("default"):s.setCursorStyle("")})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!n||!n.length)return;this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var n=new u(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new u(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var s=this,o=function(e){if(!e)return;if(i.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new u(e,s.editor),s.$mouseMoved=!0},a=function(e){clearInterval(l),f(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",n.$keepTextAreaAtCursor==null&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),s.isMousePressed=!1,s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e)},f=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(i.isOldIE&&e.domEvent.type=="dblclick")return setTimeout(function(){a(e)});s.$onCaptureMouseMove=o,s.releaseMouse=r.capture(this.editor.container,o,a);var l=setInterval(f,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){if(t&&t.domEvent&&t.domEvent.type!="contextmenu")return;this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent)}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(l.prototype),f.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";function r(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session,s=i.getParentFoldRangeData(r,!0),o=s.range||s.firstRange;if(o){r=o.start.row;var u=i.getFoldAt(r,i.getLine(r).length,1);u?i.removeFold(u):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),s=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]==e)return;while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)},this.addKeyboardHandler=function(e,t){if(!e)return;typeof e=="function"&&!e.handleKeyboard&&(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t==-1?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){var s,o=!1,u=this.$editor.commands;for(var a=this.$handlers.length;a--;){s=this.$handlers[a].handleKeyboard(this.$data,e,t,n,r);if(!s||!s.command)continue;s.command=="null"?o=!0:o=u.exec(s.command,this.$editor,s.args,r),o&&r&&e!=-1&&s.passEvent!=1&&s.command.passEvent!=1&&i.stopEvent(r);if(o)break}return!o&&e==-1&&(s={command:"insertstring"},o=u.exec("insertstring",this.$editor,t)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",s),o},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(s.prototype),t.KeyBinding=s}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";function F(e,t,n,r){var i=s?d:p,c=null,h=null,v=null,m=0,g=null,y=null,b=-1,w=null,E=null,T=[];if(!r)for(w=0,r=[];w<n;w++)r[w]=R(e[w]);o=s,u=!1,a=!1,f=!1,l=!1;for(E=0;E<n;E++){c=m,T[E]=h=q(e,r,T,E),m=i[c][h],g=m&240,m&=15,t[E]=v=i[m][5];if(g>0)if(g==16){for(w=b;w<E;w++)t[w]=1;b=-1}else b=-1;y=i[m][6];if(y)b==-1&&(b=E);else if(b>-1){for(w=b;w<E;w++)t[w]=v;b=-1}r[E]==S&&(t[E]=0),o|=v}if(l)for(w=0;w<n;w++)if(r[w]==x){t[w]=s;for(var C=w-1;C>=0;C--){if(r[C]!=N)break;t[C]=s}}}function I(e,t,n){if(o<e)return;if(e==1&&s==m&&!f){n.reverse();return}var r=n.length,i=0,u,a,l,c;while(i<r){if(t[i]>=e){u=i+1;while(u<r&&t[u]>=e)u++;for(a=i,l=u-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;i=u}i++}}function q(e,t,n,r){var i=t[r],o,c,h,p;switch(i){case g:case y:u=!1;case E:case w:return i;case b:return u?w:b;case T:return u=!0,a=!0,y;case N:return E;case C:if(r<1||r+1>=t.length||(o=n[r-1])!=b&&o!=w||(c=t[r+1])!=b&&c!=w)return E;return u&&(c=w),c==o?c:E;case k:o=r>0?n[r-1]:S;if(o==b&&r+1<t.length&&t[r+1]==b)return b;return E;case L:if(r>0&&n[r-1]==b)return b;if(u)return E;p=r+1,h=t.length;while(p<h&&t[p]==L)p++;if(p<h&&t[p]==b)return b;return E;case A:h=t.length,p=r+1;while(p<h&&t[p]==A)p++;if(p<h){var d=e[r],v=d>=1425&&d<=2303||d==64286;o=t[p];if(v&&(o==y||o==T))return y}if(r<1||(o=t[r-1])==S)return E;return n[r-1];case S:return u=!1,f=!0,s;case x:return l=!0,E;case O:case M:case D:case P:case _:u=!1;case H:return E}}function R(e){var t=e.charCodeAt(0),n=t>>8;return n==0?t>191?g:B[t]:n==5?/[\u0591-\u05f4]/.test(e)?y:g:n==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?A:/[\u0660-\u0669\u066b-\u066c]/.test(e)?w:t==1642?L:/[\u06f0-\u06f9]/.test(e)?b:T:n==32&&t<=8287?j[t&255]:n==254?t>=65136?T:E:E}function U(e){return e>="\u064b"&&e<="\u0655"}var r=["\u0621","\u0641"],i=["\u063a","\u064a"],s=0,o=0,u=!1,a=!1,f=!1,l=!1,c=!1,h=!1,p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],v=0,m=1,g=0,y=1,b=2,w=3,E=4,S=5,x=6,T=7,N=8,C=9,k=10,L=11,A=12,O=13,M=14,_=15,D=16,P=17,H=18,B=[H,H,H,H,H,H,H,H,H,x,S,x,N,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,S,S,S,x,N,E,E,L,L,L,E,E,E,E,E,k,C,k,C,C,b,b,b,b,b,b,b,b,b,b,C,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,H,H,H,H,H,H,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,C,E,L,L,L,L,E,E,E,E,g,E,E,H,E,E,L,L,b,b,E,g,E,E,E,b,g,E,E,E,E,E],j=[N,N,N,N,N,N,N,N,N,N,N,H,H,H,g,y,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N,S,O,M,_,D,P,C,L,L,L,L,L,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,C,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N];t.L=g,t.R=y,t.EN=b,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="\u00b7",t.doBidiReorder=function(e,n,r){if(e.length<2)return{};var i=e.split(""),o=new Array(i.length),u=new Array(i.length),a=[];s=r?m:v,F(i,a,i.length,n);for(var f=0;f<o.length;o[f]=f,f++);I(2,a,o),I(1,a,o);for(var f=0;f<o.length-1;f++)n[f]===w?a[f]=t.AN:a[f]===y&&(n[f]>T&&n[f]<O||n[f]===E||n[f]===H)?a[f]=t.ON_R:f>0&&i[f-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(i[f])&&(a[f-1]=a[f]=t.R_H,f++);i[i.length-1]===t.DOT&&(a[i.length-1]=t.B);for(var f=0;f<o.length;f++)u[f]=a[o[f]];return{logicalFromVisual:o,bidiLevels:u}},t.hasBidiCharacters=function(e,t){var n=!1;for(var r=0;r<e.length;r++)t[r]=R(e.charAt(r)),!n&&(t[r]==y||t[r]==T)&&(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("./lib/bidiutil"),i=e("./lib/lang"),s=e("./lib/useragent"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,this.charWidths=[],this.EOL="\u00ac",this.showInvisibles=!0,this.isRtlDir=!1,this.line="",this.wrapIndent=0,this.isLastRow=!1,this.EOF="\u00b6",this.seenBidi=!1};(function(){this.isBidiRow=function(e,t,n){return this.seenBidi?(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},this.onChange=function(e){this.seenBidi?this.currentRow=null:e.action=="insert"&&o.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n,r=this.session.$getRowCacheIndex(t,this.currentRow);while(this.currentRow-e>0){n=this.session.$getRowCacheIndex(t,this.currentRow-e-1);if(n!==r)break;r=n,e++}}return e},this.updateRowLine=function(e,t){e===undefined&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e);if(this.session.$useWrapMode){var n=this.session.$wrapData[e];n&&(t===undefined&&(t=this.getSplitIndex()),t>0&&n.length?(this.wrapIndent=n.indent,this.line=t<n.length?this.line.substring(n[t-1],n[n.length-1]):this.line.substring(n[n.length-1])):this.line=this.line.substring(0,n[t]))}var s=this.session,o=0,u;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return e===" "||s.isFullWidth(e.charCodeAt(0))?(u=e===" "?s.getScreenTabSize(t+o):2,o+=u-1,i.stringRepeat(r.DOT,u)):e})},this.updateBidiMap=function(){var e=[],t=this.isLastRow?this.EOF:this.EOL,n=this.line+(this.showInvisibles?t:r.DOT);r.hasBidiCharacters(n,e)?this.bidiMap=r.doBidiReorder(n,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(!this.seenBidi)return;if(this.characterWidth===e.$characterSize.width)return;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("\u05d4");this.charWidths[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=s.isChrome?n:n*.45,this.charWidths[r.B]=0,this.currentRow=null},this.getShowInvisibles=function(){return this.showInvisibles},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setTextDir=function(e){this.isRtlDir=e},this.getPosLeft=function(e){e-=this.wrapIndent;var t=r.getVisualFromLogicalIdx(e>0?e-1:0,this.bidiMap),n=this.bidiMap.bidiLevels,i=0;e===0&&n[t]%2!==0&&t++;for(var s=0;s<t;s++)i+=this.charWidths[n[s]];return e!==0&&n[t]%2===0&&(i+=this.charWidths[n[t]]),this.wrapIndent&&(i+=this.wrapIndent*this.charWidths[r.L]),i},this.getSelections=function(e,t){var n=this.bidiMap,i=n.bidiLevels,s,o=this.wrapIndent*this.charWidths[r.L],u=[],a=Math.min(e,t)-this.wrapIndent,f=Math.max(e,t)-this.wrapIndent,l=!1,c=!1,h=0;for(var p,d=0;d<i.length;d++)p=n.logicalFromVisual[d],s=i[d],l=p>=a&&p<f,l&&!c?h=o:!l&&c&&u.push({left:h,width:o-h}),o+=this.charWidths[s],c=l;return l&&d===i.length&&u.push({left:h,width:o-h}),u},this.offsetToCol=function(e){var t=0,e=Math.max(e,0),n=0,i=0,s=this.bidiMap.bidiLevels,o=this.charWidths[s[i]];this.wrapIndent&&(e-=this.wrapIndent*this.charWidths[r.L]);while(e>n+o/2){n+=o;if(i===s.length-1){o=0;break}o=this.charWidths[s[++i]]}return i>0&&s[i-1]%2!==0&&s[i]%2===0?(e<n&&i--,t=this.bidiMap.logicalFromVisual[i]):i>0&&s[i-1]%2===0&&s[i]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===s.length-1&&o===0&&s[i-1]%2===0||!this.isRtlDir&&i===0&&s[i]%2!==0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&s[i-1]%2!==0&&o!==0&&i--,t=this.bidiMap.logicalFromVisual[i]),t+this.wrapIndent}}).call(u.prototype),t.BidiHandler=u}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+e);return}var t=this.getSelectionAnchor(),n=this.getSelectionLead(),r=this.isBackwards();(!r||t.column!==0)&&this.setSelectionAnchor(t.row,t.column+e),(r||n.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.wouldMoveIntoSoftTab(e,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column),s=i.match(/^\s*/);s[0].length!=t&&!this.session.$useEmacsStyleLineStart&&(r.column+=s[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(i=this.session.nonTokenRe.exec(r))t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t);if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(i=this.session.tokenRe.exec(r))t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var r=this.session.getFoldStringAt(e,t,-1);r==null&&(r=this.doc.getLine(e).substring(0,t));var s=i.stringReverse(r),o;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(o=this.session.nonTokenRe.exec(s))t-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}if(o=this.session.tokenRe.exec(s))t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.$shortWordEndIndex=function(e){var t,n=0,r,i=/\s/,s=this.session.tokenRe;s.lastIndex=0;if(t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{while((r=e[n])&&i.test(r))n++;if(n<1){s.lastIndex=0;while((r=e[n])&&!s.test(r)){s.lastIndex=0,n++;if(i.test(r)){if(n>2){n--;break}while((r=e[n])&&i.test(r))n++;if(n>2)break}}}}return s.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<s&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var o=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+o)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var r=this.session.getLine(e).substring(0,t);if(t===0){do e--,r=this.doc.getLine(e);while(e>0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;t===0&&(e!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var i=this.session.screenToDocumentPosition(n.row+e,n.column,r);e!==0&&t===0&&i.row===this.lead.row&&i.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[i.row]&&(i.row>0||e>0)&&i.row++,this.moveCursorTo(i.row,i.column+t,t===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return o.fromPoints(t,n)}catch(r){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(e.start==undefined){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(u.prototype),t.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var r=e("./config"),i=2e3,s=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){var n=this.states[t],r=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",u=[];for(var a=0;a<n.length;a++){var f=n[a];f.defaultToken&&(s.defaultToken=f.defaultToken),f.caseInsensitive&&(o="gi");if(f.regex==null)continue;f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var l=f.regex,c=(new RegExp("(?:("+l+")|(.))")).exec("a").length-2;Array.isArray(f.token)?f.token.length==1||c==1?f.token=f.token[0]:c-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:c-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&(c>1?f.onMatch=this.$applyToken:f.onMatch=f.token),c>1&&(/\\\d/.test(f.regex)?l=f.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(c=1,l=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&u.push(f)),s[i]=a,i+=c,r.push(l),f.onMatch||(f.onMatch=null)}r.length||(s[0]=0,r.push("$")),u.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(e){i=e|0},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n=="string")return[{type:n,value:e}];var r=[];for(var i=0,s=n.length;i<s;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";var n=[],r=this.tokenArray;for(var i=0,s=r.length;i<s;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(e.indexOf("(?=")!=-1){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,s,o,u,a){return r?r=u!="]":u?r=!0:o?(n==i.stack&&(i.end=a+1,i.stack=-1),n--):s&&(n++,s.length!=1&&(i.stack=n,i.start=a)),e}),i.end!=null&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return e.charAt(0)!="^"&&(e="^"+e),e.charAt(e.length-1)!="$"&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&typeof t!="string"){var n=t.slice(0);t=n[0],t==="#tmp"&&(n.shift(),t=n.shift())}else var n=[];var r=t||"start",s=this.states[r];s||(r="start",s=this.states[r]);var o=this.matchMappings[r],u=this.regExps[r];u.lastIndex=0;var a,f=[],l=0,c=0,h={type:null,value:""};while(a=u.exec(e)){var p=o.defaultToken,d=null,v=a[0],m=u.lastIndex;if(m-v.length>l){var g=e.substring(l,m-v.length);h.type==p?h.value+=g:(h.type&&f.push(h),h={type:p,value:g})}for(var y=0;y<a.length-2;y++){if(a[y+1]===undefined)continue;d=s[o[y]],d.onMatch?p=d.onMatch(v,r,n,e):p=d.token,d.next&&(typeof d.next=="string"?r=d.next:r=d.next(r,n),s=this.states[r],s||(this.reportError("state doesn't exist",r),r="start",s=this.states[r]),o=this.matchMappings[r],l=m,u=this.regExps[r],u.lastIndex=m),d.consumeLineEnd&&(l=m);break}if(v)if(typeof p=="string")!!d&&d.merge===!1||h.type!==p?(h.type&&f.push(h),h={type:p,value:v}):h.value+=v;else if(p){h.type&&f.push(h),h={type:null,value:""};for(var y=0;y<p.length;y++)f.push(p[y])}if(l==e.length)break;l=m;if(c++>i){c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(l<e.length)h.type&&f.push(h),h={value:e.substring(l,l+=2e3),type:"overflow"};r="start",n=[];break}}return h.type&&f.push(h),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:f,state:n.length?n:r}},this.reportError=r.reportError}).call(s.prototype),t.Tokenizer=s}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){var r=e[n];for(var i=0;i<r.length;i++){var s=r[i];if(s.next||s.onMatch)typeof s.next=="string"&&s.next.indexOf(t)!==0&&(s.next=t+s.next),s.nextState&&s.nextState.indexOf(t)!==0&&(s.nextState=t+s.nextState)}this.$rules[t+n]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,s){var o=typeof e=="function"?(new e).getRules():e;if(i)for(var u=0;u<i.length;u++)i[u]=t+i[u];else{i=[];for(var a in o)i.push(t+a)}this.addRules(o,t);if(n){var f=Array.prototype[s?"push":"unshift"];for(var u=0;u<i.length;u++)f.apply(this.$rules[i[u]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return(e!="start"||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){function i(s){var o=r[s];o.processed=!0;for(var u=0;u<o.length;u++){var a=o[u],f=null;Array.isArray(a)&&(f=a,a={}),!a.regex&&a.start&&(a.regex=a.start,a.next||(a.next=[]),a.next.push({defaultToken:a.token},{token:a.token+".end",regex:a.end||a.start,next:"pop"}),a.token=a.token+".start",a.push=!0);var l=a.next||a.push;if(l&&Array.isArray(l)){var c=a.stateName;c||(c=a.token,typeof c!="string"&&(c=c[0]||""),r[c]&&(c+=n++)),r[c]=l,a.next=c,i(c)}else l=="pop"&&(a.next=t);a.push&&(a.nextState=a.next||a.push,a.next=e,delete a.push);if(a.rules)for(var h in a.rules)r[h]?r[h].push&&r[h].push.apply(r[h],a.rules[h]):r[h]=a.rules[h];var p=typeof a=="string"?a:a.include;p&&(Array.isArray(p)?f=p.map(function(e){return r[e]}):f=r[p]);if(f){var d=[u,1].concat(f);a.noEscape&&(d=d.filter(function(e){return!e.next})),o.splice.apply(o,d),u--}a.keywordMap&&(a.token=this.createKeywordMapper(a.keywordMap,a.defaultToken||"text",a.caseInsensitive),delete a.defaultToken)}}var n=0,r=this.$rules;Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach(function(t){var s=e[t];n&&(s=s.toLowerCase());var o=s.split(r||"|");for(var u=o.length;u--;)i[o[u]]=t}),Object.getPrototypeOf(i)&&(i.__proto__=null),this.$keywordList=Object.keys(i),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if(typeof e=="function")var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(!e)return this.$behaviours;var t={};for(var n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(r.prototype),t.Behaviour=r}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range,i=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;var e;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1,e||(e=this.$session.getLength());if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f,l={},c={'"':'"',"'":"'"},h=function(e){var t=-1;e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount}));if(l[t])return f=l[t];f=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},d=function(e){this.add("braces","insertion",function(t,n,r,i,s){var u=r.getCursorPosition(),a=i.doc.getLine(u.row);if(s=="{"){h(r);var l=r.getSelectionRange(),c=i.doc.getTextRange(l);if(c!==""&&c!=="{"&&r.getWrapBehavioursEnabled())return p(l,c,"{","}");if(d.isSaneInsertion(r,i))return/[\]\}\)]/.test(a[u.column])||r.inMultiSelectMode||e&&e.braces?(d.recordAutoInsert(r,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(r,i,"{"),{text:"{",selection:[1,1]})}else if(s=="}"){h(r);var v=a.substring(u.column,u.column+1);if(v=="}"){var m=i.$findOpeningBracket("}",{column:u.column+1,row:u.row});if(m!==null&&d.isAutoInsertedClosing(u,a,s))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if(s=="\n"||s=="\r\n"){h(r);var g="";d.isMaybeInsertedClosing(u,a)&&(g=o.stringRepeat("}",f.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var v=a.substring(u.column,u.column+1);if(v==="}"){var y=i.findMatchingBracket({row:u.row,column:u.column+1},"}");if(!y)return null;var b=this.$getIndent(i.getLine(y.row))}else{if(!g){d.clearMaybeInsertedClosing();return}var b=this.$getIndent(a)}var w=b+i.getTabString();return{text:"\n"+w+"\n"+b+g,selection:[1,w.length,1,w.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;f.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"(",")");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"[","]");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){var s=r.$mode.$quotes||c;if(i.length==1&&s[i]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(i)!=-1)return;h(n);var o=i,u=n.getSelectionRange(),a=r.doc.getTextRange(u);if(a!==""&&(a.length!=1||!s[a])&&n.getWrapBehavioursEnabled())return p(u,a,o,o);if(!a){var f=n.getCursorPosition(),l=r.doc.getLine(f.row),d=l.substring(f.column-1,f.column),v=l.substring(f.column,f.column+1),m=r.getTokenAt(f.row,f.column),g=r.getTokenAt(f.row,f.column+1);if(d=="\\"&&m&&/escape/.test(m.type))return null;var y=m&&/string|escape/.test(m.type),b=!g||/string|escape/.test(g.type),w;if(v==o)w=y!==b,w&&/string\.end/.test(g.type)&&(w=!1);else{if(y&&!b)return null;if(y&&b)return null;var E=r.$mode.tokenRe;E.lastIndex=0;var S=E.test(d);E.lastIndex=0;var x=E.test(d);if(S||x)return null;if(v&&!/[\s;,.})\]\\]/.test(v))return null;w=!0}return{text:w?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,f.autoInsertedLineEnd[0])||(f.autoInsertedBrackets=0),f.autoInsertedRow=r.row,f.autoInsertedLineEnd=n+i.substr(r.column),f.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(f.maybeInsertedBrackets=0),f.maybeInsertedRow=r.row,f.maybeInsertedLineStart=i.substr(0,r.column)+n,f.maybeInsertedLineEnd=i.substr(r.column),f.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return f.autoInsertedBrackets>0&&e.row===f.autoInsertedRow&&n===f.autoInsertedLineEnd[0]&&t.substr(e.column)===f.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return f.maybeInsertedBrackets>0&&e.row===f.maybeInsertedRow&&t.substr(e.column)===f.maybeInsertedLineEnd&&t.substr(0,e.column)==f.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){f.autoInsertedLineEnd=f.autoInsertedLineEnd.substr(1),f.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){f&&(f.maybeInsertedBrackets=0,f.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";function r(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}t.packages={},r({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,o=e("../unicode"),u=e("../lib/lang"),a=e("../token_iterator").TokenIterator,f=e("../range").Range,l=function(){this.HighlightRules=i};(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function w(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var i=t.doc,s=!0,o=!0,a=Infinity,f=t.getTabSize(),l=!1;if(!this.lineCommentStart){if(!this.blockComment)return!1;var c=this.blockComment.start,h=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+u.escapeRegExp(c)+")"),d=new RegExp("(?:"+u.escapeRegExp(h)+")\\s*$"),v=function(e,t){if(g(e,t))return;if(!s||/\S/.test(e))i.insertInLine({row:t,column:e.length},h),i.insertInLine({row:t,column:a},c)},m=function(e,t){var n;(n=e.match(d))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(p))&&i.removeInLine(t,n[1].length,n[0].length)},g=function(e,n){if(p.test(e))return!0;var r=t.getTokens(n);for(var i=0;i<r.length;i++)if(r[i].type==="comment")return!0}}else{if(Array.isArray(this.lineCommentStart))var p=this.lineCommentStart.map(u.escapeRegExp).join("|"),c=this.lineCommentStart[0];else var p=u.escapeRegExp(this.lineCommentStart),c=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),l=t.getUseSoftTabs();var m=function(e,t){var n=e.match(p);if(!n)return;var r=n[1].length,s=n[0].length;!b(e,r,s)&&n[0][s-1]==" "&&s--,i.removeInLine(t,r,s)},y=c+" ",v=function(e,t){if(!s||/\S/.test(e))b(e,a,a)?i.insertInLine({row:t,column:a},y):i.insertInLine({row:t,column:a},c)},g=function(e,t){return p.test(e)},b=function(e,t,n){var r=0;while(t--&&e.charAt(t)==" ")r++;if(r%f!=0)return!1;var r=0;while(e.charAt(n++)==" ")r++;return f>2?r%f!=f-1:r%f==0}}var E=Infinity;w(function(e,t){var n=e.search(/\S/);n!==-1?(n<a&&(a=n),o&&!g(e,t)&&(o=!1)):E>e.length&&(E=e.length)}),a==Infinity&&(a=E,s=!1,o=!1),l&&a%f!=0&&(a=Math.floor(a/f)*f),w(o?m:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(!i)return;!i.start&&i[0]&&(i=i[0]);var s=new a(t,r.row,r.column),o=s.getCurrentToken(),u=t.selection,l=t.selection.toOrientedRange(),c,h;if(o&&/comment/.test(o.type)){var p,d;while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.start);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;p=new f(m,g,m,g+i.start.length);break}o=s.stepBackward()}var s=new a(t,r.row,r.column),o=s.getCurrentToken();while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.end);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;d=new f(m,g,m,g+i.end.length);break}o=s.stepForward()}d&&t.remove(d),p&&(t.remove(p),c=p.start.row,h=-i.start.length)}else h=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==c&&(l.start.column+=h),l.end.row==c&&(l.end.column+=h),t.selection.fromOrientedRange(l)},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(var t=0;t<n.length;t++)(function(e){var r=n[t],i=e[r];e[n[t]]=function(){return this.$delegator(r,arguments,i)}})(this)},this.$delegator=function(e,t,n){var r=t[0];typeof r!="string"&&(r=r[0]);for(var i=0;i<this.$embeds.length;i++){if(!this.$modes[this.$embeds[i]])continue;var s=r.split(this.$embeds[i]);if(!s[0]&&s[1]){t[0]=s[1];var o=this.$modes[this.$embeds[i]];return o[e].apply(o,t)}}var u=n.apply(this,t);return n?u:undefined},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var o in s)if(s[o][t]){var u=s[o][t].apply(this,arguments);if(u)return u}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t){var i=t[r];for(var s=0,o=i.length;s<o;s++)if(typeof i[s].token=="string")/keyword|support|storage/.test(i[s].token)&&n.push(i[s].regex);else if(typeof i[s].token=="object")for(var u=0,a=i[s].token.length;u<a;u++)if(/keyword|support|storage/.test(i[s].token[u])){var r=i[s].regex.match(/\(.+?\)/g)[u];n.push(r.substr(1,r.length-2))}}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){var i=this.$keywordList||this.$createKeywordList();return i.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),t.Mode=l}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function t(t,n,r){var i=t.action=="insert",s=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),u=t.start,a=i?u:t.end;return e(n,u,r)?{row:n.row,column:n.column}:e(a,n,!r)?{row:n.row+s,column:n.column+(n.row==a.row?o:0)}:{row:u.row,column:u.column}}r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,s),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new u(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=new o(i,s,u,a),l=this.$lines.slice(e,t+1);return this.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e)},this.$splitAndapplyLargeDelta=function(e,t){var n=e.lines,r=n.length,i=e.start.row,s=e.start.column,o=0,u=0;do{o=u,u+=t-1;var a=n.slice(o,u);if(u>r){e.lines=a,e.start.row=i+o,e.start.column=s;break}a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}while(!0)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(a.prototype),t.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(!n.running)return;var e=new Date,t=n.currentLine,r=-1,i=n.doc,s=t;while(n.lines[t])t++;var o=i.getLength(),u=0;n.running=!1;while(t<o){n.$tokenizeRow(t),r=t;do t++;while(n.lines[t]);u++;if(u%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,r==-1&&(r=t),s<=r&&n.fireUpdateEvent(s,r)}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.lines[t]=null;else if(e.action=="remove")this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(s.prototype),t.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},this.update=function(e,t,n,i){if(!this.regExp)return;var o=i.firstRow,u=i.lastRow;for(var a=o;a<=u;a++){var f=this.cache[a];f==null&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new s(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:"");for(var l=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f<i.length;f++){s=i[f],o=s.range.compareStart(t,n);if(o==-1){e(null,t,n,r,a);return}u=e(null,s.start.row,s.start.column,r,a),u=!u&&e(s.placeholder,s.start.row,s.start.column,r);if(u||o===0)return;a=!s.sameRow,r=s.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){var n,r;for(var i=0;i<this.folds.length;i++){n=this.folds[i],r=n.range.compareEnd(e,t);if(r==-1)return{fold:n,kind:"after"};if(r===0)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,s;if(r){i=r.fold;if(r.kind=="inside"&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){s=this.folds;var o=s.indexOf(i);o===0&&(this.start.column+=n);for(o;o<s.length;o++){i=s[o],i.start.column+=n;if(!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||n.kind=="inside")return null;var r=n.fold,s=this.folds,o=this.foldData,u=s.indexOf(r),a=s[u-1];this.end.row=a.end.row,this.end.column=a.end.column,s=s.splice(u,s.length-u);var f=new i(o,s);return o.splice(o.indexOf(this)+1,0,f),f},this.merge=function(e){var t=e.folds;for(var n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){var t=0;for(var n=0;n<this.folds.length;n++){var r=this.folds[n];e-=r.start.column-t;if(e<0)return{row:r.start.row,column:r.start.column+e};e-=r.placeholder.length;if(e<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range,i=r.comparePoints,s=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){var r=this.ranges;for(var s=n||0;s<r.length;s++){var o=r[s],u=i(e,o.end);if(u>0)continue;var a=i(e,o.start);return u===0?t&&a!==0?-s-2:s:a>0||a===0&&!t?s:-s-1}return-s-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});var n=t[0],r;for(var s=1;s<t.length;s++){r=n,n=t[s];var o=i(r.end,n.start);if(o<0)continue;if(o==0&&!r.isEmpty()&&!n.isEmpty())continue;i(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(s,1),e.push(n),n=r,s--}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);var s=[];for(var o=r;o<i;o++)s.push(n[o]);return s},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){if(!this.session)return;this.session.removeListener("change",this.onChange),this.session=null},this.$onChange=function(e){if(e.action=="insert")var t=e.start,n=e.end;else var n=e.start,t=e.end;var r=t.row,i=n.row,s=i-r,o=-t.column+n.column,u=this.ranges;for(var a=0,f=u.length;a<f;a++){var l=u[a];if(l.end.row<r)continue;if(l.start.row>r)break;l.start.row==r&&l.start.column>=t.column&&(l.start.column!=t.column||!this.$insertRight)&&(l.start.column+=o,l.start.row+=s);if(l.end.row==r&&l.end.column>=t.column){if(l.end.column==t.column&&this.$insertRight)continue;l.end.column==t.column&&o>0&&a<f-1&&l.end.column>l.start.column&&l.end.column==u[a+1].start.column&&(l.end.column-=o),l.end.column+=o,l.end.row+=s}}if(s!=0&&a<f)for(;a<f;a++){var l=u[a];l.start.row+=s,l.end.row+=s}}}).call(s.prototype),t.RangeList=s}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";function u(e,t){e.row-=t.row,e.row==0&&(e.column-=t.column)}function a(e,t){u(e.start,t),u(e.end,t)}function f(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row}function l(e,t){f(e.start,t),f(e.end,t)}var r=e("../range").Range,i=e("../range_list").RangeList,s=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};s.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(this.range.isEqual(e))return;if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);a(e,this.start);var t=e.start.row,n=e.start.column;for(var r=0,i=-1;r<this.subFolds.length;r++){i=this.subFolds[r].range.compare(t,n);if(i!=1)break}var s=this.subFolds[r];if(i==0)return s.addSubFold(e);var t=e.range.end.row,n=e.range.end.column;for(var o=r,i=-1;o<this.subFolds.length;o++){i=this.subFolds[o].range.compare(t,n);if(i!=1)break}var u=this.subFolds[o];if(i==0)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);var f=this.subFolds.splice(r,o-r,e);return e.setFoldLine(this.foldLine),e},this.restoreRange=function(e){return l(e,this.start)}}.call(o.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";function u(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;var i=r.folds;for(var s=0;s<i.length;s++){var o=i[s];if(o.range.contains(e,t)){if(n==1&&o.range.isEnd(e,t))continue;if(n==-1&&o.range.isStart(e,t))continue;return o}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<r.length;s++){var o=r[s].range.compareRange(e);if(o==2)continue;if(o==-2)break;var u=r[s].folds;for(var a=0;a<u.length;a++){var f=u[a];o=f.range.compareRange(e);if(o==-2)break;if(o==2)continue;if(o==42)break;i.push(f)}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){var e=[],t=this.$foldData;for(var n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){r=r||this.getFoldLine(e);if(!r)return null;var i={end:{column:0}},s,o;for(var u=0;u<r.folds.length;u++){o=r.folds[u];var a=o.range.compareEnd(e,t);if(a==-1){s=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}if(a===0)return null;i=o}return s||(s=this.getLine(o.start.row).substring(i.end.column)),n==-1?s.substring(0,t-i.end.column):n==1?s.substring(t-i.end.column):s},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i<n.length;i++){var s=n[i],o=s.end.row,u=s.start.row;if(o>=t){u<t&&(u>=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:(o=new s(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column;if(u<f||u==f&&a<=l-2){var c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);c&&!c.range.isStart(u,a)&&this.removeFold(c),h&&!h.range.isEnd(f,l)&&this.removeFold(h);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){o.addSubFold(e)}));for(var d=0;d<n.length;d++){var v=n[d];if(f==v.start.row){v.addFold(o),r=!0;break}if(u==v.end.row){v.addFold(o),r=!0;if(!o.sameRow){var m=n[d+1];if(m&&m.start.row==f){v.merge(m);break}}break}if(f<=v.start.row)break}return r||(v=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(v.start.row,v.start.row):this.$updateRowLengthCache(v.start.row,v.start.row),this.$modified=!0,this._signal("changeFold",{data:o,action:"add"}),o}throw new Error("The range has to be at least 2 characters width")},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,s=t.folds;if(s.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);s=o.folds,s.shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){var t=[];for(var n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;e==null?(n=new r(0,0,this.getLength(),0),t=!0):typeof e=="number"?n=new r(e,0,e,this.getLine(e).length):"row"in e?n=r.fromPoints(e,e):n=e,i=this.getFoldsInRangeList(n);if(t)this.removeFolds(i);else{var s=i;while(s.length)this.expandFolds(s),s=this.getFoldsInRangeList(n)}if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row),i==null&&(i=0),t==null&&(t=e.end.row),n==null&&(n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(t<r)return;if(t==r){if(n<i)return;u=Math.max(i,u)}e!=null?o+=e:o+=s.getLine(t).substring(u,n)},t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(!i){var s;return s=this.doc.getLine(e),s.substring(r||0,t||s.length)}return this.getFoldDisplayLine(i,e,t,n,r)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection,n=t.getRange(),r,i;if(n.isEmpty()){var s=n.start;r=this.getFoldAt(s.row,s.column);if(r){this.expandFold(r);return}(i=this.findMatchingBracket(s))?n.comparePoint(i)==1?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(n.comparePoint(i)==1?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(s.row,s.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length){this.expandFolds(o);return}o.length==1&&(r=o[0])}r||(r=this.getFoldAt(n.start.row,n.start.column));if(r&&r.range.toString()==n.toString()){this.expandFold(r);return}var u="...";if(!n.isMultiLine()){u=this.getTextRange(n);if(u.length<4)return;u=u.trim().substring(0,2)+".."}this.addFold(u,n)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),s=i.getCurrentToken(),u=s.type;if(s&&/^comment|string/.test(u)){u=u.match(/comment|string/)[0],u=="comment"&&(u+="|doc-start");var a=new RegExp(u),f=new r;if(n!=1){do s=i.stepBackward();while(s&&a.test(s.type));i.stepForward()}f.start.row=i.getCurrentTokenRow(),f.start.column=i.getCurrentTokenColumn()+2,i=new o(this,e,t);if(n!=-1){var l=-1;do{s=i.stepForward();if(l==-1){var c=this.getState(i.$row);a.test(c)||(l=i.$row)}else if(i.$row>l)break}while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return f.end.row=i.getCurrentTokenRow(),f.end.column=i.getCurrentTokenColumn()+s.value.length-2,f}},this.foldAll=function(e,t,n){n==undefined&&(n=1e5);var r=this.foldWidgets;if(!r)return;t=t||this.getLength(),e=e||0;for(var i=e;i<t;i++){r[i]==null&&(r[i]=this.getFoldWidget(i));if(r[i]!="start")continue;var s=this.getFoldWidgetRange(i);if(s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e){i=s.end.row;try{var o=this.addFold("...",s);o&&(o.collapseChildren=n)}catch(u){}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle==e)return;this.$foldStyle=e,e=="manual"&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)},this.$setFolding=function(e){if(this.$foldMode==e)return;this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation");if(!e||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};var r=e-1,i;while(r>=0){var s=n[r];s==null&&(s=n[r]=this.getFoldWidget(r));if(s=="start"){var o=this.getFoldWidgetRange(r);i||(i=o);if(o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);if(!r){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(!this.getFoldWidget)return;var n=this.getFoldWidget(e),r=this.getLine(e),i=n==="end"?-1:1,s=this.getFoldAt(e,i===-1?0:r.length,i);if(s)return t.children||t.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()){s=this.getFoldAt(o.start.row,o.start.column,1);if(s&&o.isEqual(s.range))return this.removeFold(s),s}if(t.siblings){var u=this.getParentFoldRangeData(e);if(u.range)var a=u.range.start.row+1,f=u.range.end.row;this.foldAll(a,f,t.all?1e4:0)}else t.children?(f=o?o.end.row:this.getLength(),this.foldAll(e+1,f,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(n)return;var r=this.getParentFoldRangeData(t,!0);n=r.range||r.firstRange;if(n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.foldWidgets[t]=null;else if(e.action=="remove")this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator;t.Folding=u}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a<l){var c=f.charAt(a);if(c==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else c==e&&(s+=1);a+=1}do u=o.stepForward();while(u&&!n.test(u.type));if(u==null)break;a=0}return null}}var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=s}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./bidihandler").BidiHandler,o=e("./config"),u=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,f=e("./mode/text").Mode,l=e("./range").Range,c=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,d=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++d.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof e!="object"||!e.getLine)e=new c(e);this.$bidiHandler=new s(this),this.setDocument(e),this.selection=new a(this),o.resetOptions(this),this.setMode(t),o._signal("session",this)};d.$uid=0,function(){function m(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}r.implement(this,u),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t<s))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!e.ignore&&(this.$deltasDoc.push(e),t&&t.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null){var s=n.length-1;i=this.getLine(e).length}else for(var s=0;s<n.length;s++){i+=n[s].value.length;if(i>=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},this.setUndoManager=function(e){this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){t===undefined&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,s={range:e,type:n||"line",renderer:typeof n=="function"?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=s,this._signal("changeFrontMarker")):(this.$backMarkers[i]=s,this._signal("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(!e.update)return;var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(!t)return;var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){typeof t!="number"&&(n=t,t=e),n||(n="ace_step");var i=new l(e,0,t,Infinity);return i.id=this.addMarker(i,n,"fullLine",r),i},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(o<n.length&&n.charAt(o).match(i))o++;return new l(e,s,e,o)},this.getAWordRange=function(e,t){var n=this.getWordRange(e,t),r=this.getLine(n.end.row);while(r.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&typeof e=="object"){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new f);if(this.$modes[r]&&!n){this.$onChangeMode(this.$modes[r]),t&&t();return}this.$modeId=r,o.loadModule(["mode",r],function(e){if(this.$modeId!==r)return t&&t();this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){t||(this.$modeId=e.$id);if(this.$mode===e)return;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(n.addEventListener!==undefined){var r=this.onReloadTokenizer.bind(this);n.addEventListener("update",r)}if(!this.bgTokenizer){this.bgTokenizer=new h(n);var i=this;this.bgTokenizer.addEventListener("update",function(e){i._signal("tokenizerUpdate",e)})}else this.bgTokenizer.setTokenizer(n);this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){o.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){if(this.$scrollTop===e||isNaN(e))return;this.$scrollTop=e,this._signal("changeScrollTop",e)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){if(this.$scrollLeft===e||isNaN(e))return;this.$scrollLeft=e,this._signal("changeScrollLeft",e)},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;a<u;a++){if(a>o){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=e.length-1;r!=-1;r--){var i=e[r];i.group=="doc"?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=0;r<e.length;r++){var i=e[r];i.group=="doc"&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function r(e){return t?e.action!=="insert":e.action==="insert"}var i=e[0],s,o,u=!1;r(i)?(s=l.fromPoints(i.start,i.end),u=!0):(s=l.fromPoints(i.start,i.start),u=!1);for(var a=1;a<e.length;a++)i=e[a],r(i)?(o=i.start,s.compare(o.row,o.column)==-1&&s.setStart(o),o=i.end,s.compare(o.row,o.column)==1&&s.setEnd(o),u=!0):(o=i.start,s.compare(o.row,o.column)==-1&&(s=l.fromPoints(i.start,i.start)),u=!1);if(n!=null){l.comparePoints(n.start,s.start)===0&&(n.start.column+=s.end.column-s.start.column,n.end.column+=s.end.column-s.start.column);var f=n.compareRange(s);f==1?s.setStart(n.start):f==-1&&s.setEnd(n.end)}return s},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),s=l.fromPoints(t,t);if(!n){this.remove(e);var o=e.start.row-e.end.row,u=o?-e.end.column:e.start.column-e.end.column;u&&(s.start.row==e.end.row&&s.start.column>e.end.column&&(s.start.column+=u),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=u)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}s.end=this.insert(s.start,r);if(i.length){var a=e.start,f=s.start,o=f.row-a.row,u=f.column-a.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=o,e.end.row+=o,e}))}return s},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r;++o)if(s.charAt(o)!=" ")break;o<r&&s.charAt(o)==" "?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},this.$moveLines=function(e,t,n){e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t);if(n<0){var r=this.getRowFoldStart(e+n);if(r<0)return 0;var i=r-e}else if(n>0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var s=new l(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),u=n==0?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,u),o.length&&this.addFolds(o),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode")},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,s=r.row,o=i.row,u=o-s,a=null;this.$updating=!0;if(u!=0)if(n==="remove"){this[t?"$wrapData":"$rowLengthCache"].splice(s,u);var f=this.$foldData;a=this.getFoldsInRange(e),this.removeFolds(a);var l=this.getFoldLine(i.row),c=0;if(l){l.addRemoveChars(i.row,i.column,r.column-i.column),l.shiftRow(-u);var h=this.getFoldLine(s);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=i.row&&l.shiftRow(-u)}o=s}else{var p=Array(u);p.unshift(s,0);var d=t?this.$wrapData:this.$rowLengthCache;d.splice.apply(d,p);var f=this.$foldData,l=this.getFoldLine(s),c=0;if(l){var v=l.range.compareInside(r.row,r.column);v==0?(l=l.split(r.row,r.column),l&&(l.shiftRow(u),l.addRemoveChars(o,0,i.column-r.column))):v==-1&&(l.addRemoveChars(s,0,i.column-r.column),l.shiftRow(u)),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=s&&l.shiftRow(u)}}else{u=Math.abs(e.start.column-e.end.column),n==="remove"&&(a=this.getFoldsInRange(e),this.removeFolds(a),u=-u);var l=this.getFoldLine(s);l&&l.addRemoveChars(s,r.column,u)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),a},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var r=this.doc.getAllLines(),i=this.getTabSize(),o=this.$wrapData,u=this.$wrapLimit,a,f,l=e;t=Math.min(t,r.length-1);while(l<=t)f=this.getFoldLine(l,f),f?(a=[],f.walk(function(e,t,i,o){var u;if(e!=null){u=this.$getDisplayTokens(e,a.length),u[0]=n;for(var f=1;f<u.length;f++)u[f]=s}else u=this.$getDisplayTokens(r[t].substring(o,i),a.length);a=a.concat(u)}.bind(this),f.end.row,r[f.end.row].length+1),o[f.start.row]=this.$computeWrapSplits(a,u,i),l=f.end.row+1):(a=this.$getDisplayTokens(r[l]),o[l]=this.$computeWrapSplits(a,u,i),l++)};var e=1,t=2,n=3,s=4,a=9,c=10,d=11,v=12;this.$computeWrapSplits=function(e,r,i){function g(){var t=0;if(m===0)return t;if(p)for(var n=0;n<e.length;n++){var r=e[n];if(r==c)t+=1;else{if(r!=d){if(r==v)continue;break}t+=i}}return h&&p!==!1&&(t+=i),Math.min(t,m)}function y(t){var n=e.slice(f,t),r=n.length;n.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),o.length||(b=g(),o.indent=b),l+=r,o.push(l),f=t}if(e.length==0)return[];var o=[],u=e.length,f=0,l=0,h=this.$wrapAsCode,p=this.$indentedSoftWrap,m=r<=Math.max(2*i,8)||p===!1?0:Math.floor(r/2),b=0;while(u-f>r-b){var w=f+r-b;if(e[w-1]>=c&&e[w]>=c){y(w);continue}if(e[w]==n||e[w]==s){for(w;w!=f-1;w--)if(e[w]==n)break;if(w>f){y(w);continue}w=f+r;for(w;w<e.length;w++)if(e[w]!=s)break;if(w==e.length)break;y(w);continue}var E=Math.max(w-(r-(r>>2)),f-1);while(w>E&&e[w]<n)w--;if(h){while(w>E&&e[w]<n)w--;while(w>E&&e[w]==a)w--}else while(w>E&&e[w]<c)w--;if(w>E){y(++w);continue}w=f+r,e[w]==t&&w--,y(w-b)}return o},this.$getDisplayTokens=function(n,r){var i=[],s;r=r||0;for(var o=0;o<n.length;o++){var u=n.charCodeAt(o);if(u==9){s=this.getScreenTabSize(i.length+r),i.push(d);for(var f=1;f<s;f++)i.push(v)}else u==32?i.push(c):u>39&&u<48||u>57&&u<64?i.push(a):u>=4352&&m(u)?i.push(e,t):i.push(e)}return i},this.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i<e.length;i++){r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&m(r)?n+=2:n+=1;if(n>t)break}return[n,i]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:undefined},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,i=0,s=0,o,u=0,a=0,f=this.$screenRowCache,l=this.$getRowCacheIndex(f,e),c=f.length;if(c&&l>=0)var u=f[l],i=this.$docRowCache[l],h=e>f[c-1];else var h=!c;var p=this.getLength()-1,d=this.getNextFoldLine(i),v=d?d.start.row:Infinity;while(u<=e){a=this.getRowLength(i);if(u+a>e||i>=p)break;u+=a,i++,i>v&&(i=d.end.row+1,d=this.getNextFoldLine(i,d),v=d?d.start.row:Infinity),h&&(this.$docRowCache.push(i),this.$screenRowCache.push(u))}if(d&&d.start.row<=i)r=this.getFoldDisplayLine(d),i=d.start.row;else{if(u+a<=e||i>p)return{row:p,column:this.getLine(p).length};r=this.getLine(i),d=null}var m=0,g=Math.floor(e-u);if(this.$useWrapMode){var y=this.$wrapData[i];y&&(o=y[g],g>0&&y.length&&(m=y.indent,s=y[g-1]||y[y.length-1],r=r.substring(s)))}return n!==undefined&&this.$bidiHandler.isBidiRow(u+g,i,g)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),d?d.idxToPosition(s):{row:i,column:s}},this.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u<e){if(u>=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);var v=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){var g=0;while(d.length>=m[g])r++,g++;d=d.substring(m[g-1]||0,d.length),v=g>0?m.indent:0}}return{row:r,column:v+this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;r<n.length;r++)t=n[r],e-=t.end.row-t.start.row}else{var i=this.$wrapData.length,s=0,r=0,t=this.$foldData[r++],o=t?t.start.row:Infinity;while(s<i){var u=this.$wrapData[s];e+=u?u.length+1:1,s++,s>o&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){if(!this.$enableVarChar)return;this.$getStringScreenWidth=function(t,n,r){if(n===0)return[0,0];n||(n=Infinity),r=r||0;var i,s;for(s=0;s<t.length;s++){i=t.charAt(s),i===" "?r+=this.getScreenTabSize(r):r+=e.getCharacterWidth(i);if(r>n)break}return[r,s]}},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=m}.call(d.prototype),e("./edit_session/folding").Folding.call(d.prototype),e("./edit_session/bracket_match").BracketMatch.call(d.prototype),o.defineOptions(d.prototype,"session",{wrap:{set:function(e){!e||e=="off"?e=!1:e=="free"?e=!0:e=="printMargin"?e=-1:typeof e=="string"&&(e=parseInt(e,10)||!1);if(this.$wrap==e)return;this.$wrap=e;if(!e)this.setUseWrapMode(!1);else{var t=typeof e=="number"?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e=e=="auto"?this.$mode.type!="text":e!="text",e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){if(isNaN(e)||this.$tabSize===e)return;this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize")},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=d}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function u(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,o){return r=new s(e,n,i,o),n==o&&t.start&&t.start.start&&t.skipCurrent!=0&&r.isEqual(t.start)?(r=null,!1):!0}),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a,l;e:for(var c=u.offset||0;c<=f;c++){for(var h=0;h<a;h++)if(i[c+h].search(u[h])==-1)continue e;var p=i[c],d=i[c+a-1],v=p.length-p.match(u[0])[0].length,m=d.match(u[a-1])[0].length;if(l&&l.end.row===c&&l.end.column>v)continue;o.push(l=new s(c,v,c+a-1,m)),a>2&&(c=c+a-2)}}else for(var g=0;g<i.length;g++){var y=r.getMatchOffsets(i[g],u);for(var h=0;h<y.length;h++){var b=y[h];o.push(new s(g,b.offset,g,b.offset+b.length))}}if(n){var w=n.start.column,E=n.start.column,g=0,h=o.length-1;while(g<h&&o[g].start.column<w&&o[g].start.row==n.start.row)g++;while(g<h&&o[h].end.column>E&&o[h].end.row==n.end.row)h--;o=o.slice(g,h+1);for(g=0,h=o.length;g<h;g++)o[g].start.row+=n.start.row,o[g].end.row+=n.start.row}return o},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=r.exec(e);if(!i||i[0].length!=e.length)return null;t=e.replace(r,t);if(n.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n)),e.wholeWord&&(n=u(n,e));var i=e.caseSensitive?"gm":"gmi";e.$isMultiLine=!t&&/[\n\r]/.test(n);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var s=new RegExp(n,i)}catch(o){s=!1}return e.re=s},this.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[];for(var i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(s){return!1}return r},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var r=t.backwards==1,i=t.skipCurrent!=0,s=t.range,o=t.start;o||(o=s?s[r?"end":"start"]:e.selection.getRange()),o.start&&(o=o[i!=r?"end":"start"]);var u=s?s.start.row:0,a=s?s.end.row:e.getLength()-1;if(r)var f=function(e){var n=o.row;if(c(n,o.column,e))return;for(n--;n>=u;n--)if(c(n,Number.MAX_VALUE,e))return;if(t.wrap==0)return;for(n=a,u=o.row;n>=u;n--)if(c(n,Number.MAX_VALUE,e))return};else var f=function(e){var n=o.row;if(c(n,o.column,e))return;for(n+=1;n<=a;n++)if(c(n,0,e))return;if(t.wrap==0)return;for(n=u,a=o.row;n<=a;n++)if(c(n,0,e))return};if(t.$isMultiLine)var l=n.length,c=function(t,i,s){var o=r?t-l+1:t;if(o<0)return;var u=e.getLine(o),a=u.search(n[0]);if(!r&&a<i||a===-1)return;for(var f=1;f<l;f++){u=e.getLine(o+f);if(u.search(n[f])==-1)return}var c=u.match(n[l-1])[0].length;if(r&&c>i)return;if(s(o,a,o+l-1,c))return!0};else if(r)var c=function(t,r,i){var s=e.getLine(t),o=[],u,a=0;n.lastIndex=0;while(u=n.exec(s)){var f=u[0].length;a=u.index;if(!f){if(a>=s.length)break;n.lastIndex=a+=1}if(u.index+f>r)break;o.push(u.index,f)}for(var l=o.length-1;l>=0;l-=2){var c=o[l-1],f=o[l];if(i(t,c,t,c+f))return!0}};else var c=function(t,r,i){var s=e.getLine(t),o,u=r;n.lastIndex=r;while(o=n.exec(s)){var a=o[0].length;u=o.index;if(i(t,u,t,u+a))return!0;if(!a){n.lastIndex=u+=1;if(u>=s.length)return!1}}};return{forEach:f}}}).call(o.prototype),t.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function o(e,t){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function u(e,t){o.call(this,e,t),this.$singleCommand=!1}var r=e("../lib/keys"),i=e("../lib/useragent"),s=r.KEY_MODS;u.prototype=o.prototype,function(){function e(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&(typeof e=="string"?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var s=r[i];if(s==e)delete r[i];else if(Array.isArray(s)){var o=s.indexOf(e);o!=-1&&(s.splice(o,1),s.length==1&&(r[i]=s[0]))}}},this.bindKey=function(e,t,n){typeof e=="object"&&e&&(n==undefined&&(n=e.position),e=e[this.platform]);if(!e)return;if(typeof t=="function")return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split("|").forEach(function(e){var r="";if(e.indexOf(" ")!=-1){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),u=s[o.hashId]+o.key;this._addCommandToBinding(r+u,t,n)},this)},this._addCommandToBinding=function(t,n,r){var i=this.commandKeyBinding,s;if(!n)delete i[t];else if(!i[t]||this.$singleCommand)i[t]=n;else{Array.isArray(i[t])?(s=i[t].indexOf(n))!=-1&&i[t].splice(s,1):i[t]=[i[t]],typeof r!="number"&&(r=e(n));var o=i[t];for(s=0;s<o.length;s++){var u=o[s],a=e(u);if(a>r)break}o.splice(s,0,n)}},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(!n)return;if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n});if(typeof n!="object")return;n.name||(n.name=t),this.addCommand(n)},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=r.KEY_MODS[t[o]];if(u==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=u}return{key:n,hashId:s}},this.findKeyCommand=function(t,n){var r=s[t]+n;return this.commandKeyBinding[r]},this.handleKeyboard=function(e,t,n,r){if(r<0)return;var i=s[t]+n,o=this.commandKeyBinding[i];e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o);if(o)if(o=="chainKeys"||o[o.length-1]=="chainKeys")return e.$keyChain=e.$keyChain||i,{command:"null"};if(e.$keyChain)if(!!t&&t!=4||n.length!=1){if(t==-1||r>0)e.$keyChain=""}else e.$keyChain=e.$keyChain.slice(0,-i.length-1);return{command:o}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(o.prototype),t.HashHandler=o,t.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,o=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(o,i),function(){r.implement(this,s),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}typeof e=="string"&&(e=this.commands[e]);if(!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),i.returnValue===!1?!1:!0},this.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),t.CommandManager=o}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function o(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:o("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:o("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:o("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:o(null,null),exec:function(e){var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,u=e.session.doc.getTextRange(e.selection.getRange()),a=u.replace(/\n\s*/," ").length,f=e.session.doc.getLine(n.row);for(var l=n.row+1;l<=i.row+1;l++){var c=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));c.length!==0&&(c=" "+c),f+=c}i.row+1<e.session.doc.getLength()-1&&(f+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(n.row,0,i.row+2,0),f),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o<r.length;o++)o==r.length-1&&(r[o].end.row!==t||r[o].end.column!==n)&&i.push(new s(r[o].end.row,r[o].end.column,t,n)),o===0?(r[o].start.row!==0||r[o].start.column!==0)&&i.push(new s(0,0,r[o].start.row,r[o].start.column)):i.push(new s(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<i.length;o++)e.selection.addRange(i[o],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),o=e("./lib/useragent"),u=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,f=e("./mouse/fold_handler").FoldHandler,l=e("./keyboard/keybinding").KeyBinding,c=e("./edit_session").EditSession,h=e("./search").Search,p=e("./range").Range,d=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,g=e("./config"),y=e("./token_iterator").TokenIterator,b=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.id="editor"+ ++b.$uid,this.commands=new v(o.isMac?"mac":"win",m),typeof document=="object"&&(this.textInput=new u(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new f(this)),this.keyBinding=new l(this),this.$blockScrolling=0,this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new c("")),g.resetOptions(this),g._signal("editor",this)};b.$uid=0,function(){r.implement(this,d),this.$initOperationListeners=function(){function e(e){return e[e.length-1]}this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&this.curOp.command.scrollIntoView!==undefined&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:}n=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(!this.$mergeUndoDeltas)return;var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if(e.command.name=="insertstring"){var i=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())},this.setKeyboardHandler=function(e,t){if(e&&typeof e=="string"){this.$keybindingId=e;var n=this;g.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session==e)return;this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(!t||!t.bgTokenizer)return;var n=t.findMatchingBracket(e.getCursorPosition());if(n)var r=new p(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var r=t.$mode.getMatching(e.session);r&&(t.$bracketHighlight=t.addMarker(r,"ace_bracket","text"))},50)},this.$highlightTags=function(){if(this.$highlightTagPending)return;var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(!t||!t.bgTokenizer)return;var n=e.getCursorPosition(),r=new y(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type)){t.removeMarker(t.$tagHighlight),t.$tagHighlight=null;return}if(i.type.indexOf("tag-open")!=-1){i=r.stepForward();if(!i)return}var s=i.value,o=0,u=r.stepBackward();if(u.value=="<"){do u=i,i=r.stepForward(),i&&i.value===s&&i.type.indexOf("tag-name")!==-1&&(u.value==="<"?o++:u.value==="</"&&o--);while(i&&o>=0)}else{do i=u,u=r.stepBackward(),i&&i.value===s&&i.type.indexOf("tag-name")!==-1&&(u.value==="<"?o++:u.value==="</"&&o--);while(u&&o<=0);r.stepForward()}if(!i){t.removeMarker(t.$tagHighlight),t.$tagHighlight=null;return}var a=r.getCurrentTokenRow(),f=r.getCurrentTokenColumn(),l=new p(a,f,a,f+i.value.length),c=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&c!=undefined&&l.compareRange(c.range)!==0&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),l&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(l,"ace_bracket","text"))},50)},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e)},this.onBlur=function(e){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e)},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:Infinity;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(g.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine){if(this.$selectionStyle!="line"||!this.selection.isMultiLine())t=this.getCursorPosition();this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(t=!1)}if(e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,Infinity);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),s=i.length,o=i.substring(Math.max(n,0),Math.min(r,s));if(n>=0&&/^[\w\d]/.test(o)||r<=s&&/[\w\d]$/.test(o))return;o=i.substring(t.start.column,t.end.column);if(!/^[\w\d]+$/.test(o))return;var u=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o});return u},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){typeof e=="string"&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var i=r.length;i--;){var s=r[i];s.isEmpty()||this.session.remove(s),this.session.insert(s.start,n[i])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var s=r.transformAction(n.getState(i.row),"insertion",this,n,e);s&&(e!==s.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=s.text)}e==" "&&(e=this.session.getTabString());if(!this.selection.isEmpty()){var o=this.getSelectionRange();i=this.session.remove(o),this.clearSelection()}else if(this.session.getOverwrite()&&e.indexOf("\n")==-1){var o=new p.fromPoints(i,i);o.end.column+=e.length,this.session.remove(o)}if(e=="\n"||e=="\r\n"){var u=n.getLine(i.row);if(i.column>u.search(/\S|$/)){var a=u.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();var f=i.column,l=n.getState(i.row),u=n.getLine(i.row),c=r.checkOutdent(l,u,e),h=n.insert(i,e);s&&s.selection&&(s.selection.length==2?this.selection.setSelectionRange(new p(i.row,f+s.selection[0],i.row,f+s.selection[1])):this.selection.setSelectionRange(new p(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3])));if(n.getDocument().isNewLine(e)){var d=r.getNextLineIndent(l,u.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},d)}c&&r.autoOutdent(l,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(t.end.column===0){var s=n.getTextRange(t);if(s[s.length-1]=="\n"){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new p(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new p(e.row,t-2,e.row,t)),this.session.replace(i,r),this.session.selection.moveToPosition(i.end)},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();e.indentRows(n.first,n.last," ");return}if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();e.indentRows(n.first,n.last," ");return}}var i=e.getLine(t.start.row),o=t.start,u=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var f=u-a%u,l=s.stringRepeat(" ",f);else{var f=a%u;while(i[t.start.column-1]==" "&&f)t.start.column--,f--;this.selection.setSelectionRange(t),l=" "}return this.insert(l)},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last," ")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(var r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var i=new p(0,0,0,0);for(var r=e.first;r<=e.last;r++){var s=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=s.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex<t){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n<o?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),a+=e,a/=Math.pow(10,u);var f=a.toFixed(u),l=new p(t,s.start,t,s.end);this.session.replace(l,f),this.moveCursorTo(t,Math.max(s.start+1,n+f.length-s.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=r?n.start:n.end,o=t.insert(s,t.getTextRange(n),!1);n.start=s,n.end=o,e.setSelectionRange(n,r)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var s=i.toOrientedRange();n=this.$getSelectedRows(s),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),s.moveBy(r,0),i.fromOrientedRange(s)}else{var o=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;var u=0,a=0,f=o.length;for(var l=0;l<f;l++){var c=l;o[l].moveBy(u,0),n=this.$getSelectedRows(o[l]);var h=n.first,p=n.last;while(++l<f){a&&o[l].moveBy(a,0);var d=this.$getSelectedRows(o[l]);if(t&&d.first!=p)break;if(!t&&d.first>p+1)break;p=d.last}l--,u=this.session.$moveLines(h,p,t?0:e),t&&e==-1&&(c=l+1);while(c<=l)o[c].moveBy(u,0),c++;t||(u=0),a+=u}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),s=i||r.stepForward();if(!s)return;var o,u=!1,a={},f=n.column-s.start,l,c={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g))for(;f<s.value.length&&!u;f++){if(!c[s.value[f]])continue;l=c[s.value[f]]+"."+s.type.replace("rparen","lparen"),isNaN(a[l])&&(a[l]=0);switch(s.value[f]){case"(":case"[":case"{":a[l]++;break;case")":case"]":case"}":a[l]--,a[l]===-1&&(o="bracket",u=!0)}}else s&&s.type.indexOf("tag-name")!==-1&&(isNaN(a[s.value])&&(a[s.value]=0),i.value==="<"?a[s.value]++:i.value==="</"&&a[s.value]--,a[s.value]===-1&&(o="tag",u=!0));u||(i=s,s=r.stepForward(),f=0)}while(s&&!u);if(!o)return;var h,d;if(o==="bracket"){h=this.session.getBracketRange(n);if(!h){h=new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+f-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+f-1),d=h.start;if(t||d.row===n.row&&Math.abs(d.column-n.column)<2)h=this.session.getBracketRange(d)}}else if(o==="tag"){if(!s||s.type.indexOf("tag-name")===-1)return;var v=s.value;h=new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2);if(h.compare(n.row,n.column)===0){u=!1;do s=i,i=r.stepBackward(),i&&(i.type.indexOf("tag-close")!==-1&&h.setEnd(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1),s.value===v&&s.type.indexOf("tag-name")!==-1&&(i.value==="<"?a[v]++:i.value==="</"&&a[v]--,a[v]===0&&(u=!0)));while(i&&!u)}s&&s.type.indexOf("tag-name")&&(d=h.start,d.row==n.row&&Math.abs(d.column-n.column)<2&&(d=h.end))}d=h&&h.cursor||d,d&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(d.row,d.column):this.selection.moveTo(d.row,d.column))},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),n!==null&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;this.$blockScrolling+=1;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&r.mixin(t,e);var i=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?i.start=i.end:i.end=i.start,this.selection.setRange(i)},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(!e)return;var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",function(){r=!0}),o=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),u=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,u=s.top-o.offset;s.top>=0&&u+t.top<0?r=!0:s.top<o.height&&s.top+t.top+o.lineHeight>window.innerHeight?r=!1:r=null,r!=null&&(i.style.top=u+"px",i.style.left=s.left+"px",i.style.height=o.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){if(e)return;delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",u),this.renderer.off("beforeRender",o)}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;if(!t)return;t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!="wide",i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e))}}.call(b.prototype),g.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=b}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var r=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines.length==1?null:e.lines,text:e.lines.length==1?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){var n=new Array(e.length);for(var r=0;r<e.length;r++){var i=e[r],s={group:i.group,deltas:new Array(i.length)};for(var o=0;o<i.deltas.length;o++){var u=i.deltas[o];s.deltas[o]=t(u)}n[r]=s}return n}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return this.dirtyCounter===0},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(r.prototype),t.UndoManager=r}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,u=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var o=n.text;o=o?s.escapeHTML(o):n.html||"",i.text.indexOf(o)===-1&&i.text.push(o);var u=n.type;u=="error"?i.className=" ace_error":u=="warning"&&i.className!=" ace_error"?i.className=" ace_warning":u=="info"&&!i.className&&(i.className=" ace_info")}},this.$updateAnnotations=function(e){if(!this.$annotations.length)return;var t=e.start.row,n=e.end.row-t;if(n!==0)if(e.action=="remove")this.$annotations.splice(t,n+1,null);else{var r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}},this.update=function(e){var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),s=t.getNextFoldLine(n),o=s?s.start.row:Infinity,u=this.$showFoldWidgets&&t.foldWidgets,a=t.$breakpoints,f=t.$decorations,l=t.$firstLineNumber,c=0,h=t.gutterRenderer||this.$renderer,p=null,d=-1,v=n;for(;;){v>o&&(v=s.end.row+1,s=t.getNextFoldLine(v,s),o=s?s.start.row:Infinity);if(v>i){while(this.$cells.length>d+1)p=this.$cells.pop(),this.element.removeChild(p.element);break}p=this.$cells[++d],p||(p={element:null,textNode:null,foldWidget:null},p.element=r.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[d]=p);var m="ace_gutter-cell ";a[v]&&(m+=a[v]),f[v]&&(m+=f[v]),this.$annotations[v]&&(m+=this.$annotations[v].className),p.element.className!=m&&(p.element.className=m);var g=t.getRowLength(v)*e.lineHeight+"px";g!=p.element.style.height&&(p.element.style.height=g);if(u){var y=u[v];y==null&&(y=u[v]=t.getFoldWidget(v))}if(y){p.foldWidget||(p.foldWidget=r.createElement("span"),p.element.appendChild(p.foldWidget));var m="ace_fold-widget ace_"+y;y=="start"&&v==o&&v<s.end.row?m+=" ace_closed":m+=" ace_open",p.foldWidget.className!=m&&(p.foldWidget.className=m);var g=e.lineHeight+"px";p.foldWidget.style.height!=g&&(p.foldWidget.style.height=g)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var b=c=h?h.getText(t,v):v+l;b!==p.textNode.data&&(p.textNode.data=b),v++}this.element.style.height=e.minHeight+"px";if(this.$fixedWidth||t.$useWrapMode)c=t.getLength()+l;var w=h?h.getWidth(t,c,e):c.toString().length*e.characterWidth,E=this.$padding||this.$computePadding();w+=E.left+E.right,w!==this.gutterWidth&&!isNaN(w)&&(this.gutterWidth=w,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",w))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return"markers";if(this.$showFoldWidgets&&e.x>n.right-t.right)return"foldWidgets"}}).call(u.prototype),t.Gutter=u}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(!e)return;this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(i.isEmpty())continue;i=i.toScreenRange(this.session);if(r.renderer){var s=this.$getTop(i.start.row,e),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.start.row)?this.session.$bidiHandler.getPosLeft(i.start.column):i.start.column*e.characterWidth);r.renderer(t,i,o,s,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,i,r.clazz,e):r.type=="screenLine"?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type=="text"?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.session.$bidiHandler.isBidiRow(i.start.row)?this.drawBidiSingleLineMarker(t,i,r.clazz+" ace_start"+" ace_br15",e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start"+" ace_br15",e)}this.element.innerHTML=t.join("")},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,n,i,s,o){var u=this.session,a=n.start.row,f=n.end.row,l=a,c=0,h=0,p=u.getScreenLastRowColumn(l),d=null,v=new r(l,n.start.column,l,h);for(;l<=f;l++)v.start.row=v.end.row=l,v.start.column=l==a?n.start.column:u.getRowWrapIndent(l),v.end.column=p,c=h,h=p,p=l+1<f?u.getScreenLastRowColumn(l+1):l==f?0:n.end.column,d=i+(l==a?" ace_start":"")+" ace_br"+e(l==a||l==a+1&&n.start.column,c<h,h>p,l==f),this.session.$bidiHandler.isBidiRow(l)?this.drawBidiSingleLineMarker(t,v,d,s,l==f?0:1,o):this.drawSingleLineMarker(t,v,d,s,l==f?0:1,o)},this.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o,u,a;i=i||"";if(this.session.$bidiHandler.isBidiRow(t.start.row)){var f=t.clone();f.end.row=f.start.row,f.end.column=this.session.getLine(f.start.row).length,this.drawBidiSingleLineMarker(e,f,n+" ace_br1 ace_start",r,null,i)}else o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth,e.push("<div class='",n," ace_br1 ace_start' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",a,"px;",i,"'></div>");if(this.session.$bidiHandler.isBidiRow(t.end.row)){var f=t.clone();f.start.row=f.end.row,f.start.column=0,this.drawBidiSingleLineMarker(e,f,n+" ace_br12",r,null,i)}else{var l=t.end.column*r.characterWidth;o=r.lineHeight,u=this.$getTop(t.end.row,r),e.push("<div class='",n," ace_br12' style='","height:",o,"px;","width:",l,"px;","top:",u,"px;","left:",s,"px;",i,"'></div>")}o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<=0)return;u=this.$getTop(t.start.row+1,r);var c=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",n,c?" ace_br"+c:"","' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",s,"px;",i,"'></div>")},this.drawSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=(t.end.column+(i||0)-t.start.column)*r.characterWidth,a=this.$getTop(t.start.row,r),f=this.$padding+t.start.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",u,"px;","top:",a,"px;","left:",f,"px;",s||"","'></div>")},this.drawBidiSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=this.$getTop(t.start.row,r),a=this.$padding,f=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);f.forEach(function(t){e.push("<div class='",n,"' style='","height:",o,"px;","width:",t.width+(i||0),"px;","top:",u,"px;","left:",a+t.left,"px;",s||"","'></div>")})},this.drawFullLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-s),e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")}}).call(s.prototype),t.Marker=s}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){r.implement(this,u),this.EOF_CHAR="\u00b6",this.EOL_CHAR_LF="\u00ac",this.EOL_CHAR_CRLF="\u00a4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\u00b7",this.$padding=0,this.$updateEolChar=function(){var e=this.session.doc.getNewLineCharacter()=="\n"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+s.stringRepeat(this.TAB_CHAR,n)+"</span>"):t.push(s.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",i="",o="";if(this.showInvisibles){r+=" ace_invisible",i=" ace_invisible_space",o=" ace_invisible_tab";var u=s.stringRepeat(this.SPACE_CHAR,this.tabSize),a=s.stringRepeat(this.TAB_CHAR,this.tabSize)}else var u=s.stringRepeat(" ",this.tabSize),a=u;this.$tabStrings[" "]="<span class='"+r+i+"'>"+u+"</span>",this.$tabStrings[" "]="<span class='"+r+o+"'>"+a+"</span>"}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),s=this.element.childNodes,o=0;for(var u=e.firstRow;u<r;u++){var a=this.session.getFoldLine(u);if(a){if(a.containsRow(r)){r=a.start.row;break}u=a.end.row}o++}var u=r,a=this.session.getNextFoldLine(u),f=a?a.start.row:Infinity;for(;;){u>f&&(u=a.end.row+1,a=this.session.getNextFoldLine(u,a),f=a?a.start.row:Infinity);if(u>i)break;var l=s[o++];if(l){var c=[];this.$renderLine(c,u,!this.$useLineGroups(),u==f?a:!1),l.style.height=e.lineHeight*this.session.getRowLength(u)+"px",l.innerHTML=c.join("")}u++}},this.scrollLines=function(e){var t=this.config;this.config=e;if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var i=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}if(e.lastRow>t.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){var r=this.element.ownerDocument.createDocumentFragment(),s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=i.createElement("div"),f=[];this.$renderLine(f,s,!1,s==u?o:!1),a.innerHTML=f.join("");if(this.$useLineGroups())a.className="ace_line_group",r.appendChild(a),a.style.height=e.lineHeight*this.session.getRowLength(s)+"px";else while(a.firstChild)r.appendChild(a.firstChild);s++}return r},this.update=function(e){this.config=e;var t=[],n=e.firstRow,r=e.lastRow,i=n,s=this.session.getNextFoldLine(i),o=s?s.start.row:Infinity;for(;;){i>o&&(i=s.end.row+1,s=this.session.getNextFoldLine(i,s),o=s?s.start.row:Infinity);if(i>r)break;this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(i),"px'>"),this.$renderLine(t,i,!1,i==o?s:!1),this.$useLineGroups()&&t.push("</div>"),i++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,o=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=function(e,n,r,o,u){if(n)return i.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+s.stringRepeat(i.SPACE_CHAR,e.length)+"</span>":e;if(e=="&")return"&#38;";if(e=="<")return"&#60;";if(e==">")return"&#62;";if(e==" "){var a=i.session.getScreenTabSize(t+o);return t+=a-1,i.$tabStrings[a]}if(e=="\u3000"){var f=i.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",l=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,"<span class='"+f+"' style='width:"+i.config.characterWidth*2+"px'>"+l+"</span>"}return r?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+i.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+i.config.characterWidth*2+"px'>"+e+"</span>")},a=r.replace(o,u);if(!this.$textToken[n.type]){var f="ace_"+n.type.replace(/\./g," ace_"),l="";n.type=="fold"&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",f,"'",l,">",a,"</span>")}else e.push(a);return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:t[0]==" "?(r-=r%this.tabSize,e.push(s.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):t[0]==" "?(e.push(s.stringRepeat(this.$tabStrings[" "],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){var i=0,o=0,u=n[0],a=0;for(var f=0;f<t.length;f++){var l=t[f],c=l.value;if(f==0&&this.displayIndentGuides){i=c.length,c=this.renderIndentGuide(e,c,u);if(!c)continue;i-=c.length}if(i+c.length<u)a=this.$renderToken(e,a,l,c),i+=c.length;else{while(i+c.length>=u)a=this.$renderToken(e,a,l,c.substring(0,u-i)),c=c.substring(u-i),i=u,r||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(s.stringRepeat("\u00a0",n.indent)),o++,a=0,u=n[o]||Number.MAX_VALUE;c.length!=0&&(i+=c.length,a=this.$renderToken(e,a,l,c))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var s=1;s<t.length;s++)r=t[s],i=r.value,n=this.$renderToken(e,n,r,i)},this.$renderLine=function(e,t,n,r){!r&&r!=0&&(r=this.session.getFoldLine(t));if(r)var i=this.$getFoldLineTokens(t,r);else var i=this.session.getTokens(t);n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>");if(i.length){var s=this.session.getRowSplitData(t);s&&s.length?this.$renderWrappedLine(e,i,s,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.length<t){s+=e[i].value.length,i++;if(i==e.length)return}if(s!=t){var o=e[i].value.substring(t-s);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(s<n&&i<e.length){var o=e[i].value;o.length+s>n?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i,s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),i===undefined&&(i=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(i?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){var t=this.cursors;for(var n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){var t=this.cursors;for(var n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&!i&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0);if(!this.isBlinking||!this.blinkInterval||!this.isVisible)return;this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;if(t===undefined||t.length===0)t=[{cursor:null}];for(var n=0,i=t.length;n<i;n++){var s=this.getPixelPosition(t[n].cursor,!0);if((s.top>e.height+e.offset||s.top<0)&&n>1)continue;var o=(this.cursors[r++]||this.addCursor()).style;this.drawCursor?this.drawCursor(o,s,e,t[n],this.session):(o.left=s.left+"px",o.top=s.top+"px",o.width=e.characterWidth+"px",o.height=e.lineHeight+"px")}while(this.cursors.length>r)this.removeCursor();var u=this.session.getOverwrite();this.$setOverwrite(u),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(s.prototype),t.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,u=32768,a=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){r.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var f=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(f,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){this.scrollTop=this.element.scrollTop;if(this.coeff!=1){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>u?(this.coeff=u/e,e=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(f.prototype);var l=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(l,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(l.prototype),t.ScrollBar=f,t.ScrollBarV=f,t.ScrollBarH=l,t.VScrollBar=f,t.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){this.changes=this.changes|e;if(!this.pending&&this.changes){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;var e;while(e=t.changes)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=0,f=t.FontMetrics=function(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),a||this.$testFractionalRect(),this.$measureNode.innerHTML=s.stringRepeat("X",a),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){r.implement(this,u),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=i.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;t>0&&t<1?a=50:a=100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",o.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(a===50){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var n={height:e.height,width:e.width/a}}else var n={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/a};return n.width===0||n.height===0?null:n},this.$measureCharWidth=function(e){this.$main.innerHTML=s.stringRepeat(e,a);var t=this.$main.getBoundingClientRect();return t.width/a},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(f.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./config"),o=e("./lib/useragent"),u=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,f=e("./layer/text").Text,l=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,d=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,m='.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}';i.importCssString(m,"ace_editor.css");var g=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!o.isOldIE,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var r=this.$textLayer=new f(this.content);this.canvas=r.element,this.$markerFront=new a(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new d(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,v),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e);if(!e)return;this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode)},this.updateLines=function(e,t,n){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t};if(this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}if(this.$changedLines.firstRow>this.layerConfig.lastRow)return;this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(this.resizing>2)return;this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,s=this.$size,o={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};r&&(e||s.height!=r)&&(s.height=r,i|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL);if(n&&(e||s.width!=n)){i|=this.CHANGE_SIZE,s.width=n,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px";if(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)i|=this.CHANGE_FULL}return s.$dirty=!n||!r,i&&this._signal("resize",o),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$keepTextAreaAtCursor)return;var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.textarea.style,i=this.lineHeight;if(t<0||t>e.height-i){r.top=r.left="0";return}var s=this.characterWidth;if(this.$composition){var o=this.textarea.value.replace(/^\x01+/,"");s*=this.session.$getStringScreenWidth(o)[0]+2,i+=2}n-=this.scrollLeft,n>this.$size.scrollerWidth-s&&(n=this.$size.scrollerWidth-s),n+=this.gutterWidth,r.height=i+"px",r.width=s+"px",r.left=Math.min(n,this.$size.scrollerWidth-s)+"px",r.top=Math.min(t,this.$size.height-i)+"px"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow,n=this.session.documentToScreenRow(t,0)*e.lineHeight;return n-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){this.$changes&&(e|=this.$changes,this.$changes=0);if(!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){e|=this.$computeLayerConfig();if(n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left");if(e&this.CHANGE_FULL){this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender");return}if(e&this.CHANGE_SCROLL){e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender");return}e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender")},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,s=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),u=this.$horizScroll!==o;u&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var f=this.scrollTop%this.lineHeight,l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+h.right)));var p=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>h.top),d=a!==p;d&&(this.$vScroll=p,this.scrollBarV.setVisible(p));var v=Math.ceil(l/this.lineHeight)-1,m=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),g=m+v,y,b,w=this.lineHeight;m=e.screenToDocumentRow(m,0);var E=e.getFoldLine(m);E&&(m=E.start.row),y=e.documentToScreenRow(m,0),b=e.getRowLength(m)*w,g=Math.min(e.screenToDocumentRow(g,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(g)*w+b,f=this.scrollTop-y*w;var S=0;this.layerConfig.width!=s&&(S=this.CHANGE_H_SCROLL);if(u||d)S=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(s=this.$getLongestLine());return this.layerConfig={width:s,padding:this.$padding,firstRow:m,firstRowScreen:y,lastRow:g,lineHeight:w,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:f,gutterOffset:w?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},S},this.$updateLines=function(){if(!this.$changedLines)return;var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(t<n.firstRow)return;if(t===Infinity){this.$showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,e,t),!0},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(this.$size.scrollerHeight===0)return;var r=this.$cursorLayer.getPixelPosition(e),i=r.left,s=r.top,o=n&&n.top||0,u=n&&n.bottom||0,a=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;a+o>s?(t&&a+o>s+this.lineHeight&&(s-=t*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):a+this.$size.scrollerHeight-u<s+this.lineHeight&&(t&&a+this.$size.scrollerHeight-u<s-this.lineHeight&&(s+=t*this.$size.scrollerHeight),this.session.setScrollTop(s+this.lineHeight-this.$size.scrollerHeight));var f=this.scrollLeft;f>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):f+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):f<=this.$padding&&i-f<this.characterWidth&&this.session.setScrollLeft(0)},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){typeof e=="number"&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],s=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(s(n/this.STEPS,e,t-e));return i},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}),s=i.top;t&&(s-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(s),n!==!1&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(!this.$animatedScroll)return;var r=this;if(e==n)return;if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length){e=i[0];if(e==n)return}}var s=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:s},clearInterval(this.$timer),r.session.setScrollTop(s.shift()),r.session.$scrollTop=n,this.$timer=setInterval(function(){s.length?(r.session.setScrollTop(s.shift()),r.session.$scrollTop=n):n!=null?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,t&&t())},10)},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){if(t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom)return!0;if(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left)return!0;if(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=e+this.scrollLeft-n.left-this.$padding,i=r/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),o=Math.round(i);return{row:s,column:o,side:i-o>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=e+this.scrollLeft-n.left-this.$padding,i=Math.round(r/this.characterWidth),s=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(s,Math.max(i,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!this.$composition)return;i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null},this.setTheme=function(e,t){function o(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");i.importCssString(r.cssText,r.cssClass,n.container.ownerDocument),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var s="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&s!=n.$padding&&n.setPadding(s),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t()}var n=this;this.$themeId=e,n._dispatchEvent("themeChange",{theme:e});if(!e||typeof e=="string"){var r=e||this.$options.theme.initialValue;s.loadModule(["theme",r],o)}else o(e)},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),s.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){typeof e=="number"&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight){this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){typeof e=="number"&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0;if(this.$scrollPastEnd==e)return;this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=g}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";function u(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(n){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new r;return s.append(t),s.getBlob("application/javascript")}}function a(e){var t=u(e),n=window.URL||window.webkitURL,r=n.createObjectURL(t);return new Worker(r)}var r=e("../lib/oop"),i=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,o=e("../config"),f=function(t,n,r,i,s){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);if(o.get("packaged")||!e.toUrl)i=i||o.moduleUrl(n,"worker");else{var u=this.$normalizePath;i=i||u(e.toUrl("ace/worker/worker.js",null,"_"));var f={};t.forEach(function(t){f[t]=u(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=a(i),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:f,module:n,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,s),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),e.action=="insert"?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;if(!e)return;this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e})}}).call(f.prototype);var l=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,u=Object.create(s),a=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){a.messageBuffer.push(e),r&&(i?setTimeout(f):f())},this.setEmitSync=function(e){i=e};var f=function(){var e=a.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&u._signal(e.event,e.data)};u.postMessage=function(e){a.onMessage({data:e})},u.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},u.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){r=new e[n](u);while(a.messageBuffer.length)f()})};l.prototype=f.prototype,t.UIWorkerClient=l,t.WorkerClient=f,t.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})},this.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row!==t.end.row)return;if(t.start.row!==this.pos.row)return;this.$updating=!0;var n=e.action==="insert"?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;this.updateAnchors(e),i&&(this.length+=n);if(i&&!this.session.$fromUndo)if(e.action==="insert")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.insertMergedLines(a,e.lines)}else if(e.action==="remove")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.remove(new r(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(this.$updating)return;var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)},this.onCursorChange=function(e){if(this.$updating||!this.session)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth===-1)return;var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n<t;n++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}).call(o.prototype),t.PlaceHolder=o}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){function s(e,t){return e.row==t.row&&e.column==t.column}function o(e){var t=e.domEvent,n=t.altKey,o=t.shiftKey,u=t.ctrlKey,a=e.getAccelKey(),f=e.getButton();u&&i.isMac&&(f=t.button);if(e.editor.inMultiSelectMode&&f==2){e.editor.textInput.onContextMenu(e.domEvent);return}if(!u&&!n&&!a){f===0&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode();return}if(f!==0)return;var l=e.editor,c=l.selection,h=l.inMultiSelectMode,p=e.getDocumentPosition(),d=c.getCursor(),v=e.inSelection()||c.isEmpty()&&s(p,d),m=e.x,g=e.y,y=function(e){m=e.clientX,g=e.clientY},b=l.session,w=l.renderer.pixelToScreenCoordinates(m,g),E=w,S;if(l.$mouseHandler.$enableJumpToDef)u&&n||a&&n?S=o?"block":"add":n&&l.$blockSelectEnabled&&(S="block");else if(a&&!n){S="add";if(!h&&o)return}else n&&l.$blockSelectEnabled&&(S="block");S&&i.isMac&&t.ctrlKey&&l.$mouseHandler.cancelContextMenu();if(S=="add"){if(!h&&v)return;if(!h){var x=c.toOrientedRange();l.addSelectionMarker(x)}var T=c.rangeList.rangeAtPoint(p);l.$blockScrolling++,l.inVirtualSelectionMode=!0,o&&(T=null,x=c.ranges[0]||x,l.removeSelectionMarker(x)),l.once("mouseup",function(){var e=c.toOrientedRange();T&&e.isEmpty()&&s(T.cursor,e.cursor)?c.substractPoint(e.cursor):(o?c.substractPoint(x.cursor):x&&(l.removeSelectionMarker(x),c.addRange(x)),c.addRange(e)),l.$blockScrolling--,l.inVirtualSelectionMode=!1})}else if(S=="block"){e.stop(),l.inVirtualSelectionMode=!0;var N,C=[],k=function(){var e=l.renderer.pixelToScreenCoordinates(m,g),t=b.screenToDocumentPosition(e.row,e.column,e.offsetX);if(s(E,e)&&s(t,c.lead))return;E=e,l.$blockScrolling++,l.selection.moveToPosition(t),l.renderer.scrollCursorIntoView(),l.removeSelectionMarkers(C),C=c.rectangularRangeBlock(E,w),l.$mouseHandler.$clickSelection&&C.length==1&&C[0].isEmpty()&&(C[0]=l.$mouseHandler.$clickSelection.clone()),C.forEach(l.addSelectionMarker,l),l.updateSelectionMarkers(),l.$blockScrolling--};l.$blockScrolling++,h&&!a?c.toSingleRange():!h&&a&&(N=c.toOrientedRange(),l.addSelectionMarker(N)),o?w=b.documentToScreenPosition(c.lead):c.moveToPosition(p),l.$blockScrolling--,E={row:-1,column:-1};var L=function(e){clearInterval(O),l.removeSelectionMarkers(C),C.length||(C=[c.toOrientedRange()]),l.$blockScrolling++,N&&(l.removeSelectionMarker(N),c.toSingleRange(N));for(var t=0;t<C.length;t++)c.addRange(C[t]);l.inVirtualSelectionMode=!1,l.$mouseHandler.$clickSelection=null,l.$blockScrolling--},A=k;r.capture(l.container,y,L);var O=setInterval(function(){A()},20);return e.preventDefault()}}var r=e("../lib/event"),i=e("../lib/useragent");t.onMouseDown=o}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){if(e.$multiselectOnSessionChange)return;e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}var t=e.textInput.getElement(),n=!1;u.addListener(t,"keydown",function(t){var i=t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),u.addListener(t,"keyup",r),u.addListener(t,"blur",r)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount===0){var n=this.toOrientedRange();this.rangeList.add(n),this.rangeList.add(e);if(this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),s=n.start.row,o=n.end.row;if(s==o){if(r)var u=n.end,a=n.start;else var u=n.start,a=n.end;this.addRange(i.fromPoints(a,a)),this.addRange(i.fromPoints(u,u));return}var f=[],l=this.getLineRange(s,!0);l.start.column=n.start.column,f.push(l);for(var c=s+1;c<o;c++)f.push(this.getLineRange(c,!0));l=this.getLineRange(o,!0),l.end.column=n.end.column,f.push(l),f.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column<t.column;if(s)var o=e.column,u=t.column,a=e.offsetX,f=t.offsetX;else var o=t.column,u=e.column,a=t.offsetX,f=e.offsetX;var l=e.row<t.row;if(l)var c=e.row,h=t.row;else var c=t.row,h=e.row;o<0&&(o=0),c<0&&(c=0),c==h&&(n=!0);for(var p=c;p<=h;p++){var d=i.fromPoints(this.session.screenToDocumentPosition(p,o,a),this.session.screenToDocumentPosition(p,u,f));if(d.isEmpty()){if(m&&v(d.end,m))break;var m=d.end}d.cursor=s?d.start:d.end,r.push(d)}l&&r.reverse();if(!n){var g=r.length-1;while(r[g].isEmpty()&&g>0)g--;if(g>0){var y=0;while(r[y].isEmpty())y++}for(var b=g;b>=y;b--)r[b].isEmpty()&&r.splice(b,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection")},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;if(!t.multiSelectAction){var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}else t.multiSelectAction=="forEach"?r=n.forEachSelection(t,e.args):t.multiSelectAction=="forEachLine"?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});return r},this.forEachSelection=function(e,t,n){if(this.inVirtualSelectionMode)return;var r=n&&n.keepOrder,i=n==1||n&&n.$byLines,o=this.session,u=this.selection,a=u.rangeList,f=(r?u:a).ranges,l;if(!f.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var c=u._eventRegistry;u._eventRegistry={};var h=new s(o);this.inVirtualSelectionMode=!0;for(var p=f.length;p--;){if(i)while(p>0&&f[p].start.row==f[p-1].end.row)p--;h.fromOrientedRange(f[p]),h.index=p,this.selection=o.selection=h;var d=e.exec?e.exec(this,t||{}):e(this,t||{});!l&&d!==undefined&&(l=d),h.toOrientedRange(f[p])}h.detach(),this.selection=o.selection=u,this.inVirtualSelectionMode=!1,u._eventRegistry=c,u.mergeOverlappingRanges();var v=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),v&&v.from==v.to&&this.renderer.animateScrolling(v.from),l},this.exitMultiSelectMode=function(){if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var t=this.multiSelect.rangeList.ranges,n=[];for(var r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();e=n.join(i),e.length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;(r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column)&&this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle;if(t.needle==undefined){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;this.$blockScrolling+=1;var s=this.multiSelect;n||s.toSingleRange(i[0]);for(var o=i.length;o--;)s.addRange(i[o],!0);return r&&s.rangeList.rangeAtPoint(r.start)&&s.addRange(r,!0),this.$blockScrolling-=1,i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(s.row+e,s.column);if(!n.isEmpty())var u=this.session.documentToScreenPosition(r?n.end:n.start),a=this.session.screenToDocumentPosition(u.row+e,u.column);else var a=o;if(r){var f=i.fromPoints(o,a);f.cursor=f.start}else{var f=i.fromPoints(a,o);f.cursor=f.end}f.desiredColumn=s.column;if(!this.selection.inMultiSelectMode)this.selection.addRange(n);else if(t)var l=n.cursor;this.selection.addRange(f),l&&this.selection.substractPoint(l)},this.transposeSelections=function(e){var t=this.session,n=t.multiSelect,r=n.ranges;for(var i=r.length;i--;){var s=r[i];if(s.isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var u=[];for(var i=r.length;i--;){var s=r[i];u.unshift(t.getTextRange(s))}e<0?u.unshift(u.pop()):u.push(u.shift());for(var i=r.length;i--;){var s=r[i],o=s.clone();t.replace(s,u[i]),s.start.row=o.start.row,s.start.column=o.start.column}},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect,s=i.toOrientedRange();if(s.isEmpty()){s=r.getWordRange(s.start.row,s.start.column),s.cursor=e==-1?s.start:s.end,this.multiSelect.addRange(s);if(n)return}var o=r.getTextRange(s),u=h(r,o,e);u&&(u.cursor=e==-1?u.start:u.end,this.$blockScrolling+=1,this.session.unfold(u),this.multiSelect.addRange(u),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(s.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,s=n.filter(function(e){if(e.cursor.row==r)return!0;r=e.cursor.row});if(!n.length||s.length==n.length-1){var o=this.selection.getRange(),u=o.start.row,f=o.end.row,l=u==f;if(l){var c=this.session.getLength(),h;do h=this.session.getLine(f);while(/[=:]/.test(h)&&++f<c);do h=this.session.getLine(u);while(/[=:]/.test(h)&&--u>0);u<0&&(u=0),f>=c&&(f=c-1)}var p=this.session.removeFullLines(u,f);p=this.$reAlignText(p,l),this.session.insert({row:u,column:0},p.join("\n")+"\n"),l||(o.start.column=0,o.end.column=p[p.length-1].length),this.selection.setRange(o)}else{s.forEach(function(e){t.substractPoint(e.cursor)});var d=0,v=Infinity,m=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>d&&(d=n.column),i<v&&(v=i),i});n.forEach(function(t,n){var r=t.cursor,s=d-r.column,o=m[n]-v;s>o?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=d,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){function u(e){return a.stringRepeat(" ",e)}function f(e){return e[2]?u(i)+e[2]+u(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function l(e){return e[2]?u(i+s-e[2].length)+e[2]+u(o," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function c(e){return e[2]?u(i)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var n=!0,r=!0,i,s,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,s=t[2].length,o=t[3].length,t):(i+s+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),s<t[2].length&&(s=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]}).map(t?f:n?r?l:f:c)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++t<a){var c=e.getLine(t).search(i);if(c==-1)continue;if(c<=o)break;l=t}if(l>f){var h=e.getLine(l).length;return new r(f,u,l,h)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=e.getFoldWidget(u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./range").Range;(function(){this.getRowLength=function(e){var t;return this.lineWidgets?t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:t=0,!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach();if(this.editor==e)return;this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},this.detach=function(e){var t=this.editor;if(!t)return;this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(!n||!e.action)return;var r=e.data,i=r.start.row,s=r.end.row,o=e.action=="add";for(var u=i+1;u<s;u++)n[u]&&(n[u].hidden=o);n[s]&&(o?n[i]?n[s].hidden=o:n[i]=n[s]:(n[i]==n[s]&&(n[i]=undefined),n[s].hidden=o))},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(!t)return;var n=e.start.row,r=e.end.row-n;if(r!==0)if(e.action=="remove"){var i=t.splice(n+1,r);i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var s=new Array(r);s.unshift(n,0),t.splice.apply(t,s),this.$updateRows()}},this.$updateRows=function(){var e=this.session.lineWidgets;if(!e)return;var t=!0;e.forEach(function(e,n){if(e){t=!1,e.row=n;while(e.$oldWidget)e.$oldWidget.row=n,e=e.$oldWidget}}),t&&(this.session.lineWidgets=null)},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var n=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,n.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight==null&&(e.pixelHeight=e.el.offsetHeight),e.rowCount==null&&(e.rowCount=e.pixelHeight/n.layerConfig.lineHeight);var r=this.session.getFoldAt(e.row,0);e.$fold=r;if(r){var s=this.session.lineWidgets;e.row==r.end.row&&!s[r.start.row]?s[r.start.row]=e:e.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,n),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el);if(e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}if(this.session.lineWidgets){var n=this.session.lineWidgets[e.row];if(n==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else while(n){if(n.$oldWidget==e){n.$oldWidget=e.$oldWidget;break}n=n.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){var t=this.session.lineWidgets,n=t&&t[e],r=[];while(n)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(!n||!n.length)return;var i=Infinity;for(var s=0;s<n.length;s++){var o=n[s];if(!o||!o.el)continue;if(o.session!=this.session)continue;if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,t.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/r.characterWidth));var u=o.h/r.lineHeight;o.coverLine&&(u-=this.session.getRowLineCount(o.row),u<0&&(u=0)),o.rowCount!=u&&(o.rowCount=u,o.row<i&&(i=o.row))}i!=Infinity&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]},this.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(!r)return;var i=Math.min(this.firstRow,n.firstRow),s=Math.max(this.lastRow,n.lastRow,r.length);while(i>0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=n.width+2*n.padding+"px"),u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}}}).call(o.prototype),t.LineWidgets=o}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(!r.length)return;var i=o(r,{row:t,column:-1},s.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:i===0&&n<0&&(i=r.length-1);var u=r[i];if(!u||!n)return;if(u.row===t){do u=r[i+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[i+=n];while(u&&u.row==t);return a.length&&a}var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),o=s.row,a=n.widgetManager.getWidgetsAtRow(o).filter(function(e){return e.type=="errorMarker"})[0];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];s.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,s.row=c.row,l=e.renderer.$gutterLayer.$annotations[s.row]}else{if(a)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=h.el.appendChild(i.createElement("div")),d=h.el.appendChild(i.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(s).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("<br>"),p.appendChild(i.createElement("div"));var m=function(e,t,n){if(t===0&&(n==="esc"||n==="return"))return h.destroy(),{command:"null"}};h.destroy=function(){if(e.$mouseHandler.isMousePressed)return;e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy)},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,typeof define=="function"&&(t.define=define),t.edit=function(e){if(typeof e=="string"){var n=e;e=document.getElementById(n);if(!e)throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var u=e;o=u.value,e=r.createElement("pre"),u.parentNode.replaceChild(e,u)}else e&&(o=r.getInnerText(e),e.innerHTML="");var f=t.createEditSession(o),l=new s(new a(e));l.setSession(f);var c={document:f,editor:l,onResize:l.resize.bind(l,null)};return u&&(c.textarea=u),i.addListener(window,"resize",c.onResize),l.on("destroy",function(){i.removeListener(window,"resize",c.onResize),c.editor.container.env=null}),l.container.env=l.env=c,l},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u,t.version="1.2.9"}); - (function() { - ace.require(["ace/ace"], function(a) { - if (a) { - a.config.init(true); - a.define = ace.define; - } - if (!window.ace) - window.ace = a; - for (var key in a) if (a.hasOwnProperty(key)) - window.ace[key] = a[key]; - }); - })(); - \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/ext-language_tools.js b/packages/node_modules/@node-red/editor/public/vendor/ace/ext-language_tools.js deleted file mode 100644 index 3af07b26c..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/ext-language_tools.js +++ /dev/null @@ -1,5 +0,0 @@ -ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),o=e("./range").Range,u=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,f=e("./tokenizer").Tokenizer,l=o.comparePoints,c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,i),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return c.$tokenizer=new f({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),c.prototype.getTokenizer=function(){return c.$tokenizer},c.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="object"){e[r]="";if(i.changeCase&&i.local){var u=e[r+1];u&&typeof u=="string"&&(i.changeCase=="u"?e[r]=u[0].toUpperCase():e[r]=u[0].toLowerCase(),e[r+1]=u.substr(1))}else i.changeCase&&(t=i.changeCase)}else t=="U"?e[r]=i.toUpperCase():t=="L"&&(e[r]=i.toLowerCase())}return e.join("")});return this.variables.__=null,u},this.resolveVariables=function(e,t){function o(t){var n=e.indexOf(t,r+1);n!=-1&&(r=n)}var n=[];for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="string")n.push(i);else{if(typeof i!="object")continue;if(i.skip)o(i);else{if(i.processed<r)continue;if(i.text){var s=this.getVariableValue(t,i.text);s&&i.fmtString&&(s=this.tmStrFormat(s,i)),i.processed=r,i.expectIf==null?s&&(n.push(s),o(i)):s?i.skip=i.elseBranch:o(i)}else i.tabstopId!=null?n.push(i):i.changeCase!=null&&n.push(i)}}}return n},this.insertSnippetForSelection=function(e,t){function f(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"){if(a[r.tabstopId])continue;var i=e.lastIndexOf(r,n-1);r=t[i]||{tabstopId:r.tabstopId}}t[n]=r}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=e.session.getTabString(),s=r.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column)),t=t.replace(/\r/g,"");var o=this.tokenizeTmSnippet(t);o=this.resolveVariables(o,e),o=o.map(function(e){return e=="\n"?e+s:typeof e=="string"?e.replace(/\t/g,i):e});var u=[];o.forEach(function(e,t){if(typeof e!="object")return;var n=e.tabstopId,r=u[n];r||(r=u[n]=[],r.index=n,r.value="");if(r.indexOf(e)!==-1)return;r.push(e);var i=o.indexOf(e,t+1);if(i===-1)return;var s=o.slice(t+1,i),a=s.some(function(e){return typeof e=="object"});a&&!r.value?r.value=s:s.length&&(!r.value||typeof r.value!="string")&&(r.value=s.join(""))}),u.forEach(function(e){e.length=0});var a={};for(var l=0;l<o.length;l++){var c=o[l];if(typeof c!="object")continue;var p=c.tabstopId,d=o.indexOf(c,l+1);if(a[p]){a[p]===c&&(a[p]=null);continue}var v=u[p],m=typeof v.value=="string"?[v.value]:f(v.value);m.unshift(l+1,Math.max(0,d-l)),m.push(c),a[p]=c,o.splice.apply(o,m),v.indexOf(c)===-1&&v.push(c)}var g=0,y=0,b="";o.forEach(function(e){if(typeof e=="string"){var t=e.split("\n");t.length>1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e.start?e.end={row:g,column:y}:e.start={row:g,column:y}});var w=e.getSelectionRange(),E=e.session.replace(w,b),S=new h(e),x=e.inVirtualSelectionMode&&e.selection.index;S.addTabstops(u,w.start,E,x)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";t=t.split("/").pop();if(t==="html"||t==="php"){t==="php"&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},this.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),s=r.substr(n.column),o=this.snippetMap,u;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(u=this.findMatchingSnippet(t,i,s)),!!u},this),u?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-u.replaceBefore.length,n.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippetForSelection(e,u.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(i.startRe&&!i.startRe.test(t))continue;if(i.endRe&&!i.endRe.test(n))continue;if(!i.startRe&&!i.endRe)continue;return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function u(e,t,n){return e=o(e),t=o(t),n?(e=t+e,e&&e[e.length-1]!="$"&&(e+="$")):(e+=t,e&&e[0]!="^"&&(e="^"+e)),new RegExp(e)}function a(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],r[t]={});var o=r[t];if(e.name){var a=o[e.name];a&&i.unregister(a),o[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger));if(!e.trigger&&!e.guard&&!e.endTrigger&&!e.endGuard)return;e.startRe=u(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=u(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var n=this.snippetMap,r=this.snippetNameMap,i=this;e||(e=[]),e&&e.content?a(e):Array.isArray(e)&&e.forEach(a),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):n[o]=u}}return t},this.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r}}).call(c.prototype);var h=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e,n=e.action[0]=="r",r=e.start,i=e.end,s=r.row,o=i.row,u=o-s,a=i.column-r.column;n&&(u=-u,a=-a);if(!this.$inChange&&n){var f=this.selectedTabstop,c=f&&!f.some(function(e){return l(e.start,r)<=0&&l(e.end,i)>=0});if(c)return this.detach()}var h=this.ranges;for(var p=0;p<h.length;p++){var d=h[p];if(d.end.row<r.row)continue;if(n&&l(r,d.start)<0&&l(i,d.end)>0){this.removeRange(d),p--;continue}d.start.row==s&&d.start.column>r.column&&(d.start.column+=a),d.end.row==s&&d.end.column>=r.column&&(d.end.column+=a),d.start.row>=s&&(d.start.row+=u),d.end.row>=s&&(d.end.row+=u),l(d.start,d.end)>0&&this.removeRange(d)}h.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(!e||!e.hasLinkedRanges)return;this.$inChange=!0;var n=this.editor.session,r=n.getTextRange(e.firstNonLinked);for(var i=e.length;i--;){var s=e[i];if(!s.linked)continue;var o=t.snippetManager.tmStrFormat(r,s.original);n.replace(s,o)}this.$inChange=!1},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(!this.editor)return;var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty();for(var r=this.ranges.length;r--;){if(this.ranges[r].linked)continue;var i=this.ranges[r].contains(e.row,e.column),s=n||this.ranges[r].contains(t.row,t.column);if(i&&s)return}this.detach()},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),n===0&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index];if(!t||!t.length)return;this.selectedTabstop=t;if(!this.editor.inVirtualSelectionMode){var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var r=t.length;r--;){if(t.hasLinkedRanges&&t[r].linked)continue;n.addRange(t[r].clone(),!0)}n.ranges[0]&&n.addRange(n.ranges[0].clone())}else this.editor.selection.setRange(t.firstNonLinked);this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.addTabstops=function(e,t,n){this.$openTabstops||(this.$openTabstops=[]);if(!e[0]){var r=o.fromPoints(n,n);v(r.start,t),v(r.end,t),e[0]=[r],e[0].index=0}var i=this.index,s=[i+1,0],u=this.ranges;e.forEach(function(e,n){var r=this.$openTabstops[n]||e;for(var i=e.length;i--;){var a=e[i],f=o.fromPoints(a.start,a.end||a.start);d(f.start,t),d(f.end,t),f.original=a,f.tabstop=r,u.push(f),r!=e?r.unshift(f):r[i]=f,a.fmtString?(f.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=f)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r)},this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new a,this.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(h.prototype);var p={};p.onChange=u.prototype.onChange,p.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},p.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var d=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new c;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,s=e("../range").Range,o=e("../lib/event"),u=e("../lib/lang"),a=e("../lib/dom"),f=function(e){var t=new r(e);t.$maxLines=4;var n=new i(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusWaitTimout=0,n.$highlightTagPending=!0,n},l=function(e){var t=a.createElement("div"),n=new f(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),c.start.row=c.end.row=t.row,e.stop()});var i,l=new s(-1,0,-1,Infinity),c=new s(-1,0,-1,Infinity);c.id=n.session.addMarker(c,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?l.id&&(n.session.removeMarker(l.id),l.id=null):l.id=n.session.addMarker(l,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(!i){i=e;return}if(i.x==e.x&&i.y==e.y)return;i=e,i.scrollTop=n.renderer.scrollTop;var t=i.getDocumentPosition().row;l.start.row!=t&&(l.id||n.setRow(t),p(t))}),n.renderer.on("beforeRender",function(){if(i&&l.start.row!=-1){i.$pos=null;var e=i.getDocumentPosition().row;l.id||n.setRow(e),p(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow];if(r==t.selectedNode)return;t.selectedNode&&a.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=r,r&&a.addCssClass(r,"ace_selected")});var h=function(){p(-1)},p=function(e,t){e!==l.start.row&&(l.start.row=l.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return l.start.row},o.addListener(n.container,"mouseout",h),n.on("hide",h),n.on("changeSelection",h),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return typeof t=="string"?t:t&&t.value||""};var d=n.session.bgTokenizer;return d.$tokenizeRow=function(e){var t=n.data[e],r=[];if(!t)return r;typeof t=="string"&&(t={value:t}),t.caption||(t.caption=t.value||t.name);var i=-1,s,o;for(var u=0;u<t.caption.length;u++)o=t.caption[u],s=t.matchMask&1<<u?1:0,i!==s?(r.push({type:t.className||""+(s?"completion-highlight":""),value:o}),i=s):r[r.length-1].value+=o;if(t.meta){var a=n.renderer.$size.scrollerWidth/n.renderer.layerConfig.characterWidth,f=t.meta;f.length+t.caption.length>a-2&&(f=f.substr(0,a-t.caption.length-3)+"\u2026"),r.push({type:"rightAlignedText",value:f})}return r},d.$updateOnChange=r,d.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.$blockScrolling=Infinity,n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.data=[],n.setData=function(e){n.setValue(u.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return c.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),c.start.row!=e&&(n.selection.clearSelection(),c.start.row=c.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,r){var s=this.container,o=window.innerHeight,u=window.innerWidth,a=this.renderer,f=a.$maxLines*t*1.4,l=e.top+this.$borderSize,c=l>o/2&&!r;c&&l+t+f>o?(a.$maxPixelHeight=l-2*this.$borderSize,s.style.top="",s.style.bottom=o-l+"px",n.isTopdown=!1):(l+=t,a.$maxPixelHeight=o-l-.2*t,s.style.top=l+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="",this.renderer.$textLayer.checkForSizeChanges();var h=e.left;h+s.offsetWidth>u&&(h=u-s.offsetWidth),s.style.left=h+"px",this._signal("show"),i=null,n.isOpen=!0},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};a.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=l}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var s=0;s<i;s++)t(e[s],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t-1;s>=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s<e.length;s++){if(!n.test(e[s]))break;i.push(e[s])}return i},t.getCompletionPrefix=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r;return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!r&&e&&(r=this.retrievePrecedingIdentifier(n,t.column,e))}.bind(this))}.bind(this)),r||this.retrievePrecedingIdentifier(n,t.column)}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"],function(e,t,n){"use strict";var r=e("./keyboard/hash_handler").HashHandler,i=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/util"),o=e("./lib/event"),u=e("./lib/lang"),a=e("./lib/dom"),f=e("./snippets").snippetManager,l=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=u.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=u.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new i(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var r=e.renderer;this.popup.setRow(this.autoSelect?0:-1);if(!n){this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var i=r.layerConfig.lineHeight,s=r.$cursorLayer.getPixelPosition(this.base,!0);s.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();s.top+=o.top-r.layerConfig.offset,s.left+=o.left-e.renderer.scrollLeft,s.left+=r.gutterWidth,this.popup.show(s,i)}else n&&!t&&this.detach()},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t!=n&&t.parentNode!=i&&!r&&t!=this.tooltipNode&&e.relatedTarget!=n&&this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),n=this.popup.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.popup.setRow(t)},this.insertMatch=function(e,t){e||(e=this.popup.getData(this.popup.getRow()));if(!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText){var n=this.editor.selection.getAllRanges();for(var r=0,i;i=n[r];r++)i.start.column-=this.completions.filterText.length,this.editor.session.remove(i)}e.snippet?f.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(!!t||!!e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=s.getCompletionPrefix(e);this.base=n.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var o=[],u=e.completers.length;return e.completers.forEach(function(a,f){a.getCompletions(e,n,r,i,function(n,r){!n&&r&&(o=o.concat(r)),t(null,{prefix:s.getCompletionPrefix(e),matches:o,finished:--u===0})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),n=this.editor.session.getTextRange({start:this.base,end:t});if(n==this.completions.filterText)return;this.completions.setFilter(n);if(!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==n&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,n,e);return}var r=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,n){var i=function(){if(!n.finished)return;return this.detach()}.bind(this),s=n.prefix,o=n&&n.matches;if(!o||!o.length)return i();if(s.indexOf(n.prefix)!==0||r!=this.gatherCompletionsId)return;this.completions=new c(o),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(s);var u=this.completions.filtered;if(!u.length)return i();if(u.length==1&&u[0].value==s&&!u[0].snippet)return i();if(this.autoInsert&&u.length==1&&n.finished)return this.insertMatch(u[0]);this.openPopup(this.editor,s,e)}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();this.editor.completers.some(function(e){return e.getDocTooltip&&(r=e.getDocTooltip(n)),r}),r||(r=n),typeof r=="string"&&(r={docText:r});if(!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var n=this.popup,r=n.container.getBoundingClientRect();t.style.top=n.container.style.top,t.style.bottom=n.container.style.bottom,window.innerWidth-r.right<320?(t.style.right=window.innerWidth-r.left+"px",t.style.left=""):(t.style.left=r.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){this.tooltipTimer.cancel();if(!this.tooltipNode)return;var e=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==e&&this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)},this.onTooltipClick=function(e){var t=e.target;while(t&&t!=this.tooltipNode){if(t.nodeName=="A"&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}}}).call(l.prototype),l.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new l),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var c=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){var u=o.value||o.caption||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else for(var p=0;p<t.length;p++){var d=u.indexOf(i[p],a+1),v=u.indexOf(r[p],a+1);c=d>=0?v<0||d<v?d:v:v;if(c<0)continue e;h=c-a-1,h>0&&(a===-1&&(l+=10),l+=h),f|=1<<c,a=c}o.matchMask=f,o.exactMatch=l?0:1,o.score=(o.score||0)-l,n.push(o)}return n}}).call(c.prototype),t.Autocomplete=l,t.FilteredList=c}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){function s(e,t){var n=e.getTextRange(r.fromPoints({row:0,column:0},t));return n.split(i).length-1}function o(e,t){var n=s(e,t),r=e.getValue().split(i),o=Object.create(null),u=r[n];return r.forEach(function(e,t){if(!e||e===u)return;var i=Math.abs(n-t),s=r.length-i;o[e]?o[e]=Math.max(s,o[e]):o[e]=s}),o}var r=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,r,i){var s=o(t,n,r),u=Object.keys(s);i(null,u.map(function(e){return{caption:e,value:e,score:s[e],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),o=e("../lib/lang"),u=e("../autocomplete/util"),a=e("../autocomplete/text_completer"),f={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var s=e.session.getState(n.row),o=t.$mode.getCompletions(s,t,n,r);i(null,o)}},l={getCompletions:function(e,t,n,i,s){var o=r.snippetMap,u=[];r.getActiveScopes(e).forEach(function(e){var t=o[e]||[];for(var n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;if(!i)continue;u.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"\u21e5 ":"snippet",type:"snippet"})}},this),s(null,u)},getDocTooltip:function(e){e.type=="snippet"&&!e.docHTML&&(e.docHTML=["<b>",o.escapeHTML(e.caption),"</b>","<hr></hr>",o.escapeHTML(e.snippet)].join(""))}},c=[l,a,f];t.setCompleters=function(e){c.length=0,e&&c.push.apply(c,e)},t.addCompleter=function(e){c.push(e)},t.textCompleter=a,t.keyWordCompleter=f,t.snippetCompleter=l;var h={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){d(t.session.$mode)},d=function(e){var t=e.$id;r.files||(r.files={}),v(t),e.modes&&e.modes.forEach(d)},v=function(e){if(!e||r.files[e])return;var t=e.replace("mode","snippets");r.files[e]={},s.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){v("ace/mode/"+e)})))})},m=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name==="backspace")n&&!u.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name==="insertstring"){var r=u.getCompletionPrefix(t);r&&!n&&(t.completer||(t.completer=new i),t.completer.autoInsert=!1,t.completer.showPopup(t))}},g=e("../editor").Editor;e("../config").defineOptions(g.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})}); - (function() { - ace.require(["ace/ext/language_tools"], function() {}); - })(); - \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/ext-searchbox.js b/packages/node_modules/@node-red/editor/public/vendor/ace/ext-searchbox.js deleted file mode 100644 index bcbec8dd3..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/ext-searchbox.js +++ /dev/null @@ -1,5 +0,0 @@ -ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),o='.ace_search {background-color: #ddd;color: #666;border: 1px solid #cbcbcb;border-top: 0 none;overflow: hidden;margin: 0;padding: 4px 6px 0 4px;position: absolute;top: 0;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {margin: 0 20px 4px 0;overflow: hidden;line-height: 1.9;}.ace_replace_form {margin-right: 0;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {border-radius: 3px 0 0 3px;background-color: white;color: black;border: 1px solid #cbcbcb;border-right: 0 none;box-sizing: border-box!important;outline: 0;padding: 0;font-size: inherit;margin: 0;line-height: inherit;padding: 0 6px;min-width: 17em;vertical-align: top;}.ace_searchbtn {border: 1px solid #cbcbcb;line-height: inherit;display: inline-block;padding: 0 6px;background: #fff;border-right: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;margin: 0;position: relative;box-sizing: content-box!important;color: #666;}.ace_searchbtn:last-child {border-radius: 0 3px 3px 0;border-right: 1px solid #cbcbcb;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn:hover {background-color: #eef1f6;}.ace_searchbtn.prev, .ace_searchbtn.next {padding: 0px 0.7em}.ace_searchbtn.prev:after, .ace_searchbtn.next:after {content: "";border: solid 2px #888;width: 0.5em;height: 0.5em;border-width: 2px 0 0 2px;display:inline-block;transform: rotate(-45deg);}.ace_searchbtn.next:after {border-width: 0 2px 2px 0 ;}.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;font: 16px/16px Arial;padding: 0;height: 14px;width: 14px;top: 9px;right: 7px;position: absolute;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;box-sizing: border-box!important;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;clear: both;}.ace_search_counter {float: left;font-family: arial;padding: 0 8px;}',u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys"),f=999;r.importCssString(o,"ace_searchbox");var l='<div class="ace_search right"> <span action="hide" class="ace_searchbtn_close"></span> <div class="ace_search_form"> <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input> <span action="findPrev" class="ace_searchbtn prev"></span> <span action="findNext" class="ace_searchbtn next"></span> <span action="findAll" class="ace_searchbtn" title="Alt-Enter">All</span> </div> <div class="ace_replace_form"> <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input> <span action="replaceAndFindNext" class="ace_searchbtn">Replace</span> <span action="replaceAll" class="ace_searchbtn">All</span> </div> <div class="ace_search_options"> <span action="toggleReplace" class="ace_button" title="Toggel Replace mode" style="float:left;margin-top:-2px;padding:0 5px;">+</span> <span class="ace_search_counter"></span> <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span> <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span> <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span> <span action="searchInSelection" class="ace_button" title="Search In Selection">S</span> </div></div>'.replace(/> +/g,">"),c=function(e,t,n){var i=r.createElement("div");i.innerHTML=l,this.element=i.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},this.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var n=e.target||e.srcElement,r=n.getAttribute("action");r&&t[r]?t[r]():t.$searchBarKb.commands[r]&&t.$searchBarKb.commands[r].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]),this.setSearchRange=function(e){this.searchRange=e,e?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(e){r.setCssClass(this.replaceOption,"checked",this.searchRange),r.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.replaceBox.style.display=this.replaceOption.checked?"":"none",this.find(!1,!1,e)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,n){var i=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange}),s=!i&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",s),this.editor._emit("findSearchBox",{match:!s}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,n=0,r=0;if(t){var i=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),s=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(s-=e.session.doc.positionToIndex(this.searchRange.start));var o=t.lastIndex=0,u;while(u=t.exec(i)){n++,o=u.index,o<=s&&r++;if(n>f)break;if(!u[0]){t.lastIndex=o+=1;if(o>=i.length)break}}}this.searchCounter.textContent=r+" of "+(n>f?f+"+":n)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(c.prototype),t.SearchBox=c,t.Search=function(e,t){var n=e.searchBox||new c(e);n.show(e.session.getTextRange(),t)}}); - (function() { - ace.require(["ace/ext/searchbox"], function() {}); - })(); - \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-css.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-css.js deleted file mode 100644 index 668ed28fe..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-css.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",f=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(e==="ruleset"){var s=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(s)?(/([\w\-]+):[^:]*$/.test(s),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r)}return[]},this.getPropertyCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(!f.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-handlebars.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-handlebars.js deleted file mode 100644 index 9571d93fd..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-handlebars.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?"+e+"",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",f=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(e==="ruleset"){var s=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(s)?(/([\w\-]+):[^:]*$/.test(s),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r)}return[]},this.getPropertyCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(!f.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function u(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),a=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var o=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==o&&(u(p,"attribute-value")||u(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(u(p,"tag-whitespace")||u(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(u(p,"attribute-equals")&&(d||c==">")||u(p,"decl-attribute-equals")&&(d||c=="?"))return{text:o+o,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var o=n.getSelectionRange().start,a=new s(r,o.row,o.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(u(f,"tag-name")||u(f,"tag-whitespace")||u(f,"attribute-name")||u(f,"attribute-equals")||u(f,"attribute-value")))return;if(u(f,"reference.attribute-value"))return;if(u(f,"attribute-value")){var l=f.value.charAt(0);if(l=='"'||l=="'"){var c=f.value.charAt(f.value.length-1),h=a.getCurrentTokenColumn()+f.value.length;if(h>o.column||h==o.column&&l!=c)return}}while(!u(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var p=a.getCurrentTokenRow(),d=a.getCurrentTokenColumn();if(u(a.stepBackward(),"end-tag-open"))return;var v=f.value;p==o.row&&(v=v.substring(0,o.column-d));if(this.voidElements.hasOwnProperty(v.toLowerCase()))return;return{text:"></"+v+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var o=n.getCursorPosition(),u=r.getLine(o.row),a=new s(r,o.row,o.column),f=a.getCurrentToken();if(f&&f.type.indexOf("tag-close")!==-1){if(f.value=="/>")return;while(f&&f.type.indexOf("tag-name")===-1)f=a.stepBackward();if(!f)return;var l=f.value,c=a.getCurrentTokenRow();f=a.stepBackward();if(!f||f.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[l]){var h=r.getTokenAt(o.row,o.column+1),u=r.getLine(c),p=this.$getIndent(u),d=p+r.getTabString();return h&&h.value==="</"?{text:"\n"+d+"\n"+p,selection:[1,d.length,1,d.length]}:{text:"\n"+d}}}}})};r.inherits(a,i),t.XmlBehaviour=a}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){"use strict";function l(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../lib/lang"),s=e("../../range").Range,o=e("./fold_mode").FoldMode,u=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e,t){o.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(a,o);var f=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t=="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r=new f;for(var i=0;i<n.length;i++){var s=n[i];if(l(s,"tag-open")){r.end.column=r.start.column+s.value.length,r.closing=l(s,"end-tag-open"),s=n[++i];if(!s)return null;r.tagName=s.value,r.end.column+=s.value.length;for(i++;i<n.length;i++){s=n[i],r.end.column+=s.value.length;if(l(s,"tag-close")){r.selfClosing=s.value=="/>";break}}return r}if(l(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o<i.length;o++){var u=i[o];s+=u.value.length;if(s<r)continue;if(l(u,"end-tag-open")){u=i[o+1];if(u&&u.value==n)return!0}}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new f;do if(l(t,"tag-open"))n.closing=l(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(l(t,"tag-name"))n.tagName=t.value;else if(l(t,"tag-close"))return n.selfClosing=t.value=="/>",n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new f;do{if(l(t,"tag-open"))return n.closing=l(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;l(t,"tag-name")?n.tagName=t.value:l(t,"tag-close")&&(n.selfClosing=t.value=="/>",n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.start.column),l={row:n,column:r.start.column+r.tagName.length+2};r.start.row==r.end.row&&(l.column=r.end.column);while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromPoints(l,a.start)}else o.push(a)}}else{var f=new u(e,n,r.end.column),c={row:n,column:r.start.column};while(a=this._readTagBackward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(!a.closing){this._pop(o,a);if(o.length==0)return a.start.column+=a.tagName.length+2,a.start.row==a.end.row&&a.start.column<a.end.column&&(a.start.column=a.end.column),s.fromPoints(a.start,c)}else o.push(a)}}}}).call(a.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={html:{manifest:1},head:{},title:{},base:{href:1,target:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},noscript:{href:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},section:{},nav:{},article:{pubdate:1},aside:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},header:{},footer:{},address:{},main:{},p:{},hr:{},pre:{},blockquote:{cite:1},ol:{start:1,reversed:1},ul:{},li:{value:1},dl:{},dt:{},dd:{},figure:{},figcaption:{},div:{},a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},em:{},strong:{},small:{},s:{},cite:{},q:{cite:1},dfn:{},abbr:{},data:{},time:{datetime:1},code:{},"var":{},samp:{},kbd:{},sub:{},sup:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{},bdo:{},span:{},br:{},wbr:{},ins:{cite:1,datetime:1},del:{cite:1,datetime:1},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},embed:{src:1,height:1,width:1,type:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},param:{name:1,value:1},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},source:{src:1,type:1,media:1},track:{kind:1,src:1,srclang:1,label:1,"default":1},canvas:{width:1,height:1},map:{name:1},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},svg:{},math:{},table:{summary:1},caption:{},colgroup:{span:1},col:{span:1},tbody:{},thead:{},tfoot:{},tr:{},td:{headers:1,rowspan:1,colspan:1},th:{headers:1,rowspan:1,colspan:1,scope:1},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},fieldset:{disabled:1,form:1,name:1},legend:{},label:{form:1,"for":1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},datalist:{},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},output:{"for":1,form:1,name:1},progress:{value:1,max:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},details:{open:1},summary:{},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},menu:{type:1,label:1},dialog:{open:1}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:Number.MAX_VALUE}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:Number.MAX_VALUE}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function s(e,t){return t.splice(0,3),t.shift()||"start"}var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,o=function(){i.call(this);var e={regex:"(?={{)",push:"handlebars"};for(var t in this.$rules)this.$rules[t].unshift(e);this.$rules.handlebars=[{token:"comment.start",regex:"{{!--",push:[{token:"comment.end",regex:"--}}",next:s},{defaultToken:"comment"}]},{token:"comment.start",regex:"{{!",push:[{token:"comment.end",regex:"}}",next:s},{defaultToken:"comment"}]},{token:"support.function",regex:"{{{",push:[{token:"support.function",regex:"}}}",next:s},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]},{token:"storage.type.start",regex:"{{[#\\^/&]?",push:[{token:"storage.type.end",regex:"}}",next:s},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]}],this.normalizeRules()};r.inherits(o,i),t.HandlebarsHighlightRules=o}),ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour/xml").XmlBehaviour,s=function(){i.call(this)};r.inherits(s,i),t.HtmlBehaviour=s}),ace.define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./handlebars_highlight_rules").HandlebarsHighlightRules,o=e("./behaviour/html").HtmlBehaviour,u=e("./folding/html").FoldMode,a=function(){i.call(this),this.HighlightRules=s,this.$behaviour=new o};r.inherits(a,i),function(){this.blockComment={start:"{{!--",end:"--}}"},this.$id="ace/mode/handlebars"}.call(a.prototype),t.Mode=a}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-html.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-html.js deleted file mode 100644 index 6895fbec6..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-html.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?"+e+"",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",f=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(e==="ruleset"){var s=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(s)?(/([\w\-]+):[^:]*$/.test(s),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r)}return[]},this.getPropertyCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(!f.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function u(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),a=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var o=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==o&&(u(p,"attribute-value")||u(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(u(p,"tag-whitespace")||u(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(u(p,"attribute-equals")&&(d||c==">")||u(p,"decl-attribute-equals")&&(d||c=="?"))return{text:o+o,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var o=n.getSelectionRange().start,a=new s(r,o.row,o.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(u(f,"tag-name")||u(f,"tag-whitespace")||u(f,"attribute-name")||u(f,"attribute-equals")||u(f,"attribute-value")))return;if(u(f,"reference.attribute-value"))return;if(u(f,"attribute-value")){var l=f.value.charAt(0);if(l=='"'||l=="'"){var c=f.value.charAt(f.value.length-1),h=a.getCurrentTokenColumn()+f.value.length;if(h>o.column||h==o.column&&l!=c)return}}while(!u(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var p=a.getCurrentTokenRow(),d=a.getCurrentTokenColumn();if(u(a.stepBackward(),"end-tag-open"))return;var v=f.value;p==o.row&&(v=v.substring(0,o.column-d));if(this.voidElements.hasOwnProperty(v.toLowerCase()))return;return{text:"></"+v+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var o=n.getCursorPosition(),u=r.getLine(o.row),a=new s(r,o.row,o.column),f=a.getCurrentToken();if(f&&f.type.indexOf("tag-close")!==-1){if(f.value=="/>")return;while(f&&f.type.indexOf("tag-name")===-1)f=a.stepBackward();if(!f)return;var l=f.value,c=a.getCurrentTokenRow();f=a.stepBackward();if(!f||f.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[l]){var h=r.getTokenAt(o.row,o.column+1),u=r.getLine(c),p=this.$getIndent(u),d=p+r.getTabString();return h&&h.value==="</"?{text:"\n"+d+"\n"+p,selection:[1,d.length,1,d.length]}:{text:"\n"+d}}}}})};r.inherits(a,i),t.XmlBehaviour=a}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){"use strict";function l(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../lib/lang"),s=e("../../range").Range,o=e("./fold_mode").FoldMode,u=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e,t){o.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(a,o);var f=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t=="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r=new f;for(var i=0;i<n.length;i++){var s=n[i];if(l(s,"tag-open")){r.end.column=r.start.column+s.value.length,r.closing=l(s,"end-tag-open"),s=n[++i];if(!s)return null;r.tagName=s.value,r.end.column+=s.value.length;for(i++;i<n.length;i++){s=n[i],r.end.column+=s.value.length;if(l(s,"tag-close")){r.selfClosing=s.value=="/>";break}}return r}if(l(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o<i.length;o++){var u=i[o];s+=u.value.length;if(s<r)continue;if(l(u,"end-tag-open")){u=i[o+1];if(u&&u.value==n)return!0}}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new f;do if(l(t,"tag-open"))n.closing=l(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(l(t,"tag-name"))n.tagName=t.value;else if(l(t,"tag-close"))return n.selfClosing=t.value=="/>",n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new f;do{if(l(t,"tag-open"))return n.closing=l(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;l(t,"tag-name")?n.tagName=t.value:l(t,"tag-close")&&(n.selfClosing=t.value=="/>",n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.start.column),l={row:n,column:r.start.column+r.tagName.length+2};r.start.row==r.end.row&&(l.column=r.end.column);while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromPoints(l,a.start)}else o.push(a)}}else{var f=new u(e,n,r.end.column),c={row:n,column:r.start.column};while(a=this._readTagBackward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(!a.closing){this._pop(o,a);if(o.length==0)return a.start.column+=a.tagName.length+2,a.start.row==a.end.row&&a.start.column<a.end.column&&(a.start.column=a.end.column),s.fromPoints(a.start,c)}else o.push(a)}}}}).call(a.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={html:{manifest:1},head:{},title:{},base:{href:1,target:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},noscript:{href:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},section:{},nav:{},article:{pubdate:1},aside:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},header:{},footer:{},address:{},main:{},p:{},hr:{},pre:{},blockquote:{cite:1},ol:{start:1,reversed:1},ul:{},li:{value:1},dl:{},dt:{},dd:{},figure:{},figcaption:{},div:{},a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},em:{},strong:{},small:{},s:{},cite:{},q:{cite:1},dfn:{},abbr:{},data:{},time:{datetime:1},code:{},"var":{},samp:{},kbd:{},sub:{},sup:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{},bdo:{},span:{},br:{},wbr:{},ins:{cite:1,datetime:1},del:{cite:1,datetime:1},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},embed:{src:1,height:1,width:1,type:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},param:{name:1,value:1},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},source:{src:1,type:1,media:1},track:{kind:1,src:1,srclang:1,label:1,"default":1},canvas:{width:1,height:1},map:{name:1},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},svg:{},math:{},table:{summary:1},caption:{},colgroup:{span:1},col:{span:1},tbody:{},thead:{},tfoot:{},tr:{},td:{headers:1,rowspan:1,colspan:1},th:{headers:1,rowspan:1,colspan:1,scope:1},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},fieldset:{disabled:1,form:1,name:1},legend:{},label:{form:1,"for":1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},datalist:{},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},output:{"for":1,form:1,name:1},progress:{value:1,max:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},details:{open:1},summary:{},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},menu:{type:1,label:1},dialog:{open:1}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:Number.MAX_VALUE}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:Number.MAX_VALUE}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html"}.call(v.prototype),t.Mode=v}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-javascript.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-javascript.js deleted file mode 100644 index d3dbb71b3..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-javascript.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?"+e+"",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(l.prototype),t.Mode=l}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-json.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-json.js deleted file mode 100644 index 62029f31f..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-json.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/cstyle").CstyleBehaviour,a=e("./folding/cstyle").FoldMode,f=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(l,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(l.prototype),t.Mode=l}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-jsonata.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-jsonata.js deleted file mode 100644 index 79286abca..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-jsonata.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/jsonata",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/worker/worker_client","ace/mode/text"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=e("../worker/worker_client").WorkerClient,i=Object.keys(jsonata.functions);i.sort(function(e,t){return t.length-e.length}),i=i.join("|").replace(/\$/g,"\\$");var s=function(){var e=this.createKeywordMapper({"keyword.operator":"and|or|in","constant.language":"null|Infinity|NaN|undefined","constant.language.boolean":"true|false","storage.type":"function"},"identifier");this.$rules={start:[{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:"keyword",regex:/λ/},{token:"keyword",regex:i},{token:e,regex:"[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"keyword.operator",regex:/\|\||<=|>=|\.\.|\*\*|!=|:=|[=<>`!$%&*+\-~\/^]/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/}],qqstring:[{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,o);var g=e("./text").Mode,c=function(){this.HighlightRules=s};r.inherits(c,g),function(){this.createWorker=function(t){var e=new a(["ace"],"ace/mode/jsonata_worker","JSONataWorker");return e.attachToDocument(t.getDocument()),e.on("annotate",function(e){t.setAnnotations(e.data)}),e.on("terminate",function(){t.clearAnnotations()}),e},this.$id="ace/mode/jsonata"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-markdown.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-markdown.js deleted file mode 100644 index 120c1bcca..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-markdown.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?"+e+"",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function u(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),a=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var o=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==o&&(u(p,"attribute-value")||u(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(u(p,"tag-whitespace")||u(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(u(p,"attribute-equals")&&(d||c==">")||u(p,"decl-attribute-equals")&&(d||c=="?"))return{text:o+o,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var o=n.getSelectionRange().start,a=new s(r,o.row,o.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(u(f,"tag-name")||u(f,"tag-whitespace")||u(f,"attribute-name")||u(f,"attribute-equals")||u(f,"attribute-value")))return;if(u(f,"reference.attribute-value"))return;if(u(f,"attribute-value")){var l=f.value.charAt(0);if(l=='"'||l=="'"){var c=f.value.charAt(f.value.length-1),h=a.getCurrentTokenColumn()+f.value.length;if(h>o.column||h==o.column&&l!=c)return}}while(!u(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var p=a.getCurrentTokenRow(),d=a.getCurrentTokenColumn();if(u(a.stepBackward(),"end-tag-open"))return;var v=f.value;p==o.row&&(v=v.substring(0,o.column-d));if(this.voidElements.hasOwnProperty(v.toLowerCase()))return;return{text:"></"+v+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var o=n.getCursorPosition(),u=r.getLine(o.row),a=new s(r,o.row,o.column),f=a.getCurrentToken();if(f&&f.type.indexOf("tag-close")!==-1){if(f.value=="/>")return;while(f&&f.type.indexOf("tag-name")===-1)f=a.stepBackward();if(!f)return;var l=f.value,c=a.getCurrentTokenRow();f=a.stepBackward();if(!f||f.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[l]){var h=r.getTokenAt(o.row,o.column+1),u=r.getLine(c),p=this.$getIndent(u),d=p+r.getTabString();return h&&h.value==="</"?{text:"\n"+d+"\n"+p,selection:[1,d.length,1,d.length]}:{text:"\n"+d}}}}})};r.inherits(a,i),t.XmlBehaviour=a}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){"use strict";function l(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../lib/lang"),s=e("../../range").Range,o=e("./fold_mode").FoldMode,u=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e,t){o.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(a,o);var f=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t=="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r=new f;for(var i=0;i<n.length;i++){var s=n[i];if(l(s,"tag-open")){r.end.column=r.start.column+s.value.length,r.closing=l(s,"end-tag-open"),s=n[++i];if(!s)return null;r.tagName=s.value,r.end.column+=s.value.length;for(i++;i<n.length;i++){s=n[i],r.end.column+=s.value.length;if(l(s,"tag-close")){r.selfClosing=s.value=="/>";break}}return r}if(l(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o<i.length;o++){var u=i[o];s+=u.value.length;if(s<r)continue;if(l(u,"end-tag-open")){u=i[o+1];if(u&&u.value==n)return!0}}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new f;do if(l(t,"tag-open"))n.closing=l(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(l(t,"tag-name"))n.tagName=t.value;else if(l(t,"tag-close"))return n.selfClosing=t.value=="/>",n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new f;do{if(l(t,"tag-open"))return n.closing=l(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;l(t,"tag-name")?n.tagName=t.value:l(t,"tag-close")&&(n.selfClosing=t.value=="/>",n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.start.column),l={row:n,column:r.start.column+r.tagName.length+2};r.start.row==r.end.row&&(l.column=r.end.column);while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromPoints(l,a.start)}else o.push(a)}}else{var f=new u(e,n,r.end.column),c={row:n,column:r.start.column};while(a=this._readTagBackward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(!a.closing){this._pop(o,a);if(o.length==0)return a.start.column+=a.tagName.length+2,a.start.row==a.end.row&&a.start.column<a.end.column&&(a.start.column=a.end.column),s.fromPoints(a.start,c)}else o.push(a)}}}}).call(a.prototype)}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./xml_highlight_rules").XmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,f=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(l,s),function(){this.voidElements=i.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",f=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(e==="ruleset"){var s=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(s)?(/([\w\-]+):[^:]*$/.test(s),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r)}return[]},this.getPropertyCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(!f.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={html:{manifest:1},head:{},title:{},base:{href:1,target:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},noscript:{href:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},section:{},nav:{},article:{pubdate:1},aside:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},header:{},footer:{},address:{},main:{},p:{},hr:{},pre:{},blockquote:{cite:1},ol:{start:1,reversed:1},ul:{},li:{value:1},dl:{},dt:{},dd:{},figure:{},figcaption:{},div:{},a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},em:{},strong:{},small:{},s:{},cite:{},q:{cite:1},dfn:{},abbr:{},data:{},time:{datetime:1},code:{},"var":{},samp:{},kbd:{},sub:{},sup:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{},bdo:{},span:{},br:{},wbr:{},ins:{cite:1,datetime:1},del:{cite:1,datetime:1},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},embed:{src:1,height:1,width:1,type:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},param:{name:1,value:1},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},source:{src:1,type:1,media:1},track:{kind:1,src:1,srclang:1,label:1,"default":1},canvas:{width:1,height:1},map:{name:1},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},svg:{},math:{},table:{summary:1},caption:{},colgroup:{span:1},col:{span:1},tbody:{},thead:{},tfoot:{},tr:{},td:{headers:1,rowspan:1,colspan:1},th:{headers:1,rowspan:1,colspan:1,scope:1},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},fieldset:{disabled:1,form:1,name:1},legend:{},label:{form:1,"for":1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},datalist:{},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},output:{"for":1,form:1,name:1},progress:{value:1,max:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},details:{open:1},summary:{},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},menu:{type:1,label:1},dialog:{open:1}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:Number.MAX_VALUE}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:Number.MAX_VALUE}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html"}.call(v.prototype),t.Mode=v}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";function c(e,t){return{token:"support.function",regex:"^\\s*```"+e+"\\s*$",push:t+"start"}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./css_highlight_rules").CssHighlightRules,l=function(e){return"(?:[^"+i.escapeRegExp(e)+"\\\\]|\\\\.)*"},h=function(){a.call(this),this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s*[^ #]|\s+#.)/,next:"header"},c("(?:javascript|js)","jscode-"),c("xml","xmlcode-"),c("html","htmlcode-"),c("css","csscode-"),{token:"support.function",regex:"^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",next:"githubblock"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+l("]")+")(\\]\\s*\\[)("+l("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\[)("+l("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+l('"')+'"\\s*)?'+"(\\))"},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},{token:"support.function",regex:"^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",next:"githubblock"},{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:[{token:"support.function",regex:"^\\s*```",next:"start"},{defaultToken:"support.function"}]}),this.embedRules(o,"jscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(a,"htmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(f,"csscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(u,"xmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.normalizeRules()};r.inherits(h,s),t.MarkdownHighlightRules=h}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="`"?e.bgTokenizer.getState(n)=="start"?"end":"start":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type.lastIndexOf(c,0)===0}function h(){var e=f.value[0];return e=="="?6:e=="-"?5:7-f.value.search(/[^#]/)}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;if(r[0]=="`"){if(e.bgTokenizer.getState(n)!=="start"){while(++n<o){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(u,i,n,0)}while(n-->0){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(n,r.length,u,0)}var f,c="markup.heading";if(l(n)){var p=h();while(++n<o){if(!l(n))continue;var d=h();if(d>=p)break}a=n-(!f||["=","-"].indexOf(f.value[0])==-1?1:2);if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var v=e.getLine(a).length;return new s(u,i,a,v)}}}}.call(o.prototype)}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript").Mode,o=e("./xml").Mode,u=e("./html").Mode,a=e("./markdown_highlight_rules").MarkdownHighlightRules,f=e("./folding/markdown").FoldMode,l=function(){this.HighlightRules=a,this.createModeDelegates({"js-":s,"xml-":o,"html-":u}),this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};r.inherits(l,i),function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!r)return"";var i=r[2];return i||(i=parseInt(r[3],10)+1+"."),r[1]+i+r[4]}return this.$getIndent(t)},this.$id="ace/mode/markdown"}.call(l.prototype),t.Mode=l}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-properties.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-properties.js deleted file mode 100644 index 36a0f1562..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-properties.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-python.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-python.js deleted file mode 100644 index 6b0fac9d1..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-python.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(a.prototype),t.Mode=a}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-sql.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-sql.js deleted file mode 100644 index c4dadd8ee..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-sql.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant",t="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(o.prototype),t.Mode=o}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-swift.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-swift.js deleted file mode 100644 index b34328ef4..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-swift.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/swift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){function t(e,t){var n=t.nestable||t.interpolation,r=t.interpolation&&t.interpolation.nextState||"start",s={regex:e+(t.multiline?"":"(?=.)"),token:"string.start"},o=[t.escape&&{regex:t.escape,token:"character.escape"},t.interpolation&&{token:"paren.quasi.start",regex:i.escapeRegExp(t.interpolation.lead+t.interpolation.open),push:r},t.error&&{regex:t.error,token:"error.invalid"},{regex:e+(t.multiline?"":"|$"),token:"string.end",next:n?"pop":"start"},{defaultToken:"string"}].filter(Boolean);n?s.push=o:s.next=o;if(!t.interpolation)return s;var u=t.interpolation.open,a=t.interpolation.close,f={regex:"["+i.escapeRegExp(u+a)+"]",onMatch:function(e,t,n){this.next=e==u?this.nextState:"";if(e==u&&n.length)return n.unshift("start",t),"paren";if(e==a&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1)return"paren.quasi.end"}return e==u?"paren.lparen":"paren.rparen"},nextState:r};return[f,s]}function n(){return[{token:"comment",regex:"\\/\\/(?=.)",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]},s.getStartRule("doc-start"),{token:"comment.start",regex:/\/\*/,stateName:"nested_comment",push:[s.getTagRule(),{token:"comment.start",regex:/\/\*/,push:"nested_comment"},{token:"comment.end",regex:"\\*\\/",next:"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var e=this.createKeywordMapper({"variable.language":"",keyword:"__COLUMN__|__FILE__|__FUNCTION__|__LINE__|as|associativity|break|case|class|continue|default|deinit|didSet|do|dynamicType|else|enum|extension|fallthrough|for|func|get|if|import|in|infix|init|inout|is|left|let|let|mutating|new|none|nonmutating|operator|override|postfix|precedence|prefix|protocol|return|right|safe|Self|self|set|struct|subscript|switch|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|convenience|dynamic|final|infix|lazy|mutating|nonmutating|optional|override|postfix|prefix|required|static|guard|defer","storage.type":"bool|double|Double|extension|float|Float|int|Int|private|public|string|String","constant.language":"false|Infinity|NaN|nil|no|null|null|off|on|super|this|true|undefined|yes","support.function":""},"identifier");this.$rules={start:[t('"',{escape:/\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/,interpolation:{lead:"\\",open:"(",close:")"},error:/\\./,multiline:!1}),n({type:"c",nestable:!0}),{regex:/@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:"variable.parameter"},{regex:/[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:e},{token:"constant.numeric",regex:/[+-]?(?:0(?:b[01]+|o[0-7]+|x[\da-fA-F])|\d+(?:(?:\.\d*)?(?:[PpEe][+-]?\d+)?)\b)/},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};r.inherits(u,o),t.HighlightRules=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./swift_highlight_rules").HighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/",nestable:!0},this.$id="ace/mode/swift"}.call(a.prototype),t.Mode=a}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-yaml.js b/packages/node_modules/@node-red/editor/public/vendor/ace/mode-yaml.js deleted file mode 100644 index 7b3d899a6..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/mode-yaml.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d\s]*$/,onMatch:function(e,t,n,r){var i=/^\s*/.exec(r)[0];return n.length<1?n.push(this.next):n[0]="mlString",n.length<2?n.push(i.length):n[1]=i.length,this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlString:[{token:"indent",regex:/^\s*$/},{token:"indent",regex:/^\s*/,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};r.inherits(s,i),t.YamlHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./yaml_highlight_rules").YamlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/coffee").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart=["#","//"],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/yaml"}.call(a.prototype),t.Mode=a}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/css.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/css.js deleted file mode 100644 index 9659ba49b..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/css.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/css",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet .\n ${1} {\n ${2}\n }\nsnippet !\n !important\nsnippet bdi:m+\n -moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:m\n -moz-border-image: ${1};\nsnippet bdrz:m\n -moz-border-radius: ${1};\nsnippet bxsh:m+\n -moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:m\n -moz-box-shadow: ${1};\nsnippet bdi:w+\n -webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:w\n -webkit-border-image: ${1};\nsnippet bdrz:w\n -webkit-border-radius: ${1};\nsnippet bxsh:w+\n -webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:w\n -webkit-box-shadow: ${1};\nsnippet @f\n @font-face {\n font-family: ${1};\n src: url(${2});\n }\nsnippet @i\n @import url(${1});\nsnippet @m\n @media ${1:print} {\n ${2}\n }\nsnippet bg+\n background: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\nsnippet bga\n background-attachment: ${1};\nsnippet bga:f\n background-attachment: fixed;\nsnippet bga:s\n background-attachment: scroll;\nsnippet bgbk\n background-break: ${1};\nsnippet bgbk:bb\n background-break: bounding-box;\nsnippet bgbk:c\n background-break: continuous;\nsnippet bgbk:eb\n background-break: each-box;\nsnippet bgcp\n background-clip: ${1};\nsnippet bgcp:bb\n background-clip: border-box;\nsnippet bgcp:cb\n background-clip: content-box;\nsnippet bgcp:nc\n background-clip: no-clip;\nsnippet bgcp:pb\n background-clip: padding-box;\nsnippet bgc\n background-color: #${1:FFF};\nsnippet bgc:t\n background-color: transparent;\nsnippet bgi\n background-image: url(${1});\nsnippet bgi:n\n background-image: none;\nsnippet bgo\n background-origin: ${1};\nsnippet bgo:bb\n background-origin: border-box;\nsnippet bgo:cb\n background-origin: content-box;\nsnippet bgo:pb\n background-origin: padding-box;\nsnippet bgpx\n background-position-x: ${1};\nsnippet bgpy\n background-position-y: ${1};\nsnippet bgp\n background-position: ${1:0} ${2:0};\nsnippet bgr\n background-repeat: ${1};\nsnippet bgr:n\n background-repeat: no-repeat;\nsnippet bgr:x\n background-repeat: repeat-x;\nsnippet bgr:y\n background-repeat: repeat-y;\nsnippet bgr:r\n background-repeat: repeat;\nsnippet bgz\n background-size: ${1};\nsnippet bgz:a\n background-size: auto;\nsnippet bgz:ct\n background-size: contain;\nsnippet bgz:cv\n background-size: cover;\nsnippet bg\n background: ${1};\nsnippet bg:ie\n filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\nsnippet bg:n\n background: none;\nsnippet bd+\n border: ${1:1px} ${2:solid} #${3:000};\nsnippet bdb+\n border-bottom: ${1:1px} ${2:solid} #${3:000};\nsnippet bdbc\n border-bottom-color: #${1:000};\nsnippet bdbi\n border-bottom-image: url(${1});\nsnippet bdbi:n\n border-bottom-image: none;\nsnippet bdbli\n border-bottom-left-image: url(${1});\nsnippet bdbli:c\n border-bottom-left-image: continue;\nsnippet bdbli:n\n border-bottom-left-image: none;\nsnippet bdblrz\n border-bottom-left-radius: ${1};\nsnippet bdbri\n border-bottom-right-image: url(${1});\nsnippet bdbri:c\n border-bottom-right-image: continue;\nsnippet bdbri:n\n border-bottom-right-image: none;\nsnippet bdbrrz\n border-bottom-right-radius: ${1};\nsnippet bdbs\n border-bottom-style: ${1};\nsnippet bdbs:n\n border-bottom-style: none;\nsnippet bdbw\n border-bottom-width: ${1};\nsnippet bdb\n border-bottom: ${1};\nsnippet bdb:n\n border-bottom: none;\nsnippet bdbk\n border-break: ${1};\nsnippet bdbk:c\n border-break: close;\nsnippet bdcl\n border-collapse: ${1};\nsnippet bdcl:c\n border-collapse: collapse;\nsnippet bdcl:s\n border-collapse: separate;\nsnippet bdc\n border-color: #${1:000};\nsnippet bdci\n border-corner-image: url(${1});\nsnippet bdci:c\n border-corner-image: continue;\nsnippet bdci:n\n border-corner-image: none;\nsnippet bdf\n border-fit: ${1};\nsnippet bdf:c\n border-fit: clip;\nsnippet bdf:of\n border-fit: overwrite;\nsnippet bdf:ow\n border-fit: overwrite;\nsnippet bdf:r\n border-fit: repeat;\nsnippet bdf:sc\n border-fit: scale;\nsnippet bdf:sp\n border-fit: space;\nsnippet bdf:st\n border-fit: stretch;\nsnippet bdi\n border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:n\n border-image: none;\nsnippet bdl+\n border-left: ${1:1px} ${2:solid} #${3:000};\nsnippet bdlc\n border-left-color: #${1:000};\nsnippet bdli\n border-left-image: url(${1});\nsnippet bdli:n\n border-left-image: none;\nsnippet bdls\n border-left-style: ${1};\nsnippet bdls:n\n border-left-style: none;\nsnippet bdlw\n border-left-width: ${1};\nsnippet bdl\n border-left: ${1};\nsnippet bdl:n\n border-left: none;\nsnippet bdlt\n border-length: ${1};\nsnippet bdlt:a\n border-length: auto;\nsnippet bdrz\n border-radius: ${1};\nsnippet bdr+\n border-right: ${1:1px} ${2:solid} #${3:000};\nsnippet bdrc\n border-right-color: #${1:000};\nsnippet bdri\n border-right-image: url(${1});\nsnippet bdri:n\n border-right-image: none;\nsnippet bdrs\n border-right-style: ${1};\nsnippet bdrs:n\n border-right-style: none;\nsnippet bdrw\n border-right-width: ${1};\nsnippet bdr\n border-right: ${1};\nsnippet bdr:n\n border-right: none;\nsnippet bdsp\n border-spacing: ${1};\nsnippet bds\n border-style: ${1};\nsnippet bds:ds\n border-style: dashed;\nsnippet bds:dtds\n border-style: dot-dash;\nsnippet bds:dtdtds\n border-style: dot-dot-dash;\nsnippet bds:dt\n border-style: dotted;\nsnippet bds:db\n border-style: double;\nsnippet bds:g\n border-style: groove;\nsnippet bds:h\n border-style: hidden;\nsnippet bds:i\n border-style: inset;\nsnippet bds:n\n border-style: none;\nsnippet bds:o\n border-style: outset;\nsnippet bds:r\n border-style: ridge;\nsnippet bds:s\n border-style: solid;\nsnippet bds:w\n border-style: wave;\nsnippet bdt+\n border-top: ${1:1px} ${2:solid} #${3:000};\nsnippet bdtc\n border-top-color: #${1:000};\nsnippet bdti\n border-top-image: url(${1});\nsnippet bdti:n\n border-top-image: none;\nsnippet bdtli\n border-top-left-image: url(${1});\nsnippet bdtli:c\n border-corner-image: continue;\nsnippet bdtli:n\n border-corner-image: none;\nsnippet bdtlrz\n border-top-left-radius: ${1};\nsnippet bdtri\n border-top-right-image: url(${1});\nsnippet bdtri:c\n border-top-right-image: continue;\nsnippet bdtri:n\n border-top-right-image: none;\nsnippet bdtrrz\n border-top-right-radius: ${1};\nsnippet bdts\n border-top-style: ${1};\nsnippet bdts:n\n border-top-style: none;\nsnippet bdtw\n border-top-width: ${1};\nsnippet bdt\n border-top: ${1};\nsnippet bdt:n\n border-top: none;\nsnippet bdw\n border-width: ${1};\nsnippet bd\n border: ${1};\nsnippet bd:n\n border: none;\nsnippet b\n bottom: ${1};\nsnippet b:a\n bottom: auto;\nsnippet bxsh+\n box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh\n box-shadow: ${1};\nsnippet bxsh:n\n box-shadow: none;\nsnippet bxz\n box-sizing: ${1};\nsnippet bxz:bb\n box-sizing: border-box;\nsnippet bxz:cb\n box-sizing: content-box;\nsnippet cps\n caption-side: ${1};\nsnippet cps:b\n caption-side: bottom;\nsnippet cps:t\n caption-side: top;\nsnippet cl\n clear: ${1};\nsnippet cl:b\n clear: both;\nsnippet cl:l\n clear: left;\nsnippet cl:n\n clear: none;\nsnippet cl:r\n clear: right;\nsnippet cp\n clip: ${1};\nsnippet cp:a\n clip: auto;\nsnippet cp:r\n clip: rect(${1:0} ${2:0} ${3:0} ${4:0});\nsnippet c\n color: #${1:000};\nsnippet ct\n content: ${1};\nsnippet ct:a\n content: attr(${1});\nsnippet ct:cq\n content: close-quote;\nsnippet ct:c\n content: counter(${1});\nsnippet ct:cs\n content: counters(${1});\nsnippet ct:ncq\n content: no-close-quote;\nsnippet ct:noq\n content: no-open-quote;\nsnippet ct:n\n content: normal;\nsnippet ct:oq\n content: open-quote;\nsnippet coi\n counter-increment: ${1};\nsnippet cor\n counter-reset: ${1};\nsnippet cur\n cursor: ${1};\nsnippet cur:a\n cursor: auto;\nsnippet cur:c\n cursor: crosshair;\nsnippet cur:d\n cursor: default;\nsnippet cur:ha\n cursor: hand;\nsnippet cur:he\n cursor: help;\nsnippet cur:m\n cursor: move;\nsnippet cur:p\n cursor: pointer;\nsnippet cur:t\n cursor: text;\nsnippet d\n display: ${1};\nsnippet d:mib\n display: -moz-inline-box;\nsnippet d:mis\n display: -moz-inline-stack;\nsnippet d:b\n display: block;\nsnippet d:cp\n display: compact;\nsnippet d:ib\n display: inline-block;\nsnippet d:itb\n display: inline-table;\nsnippet d:i\n display: inline;\nsnippet d:li\n display: list-item;\nsnippet d:n\n display: none;\nsnippet d:ri\n display: run-in;\nsnippet d:tbcp\n display: table-caption;\nsnippet d:tbc\n display: table-cell;\nsnippet d:tbclg\n display: table-column-group;\nsnippet d:tbcl\n display: table-column;\nsnippet d:tbfg\n display: table-footer-group;\nsnippet d:tbhg\n display: table-header-group;\nsnippet d:tbrg\n display: table-row-group;\nsnippet d:tbr\n display: table-row;\nsnippet d:tb\n display: table;\nsnippet ec\n empty-cells: ${1};\nsnippet ec:h\n empty-cells: hide;\nsnippet ec:s\n empty-cells: show;\nsnippet exp\n expression()\nsnippet fl\n float: ${1};\nsnippet fl:l\n float: left;\nsnippet fl:n\n float: none;\nsnippet fl:r\n float: right;\nsnippet f+\n font: ${1:1em} ${2:Arial},${3:sans-serif};\nsnippet fef\n font-effect: ${1};\nsnippet fef:eb\n font-effect: emboss;\nsnippet fef:eg\n font-effect: engrave;\nsnippet fef:n\n font-effect: none;\nsnippet fef:o\n font-effect: outline;\nsnippet femp\n font-emphasize-position: ${1};\nsnippet femp:a\n font-emphasize-position: after;\nsnippet femp:b\n font-emphasize-position: before;\nsnippet fems\n font-emphasize-style: ${1};\nsnippet fems:ac\n font-emphasize-style: accent;\nsnippet fems:c\n font-emphasize-style: circle;\nsnippet fems:ds\n font-emphasize-style: disc;\nsnippet fems:dt\n font-emphasize-style: dot;\nsnippet fems:n\n font-emphasize-style: none;\nsnippet fem\n font-emphasize: ${1};\nsnippet ff\n font-family: ${1};\nsnippet ff:c\n font-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\nsnippet ff:f\n font-family: ${1:Capitals,Impact},fantasy;\nsnippet ff:m\n font-family: ${1:Monaco,'Courier New'},monospace;\nsnippet ff:ss\n font-family: ${1:Helvetica,Arial},sans-serif;\nsnippet ff:s\n font-family: ${1:Georgia,'Times New Roman'},serif;\nsnippet fza\n font-size-adjust: ${1};\nsnippet fza:n\n font-size-adjust: none;\nsnippet fz\n font-size: ${1};\nsnippet fsm\n font-smooth: ${1};\nsnippet fsm:aw\n font-smooth: always;\nsnippet fsm:a\n font-smooth: auto;\nsnippet fsm:n\n font-smooth: never;\nsnippet fst\n font-stretch: ${1};\nsnippet fst:c\n font-stretch: condensed;\nsnippet fst:e\n font-stretch: expanded;\nsnippet fst:ec\n font-stretch: extra-condensed;\nsnippet fst:ee\n font-stretch: extra-expanded;\nsnippet fst:n\n font-stretch: normal;\nsnippet fst:sc\n font-stretch: semi-condensed;\nsnippet fst:se\n font-stretch: semi-expanded;\nsnippet fst:uc\n font-stretch: ultra-condensed;\nsnippet fst:ue\n font-stretch: ultra-expanded;\nsnippet fs\n font-style: ${1};\nsnippet fs:i\n font-style: italic;\nsnippet fs:n\n font-style: normal;\nsnippet fs:o\n font-style: oblique;\nsnippet fv\n font-variant: ${1};\nsnippet fv:n\n font-variant: normal;\nsnippet fv:sc\n font-variant: small-caps;\nsnippet fw\n font-weight: ${1};\nsnippet fw:b\n font-weight: bold;\nsnippet fw:br\n font-weight: bolder;\nsnippet fw:lr\n font-weight: lighter;\nsnippet fw:n\n font-weight: normal;\nsnippet f\n font: ${1};\nsnippet h\n height: ${1};\nsnippet h:a\n height: auto;\nsnippet l\n left: ${1};\nsnippet l:a\n left: auto;\nsnippet lts\n letter-spacing: ${1};\nsnippet lh\n line-height: ${1};\nsnippet lisi\n list-style-image: url(${1});\nsnippet lisi:n\n list-style-image: none;\nsnippet lisp\n list-style-position: ${1};\nsnippet lisp:i\n list-style-position: inside;\nsnippet lisp:o\n list-style-position: outside;\nsnippet list\n list-style-type: ${1};\nsnippet list:c\n list-style-type: circle;\nsnippet list:dclz\n list-style-type: decimal-leading-zero;\nsnippet list:dc\n list-style-type: decimal;\nsnippet list:d\n list-style-type: disc;\nsnippet list:lr\n list-style-type: lower-roman;\nsnippet list:n\n list-style-type: none;\nsnippet list:s\n list-style-type: square;\nsnippet list:ur\n list-style-type: upper-roman;\nsnippet lis\n list-style: ${1};\nsnippet lis:n\n list-style: none;\nsnippet mb\n margin-bottom: ${1};\nsnippet mb:a\n margin-bottom: auto;\nsnippet ml\n margin-left: ${1};\nsnippet ml:a\n margin-left: auto;\nsnippet mr\n margin-right: ${1};\nsnippet mr:a\n margin-right: auto;\nsnippet mt\n margin-top: ${1};\nsnippet mt:a\n margin-top: auto;\nsnippet m\n margin: ${1};\nsnippet m:4\n margin: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet m:3\n margin: ${1:0} ${2:0} ${3:0};\nsnippet m:2\n margin: ${1:0} ${2:0};\nsnippet m:0\n margin: 0;\nsnippet m:a\n margin: auto;\nsnippet mah\n max-height: ${1};\nsnippet mah:n\n max-height: none;\nsnippet maw\n max-width: ${1};\nsnippet maw:n\n max-width: none;\nsnippet mih\n min-height: ${1};\nsnippet miw\n min-width: ${1};\nsnippet op\n opacity: ${1};\nsnippet op:ie\n filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\nsnippet op:ms\n -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\nsnippet orp\n orphans: ${1};\nsnippet o+\n outline: ${1:1px} ${2:solid} #${3:000};\nsnippet oc\n outline-color: ${1:#000};\nsnippet oc:i\n outline-color: invert;\nsnippet oo\n outline-offset: ${1};\nsnippet os\n outline-style: ${1};\nsnippet ow\n outline-width: ${1};\nsnippet o\n outline: ${1};\nsnippet o:n\n outline: none;\nsnippet ovs\n overflow-style: ${1};\nsnippet ovs:a\n overflow-style: auto;\nsnippet ovs:mq\n overflow-style: marquee;\nsnippet ovs:mv\n overflow-style: move;\nsnippet ovs:p\n overflow-style: panner;\nsnippet ovs:s\n overflow-style: scrollbar;\nsnippet ovx\n overflow-x: ${1};\nsnippet ovx:a\n overflow-x: auto;\nsnippet ovx:h\n overflow-x: hidden;\nsnippet ovx:s\n overflow-x: scroll;\nsnippet ovx:v\n overflow-x: visible;\nsnippet ovy\n overflow-y: ${1};\nsnippet ovy:a\n overflow-y: auto;\nsnippet ovy:h\n overflow-y: hidden;\nsnippet ovy:s\n overflow-y: scroll;\nsnippet ovy:v\n overflow-y: visible;\nsnippet ov\n overflow: ${1};\nsnippet ov:a\n overflow: auto;\nsnippet ov:h\n overflow: hidden;\nsnippet ov:s\n overflow: scroll;\nsnippet ov:v\n overflow: visible;\nsnippet pb\n padding-bottom: ${1};\nsnippet pl\n padding-left: ${1};\nsnippet pr\n padding-right: ${1};\nsnippet pt\n padding-top: ${1};\nsnippet p\n padding: ${1};\nsnippet p:4\n padding: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet p:3\n padding: ${1:0} ${2:0} ${3:0};\nsnippet p:2\n padding: ${1:0} ${2:0};\nsnippet p:0\n padding: 0;\nsnippet pgba\n page-break-after: ${1};\nsnippet pgba:aw\n page-break-after: always;\nsnippet pgba:a\n page-break-after: auto;\nsnippet pgba:l\n page-break-after: left;\nsnippet pgba:r\n page-break-after: right;\nsnippet pgbb\n page-break-before: ${1};\nsnippet pgbb:aw\n page-break-before: always;\nsnippet pgbb:a\n page-break-before: auto;\nsnippet pgbb:l\n page-break-before: left;\nsnippet pgbb:r\n page-break-before: right;\nsnippet pgbi\n page-break-inside: ${1};\nsnippet pgbi:a\n page-break-inside: auto;\nsnippet pgbi:av\n page-break-inside: avoid;\nsnippet pos\n position: ${1};\nsnippet pos:a\n position: absolute;\nsnippet pos:f\n position: fixed;\nsnippet pos:r\n position: relative;\nsnippet pos:s\n position: static;\nsnippet q\n quotes: ${1};\nsnippet q:en\n quotes: '\\201C' '\\201D' '\\2018' '\\2019';\nsnippet q:n\n quotes: none;\nsnippet q:ru\n quotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\nsnippet rz\n resize: ${1};\nsnippet rz:b\n resize: both;\nsnippet rz:h\n resize: horizontal;\nsnippet rz:n\n resize: none;\nsnippet rz:v\n resize: vertical;\nsnippet r\n right: ${1};\nsnippet r:a\n right: auto;\nsnippet tbl\n table-layout: ${1};\nsnippet tbl:a\n table-layout: auto;\nsnippet tbl:f\n table-layout: fixed;\nsnippet tal\n text-align-last: ${1};\nsnippet tal:a\n text-align-last: auto;\nsnippet tal:c\n text-align-last: center;\nsnippet tal:l\n text-align-last: left;\nsnippet tal:r\n text-align-last: right;\nsnippet ta\n text-align: ${1};\nsnippet ta:c\n text-align: center;\nsnippet ta:l\n text-align: left;\nsnippet ta:r\n text-align: right;\nsnippet td\n text-decoration: ${1};\nsnippet td:l\n text-decoration: line-through;\nsnippet td:n\n text-decoration: none;\nsnippet td:o\n text-decoration: overline;\nsnippet td:u\n text-decoration: underline;\nsnippet te\n text-emphasis: ${1};\nsnippet te:ac\n text-emphasis: accent;\nsnippet te:a\n text-emphasis: after;\nsnippet te:b\n text-emphasis: before;\nsnippet te:c\n text-emphasis: circle;\nsnippet te:ds\n text-emphasis: disc;\nsnippet te:dt\n text-emphasis: dot;\nsnippet te:n\n text-emphasis: none;\nsnippet th\n text-height: ${1};\nsnippet th:a\n text-height: auto;\nsnippet th:f\n text-height: font-size;\nsnippet th:m\n text-height: max-size;\nsnippet th:t\n text-height: text-size;\nsnippet ti\n text-indent: ${1};\nsnippet ti:-\n text-indent: -9999px;\nsnippet tj\n text-justify: ${1};\nsnippet tj:a\n text-justify: auto;\nsnippet tj:d\n text-justify: distribute;\nsnippet tj:ic\n text-justify: inter-cluster;\nsnippet tj:ii\n text-justify: inter-ideograph;\nsnippet tj:iw\n text-justify: inter-word;\nsnippet tj:k\n text-justify: kashida;\nsnippet tj:t\n text-justify: tibetan;\nsnippet to+\n text-outline: ${1:0} ${2:0} #${3:000};\nsnippet to\n text-outline: ${1};\nsnippet to:n\n text-outline: none;\nsnippet tr\n text-replace: ${1};\nsnippet tr:n\n text-replace: none;\nsnippet tsh+\n text-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet tsh\n text-shadow: ${1};\nsnippet tsh:n\n text-shadow: none;\nsnippet tt\n text-transform: ${1};\nsnippet tt:c\n text-transform: capitalize;\nsnippet tt:l\n text-transform: lowercase;\nsnippet tt:n\n text-transform: none;\nsnippet tt:u\n text-transform: uppercase;\nsnippet tw\n text-wrap: ${1};\nsnippet tw:no\n text-wrap: none;\nsnippet tw:n\n text-wrap: normal;\nsnippet tw:s\n text-wrap: suppress;\nsnippet tw:u\n text-wrap: unrestricted;\nsnippet t\n top: ${1};\nsnippet t:a\n top: auto;\nsnippet va\n vertical-align: ${1};\nsnippet va:bl\n vertical-align: baseline;\nsnippet va:b\n vertical-align: bottom;\nsnippet va:m\n vertical-align: middle;\nsnippet va:sub\n vertical-align: sub;\nsnippet va:sup\n vertical-align: super;\nsnippet va:tb\n vertical-align: text-bottom;\nsnippet va:tt\n vertical-align: text-top;\nsnippet va:t\n vertical-align: top;\nsnippet v\n visibility: ${1};\nsnippet v:c\n visibility: collapse;\nsnippet v:h\n visibility: hidden;\nsnippet v:v\n visibility: visible;\nsnippet whsc\n white-space-collapse: ${1};\nsnippet whsc:ba\n white-space-collapse: break-all;\nsnippet whsc:bs\n white-space-collapse: break-strict;\nsnippet whsc:k\n white-space-collapse: keep-all;\nsnippet whsc:l\n white-space-collapse: loose;\nsnippet whsc:n\n white-space-collapse: normal;\nsnippet whs\n white-space: ${1};\nsnippet whs:n\n white-space: normal;\nsnippet whs:nw\n white-space: nowrap;\nsnippet whs:pl\n white-space: pre-line;\nsnippet whs:pw\n white-space: pre-wrap;\nsnippet whs:p\n white-space: pre;\nsnippet wid\n widows: ${1};\nsnippet w\n width: ${1};\nsnippet w:a\n width: auto;\nsnippet wob\n word-break: ${1};\nsnippet wob:ba\n word-break: break-all;\nsnippet wob:bs\n word-break: break-strict;\nsnippet wob:k\n word-break: keep-all;\nsnippet wob:l\n word-break: loose;\nsnippet wob:n\n word-break: normal;\nsnippet wos\n word-spacing: ${1};\nsnippet wow\n word-wrap: ${1};\nsnippet wow:no\n word-wrap: none;\nsnippet wow:n\n word-wrap: normal;\nsnippet wow:s\n word-wrap: suppress;\nsnippet wow:u\n word-wrap: unrestricted;\nsnippet z\n z-index: ${1};\nsnippet z:a\n z-index: auto;\nsnippet zoo\n zoom: 1;\n",t.scope="css"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/handlebars.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/handlebars.js deleted file mode 100644 index 70dc88efa..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/handlebars.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/handlebars",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="handlebars"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/html.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/html.js deleted file mode 100644 index 014d850f3..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/html.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/html",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Some useful Unicode entities\n# Non-Breaking Space\nsnippet nbs\n &nbsp;\n# \u2190\nsnippet left\n &#x2190;\n# \u2192\nsnippet right\n &#x2192;\n# \u2191\nsnippet up\n &#x2191;\n# \u2193\nsnippet down\n &#x2193;\n# \u21a9\nsnippet return\n &#x21A9;\n# \u21e4\nsnippet backtab\n &#x21E4;\n# \u21e5\nsnippet tab\n &#x21E5;\n# \u21e7\nsnippet shift\n &#x21E7;\n# \u2303\nsnippet ctrl\n &#x2303;\n# \u2305\nsnippet enter\n &#x2305;\n# \u2318\nsnippet cmd\n &#x2318;\n# \u2325\nsnippet option\n &#x2325;\n# \u2326\nsnippet delete\n &#x2326;\n# \u232b\nsnippet backspace\n &#x232B;\n# \u238b\nsnippet esc\n &#x238B;\n# Generic Doctype\nsnippet doctype HTML 4.01 Strict\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n "http://www.w3.org/TR/html4/strict.dtd">\nsnippet doctype HTML 4.01 Transitional\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n "http://www.w3.org/TR/html4/loose.dtd">\nsnippet doctype HTML 5\n <!DOCTYPE HTML>\nsnippet doctype XHTML 1.0 Frameset\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Strict\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nsnippet doctype XHTML 1.0 Transitional\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\nsnippet doctype XHTML 1.1\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# HTML Doctype 4.01 Strict\nsnippet docts\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n "http://www.w3.org/TR/html4/strict.dtd">\n# HTML Doctype 4.01 Transitional\nsnippet doct\n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n "http://www.w3.org/TR/html4/loose.dtd">\n# HTML Doctype 5\nsnippet doct5\n <!DOCTYPE html>\n# XHTML Doctype 1.0 Frameset\nsnippet docxf\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">\n# XHTML Doctype 1.0 Strict\nsnippet docxs\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n# XHTML Doctype 1.0 Transitional\nsnippet docxt\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n# XHTML Doctype 1.1\nsnippet docx\n <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n# html5shiv\nsnippet html5shiv\n <!--[if lte IE 8]>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"><\/script>\n <![endif]-->\nsnippet html5printshiv\n <!--[if lte IE 8]>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"><\/script>\n <![endif]-->\n# Attributes\nsnippet attr\n ${1:attribute}="${2:property}"\nsnippet attr+\n ${1:attribute}="${2:property}" attr+${3}\nsnippet .\n class="${1}"${2}\nsnippet #\n id="${1}"${2}\nsnippet alt\n alt="${1}"${2}\nsnippet charset\n charset="${1:utf-8}"${2}\nsnippet data\n data-${1}="${2:$1}"${3}\nsnippet for\n for="${1}"${2}\nsnippet height\n height="${1}"${2}\nsnippet href\n href="${1:#}"${2}\nsnippet lang\n lang="${1:en}"${2}\nsnippet media\n media="${1}"${2}\nsnippet name\n name="${1}"${2}\nsnippet rel\n rel="${1}"${2}\nsnippet scope\n scope="${1:row}"${2}\nsnippet src\n src="${1}"${2}\nsnippet title=\n title="${1}"${2}\nsnippet type\n type="${1}"${2}\nsnippet value\n value="${1}"${2}\nsnippet width\n width="${1}"${2}\n# Elements\nsnippet a\n <a href="${1:#}">${2:$1}</a>\nsnippet a.\n <a class="${1}" href="${2:#}">${3:$1}</a>\nsnippet a#\n <a id="${1}" href="${2:#}">${3:$1}</a>\nsnippet a:ext\n <a href="http://${1:example.com}">${2:$1}</a>\nsnippet a:mail\n <a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>\nsnippet abbr\n <abbr title="${1}">${2}</abbr>\nsnippet address\n <address>\n ${1}\n </address>\nsnippet area\n <area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\nsnippet area+\n <area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />\n area+${5}\nsnippet area:c\n <area shape="circle" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:d\n <area shape="default" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:p\n <area shape="poly" coords="${1}" href="${2}" alt="${3}" />\nsnippet area:r\n <area shape="rect" coords="${1}" href="${2}" alt="${3}" />\nsnippet article\n <article>\n ${1}\n </article>\nsnippet article.\n <article class="${1}">\n ${2}\n </article>\nsnippet article#\n <article id="${1}">\n ${2}\n </article>\nsnippet aside\n <aside>\n ${1}\n </aside>\nsnippet aside.\n <aside class="${1}">\n ${2}\n </aside>\nsnippet aside#\n <aside id="${1}">\n ${2}\n </aside>\nsnippet audio\n <audio src="${1}>${2}</audio>\nsnippet b\n <b>${1}</b>\nsnippet base\n <base href="${1}" target="${2}" />\nsnippet bdi\n <bdi>${1}</bdo>\nsnippet bdo\n <bdo dir="${1}">${2}</bdo>\nsnippet bdo:l\n <bdo dir="ltr">${1}</bdo>\nsnippet bdo:r\n <bdo dir="rtl">${1}</bdo>\nsnippet blockquote\n <blockquote>\n ${1}\n </blockquote>\nsnippet body\n <body>\n ${1}\n </body>\nsnippet br\n <br />${1}\nsnippet button\n <button type="${1:submit}">${2}</button>\nsnippet button.\n <button class="${1:button}" type="${2:submit}">${3}</button>\nsnippet button#\n <button id="${1}" type="${2:submit}">${3}</button>\nsnippet button:s\n <button type="submit">${1}</button>\nsnippet button:r\n <button type="reset">${1}</button>\nsnippet canvas\n <canvas>\n ${1}\n </canvas>\nsnippet caption\n <caption>${1}</caption>\nsnippet cite\n <cite>${1}</cite>\nsnippet code\n <code>${1}</code>\nsnippet col\n <col />${1}\nsnippet col+\n <col />\n col+${1}\nsnippet colgroup\n <colgroup>\n ${1}\n </colgroup>\nsnippet colgroup+\n <colgroup>\n <col />\n col+${1}\n </colgroup>\nsnippet command\n <command type="command" label="${1}" icon="${2}" />\nsnippet command:c\n <command type="checkbox" label="${1}" icon="${2}" />\nsnippet command:r\n <command type="radio" radiogroup="${1}" label="${2}" icon="${3}" />\nsnippet datagrid\n <datagrid>\n ${1}\n </datagrid>\nsnippet datalist\n <datalist>\n ${1}\n </datalist>\nsnippet datatemplate\n <datatemplate>\n ${1}\n </datatemplate>\nsnippet dd\n <dd>${1}</dd>\nsnippet dd.\n <dd class="${1}">${2}</dd>\nsnippet dd#\n <dd id="${1}">${2}</dd>\nsnippet del\n <del>${1}</del>\nsnippet details\n <details>${1}</details>\nsnippet dfn\n <dfn>${1}</dfn>\nsnippet dialog\n <dialog>\n ${1}\n </dialog>\nsnippet div\n <div>\n ${1}\n </div>\nsnippet div.\n <div class="${1}">\n ${2}\n </div>\nsnippet div#\n <div id="${1}">\n ${2}\n </div>\nsnippet dl\n <dl>\n ${1}\n </dl>\nsnippet dl.\n <dl class="${1}">\n ${2}\n </dl>\nsnippet dl#\n <dl id="${1}">\n ${2}\n </dl>\nsnippet dl+\n <dl>\n <dt>${1}</dt>\n <dd>${2}</dd>\n dt+${3}\n </dl>\nsnippet dt\n <dt>${1}</dt>\nsnippet dt.\n <dt class="${1}">${2}</dt>\nsnippet dt#\n <dt id="${1}">${2}</dt>\nsnippet dt+\n <dt>${1}</dt>\n <dd>${2}</dd>\n dt+${3}\nsnippet em\n <em>${1}</em>\nsnippet embed\n <embed src=${1} type="${2} />\nsnippet fieldset\n <fieldset>\n ${1}\n </fieldset>\nsnippet fieldset.\n <fieldset class="${1}">\n ${2}\n </fieldset>\nsnippet fieldset#\n <fieldset id="${1}">\n ${2}\n </fieldset>\nsnippet fieldset+\n <fieldset>\n <legend><span>${1}</span></legend>\n ${2}\n </fieldset>\n fieldset+${3}\nsnippet figcaption\n <figcaption>${1}</figcaption>\nsnippet figure\n <figure>${1}</figure>\nsnippet footer\n <footer>\n ${1}\n </footer>\nsnippet footer.\n <footer class="${1}">\n ${2}\n </footer>\nsnippet footer#\n <footer id="${1}">\n ${2}\n </footer>\nsnippet form\n <form action="${1}" method="${2:get}" accept-charset="utf-8">\n ${3}\n </form>\nsnippet form.\n <form class="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n ${4}\n </form>\nsnippet form#\n <form id="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">\n ${4}\n </form>\nsnippet h1\n <h1>${1}</h1>\nsnippet h1.\n <h1 class="${1}">${2}</h1>\nsnippet h1#\n <h1 id="${1}">${2}</h1>\nsnippet h2\n <h2>${1}</h2>\nsnippet h2.\n <h2 class="${1}">${2}</h2>\nsnippet h2#\n <h2 id="${1}">${2}</h2>\nsnippet h3\n <h3>${1}</h3>\nsnippet h3.\n <h3 class="${1}">${2}</h3>\nsnippet h3#\n <h3 id="${1}">${2}</h3>\nsnippet h4\n <h4>${1}</h4>\nsnippet h4.\n <h4 class="${1}">${2}</h4>\nsnippet h4#\n <h4 id="${1}">${2}</h4>\nsnippet h5\n <h5>${1}</h5>\nsnippet h5.\n <h5 class="${1}">${2}</h5>\nsnippet h5#\n <h5 id="${1}">${2}</h5>\nsnippet h6\n <h6>${1}</h6>\nsnippet h6.\n <h6 class="${1}">${2}</h6>\nsnippet h6#\n <h6 id="${1}">${2}</h6>\nsnippet head\n <head>\n <meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\n <title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n ${2}\n </head>\nsnippet header\n <header>\n ${1}\n </header>\nsnippet header.\n <header class="${1}">\n ${2}\n </header>\nsnippet header#\n <header id="${1}">\n ${2}\n </header>\nsnippet hgroup\n <hgroup>\n ${1}\n </hgroup>\nsnippet hgroup.\n <hgroup class="${1}>\n ${2}\n </hgroup>\nsnippet hr\n <hr />${1}\nsnippet html\n <html>\n ${1}\n </html>\nsnippet xhtml\n <html xmlns="http://www.w3.org/1999/xhtml">\n ${1}\n </html>\nsnippet html5\n <!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv="content-type" content="text/html; charset=utf-8" />\n <title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n ${2:meta}\n </head>\n <body>\n ${3:body}\n </body>\n </html>\nsnippet xhtml5\n <!DOCTYPE html>\n <html xmlns="http://www.w3.org/1999/xhtml">\n <head>\n <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />\n <title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\n ${2:meta}\n </head>\n <body>\n ${3:body}\n </body>\n </html>\nsnippet i\n <i>${1}</i>\nsnippet iframe\n <iframe src="${1}" frameborder="0"></iframe>${2}\nsnippet iframe.\n <iframe class="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet iframe#\n <iframe id="${1}" src="${2}" frameborder="0"></iframe>${3}\nsnippet img\n <img src="${1}" alt="${2}" />${3}\nsnippet img.\n <img class="${1}" src="${2}" alt="${3}" />${4}\nsnippet img#\n <img id="${1}" src="${2}" alt="${3}" />${4}\nsnippet input\n <input type="${1:text/submit/hidden/button/image}" name="${2}" id="${3:$2}" value="${4}" />${5}\nsnippet input.\n <input class="${1}" type="${2:text/submit/hidden/button/image}" name="${3}" id="${4:$3}" value="${5}" />${6}\nsnippet input:text\n <input type="text" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:submit\n <input type="submit" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:hidden\n <input type="hidden" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:button\n <input type="button" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:image\n <input type="image" name="${1}" id="${2:$1}" src="${3}" alt="${4}" />${5}\nsnippet input:checkbox\n <input type="checkbox" name="${1}" id="${2:$1}" />${3}\nsnippet input:radio\n <input type="radio" name="${1}" id="${2:$1}" />${3}\nsnippet input:color\n <input type="color" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:date\n <input type="date" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime\n <input type="datetime" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:datetime-local\n <input type="datetime-local" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:email\n <input type="email" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:file\n <input type="file" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:month\n <input type="month" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:number\n <input type="number" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:password\n <input type="password" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:range\n <input type="range" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:reset\n <input type="reset" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:search\n <input type="search" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:time\n <input type="time" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:url\n <input type="url" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet input:week\n <input type="week" name="${1}" id="${2:$1}" value="${3}" />${4}\nsnippet ins\n <ins>${1}</ins>\nsnippet kbd\n <kbd>${1}</kbd>\nsnippet keygen\n <keygen>${1}</keygen>\nsnippet label\n <label for="${2:$1}">${1}</label>\nsnippet label:i\n <label for="${2:$1}">${1}</label>\n <input type="${3:text/submit/hidden/button}" name="${4:$2}" id="${5:$2}" value="${6}" />${7}\nsnippet label:s\n <label for="${2:$1}">${1}</label>\n <select name="${3:$2}" id="${4:$2}">\n <option value="${5}">${6:$5}</option>\n </select>\nsnippet legend\n <legend>${1}</legend>\nsnippet legend+\n <legend><span>${1}</span></legend>\nsnippet li\n <li>${1}</li>\nsnippet li.\n <li class="${1}">${2}</li>\nsnippet li+\n <li>${1}</li>\n li+${2}\nsnippet lia\n <li><a href="${2:#}">${1}</a></li>\nsnippet lia+\n <li><a href="${2:#}">${1}</a></li>\n lia+${3}\nsnippet link\n <link rel="${1}" href="${2}" title="${3}" type="${4}" />${5}\nsnippet link:atom\n <link rel="alternate" href="${1:atom.xml}" title="Atom" type="application/atom+xml" />${2}\nsnippet link:css\n <link rel="stylesheet" href="${2:style.css}" type="text/css" media="${3:all}" />${4}\nsnippet link:favicon\n <link rel="shortcut icon" href="${1:favicon.ico}" type="image/x-icon" />${2}\nsnippet link:rss\n <link rel="alternate" href="${1:rss.xml}" title="RSS" type="application/atom+xml" />${2}\nsnippet link:touch\n <link rel="apple-touch-icon" href="${1:favicon.png}" />${2}\nsnippet map\n <map name="${1}">\n ${2}\n </map>\nsnippet map.\n <map class="${1}" name="${2}">\n ${3}\n </map>\nsnippet map#\n <map name="${1}" id="${2:$1}>\n ${3}\n </map>\nsnippet map+\n <map name="${1}">\n <area shape="${2}" coords="${3}" href="${4}" alt="${5}" />${6}\n </map>${7}\nsnippet mark\n <mark>${1}</mark>\nsnippet menu\n <menu>\n ${1}\n </menu>\nsnippet menu:c\n <menu type="context">\n ${1}\n </menu>\nsnippet menu:t\n <menu type="toolbar">\n ${1}\n </menu>\nsnippet meta\n <meta http-equiv="${1}" content="${2}" />${3}\nsnippet meta:compat\n <meta http-equiv="X-UA-Compatible" content="IE=${1:7,8,edge}" />${3}\nsnippet meta:refresh\n <meta http-equiv="refresh" content="text/html;charset=UTF-8" />${3}\nsnippet meta:utf\n <meta http-equiv="content-type" content="text/html;charset=UTF-8" />${3}\nsnippet meter\n <meter>${1}</meter>\nsnippet nav\n <nav>\n ${1}\n </nav>\nsnippet nav.\n <nav class="${1}">\n ${2}\n </nav>\nsnippet nav#\n <nav id="${1}">\n ${2}\n </nav>\nsnippet noscript\n <noscript>\n ${1}\n </noscript>\nsnippet object\n <object data="${1}" type="${2}">\n ${3}\n </object>${4}\n# Embed QT Movie\nsnippet movie\n <object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"\n codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n <param name="src" value="$1" />\n <param name="controller" value="$4" />\n <param name="autoplay" value="$5" />\n <embed src="${1:movie.mov}"\n width="${2:320}" height="${3:240}"\n controller="${4:true}" autoplay="${5:true}"\n scale="tofit" cache="true"\n pluginspage="http://www.apple.com/quicktime/download/" />\n </object>${6}\nsnippet ol\n <ol>\n ${1}\n </ol>\nsnippet ol.\n <ol class="${1}>\n ${2}\n </ol>\nsnippet ol#\n <ol id="${1}>\n ${2}\n </ol>\nsnippet ol+\n <ol>\n <li>${1}</li>\n li+${2}\n </ol>\nsnippet opt\n <option value="${1}">${2:$1}</option>\nsnippet opt+\n <option value="${1}">${2:$1}</option>\n opt+${3}\nsnippet optt\n <option>${1}</option>\nsnippet optgroup\n <optgroup>\n <option value="${1}">${2:$1}</option>\n opt+${3}\n </optgroup>\nsnippet output\n <output>${1}</output>\nsnippet p\n <p>${1}</p>\nsnippet param\n <param name="${1}" value="${2}" />${3}\nsnippet pre\n <pre>\n ${1}\n </pre>\nsnippet progress\n <progress>${1}</progress>\nsnippet q\n <q>${1}</q>\nsnippet rp\n <rp>${1}</rp>\nsnippet rt\n <rt>${1}</rt>\nsnippet ruby\n <ruby>\n <rp><rt>${1}</rt></rp>\n </ruby>\nsnippet s\n <s>${1}</s>\nsnippet samp\n <samp>\n ${1}\n </samp>\nsnippet script\n <script type="text/javascript" charset="utf-8">\n ${1}\n <\/script>\nsnippet scriptsrc\n <script src="${1}.js" type="text/javascript" charset="utf-8"><\/script>\nsnippet newscript\n <script type="application/javascript" charset="utf-8">\n ${1}\n <\/script>\nsnippet newscriptsrc\n <script src="${1}.js" type="application/javascript" charset="utf-8"><\/script>\nsnippet section\n <section>\n ${1}\n </section>\nsnippet section.\n <section class="${1}">\n ${2}\n </section>\nsnippet section#\n <section id="${1}">\n ${2}\n </section>\nsnippet select\n <select name="${1}" id="${2:$1}">\n ${3}\n </select>\nsnippet select.\n <select name="${1}" id="${2:$1}" class="${3}>\n ${4}\n </select>\nsnippet select+\n <select name="${1}" id="${2:$1}">\n <option value="${3}">${4:$3}</option>\n opt+${5}\n </select>\nsnippet small\n <small>${1}</small>\nsnippet source\n <source src="${1}" type="${2}" media="${3}" />\nsnippet span\n <span>${1}</span>\nsnippet strong\n <strong>${1}</strong>\nsnippet style\n <style type="text/css" media="${1:all}">\n ${2}\n </style>\nsnippet sub\n <sub>${1}</sub>\nsnippet summary\n <summary>\n ${1}\n </summary>\nsnippet sup\n <sup>${1}</sup>\nsnippet table\n <table border="${1:0}">\n ${2}\n </table>\nsnippet table.\n <table class="${1}" border="${2:0}">\n ${3}\n </table>\nsnippet table#\n <table id="${1}" border="${2:0}">\n ${3}\n </table>\nsnippet tbody\n <tbody>\n ${1}\n </tbody>\nsnippet td\n <td>${1}</td>\nsnippet td.\n <td class="${1}">${2}</td>\nsnippet td#\n <td id="${1}">${2}</td>\nsnippet td+\n <td>${1}</td>\n td+${2}\nsnippet textarea\n <textarea name="${1}" id=${2:$1} rows="${3:8}" cols="${4:40}">${5}</textarea>${6}\nsnippet tfoot\n <tfoot>\n ${1}\n </tfoot>\nsnippet th\n <th>${1}</th>\nsnippet th.\n <th class="${1}">${2}</th>\nsnippet th#\n <th id="${1}">${2}</th>\nsnippet th+\n <th>${1}</th>\n th+${2}\nsnippet thead\n <thead>\n ${1}\n </thead>\nsnippet time\n <time datetime="${1}" pubdate="${2:$1}>${3:$1}</time>\nsnippet title\n <title>${1:`substitute(Filename(\'\', \'Page Title\'), \'^.\', \'\\u&\', \'\')`}</title>\nsnippet tr\n <tr>\n ${1}\n </tr>\nsnippet tr+\n <tr>\n <td>${1}</td>\n td+${2}\n </tr>\nsnippet track\n <track src="${1}" srclang="${2}" label="${3}" default="${4:default}>${5}</track>${6}\nsnippet ul\n <ul>\n ${1}\n </ul>\nsnippet ul.\n <ul class="${1}">\n ${2}\n </ul>\nsnippet ul#\n <ul id="${1}">\n ${2}\n </ul>\nsnippet ul+\n <ul>\n <li>${1}</li>\n li+${2}\n </ul>\nsnippet var\n <var>${1}</var>\nsnippet video\n <video src="${1} height="${2}" width="${3}" preload="${5:none}" autoplay="${6:autoplay}>${7}</video>${8}\nsnippet wbr\n <wbr />${1}\n',t.scope="html"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/javascript.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/javascript.js deleted file mode 100644 index 09f0fe0ef..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/javascript.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/javascript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Prototype\nsnippet proto\n ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n ${4:// body...}\n };\n# Function\nsnippet fun\n function ${1?:function_name}(${2:argument}) {\n ${3:// body...}\n }\n# Anonymous Function\nregex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\nsnippet f\n function${M1?: ${1:functionName}}($2) {\n ${0:$TM_SELECTED_TEXT}\n }${M2?;}${M3?,}${M4?)}\n# Immediate function\ntrigger \\(?f\\(\nendTrigger \\)?\nsnippet f(\n (function(${1}) {\n ${0:${TM_SELECTED_TEXT:/* code */}}\n }(${1}));\n# if\nsnippet if\n if (${1:true}) {\n ${0}\n }\n# if ... else\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${0}\n }\n# tertiary conditional\nsnippet ter\n ${1:/* condition */} ? ${2:a} : ${3:b}\n# switch\nsnippet switch\n switch (${1:expression}) {\n case \'${3:case}\':\n ${4:// code}\n break;\n ${5}\n default:\n ${2:// code}\n }\n# case\nsnippet case\n case \'${1:case}\':\n ${2:// code}\n break;\n ${3}\n\n# while (...) {...}\nsnippet wh\n while (${1:/* condition */}) {\n ${0:/* code */}\n }\n# try\nsnippet try\n try {\n ${0:/* code */}\n } catch (e) {}\n# do...while\nsnippet do\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\n# Object Method\nsnippet :f\nregex /([,{[])|^\\s*/:f/\n ${1:method_name}: function(${2:attribute}) {\n ${0}\n }${3:,}\n# setTimeout function\nsnippet setTimeout\nregex /\\b/st|timeout|setTimeo?u?t?/\n setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n# Get Elements\nsnippet gett\n getElementsBy${1:TagName}(\'${2}\')${3}\n# Get Element\nsnippet get\n getElementBy${1:Id}(\'${2}\')${3}\n# console.log (Firebug)\nsnippet cl\n console.log(${1});\n# return\nsnippet ret\n return ${1:result}\n# for (property in object ) { ... }\nsnippet fori\n for (var ${1:prop} in ${2:Things}) {\n ${0:$2[$1]}\n }\n# hasOwnProperty\nsnippet has\n hasOwnProperty(${1})\n# docstring\nsnippet /**\n /**\n * ${1:description}\n *\n */\nsnippet @par\nregex /^\\s*\\*\\s*/@(para?m?)?/\n @param {${1:type}} ${2:name} ${3:description}\nsnippet @ret\n @return {${1:type}} ${2:description}\n# JSON.parse\nsnippet jsonp\n JSON.parse(${1:jstr});\n# JSON.stringify\nsnippet jsons\n JSON.stringify(${1:object});\n# self-defining function\nsnippet sdf\n var ${1:function_name} = function(${2:argument}) {\n ${3:// initial code ...}\n\n $1 = function($2) {\n ${4:// main code}\n };\n }\n# singleton\nsnippet sing\n function ${1:Singleton} (${2:argument}) {\n // the cached instance\n var instance;\n\n // rewrite the constructor\n $1 = function $1($2) {\n return instance;\n };\n \n // carry over the prototype properties\n $1.prototype = this;\n\n // the instance\n instance = new $1();\n\n // reset the constructor pointer\n instance.constructor = $1;\n\n ${3:// code ...}\n\n return instance;\n }\n# class\nsnippet class\nregex /^\\s*/clas{0,2}/\n var ${1:class} = function(${20}) {\n $40$0\n };\n \n (function() {\n ${60:this.prop = ""}\n }).call(${1:class}.prototype);\n \n exports.${1:class} = ${1:class};\n# \nsnippet for-\n for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n ${0:${2:Things}[${1:i}];}\n }\n# for (...) {...}\nsnippet for\n for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n ${3:$2[$1]}$0\n }\n# for (...) {...} (Improved Native For-Loop)\nsnippet forr\n for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n ${3:$2[$1]}$0\n }\n\n\n#modules\nsnippet def\n define(function(require, exports, module) {\n "use strict";\n var ${1/.*\\///} = require("${1}");\n \n $TM_SELECTED_TEXT\n });\nsnippet req\nguard ^\\s*\n var ${1/.*\\///} = require("${1}");\n $0\nsnippet requ\nguard ^\\s*\n var ${1/.*\\/(.)/\\u$1/} = require("${1}").${1/.*\\/(.)/\\u$1/};\n $0\n',t.scope="javascript"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/json.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/json.js deleted file mode 100644 index 5e0e0ea2e..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/json.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/jsonata.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/jsonata.js deleted file mode 100644 index ed84685b7..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/jsonata.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/jsonata",["require","exports","module"],function(n,t,e){"use strict";var s="";for(var a in jsonata.functions)jsonata.functions.hasOwnProperty(a)&&(s+="# "+a+"\nsnippet "+a+"\n\t"+jsonata.getFunctionSnippet(a)+"\n");t.snippetText=s,t.scope="jsonata"}); \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/markdown.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/markdown.js deleted file mode 100644 index 0a4a8f8bd..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/markdown.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n ![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n ![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n',t.scope="markdown"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/properties.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/properties.js deleted file mode 100644 index 6c0b236a7..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/properties.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="properties"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/python.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/python.js deleted file mode 100644 index ee023b2b4..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/python.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/python",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet #!\n #!/usr/bin/env python\nsnippet imp\n import ${1:module}\nsnippet from\n from ${1:package} import ${2:module}\n# Module Docstring\nsnippet docs\n \'\'\'\n File: ${1:FILENAME:file_name}\n Author: ${2:author}\n Description: ${3}\n \'\'\'\nsnippet wh\n while ${1:condition}:\n ${2:# TODO: write code...}\n# dowh - does the same as do...while in other languages\nsnippet dowh\n while True:\n ${1:# TODO: write code...}\n if ${2:condition}:\n break\nsnippet with\n with ${1:expr} as ${2:var}:\n ${3:# TODO: write code...}\n# New Class\nsnippet cl\n class ${1:ClassName}(${2:object}):\n """${3:docstring for $1}"""\n def __init__(self, ${4:arg}):\n ${5:super($1, self).__init__()}\n self.$4 = $4\n ${6}\n# New Function\nsnippet def\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n """${3:docstring for $1}"""\n ${4:# TODO: write code...}\nsnippet deff\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n ${3:# TODO: write code...}\n# New Method\nsnippet defs\n def ${1:mname}(self, ${2:arg}):\n ${3:# TODO: write code...}\n# New Property\nsnippet property\n def ${1:foo}():\n doc = "${2:The $1 property.}"\n def fget(self):\n ${3:return self._$1}\n def fset(self, value):\n ${4:self._$1 = value}\n# Ifs\nsnippet if\n if ${1:condition}:\n ${2:# TODO: write code...}\nsnippet el\n else:\n ${1:# TODO: write code...}\nsnippet ei\n elif ${1:condition}:\n ${2:# TODO: write code...}\n# For\nsnippet for\n for ${1:item} in ${2:items}:\n ${3:# TODO: write code...}\n# Encodes\nsnippet cutf8\n # -*- coding: utf-8 -*-\nsnippet clatin1\n # -*- coding: latin-1 -*-\nsnippet cascii\n # -*- coding: ascii -*-\n# Lambda\nsnippet ld\n ${1:var} = lambda ${2:vars} : ${3:action}\nsnippet .\n self.\nsnippet try Try/Except\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\nsnippet try Try/Except/Else\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n finally:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Else/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\n finally:\n ${6:# TODO: write code...}\n# if __name__ == \'__main__\':\nsnippet ifmain\n if __name__ == \'__main__\':\n ${1:main()}\n# __magic__\nsnippet _\n __${1:init}__${2}\n# python debugger (pdb)\nsnippet pdb\n import pdb; pdb.set_trace()\n# ipython debugger (ipdb)\nsnippet ipdb\n import ipdb; ipdb.set_trace()\n# ipython debugger (pdbbb)\nsnippet pdbbb\n import pdbpp; pdbpp.set_trace()\nsnippet pprint\n import pprint; pprint.pprint(${1})${2}\nsnippet "\n """\n ${1:doc}\n """\n# test function/method\nsnippet test\n def test_${1:description}(${2:self}):\n ${3:# TODO: write code...}\n# test case\nsnippet testcase\n class ${1:ExampleCase}(unittest.TestCase):\n \n def test_${2:description}(self):\n ${3:# TODO: write code...}\nsnippet fut\n from __future__ import ${1}\n#getopt\nsnippet getopt\n try:\n # Short option syntax: "hv:"\n # Long option syntax: "help" or "verbose="\n opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])\n \n except getopt.GetoptError, err:\n # Print debug info\n print str(err)\n ${3:error_action}\n\n for option, argument in opts:\n if option in ("-h", "--help"):\n ${4}\n elif option in ("-v", "--verbose"):\n verbose = argument\n',t.scope="python"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/sql.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/sql.js deleted file mode 100644 index 1bacce06d..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/sql.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/swift.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/swift.js deleted file mode 100644 index 307d39f7c..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/swift.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swift"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/text.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/text.js deleted file mode 100644 index 233803dae..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/text.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/yaml.js b/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/yaml.js deleted file mode 100644 index 80b5d3b36..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/snippets/yaml.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/snippets/yaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="yaml"}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/theme-chrome.js b/packages/node_modules/@node-red/editor/public/vendor/ace/theme-chrome.js deleted file mode 100644 index 29b01c7ab..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/theme-chrome.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/theme-tomorrow.js b/packages/node_modules/@node-red/editor/public/vendor/ace/theme-tomorrow.js deleted file mode 100644 index bae6be05d..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/theme-tomorrow.js +++ /dev/null @@ -1 +0,0 @@ -ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tomorrow",t.cssText=".ace-tomorrow .ace_gutter {background: #f6f6f6;color: #4D4D4C}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow {background-color: #FFFFFF;color: #4D4D4C}.ace-tomorrow .ace_cursor {color: #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #EFEFEF}.ace-tomorrow .ace_gutter-active-line {background-color : #dcdcdc}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #FFFFFF;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #4D4D4C}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_heading,.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-html.js b/packages/node_modules/@node-red/editor/public/vendor/ace/worker-html.js deleted file mode 100644 index b479e44b1..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-html.js +++ /dev/null @@ -1 +0,0 @@ -"no use strict";!function(e){function t(e,t){var n=e,r="";while(n){var i=t[n];if(typeof i=="string")return i+r;if(i)return i.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(i===!1)return"";var s=n.lastIndexOf("/");if(s===-1)break;r=n.substr(s)+r,n=n.slice(0,s)}return e}if(typeof e.window!="undefined"&&e.document)return;if(e.require&&e.define)return;e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i.data,file:t,line:n,col:r,stack:i.stack}})},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(r,i){i||(i=r,r=null);if(!i.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");i=e.normalizeModule(r,i);var s=e.require.modules[i];if(s)return s.initialized||(s.initialized=!0,s.exports=s.factory().exports),s.exports;if(!e.require.tlns)return console.log("unable to load "+i);var o=t(i,e.require.tlns);return o.slice(-3)!=".js"&&(o+=".js"),e.require.id=i,e.require.modules[i]={},importScripts(o),e.require(r,i)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id);if(typeof r!="function"){e.require.modules[t]={exports:r,initialized:!0};return}n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},require.tlns={},e.initBaseUrls=function(t){for(var n in t)require.tlns[n]=t[n]},e.initSender=function(){var n=e.require("ace/lib/event_emitter").EventEmitter,r=e.require("ace/lib/oop"),i=function(){};return function(){r.implement(this,n),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(i.prototype),new i};var n=e.main=null,r=e.sender=null;e.onmessage=function(t){var i=t.data;if(i.event&&r)r._signal(i.event,i.data);else if(i.command)if(n[i.command])n[i.command].apply(n,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),require("ace/lib/es5-shim"),r=e.sender=e.initSender();var s=require(i.module)[i.classname];n=e.main=new s(r)}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function s(e){if(typeof e!="object"||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=s(e[n]);return t}if(Object.prototype.toString.call(e)!=="[object Object]")return e;t={};for(var n in e)t[n]=s(e[n]);return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function t(t,n,r){var i=t.action=="insert",s=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),u=t.start,a=i?u:t.end;return e(n,u,r)?{row:n.row,column:n.column}:e(a,n,!r)?{row:n.row+s,column:n.column+(n.row==a.row?o:0)}:{row:u.row,column:u.column}}r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,s),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new u(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=new o(i,s,u,a),l=this.$lines.slice(e,t+1);return this.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e)},this.$splitAndapplyLargeDelta=function(e,t){var n=e.lines,r=n.length,i=e.start.row,s=e.start.column,o=0,u=0;do{o=u,u+=t-1;var a=n.slice(o,u);if(u>r){e.lines=a,e.start.row=i+o,e.start.column=s;break}a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}while(!0)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(a.prototype),t.Document=a}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../document").Document,s=e("../lib/lang"),o=t.Mirror=function(e){this.sender=e;var t=this.doc=new i(""),n=this.deferredUpdate=s.delayedCall(this.onUpdate.bind(this)),r=this;e.on("change",function(e){var i=e.data;if(i[0].start)t.applyDeltas(i);else for(var s=0;s<i.length;s+=2){if(Array.isArray(i[s+1]))var o={action:"insert",start:i[s],lines:i[s+1]};else var o={action:"remove",start:i[s],end:i[s+1]};t.applyDelta(o,!0)}if(r.$timeout)return n.schedule(r.$timeout);r.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(o.prototype)}),ace.define("ace/mode/html/saxparser",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function s(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return s(n?n:e)},l,l.exports,r,t,n,i)}return n[u].exports}var o=typeof e=="function"&&e;for(var u=0;u<i.length;u++)s(i[u]);return s}({1:[function(e,t,n){function r(e){if(e.namespaceURI==="http://www.w3.org/1999/xhtml")return e.localName==="applet"||e.localName==="caption"||e.localName==="marquee"||e.localName==="object"||e.localName==="table"||e.localName==="td"||e.localName==="th";if(e.namespaceURI==="http://www.w3.org/1998/Math/MathML")return e.localName==="mi"||e.localName==="mo"||e.localName==="mn"||e.localName==="ms"||e.localName==="mtext"||e.localName==="annotation-xml";if(e.namespaceURI==="http://www.w3.org/2000/svg")return e.localName==="foreignObject"||e.localName==="desc"||e.localName==="title"}function i(e){return r(e)||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="ol"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="ul"}function s(e){return e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="table"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="html"}function o(e){return e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="tbody"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="tfoot"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="thead"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="html"}function u(e){return e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="tr"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="html"}function a(e){return r(e)||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="button"}function f(e){return(e.namespaceURI!=="http://www.w3.org/1999/xhtml"||e.localName!=="optgroup")&&(e.namespaceURI!=="http://www.w3.org/1999/xhtml"||e.localName!=="option")}function l(){this.elements=[],this.rootNode=null,this.headElement=null,this.bodyElement=null}l.prototype._inScope=function(e,t){for(var n=this.elements.length-1;n>=0;n--){var r=this.elements[n];if(r.localName===e)return!0;if(t(r))return!1}},l.prototype.push=function(e){this.elements.push(e)},l.prototype.pushHtmlElement=function(e){this.rootNode=e.node,this.push(e)},l.prototype.pushHeadElement=function(e){this.headElement=e.node,this.push(e)},l.prototype.pushBodyElement=function(e){this.bodyElement=e.node,this.push(e)},l.prototype.pop=function(){return this.elements.pop()},l.prototype.remove=function(e){this.elements.splice(this.elements.indexOf(e),1)},l.prototype.popUntilPopped=function(e){var t;do t=this.pop();while(t.localName!=e)},l.prototype.popUntilTableScopeMarker=function(){while(!s(this.top))this.pop()},l.prototype.popUntilTableBodyScopeMarker=function(){while(!o(this.top))this.pop()},l.prototype.popUntilTableRowScopeMarker=function(){while(!u(this.top))this.pop()},l.prototype.item=function(e){return this.elements[e]},l.prototype.contains=function(e){return this.elements.indexOf(e)!==-1},l.prototype.inScope=function(e){return this._inScope(e,r)},l.prototype.inListItemScope=function(e){return this._inScope(e,i)},l.prototype.inTableScope=function(e){return this._inScope(e,s)},l.prototype.inButtonScope=function(e){return this._inScope(e,a)},l.prototype.inSelectScope=function(e){return this._inScope(e,f)},l.prototype.hasNumberedHeaderElementInScope=function(){for(var e=this.elements.length-1;e>=0;e--){var t=this.elements[e];if(t.isNumberedHeader())return!0;if(r(t))return!1}},l.prototype.furthestBlockForFormattingElement=function(e){var t=null;for(var n=this.elements.length-1;n>=0;n--){var r=this.elements[n];if(r.node===e)break;r.isSpecial()&&(t=r)}return t},l.prototype.findIndex=function(e){for(var t=this.elements.length-1;t>=0;t--)if(this.elements[t].localName==e)return t;return-1},l.prototype.remove_openElements_until=function(e){var t=!1,n;while(!t)n=this.elements.pop(),t=e(n);return n},Object.defineProperty(l.prototype,"top",{get:function(){return this.elements[this.elements.length-1]}}),Object.defineProperty(l.prototype,"length",{get:function(){return this.elements.length}}),n.ElementStack=l},{}],2:[function(e,t,n){function o(e){return e>="0"&&e<="9"||e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function a(e){return e>="0"&&e<="9"}var r=e("html5-entities"),i=e("./InputStream").InputStream,s={};Object.keys(r).forEach(function(e){for(var t=0;t<e.length;t++)s[e.substring(0,t+1)]=!0});var f={};f.consumeEntity=function(e,t,n){var f="",l="",c=e.char();if(c===i.EOF)return!1;l+=c;if(c==" "||c=="\n"||c==" "||c==" "||c=="<"||c=="&")return e.unget(l),!1;if(n===c)return e.unget(l),!1;if(c=="#"){c=e.shift(1);if(c===i.EOF)return t._parseError("expected-numeric-entity-but-got-eof"),e.unget(l),!1;l+=c;var h=10,p=a;if(c=="x"||c=="X"){h=16,p=u,c=e.shift(1);if(c===i.EOF)return t._parseError("expected-numeric-entity-but-got-eof"),e.unget(l),!1;l+=c}if(p(c)){var d="";while(c!==i.EOF&&p(c))d+=c,c=e.char();d=parseInt(d,h);var v=this.replaceEntityNumbers(d);v&&(t._parseError("invalid-numeric-entity-replaced"),d=v);if(d>65535&&d<=1114111){d-=65536;var m=((1047552&d)>>10)+55296,g=(1023&d)+56320;f=String.fromCharCode(m,g)}else f=String.fromCharCode(d);return c!==";"&&(t._parseError("numeric-entity-without-semicolon"),e.unget(c)),f}return e.unget(l),t._parseError("expected-numeric-entity"),!1}if(c>="a"&&c<="z"||c>="A"&&c<="Z"){var y="";while(s[l]){r[l]&&(y=l);if(c==";")break;c=e.char();if(c===i.EOF)break;l+=c}return y?(f=r[y],c===";"||!n||!o(c)&&c!=="="?(l.length>y.length&&e.unget(l.substring(y.length)),c!==";"&&t._parseError("named-entity-without-semicolon"),f):(e.unget(l),!1)):(t._parseError("expected-named-entity"),e.unget(l),!1)}},f.replaceEntityNumbers=function(e){switch(e){case 0:return 65533;case 19:return 16;case 128:return 8364;case 129:return 129;case 130:return 8218;case 131:return 402;case 132:return 8222;case 133:return 8230;case 134:return 8224;case 135:return 8225;case 136:return 710;case 137:return 8240;case 138:return 352;case 139:return 8249;case 140:return 338;case 141:return 141;case 142:return 381;case 143:return 143;case 144:return 144;case 145:return 8216;case 146:return 8217;case 147:return 8220;case 148:return 8221;case 149:return 8226;case 150:return 8211;case 151:return 8212;case 152:return 732;case 153:return 8482;case 154:return 353;case 155:return 8250;case 156:return 339;case 157:return 157;case 158:return 382;case 159:return 376;default:if(e>=55296&&e<=57343||e>1114111)return 65533;if(e>=1&&e<=8||e>=14&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||e==11||e==65534||e==131070||e==3145726||e==196607||e==262142||e==262143||e==327678||e==327679||e==393214||e==393215||e==458750||e==458751||e==524286||e==524287||e==589822||e==589823||e==655358||e==655359||e==720894||e==720895||e==786430||e==786431||e==851966||e==851967||e==917502||e==917503||e==983038||e==983039||e==1048574||e==1048575||e==1114110||e==1114111)return e}},n.EntityParser=f},{"./InputStream":3,"html5-entities":12}],3:[function(e,t,n){function r(){this.data="",this.start=0,this.committed=0,this.eof=!1,this.lastLocation={line:0,column:0}}r.EOF=-1,r.DRAIN=-2,r.prototype={slice:function(){if(this.start>=this.data.length){if(!this.eof)throw r.DRAIN;return r.EOF}return this.data.slice(this.start,this.data.length)},"char":function(){if(!this.eof&&this.start>=this.data.length-1)throw r.DRAIN;if(this.start>=this.data.length)return r.EOF;var e=this.data[this.start++];return e==="\r"&&(e="\n"),e},advance:function(e){this.start+=e;if(this.start>=this.data.length){if(!this.eof)throw r.DRAIN;return r.EOF}this.committed>this.data.length/2&&(this.lastLocation=this.location(),this.data=this.data.slice(this.committed),this.start=this.start-this.committed,this.committed=0)},matchWhile:function(e){if(this.eof&&this.start>=this.data.length)return"";var t=new RegExp("^"+e+"+"),n=t.exec(this.slice());if(n){if(!this.eof&&n[0].length==this.data.length-this.start)throw r.DRAIN;return this.advance(n[0].length),n[0]}return""},matchUntil:function(e){var t,n;n=this.slice();if(n===r.EOF)return"";if(t=(new RegExp(e+(this.eof?"|$":""))).exec(n)){var i=this.data.slice(this.start,this.start+t.index);return this.advance(t.index),i.replace(/\r/g,"\n").replace(/\n{2,}/g,"\n")}throw r.DRAIN},append:function(e){this.data+=e},shift:function(e){if(!this.eof&&this.start+e>=this.data.length)throw r.DRAIN;if(this.eof&&this.start>=this.data.length)return r.EOF;var t=this.data.slice(this.start,this.start+e).toString();return this.advance(Math.min(e,this.data.length-this.start)),t},peek:function(e){if(!this.eof&&this.start+e>=this.data.length)throw r.DRAIN;return this.eof&&this.start>=this.data.length?r.EOF:this.data.slice(this.start,Math.min(this.start+e,this.data.length)).toString()},length:function(){return this.data.length-this.start-1},unget:function(e){if(e===r.EOF)return;this.start-=e.length},undo:function(){this.start=this.committed},commit:function(){this.committed=this.start},location:function(){var e=this.lastLocation.line,t=this.lastLocation.column,n=this.data.slice(0,this.committed),r=n.match(/\n/g),i=r?e+r.length:e,s=r?n.length-n.lastIndexOf("\n")-1:t+n.length;return{line:i,column:s}}},n.InputStream=r},{}],4:[function(e,t,n){function i(e,t,n,r){this.localName=t,this.namespaceURI=e,this.attributes=n,this.node=r}function s(e,t){for(var n=0;n<e.attributes.length;n++)if(e.attributes[n].nodeName==t)return e.attributes[n].nodeValue;return null}var r={"http://www.w3.org/1999/xhtml":["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],"http://www.w3.org/1998/Math/MathML":["mi","mo","mn","ms","mtext","annotation-xml"],"http://www.w3.org/2000/svg":["foreignObject","desc","title"]};i.prototype.isSpecial=function(){return this.namespaceURI in r&&r[this.namespaceURI].indexOf(this.localName)>-1},i.prototype.isFosterParenting=function(){return this.namespaceURI==="http://www.w3.org/1999/xhtml"?this.localName==="table"||this.localName==="tbody"||this.localName==="tfoot"||this.localName==="thead"||this.localName==="tr":!1},i.prototype.isNumberedHeader=function(){return this.namespaceURI==="http://www.w3.org/1999/xhtml"?this.localName==="h1"||this.localName==="h2"||this.localName==="h3"||this.localName==="h4"||this.localName==="h5"||this.localName==="h6":!1},i.prototype.isForeign=function(){return this.namespaceURI!="http://www.w3.org/1999/xhtml"},i.prototype.isHtmlIntegrationPoint=function(){if(this.namespaceURI==="http://www.w3.org/1998/Math/MathML"){if(this.localName!=="annotation-xml")return!1;var e=s(this,"encoding");return e?(e=e.toLowerCase(),e==="text/html"||e==="application/xhtml+xml"):!1}return this.namespaceURI==="http://www.w3.org/2000/svg"?this.localName==="foreignObject"||this.localName==="desc"||this.localName==="title":!1},i.prototype.isMathMLTextIntegrationPoint=function(){return this.namespaceURI==="http://www.w3.org/1998/Math/MathML"?this.localName==="mi"||this.localName==="mo"||this.localName==="mn"||this.localName==="ms"||this.localName==="mtext":!1},n.StackItem=i},{}],5:[function(e,t,n){function s(e){return e===" "||e==="\n"||e===" "||e==="\r"||e==="\f"}function o(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"}function u(e){this._tokenHandler=e,this._state=u.DATA,this._inputStream=new r,this._currentToken=null,this._temporaryBuffer="",this._additionalAllowedCharacter=""}var r=e("./InputStream").InputStream,i=e("./EntityParser").EntityParser;u.prototype._parseError=function(e,t){this._tokenHandler.parseError(e,t)},u.prototype._emitToken=function(e){if(e.type==="StartTag")for(var t=1;t<e.data.length;t++)e.data[t].nodeName||e.data.splice(t--,1);else e.type==="EndTag"&&(e.selfClosing&&this._parseError("self-closing-flag-on-end-tag"),e.data.length!==0&&this._parseError("attributes-in-end-tag"));this._tokenHandler.processToken(e),e.type==="StartTag"&&e.selfClosing&&!this._tokenHandler.isSelfClosingFlagAcknowledged()&&this._parseError("non-void-element-with-trailing-solidus",{name:e.name})},u.prototype._emitCurrentToken=function(){this._state=u.DATA,this._emitToken(this._currentToken)},u.prototype._currentAttribute=function(){return this._currentToken.data[this._currentToken.data.length-1]},u.prototype.setState=function(e){this._state=e},u.prototype.tokenize=function(e){function n(e){var n=e.char();if(n===r.EOF)return t._emitToken({type:"EOF",data:null}),!1;if(n==="&")t.setState(a);else if(n==="<")t.setState(j);else if(n==="\0")t._emitToken({type:"Characters",data:n}),e.commit();else{var i=e.matchUntil("&|<|\0");t._emitToken({type:"Characters",data:n+i}),e.commit()}return!0}function a(e){var r=i.consumeEntity(e,t);return t.setState(n),t._emitToken({type:"Characters",data:r||"&"}),!0}function f(e){var n=e.char();if(n===r.EOF)return t._emitToken({type:"EOF",data:null}),!1;if(n==="&")t.setState(l);else if(n==="<")t.setState(d);else if(n==="\0")t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),e.commit();else{var i=e.matchUntil("&|<|\0");t._emitToken({type:"Characters",data:n+i}),e.commit()}return!0}function l(e){var n=i.consumeEntity(e,t);return t.setState(f),t._emitToken({type:"Characters",data:n||"&"}),!0}function c(e){var n=e.char();if(n===r.EOF)return t._emitToken({type:"EOF",data:null}),!1;if(n==="<")t.setState(g);else if(n==="\0")t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),e.commit();else{var i=e.matchUntil("<|\0");t._emitToken({type:"Characters",data:n+i})}return!0}function h(e){var n=e.char();if(n===r.EOF)return t._emitToken({type:"EOF",data:null}),!1;if(n==="\0")t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),e.commit();else{var i=e.matchUntil("\0");t._emitToken({type:"Characters",data:n+i})}return!0}function p(e){var n=e.char();if(n===r.EOF)return t._emitToken({type:"EOF",data:null}),!1;if(n==="<")t.setState(w);else if(n==="\0")t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),e.commit();else{var i=e.matchUntil("<|\0");t._emitToken({type:"Characters",data:n+i})}return!0}function d(e){var n=e.char();return n==="/"?(this._temporaryBuffer="",t.setState(v)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(f)),!0}function v(e){var n=e.char();return o(n)?(this._temporaryBuffer+=n,t.setState(m)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(f)),!0}function m(e){var r=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),i=e.char();return s(i)&&r?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(q)):i==="/"&&r?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(K)):i===">"&&r?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t._emitCurrentToken(),t.setState(n)):o(i)?(this._temporaryBuffer+=i,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(i),t.setState(f)),!0}function g(e){var n=e.char();return n==="/"?(this._temporaryBuffer="",t.setState(y)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(c)),!0}function y(e){var n=e.char();return o(n)?(this._temporaryBuffer+=n,t.setState(b)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(c)),!0}function b(e){var r=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),i=e.char();return s(i)&&r?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(q)):i==="/"&&r?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t.setState(K)):i===">"&&r?(t._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},t._emitCurrentToken(),t.setState(n)):o(i)?(this._temporaryBuffer+=i,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(i),t.setState(c)),!0}function w(e){var n=e.char();return n==="/"?(this._temporaryBuffer="",t.setState(E)):n==="!"?(t._emitToken({type:"Characters",data:"<!"}),t.setState(x)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(p)),!0}function E(e){var n=e.char();return o(n)?(this._temporaryBuffer+=n,t.setState(S)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(p)),!0}function S(e){var n=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),r=e.char();return s(r)&&n?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(q)):r==="/"&&n?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(K)):r===">"&&n?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t._emitCurrentToken()):o(r)?(this._temporaryBuffer+=r,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(r),t.setState(p)),!0}function x(e){var n=e.char();return n==="-"?(t._emitToken({type:"Characters",data:"-"}),t.setState(T)):(e.unget(n),t.setState(p)),!0}function T(e){var n=e.char();return n==="-"?(t._emitToken({type:"Characters",data:"-"}),t.setState(k)):(e.unget(n),t.setState(p)),!0}function N(e){var i=e.char();if(i===r.EOF)e.unget(i),t.setState(n);else if(i==="-")t._emitToken({type:"Characters",data:"-"}),t.setState(C);else if(i==="<")t.setState(L);else if(i==="\0")t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),e.commit();else{var s=e.matchUntil("<|-|\0");t._emitToken({type:"Characters",data:i+s})}return!0}function C(e){var i=e.char();return i===r.EOF?(e.unget(i),t.setState(n)):i==="-"?(t._emitToken({type:"Characters",data:"-"}),t.setState(k)):i==="<"?t.setState(L):i==="\0"?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),t.setState(N)):(t._emitToken({type:"Characters",data:i}),t.setState(N)),!0}function k(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):i==="<"?t.setState(L):i===">"?(t._emitToken({type:"Characters",data:">"}),t.setState(p)):i==="\0"?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),t.setState(N)):(t._emitToken({type:"Characters",data:i}),t.setState(N)),!0}function L(e){var n=e.char();return n==="/"?(this._temporaryBuffer="",t.setState(A)):o(n)?(t._emitToken({type:"Characters",data:"<"+n}),this._temporaryBuffer=n,t.setState(M)):(t._emitToken({type:"Characters",data:"<"}),e.unget(n),t.setState(N)),!0}function A(e){var n=e.char();return o(n)?(this._temporaryBuffer=n,t.setState(O)):(t._emitToken({type:"Characters",data:"</"}),e.unget(n),t.setState(N)),!0}function O(e){var r=t._currentToken&&t._currentToken.name===this._temporaryBuffer.toLowerCase(),i=e.char();return s(i)&&r?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(q)):i==="/"&&r?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(K)):i===">"&&r?(t._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},t.setState(n),t._emitCurrentToken()):o(i)?(this._temporaryBuffer+=i,e.commit()):(t._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(i),t.setState(N)),!0}function M(e){var n=e.char();return s(n)||n==="/"||n===">"?(t._emitToken({type:"Characters",data:n}),this._temporaryBuffer.toLowerCase()==="script"?t.setState(_):t.setState(N)):o(n)?(t._emitToken({type:"Characters",data:n}),this._temporaryBuffer+=n,e.commit()):(e.unget(n),t.setState(N)),!0}function _(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):i==="-"?(t._emitToken({type:"Characters",data:"-"}),t.setState(D)):i==="<"?(t._emitToken({type:"Characters",data:"<"}),t.setState(H)):i==="\0"?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),e.commit()):(t._emitToken({type:"Characters",data:i}),e.commit()),!0}function D(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):i==="-"?(t._emitToken({type:"Characters",data:"-"}),t.setState(P)):i==="<"?(t._emitToken({type:"Characters",data:"<"}),t.setState(H)):i==="\0"?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),t.setState(_)):(t._emitToken({type:"Characters",data:i}),t.setState(_)),!0}function P(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-script"),e.unget(i),t.setState(n)):i==="-"?(t._emitToken({type:"Characters",data:"-"}),e.commit()):i==="<"?(t._emitToken({type:"Characters",data:"<"}),t.setState(H)):i===">"?(t._emitToken({type:"Characters",data:">"}),t.setState(p)):i==="\0"?(t._parseError("invalid-codepoint"),t._emitToken({type:"Characters",data:"\ufffd"}),t.setState(_)):(t._emitToken({type:"Characters",data:i}),t.setState(_)),!0}function H(e){var n=e.char();return n==="/"?(t._emitToken({type:"Characters",data:"/"}),this._temporaryBuffer="",t.setState(B)):(e.unget(n),t.setState(_)),!0}function B(e){var n=e.char();return s(n)||n==="/"||n===">"?(t._emitToken({type:"Characters",data:n}),this._temporaryBuffer.toLowerCase()==="script"?t.setState(N):t.setState(_)):o(n)?(t._emitToken({type:"Characters",data:n}),this._temporaryBuffer+=n,e.commit()):(e.unget(n),t.setState(_)),!0}function j(e){var i=e.char();return i===r.EOF?(t._parseError("bare-less-than-sign-at-eof"),t._emitToken({type:"Characters",data:"<"}),e.unget(i),t.setState(n)):o(i)?(t._currentToken={type:"StartTag",name:i.toLowerCase(),data:[]},t.setState(I)):i==="!"?t.setState(G):i==="/"?t.setState(F):i===">"?(t._parseError("expected-tag-name-but-got-right-bracket"),t._emitToken({type:"Characters",data:"<>"}),t.setState(n)):i==="?"?(t._parseError("expected-tag-name-but-got-question-mark"),e.unget(i),t.setState(Q)):(t._parseError("expected-tag-name"),t._emitToken({type:"Characters",data:"<"}),e.unget(i),t.setState(n)),!0}function F(e){var i=e.char();return i===r.EOF?(t._parseError("expected-closing-tag-but-got-eof"),t._emitToken({type:"Characters",data:"</"}),e.unget(i),t.setState(n)):o(i)?(t._currentToken={type:"EndTag",name:i.toLowerCase(),data:[]},t.setState(I)):i===">"?(t._parseError("expected-closing-tag-but-got-right-bracket"),t.setState(n)):(t._parseError("expected-closing-tag-but-got-char",{data:i}),e.unget(i),t.setState(Q)),!0}function I(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-tag-name"),e.unget(i),t.setState(n)):s(i)?t.setState(q):o(i)?t._currentToken.name+=i.toLowerCase():i===">"?t._emitCurrentToken():i==="/"?t.setState(K):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.name+="\ufffd"):t._currentToken.name+=i,e.commit(),!0}function q(e){var i=e.char();if(i===r.EOF)t._parseError("expected-attribute-name-but-got-eof"),e.unget(i),t.setState(n);else{if(s(i))return!0;o(i)?(t._currentToken.data.push({nodeName:i.toLowerCase(),nodeValue:""}),t.setState(R)):i===">"?t._emitCurrentToken():i==="/"?t.setState(K):i==="'"||i==='"'||i==="="||i==="<"?(t._parseError("invalid-character-in-attribute-name"),t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(R)):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.data.push({nodeName:"\ufffd",nodeValue:""})):(t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(R))}return!0}function R(e){var i=e.char(),u=!0,a=!1;i===r.EOF?(t._parseError("eof-in-attribute-name"),e.unget(i),t.setState(n),a=!0):i==="="?t.setState(z):o(i)?(t._currentAttribute().nodeName+=i.toLowerCase(),u=!1):i===">"?a=!0:s(i)?t.setState(U):i==="/"?t.setState(K):i==="'"||i==='"'?(t._parseError("invalid-character-in-attribute-name"),t._currentAttribute().nodeName+=i,u=!1):i==="\0"?(t._parseError("invalid-codepoint"),t._currentAttribute().nodeName+="\ufffd"):(t._currentAttribute().nodeName+=i,u=!1);if(u){var f=t._currentToken.data,l=f[f.length-1];for(var c=f.length-2;c>=0;c--)if(l.nodeName===f[c].nodeName){t._parseError("duplicate-attribute",{name:l.nodeName}),l.nodeName=null;break}a&&t._emitCurrentToken()}else e.commit();return!0}function U(e){var i=e.char();if(i===r.EOF)t._parseError("expected-end-of-tag-but-got-eof"),e.unget(i),t.setState(n);else{if(s(i))return!0;i==="="?t.setState(z):i===">"?t._emitCurrentToken():o(i)?(t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(R)):i==="/"?t.setState(K):i==="'"||i==='"'||i==="<"?(t._parseError("invalid-character-after-attribute-name"),t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(R)):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.data.push({nodeName:"\ufffd",nodeValue:""})):(t._currentToken.data.push({nodeName:i,nodeValue:""}),t.setState(R))}return!0}function z(e){var i=e.char();if(i===r.EOF)t._parseError("expected-attribute-value-but-got-eof"),e.unget(i),t.setState(n);else{if(s(i))return!0;i==='"'?t.setState(W):i==="&"?(t.setState(V),e.unget(i)):i==="'"?t.setState(X):i===">"?(t._parseError("expected-attribute-value-but-got-right-bracket"),t._emitCurrentToken()):i==="="||i==="<"||i==="`"?(t._parseError("unexpected-character-in-unquoted-attribute-value"),t._currentAttribute().nodeValue+=i,t.setState(V)):i==="\0"?(t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="\ufffd"):(t._currentAttribute().nodeValue+=i,t.setState(V))}return!0}function W(e){var i=e.char();if(i===r.EOF)t._parseError("eof-in-attribute-value-double-quote"),e.unget(i),t.setState(n);else if(i==='"')t.setState(J);else if(i==="&")this._additionalAllowedCharacter='"',t.setState($);else if(i==="\0")t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="\ufffd";else{var s=e.matchUntil('[\0"&]');i+=s,t._currentAttribute().nodeValue+=i}return!0}function X(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-attribute-value-single-quote"),e.unget(i),t.setState(n)):i==="'"?t.setState(J):i==="&"?(this._additionalAllowedCharacter="'",t.setState($)):i==="\0"?(t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="\ufffd"):t._currentAttribute().nodeValue+=i+e.matchUntil("\0|['&]"),!0}function V(e){var i=e.char();if(i===r.EOF)t._parseError("eof-after-attribute-value"),e.unget(i),t.setState(n);else if(s(i))t.setState(q);else if(i==="&")this._additionalAllowedCharacter=">",t.setState($);else if(i===">")t._emitCurrentToken();else if(i==='"'||i==="'"||i==="="||i==="`"||i==="<")t._parseError("unexpected-character-in-unquoted-attribute-value"),t._currentAttribute().nodeValue+=i,e.commit();else if(i==="\0")t._parseError("invalid-codepoint"),t._currentAttribute().nodeValue+="\ufffd";else{var o=e.matchUntil("\0|[ \n \f \r&<>\"'=`]");o===r.EOF&&(t._parseError("eof-in-attribute-value-no-quotes"),t._emitCurrentToken()),e.commit(),t._currentAttribute().nodeValue+=i+o}return!0}function $(e){var n=i.consumeEntity(e,t,this._additionalAllowedCharacter);return this._currentAttribute().nodeValue+=n||"&",this._additionalAllowedCharacter==='"'?t.setState(W):this._additionalAllowedCharacter==="'"?t.setState(X):this._additionalAllowedCharacter===">"&&t.setState(V),!0}function J(e){var i=e.char();return i===r.EOF?(t._parseError("eof-after-attribute-value"),e.unget(i),t.setState(n)):s(i)?t.setState(q):i===">"?(t.setState(n),t._emitCurrentToken()):i==="/"?t.setState(K):(t._parseError("unexpected-character-after-attribute-value"),e.unget(i),t.setState(q)),!0}function K(e){var i=e.char();return i===r.EOF?(t._parseError("unexpected-eof-after-solidus-in-tag"),e.unget(i),t.setState(n)):i===">"?(t._currentToken.selfClosing=!0,t.setState(n),t._emitCurrentToken()):(t._parseError("unexpected-character-after-solidus-in-tag"),e.unget(i),t.setState(q)),!0}function Q(e){var r=e.matchUntil(">");return r=r.replace(/\u0000/g,"\ufffd"),e.char(),t._emitToken({type:"Comment",data:r}),t.setState(n),!0}function G(e){var n=e.shift(2);if(n==="--")t._currentToken={type:"Comment",data:""},t.setState(Z);else{var i=e.shift(5);if(i===r.EOF||n===r.EOF)return t._parseError("expected-dashes-or-doctype"),t.setState(Q),e.unget(n),!0;n+=i,n.toUpperCase()==="DOCTYPE"?(t._currentToken={type:"Doctype",name:"",publicId:null,systemId:null,forceQuirks:!1},t.setState(st)):t._tokenHandler.isCdataSectionAllowed()&&n==="[CDATA["?t.setState(Y):(t._parseError("expected-dashes-or-doctype"),e.unget(n),t.setState(Q))}return!0}function Y(e){var r=e.matchUntil("]]>");return e.shift(3),r&&t._emitToken({type:"Characters",data:r}),t.setState(n),!0}function Z(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-comment"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):i==="-"?t.setState(et):i===">"?(t._parseError("incorrect-comment"),t._emitToken(t._currentToken),t.setState(n)):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.data+="\ufffd"):(t._currentToken.data+=i,t.setState(tt)),!0}function et(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-comment"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):i==="-"?t.setState(rt):i===">"?(t._parseError("incorrect-comment"),t._emitToken(t._currentToken),t.setState(n)):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.data+="\ufffd"):(t._currentToken.data+="-"+i,t.setState(tt)),!0}function tt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-comment"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):i==="-"?t.setState(nt):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.data+="\ufffd"):(t._currentToken.data+=i,e.commit()),!0}function nt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-comment-end-dash"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):i==="-"?t.setState(rt):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.data+="-\ufffd",t.setState(tt)):(t._currentToken.data+="-"+i+e.matchUntil("\0|-"),e.char()),!0}function rt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-comment-double-dash"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):i===">"?(t._emitToken(t._currentToken),t.setState(n)):i==="!"?(t._parseError("unexpected-bang-after-double-dash-in-comment"),t.setState(it)):i==="-"?(t._parseError("unexpected-dash-after-double-dash-in-comment"),t._currentToken.data+=i):i==="\0"?(t._parseError("invalid-codepoint"),t._currentToken.data+="--\ufffd",t.setState(tt)):(t._parseError("unexpected-char-in-comment"),t._currentToken.data+="--"+i,t.setState(tt)),!0}function it(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-comment-end-bang-state"),t._emitToken(t._currentToken),e.unget(i),t.setState(n)):i===">"?(t._emitToken(t._currentToken),t.setState(n)):i==="-"?(t._currentToken.data+="--!",t.setState(nt)):(t._currentToken.data+="--!"+i,t.setState(tt)),!0}function st(e){var i=e.char();return i===r.EOF?(t._parseError("expected-doctype-name-but-got-eof"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):s(i)?t.setState(ot):(t._parseError("need-space-after-doctype"),e.unget(i),t.setState(ot)),!0}function ot(e){var i=e.char();return i===r.EOF?(t._parseError("expected-doctype-name-but-got-eof"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):s(i)||(i===">"?(t._parseError("expected-doctype-name-but-got-right-bracket"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):(o(i)&&(i=i.toLowerCase()),t._currentToken.name=i,t.setState(ut))),!0}function ut(e){var i=e.char();return i===r.EOF?(t._currentToken.forceQuirks=!0,e.unget(i),t._parseError("eof-in-doctype-name"),t.setState(n),t._emitCurrentToken()):s(i)?t.setState(at):i===">"?(t.setState(n),t._emitCurrentToken()):(o(i)&&(i=i.toLowerCase()),t._currentToken.name+=i,e.commit()),!0}function at(e){var i=e.char();if(i===r.EOF)t._currentToken.forceQuirks=!0,e.unget(i),t._parseError("eof-in-doctype"),t.setState(n),t._emitCurrentToken();else if(!s(i))if(i===">")t.setState(n),t._emitCurrentToken();else{if(["p","P"].indexOf(i)>-1){var o=[["u","U"],["b","B"],["l","L"],["i","I"],["c","C"]],u=o.every(function(t){return i=e.char(),t.indexOf(i)>-1});if(u)return t.setState(ft),!0}else if(["s","S"].indexOf(i)>-1){var o=[["y","Y"],["s","S"],["t","T"],["e","E"],["m","M"]],u=o.every(function(t){return i=e.char(),t.indexOf(i)>-1});if(u)return t.setState(vt),!0}e.unget(i),t._currentToken.forceQuirks=!0,i===r.EOF?(t._parseError("eof-in-doctype"),e.unget(i),t.setState(n),t._emitCurrentToken()):(t._parseError("expected-space-or-right-bracket-in-doctype",{data:i}),t.setState(wt))}return!0}function ft(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):s(i)?t.setState(lt):i==="'"||i==='"'?(t._parseError("unexpected-char-in-doctype"),e.unget(i),t.setState(lt)):(e.unget(i),t.setState(lt)),!0}function lt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):s(i)||(i==='"'?(t._currentToken.publicId="",t.setState(ct)):i==="'"?(t._currentToken.publicId="",t.setState(ht)):i===">"?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(wt))),!0}function ct(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):i==='"'?t.setState(pt):i===">"?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):t._currentToken.publicId+=i,!0}function ht(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,e.unget(i),t.setState(n),t._emitCurrentToken()):i==="'"?t.setState(pt):i===">"?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t.setState(n),t._emitCurrentToken()):t._currentToken.publicId+=i,!0}function pt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)?t.setState(dt):i===">"?(t.setState(n),t._emitCurrentToken()):i==='"'?(t._parseError("unexpected-char-in-doctype"),t._currentToken.systemId="",t.setState(gt)):i==="'"?(t._parseError("unexpected-char-in-doctype"),t._currentToken.systemId="",t.setState(yt)):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(wt)),!0}function dt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)||(i===">"?(t._emitCurrentToken(),t.setState(n)):i==='"'?(t._currentToken.systemId="",t.setState(gt)):i==="'"?(t._currentToken.systemId="",t.setState(yt)):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(wt))),!0}function vt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)?t.setState(mt):i==="'"||i==='"'?(t._parseError("unexpected-char-in-doctype"),e.unget(i),t.setState(mt)):(e.unget(i),t.setState(mt)),!0}function mt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)||(i==='"'?(t._currentToken.systemId="",t.setState(gt)):i==="'"?(t._currentToken.systemId="",t.setState(yt)):i===">"?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),t.setState(n)):(t._parseError("unexpected-char-in-doctype"),t._currentToken.forceQuirks=!0,t.setState(wt))),!0}function gt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):i==='"'?t.setState(bt):i===">"?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),t.setState(n)):t._currentToken.systemId+=i,!0}function yt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):i==="'"?t.setState(bt):i===">"?(t._parseError("unexpected-end-of-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),t.setState(n)):t._currentToken.systemId+=i,!0}function bt(e){var i=e.char();return i===r.EOF?(t._parseError("eof-in-doctype"),t._currentToken.forceQuirks=!0,t._emitCurrentToken(),e.unget(i),t.setState(n)):s(i)||(i===">"?(t._emitCurrentToken(),t.setState(n)):(t._parseError("unexpected-char-in-doctype"),t.setState(wt))),!0}function wt(e){var i=e.char();return i===r.EOF?(e.unget(i),t._emitCurrentToken(),t.setState(n)):i===">"&&(t._emitCurrentToken(),t.setState(n)),!0}u.DATA=n,u.RCDATA=f,u.RAWTEXT=c,u.SCRIPT_DATA=p,u.PLAINTEXT=h,this._state=u.DATA,this._inputStream.append(e),this._tokenHandler.startTokenization(this),this._inputStream.eof=!0;var t=this;while(this._state.call(this,this._inputStream));},Object.defineProperty(u.prototype,"lineNumber",{get:function(){return this._inputStream.location().line}}),Object.defineProperty(u.prototype,"columnNumber",{get:function(){return this._inputStream.location().column}}),n.Tokenizer=u},{"./EntityParser":2,"./InputStream":3}],6:[function(e,t,n){function c(e){return e===" "||e==="\n"||e===" "||e==="\r"||e==="\f"}function h(e){return c(e)||e==="\ufffd"}function p(e){for(var t=0;t<e.length;t++){var n=e[t];if(!c(n))return!1}return!0}function d(e){for(var t=0;t<e.length;t++){var n=e[t];if(!h(n))return!1}return!0}function v(e,t){for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n];if(r.nodeName===t)return r}return null}function m(e){this.characters=e,this.current=0,this.end=this.characters.length}function g(){this.tokenizer=null,this.errorHandler=null,this.scriptingEnabled=!1,this.document=null,this.head=null,this.form=null,this.openElements=new a,this.activeFormattingElements=[],this.insertionMode=null,this.insertionModeName="",this.originalInsertionMode="",this.inQuirksMode=!1,this.compatMode="no quirks",this.framesetOk=!0,this.redirectAttachToFosterParent=!1,this.selfClosingFlagAcknowledged=!1,this.context="",this.pendingTableCharacters=[],this.shouldSkipLeadingNewline=!1;var e=this,t=this.insertionModes={};t.base={end_tag_handlers:{"-default":"endTagOther"},start_tag_handlers:{"-default":"startTagOther"},processEOF:function(){e.generateImpliedEndTags(),e.openElements.length>2?e.parseError("expected-closing-tag-but-got-eof"):e.openElements.length==2&&e.openElements.item(1).localName!="body"?e.parseError("expected-closing-tag-but-got-eof"):e.context&&e.openElements.length>1},processComment:function(t){e.insertComment(t,e.currentStackItem().node)},processDoctype:function(t,n,r,i){e.parseError("unexpected-doctype")},processStartTag:function(e,t,n){if(this[this.start_tag_handlers[e]])this[this.start_tag_handlers[e]](e,t,n);else{if(!this[this.start_tag_handlers["-default"]])throw new Error("No handler found for "+e);this[this.start_tag_handlers["-default"]](e,t,n)}},processEndTag:function(e){if(this[this.end_tag_handlers[e]])this[this.end_tag_handlers[e]](e);else{if(!this[this.end_tag_handlers["-default"]])throw new Error("No handler found for "+e);this[this.end_tag_handlers["-default"]](e)}},startTagHtml:function(e,n){t.inBody.startTagHtml(e,n)}},t.initial=Object.create(t.base),t.initial.processEOF=function(){e.parseError("expected-doctype-but-got-eof"),this.anythingElse(),e.insertionMode.processEOF()},t.initial.processComment=function(t){e.insertComment(t,e.document)},t.initial.processDoctype=function(t,n,r,i){function s(e){return n.toLowerCase().indexOf(e)===0}e.insertDoctype(t||"",n||"",r||""),i||t!="html"||n!=null&&(["+//silmaril//dtd html pro v0r11 19970101//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//as//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html strict//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//ietf//dtd html//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//spyglass//dtd html 2.0 extended//","-//sq//dtd html 2.0 hotmetal + extensions//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//","html"].some(s)||["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"].indexOf(n.toLowerCase())>-1||r==null&&["-//w3c//dtd html 4.01 transitional//","-//w3c//dtd html 4.01 frameset//"].some(s))||r!=null&&r.toLowerCase()=="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"?(e.compatMode="quirks",e.parseError("quirky-doctype")):n!=null&&(["-//w3c//dtd xhtml 1.0 transitional//","-//w3c//dtd xhtml 1.0 frameset//"].some(s)||r!=null&&["-//w3c//dtd html 4.01 transitional//","-//w3c//dtd html 4.01 frameset//"].indexOf(n.toLowerCase())>-1)?(e.compatMode="limited quirks",e.parseError("almost-standards-doctype")):n=="-//W3C//DTD HTML 4.0//EN"&&(r==null||r=="http://www.w3.org/TR/REC-html40/strict.dtd")||n=="-//W3C//DTD HTML 4.01//EN"&&(r==null||r=="http://www.w3.org/TR/html4/strict.dtd")||n=="-//W3C//DTD XHTML 1.0 Strict//EN"&&r=="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"||n=="-//W3C//DTD XHTML 1.1//EN"&&r=="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"||(r!=null&&r!="about:legacy-compat"||n!=null)&&e.parseError("unknown-doctype"),e.setInsertionMode("beforeHTML")},t.initial.processCharacters=function(t){t.skipLeadingWhitespace();if(!t.length)return;e.parseError("expected-doctype-but-got-chars"),this.anythingElse(),e.insertionMode.processCharacters(t)},t.initial.processStartTag=function(t,n,r){e.parseError("expected-doctype-but-got-start-tag",{name:t}),this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.initial.processEndTag=function(t){e.parseError("expected-doctype-but-got-end-tag",{name:t}),this.anythingElse(),e.insertionMode.processEndTag(t)},t.initial.anythingElse=function(){e.compatMode="quirks",e.setInsertionMode("beforeHTML")},t.beforeHTML=Object.create(t.base),t.beforeHTML.start_tag_handlers={html:"startTagHtml","-default":"startTagOther"},t.beforeHTML.processEOF=function(){this.anythingElse(),e.insertionMode.processEOF()},t.beforeHTML.processComment=function(t){e.insertComment(t,e.document)},t.beforeHTML.processCharacters=function(t){t.skipLeadingWhitespace();if(!t.length)return;this.anythingElse(),e.insertionMode.processCharacters(t)},t.beforeHTML.startTagHtml=function(t,n,r){e.insertHtmlElement(n),e.setInsertionMode("beforeHead")},t.beforeHTML.startTagOther=function(t,n,r){this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.beforeHTML.processEndTag=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.beforeHTML.anythingElse=function(){e.insertHtmlElement(),e.setInsertionMode("beforeHead")},t.afterAfterBody=Object.create(t.base),t.afterAfterBody.start_tag_handlers={html:"startTagHtml","-default":"startTagOther"},t.afterAfterBody.processComment=function(t){e.insertComment(t,e.document)},t.afterAfterBody.processDoctype=function(e){t.inBody.processDoctype(e)},t.afterAfterBody.startTagHtml=function(e,n){t.inBody.startTagHtml(e,n)},t.afterAfterBody.startTagOther=function(t,n,r){e.parseError("unexpected-start-tag",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processStartTag(t,n,r)},t.afterAfterBody.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processEndTag(t)},t.afterAfterBody.processCharacters=function(n){if(!p(n.characters))return e.parseError("unexpected-char-after-body"),e.setInsertionMode("inBody"),e.insertionMode.processCharacters(n);t.inBody.processCharacters(n)},t.afterBody=Object.create(t.base),t.afterBody.end_tag_handlers={html:"endTagHtml","-default":"endTagOther"},t.afterBody.processComment=function(t){e.insertComment(t,e.openElements.rootNode)},t.afterBody.processCharacters=function(n){if(!p(n.characters))return e.parseError("unexpected-char-after-body"),e.setInsertionMode("inBody"),e.insertionMode.processCharacters(n);t.inBody.processCharacters(n)},t.afterBody.processStartTag=function(t,n,r){e.parseError("unexpected-start-tag-after-body",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processStartTag(t,n,r)},t.afterBody.endTagHtml=function(t){e.context?e.parseError("end-html-in-innerhtml"):e.setInsertionMode("afterAfterBody")},t.afterBody.endTagOther=function(t){e.parseError("unexpected-end-tag-after-body",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processEndTag(t)},t.afterFrameset=Object.create(t.base),t.afterFrameset.start_tag_handlers={html:"startTagHtml",noframes:"startTagNoframes","-default":"startTagOther"},t.afterFrameset.end_tag_handlers={html:"endTagHtml","-default":"endTagOther"},t.afterFrameset.processCharacters=function(t){var n=t.takeRemaining(),r="";for(var i=0;i<n.length;i++){var s=n[i];c(s)&&(r+=s)}r&&e.insertText(r),r.length<n.length&&e.parseError("expected-eof-but-got-char")},t.afterFrameset.startTagNoframes=function(e,n){t.inHead.processStartTag(e,n)},t.afterFrameset.startTagOther=function(t,n){e.parseError("unexpected-start-tag-after-frameset",{name:t})},t.afterFrameset.endTagHtml=function(t){e.setInsertionMode("afterAfterFrameset")},t.afterFrameset.endTagOther=function(t){e.parseError("unexpected-end-tag-after-frameset",{name:t})},t.beforeHead=Object.create(t.base),t.beforeHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead","-default":"startTagOther"},t.beforeHead.end_tag_handlers={html:"endTagImplyHead",head:"endTagImplyHead",body:"endTagImplyHead",br:"endTagImplyHead","-default":"endTagOther"},t.beforeHead.processEOF=function(){this.startTagHead("head",[]),e.insertionMode.processEOF()},t.beforeHead.processCharacters=function(t){t.skipLeadingWhitespace();if(!t.length)return;this.startTagHead("head",[]),e.insertionMode.processCharacters(t)},t.beforeHead.startTagHead=function(t,n){e.insertHeadElement(n),e.setInsertionMode("inHead")},t.beforeHead.startTagOther=function(t,n,r){this.startTagHead("head",[]),e.insertionMode.processStartTag(t,n,r)},t.beforeHead.endTagImplyHead=function(t){this.startTagHead("head",[]),e.insertionMode.processEndTag(t)},t.beforeHead.endTagOther=function(t){e.parseError("end-tag-after-implied-root",{name:t})},t.inHead=Object.create(t.base),t.inHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead",title:"startTagTitle",script:"startTagScript",style:"startTagNoFramesStyle",noscript:"startTagNoScript",noframes:"startTagNoFramesStyle",base:"startTagBaseBasefontBgsoundLink",basefont:"startTagBaseBasefontBgsoundLink",bgsound:"startTagBaseBasefontBgsoundLink",link:"startTagBaseBasefontBgsoundLink",meta:"startTagMeta","-default":"startTagOther"},t.inHead.end_tag_handlers={head:"endTagHead",html:"endTagHtmlBodyBr",body:"endTagHtmlBodyBr",br:"endTagHtmlBodyBr","-default":"endTagOther"},t.inHead.processEOF=function(){var t=e.currentStackItem().localName;["title","style","script"].indexOf(t)!=-1&&(e.parseError("expected-named-closing-tag-but-got-eof",{name:t}),e.popElement()),this.anythingElse(),e.insertionMode.processEOF()},t.inHead.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;this.anythingElse(),e.insertionMode.processCharacters(t)},t.inHead.startTagHtml=function(e,n){t.inBody.processStartTag(e,n)},t.inHead.startTagHead=function(t,n){e.parseError("two-heads-are-not-better-than-one")},t.inHead.startTagTitle=function(t,n){e.processGenericRCDATAStartTag(t,n)},t.inHead.startTagNoScript=function(t,n){if(e.scriptingEnabled)return e.processGenericRawTextStartTag(t,n);e.insertElement(t,n),e.setInsertionMode("inHeadNoscript")},t.inHead.startTagNoFramesStyle=function(t,n){e.processGenericRawTextStartTag(t,n)},t.inHead.startTagScript=function(t,n){e.insertElement(t,n),e.tokenizer.setState(u.SCRIPT_DATA),e.originalInsertionMode=e.insertionModeName,e.setInsertionMode("text")},t.inHead.startTagBaseBasefontBgsoundLink=function(t,n){e.insertSelfClosingElement(t,n)},t.inHead.startTagMeta=function(t,n){e.insertSelfClosingElement(t,n)},t.inHead.startTagOther=function(t,n,r){this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.inHead.endTagHead=function(t){e.openElements.item(e.openElements.length-1).localName=="head"?e.openElements.pop():e.parseError("unexpected-end-tag",{name:"head"}),e.setInsertionMode("afterHead")},t.inHead.endTagHtmlBodyBr=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.inHead.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inHead.anythingElse=function(){this.endTagHead("head")},t.afterHead=Object.create(t.base),t.afterHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead",body:"startTagBody",frameset:"startTagFrameset",base:"startTagFromHead",link:"startTagFromHead",meta:"startTagFromHead",script:"startTagFromHead",style:"startTagFromHead",title:"startTagFromHead","-default":"startTagOther"},t.afterHead.end_tag_handlers={body:"endTagBodyHtmlBr",html:"endTagBodyHtmlBr",br:"endTagBodyHtmlBr","-default":"endTagOther"},t.afterHead.processEOF=function(){this.anythingElse(),e.insertionMode.processEOF()},t.afterHead.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;this.anythingElse(),e.insertionMode.processCharacters(t)},t.afterHead.startTagHtml=function(e,n){t.inBody.processStartTag(e,n)},t.afterHead.startTagBody=function(t,n){e.framesetOk=!1,e.insertBodyElement(n),e.setInsertionMode("inBody")},t.afterHead.startTagFrameset=function(t,n){e.insertElement(t,n),e.setInsertionMode("inFrameset")},t.afterHead.startTagFromHead=function(n,r,i){e.parseError("unexpected-start-tag-out-of-my-head",{name:n}),e.openElements.push(e.head),t.inHead.processStartTag(n,r,i),e.openElements.remove(e.head)},t.afterHead.startTagHead=function(t,n,r){e.parseError("unexpected-start-tag",{name:t})},t.afterHead.startTagOther=function(t,n,r){this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.afterHead.endTagBodyHtmlBr=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.afterHead.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t})},t.afterHead.anythingElse=function(){e.insertBodyElement([]),e.setInsertionMode("inBody"),e.framesetOk=!0},t.inBody=Object.create(t.base),t.inBody.start_tag_handlers={html:"startTagHtml",head:"startTagMisplaced",base:"startTagProcessInHead",basefont:"startTagProcessInHead",bgsound:"startTagProcessInHead",link:"startTagProcessInHead",meta:"startTagProcessInHead",noframes:"startTagProcessInHead",script:"startTagProcessInHead",style:"startTagProcessInHead",title:"startTagProcessInHead",body:"startTagBody",form:"startTagForm",plaintext:"startTagPlaintext",a:"startTagA",button:"startTagButton",xmp:"startTagXmp",table:"startTagTable",hr:"startTagHr",image:"startTagImage",input:"startTagInput",textarea:"startTagTextarea",select:"startTagSelect",isindex:"startTagIsindex",applet:"startTagAppletMarqueeObject",marquee:"startTagAppletMarqueeObject",object:"startTagAppletMarqueeObject",li:"startTagListItem",dd:"startTagListItem",dt:"startTagListItem",address:"startTagCloseP",article:"startTagCloseP",aside:"startTagCloseP",blockquote:"startTagCloseP",center:"startTagCloseP",details:"startTagCloseP",dir:"startTagCloseP",div:"startTagCloseP",dl:"startTagCloseP",fieldset:"startTagCloseP",figcaption:"startTagCloseP",figure:"startTagCloseP",footer:"startTagCloseP",header:"startTagCloseP",hgroup:"startTagCloseP",main:"startTagCloseP",menu:"startTagCloseP",nav:"startTagCloseP",ol:"startTagCloseP",p:"startTagCloseP",section:"startTagCloseP",summary:"startTagCloseP",ul:"startTagCloseP",listing:"startTagPreListing",pre:"startTagPreListing",b:"startTagFormatting",big:"startTagFormatting",code:"startTagFormatting",em:"startTagFormatting",font:"startTagFormatting",i:"startTagFormatting",s:"startTagFormatting",small:"startTagFormatting",strike:"startTagFormatting",strong:"startTagFormatting",tt:"startTagFormatting",u:"startTagFormatting",nobr:"startTagNobr",area:"startTagVoidFormatting",br:"startTagVoidFormatting",embed:"startTagVoidFormatting",img:"startTagVoidFormatting",keygen:"startTagVoidFormatting",wbr:"startTagVoidFormatting",param:"startTagParamSourceTrack",source:"startTagParamSourceTrack",track:"startTagParamSourceTrack",iframe:"startTagIFrame",noembed:"startTagRawText",noscript:"startTagRawText",h1:"startTagHeading",h2:"startTagHeading",h3:"startTagHeading",h4:"startTagHeading",h5:"startTagHeading",h6:"startTagHeading",caption:"startTagMisplaced",col:"startTagMisplaced",colgroup:"startTagMisplaced",frame:"startTagMisplaced",frameset:"startTagFrameset",tbody:"startTagMisplaced",td:"startTagMisplaced",tfoot:"startTagMisplaced",th:"startTagMisplaced",thead:"startTagMisplaced",tr:"startTagMisplaced",option:"startTagOptionOptgroup",optgroup:"startTagOptionOptgroup",math:"startTagMath",svg:"startTagSVG",rt:"startTagRpRt",rp:"startTagRpRt","-default":"startTagOther"},t.inBody.end_tag_handlers={p:"endTagP",body:"endTagBody",html:"endTagHtml",address:"endTagBlock",article:"endTagBlock",aside:"endTagBlock",blockquote:"endTagBlock",button:"endTagBlock",center:"endTagBlock",details:"endTagBlock",dir:"endTagBlock",div:"endTagBlock",dl:"endTagBlock",fieldset:"endTagBlock",figcaption:"endTagBlock",figure:"endTagBlock",footer:"endTagBlock",header:"endTagBlock",hgroup:"endTagBlock",listing:"endTagBlock",main:"endTagBlock",menu:"endTagBlock",nav:"endTagBlock",ol:"endTagBlock",pre:"endTagBlock",section:"endTagBlock",summary:"endTagBlock",ul:"endTagBlock",form:"endTagForm",applet:"endTagAppletMarqueeObject",marquee:"endTagAppletMarqueeObject",object:"endTagAppletMarqueeObject",dd:"endTagListItem",dt:"endTagListItem",li:"endTagListItem",h1:"endTagHeading",h2:"endTagHeading",h3:"endTagHeading",h4:"endTagHeading",h5:"endTagHeading",h6:"endTagHeading",a:"endTagFormatting",b:"endTagFormatting",big:"endTagFormatting",code:"endTagFormatting",em:"endTagFormatting",font:"endTagFormatting",i:"endTagFormatting",nobr:"endTagFormatting",s:"endTagFormatting",small:"endTagFormatting",strike:"endTagFormatting",strong:"endTagFormatting",tt:"endTagFormatting",u:"endTagFormatting",br:"endTagBr","-default":"endTagOther"},t.inBody.processCharacters=function(t){e.shouldSkipLeadingNewline&&(e.shouldSkipLeadingNewline=!1,t.skipAtMostOneLeadingNewline()),e.reconstructActiveFormattingElements();var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),""});if(!n)return;e.insertText(n),e.framesetOk&&!d(n)&&(e.framesetOk=!1)},t.inBody.startTagHtml=function(t,n){e.parseError("non-html-root"),e.addAttributesToElement(e.openElements.rootNode,n)},t.inBody.startTagProcessInHead=function(e,n){t.inHead.processStartTag(e,n)},t.inBody.startTagBody=function(t,n){e.parseError("unexpected-start-tag",{name:"body"}),e.openElements.length==1||e.openElements.item(1).localName!="body"?r.ok(e.context):(e.framesetOk=!1,e.addAttributesToElement(e.openElements.bodyElement,n))},t.inBody.startTagFrameset=function(t,n){e.parseError("unexpected-start-tag",{name:"frameset"});if(e.openElements.length==1||e.openElements.item(1).localName!="body")r.ok(e.context);else if(e.framesetOk){e.detachFromParent(e.openElements.bodyElement);while(e.openElements.length>1)e.openElements.pop();e.insertElement(t,n),e.setInsertionMode("inFrameset")}},t.inBody.startTagCloseP=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n)},t.inBody.startTagPreListing=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.framesetOk=!1,e.shouldSkipLeadingNewline=!0},t.inBody.startTagForm=function(t,n){e.form?e.parseError("unexpected-start-tag",{name:t}):(e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.form=e.currentStackItem())},t.inBody.startTagRpRt=function(t,n){e.openElements.inScope("ruby")&&(e.generateImpliedEndTags(),e.currentStackItem().localName!="ruby"&&e.parseError("unexpected-start-tag",{name:t})),e.insertElement(t,n)},t.inBody.startTagListItem=function(t,n){var r={li:["li"],dd:["dd","dt"],dt:["dd","dt"]},i=r[t],s=e.openElements;for(var o=s.length-1;o>=0;o--){var u=s.item(o);if(i.indexOf(u.localName)!=-1){e.insertionMode.processEndTag(u.localName);break}if(u.isSpecial()&&u.localName!=="p"&&u.localName!=="address"&&u.localName!=="div")break}e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.framesetOk=!1},t.inBody.startTagPlaintext=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.tokenizer.setState(u.PLAINTEXT)},t.inBody.startTagHeading=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.currentStackItem().isNumberedHeader()&&(e.parseError("unexpected-start-tag",{name:t}),e.popElement()),e.insertElement(t,n)},t.inBody.startTagA=function(t,n){var r=e.elementInActiveFormattingElements("a");r&&(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"a",endName:"a"}),e.adoptionAgencyEndTag("a"),e.openElements.contains(r)&&e.openElements.remove(r),e.removeElementFromActiveFormattingElements(r)),e.reconstructActiveFormattingElements(),e.insertFormattingElement(t,n)},t.inBody.startTagFormatting=function(t,n){e.reconstructActiveFormattingElements(),e.insertFormattingElement(t,n)},t.inBody.startTagNobr=function(t,n){e.reconstructActiveFormattingElements(),e.openElements.inScope("nobr")&&(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"nobr",endName:"nobr"}),this.processEndTag("nobr"),e.reconstructActiveFormattingElements()),e.insertFormattingElement(t,n)},t.inBody.startTagButton=function(t,n){e.openElements.inScope("button")?(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"button",endName:"button"}),this.processEndTag("button"),e.insertionMode.processStartTag(t,n)):(e.framesetOk=!1,e.reconstructActiveFormattingElements(),e.insertElement(t,n))},t.inBody.startTagAppletMarqueeObject=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n),e.activeFormattingElements.push(l),e.framesetOk=!1},t.inBody.endTagAppletMarqueeObject=function(t){e.openElements.inScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t),e.clearActiveFormattingElements()):e.parseError("unexpected-end-tag",{name:t})},t.inBody.startTagXmp=function(t,n){e.openElements.inButtonScope("p")&&this.processEndTag("p"),e.reconstructActiveFormattingElements(),e.processGenericRawTextStartTag(t,n),e.framesetOk=!1},t.inBody.startTagTable=function(t,n){e.compatMode!=="quirks"&&e.openElements.inButtonScope("p")&&this.processEndTag("p"),e.insertElement(t,n),e.setInsertionMode("inTable"),e.framesetOk=!1},t.inBody.startTagVoidFormatting=function(t,n){e.reconstructActiveFormattingElements(),e.insertSelfClosingElement(t,n),e.framesetOk=!1},t.inBody.startTagParamSourceTrack=function(t,n){e.insertSelfClosingElement(t,n)},t.inBody.startTagHr=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertSelfClosingElement(t,n),e.framesetOk=!1},t.inBody.startTagImage=function(t,n){e.parseError("unexpected-start-tag-treated-as",{originalName:"image",newName:"img"}),this.processStartTag("img",n)},t.inBody.startTagInput=function(t,n){var r=e.framesetOk;this.startTagVoidFormatting(t,n);for(var i in n)if(n[i].nodeName=="type"){n[i].nodeValue.toLowerCase()=="hidden"&&(e.framesetOk=r);break}},t.inBody.startTagIsindex=function(t,n){e.parseError("deprecated-tag",{name:"isindex"}),e.selfClosingFlagAcknowledged=!0;if(e.form)return;var r=[],i=[],s="This is a searchable index. Enter search keywords: ";for(var o in n)switch(n[o].nodeName){case"action":r.push({nodeName:"action",nodeValue:n[o].nodeValue});break;case"prompt":s=n[o].nodeValue;break;case"name":break;default:i.push({nodeName:n[o].nodeName,nodeValue:n[o].nodeValue})}i.push({nodeName:"name",nodeValue:"isindex"}),this.processStartTag("form",r),this.processStartTag("hr"),this.processStartTag("label"),this.processCharacters(new m(s)),this.processStartTag("input",i),this.processEndTag("label"),this.processStartTag("hr"),this.processEndTag("form")},t.inBody.startTagTextarea=function(t,n){e.insertElement(t,n),e.tokenizer.setState(u.RCDATA),e.originalInsertionMode=e.insertionModeName,e.shouldSkipLeadingNewline=!0,e.framesetOk=!1,e.setInsertionMode("text")},t.inBody.startTagIFrame=function(t,n){e.framesetOk=!1,this.startTagRawText(t,n)},t.inBody.startTagRawText=function(t,n){e.processGenericRawTextStartTag(t,n)},t.inBody.startTagSelect=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n),e.framesetOk=!1;var r=e.insertionModeName;r=="inTable"||r=="inCaption"||r=="inColumnGroup"||r=="inTableBody"||r=="inRow"||r=="inCell"?e.setInsertionMode("inSelectInTable"):e.setInsertionMode("inSelect")},t.inBody.startTagMisplaced=function(t,n){e.parseError("unexpected-start-tag-ignored",{name:t})},t.inBody.endTagMisplaced=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagBr=function(t){e.parseError("unexpected-end-tag-treated-as",{originalName:"br",newName:"br element"}),e.reconstructActiveFormattingElements(),e.insertElement(t,[]),e.popElement()},t.inBody.startTagOptionOptgroup=function(t,n){e.currentStackItem().localName=="option"&&e.popElement(),e.reconstructActiveFormattingElements(),e.insertElement(t,n)},t.inBody.startTagOther=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n)},t.inBody.endTagOther=function(t){var n;for(var r=e.openElements.length-1;r>0;r--){n=e.openElements.item(r);if(n.localName==t){e.generateImpliedEndTags(t),e.currentStackItem().localName!=t&&e.parseError("unexpected-end-tag",{name:t}),e.openElements.remove_openElements_until(function(e){return e===n});break}if(n.isSpecial()){e.parseError("unexpected-end-tag",{name:t});break}}},t.inBody.startTagMath=function(t,n,r){e.reconstructActiveFormattingElements(),n=e.adjustMathMLAttributes(n),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,"http://www.w3.org/1998/Math/MathML",r)},t.inBody.startTagSVG=function(t,n,r){e.reconstructActiveFormattingElements(),n=e.adjustSVGAttributes(n),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,"http://www.w3.org/2000/svg",r)},t.inBody.endTagP=function(t){e.openElements.inButtonScope("p")?(e.generateImpliedEndTags("p"),e.currentStackItem().localName!="p"&&e.parseError("unexpected-implied-end-tag",{name:"p"}),e.openElements.popUntilPopped(t)):(e.parseError("unexpected-end-tag",{name:"p"}),this.startTagCloseP("p",[]),this.endTagP("p"))},t.inBody.endTagBody=function(t){if(!e.openElements.inScope("body")){e.parseError("unexpected-end-tag",{name:t});return}e.currentStackItem().localName!="body"&&e.parseError("expected-one-end-tag-but-got-another",{expectedName:e.currentStackItem().localName,gotName:t}),e.setInsertionMode("afterBody")},t.inBody.endTagHtml=function(t){if(!e.openElements.inScope("body")){e.parseError("unexpected-end-tag",{name:t});return}e.currentStackItem().localName!="body"&&e.parseError("expected-one-end-tag-but-got-another",{expectedName:e.currentStackItem().localName,gotName:t}),e.setInsertionMode("afterBody"),e.insertionMode.processEndTag(t)},t.inBody.endTagBlock=function(t){e.openElements.inScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagForm=function(t){var n=e.form;e.form=null,!n||!e.openElements.inScope(t)?e.parseError("unexpected-end-tag",{name:t}):(e.generateImpliedEndTags(),e.currentStackItem()!=n&&e.parseError("end-tag-too-early-ignored",{name:"form"}),e.openElements.remove(n))},t.inBody.endTagListItem=function(t){e.openElements.inListItemScope(t)?(e.generateImpliedEndTags(t),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagHeading=function(t){if(!e.openElements.hasNumberedHeaderElementInScope()){e.parseError("unexpected-end-tag",{name:t});return}e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.remove_openElements_until(function(e){return e.isNumberedHeader()})},t.inBody.endTagFormatting=function(t,n){e.adoptionAgencyEndTag(t)||this.endTagOther(t,n)},t.inCaption=Object.create(t.base),t.inCaption.start_tag_handlers={html:"startTagHtml",caption:"startTagTableElement",col:"startTagTableElement",colgroup:"startTagTableElement",tbody:"startTagTableElement",td:"startTagTableElement",tfoot:"startTagTableElement",thead:"startTagTableElement",tr:"startTagTableElement","-default":"startTagOther"},t.inCaption.end_tag_handlers={caption:"endTagCaption",table:"endTagTable",body:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",tbody:"endTagIgnore",td:"endTagIgnore",tfood:"endTagIgnore",thead:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inCaption.processCharacters=function(e){t.inBody.processCharacters(e)},t.inCaption.startTagTableElement=function(t,n){e.parseError("unexpected-end-tag",{name:t});var r=!e.openElements.inTableScope("caption");e.insertionMode.processEndTag("caption"),r||e.insertionMode.processStartTag(t,n)},t.inCaption.startTagOther=function(e,n,r){t.inBody.processStartTag(e,n,r)},t.inCaption.endTagCaption=function(t){e.openElements.inTableScope("caption")?(e.generateImpliedEndTags(),e.currentStackItem().localName!="caption"&&e.parseError("expected-one-end-tag-but-got-another",{gotName:"caption",expectedName:e.currentStackItem().localName}),e.openElements.popUntilPopped("caption"),e.clearActiveFormattingElements(),e.setInsertionMode("inTable")):(r.ok(e.context),e.parseError("unexpected-end-tag",{name:t}))},t.inCaption.endTagTable=function(t){e.parseError("unexpected-end-table-in-caption");var n=!e.openElements.inTableScope("caption");e.insertionMode.processEndTag("caption"),n||e.insertionMode.processEndTag(t)},t.inCaption.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inCaption.endTagOther=function(e){t.inBody.processEndTag(e)},t.inCell=Object.create(t.base),t.inCell.start_tag_handlers={html:"startTagHtml",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",td:"startTagTableOther",tfoot:"startTagTableOther",th:"startTagTableOther",thead:"startTagTableOther",tr:"startTagTableOther","-default":"startTagOther"},t.inCell.end_tag_handlers={td:"endTagTableCell",th:"endTagTableCell",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",table:"endTagImply",tbody:"endTagImply",tfoot:"endTagImply",thead:"endTagImply",tr:"endTagImply","-default":"endTagOther"},t.inCell.processCharacters=function(e){t.inBody.processCharacters(e)},t.inCell.startTagTableOther=function(t,n,r){e.openElements.inTableScope("td")||e.openElements.inTableScope("th")?(this.closeCell(),e.insertionMode.processStartTag(t,n,r)):e.parseError("unexpected-start-tag",{name:t})},t.inCell.startTagOther=function(e,n,r){t.inBody.processStartTag(e,n,r)},t.inCell.endTagTableCell=function(t){e.openElements.inTableScope(t)?(e.generateImpliedEndTags(t),e.currentStackItem().localName!=t.toLowerCase()?(e.parseError("unexpected-cell-end-tag",{name:t}),e.openElements.popUntilPopped(t)):e.popElement(),e.clearActiveFormattingElements(),e.setInsertionMode("inRow")):e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagImply=function(t){e.openElements.inTableScope(t)?(this.closeCell(),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagOther=function(e){t.inBody.processEndTag(e)},t.inCell.closeCell=function(){e.openElements.inTableScope("td")?this.endTagTableCell("td"):e.openElements.inTableScope("th")&&this.endTagTableCell("th")},t.inColumnGroup=Object.create(t.base),t.inColumnGroup.start_tag_handlers={html:"startTagHtml",col:"startTagCol","-default":"startTagOther"},t.inColumnGroup.end_tag_handlers={colgroup:"endTagColgroup",col:"endTagCol","-default":"endTagOther"},t.inColumnGroup.ignoreEndTagColgroup=function(){return e.currentStackItem().localName=="html"},t.inColumnGroup.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;var r=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),r||e.insertionMode.processCharacters(t)},t.inColumnGroup.startTagCol=function(t,n){e.insertSelfClosingElement(t,n)},t.inColumnGroup.startTagOther=function(t,n,r){var i=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),i||e.insertionMode.processStartTag(t,n,r)},t.inColumnGroup.endTagColgroup=function(t){this.ignoreEndTagColgroup()?(r.ok(e.context),e.parseError("unexpected-end-tag",{name:t})):(e.popElement(),e.setInsertionMode("inTable"))},t.inColumnGroup.endTagCol=function(t){e.parseError("no-end-tag",{name:"col"})},t.inColumnGroup.endTagOther=function(t){var n=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),n||e.insertionMode.processEndTag(t)},t.inForeignContent=Object.create(t.base),t.inForeignContent.processStartTag=function(t,n,r){if(["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","menu","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].indexOf(t)!=-1||t=="font"&&n.some(function(e){return["color","face","size"].indexOf(e.nodeName)>=0})){e.parseError("unexpected-html-element-in-foreign-content",{name:t});while(e.currentStackItem().isForeign()&&!e.currentStackItem().isHtmlIntegrationPoint()&&!e.currentStackItem().isMathMLTextIntegrationPoint())e.openElements.pop();e.insertionMode.processStartTag(t,n,r);return}e.currentStackItem().namespaceURI=="http://www.w3.org/1998/Math/MathML"&&(n=e.adjustMathMLAttributes(n)),e.currentStackItem().namespaceURI=="http://www.w3.org/2000/svg"&&(t=e.adjustSVGTagNameCase(t),n=e.adjustSVGAttributes(n)),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,e.currentStackItem().namespaceURI,r)},t.inForeignContent.processEndTag=function(t){var n=e.currentStackItem(),r=e.openElements.length-1;n.localName.toLowerCase()!=t&&e.parseError("unexpected-end-tag",{name:t});for(;;){if(r===0)break;if(n.localName.toLowerCase()==t){while(e.openElements.pop()!=n);break}r-=1,n=e.openElements.item(r);if(n.isForeign())continue;e.insertionMode.processEndTag(t);break}},t.inForeignContent.processCharacters=function(t){var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),"\ufffd"}),e.framesetOk&&!d(n)&&(e.framesetOk=!1),e.insertText(n)},t.inHeadNoscript=Object.create(t.base),t.inHeadNoscript.start_tag_handlers={html:"startTagHtml",basefont:"startTagBasefontBgsoundLinkMetaNoframesStyle",bgsound:"startTagBasefontBgsoundLinkMetaNoframesStyle",link:"startTagBasefontBgsoundLinkMetaNoframesStyle",meta:"startTagBasefontBgsoundLinkMetaNoframesStyle",noframes:"startTagBasefontBgsoundLinkMetaNoframesStyle",style:"startTagBasefontBgsoundLinkMetaNoframesStyle",head:"startTagHeadNoscript",noscript:"startTagHeadNoscript","-default":"startTagOther"},t.inHeadNoscript.end_tag_handlers={noscript:"endTagNoscript",br:"endTagBr","-default":"endTagOther"},t.inHeadNoscript.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;e.parseError("unexpected-char-in-frameset"),this.anythingElse(),e.insertionMode.processCharacters(t)},t.inHeadNoscript.processComment=function(e){t.inHead.processComment(e)},t.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle=function(e,n){t.inHead.processStartTag(e,n)},t.inHeadNoscript.startTagHeadNoscript=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t})},t.inHeadNoscript.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t}),this.anythingElse(),e.insertionMode.processStartTag(t,n)},t.inHeadNoscript.endTagBr=function(t,n){e.parseError("unexpected-end-tag-in-frameset",{name:t}),this.anythingElse(),e.insertionMode.processEndTag(t,n)},t.inHeadNoscript.endTagNoscript=function(t,n){e.popElement(),e.setInsertionMode("inHead")},t.inHeadNoscript.endTagOther=function(t,n){e.parseError("unexpected-end-tag-in-frameset",{name:t})},t.inHeadNoscript.anythingElse=function(){e.popElement(),e.setInsertionMode("inHead")},t.inFrameset=Object.create(t.base),t.inFrameset.start_tag_handlers={html:"startTagHtml",frameset:"startTagFrameset",frame:"startTagFrame",noframes:"startTagNoframes","-default":"startTagOther"},t.inFrameset.end_tag_handlers={frameset:"endTagFrameset",noframes:"endTagNoframes","-default":"endTagOther"},t.inFrameset.processCharacters=function(t){e.parseError("unexpected-char-in-frameset")},t.inFrameset.startTagFrameset=function(t,n){e.insertElement(t,n)},t.inFrameset.startTagFrame=function(t,n){e.insertSelfClosingElement(t,n)},t.inFrameset.startTagNoframes=function(e,n){t.inBody.processStartTag(e,n)},t.inFrameset.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t})},t.inFrameset.endTagFrameset=function(t,n){e.currentStackItem().localName=="html"?e.parseError("unexpected-frameset-in-frameset-innerhtml"):e.popElement(),!e.context&&e.currentStackItem().localName!="frameset"&&e.setInsertionMode("afterFrameset")},t.inFrameset.endTagNoframes=function(e){t.inBody.processEndTag(e)},t.inFrameset.endTagOther=function(t){e.parseError("unexpected-end-tag-in-frameset",{name:t})},t.inTable=Object.create(t.base),t.inTable.start_tag_handlers={html:"startTagHtml",caption:"startTagCaption",colgroup:"startTagColgroup",col:"startTagCol",table:"startTagTable",tbody:"startTagRowGroup",tfoot:"startTagRowGroup",thead:"startTagRowGroup",td:"startTagImplyTbody",th:"startTagImplyTbody",tr:"startTagImplyTbody",style:"startTagStyleScript",script:"startTagStyleScript",input:"startTagInput",form:"startTagForm","-default":"startTagOther"},t.inTable.end_tag_handlers={table:"endTagTable",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",tbody:"endTagIgnore",td:"endTagIgnore",tfoot:"endTagIgnore",th:"endTagIgnore",thead:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inTable.processCharacters=function(n){if(e.currentStackItem().isFosterParenting()){var r=e.insertionModeName;e.setInsertionMode("inTableText"),e.originalInsertionMode=r,e.insertionMode.processCharacters(n)}else e.redirectAttachToFosterParent=!0,t.inBody.processCharacters(n),e.redirectAttachToFosterParent=!1},t.inTable.startTagCaption=function(t,n){e.openElements.popUntilTableScopeMarker(),e.activeFormattingElements.push(l),e.insertElement(t,n),e.setInsertionMode("inCaption")},t.inTable.startTagColgroup=function(t,n){e.openElements.popUntilTableScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inColumnGroup")},t.inTable.startTagCol=function(t,n){this.startTagColgroup("colgroup",[]),e.insertionMode.processStartTag(t,n)},t.inTable.startTagRowGroup=function(t,n){e.openElements.popUntilTableScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inTableBody")},t.inTable.startTagImplyTbody=function(t,n){this.startTagRowGroup("tbody",[]),e.insertionMode.processStartTag(t,n)},t.inTable.startTagTable=function(t,n){e.parseError("unexpected-start-tag-implies-end-tag",{startName:"table",endName:"table"}),e.insertionMode.processEndTag("table"),e.context||e.insertionMode.processStartTag(t,n)},t.inTable.startTagStyleScript=function(e,n){t.inHead.processStartTag(e,n)},t.inTable.startTagInput=function(t,n){for(var r in n)if(n[r].nodeName.toLowerCase()=="type"){if(n[r].nodeValue.toLowerCase()=="hidden"){e.parseError("unexpected-hidden-input-in-table"),e.insertElement(t,n),e.openElements.pop();return}break}this.startTagOther(t,n)},t.inTable.startTagForm=function(t,n){e.parseError("unexpected-form-in-table"),e.form||(e.insertElement(t,n),e.form=e.currentStackItem(),e.openElements.pop())},t.inTable.startTagOther=function(n,r,i){e.parseError("unexpected-start-tag-implies-table-voodoo",{name:n}),e.redirectAttachToFosterParent=!0,t.inBody.processStartTag(n,r,i),e.redirectAttachToFosterParent=!1},t.inTable.endTagTable=function(t){e.openElements.inTableScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early-named",{gotName:"table",expectedName:e.currentStackItem().localName}),e.openElements.popUntilPopped("table"),e.resetInsertionMode()):(r.ok(e.context),e.parseError("unexpected-end-tag",{name:t}))},t.inTable.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inTable.endTagOther=function(n){e.parseError("unexpected-end-tag-implies-table-voodoo",{name:n}),e.redirectAttachToFosterParent=!0,t.inBody.processEndTag(n),e.redirectAttachToFosterParent=!1},t.inTableText=Object.create(t.base),t.inTableText.flushCharacters=function(){var t=e.pendingTableCharacters.join("");p(t)?e.insertText(t):(e.redirectAttachToFosterParent=!0,e.reconstructActiveFormattingElements(),e.insertText(t),e.framesetOk=!1,e.redirectAttachToFosterParent=!1),e.pendingTableCharacters=[]},t.inTableText.processComment=function(t){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processComment(t)},t.inTableText.processEOF=function(t){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEOF()},t.inTableText.processCharacters=function(t){var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),""});if(!n)return;e.pendingTableCharacters.push(n)},t.inTableText.processStartTag=function(t,n,r){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processStartTag(t,n,r)},t.inTableText.processEndTag=function(t,n){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEndTag(t,n)},t.inTableBody=Object.create(t.base),t.inTableBody.start_tag_handlers={html:"startTagHtml",tr:"startTagTr",td:"startTagTableCell",th:"startTagTableCell",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",tfoot:"startTagTableOther",thead:"startTagTableOther","-default":"startTagOther"},t.inTableBody.end_tag_handlers={table:"endTagTable",tbody:"endTagTableRowGroup",tfoot:"endTagTableRowGroup",thead:"endTagTableRowGroup",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",td:"endTagIgnore",th:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inTableBody.processCharacters=function(e){t.inTable.processCharacters(e)},t.inTableBody.startTagTr=function(t,n){e.openElements.popUntilTableBodyScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inRow")},t.inTableBody.startTagTableCell=function(t,n){e.parseError("unexpected-cell-in-table-body",{name:t}),this.startTagTr("tr",[]),e.insertionMode.processStartTag(t,n)},t.inTableBody.startTagTableOther=function(t,n){e.openElements.inTableScope("tbody")||e.openElements.inTableScope("thead")||e.openElements.inTableScope("tfoot")?(e.openElements.popUntilTableBodyScopeMarker(),this.endTagTableRowGroup(e.currentStackItem().localName),e.insertionMode.processStartTag(t,n)):e.parseError("unexpected-start-tag",{name:t})},t.inTableBody.startTagOther=function(e,n){t.inTable.processStartTag(e,n)},t.inTableBody.endTagTableRowGroup=function(t){e.openElements.inTableScope(t)?(e.openElements.popUntilTableBodyScopeMarker(),e.popElement(),e.setInsertionMode("inTable")):e.parseError("unexpected-end-tag-in-table-body",{name:t})},t.inTableBody.endTagTable=function(t){e.openElements.inTableScope("tbody")||e.openElements.inTableScope("thead")||e.openElements.inTableScope("tfoot")?(e.openElements.popUntilTableBodyScopeMarker(),this.endTagTableRowGroup(e.currentStackItem().localName),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inTableBody.endTagIgnore=function(t){e.parseError("unexpected-end-tag-in-table-body",{name:t})},t.inTableBody.endTagOther=function(e){t.inTable.processEndTag(e)},t.inSelect=Object.create(t.base),t.inSelect.start_tag_handlers={html:"startTagHtml",option:"startTagOption",optgroup:"startTagOptgroup",select:"startTagSelect",input:"startTagInput",keygen:"startTagInput",textarea:"startTagInput",script:"startTagScript","-default":"startTagOther"},t.inSelect.end_tag_handlers={option:"endTagOption",optgroup:"endTagOptgroup",select:"endTagSelect",caption:"endTagTableElements",table:"endTagTableElements",tbody:"endTagTableElements",tfoot:"endTagTableElements",thead:"endTagTableElements",tr:"endTagTableElements",td:"endTagTableElements",th:"endTagTableElements","-default":"endTagOther"},t.inSelect.processCharacters=function(t){var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),""});if(!n)return;e.insertText(n)},t.inSelect.startTagOption=function(t,n){e.currentStackItem().localName=="option"&&e.popElement(),e.insertElement(t,n)},t.inSelect.startTagOptgroup=function(t,n){e.currentStackItem().localName=="option"&&e.popElement(),e.currentStackItem().localName=="optgroup"&&e.popElement(),e.insertElement(t,n)},t.inSelect.endTagOption=function(t){if(e.currentStackItem().localName!=="option"){e.parseError("unexpected-end-tag-in-select",{name:t});return}e.popElement()},t.inSelect.endTagOptgroup=function(t){e.currentStackItem().localName=="option"&&e.openElements.item(e.openElements.length-2).localName=="optgroup"&&e.popElement(),e.currentStackItem().localName=="optgroup"?e.popElement():e.parseError("unexpected-end-tag-in-select",{name:"optgroup"})},t.inSelect.startTagSelect=function(t){e.parseError("unexpected-select-in-select"),this.endTagSelect("select")},t.inSelect.endTagSelect=function(t){e.openElements.inTableScope("select")?(e.openElements.popUntilPopped("select"),e.resetInsertionMode()):e.parseError("unexpected-end-tag",{name:t})},t.inSelect.startTagInput=function(t,n){e.parseError("unexpected-input-in-select"),e.openElements.inSelectScope("select")&&(this.endTagSelect("select"),e.insertionMode.processStartTag(t,n))},t.inSelect.startTagScript=function(e,n){t.inHead.processStartTag(e,n)},t.inSelect.endTagTableElements=function(t){e.parseError("unexpected-end-tag-in-select",{name:t}),e.openElements.inTableScope(t)&&(this.endTagSelect("select"),e.insertionMode.processEndTag(t))},t.inSelect.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-select",{name:t})},t.inSelect.endTagOther=function(t){e.parseError("unexpected-end-tag-in-select",{name:t})},t.inSelectInTable=Object.create(t.base),t.inSelectInTable.start_tag_handlers={caption:"startTagTable",table:"startTagTable",tbody:"startTagTable",tfoot:"startTagTable",thead:"startTagTable",tr:"startTagTable",td:"startTagTable",th:"startTagTable","-default":"startTagOther"},t.inSelectInTable.end_tag_handlers={caption:"endTagTable",table:"endTagTable",tbody:"endTagTable",tfoot:"endTagTable",thead:"endTagTable",tr:"endTagTable",td:"endTagTable",th:"endTagTable","-default":"endTagOther"},t.inSelectInTable.processCharacters=function(e){t.inSelect.processCharacters(e)},t.inSelectInTable.startTagTable=function(t,n){e.parseError("unexpected-table-element-start-tag-in-select-in-table",{name:t}),this.endTagOther("select"),e.insertionMode.processStartTag(t,n)},t.inSelectInTable.startTagOther=function(e,n,r){t.inSelect.processStartTag(e,n,r)},t.inSelectInTable.endTagTable=function(t){e.parseError("unexpected-table-element-end-tag-in-select-in-table",{name:t}),e.openElements.inTableScope(t)&&(this.endTagOther("select"),e.insertionMode.processEndTag(t))},t.inSelectInTable.endTagOther=function(e){t.inSelect.processEndTag(e)},t.inRow=Object.create(t.base),t.inRow.start_tag_handlers={html:"startTagHtml",td:"startTagTableCell",th:"startTagTableCell",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",tfoot:"startTagTableOther",thead:"startTagTableOther",tr:"startTagTableOther","-default":"startTagOther"},t.inRow.end_tag_handlers={tr:"endTagTr",table:"endTagTable",tbody:"endTagTableRowGroup",tfoot:"endTagTableRowGroup",thead:"endTagTableRowGroup",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",td:"endTagIgnore",th:"endTagIgnore","-default":"endTagOther"},t.inRow.processCharacters=function(e){t.inTable.processCharacters(e)},t.inRow.startTagTableCell=function(t,n){e.openElements.popUntilTableRowScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inCell"),e.activeFormattingElements.push(l)},t.inRow.startTagTableOther=function(t,n){var r=this.ignoreEndTagTr();this.endTagTr("tr"),r||e.insertionMode.processStartTag(t,n)},t.inRow.startTagOther=function(e,n,r){t.inTable.processStartTag(e,n,r)},t.inRow.endTagTr=function(t){this.ignoreEndTagTr()?(r.ok(e.context),e.parseError("unexpected-end-tag",{name:t})):(e.openElements.popUntilTableRowScopeMarker(),e.popElement(),e.setInsertionMode("inTableBody"))},t.inRow.endTagTable=function(t){var n=this.ignoreEndTagTr();this.endTagTr("tr"),n||e.insertionMode.processEndTag(t)},t.inRow.endTagTableRowGroup=function(t){e.openElements.inTableScope(t)?(this.endTagTr("tr"),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inRow.endTagIgnore=function(t){e.parseError("unexpected-end-tag-in-table-row",{name:t})},t.inRow.endTagOther=function(e){t.inTable.processEndTag(e)},t.inRow.ignoreEndTagTr=function(){return!e.openElements.inTableScope("tr")},t.afterAfterFrameset=Object.create(t.base),t.afterAfterFrameset.start_tag_handlers={html:"startTagHtml",noframes:"startTagNoFrames","-default":"startTagOther"},t.afterAfterFrameset.processEOF=function(){},t.afterAfterFrameset.processComment=function(t){e.insertComment(t,e.document)},t.afterAfterFrameset.processCharacters=function(t){var n=t.takeRemaining(),r="";for(var i=0;i<n.length;i++){var s=n[i];c(s)&&(r+=s)}r&&(e.reconstructActiveFormattingElements(),e.insertText(r)),r.length<n.length&&e.parseError("expected-eof-but-got-char")},t.afterAfterFrameset.startTagNoFrames=function(e,n){t.inHead.processStartTag(e,n)},t.afterAfterFrameset.startTagOther=function(t,n,r){e.parseError("expected-eof-but-got-start-tag",{name:t})},t.afterAfterFrameset.processEndTag=function(t,n){e.parseError("expected-eof-but-got-end-tag",{name:t})},t.text=Object.create(t.base),t.text.start_tag_handlers={"-default":"startTagOther"},t.text.end_tag_handlers={script:"endTagScript","-default":"endTagOther"},t.text.processCharacters=function(t){e.shouldSkipLeadingNewline&&(e.shouldSkipLeadingNewline=!1,t.skipAtMostOneLeadingNewline());var n=t.takeRemaining();if(!n)return;e.insertText(n)},t.text.processEOF=function(){e.parseError("expected-named-closing-tag-but-got-eof",{name:e.currentStackItem().localName}),e.openElements.pop(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEOF()},t.text.startTagOther=function(e){throw"Tried to process start tag "+e+" in RCDATA/RAWTEXT mode"},t.text.endTagScript=function(t){var n=e.openElements.pop();r.ok(n.localName=="script"),e.setInsertionMode(e.originalInsertionMode)},t.text.endTagOther=function(t){e.openElements.pop(),e.setInsertionMode(e.originalInsertionMode)}}function y(e,t){return e.replace(new RegExp("{[0-9a-z-]+}","gi"),function(e){return t[e.slice(1,-1)]||e})}var r=e("assert"),i=e("./messages.json"),s=e("./constants"),o=e("events").EventEmitter,u=e("./Tokenizer").Tokenizer,a=e("./ElementStack").ElementStack,f=e("./StackItem").StackItem,l={};m.prototype.skipAtMostOneLeadingNewline=function(){this.characters[this.current]==="\n"&&this.current++},m.prototype.skipLeadingWhitespace=function(){while(c(this.characters[this.current]))if(++this.current==this.end)return},m.prototype.skipLeadingNonWhitespace=function(){while(!c(this.characters[this.current]))if(++this.current==this.end)return},m.prototype.takeRemaining=function(){return this.characters.substring(this.current)},m.prototype.takeLeadingWhitespace=function(){var e=this.current;return this.skipLeadingWhitespace(),e===this.current?"":this.characters.substring(e,this.current-e)},Object.defineProperty(m.prototype,"length",{get:function(){return this.end-this.current}}),g.prototype.setInsertionMode=function(e){this.insertionMode=this.insertionModes[e],this.insertionModeName=e},g.prototype.adoptionAgencyEndTag=function(e){function i(e){return e===r}var t=8,n=3,r,s=0;while(s++<t){r=this.elementInActiveFormattingElements(e);if(!r||this.openElements.contains(r)&&!this.openElements.inScope(r.localName))return this.parseError("adoption-agency-1.1",{name:e}),!1;if(!this.openElements.contains(r))return this.parseError("adoption-agency-1.2",{name:e}),this.removeElementFromActiveFormattingElements(r),!0;this.openElements.inScope(r.localName)||this.parseError("adoption-agency-4.4",{name:e}),r!=this.currentStackItem()&&this.parseError("adoption-agency-1.3",{name:e});var o=this.openElements.furthestBlockForFormattingElement(r.node);if(!o)return this.openElements.remove_openElements_until(i),this.removeElementFromActiveFormattingElements(r),!0;var u=this.openElements.elements.indexOf(r),a=this.openElements.item(u-1),l=this.activeFormattingElements.indexOf(r),c=o,h=o,p=this.openElements.elements.indexOf(c),d=0;while(d++<n){p-=1,c=this.openElements.item(p);if(this.activeFormattingElements.indexOf(c)<0){this.openElements.elements.splice(p,1);continue}if(c==r)break;h==o&&(l=this.activeFormattingElements.indexOf(c)+1);var v=this.createElement(c.namespaceURI,c.localName,c.attributes),m=new f(c.namespaceURI,c.localName,c.attributes,v);this.activeFormattingElements[this.activeFormattingElements.indexOf(c)]=m,this.openElements.elements[this.openElements.elements.indexOf(c)]=m,c=m,this.detachFromParent(h.node),this.attachNode(h.node,c.node),h=c}this.detachFromParent(h.node),a.isFosterParenting()?this.insertIntoFosterParent(h.node):this.attachNode(h.node,a.node);var v=this.createElement("http://www.w3.org/1999/xhtml",r.localName,r.attributes),g=new f(r.namespaceURI,r.localName,r.attributes,v);this.reparentChildren(o.node,v),this.attachNode(v,o.node),this.removeElementFromActiveFormattingElements(r),this.activeFormattingElements.splice(Math.min(l,this.activeFormattingElements.length),0,g),this.openElements.remove(r),this.openElements.elements.splice(this.openElements.elements.indexOf(o)+1,0,g)}return!0},g.prototype.start=function(){throw"Not mplemented"},g.prototype.startTokenization=function(e){this.tokenizer=e,this.compatMode="no quirks",this.originalInsertionMode="initial",this.framesetOk=!0,this.openElements=new a,this.activeFormattingElements=[],this.start();if(this.context){switch(this.context){case"title":case"textarea":this.tokenizer.setState(u.RCDATA);break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":this.tokenizer.setState(u.RAWTEXT);break;case"script":this.tokenizer.setState(u.SCRIPT_DATA);break;case"noscript":this.scriptingEnabled&&this.tokenizer.setState(u.RAWTEXT);break;case"plaintext":this.tokenizer.setState(u.PLAINTEXT)}this.insertHtmlElement(),this.resetInsertionMode()}else this.setInsertionMode("initial")},g.prototype.processToken=function(e){this.selfClosingFlagAcknowledged=!1;var t=this.openElements.top||null,n;!t||!t.isForeign()||t.isMathMLTextIntegrationPoint()&&(e.type=="StartTag"&&!(e.name in{mglyph:0,malignmark:0})||e.type==="Characters")||t.namespaceURI=="http://www.w3.org/1998/Math/MathML"&&t.localName=="annotation-xml"&&e.type=="StartTag"&&e.name=="svg"||t.isHtmlIntegrationPoint()&&e.type in{StartTag:0,Characters:0}||e.type=="EOF"?n=this.insertionMode:n=this.insertionModes.inForeignContent;switch(e.type){case"Characters":var r=new m(e.data);n.processCharacters(r);break;case"Comment":n.processComment(e.data);break;case"StartTag":n.processStartTag(e.name,e.data,e.selfClosing);break;case"EndTag":n.processEndTag(e.name);break;case"Doctype":n.processDoctype(e.name,e.publicId,e.systemId,e.forceQuirks);break;case"EOF":n.processEOF()}},g.prototype.isCdataSectionAllowed=function(){return this.openElements.length>0&&this.currentStackItem().isForeign()},g.prototype.isSelfClosingFlagAcknowledged=function(){return this.selfClosingFlagAcknowledged},g.prototype.createElement=function(e,t,n){throw new Error("Not implemented")},g.prototype.attachNode=function(e,t){throw new Error("Not implemented")},g.prototype.attachNodeToFosterParent=function(e,t,n){throw new Error("Not implemented")},g.prototype.detachFromParent=function(e){throw new Error("Not implemented")},g.prototype.addAttributesToElement=function(e,t){throw new Error("Not implemented")},g.prototype.insertHtmlElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","html",e);return this.attachNode(t,this.document),this.openElements.pushHtmlElement(new f("http://www.w3.org/1999/xhtml","html",e,t)),t},g.prototype.insertHeadElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","head",e);return this.head=new f("http://www.w3.org/1999/xhtml","head",e,t),this.attachNode(t,this.openElements.top.node),this.openElements.pushHeadElement(this.head),t},g.prototype.insertBodyElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","body",e);return this.attachNode(t,this.openElements.top.node),this.openElements.pushBodyElement(new f("http://www.w3.org/1999/xhtml","body",e,t)),t},g.prototype.insertIntoFosterParent=function(e){var t=this.openElements.findIndex("table"),n=this.openElements.item(t).node;if(t===0)return this.attachNode(e,n);this.attachNodeToFosterParent(e,n,this.openElements.item(t-1).node)},g.prototype.insertElement=function(e,t,n,r){n||(n="http://www.w3.org/1999/xhtml");var i=this.createElement(n,e,t);this.shouldFosterParent()?this.insertIntoFosterParent(i):this.attachNode(i,this.openElements.top.node),r||this.openElements.push(new f(n,e,t,i))},g.prototype.insertFormattingElement=function(e,t){this.insertElement(e,t,"http://www.w3.org/1999/xhtml"),this.appendElementToActiveFormattingElements(this.currentStackItem())},g.prototype.insertSelfClosingElement=function(e,t){this.selfClosingFlagAcknowledged=!0,this.insertElement(e,t,"http://www.w3.org/1999/xhtml",!0)},g.prototype.insertForeignElement=function(e,t,n,r){r&&(this.selfClosingFlagAcknowledged=!0),this.insertElement(e,t,n,r)},g.prototype.insertComment=function(e,t){throw new Error("Not implemented")},g.prototype.insertDoctype=function(e,t,n){throw new Error("Not implemented")},g.prototype.insertText=function(e){throw new Error("Not implemented")},g.prototype.currentStackItem=function(){return this.openElements.top},g.prototype.popElement=function(){return this.openElements.pop()},g.prototype.shouldFosterParent=function(){return this.redirectAttachToFosterParent&&this.currentStackItem().isFosterParenting()},g.prototype.generateImpliedEndTags=function(e){var t=this.openElements.top.localName;["dd","dt","li","option","optgroup","p","rp","rt"].indexOf(t)!=-1&&t!=e&&(this.popElement(),this.generateImpliedEndTags(e))},g.prototype.reconstructActiveFormattingElements=function(){if(this.activeFormattingElements.length===0)return;var e=this.activeFormattingElements.length-1,t=this.activeFormattingElements[e];if(t==l||this.openElements.contains(t))return;while(t!=l&&!this.openElements.contains(t)){e-=1,t=this.activeFormattingElements[e];if(!t)break}for(;;){e+=1,t=this.activeFormattingElements[e],this.insertElement(t.localName,t.attributes);var n=this.currentStackItem();this.activeFormattingElements[e]=n;if(n==this.activeFormattingElements[this.activeFormattingElements.length-1])break}},g.prototype.ensureNoahsArkCondition=function(e){var t=3;if(this.activeFormattingElements.length<t)return;var n=[],r=e.attributes.length;for(var i=this.activeFormattingElements.length-1;i>=0;i--){var s=this.activeFormattingElements[i];if(s===l)break;if(e.localName!==s.localName||e.namespaceURI!==s.namespaceURI)continue;if(s.attributes.length!=r)continue;n.push(s)}if(n.length<t)return;var o=[],u=e.attributes;for(var i=0;i<u.length;i++){var a=u[i];for(var f=0;f<n.length;f++){var s=n[f],c=v(s,a.nodeName);c&&c.nodeValue===a.nodeValue&&o.push(s)}if(o.length<t)return;n=o,o=[]}for(var i=t-1;i<n.length;i++)this.removeElementFromActiveFormattingElements(n[i])},g.prototype.appendElementToActiveFormattingElements=function(e){this.ensureNoahsArkCondition(e),this.activeFormattingElements.push(e)},g.prototype.removeElementFromActiveFormattingElements=function(e){var t=this.activeFormattingElements.indexOf(e);t>=0&&this.activeFormattingElements.splice(t,1)},g.prototype.elementInActiveFormattingElements=function(e){var t=this.activeFormattingElements;for(var n=t.length-1;n>=0;n--){if(t[n]==l)break;if(t[n].localName==e)return t[n]}return!1},g.prototype.clearActiveFormattingElements=function(){while(this.activeFormattingElements.length!==0&&this.activeFormattingElements.pop()!=l);},g.prototype.reparentChildren=function(e,t){throw new Error("Not implemented")},g.prototype.setFragmentContext=function(e){this.context=e},g.prototype.parseError=function(e,t){if(!this.errorHandler)return;var n=y(i[e],t);this.errorHandler.error(n,this.tokenizer._inputStream.location(),e)},g.prototype.resetInsertionMode=function(){var e=!1,t=null;for(var n=this.openElements.length-1;n>=0;n--){t=this.openElements.item(n),n===0&&(r.ok(this.context),e=!0,t=new f("http://www.w3.org/1999/xhtml",this.context,[],null));if(t.namespaceURI==="http://www.w3.org/1999/xhtml"){if(t.localName==="select")return this.setInsertionMode("inSelect");if(t.localName==="td"||t.localName==="th")return this.setInsertionMode("inCell");if(t.localName==="tr")return this.setInsertionMode("inRow");if(t.localName==="tbody"||t.localName==="thead"||t.localName==="tfoot")return this.setInsertionMode("inTableBody");if(t.localName==="caption")return this.setInsertionMode("inCaption");if(t.localName==="colgroup")return this.setInsertionMode("inColumnGroup");if(t.localName==="table")return this.setInsertionMode("inTable");if(t.localName==="head"&&!e)return this.setInsertionMode("inHead");if(t.localName==="body")return this.setInsertionMode("inBody");if(t.localName==="frameset")return this.setInsertionMode("inFrameset");if(t.localName==="html")return this.openElements.headElement?this.setInsertionMode("afterHead"):this.setInsertionMode("beforeHead")}if(e)return this.setInsertionMode("inBody")}},g.prototype.processGenericRCDATAStartTag=function(e,t){this.insertElement(e,t),this.tokenizer.setState(u.RCDATA),this.originalInsertionMode=this.insertionModeName,this.setInsertionMode("text")},g.prototype.processGenericRawTextStartTag=function(e,t){this.insertElement(e,t),this.tokenizer.setState(u.RAWTEXT),this.originalInsertionMode=this.insertionModeName,this.setInsertionMode("text")},g.prototype.adjustMathMLAttributes=function(e){return e.forEach(function(e){e.namespaceURI="http://www.w3.org/1998/Math/MathML",s.MATHMLAttributeMap[e.nodeName]&&(e.nodeName=s.MATHMLAttributeMap[e.nodeName])}),e},g.prototype.adjustSVGTagNameCase=function(e){return s.SVGTagMap[e]||e},g.prototype.adjustSVGAttributes=function(e){return e.forEach(function(e){e.namespaceURI="http://www.w3.org/2000/svg",s.SVGAttributeMap[e.nodeName]&&(e.nodeName=s.SVGAttributeMap[e.nodeName])}),e},g.prototype.adjustForeignAttributes=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.ForeignAttributeMap[n.nodeName];r&&(n.nodeName=r.localName,n.prefix=r.prefix,n.namespaceURI=r.namespaceURI)}return e},n.TreeBuilder=g},{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,assert:13,events:16}],7:[function(e,t,n){n.SVGTagMap={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},n.MATHMLAttributeMap={definitionurl:"definitionURL"},n.SVGAttributeMap={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",externalresourcesrequired:"externalResourcesRequired",filterres:"filterRes",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},n.ForeignAttributeMap={"xlink:actuate":{prefix:"xlink",localName:"actuate",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:arcrole":{prefix:"xlink",localName:"arcrole",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:href":{prefix:"xlink",localName:"href",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:role":{prefix:"xlink",localName:"role",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:show":{prefix:"xlink",localName:"show",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:title":{prefix:"xlink",localName:"title",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:type":{prefix:"xlink",localName:"title",namespaceURI:"http://www.w3.org/1999/xlink"},"xml:base":{prefix:"xml",localName:"base",namespaceURI:"http://www.w3.org/XML/1998/namespace"},"xml:lang":{prefix:"xml",localName:"lang",namespaceURI:"http://www.w3.org/XML/1998/namespace"},"xml:space":{prefix:"xml",localName:"space",namespaceURI:"http://www.w3.org/XML/1998/namespace"},xmlns:{prefix:null,localName:"xmlns",namespaceURI:"http://www.w3.org/2000/xmlns/"},"xmlns:xlink":{prefix:"xmlns",localName:"xlink",namespaceURI:"http://www.w3.org/2000/xmlns/"}}},{}],8:[function(e,t,n){t.exports={"null-character":"Null character in input stream, replaced with U+FFFD.","invalid-codepoint":"Invalid codepoint in stream","incorrectly-placed-solidus":"Solidus (/) incorrectly placed in tag.","incorrect-cr-newline-entity":"Incorrect CR newline entity, replaced with LF.","illegal-windows-1252-entity":"Entity used with illegal number (windows-1252 reference).","cant-convert-numeric-entity":"Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).","invalid-numeric-entity-replaced":"Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.","numeric-entity-without-semicolon":"Numeric entity didn't end with ';'.","expected-numeric-entity-but-got-eof":"Numeric entity expected. Got end of file instead.","expected-numeric-entity":"Numeric entity expected but none found.","named-entity-without-semicolon":"Named entity didn't end with ';'.","expected-named-entity":"Named entity expected. Got none.","attributes-in-end-tag":"End tag contains unexpected attributes.","self-closing-flag-on-end-tag":"End tag contains unexpected self-closing flag.","bare-less-than-sign-at-eof":"End of file after <.","expected-tag-name-but-got-right-bracket":"Expected tag name. Got '>' instead.","expected-tag-name-but-got-question-mark":"Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)","expected-tag-name":"Expected tag name. Got something else instead.","expected-closing-tag-but-got-right-bracket":"Expected closing tag. Got '>' instead. Ignoring '</>'.","expected-closing-tag-but-got-eof":"Expected closing tag. Unexpected end of file.","expected-closing-tag-but-got-char":"Expected closing tag. Unexpected character '{data}' found.","eof-in-tag-name":"Unexpected end of file in the tag name.","expected-attribute-name-but-got-eof":"Unexpected end of file. Expected attribute name instead.","eof-in-attribute-name":"Unexpected end of file in attribute name.","invalid-character-in-attribute-name":"Invalid character in attribute name.","duplicate-attribute":"Dropped duplicate attribute '{name}' on tag.","expected-end-of-tag-but-got-eof":"Unexpected end of file. Expected = or end of tag.","expected-attribute-value-but-got-eof":"Unexpected end of file. Expected attribute value.","expected-attribute-value-but-got-right-bracket":"Expected attribute value. Got '>' instead.","unexpected-character-in-unquoted-attribute-value":"Unexpected character in unquoted attribute","invalid-character-after-attribute-name":"Unexpected character after attribute name.","unexpected-character-after-attribute-value":"Unexpected character after attribute value.","eof-in-attribute-value-double-quote":'Unexpected end of file in attribute value (").',"eof-in-attribute-value-single-quote":"Unexpected end of file in attribute value (').","eof-in-attribute-value-no-quotes":"Unexpected end of file in attribute value.","eof-after-attribute-value":"Unexpected end of file after attribute value.","unexpected-eof-after-solidus-in-tag":"Unexpected end of file in tag. Expected >.","unexpected-character-after-solidus-in-tag":"Unexpected character after / in tag. Expected >.","expected-dashes-or-doctype":"Expected '--' or 'DOCTYPE'. Not found.","unexpected-bang-after-double-dash-in-comment":"Unexpected ! after -- in comment.","incorrect-comment":"Incorrect comment.","eof-in-comment":"Unexpected end of file in comment.","eof-in-comment-end-dash":"Unexpected end of file in comment (-).","unexpected-dash-after-double-dash-in-comment":"Unexpected '-' after '--' found in comment.","eof-in-comment-double-dash":"Unexpected end of file in comment (--).","eof-in-comment-end-bang-state":"Unexpected end of file in comment.","unexpected-char-in-comment":"Unexpected character in comment found.","need-space-after-doctype":"No space after literal string 'DOCTYPE'.","expected-doctype-name-but-got-right-bracket":"Unexpected > character. Expected DOCTYPE name.","expected-doctype-name-but-got-eof":"Unexpected end of file. Expected DOCTYPE name.","eof-in-doctype-name":"Unexpected end of file in DOCTYPE name.","eof-in-doctype":"Unexpected end of file in DOCTYPE.","expected-space-or-right-bracket-in-doctype":"Expected space or '>'. Got '{data}'.","unexpected-end-of-doctype":"Unexpected end of DOCTYPE.","unexpected-char-in-doctype":"Unexpected character in DOCTYPE.","eof-in-bogus-doctype":"Unexpected end of file in bogus doctype.","eof-in-innerhtml":"Unexpected EOF in inner html mode.","unexpected-doctype":"Unexpected DOCTYPE. Ignored.","non-html-root":"html needs to be the first start tag.","expected-doctype-but-got-eof":"Unexpected End of file. Expected DOCTYPE.","unknown-doctype":"Erroneous DOCTYPE. Expected <!DOCTYPE html>.","quirky-doctype":"Quirky doctype. Expected <!DOCTYPE html>.","almost-standards-doctype":"Almost standards mode doctype. Expected <!DOCTYPE html>.","obsolete-doctype":"Obsolete doctype. Expected <!DOCTYPE html>.","expected-doctype-but-got-chars":"Non-space characters found without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","expected-doctype-but-got-start-tag":"Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","expected-doctype-but-got-end-tag":"End tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","end-tag-after-implied-root":"Unexpected end tag ({name}) after the (implied) root element.","expected-named-closing-tag-but-got-eof":"Unexpected end of file. Expected end tag ({name}).","two-heads-are-not-better-than-one":"Unexpected start tag head in existing head. Ignored.","unexpected-end-tag":"Unexpected end tag ({name}). Ignored.","unexpected-implied-end-tag":"End tag {name} implied, but there were open elements.","unexpected-start-tag-out-of-my-head":"Unexpected start tag ({name}) that can be in head. Moved.","unexpected-start-tag":"Unexpected start tag ({name}).","missing-end-tag":"Missing end tag ({name}).","missing-end-tags":"Missing end tags ({name}).","unexpected-start-tag-implies-end-tag":"Unexpected start tag ({startName}) implies end tag ({endName}).","unexpected-start-tag-treated-as":"Unexpected start tag ({originalName}). Treated as {newName}.","deprecated-tag":"Unexpected start tag {name}. Don't use it!","unexpected-start-tag-ignored":"Unexpected start tag {name}. Ignored.","expected-one-end-tag-but-got-another":"Unexpected end tag ({gotName}). Missing end tag ({expectedName}).","end-tag-too-early":"End tag ({name}) seen too early. Expected other end tag.","end-tag-too-early-named":"Unexpected end tag ({gotName}). Expected end tag ({expectedName}.","end-tag-too-early-ignored":"End tag ({name}) seen too early. Ignored.","adoption-agency-1.1":"End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.","adoption-agency-1.2":"End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.","adoption-agency-1.3":"End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.","adoption-agency-4.4":"End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.","unexpected-end-tag-treated-as":"Unexpected end tag ({originalName}). Treated as {newName}.","no-end-tag":"This element ({name}) has no end tag.","unexpected-implied-end-tag-in-table":"Unexpected implied end tag ({name}) in the table phase.","unexpected-implied-end-tag-in-table-body":"Unexpected implied end tag ({name}) in the table body phase.","unexpected-char-implies-table-voodoo":"Unexpected non-space characters in table context caused voodoo mode.","unexpected-hidden-input-in-table":"Unexpected input with type hidden in table context.","unexpected-form-in-table":"Unexpected form in table context.","unexpected-start-tag-implies-table-voodoo":"Unexpected start tag ({name}) in table context caused voodoo mode.","unexpected-end-tag-implies-table-voodoo":"Unexpected end tag ({name}) in table context caused voodoo mode.","unexpected-cell-in-table-body":"Unexpected table cell start tag ({name}) in the table body phase.","unexpected-cell-end-tag":"Got table cell end tag ({name}) while required end tags are missing.","unexpected-end-tag-in-table-body":"Unexpected end tag ({name}) in the table body phase. Ignored.","unexpected-implied-end-tag-in-table-row":"Unexpected implied end tag ({name}) in the table row phase.","unexpected-end-tag-in-table-row":"Unexpected end tag ({name}) in the table row phase. Ignored.","unexpected-select-in-select":"Unexpected select start tag in the select phase treated as select end tag.","unexpected-input-in-select":"Unexpected input start tag in the select phase.","unexpected-start-tag-in-select":"Unexpected start tag token ({name}) in the select phase. Ignored.","unexpected-end-tag-in-select":"Unexpected end tag ({name}) in the select phase. Ignored.","unexpected-table-element-start-tag-in-select-in-table":"Unexpected table element start tag ({name}) in the select in table phase.","unexpected-table-element-end-tag-in-select-in-table":"Unexpected table element end tag ({name}) in the select in table phase.","unexpected-char-after-body":"Unexpected non-space characters in the after body phase.","unexpected-start-tag-after-body":"Unexpected start tag token ({name}) in the after body phase.","unexpected-end-tag-after-body":"Unexpected end tag token ({name}) in the after body phase.","unexpected-char-in-frameset":"Unepxected characters in the frameset phase. Characters ignored.","unexpected-start-tag-in-frameset":"Unexpected start tag token ({name}) in the frameset phase. Ignored.","unexpected-frameset-in-frameset-innerhtml":"Unexpected end tag token (frameset in the frameset phase (innerHTML).","unexpected-end-tag-in-frameset":"Unexpected end tag token ({name}) in the frameset phase. Ignored.","unexpected-char-after-frameset":"Unexpected non-space characters in the after frameset phase. Ignored.","unexpected-start-tag-after-frameset":"Unexpected start tag ({name}) in the after frameset phase. Ignored.","unexpected-end-tag-after-frameset":"Unexpected end tag ({name}) in the after frameset phase. Ignored.","expected-eof-but-got-char":"Unexpected non-space characters. Expected end of file.","expected-eof-but-got-start-tag":"Unexpected start tag ({name}). Expected end of file.","expected-eof-but-got-end-tag":"Unexpected end tag ({name}). Expected end of file.","unexpected-end-table-in-caption":"Unexpected end table tag in caption. Generates implied end caption.","end-html-in-innerhtml":"Unexpected html end tag in inner html mode.","eof-in-table":"Unexpected end of file. Expected table content.","eof-in-script":"Unexpected end of file. Expected script content.","non-void-element-with-trailing-solidus":"Trailing solidus not allowed on element {name}.","unexpected-html-element-in-foreign-content":'HTML start tag "{name}" in a foreign namespace context.',"unexpected-start-tag-in-table":"Unexpected {name}. Expected table content."}},{}],9:[function(e,t,n){function o(){this.contentHandler=null,this._errorHandler=null,this._treeBuilder=new r,this._tokenizer=new i(this._treeBuilder),this._scriptingEnabled=!1}var r=e("./SAXTreeBuilder").SAXTreeBuilder,i=e("../Tokenizer").Tokenizer,s=e("./TreeParser").TreeParser;o.prototype.parse=function(e){this._tokenizer.tokenize(e);var t=this._treeBuilder.document;t&&(new s(this.contentHandler)).parse(t)},o.prototype.parseFragment=function(e,t){this._treeBuilder.setFragmentContext(t),this._tokenizer.tokenize(e);var n=this._treeBuilder.getFragment();n&&(new s(this.contentHandler)).parse(n)},Object.defineProperty(o.prototype,"scriptingEnabled",{get:function(){return this._scriptingEnabled},set:function(e){this._scriptingEnabled=e,this._treeBuilder.scriptingEnabled=e}}),Object.defineProperty(o.prototype,"errorHandler",{get:function(){return this._errorHandler},set:function(e){this._errorHandler=e,this._treeBuilder.errorHandler=e}}),n.SAXParser=o},{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],10:[function(e,t,n){function s(){i.call(this)}function o(e,t){for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n];if(r.nodeName===t)return r.nodeValue}}function a(e){e?(this.columnNumber=e.columnNumber,this.lineNumber=e.lineNumber):(this.columnNumber=-1,this.lineNumber=-1),this.parentNode=null,this.nextSibling=null,this.firstChild=null}function f(e){a.call(this,e),this.lastChild=null,this._endLocator=null}function l(e){f.call(this,e),this.nodeType=u.DOCUMENT}function c(){f.call(this,new Locator),this.nodeType=u.DOCUMENT_FRAGMENT}function h(e,t,n,r,i,s){f.call(this,e),this.uri=t,this.localName=n,this.qName=r,this.attributes=i,this.prefixMappings=s,this.nodeType=u.ELEMENT}function p(e,t){a.call(this,e),this.data=t,this.nodeType=u.CHARACTERS}function d(e,t){a.call(this,e),this.data=t,this.nodeType=u.IGNORABLE_WHITESPACE}function v(e,t){a.call(this,e),this.data=t,this.nodeType=u.COMMENT}function m(e){f.call(this,e),this.nodeType=u.CDATA}function g(e){f.call(this),this.name=e,this.nodeType=u.ENTITY}function y(e){a.call(this),this.name=e,this.nodeType=u.SKIPPED_ENTITY}function b(e,t){a.call(this),this.target=e,this.data=t}function w(e,t,n){f.call(this),this.name=e,this.publicIdentifier=t,this.systemIdentifier=n,this.nodeType=u.DTD}var r=e("util"),i=e("../TreeBuilder").TreeBuilder;r.inherits(s,i),s.prototype.start=function(e){this.document=new l(this.tokenizer)},s.prototype.end=function(){this.document.endLocator=this.tokenizer},s.prototype.insertDoctype=function(e,t,n){var r=new w(this.tokenizer,e,t,n);r.endLocator=this.tokenizer,this.document.appendChild(r)},s.prototype.createElement=function(e,t,n){var r=new h(this.tokenizer,e,t,t,n||[]);return r},s.prototype.insertComment=function(e,t){t||(t=this.currentStackItem());var n=new v(this.tokenizer,e);t.appendChild(n)},s.prototype.appendCharacters=function(e,t){var n=new p(this.tokenizer,t);e.appendChild(n)},s.prototype.insertText=function(e){if(this.redirectAttachToFosterParent&&this.openElements.top.isFosterParenting()){var t=this.openElements.findIndex("table"),n=this.openElements.item(t),r=n.node;if(t===0)return this.appendCharacters(r,e);var i=new p(this.tokenizer,e),s=r.parentNode;if(s){s.insertBetween(i,r.previousSibling,r);return}var o=this.openElements.item(t-1).node;o.appendChild(i);return}this.appendCharacters(this.currentStackItem().node,e)},s.prototype.attachNode=function(e,t){t.appendChild(e)},s.prototype.attachNodeToFosterParent=function(e,t,n){var r=t.parentNode;r?r.insertBetween(e,t.previousSibling,t):n.appendChild(e)},s.prototype.detachFromParent=function(e){e.detach()},s.prototype.reparentChildren=function(e,t){t.appendChildren(e.firstChild)},s.prototype.getFragment=function(){var e=new c;return this.reparentChildren(this.openElements.rootNode,e),e},s.prototype.addAttributesToElement=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];o(e,r.nodeName)||e.attributes.push(r)}};var u={CDATA:1,CHARACTERS:2,COMMENT:3,DOCUMENT:4,DOCUMENT_FRAGMENT:5,DTD:6,ELEMENT:7,ENTITY:8,IGNORABLE_WHITESPACE:9,PROCESSING_INSTRUCTION:10,SKIPPED_ENTITY:11};a.prototype.visit=function(e){throw new Error("Not Implemented")},a.prototype.revisit=function(e){return},a.prototype.detach=function(){this.parentNode!==null&&(this.parentNode.removeChild(this),this.parentNode=null)},Object.defineProperty(a.prototype,"previousSibling",{get:function(){var e=null,t=this.parentNode.firstChild;for(;;){if(this==t)return e;e=t,t=t.nextSibling}}}),f.prototype=Object.create(a.prototype),f.prototype.insertBefore=function(e,t){if(!t)return this.appendChild(e);e.detach(),e.parentNode=this;if(this.firstChild==t)e.nextSibling=t,this.firstChild=e;else{var n=this.firstChild,r=this.firstChild.nextSibling;while(r!=t)n=r,r=r.nextSibling;n.nextSibling=e,e.nextSibling=r}return e},f.prototype.insertBetween=function(e,t,n){return n?(e.detach(),e.parentNode=this,e.nextSibling=n,t?t.nextSibling=e:firstChild=e,e):this.appendChild(e)},f.prototype.appendChild=function(e){return e.detach(),e.parentNode=this,this.firstChild?this.lastChild.nextSibling=e:this.firstChild=e,this.lastChild=e,e},f.prototype.appendChildren=function(e){var t=e.firstChild;if(!t)return;var n=e;this.firstChild?this.lastChild.nextSibling=t:this.firstChild=t,this.lastChild=n.lastChild;do t.parentNode=this;while(t=t.nextSibling);n.firstChild=null,n.lastChild=null},f.prototype.removeChild=function(e){if(this.firstChild==e)this.firstChild=e.nextSibling,this.lastChild==e&&(this.lastChild=null);else{var t=this.firstChild,n=this.firstChild.nextSibling;while(n!=e)t=n,n=n.nextSibling;t.nextSibling=e.nextSibling,this.lastChild==e&&(this.lastChild=t)}return e.parentNode=null,e},Object.defineProperty(f.prototype,"endLocator",{get:function(){return this._endLocator},set:function(e){this._endLocator={lineNumber:e.lineNumber,columnNumber:e.columnNumber}}}),l.prototype=Object.create(f.prototype),l.prototype.visit=function(e){e.startDocument(this)},l.prototype.revisit=function(e){e.endDocument(this.endLocator)},c.prototype=Object.create(f.prototype),c.prototype.visit=function(e){},h.prototype=Object.create(f.prototype),h.prototype.visit=function(e){if(this.prefixMappings)for(var t in prefixMappings){var n=prefixMappings[t];e.startPrefixMapping(n.getPrefix(),n.getUri(),this)}e.startElement(this.uri,this.localName,this.qName,this.attributes,this)},h.prototype.revisit=function(e){e.endElement(this.uri,this.localName,this.qName,this.endLocator);if(this.prefixMappings)for(var t in prefixMappings){var n=prefixMappings[t];e.endPrefixMapping(n.getPrefix(),this.endLocator)}},p.prototype=Object.create(a.prototype),p.prototype.visit=function(e){e.characters(this.data,0,this.data.length,this)},d.prototype=Object.create(a.prototype),d.prototype.visit=function(e){e.ignorableWhitespace(this.data,0,this.data.length,this)},v.prototype=Object.create(a.prototype),v.prototype.visit=function(e){e.comment(this.data,0,this.data.length,this)},m.prototype=Object.create(f.prototype),m.prototype.visit=function(e){e.startCDATA(this)},m.prototype.revisit=function(e){e.endCDATA(this.endLocator)},g.prototype=Object.create(f.prototype),g.prototype.visit=function(e){e.startEntity(this.name,this)},g.prototype.revisit=function(e){e.endEntity(this.name)},y.prototype=Object.create(a.prototype),y.prototype.visit=function(e){e.skippedEntity(this.name,this)},b.prototype=Object.create(a.prototype),b.prototype.visit=function(e){e.processingInstruction(this.target,this.data,this)},b.prototype.getNodeType=function(){return u.PROCESSING_INSTRUCTION},w.prototype=Object.create(f.prototype),w.prototype.visit=function(e){e.startDTD(this.name,this.publicIdentifier,this.systemIdentifier,this)},w.prototype.revisit=function(e){e.endDTD()},n.SAXTreeBuilder=s},{"../TreeBuilder":6,util:20}],11:[function(e,t,n){function r(e,t){this.contentHandler,this.lexicalHandler,this.locatorDelegate;if(!e)throw new IllegalArgumentException("contentHandler was null.");this.contentHandler=e,t?this.lexicalHandler=t:this.lexicalHandler=new i}function i(){}r.prototype.parse=function(e){this.contentHandler.documentLocator=this;var t=e,n;for(;;){t.visit(this);if(n=t.firstChild){t=n;continue}for(;;){t.revisit(this);if(t==e)return;if(n=t.nextSibling){t=n;break}t=t.parentNode}}},r.prototype.characters=function(e,t,n,r){this.locatorDelegate=r,this.contentHandler.characters(e,t,n)},r.prototype.endDocument=function(e){this.locatorDelegate=e,this.contentHandler.endDocument()},r.prototype.endElement=function(e,t,n,r){this.locatorDelegate=r,this.contentHandler.endElement(e,t,n)},r.prototype.endPrefixMapping=function(e,t){this.locatorDelegate=t,this.contentHandler.endPrefixMapping(e)},r.prototype.ignorableWhitespace=function(e,t,n,r){this.locatorDelegate=r,this.contentHandler.ignorableWhitespace(e,t,n)},r.prototype.processingInstruction=function(e,t,n){this.locatorDelegate=n,this.contentHandler.processingInstruction(e,t)},r.prototype.skippedEntity=function(e,t){this.locatorDelegate=t,this.contentHandler.skippedEntity(e)},r.prototype.startDocument=function(e){this.locatorDelegate=e,this.contentHandler.startDocument()},r.prototype.startElement=function(e,t,n,r,i){this.locatorDelegate=i,this.contentHandler.startElement(e,t,n,r)},r.prototype.startPrefixMapping=function(e,t,n){this.locatorDelegate=n,this.contentHandler.startPrefixMapping(e,t)},r.prototype.comment=function(e,t,n,r){this.locatorDelegate=r,this.lexicalHandler.comment(e,t,n)},r.prototype.endCDATA=function(e){this.locatorDelegate=e,this.lexicalHandler.endCDATA()},r.prototype.endDTD=function(e){this.locatorDelegate=e,this.lexicalHandler.endDTD()},r.prototype.endEntity=function(e,t){this.locatorDelegate=t,this.lexicalHandler.endEntity(e)},r.prototype.startCDATA=function(e){this.locatorDelegate=e,this.lexicalHandler.startCDATA()},r.prototype.startDTD=function(e,t,n,r){this.locatorDelegate=r,this.lexicalHandler.startDTD(e,t,n)},r.prototype.startEntity=function(e,t){this.locatorDelegate=t,this.lexicalHandler.startEntity(e)},Object.defineProperty(r.prototype,"columnNumber",{get:function(){return this.locatorDelegate?this.locatorDelegate.columnNumber:-1}}),Object.defineProperty(r.prototype,"lineNumber",{get:function(){return this.locatorDelegate?this.locatorDelegate.lineNumber:-1}}),i.prototype.comment=function(){},i.prototype.endCDATA=function(){},i.prototype.endDTD=function(){},i.prototype.endEntity=function(){},i.prototype.startCDATA=function(){},i.prototype.startDTD=function(){},i.prototype.startEntity=function(){},n.TreeParser=r},{}],12:[function(e,t,n){t.exports={"Aacute;":"\u00c1",Aacute:"\u00c1","aacute;":"\u00e1",aacute:"\u00e1","Abreve;":"\u0102","abreve;":"\u0103","ac;":"\u223e","acd;":"\u223f","acE;":"\u223e\u0333","Acirc;":"\u00c2",Acirc:"\u00c2","acirc;":"\u00e2",acirc:"\u00e2","acute;":"\u00b4",acute:"\u00b4","Acy;":"\u0410","acy;":"\u0430","AElig;":"\u00c6",AElig:"\u00c6","aelig;":"\u00e6",aelig:"\u00e6","af;":"\u2061","Afr;":"\ud835\udd04","afr;":"\ud835\udd1e","Agrave;":"\u00c0",Agrave:"\u00c0","agrave;":"\u00e0",agrave:"\u00e0","alefsym;":"\u2135","aleph;":"\u2135","Alpha;":"\u0391","alpha;":"\u03b1","Amacr;":"\u0100","amacr;":"\u0101","amalg;":"\u2a3f","amp;":"&",amp:"&","AMP;":"&",AMP:"&","andand;":"\u2a55","And;":"\u2a53","and;":"\u2227","andd;":"\u2a5c","andslope;":"\u2a58","andv;":"\u2a5a","ang;":"\u2220","ange;":"\u29a4","angle;":"\u2220","angmsdaa;":"\u29a8","angmsdab;":"\u29a9","angmsdac;":"\u29aa","angmsdad;":"\u29ab","angmsdae;":"\u29ac","angmsdaf;":"\u29ad","angmsdag;":"\u29ae","angmsdah;":"\u29af","angmsd;":"\u2221","angrt;":"\u221f","angrtvb;":"\u22be","angrtvbd;":"\u299d","angsph;":"\u2222","angst;":"\u00c5","angzarr;":"\u237c","Aogon;":"\u0104","aogon;":"\u0105","Aopf;":"\ud835\udd38","aopf;":"\ud835\udd52","apacir;":"\u2a6f","ap;":"\u2248","apE;":"\u2a70","ape;":"\u224a","apid;":"\u224b","apos;":"'","ApplyFunction;":"\u2061","approx;":"\u2248","approxeq;":"\u224a","Aring;":"\u00c5",Aring:"\u00c5","aring;":"\u00e5",aring:"\u00e5","Ascr;":"\ud835\udc9c","ascr;":"\ud835\udcb6","Assign;":"\u2254","ast;":"*","asymp;":"\u2248","asympeq;":"\u224d","Atilde;":"\u00c3",Atilde:"\u00c3","atilde;":"\u00e3",atilde:"\u00e3","Auml;":"\u00c4",Auml:"\u00c4","auml;":"\u00e4",auml:"\u00e4","awconint;":"\u2233","awint;":"\u2a11","backcong;":"\u224c","backepsilon;":"\u03f6","backprime;":"\u2035","backsim;":"\u223d","backsimeq;":"\u22cd","Backslash;":"\u2216","Barv;":"\u2ae7","barvee;":"\u22bd","barwed;":"\u2305","Barwed;":"\u2306","barwedge;":"\u2305","bbrk;":"\u23b5","bbrktbrk;":"\u23b6","bcong;":"\u224c","Bcy;":"\u0411","bcy;":"\u0431","bdquo;":"\u201e","becaus;":"\u2235","because;":"\u2235","Because;":"\u2235","bemptyv;":"\u29b0","bepsi;":"\u03f6","bernou;":"\u212c","Bernoullis;":"\u212c","Beta;":"\u0392","beta;":"\u03b2","beth;":"\u2136","between;":"\u226c","Bfr;":"\ud835\udd05","bfr;":"\ud835\udd1f","bigcap;":"\u22c2","bigcirc;":"\u25ef","bigcup;":"\u22c3","bigodot;":"\u2a00","bigoplus;":"\u2a01","bigotimes;":"\u2a02","bigsqcup;":"\u2a06","bigstar;":"\u2605","bigtriangledown;":"\u25bd","bigtriangleup;":"\u25b3","biguplus;":"\u2a04","bigvee;":"\u22c1","bigwedge;":"\u22c0","bkarow;":"\u290d","blacklozenge;":"\u29eb","blacksquare;":"\u25aa","blacktriangle;":"\u25b4","blacktriangledown;":"\u25be","blacktriangleleft;":"\u25c2","blacktriangleright;":"\u25b8","blank;":"\u2423","blk12;":"\u2592","blk14;":"\u2591","blk34;":"\u2593","block;":"\u2588","bne;":"=\u20e5","bnequiv;":"\u2261\u20e5","bNot;":"\u2aed","bnot;":"\u2310","Bopf;":"\ud835\udd39","bopf;":"\ud835\udd53","bot;":"\u22a5","bottom;":"\u22a5","bowtie;":"\u22c8","boxbox;":"\u29c9","boxdl;":"\u2510","boxdL;":"\u2555","boxDl;":"\u2556","boxDL;":"\u2557","boxdr;":"\u250c","boxdR;":"\u2552","boxDr;":"\u2553","boxDR;":"\u2554","boxh;":"\u2500","boxH;":"\u2550","boxhd;":"\u252c","boxHd;":"\u2564","boxhD;":"\u2565","boxHD;":"\u2566","boxhu;":"\u2534","boxHu;":"\u2567","boxhU;":"\u2568","boxHU;":"\u2569","boxminus;":"\u229f","boxplus;":"\u229e","boxtimes;":"\u22a0","boxul;":"\u2518","boxuL;":"\u255b","boxUl;":"\u255c","boxUL;":"\u255d","boxur;":"\u2514","boxuR;":"\u2558","boxUr;":"\u2559","boxUR;":"\u255a","boxv;":"\u2502","boxV;":"\u2551","boxvh;":"\u253c","boxvH;":"\u256a","boxVh;":"\u256b","boxVH;":"\u256c","boxvl;":"\u2524","boxvL;":"\u2561","boxVl;":"\u2562","boxVL;":"\u2563","boxvr;":"\u251c","boxvR;":"\u255e","boxVr;":"\u255f","boxVR;":"\u2560","bprime;":"\u2035","breve;":"\u02d8","Breve;":"\u02d8","brvbar;":"\u00a6",brvbar:"\u00a6","bscr;":"\ud835\udcb7","Bscr;":"\u212c","bsemi;":"\u204f","bsim;":"\u223d","bsime;":"\u22cd","bsolb;":"\u29c5","bsol;":"\\","bsolhsub;":"\u27c8","bull;":"\u2022","bullet;":"\u2022","bump;":"\u224e","bumpE;":"\u2aae","bumpe;":"\u224f","Bumpeq;":"\u224e","bumpeq;":"\u224f","Cacute;":"\u0106","cacute;":"\u0107","capand;":"\u2a44","capbrcup;":"\u2a49","capcap;":"\u2a4b","cap;":"\u2229","Cap;":"\u22d2","capcup;":"\u2a47","capdot;":"\u2a40","CapitalDifferentialD;":"\u2145","caps;":"\u2229\ufe00","caret;":"\u2041","caron;":"\u02c7","Cayleys;":"\u212d","ccaps;":"\u2a4d","Ccaron;":"\u010c","ccaron;":"\u010d","Ccedil;":"\u00c7",Ccedil:"\u00c7","ccedil;":"\u00e7",ccedil:"\u00e7","Ccirc;":"\u0108","ccirc;":"\u0109","Cconint;":"\u2230","ccups;":"\u2a4c","ccupssm;":"\u2a50","Cdot;":"\u010a","cdot;":"\u010b","cedil;":"\u00b8",cedil:"\u00b8","Cedilla;":"\u00b8","cemptyv;":"\u29b2","cent;":"\u00a2",cent:"\u00a2","centerdot;":"\u00b7","CenterDot;":"\u00b7","cfr;":"\ud835\udd20","Cfr;":"\u212d","CHcy;":"\u0427","chcy;":"\u0447","check;":"\u2713","checkmark;":"\u2713","Chi;":"\u03a7","chi;":"\u03c7","circ;":"\u02c6","circeq;":"\u2257","circlearrowleft;":"\u21ba","circlearrowright;":"\u21bb","circledast;":"\u229b","circledcirc;":"\u229a","circleddash;":"\u229d","CircleDot;":"\u2299","circledR;":"\u00ae","circledS;":"\u24c8","CircleMinus;":"\u2296","CirclePlus;":"\u2295","CircleTimes;":"\u2297","cir;":"\u25cb","cirE;":"\u29c3","cire;":"\u2257","cirfnint;":"\u2a10","cirmid;":"\u2aef","cirscir;":"\u29c2","ClockwiseContourIntegral;":"\u2232","CloseCurlyDoubleQuote;":"\u201d","CloseCurlyQuote;":"\u2019","clubs;":"\u2663","clubsuit;":"\u2663","colon;":":","Colon;":"\u2237","Colone;":"\u2a74","colone;":"\u2254","coloneq;":"\u2254","comma;":",","commat;":"@","comp;":"\u2201","compfn;":"\u2218","complement;":"\u2201","complexes;":"\u2102","cong;":"\u2245","congdot;":"\u2a6d","Congruent;":"\u2261","conint;":"\u222e","Conint;":"\u222f","ContourIntegral;":"\u222e","copf;":"\ud835\udd54","Copf;":"\u2102","coprod;":"\u2210","Coproduct;":"\u2210","copy;":"\u00a9",copy:"\u00a9","COPY;":"\u00a9",COPY:"\u00a9","copysr;":"\u2117","CounterClockwiseContourIntegral;":"\u2233","crarr;":"\u21b5","cross;":"\u2717","Cross;":"\u2a2f","Cscr;":"\ud835\udc9e","cscr;":"\ud835\udcb8","csub;":"\u2acf","csube;":"\u2ad1","csup;":"\u2ad0","csupe;":"\u2ad2","ctdot;":"\u22ef","cudarrl;":"\u2938","cudarrr;":"\u2935","cuepr;":"\u22de","cuesc;":"\u22df","cularr;":"\u21b6","cularrp;":"\u293d","cupbrcap;":"\u2a48","cupcap;":"\u2a46","CupCap;":"\u224d","cup;":"\u222a","Cup;":"\u22d3","cupcup;":"\u2a4a","cupdot;":"\u228d","cupor;":"\u2a45","cups;":"\u222a\ufe00","curarr;":"\u21b7","curarrm;":"\u293c","curlyeqprec;":"\u22de","curlyeqsucc;":"\u22df","curlyvee;":"\u22ce","curlywedge;":"\u22cf","curren;":"\u00a4",curren:"\u00a4","curvearrowleft;":"\u21b6","curvearrowright;":"\u21b7","cuvee;":"\u22ce","cuwed;":"\u22cf","cwconint;":"\u2232","cwint;":"\u2231","cylcty;":"\u232d","dagger;":"\u2020","Dagger;":"\u2021","daleth;":"\u2138","darr;":"\u2193","Darr;":"\u21a1","dArr;":"\u21d3","dash;":"\u2010","Dashv;":"\u2ae4","dashv;":"\u22a3","dbkarow;":"\u290f","dblac;":"\u02dd","Dcaron;":"\u010e","dcaron;":"\u010f","Dcy;":"\u0414","dcy;":"\u0434","ddagger;":"\u2021","ddarr;":"\u21ca","DD;":"\u2145","dd;":"\u2146","DDotrahd;":"\u2911","ddotseq;":"\u2a77","deg;":"\u00b0",deg:"\u00b0","Del;":"\u2207","Delta;":"\u0394","delta;":"\u03b4","demptyv;":"\u29b1","dfisht;":"\u297f","Dfr;":"\ud835\udd07","dfr;":"\ud835\udd21","dHar;":"\u2965","dharl;":"\u21c3","dharr;":"\u21c2","DiacriticalAcute;":"\u00b4","DiacriticalDot;":"\u02d9","DiacriticalDoubleAcute;":"\u02dd","DiacriticalGrave;":"`","DiacriticalTilde;":"\u02dc","diam;":"\u22c4","diamond;":"\u22c4","Diamond;":"\u22c4","diamondsuit;":"\u2666","diams;":"\u2666","die;":"\u00a8","DifferentialD;":"\u2146","digamma;":"\u03dd","disin;":"\u22f2","div;":"\u00f7","divide;":"\u00f7",divide:"\u00f7","divideontimes;":"\u22c7","divonx;":"\u22c7","DJcy;":"\u0402","djcy;":"\u0452","dlcorn;":"\u231e","dlcrop;":"\u230d","dollar;":"$","Dopf;":"\ud835\udd3b","dopf;":"\ud835\udd55","Dot;":"\u00a8","dot;":"\u02d9","DotDot;":"\u20dc","doteq;":"\u2250","doteqdot;":"\u2251","DotEqual;":"\u2250","dotminus;":"\u2238","dotplus;":"\u2214","dotsquare;":"\u22a1","doublebarwedge;":"\u2306","DoubleContourIntegral;":"\u222f","DoubleDot;":"\u00a8","DoubleDownArrow;":"\u21d3","DoubleLeftArrow;":"\u21d0","DoubleLeftRightArrow;":"\u21d4","DoubleLeftTee;":"\u2ae4","DoubleLongLeftArrow;":"\u27f8","DoubleLongLeftRightArrow;":"\u27fa","DoubleLongRightArrow;":"\u27f9","DoubleRightArrow;":"\u21d2","DoubleRightTee;":"\u22a8","DoubleUpArrow;":"\u21d1","DoubleUpDownArrow;":"\u21d5","DoubleVerticalBar;":"\u2225","DownArrowBar;":"\u2913","downarrow;":"\u2193","DownArrow;":"\u2193","Downarrow;":"\u21d3","DownArrowUpArrow;":"\u21f5","DownBreve;":"\u0311","downdownarrows;":"\u21ca","downharpoonleft;":"\u21c3","downharpoonright;":"\u21c2","DownLeftRightVector;":"\u2950","DownLeftTeeVector;":"\u295e","DownLeftVectorBar;":"\u2956","DownLeftVector;":"\u21bd","DownRightTeeVector;":"\u295f","DownRightVectorBar;":"\u2957","DownRightVector;":"\u21c1","DownTeeArrow;":"\u21a7","DownTee;":"\u22a4","drbkarow;":"\u2910","drcorn;":"\u231f","drcrop;":"\u230c","Dscr;":"\ud835\udc9f","dscr;":"\ud835\udcb9","DScy;":"\u0405","dscy;":"\u0455","dsol;":"\u29f6","Dstrok;":"\u0110","dstrok;":"\u0111","dtdot;":"\u22f1","dtri;":"\u25bf","dtrif;":"\u25be","duarr;":"\u21f5","duhar;":"\u296f","dwangle;":"\u29a6","DZcy;":"\u040f","dzcy;":"\u045f","dzigrarr;":"\u27ff","Eacute;":"\u00c9",Eacute:"\u00c9","eacute;":"\u00e9",eacute:"\u00e9","easter;":"\u2a6e","Ecaron;":"\u011a","ecaron;":"\u011b","Ecirc;":"\u00ca",Ecirc:"\u00ca","ecirc;":"\u00ea",ecirc:"\u00ea","ecir;":"\u2256","ecolon;":"\u2255","Ecy;":"\u042d","ecy;":"\u044d","eDDot;":"\u2a77","Edot;":"\u0116","edot;":"\u0117","eDot;":"\u2251","ee;":"\u2147","efDot;":"\u2252","Efr;":"\ud835\udd08","efr;":"\ud835\udd22","eg;":"\u2a9a","Egrave;":"\u00c8",Egrave:"\u00c8","egrave;":"\u00e8",egrave:"\u00e8","egs;":"\u2a96","egsdot;":"\u2a98","el;":"\u2a99","Element;":"\u2208","elinters;":"\u23e7","ell;":"\u2113","els;":"\u2a95","elsdot;":"\u2a97","Emacr;":"\u0112","emacr;":"\u0113","empty;":"\u2205","emptyset;":"\u2205","EmptySmallSquare;":"\u25fb","emptyv;":"\u2205","EmptyVerySmallSquare;":"\u25ab","emsp13;":"\u2004","emsp14;":"\u2005","emsp;":"\u2003","ENG;":"\u014a","eng;":"\u014b","ensp;":"\u2002","Eogon;":"\u0118","eogon;":"\u0119","Eopf;":"\ud835\udd3c","eopf;":"\ud835\udd56","epar;":"\u22d5","eparsl;":"\u29e3","eplus;":"\u2a71","epsi;":"\u03b5","Epsilon;":"\u0395","epsilon;":"\u03b5","epsiv;":"\u03f5","eqcirc;":"\u2256","eqcolon;":"\u2255","eqsim;":"\u2242","eqslantgtr;":"\u2a96","eqslantless;":"\u2a95","Equal;":"\u2a75","equals;":"=","EqualTilde;":"\u2242","equest;":"\u225f","Equilibrium;":"\u21cc","equiv;":"\u2261","equivDD;":"\u2a78","eqvparsl;":"\u29e5","erarr;":"\u2971","erDot;":"\u2253","escr;":"\u212f","Escr;":"\u2130","esdot;":"\u2250","Esim;":"\u2a73","esim;":"\u2242","Eta;":"\u0397","eta;":"\u03b7","ETH;":"\u00d0",ETH:"\u00d0","eth;":"\u00f0",eth:"\u00f0","Euml;":"\u00cb",Euml:"\u00cb","euml;":"\u00eb",euml:"\u00eb","euro;":"\u20ac","excl;":"!","exist;":"\u2203","Exists;":"\u2203","expectation;":"\u2130","exponentiale;":"\u2147","ExponentialE;":"\u2147","fallingdotseq;":"\u2252","Fcy;":"\u0424","fcy;":"\u0444","female;":"\u2640","ffilig;":"\ufb03","fflig;":"\ufb00","ffllig;":"\ufb04","Ffr;":"\ud835\udd09","ffr;":"\ud835\udd23","filig;":"\ufb01","FilledSmallSquare;":"\u25fc","FilledVerySmallSquare;":"\u25aa","fjlig;":"fj","flat;":"\u266d","fllig;":"\ufb02","fltns;":"\u25b1","fnof;":"\u0192","Fopf;":"\ud835\udd3d","fopf;":"\ud835\udd57","forall;":"\u2200","ForAll;":"\u2200","fork;":"\u22d4","forkv;":"\u2ad9","Fouriertrf;":"\u2131","fpartint;":"\u2a0d","frac12;":"\u00bd",frac12:"\u00bd","frac13;":"\u2153","frac14;":"\u00bc",frac14:"\u00bc","frac15;":"\u2155","frac16;":"\u2159","frac18;":"\u215b","frac23;":"\u2154","frac25;":"\u2156","frac34;":"\u00be",frac34:"\u00be","frac35;":"\u2157","frac38;":"\u215c","frac45;":"\u2158","frac56;":"\u215a","frac58;":"\u215d","frac78;":"\u215e","frasl;":"\u2044","frown;":"\u2322","fscr;":"\ud835\udcbb","Fscr;":"\u2131","gacute;":"\u01f5","Gamma;":"\u0393","gamma;":"\u03b3","Gammad;":"\u03dc","gammad;":"\u03dd","gap;":"\u2a86","Gbreve;":"\u011e","gbreve;":"\u011f","Gcedil;":"\u0122","Gcirc;":"\u011c","gcirc;":"\u011d","Gcy;":"\u0413","gcy;":"\u0433","Gdot;":"\u0120","gdot;":"\u0121","ge;":"\u2265","gE;":"\u2267","gEl;":"\u2a8c","gel;":"\u22db","geq;":"\u2265","geqq;":"\u2267","geqslant;":"\u2a7e","gescc;":"\u2aa9","ges;":"\u2a7e","gesdot;":"\u2a80","gesdoto;":"\u2a82","gesdotol;":"\u2a84","gesl;":"\u22db\ufe00","gesles;":"\u2a94","Gfr;":"\ud835\udd0a","gfr;":"\ud835\udd24","gg;":"\u226b","Gg;":"\u22d9","ggg;":"\u22d9","gimel;":"\u2137","GJcy;":"\u0403","gjcy;":"\u0453","gla;":"\u2aa5","gl;":"\u2277","glE;":"\u2a92","glj;":"\u2aa4","gnap;":"\u2a8a","gnapprox;":"\u2a8a","gne;":"\u2a88","gnE;":"\u2269","gneq;":"\u2a88","gneqq;":"\u2269","gnsim;":"\u22e7","Gopf;":"\ud835\udd3e","gopf;":"\ud835\udd58","grave;":"`","GreaterEqual;":"\u2265","GreaterEqualLess;":"\u22db","GreaterFullEqual;":"\u2267","GreaterGreater;":"\u2aa2","GreaterLess;":"\u2277","GreaterSlantEqual;":"\u2a7e","GreaterTilde;":"\u2273","Gscr;":"\ud835\udca2","gscr;":"\u210a","gsim;":"\u2273","gsime;":"\u2a8e","gsiml;":"\u2a90","gtcc;":"\u2aa7","gtcir;":"\u2a7a","gt;":">",gt:">","GT;":">",GT:">","Gt;":"\u226b","gtdot;":"\u22d7","gtlPar;":"\u2995","gtquest;":"\u2a7c","gtrapprox;":"\u2a86","gtrarr;":"\u2978","gtrdot;":"\u22d7","gtreqless;":"\u22db","gtreqqless;":"\u2a8c","gtrless;":"\u2277","gtrsim;":"\u2273","gvertneqq;":"\u2269\ufe00","gvnE;":"\u2269\ufe00","Hacek;":"\u02c7","hairsp;":"\u200a","half;":"\u00bd","hamilt;":"\u210b","HARDcy;":"\u042a","hardcy;":"\u044a","harrcir;":"\u2948","harr;":"\u2194","hArr;":"\u21d4","harrw;":"\u21ad","Hat;":"^","hbar;":"\u210f","Hcirc;":"\u0124","hcirc;":"\u0125","hearts;":"\u2665","heartsuit;":"\u2665","hellip;":"\u2026","hercon;":"\u22b9","hfr;":"\ud835\udd25","Hfr;":"\u210c","HilbertSpace;":"\u210b","hksearow;":"\u2925","hkswarow;":"\u2926","hoarr;":"\u21ff","homtht;":"\u223b","hookleftarrow;":"\u21a9","hookrightarrow;":"\u21aa","hopf;":"\ud835\udd59","Hopf;":"\u210d","horbar;":"\u2015","HorizontalLine;":"\u2500","hscr;":"\ud835\udcbd","Hscr;":"\u210b","hslash;":"\u210f","Hstrok;":"\u0126","hstrok;":"\u0127","HumpDownHump;":"\u224e","HumpEqual;":"\u224f","hybull;":"\u2043","hyphen;":"\u2010","Iacute;":"\u00cd",Iacute:"\u00cd","iacute;":"\u00ed",iacute:"\u00ed","ic;":"\u2063","Icirc;":"\u00ce",Icirc:"\u00ce","icirc;":"\u00ee",icirc:"\u00ee","Icy;":"\u0418","icy;":"\u0438","Idot;":"\u0130","IEcy;":"\u0415","iecy;":"\u0435","iexcl;":"\u00a1",iexcl:"\u00a1","iff;":"\u21d4","ifr;":"\ud835\udd26","Ifr;":"\u2111","Igrave;":"\u00cc",Igrave:"\u00cc","igrave;":"\u00ec",igrave:"\u00ec","ii;":"\u2148","iiiint;":"\u2a0c","iiint;":"\u222d","iinfin;":"\u29dc","iiota;":"\u2129","IJlig;":"\u0132","ijlig;":"\u0133","Imacr;":"\u012a","imacr;":"\u012b","image;":"\u2111","ImaginaryI;":"\u2148","imagline;":"\u2110","imagpart;":"\u2111","imath;":"\u0131","Im;":"\u2111","imof;":"\u22b7","imped;":"\u01b5","Implies;":"\u21d2","incare;":"\u2105","in;":"\u2208","infin;":"\u221e","infintie;":"\u29dd","inodot;":"\u0131","intcal;":"\u22ba","int;":"\u222b","Int;":"\u222c","integers;":"\u2124","Integral;":"\u222b","intercal;":"\u22ba","Intersection;":"\u22c2","intlarhk;":"\u2a17","intprod;":"\u2a3c","InvisibleComma;":"\u2063","InvisibleTimes;":"\u2062","IOcy;":"\u0401","iocy;":"\u0451","Iogon;":"\u012e","iogon;":"\u012f","Iopf;":"\ud835\udd40","iopf;":"\ud835\udd5a","Iota;":"\u0399","iota;":"\u03b9","iprod;":"\u2a3c","iquest;":"\u00bf",iquest:"\u00bf","iscr;":"\ud835\udcbe","Iscr;":"\u2110","isin;":"\u2208","isindot;":"\u22f5","isinE;":"\u22f9","isins;":"\u22f4","isinsv;":"\u22f3","isinv;":"\u2208","it;":"\u2062","Itilde;":"\u0128","itilde;":"\u0129","Iukcy;":"\u0406","iukcy;":"\u0456","Iuml;":"\u00cf",Iuml:"\u00cf","iuml;":"\u00ef",iuml:"\u00ef","Jcirc;":"\u0134","jcirc;":"\u0135","Jcy;":"\u0419","jcy;":"\u0439","Jfr;":"\ud835\udd0d","jfr;":"\ud835\udd27","jmath;":"\u0237","Jopf;":"\ud835\udd41","jopf;":"\ud835\udd5b","Jscr;":"\ud835\udca5","jscr;":"\ud835\udcbf","Jsercy;":"\u0408","jsercy;":"\u0458","Jukcy;":"\u0404","jukcy;":"\u0454","Kappa;":"\u039a","kappa;":"\u03ba","kappav;":"\u03f0","Kcedil;":"\u0136","kcedil;":"\u0137","Kcy;":"\u041a","kcy;":"\u043a","Kfr;":"\ud835\udd0e","kfr;":"\ud835\udd28","kgreen;":"\u0138","KHcy;":"\u0425","khcy;":"\u0445","KJcy;":"\u040c","kjcy;":"\u045c","Kopf;":"\ud835\udd42","kopf;":"\ud835\udd5c","Kscr;":"\ud835\udca6","kscr;":"\ud835\udcc0","lAarr;":"\u21da","Lacute;":"\u0139","lacute;":"\u013a","laemptyv;":"\u29b4","lagran;":"\u2112","Lambda;":"\u039b","lambda;":"\u03bb","lang;":"\u27e8","Lang;":"\u27ea","langd;":"\u2991","langle;":"\u27e8","lap;":"\u2a85","Laplacetrf;":"\u2112","laquo;":"\u00ab",laquo:"\u00ab","larrb;":"\u21e4","larrbfs;":"\u291f","larr;":"\u2190","Larr;":"\u219e","lArr;":"\u21d0","larrfs;":"\u291d","larrhk;":"\u21a9","larrlp;":"\u21ab","larrpl;":"\u2939","larrsim;":"\u2973","larrtl;":"\u21a2","latail;":"\u2919","lAtail;":"\u291b","lat;":"\u2aab","late;":"\u2aad","lates;":"\u2aad\ufe00","lbarr;":"\u290c","lBarr;":"\u290e","lbbrk;":"\u2772","lbrace;":"{","lbrack;":"[","lbrke;":"\u298b","lbrksld;":"\u298f","lbrkslu;":"\u298d","Lcaron;":"\u013d","lcaron;":"\u013e","Lcedil;":"\u013b","lcedil;":"\u013c","lceil;":"\u2308","lcub;":"{","Lcy;":"\u041b","lcy;":"\u043b","ldca;":"\u2936","ldquo;":"\u201c","ldquor;":"\u201e","ldrdhar;":"\u2967","ldrushar;":"\u294b","ldsh;":"\u21b2","le;":"\u2264","lE;":"\u2266","LeftAngleBracket;":"\u27e8","LeftArrowBar;":"\u21e4","leftarrow;":"\u2190","LeftArrow;":"\u2190","Leftarrow;":"\u21d0","LeftArrowRightArrow;":"\u21c6","leftarrowtail;":"\u21a2","LeftCeiling;":"\u2308","LeftDoubleBracket;":"\u27e6","LeftDownTeeVector;":"\u2961","LeftDownVectorBar;":"\u2959","LeftDownVector;":"\u21c3","LeftFloor;":"\u230a","leftharpoondown;":"\u21bd","leftharpoonup;":"\u21bc","leftleftarrows;":"\u21c7","leftrightarrow;":"\u2194","LeftRightArrow;":"\u2194","Leftrightarrow;":"\u21d4","leftrightarrows;":"\u21c6","leftrightharpoons;":"\u21cb","leftrightsquigarrow;":"\u21ad","LeftRightVector;":"\u294e","LeftTeeArrow;":"\u21a4","LeftTee;":"\u22a3","LeftTeeVector;":"\u295a","leftthreetimes;":"\u22cb","LeftTriangleBar;":"\u29cf","LeftTriangle;":"\u22b2","LeftTriangleEqual;":"\u22b4","LeftUpDownVector;":"\u2951","LeftUpTeeVector;":"\u2960","LeftUpVectorBar;":"\u2958","LeftUpVector;":"\u21bf","LeftVectorBar;":"\u2952","LeftVector;":"\u21bc","lEg;":"\u2a8b","leg;":"\u22da","leq;":"\u2264","leqq;":"\u2266","leqslant;":"\u2a7d","lescc;":"\u2aa8","les;":"\u2a7d","lesdot;":"\u2a7f","lesdoto;":"\u2a81","lesdotor;":"\u2a83","lesg;":"\u22da\ufe00","lesges;":"\u2a93","lessapprox;":"\u2a85","lessdot;":"\u22d6","lesseqgtr;":"\u22da","lesseqqgtr;":"\u2a8b","LessEqualGreater;":"\u22da","LessFullEqual;":"\u2266","LessGreater;":"\u2276","lessgtr;":"\u2276","LessLess;":"\u2aa1","lesssim;":"\u2272","LessSlantEqual;":"\u2a7d","LessTilde;":"\u2272","lfisht;":"\u297c","lfloor;":"\u230a","Lfr;":"\ud835\udd0f","lfr;":"\ud835\udd29","lg;":"\u2276","lgE;":"\u2a91","lHar;":"\u2962","lhard;":"\u21bd","lharu;":"\u21bc","lharul;":"\u296a","lhblk;":"\u2584","LJcy;":"\u0409","ljcy;":"\u0459","llarr;":"\u21c7","ll;":"\u226a","Ll;":"\u22d8","llcorner;":"\u231e","Lleftarrow;":"\u21da","llhard;":"\u296b","lltri;":"\u25fa","Lmidot;":"\u013f","lmidot;":"\u0140","lmoustache;":"\u23b0","lmoust;":"\u23b0","lnap;":"\u2a89","lnapprox;":"\u2a89","lne;":"\u2a87","lnE;":"\u2268","lneq;":"\u2a87","lneqq;":"\u2268","lnsim;":"\u22e6","loang;":"\u27ec","loarr;":"\u21fd","lobrk;":"\u27e6","longleftarrow;":"\u27f5","LongLeftArrow;":"\u27f5","Longleftarrow;":"\u27f8","longleftrightarrow;":"\u27f7","LongLeftRightArrow;":"\u27f7","Longleftrightarrow;":"\u27fa","longmapsto;":"\u27fc","longrightarrow;":"\u27f6","LongRightArrow;":"\u27f6","Longrightarrow;":"\u27f9","looparrowleft;":"\u21ab","looparrowright;":"\u21ac","lopar;":"\u2985","Lopf;":"\ud835\udd43","lopf;":"\ud835\udd5d","loplus;":"\u2a2d","lotimes;":"\u2a34","lowast;":"\u2217","lowbar;":"_","LowerLeftArrow;":"\u2199","LowerRightArrow;":"\u2198","loz;":"\u25ca","lozenge;":"\u25ca","lozf;":"\u29eb","lpar;":"(","lparlt;":"\u2993","lrarr;":"\u21c6","lrcorner;":"\u231f","lrhar;":"\u21cb","lrhard;":"\u296d","lrm;":"\u200e","lrtri;":"\u22bf","lsaquo;":"\u2039","lscr;":"\ud835\udcc1","Lscr;":"\u2112","lsh;":"\u21b0","Lsh;":"\u21b0","lsim;":"\u2272","lsime;":"\u2a8d","lsimg;":"\u2a8f","lsqb;":"[","lsquo;":"\u2018","lsquor;":"\u201a","Lstrok;":"\u0141","lstrok;":"\u0142","ltcc;":"\u2aa6","ltcir;":"\u2a79","lt;":"<",lt:"<","LT;":"<",LT:"<","Lt;":"\u226a","ltdot;":"\u22d6","lthree;":"\u22cb","ltimes;":"\u22c9","ltlarr;":"\u2976","ltquest;":"\u2a7b","ltri;":"\u25c3","ltrie;":"\u22b4","ltrif;":"\u25c2","ltrPar;":"\u2996","lurdshar;":"\u294a","luruhar;":"\u2966","lvertneqq;":"\u2268\ufe00","lvnE;":"\u2268\ufe00","macr;":"\u00af",macr:"\u00af","male;":"\u2642","malt;":"\u2720","maltese;":"\u2720","Map;":"\u2905","map;":"\u21a6","mapsto;":"\u21a6","mapstodown;":"\u21a7","mapstoleft;":"\u21a4","mapstoup;":"\u21a5","marker;":"\u25ae","mcomma;":"\u2a29","Mcy;":"\u041c","mcy;":"\u043c","mdash;":"\u2014","mDDot;":"\u223a","measuredangle;":"\u2221","MediumSpace;":"\u205f","Mellintrf;":"\u2133","Mfr;":"\ud835\udd10","mfr;":"\ud835\udd2a","mho;":"\u2127","micro;":"\u00b5",micro:"\u00b5","midast;":"*","midcir;":"\u2af0","mid;":"\u2223","middot;":"\u00b7",middot:"\u00b7","minusb;":"\u229f","minus;":"\u2212","minusd;":"\u2238","minusdu;":"\u2a2a","MinusPlus;":"\u2213","mlcp;":"\u2adb","mldr;":"\u2026","mnplus;":"\u2213","models;":"\u22a7","Mopf;":"\ud835\udd44","mopf;":"\ud835\udd5e","mp;":"\u2213","mscr;":"\ud835\udcc2","Mscr;":"\u2133","mstpos;":"\u223e","Mu;":"\u039c","mu;":"\u03bc","multimap;":"\u22b8","mumap;":"\u22b8","nabla;":"\u2207","Nacute;":"\u0143","nacute;":"\u0144","nang;":"\u2220\u20d2","nap;":"\u2249","napE;":"\u2a70\u0338","napid;":"\u224b\u0338","napos;":"\u0149","napprox;":"\u2249","natural;":"\u266e","naturals;":"\u2115","natur;":"\u266e","nbsp;":"\u00a0",nbsp:"\u00a0","nbump;":"\u224e\u0338","nbumpe;":"\u224f\u0338","ncap;":"\u2a43","Ncaron;":"\u0147","ncaron;":"\u0148","Ncedil;":"\u0145","ncedil;":"\u0146","ncong;":"\u2247","ncongdot;":"\u2a6d\u0338","ncup;":"\u2a42","Ncy;":"\u041d","ncy;":"\u043d","ndash;":"\u2013","nearhk;":"\u2924","nearr;":"\u2197","neArr;":"\u21d7","nearrow;":"\u2197","ne;":"\u2260","nedot;":"\u2250\u0338","NegativeMediumSpace;":"\u200b","NegativeThickSpace;":"\u200b","NegativeThinSpace;":"\u200b","NegativeVeryThinSpace;":"\u200b","nequiv;":"\u2262","nesear;":"\u2928","nesim;":"\u2242\u0338","NestedGreaterGreater;":"\u226b","NestedLessLess;":"\u226a","NewLine;":"\n","nexist;":"\u2204","nexists;":"\u2204","Nfr;":"\ud835\udd11","nfr;":"\ud835\udd2b","ngE;":"\u2267\u0338","nge;":"\u2271","ngeq;":"\u2271","ngeqq;":"\u2267\u0338","ngeqslant;":"\u2a7e\u0338","nges;":"\u2a7e\u0338","nGg;":"\u22d9\u0338","ngsim;":"\u2275","nGt;":"\u226b\u20d2","ngt;":"\u226f","ngtr;":"\u226f","nGtv;":"\u226b\u0338","nharr;":"\u21ae","nhArr;":"\u21ce","nhpar;":"\u2af2","ni;":"\u220b","nis;":"\u22fc","nisd;":"\u22fa","niv;":"\u220b","NJcy;":"\u040a","njcy;":"\u045a","nlarr;":"\u219a","nlArr;":"\u21cd","nldr;":"\u2025","nlE;":"\u2266\u0338","nle;":"\u2270","nleftarrow;":"\u219a","nLeftarrow;":"\u21cd","nleftrightarrow;":"\u21ae","nLeftrightarrow;":"\u21ce","nleq;":"\u2270","nleqq;":"\u2266\u0338","nleqslant;":"\u2a7d\u0338","nles;":"\u2a7d\u0338","nless;":"\u226e","nLl;":"\u22d8\u0338","nlsim;":"\u2274","nLt;":"\u226a\u20d2","nlt;":"\u226e","nltri;":"\u22ea","nltrie;":"\u22ec","nLtv;":"\u226a\u0338","nmid;":"\u2224","NoBreak;":"\u2060","NonBreakingSpace;":"\u00a0","nopf;":"\ud835\udd5f","Nopf;":"\u2115","Not;":"\u2aec","not;":"\u00ac",not:"\u00ac","NotCongruent;":"\u2262","NotCupCap;":"\u226d","NotDoubleVerticalBar;":"\u2226","NotElement;":"\u2209","NotEqual;":"\u2260","NotEqualTilde;":"\u2242\u0338","NotExists;":"\u2204","NotGreater;":"\u226f","NotGreaterEqual;":"\u2271","NotGreaterFullEqual;":"\u2267\u0338","NotGreaterGreater;":"\u226b\u0338","NotGreaterLess;":"\u2279","NotGreaterSlantEqual;":"\u2a7e\u0338","NotGreaterTilde;":"\u2275","NotHumpDownHump;":"\u224e\u0338","NotHumpEqual;":"\u224f\u0338","notin;":"\u2209","notindot;":"\u22f5\u0338","notinE;":"\u22f9\u0338","notinva;":"\u2209","notinvb;":"\u22f7","notinvc;":"\u22f6","NotLeftTriangleBar;":"\u29cf\u0338","NotLeftTriangle;":"\u22ea","NotLeftTriangleEqual;":"\u22ec","NotLess;":"\u226e","NotLessEqual;":"\u2270","NotLessGreater;":"\u2278","NotLessLess;":"\u226a\u0338","NotLessSlantEqual;":"\u2a7d\u0338","NotLessTilde;":"\u2274","NotNestedGreaterGreater;":"\u2aa2\u0338","NotNestedLessLess;":"\u2aa1\u0338","notni;":"\u220c","notniva;":"\u220c","notnivb;":"\u22fe","notnivc;":"\u22fd","NotPrecedes;":"\u2280","NotPrecedesEqual;":"\u2aaf\u0338","NotPrecedesSlantEqual;":"\u22e0","NotReverseElement;":"\u220c","NotRightTriangleBar;":"\u29d0\u0338","NotRightTriangle;":"\u22eb","NotRightTriangleEqual;":"\u22ed","NotSquareSubset;":"\u228f\u0338","NotSquareSubsetEqual;":"\u22e2","NotSquareSuperset;":"\u2290\u0338","NotSquareSupersetEqual;":"\u22e3","NotSubset;":"\u2282\u20d2","NotSubsetEqual;":"\u2288","NotSucceeds;":"\u2281","NotSucceedsEqual;":"\u2ab0\u0338","NotSucceedsSlantEqual;":"\u22e1","NotSucceedsTilde;":"\u227f\u0338","NotSuperset;":"\u2283\u20d2","NotSupersetEqual;":"\u2289","NotTilde;":"\u2241","NotTildeEqual;":"\u2244","NotTildeFullEqual;":"\u2247","NotTildeTilde;":"\u2249","NotVerticalBar;":"\u2224","nparallel;":"\u2226","npar;":"\u2226","nparsl;":"\u2afd\u20e5","npart;":"\u2202\u0338","npolint;":"\u2a14","npr;":"\u2280","nprcue;":"\u22e0","nprec;":"\u2280","npreceq;":"\u2aaf\u0338","npre;":"\u2aaf\u0338","nrarrc;":"\u2933\u0338","nrarr;":"\u219b","nrArr;":"\u21cf","nrarrw;":"\u219d\u0338","nrightarrow;":"\u219b","nRightarrow;":"\u21cf","nrtri;":"\u22eb","nrtrie;":"\u22ed","nsc;":"\u2281","nsccue;":"\u22e1","nsce;":"\u2ab0\u0338","Nscr;":"\ud835\udca9","nscr;":"\ud835\udcc3","nshortmid;":"\u2224","nshortparallel;":"\u2226","nsim;":"\u2241","nsime;":"\u2244","nsimeq;":"\u2244","nsmid;":"\u2224","nspar;":"\u2226","nsqsube;":"\u22e2","nsqsupe;":"\u22e3","nsub;":"\u2284","nsubE;":"\u2ac5\u0338","nsube;":"\u2288","nsubset;":"\u2282\u20d2","nsubseteq;":"\u2288","nsubseteqq;":"\u2ac5\u0338","nsucc;":"\u2281","nsucceq;":"\u2ab0\u0338","nsup;":"\u2285","nsupE;":"\u2ac6\u0338","nsupe;":"\u2289","nsupset;":"\u2283\u20d2","nsupseteq;":"\u2289","nsupseteqq;":"\u2ac6\u0338","ntgl;":"\u2279","Ntilde;":"\u00d1",Ntilde:"\u00d1","ntilde;":"\u00f1",ntilde:"\u00f1","ntlg;":"\u2278","ntriangleleft;":"\u22ea","ntrianglelefteq;":"\u22ec","ntriangleright;":"\u22eb","ntrianglerighteq;":"\u22ed","Nu;":"\u039d","nu;":"\u03bd","num;":"#","numero;":"\u2116","numsp;":"\u2007","nvap;":"\u224d\u20d2","nvdash;":"\u22ac","nvDash;":"\u22ad","nVdash;":"\u22ae","nVDash;":"\u22af","nvge;":"\u2265\u20d2","nvgt;":">\u20d2","nvHarr;":"\u2904","nvinfin;":"\u29de","nvlArr;":"\u2902","nvle;":"\u2264\u20d2","nvlt;":"<\u20d2","nvltrie;":"\u22b4\u20d2","nvrArr;":"\u2903","nvrtrie;":"\u22b5\u20d2","nvsim;":"\u223c\u20d2","nwarhk;":"\u2923","nwarr;":"\u2196","nwArr;":"\u21d6","nwarrow;":"\u2196","nwnear;":"\u2927","Oacute;":"\u00d3",Oacute:"\u00d3","oacute;":"\u00f3",oacute:"\u00f3","oast;":"\u229b","Ocirc;":"\u00d4",Ocirc:"\u00d4","ocirc;":"\u00f4",ocirc:"\u00f4","ocir;":"\u229a","Ocy;":"\u041e","ocy;":"\u043e","odash;":"\u229d","Odblac;":"\u0150","odblac;":"\u0151","odiv;":"\u2a38","odot;":"\u2299","odsold;":"\u29bc","OElig;":"\u0152","oelig;":"\u0153","ofcir;":"\u29bf","Ofr;":"\ud835\udd12","ofr;":"\ud835\udd2c","ogon;":"\u02db","Ograve;":"\u00d2",Ograve:"\u00d2","ograve;":"\u00f2",ograve:"\u00f2","ogt;":"\u29c1","ohbar;":"\u29b5","ohm;":"\u03a9","oint;":"\u222e","olarr;":"\u21ba","olcir;":"\u29be","olcross;":"\u29bb","oline;":"\u203e","olt;":"\u29c0","Omacr;":"\u014c","omacr;":"\u014d","Omega;":"\u03a9","omega;":"\u03c9","Omicron;":"\u039f","omicron;":"\u03bf","omid;":"\u29b6","ominus;":"\u2296","Oopf;":"\ud835\udd46","oopf;":"\ud835\udd60","opar;":"\u29b7","OpenCurlyDoubleQuote;":"\u201c","OpenCurlyQuote;":"\u2018","operp;":"\u29b9","oplus;":"\u2295","orarr;":"\u21bb","Or;":"\u2a54","or;":"\u2228","ord;":"\u2a5d","order;":"\u2134","orderof;":"\u2134","ordf;":"\u00aa",ordf:"\u00aa","ordm;":"\u00ba",ordm:"\u00ba","origof;":"\u22b6","oror;":"\u2a56","orslope;":"\u2a57","orv;":"\u2a5b","oS;":"\u24c8","Oscr;":"\ud835\udcaa","oscr;":"\u2134","Oslash;":"\u00d8",Oslash:"\u00d8","oslash;":"\u00f8",oslash:"\u00f8","osol;":"\u2298","Otilde;":"\u00d5",Otilde:"\u00d5","otilde;":"\u00f5",otilde:"\u00f5","otimesas;":"\u2a36","Otimes;":"\u2a37","otimes;":"\u2297","Ouml;":"\u00d6",Ouml:"\u00d6","ouml;":"\u00f6",ouml:"\u00f6","ovbar;":"\u233d","OverBar;":"\u203e","OverBrace;":"\u23de","OverBracket;":"\u23b4","OverParenthesis;":"\u23dc","para;":"\u00b6",para:"\u00b6","parallel;":"\u2225","par;":"\u2225","parsim;":"\u2af3","parsl;":"\u2afd","part;":"\u2202","PartialD;":"\u2202","Pcy;":"\u041f","pcy;":"\u043f","percnt;":"%","period;":".","permil;":"\u2030","perp;":"\u22a5","pertenk;":"\u2031","Pfr;":"\ud835\udd13","pfr;":"\ud835\udd2d","Phi;":"\u03a6","phi;":"\u03c6","phiv;":"\u03d5","phmmat;":"\u2133","phone;":"\u260e","Pi;":"\u03a0","pi;":"\u03c0","pitchfork;":"\u22d4","piv;":"\u03d6","planck;":"\u210f","planckh;":"\u210e","plankv;":"\u210f","plusacir;":"\u2a23","plusb;":"\u229e","pluscir;":"\u2a22","plus;":"+","plusdo;":"\u2214","plusdu;":"\u2a25","pluse;":"\u2a72","PlusMinus;":"\u00b1","plusmn;":"\u00b1",plusmn:"\u00b1","plussim;":"\u2a26","plustwo;":"\u2a27","pm;":"\u00b1","Poincareplane;":"\u210c","pointint;":"\u2a15","popf;":"\ud835\udd61","Popf;":"\u2119","pound;":"\u00a3",pound:"\u00a3","prap;":"\u2ab7","Pr;":"\u2abb","pr;":"\u227a","prcue;":"\u227c","precapprox;":"\u2ab7","prec;":"\u227a","preccurlyeq;":"\u227c","Precedes;":"\u227a","PrecedesEqual;":"\u2aaf","PrecedesSlantEqual;":"\u227c","PrecedesTilde;":"\u227e","preceq;":"\u2aaf","precnapprox;":"\u2ab9","precneqq;":"\u2ab5","precnsim;":"\u22e8","pre;":"\u2aaf","prE;":"\u2ab3","precsim;":"\u227e","prime;":"\u2032","Prime;":"\u2033","primes;":"\u2119","prnap;":"\u2ab9","prnE;":"\u2ab5","prnsim;":"\u22e8","prod;":"\u220f","Product;":"\u220f","profalar;":"\u232e","profline;":"\u2312","profsurf;":"\u2313","prop;":"\u221d","Proportional;":"\u221d","Proportion;":"\u2237","propto;":"\u221d","prsim;":"\u227e","prurel;":"\u22b0","Pscr;":"\ud835\udcab","pscr;":"\ud835\udcc5","Psi;":"\u03a8","psi;":"\u03c8","puncsp;":"\u2008","Qfr;":"\ud835\udd14","qfr;":"\ud835\udd2e","qint;":"\u2a0c","qopf;":"\ud835\udd62","Qopf;":"\u211a","qprime;":"\u2057","Qscr;":"\ud835\udcac","qscr;":"\ud835\udcc6","quaternions;":"\u210d","quatint;":"\u2a16","quest;":"?","questeq;":"\u225f","quot;":'"',quot:'"',"QUOT;":'"',QUOT:'"',"rAarr;":"\u21db","race;":"\u223d\u0331","Racute;":"\u0154","racute;":"\u0155","radic;":"\u221a","raemptyv;":"\u29b3","rang;":"\u27e9","Rang;":"\u27eb","rangd;":"\u2992","range;":"\u29a5","rangle;":"\u27e9","raquo;":"\u00bb",raquo:"\u00bb","rarrap;":"\u2975","rarrb;":"\u21e5","rarrbfs;":"\u2920","rarrc;":"\u2933","rarr;":"\u2192","Rarr;":"\u21a0","rArr;":"\u21d2","rarrfs;":"\u291e","rarrhk;":"\u21aa","rarrlp;":"\u21ac","rarrpl;":"\u2945","rarrsim;":"\u2974","Rarrtl;":"\u2916","rarrtl;":"\u21a3","rarrw;":"\u219d","ratail;":"\u291a","rAtail;":"\u291c","ratio;":"\u2236","rationals;":"\u211a","rbarr;":"\u290d","rBarr;":"\u290f","RBarr;":"\u2910","rbbrk;":"\u2773","rbrace;":"}","rbrack;":"]","rbrke;":"\u298c","rbrksld;":"\u298e","rbrkslu;":"\u2990","Rcaron;":"\u0158","rcaron;":"\u0159","Rcedil;":"\u0156","rcedil;":"\u0157","rceil;":"\u2309","rcub;":"}","Rcy;":"\u0420","rcy;":"\u0440","rdca;":"\u2937","rdldhar;":"\u2969","rdquo;":"\u201d","rdquor;":"\u201d","rdsh;":"\u21b3","real;":"\u211c","realine;":"\u211b","realpart;":"\u211c","reals;":"\u211d","Re;":"\u211c","rect;":"\u25ad","reg;":"\u00ae",reg:"\u00ae","REG;":"\u00ae",REG:"\u00ae","ReverseElement;":"\u220b","ReverseEquilibrium;":"\u21cb","ReverseUpEquilibrium;":"\u296f","rfisht;":"\u297d","rfloor;":"\u230b","rfr;":"\ud835\udd2f","Rfr;":"\u211c","rHar;":"\u2964","rhard;":"\u21c1","rharu;":"\u21c0","rharul;":"\u296c","Rho;":"\u03a1","rho;":"\u03c1","rhov;":"\u03f1","RightAngleBracket;":"\u27e9","RightArrowBar;":"\u21e5","rightarrow;":"\u2192","RightArrow;":"\u2192","Rightarrow;":"\u21d2","RightArrowLeftArrow;":"\u21c4","rightarrowtail;":"\u21a3","RightCeiling;":"\u2309","RightDoubleBracket;":"\u27e7","RightDownTeeVector;":"\u295d","RightDownVectorBar;":"\u2955","RightDownVector;":"\u21c2","RightFloor;":"\u230b","rightharpoondown;":"\u21c1","rightharpoonup;":"\u21c0","rightleftarrows;":"\u21c4","rightleftharpoons;":"\u21cc","rightrightarrows;":"\u21c9","rightsquigarrow;":"\u219d","RightTeeArrow;":"\u21a6","RightTee;":"\u22a2","RightTeeVector;":"\u295b","rightthreetimes;":"\u22cc","RightTriangleBar;":"\u29d0","RightTriangle;":"\u22b3","RightTriangleEqual;":"\u22b5","RightUpDownVector;":"\u294f","RightUpTeeVector;":"\u295c","RightUpVectorBar;":"\u2954","RightUpVector;":"\u21be","RightVectorBar;":"\u2953","RightVector;":"\u21c0","ring;":"\u02da","risingdotseq;":"\u2253","rlarr;":"\u21c4","rlhar;":"\u21cc","rlm;":"\u200f","rmoustache;":"\u23b1","rmoust;":"\u23b1","rnmid;":"\u2aee","roang;":"\u27ed","roarr;":"\u21fe","robrk;":"\u27e7","ropar;":"\u2986","ropf;":"\ud835\udd63","Ropf;":"\u211d","roplus;":"\u2a2e","rotimes;":"\u2a35","RoundImplies;":"\u2970","rpar;":")","rpargt;":"\u2994","rppolint;":"\u2a12","rrarr;":"\u21c9","Rrightarrow;":"\u21db","rsaquo;":"\u203a","rscr;":"\ud835\udcc7","Rscr;":"\u211b","rsh;":"\u21b1","Rsh;":"\u21b1","rsqb;":"]","rsquo;":"\u2019","rsquor;":"\u2019","rthree;":"\u22cc","rtimes;":"\u22ca","rtri;":"\u25b9","rtrie;":"\u22b5","rtrif;":"\u25b8","rtriltri;":"\u29ce","RuleDelayed;":"\u29f4","ruluhar;":"\u2968","rx;":"\u211e","Sacute;":"\u015a","sacute;":"\u015b","sbquo;":"\u201a","scap;":"\u2ab8","Scaron;":"\u0160","scaron;":"\u0161","Sc;":"\u2abc","sc;":"\u227b","sccue;":"\u227d","sce;":"\u2ab0","scE;":"\u2ab4","Scedil;":"\u015e","scedil;":"\u015f","Scirc;":"\u015c","scirc;":"\u015d","scnap;":"\u2aba","scnE;":"\u2ab6","scnsim;":"\u22e9","scpolint;":"\u2a13","scsim;":"\u227f","Scy;":"\u0421","scy;":"\u0441","sdotb;":"\u22a1","sdot;":"\u22c5","sdote;":"\u2a66","searhk;":"\u2925","searr;":"\u2198","seArr;":"\u21d8","searrow;":"\u2198","sect;":"\u00a7",sect:"\u00a7","semi;":";","seswar;":"\u2929","setminus;":"\u2216","setmn;":"\u2216","sext;":"\u2736","Sfr;":"\ud835\udd16","sfr;":"\ud835\udd30","sfrown;":"\u2322","sharp;":"\u266f","SHCHcy;":"\u0429","shchcy;":"\u0449","SHcy;":"\u0428","shcy;":"\u0448","ShortDownArrow;":"\u2193","ShortLeftArrow;":"\u2190","shortmid;":"\u2223","shortparallel;":"\u2225","ShortRightArrow;":"\u2192","ShortUpArrow;":"\u2191","shy;":"\u00ad",shy:"\u00ad","Sigma;":"\u03a3","sigma;":"\u03c3","sigmaf;":"\u03c2","sigmav;":"\u03c2","sim;":"\u223c","simdot;":"\u2a6a","sime;":"\u2243","simeq;":"\u2243","simg;":"\u2a9e","simgE;":"\u2aa0","siml;":"\u2a9d","simlE;":"\u2a9f","simne;":"\u2246","simplus;":"\u2a24","simrarr;":"\u2972","slarr;":"\u2190","SmallCircle;":"\u2218","smallsetminus;":"\u2216","smashp;":"\u2a33","smeparsl;":"\u29e4","smid;":"\u2223","smile;":"\u2323","smt;":"\u2aaa","smte;":"\u2aac","smtes;":"\u2aac\ufe00","SOFTcy;":"\u042c","softcy;":"\u044c","solbar;":"\u233f","solb;":"\u29c4","sol;":"/","Sopf;":"\ud835\udd4a","sopf;":"\ud835\udd64","spades;":"\u2660","spadesuit;":"\u2660","spar;":"\u2225","sqcap;":"\u2293","sqcaps;":"\u2293\ufe00","sqcup;":"\u2294","sqcups;":"\u2294\ufe00","Sqrt;":"\u221a","sqsub;":"\u228f","sqsube;":"\u2291","sqsubset;":"\u228f","sqsubseteq;":"\u2291","sqsup;":"\u2290","sqsupe;":"\u2292","sqsupset;":"\u2290","sqsupseteq;":"\u2292","square;":"\u25a1","Square;":"\u25a1","SquareIntersection;":"\u2293","SquareSubset;":"\u228f","SquareSubsetEqual;":"\u2291","SquareSuperset;":"\u2290","SquareSupersetEqual;":"\u2292","SquareUnion;":"\u2294","squarf;":"\u25aa","squ;":"\u25a1","squf;":"\u25aa","srarr;":"\u2192","Sscr;":"\ud835\udcae","sscr;":"\ud835\udcc8","ssetmn;":"\u2216","ssmile;":"\u2323","sstarf;":"\u22c6","Star;":"\u22c6","star;":"\u2606","starf;":"\u2605","straightepsilon;":"\u03f5","straightphi;":"\u03d5","strns;":"\u00af","sub;":"\u2282","Sub;":"\u22d0","subdot;":"\u2abd","subE;":"\u2ac5","sube;":"\u2286","subedot;":"\u2ac3","submult;":"\u2ac1","subnE;":"\u2acb","subne;":"\u228a","subplus;":"\u2abf","subrarr;":"\u2979","subset;":"\u2282","Subset;":"\u22d0","subseteq;":"\u2286","subseteqq;":"\u2ac5","SubsetEqual;":"\u2286","subsetneq;":"\u228a","subsetneqq;":"\u2acb","subsim;":"\u2ac7","subsub;":"\u2ad5","subsup;":"\u2ad3","succapprox;":"\u2ab8","succ;":"\u227b","succcurlyeq;":"\u227d","Succeeds;":"\u227b","SucceedsEqual;":"\u2ab0","SucceedsSlantEqual;":"\u227d","SucceedsTilde;":"\u227f","succeq;":"\u2ab0","succnapprox;":"\u2aba","succneqq;":"\u2ab6","succnsim;":"\u22e9","succsim;":"\u227f","SuchThat;":"\u220b","sum;":"\u2211","Sum;":"\u2211","sung;":"\u266a","sup1;":"\u00b9",sup1:"\u00b9","sup2;":"\u00b2",sup2:"\u00b2","sup3;":"\u00b3",sup3:"\u00b3","sup;":"\u2283","Sup;":"\u22d1","supdot;":"\u2abe","supdsub;":"\u2ad8","supE;":"\u2ac6","supe;":"\u2287","supedot;":"\u2ac4","Superset;":"\u2283","SupersetEqual;":"\u2287","suphsol;":"\u27c9","suphsub;":"\u2ad7","suplarr;":"\u297b","supmult;":"\u2ac2","supnE;":"\u2acc","supne;":"\u228b","supplus;":"\u2ac0","supset;":"\u2283","Supset;":"\u22d1","supseteq;":"\u2287","supseteqq;":"\u2ac6","supsetneq;":"\u228b","supsetneqq;":"\u2acc","supsim;":"\u2ac8","supsub;":"\u2ad4","supsup;":"\u2ad6","swarhk;":"\u2926","swarr;":"\u2199","swArr;":"\u21d9","swarrow;":"\u2199","swnwar;":"\u292a","szlig;":"\u00df",szlig:"\u00df","Tab;":" ","target;":"\u2316","Tau;":"\u03a4","tau;":"\u03c4","tbrk;":"\u23b4","Tcaron;":"\u0164","tcaron;":"\u0165","Tcedil;":"\u0162","tcedil;":"\u0163","Tcy;":"\u0422","tcy;":"\u0442","tdot;":"\u20db","telrec;":"\u2315","Tfr;":"\ud835\udd17","tfr;":"\ud835\udd31","there4;":"\u2234","therefore;":"\u2234","Therefore;":"\u2234","Theta;":"\u0398","theta;":"\u03b8","thetasym;":"\u03d1","thetav;":"\u03d1","thickapprox;":"\u2248","thicksim;":"\u223c","ThickSpace;":"\u205f\u200a","ThinSpace;":"\u2009","thinsp;":"\u2009","thkap;":"\u2248","thksim;":"\u223c","THORN;":"\u00de",THORN:"\u00de","thorn;":"\u00fe",thorn:"\u00fe","tilde;":"\u02dc","Tilde;":"\u223c","TildeEqual;":"\u2243","TildeFullEqual;":"\u2245","TildeTilde;":"\u2248","timesbar;":"\u2a31","timesb;":"\u22a0","times;":"\u00d7",times:"\u00d7","timesd;":"\u2a30","tint;":"\u222d","toea;":"\u2928","topbot;":"\u2336","topcir;":"\u2af1","top;":"\u22a4","Topf;":"\ud835\udd4b","topf;":"\ud835\udd65","topfork;":"\u2ada","tosa;":"\u2929","tprime;":"\u2034","trade;":"\u2122","TRADE;":"\u2122","triangle;":"\u25b5","triangledown;":"\u25bf","triangleleft;":"\u25c3","trianglelefteq;":"\u22b4","triangleq;":"\u225c","triangleright;":"\u25b9","trianglerighteq;":"\u22b5","tridot;":"\u25ec","trie;":"\u225c","triminus;":"\u2a3a","TripleDot;":"\u20db","triplus;":"\u2a39","trisb;":"\u29cd","tritime;":"\u2a3b","trpezium;":"\u23e2","Tscr;":"\ud835\udcaf","tscr;":"\ud835\udcc9","TScy;":"\u0426","tscy;":"\u0446","TSHcy;":"\u040b","tshcy;":"\u045b","Tstrok;":"\u0166","tstrok;":"\u0167","twixt;":"\u226c","twoheadleftarrow;":"\u219e","twoheadrightarrow;":"\u21a0","Uacute;":"\u00da",Uacute:"\u00da","uacute;":"\u00fa",uacute:"\u00fa","uarr;":"\u2191","Uarr;":"\u219f","uArr;":"\u21d1","Uarrocir;":"\u2949","Ubrcy;":"\u040e","ubrcy;":"\u045e","Ubreve;":"\u016c","ubreve;":"\u016d","Ucirc;":"\u00db",Ucirc:"\u00db","ucirc;":"\u00fb",ucirc:"\u00fb","Ucy;":"\u0423","ucy;":"\u0443","udarr;":"\u21c5","Udblac;":"\u0170","udblac;":"\u0171","udhar;":"\u296e","ufisht;":"\u297e","Ufr;":"\ud835\udd18","ufr;":"\ud835\udd32","Ugrave;":"\u00d9",Ugrave:"\u00d9","ugrave;":"\u00f9",ugrave:"\u00f9","uHar;":"\u2963","uharl;":"\u21bf","uharr;":"\u21be","uhblk;":"\u2580","ulcorn;":"\u231c","ulcorner;":"\u231c","ulcrop;":"\u230f","ultri;":"\u25f8","Umacr;":"\u016a","umacr;":"\u016b","uml;":"\u00a8",uml:"\u00a8","UnderBar;":"_","UnderBrace;":"\u23df","UnderBracket;":"\u23b5","UnderParenthesis;":"\u23dd","Union;":"\u22c3","UnionPlus;":"\u228e","Uogon;":"\u0172","uogon;":"\u0173","Uopf;":"\ud835\udd4c","uopf;":"\ud835\udd66","UpArrowBar;":"\u2912","uparrow;":"\u2191","UpArrow;":"\u2191","Uparrow;":"\u21d1","UpArrowDownArrow;":"\u21c5","updownarrow;":"\u2195","UpDownArrow;":"\u2195","Updownarrow;":"\u21d5","UpEquilibrium;":"\u296e","upharpoonleft;":"\u21bf","upharpoonright;":"\u21be","uplus;":"\u228e","UpperLeftArrow;":"\u2196","UpperRightArrow;":"\u2197","upsi;":"\u03c5","Upsi;":"\u03d2","upsih;":"\u03d2","Upsilon;":"\u03a5","upsilon;":"\u03c5","UpTeeArrow;":"\u21a5","UpTee;":"\u22a5","upuparrows;":"\u21c8","urcorn;":"\u231d","urcorner;":"\u231d","urcrop;":"\u230e","Uring;":"\u016e","uring;":"\u016f","urtri;":"\u25f9","Uscr;":"\ud835\udcb0","uscr;":"\ud835\udcca","utdot;":"\u22f0","Utilde;":"\u0168","utilde;":"\u0169","utri;":"\u25b5","utrif;":"\u25b4","uuarr;":"\u21c8","Uuml;":"\u00dc",Uuml:"\u00dc","uuml;":"\u00fc",uuml:"\u00fc","uwangle;":"\u29a7","vangrt;":"\u299c","varepsilon;":"\u03f5","varkappa;":"\u03f0","varnothing;":"\u2205","varphi;":"\u03d5","varpi;":"\u03d6","varpropto;":"\u221d","varr;":"\u2195","vArr;":"\u21d5","varrho;":"\u03f1","varsigma;":"\u03c2","varsubsetneq;":"\u228a\ufe00","varsubsetneqq;":"\u2acb\ufe00","varsupsetneq;":"\u228b\ufe00","varsupsetneqq;":"\u2acc\ufe00","vartheta;":"\u03d1","vartriangleleft;":"\u22b2","vartriangleright;":"\u22b3","vBar;":"\u2ae8","Vbar;":"\u2aeb","vBarv;":"\u2ae9","Vcy;":"\u0412","vcy;":"\u0432","vdash;":"\u22a2","vDash;":"\u22a8","Vdash;":"\u22a9","VDash;":"\u22ab","Vdashl;":"\u2ae6","veebar;":"\u22bb","vee;":"\u2228","Vee;":"\u22c1","veeeq;":"\u225a","vellip;":"\u22ee","verbar;":"|","Verbar;":"\u2016","vert;":"|","Vert;":"\u2016","VerticalBar;":"\u2223","VerticalLine;":"|","VerticalSeparator;":"\u2758","VerticalTilde;":"\u2240","VeryThinSpace;":"\u200a","Vfr;":"\ud835\udd19","vfr;":"\ud835\udd33","vltri;":"\u22b2","vnsub;":"\u2282\u20d2","vnsup;":"\u2283\u20d2","Vopf;":"\ud835\udd4d","vopf;":"\ud835\udd67","vprop;":"\u221d","vrtri;":"\u22b3","Vscr;":"\ud835\udcb1","vscr;":"\ud835\udccb","vsubnE;":"\u2acb\ufe00","vsubne;":"\u228a\ufe00","vsupnE;":"\u2acc\ufe00","vsupne;":"\u228b\ufe00","Vvdash;":"\u22aa","vzigzag;":"\u299a","Wcirc;":"\u0174","wcirc;":"\u0175","wedbar;":"\u2a5f","wedge;":"\u2227","Wedge;":"\u22c0","wedgeq;":"\u2259","weierp;":"\u2118","Wfr;":"\ud835\udd1a","wfr;":"\ud835\udd34","Wopf;":"\ud835\udd4e","wopf;":"\ud835\udd68","wp;":"\u2118","wr;":"\u2240","wreath;":"\u2240","Wscr;":"\ud835\udcb2","wscr;":"\ud835\udccc","xcap;":"\u22c2","xcirc;":"\u25ef","xcup;":"\u22c3","xdtri;":"\u25bd","Xfr;":"\ud835\udd1b","xfr;":"\ud835\udd35","xharr;":"\u27f7","xhArr;":"\u27fa","Xi;":"\u039e","xi;":"\u03be","xlarr;":"\u27f5","xlArr;":"\u27f8","xmap;":"\u27fc","xnis;":"\u22fb","xodot;":"\u2a00","Xopf;":"\ud835\udd4f","xopf;":"\ud835\udd69","xoplus;":"\u2a01","xotime;":"\u2a02","xrarr;":"\u27f6","xrArr;":"\u27f9","Xscr;":"\ud835\udcb3","xscr;":"\ud835\udccd","xsqcup;":"\u2a06","xuplus;":"\u2a04","xutri;":"\u25b3","xvee;":"\u22c1","xwedge;":"\u22c0","Yacute;":"\u00dd",Yacute:"\u00dd","yacute;":"\u00fd",yacute:"\u00fd","YAcy;":"\u042f","yacy;":"\u044f","Ycirc;":"\u0176","ycirc;":"\u0177","Ycy;":"\u042b","ycy;":"\u044b","yen;":"\u00a5",yen:"\u00a5","Yfr;":"\ud835\udd1c","yfr;":"\ud835\udd36","YIcy;":"\u0407","yicy;":"\u0457","Yopf;":"\ud835\udd50","yopf;":"\ud835\udd6a","Yscr;":"\ud835\udcb4","yscr;":"\ud835\udcce","YUcy;":"\u042e","yucy;":"\u044e","yuml;":"\u00ff",yuml:"\u00ff","Yuml;":"\u0178","Zacute;":"\u0179","zacute;":"\u017a","Zcaron;":"\u017d","zcaron;":"\u017e","Zcy;":"\u0417","zcy;":"\u0437","Zdot;":"\u017b","zdot;":"\u017c","zeetrf;":"\u2128","ZeroWidthSpace;":"\u200b","Zeta;":"\u0396","zeta;":"\u03b6","zfr;":"\ud835\udd37","Zfr;":"\u2128","ZHcy;":"\u0416","zhcy;":"\u0436","zigrarr;":"\u21dd","zopf;":"\ud835\udd6b","Zopf;":"\u2124","Zscr;":"\ud835\udcb5","zscr;":"\ud835\udccf","zwj;":"\u200d","zwnj;":"\u200c"}},{}],13:[function(e,t,n){function u(e,t){return r.isUndefined(t)?""+t:r.isNumber(t)&&(isNaN(t)||!isFinite(t))?t.toString():r.isFunction(t)||r.isRegExp(t)?t.toString():t}function a(e,t){return r.isString(e)?e.length<t?e:e.slice(0,t):e}function f(e){return a(JSON.stringify(e.actual,u),128)+" "+e.operator+" "+a(JSON.stringify(e.expected,u),128)}function l(e,t,n,r,i){throw new o.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function c(e,t){e||l(e,!0,t,"==",o.ok)}function h(e,t){if(e===t)return!0;if(r.isBuffer(e)&&r.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return r.isDate(e)&&r.isDate(t)?e.getTime()===t.getTime():r.isRegExp(e)&&r.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:!r.isObject(e)&&!r.isObject(t)?e==t:d(e,t)}function p(e){return Object.prototype.toString.call(e)=="[object Arguments]"}function d(e,t){if(r.isNullOrUndefined(e)||r.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(p(e))return p(t)?(e=i.call(e),t=i.call(t),h(e,t)):!1;try{var n=g(e),s=g(t),o,u}catch(a){return!1}if(n.length!=s.length)return!1;n.sort(),s.sort();for(u=n.length-1;u>=0;u--)if(n[u]!=s[u])return!1;for(u=n.length-1;u>=0;u--){o=n[u];if(!h(e[o],t[o]))return!1}return!0}function v(e,t){return!e||!t?!1:Object.prototype.toString.call(t)=="[object RegExp]"?t.test(e):e instanceof t?!0:t.call({},e)===!0?!0:!1}function m(e,t,n,i){var s;r.isString(n)&&(i=n,n=null);try{t()}catch(o){s=o}i=(n&&n.name?" ("+n.name+").":".")+(i?" "+i:"."),e&&!s&&l(s,n,"Missing expected exception"+i),!e&&v(s,n)&&l(s,n,"Got unwanted exception"+i);if(e&&s&&n&&!v(s,n)||!e&&s)throw s}var r=e("util/"),i=Array.prototype.slice,s=Object.prototype.hasOwnProperty,o=t.exports=c;o.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=f(this),this.generatedMessage=!0);var n=t.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,s=n.name,o=i.indexOf("\n"+s);if(o>=0){var u=i.indexOf("\n",o+1);i=i.substring(u+1)}this.stack=i}}},r.inherits(o.AssertionError,Error),o.fail=l,o.ok=c,o.equal=function(t,n,r){t!=n&&l(t,n,r,"==",o.equal)},o.notEqual=function(t,n,r){t==n&&l(t,n,r,"!=",o.notEqual)},o.deepEqual=function(t,n,r){h(t,n)||l(t,n,r,"deepEqual",o.deepEqual)},o.notDeepEqual=function(t,n,r){h(t,n)&&l(t,n,r,"notDeepEqual",o.notDeepEqual)},o.strictEqual=function(t,n,r){t!==n&&l(t,n,r,"===",o.strictEqual)},o.notStrictEqual=function(t,n,r){t===n&&l(t,n,r,"!==",o.notStrictEqual)},o.throws=function(e,t,n){m.apply(this,[!0].concat(i.call(arguments)))},o.doesNotThrow=function(e,t){m.apply(this,[!1].concat(i.call(arguments)))},o.ifError=function(e){if(e)throw e};var g=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}},{"util/":15}],14:[function(e,t,n){t.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}},{}],15:[function(e,t,n){(function(t,r){function u(e,t){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(t)?r.showHidden=t:t&&n._extend(r,t),T(r.showHidden)&&(r.showHidden=!1),T(r.depth)&&(r.depth=2),T(r.colors)&&(r.colors=!1),T(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),c(r,e,r.depth)}function a(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function f(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function c(e,t,r){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return S(i)||(i=c(e,i,r)),i}var s=h(e,t);if(s)return s;var o=Object.keys(t),u=l(o);e.showHidden&&(o=Object.getOwnPropertyNames(t));if(L(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(t);if(o.length===0){if(A(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(N(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(k(t))return e.stylize(Date.prototype.toString.call(t),"date");if(L(t))return p(t)}var f="",y=!1,b=["{","}"];g(t)&&(y=!0,b=["[","]"]);if(A(t)){var w=t.name?": "+t.name:"";f=" [Function"+w+"]"}N(t)&&(f=" "+RegExp.prototype.toString.call(t)),k(t)&&(f=" "+Date.prototype.toUTCString.call(t)),L(t)&&(f=" "+p(t));if(o.length!==0||!!y&&t.length!=0){if(r<0)return N(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return y?E=d(e,t,r,u,o):E=o.map(function(n){return v(e,t,r,u,n,y)}),e.seen.pop(),m(E,f,b)}return b[0]+f+b[1]}function h(e,t){if(T(t))return e.stylize("undefined","undefined");if(S(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(E(t))return e.stylize(""+t,"number");if(y(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){var s=[];for(var o=0,u=t.length;o<u;++o)H(t,String(o))?s.push(v(e,t,n,r,String(o),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(v(e,t,n,r,i,!0))}),s}function v(e,t,n,r,i,s){var o,u,a;a=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},a.get?a.set?u=e.stylize("[Getter/Setter]","special"):u=e.stylize("[Getter]","special"):a.set&&(u=e.stylize("[Setter]","special")),H(r,i)||(o="["+i+"]"),u||(e.seen.indexOf(a.value)<0?(b(n)?u=c(e,a.value,null):u=c(e,a.value,n-1),u.indexOf("\n")>-1&&(s?u=u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):u="\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special"));if(T(o)){if(s&&i.match(/^\d+$/))return u;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+u}function m(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(t===""?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function g(e){return Array.isArray(e)}function y(e){return typeof e=="boolean"}function b(e){return e===null}function w(e){return e==null}function E(e){return typeof e=="number"}function S(e){return typeof e=="string"}function x(e){return typeof e=="symbol"}function T(e){return e===void 0}function N(e){return C(e)&&M(e)==="[object RegExp]"}function C(e){return typeof e=="object"&&e!==null}function k(e){return C(e)&&M(e)==="[object Date]"}function L(e){return C(e)&&(M(e)==="[object Error]"||e instanceof Error)}function A(e){return typeof e=="function"}function O(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function M(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}function P(){var e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function H(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var i=/%[sdj%]/g;n.format=function(e){if(!S(e)){var t=[];for(var n=0;n<arguments.length;n++)t.push(u(arguments[n]));return t.join(" ")}var n=1,r=arguments,s=r.length,o=String(e).replace(i,function(e){if(e==="%%")return"%";if(n>=s)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"};default:return e}});for(var a=r[n];n<s;a=r[++n])b(a)||!C(a)?o+=" "+a:o+=" "+u(a);return o},n.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(T(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return o};var s={},o;n.debuglog=function(e){T(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase();if(!s[e])if((new RegExp("\\b"+e+"\\b","i")).test(o)){var r=t.pid;s[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else s[e]=function(){};return s[e]},n.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow","boolean":"yellow","undefined":"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=g,n.isBoolean=y,n.isNull=b,n.isNullOrUndefined=w,n.isNumber=E,n.isString=S,n.isSymbol=x,n.isUndefined=T,n.isRegExp=N,n.isObject=C,n.isDate=k,n.isError=L,n.isFunction=A,n.isPrimitive=O,n.isBuffer=e("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",P(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!C(t))return e;var n=Object.keys(t),r=n.length;while(r--)e[n[r]]=t[n[r]];return e}}).call(this,e("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":14,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,inherits:17}],16:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||undefined}function i(e){return typeof e=="function"}function s(e){return typeof e=="number"}function o(e){return typeof e=="object"&&e!==null}function u(e){return e===void 0}t.exports=r,r.EventEmitter=r,r.prototype._events=undefined,r.prototype._maxListeners=undefined,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,a,f;this._events||(this._events={});if(e==="error")if(!this._events.error||o(this._events.error)&&!this._events.error.length)throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');n=this._events[e];if(u(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];n.apply(this,s)}else if(o(n)){r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];f=n.slice(),r=f.length;for(a=0;a<r;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t;if(o(this._events[e])&&!this._events[e].warned){var n;u(this._maxListeners)?n=r.defaultMaxListeners:n=this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,s,u;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e],s=n.length,r=-1;if(n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(u=s;u-->0;)if(n[u]===t||n[u].listener&&n[u].listener===t){r=u;break}if(r<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}return this.removeAllListeners("removeListener"),this._events={},this}n=this._events[e];if(i(n))this.removeListener(e,n);else while(n.length)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:i(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t},r.listenerCount=function(e,t){var n;return!e._events||!e._events[t]?n=0:i(e._events[t])?n=1:n=e._events[t].length,n}},{}],17:[function(e,t,n){typeof Object.create=="function"?t.exports=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],18:[function(e,t,n){function i(){}var r=t.exports={};r.nextTick=function(){var e=typeof window!="undefined"&&window.setImmediate,t=typeof window!="undefined"&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||t===null)&&e.data==="process-tick"){e.stopPropagation();if(n.length>0){var r=n.shift();r()}}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.once=i,r.off=i,r.emit=i,r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],19:[function(e,t,n){t.exports=e(14)},{}],20:[function(e,t,n){t.exports=e(15)},{"./support/isBuffer":19,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,inherits:17}]},{},[9])(9)}),ace.define("ace/mode/html_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/html/saxparser"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("../worker/mirror").Mirror,o=e("./html/saxparser").SAXParser,u={"expected-doctype-but-got-start-tag":"info","expected-doctype-but-got-chars":"info","non-html-root":"info"},a=t.Worker=function(e){s.call(this,e),this.setTimeout(400),this.context=null};r.inherits(a,s),function(){this.setOptions=function(e){this.context=e.context},this.onUpdate=function(){var e=this.doc.getValue();if(!e)return;var t=new o,n=[],r=function(){};t.contentHandler={startDocument:r,endDocument:r,startElement:r,endElement:r,characters:r},t.errorHandler={error:function(e,t,r){n.push({row:t.line,column:t.column,text:e,type:u[r]||"error"})}},this.context?t.parseFragment(e,this.context):t.parse(e),this.sender.emit("error",n)}}.call(a.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _=" \n \f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-javascript.js b/packages/node_modules/@node-red/editor/public/vendor/ace/worker-javascript.js deleted file mode 100644 index 34e74a85f..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-javascript.js +++ /dev/null @@ -1 +0,0 @@ -"no use strict";!function(e){function t(e,t){var n=e,r="";while(n){var i=t[n];if(typeof i=="string")return i+r;if(i)return i.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(i===!1)return"";var s=n.lastIndexOf("/");if(s===-1)break;r=n.substr(s)+r,n=n.slice(0,s)}return e}if(typeof e.window!="undefined"&&e.document)return;if(e.require&&e.define)return;e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i.data,file:t,line:n,col:r,stack:i.stack}})},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(r,i){i||(i=r,r=null);if(!i.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");i=e.normalizeModule(r,i);var s=e.require.modules[i];if(s)return s.initialized||(s.initialized=!0,s.exports=s.factory().exports),s.exports;if(!e.require.tlns)return console.log("unable to load "+i);var o=t(i,e.require.tlns);return o.slice(-3)!=".js"&&(o+=".js"),e.require.id=i,e.require.modules[i]={},importScripts(o),e.require(r,i)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id);if(typeof r!="function"){e.require.modules[t]={exports:r,initialized:!0};return}n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},require.tlns={},e.initBaseUrls=function(t){for(var n in t)require.tlns[n]=t[n]},e.initSender=function(){var n=e.require("ace/lib/event_emitter").EventEmitter,r=e.require("ace/lib/oop"),i=function(){};return function(){r.implement(this,n),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(i.prototype),new i};var n=e.main=null,r=e.sender=null;e.onmessage=function(t){var i=t.data;if(i.event&&r)r._signal(i.event,i.data);else if(i.command)if(n[i.command])n[i.command].apply(n,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),require("ace/lib/es5-shim"),r=e.sender=e.initSender();var s=require(i.module)[i.classname];n=e.main=new s(r)}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function t(t,n,r){var i=t.action=="insert",s=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),u=t.start,a=i?u:t.end;return e(n,u,r)?{row:n.row,column:n.column}:e(a,n,!r)?{row:n.row+s,column:n.column+(n.row==a.row?o:0)}:{row:u.row,column:u.column}}r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,s),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new u(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=new o(i,s,u,a),l=this.$lines.slice(e,t+1);return this.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e)},this.$splitAndapplyLargeDelta=function(e,t){var n=e.lines,r=n.length,i=e.start.row,s=e.start.column,o=0,u=0;do{o=u,u+=t-1;var a=n.slice(o,u);if(u>r){e.lines=a,e.start.row=i+o,e.start.column=s;break}a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}while(!0)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(a.prototype),t.Document=a}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function s(e){if(typeof e!="object"||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=s(e[n]);return t}if(Object.prototype.toString.call(e)!=="[object Object]")return e;t={};for(var n in e)t[n]=s(e[n]);return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../document").Document,s=e("../lib/lang"),o=t.Mirror=function(e){this.sender=e;var t=this.doc=new i(""),n=this.deferredUpdate=s.delayedCall(this.onUpdate.bind(this)),r=this;e.on("change",function(e){var i=e.data;if(i[0].start)t.applyDeltas(i);else for(var s=0;s<i.length;s+=2){if(Array.isArray(i[s+1]))var o={action:"insert",start:i[s],lines:i[s+1]};else var o={action:"remove",start:i[s],end:i[s+1]};t.applyDelta(o,!0)}if(r.$timeout)return n.schedule(r.$timeout);r.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(o.prototype)}),ace.define("ace/mode/javascript/jshint",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function o(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[u]={exports:{}};t[u][0].call(c.exports,function(e){var n=t[u][1][e];return o(n?n:e)},c,c.exports,r,t,n,i)}return n[u].exports}var s=typeof e=="function"&&e;for(var u=0;u<i.length;u++)o(i[u]);return o(i[0])}({"/node_modules/browserify/node_modules/events/events.js":[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||undefined}function i(e){return typeof e=="function"}function s(e){return typeof e=="number"}function o(e){return typeof e=="object"&&e!==null}function u(e){return e===void 0}t.exports=r,r.EventEmitter=r,r.prototype._events=undefined,r.prototype._maxListeners=undefined,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,a,f;this._events||(this._events={});if(e==="error")if(!this._events.error||o(this._events.error)&&!this._events.error.length)throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');n=this._events[e];if(u(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];n.apply(this,s)}else if(o(n)){r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];f=n.slice(),r=f.length;for(a=0;a<r;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t;if(o(this._events[e])&&!this._events[e].warned){var n;u(this._maxListeners)?n=r.defaultMaxListeners:n=this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,s,u;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e],s=n.length,r=-1;if(n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(u=s;u-->0;)if(n[u]===t||n[u].listener&&n[u].listener===t){r=u;break}if(r<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}return this.removeAllListeners("removeListener"),this._events={},this}n=this._events[e];if(i(n))this.removeListener(e,n);else while(n.length)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:i(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t},r.listenerCount=function(e,t){var n;return!e._events||!e._events[t]?n=0:i(e._events[t])?n=1:n=e._events[t].length,n}},{}],"/node_modules/jshint/data/ascii-identifier-data.js":[function(e,t,n){var r=[];for(var i=0;i<128;i++)r[i]=i===36||i>=65&&i<=90||i===95||i>=97&&i<=122;var s=[];for(var i=0;i<128;i++)s[i]=r[i]||i>=48&&i<=57;t.exports={asciiIdentifierStartTable:r,asciiIdentifierPartTable:s}},{}],"/node_modules/jshint/lodash.js":[function(e,t,n){(function(e){(function(){function $(e,t,n){var r=e.length,i=n?r:-1;while(n?i--:++i<r)if(t(e[i],i,e))return i;return-1}function J(e,t,n){if(t!==t)return G(e,n);var r=n-1,i=e.length;while(++r<i)if(e[r]===t)return r;return-1}function K(e){return typeof e=="function"||!1}function Q(e){return typeof e=="string"?e:e==null?"":e+""}function G(e,t,n){var r=e.length,i=t+(n?0:-1);while(n?i--:++i<r){var s=e[i];if(s!==s)return i}return-1}function Y(e){return!!e&&typeof e=="object"}function Ct(){}function Lt(e,t){var n=-1,r=e.length;t||(t=Array(r));while(++n<r)t[n]=e[n];return t}function At(e,t){var n=-1,r=e.length;while(++n<r)if(t(e[n],n,e)===!1)break;return e}function Ot(e,t){var n=-1,r=e.length,i=-1,s=[];while(++n<r){var o=e[n];t(o,n,e)&&(s[++i]=o)}return s}function Mt(e,t){var n=-1,r=e.length,i=Array(r);while(++n<r)i[n]=t(e[n],n,e);return i}function _t(e){var t=-1,n=e.length,r=wt;while(++t<n){var i=e[t];i>r&&(r=i)}return r}function Dt(e,t){var n=-1,r=e.length;while(++n<r)if(t(e[n],n,e))return!0;return!1}function Pt(e,t,n){var i=rr(t);lt.apply(i,bn(t));var s=-1,o=i.length;while(++s<o){var u=i[s],a=e[u],f=n(a,t[u],u,e,t);if((f===f?f!==a:a===a)||a===r&&!(u in e))e[u]=f}return e}function Bt(e,t,n){n||(n={});var r=-1,i=t.length;while(++r<i){var s=t[r];n[s]=e[s]}return n}function jt(e,t,n){var i=typeof e;return i=="function"?t===r?e:on(e,t,n):e==null?lr:i=="object"?Jt(e):t===r?cr(e):Kt(e,t)}function Ft(e,t,n,i,s,u,a){var f;n&&(f=s?n(e,i,s):n(e));if(f!==r)return f;if(!Jn(e))return e;var l=Xn(e);if(l){f=wn(e);if(!t)return Lt(e,f)}else{var h=rt.call(e),p=h==c;if(!(h==d||h==o||p&&!s))return F[h]?Sn(e,h,t):s?e:{};f=En(p?{}:e);if(!t)return Ht(f,e)}u||(u=[]),a||(a=[]);var v=u.length;while(v--)if(u[v]==e)return a[v];return u.push(e),a.push(f),(l?At:zt)(e,function(r,i){f[i]=Ft(r,t,n,i,e,u,a)}),f}function qt(e,t){var n=[];return It(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Ut(e,t){return Rt(e,t,ir)}function zt(e,t){return Rt(e,t,rr)}function Wt(e,t,n){if(e==null)return;n!==r&&n in On(e)&&(t=[n]);var i=-1,s=t.length;while(e!=null&&++i<s)var o=e=e[t[i]];return o}function Xt(e,t,n,r,i,s){if(e===t)return e!==0||1/e==1/t;var o=typeof e,u=typeof t;return o!="function"&&o!="object"&&u!="function"&&u!="object"||e==null||t==null?e!==e&&t!==t:Vt(e,t,Xt,n,r,i,s)}function Vt(e,t,n,r,i,s,a){var f=Xn(e),l=Xn(t),c=u,h=u;f||(c=rt.call(e),c==o?c=d:c!=d&&(f=Zn(e))),l||(h=rt.call(t),h==o?h=d:h!=d&&(l=Zn(t)));var p=c==d,v=h==d,m=c==h;if(m&&!f&&!p)return dn(e,t,c);if(!i){var g=p&&nt.call(e,"__wrapped__"),y=v&&nt.call(t,"__wrapped__");if(g||y)return n(g?e.value():e,y?t.value():t,r,i,s,a)}if(!m)return!1;s||(s=[]),a||(a=[]);var b=s.length;while(b--)if(s[b]==e)return a[b]==t;s.push(e),a.push(t);var w=(f?pn:vn)(e,t,n,r,i,s,a);return s.pop(),a.pop(),w}function $t(e,t,n,i,s){var o=-1,u=t.length,a=!s;while(++o<u)if(a&&i[o]?n[o]!==e[t[o]]:!(t[o]in e))return!1;o=-1;while(++o<u){var f=t[o],l=e[f],c=n[o];if(a&&i[o])var h=l!==r||f in e;else h=s?s(l,c,f):r,h===r&&(h=Xt(c,l,s,!0));if(!h)return!1}return!0}function Jt(e){var t=rr(e),n=t.length;if(!n)return fr(!0);if(n==1){var i=t[0],s=e[i];if(kn(s))return function(e){return e==null?!1:e[i]===s&&(s!==r||i in On(e))}}var o=Array(n),u=Array(n);while(n--)s=e[t[n]],o[n]=s,u[n]=kn(s);return function(e){return e!=null&&$t(On(e),t,o,u)}}function Kt(e,t){var n=Xn(e),i=Nn(e)&&kn(t),s=e+"";return e=Mn(e),function(o){if(o==null)return!1;var u=s;o=On(o);if((n||!i)&&!(u in o)){o=e.length==1?o:Wt(o,en(e,0,-1));if(o==null)return!1;u=Pn(e),o=On(o)}return o[u]===t?t!==r||u in o:Xt(t,o[u],null,!0)}}function Qt(e,t,n,i,s){if(!Jn(e))return e;var o=Cn(t.length)&&(Xn(t)||Zn(t));if(!o){var u=rr(t);lt.apply(u,bn(t))}return At(u||t,function(a,f){u&&(f=a,a=t[f]);if(Y(a))i||(i=[]),s||(s=[]),Gt(e,t,f,Qt,n,i,s);else{var l=e[f],c=n?n(l,a,f,e,t):r,h=c===r;h&&(c=a),(o||c!==r)&&(h||(c===c?c!==l:l===l))&&(e[f]=c)}}),e}function Gt(e,t,n,i,s,o,u){var a=o.length,f=t[n];while(a--)if(o[a]==f){e[n]=u[a];return}var l=e[n],c=s?s(l,f,n,e,t):r,h=c===r;h&&(c=f,Cn(f.length)&&(Xn(f)||Zn(f))?c=Xn(l)?l:yn(l)?Lt(l):[]:Gn(f)||Wn(f)?c=Wn(l)?er(l):Gn(l)?l:{}:h=!1),o.push(f),u.push(c);if(h)e[n]=i(c,f,s,o,u);else if(c===c?c!==l:l===l)e[n]=c}function Yt(e){return function(t){return t==null?r:t[e]}}function Zt(e){var t=e+"";return e=Mn(e),function(n){return Wt(n,e,t)}}function en(e,t,n){var i=-1,s=e.length;t=t==null?0:+t||0,t<0&&(t=-t>s?0:s+t),n=n===r||n>s?s:+n||0,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;var o=Array(s);while(++i<s)o[i]=e[i+t];return o}function tn(e,t){var n;return It(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function nn(e,t){var n=-1,r=t.length,i=Array(r);while(++n<r)i[n]=e[t[n]];return i}function rn(e,t,n){var r=0,i=e?e.length:r;if(typeof t=="number"&&t===t&&i<=xt){while(r<i){var s=r+i>>>1,o=e[s];(n?o<=t:o<t)?r=s+1:i=s}return i}return sn(e,t,lr,n)}function sn(e,t,n,i){t=n(t);var s=0,o=e?e.length:0,u=t!==t,a=t===r;while(s<o){var f=ut((s+o)/2),l=n(e[f]),c=l===l;if(u)var h=c||i;else a?h=c&&(i||l!==r):h=i?l<=t:l<t;h?s=f+1:o=f}return bt(o,St)}function on(e,t,n){if(typeof e!="function")return lr;if(t===r)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,s){return e.call(t,n,r,i,s)};case 5:return function(n,r,i,s,o){return e.call(t,n,r,i,s,o)}}return function(){return e.apply(t,arguments)}}function un(e){return ot.call(e,0)}function an(e){return Un(function(t,n){var r=-1,i=t==null?0:n.length,s=i>2&&n[i-2],o=i>2&&n[2],u=i>1&&n[i-1];typeof s=="function"?(s=on(s,u,5),i-=2):(s=typeof u=="function"?u:null,i-=s?1:0),o&&Tn(n[0],n[1],o)&&(s=i<3?null:s,i=1);while(++r<i){var a=n[r];a&&e(t,a,s)}return t})}function fn(e,t){return function(n,r){var i=n?yn(n):0;if(!Cn(i))return e(n,r);var s=t?i:-1,o=On(n);while(t?s--:++s<i)if(r(o[s],s,o)===!1)break;return n}}function ln(e){return function(t,n,r){var i=On(t),s=r(t),o=s.length,u=e?o:-1;while(e?u--:++u<o){var a=s[u];if(n(i[a],a,i)===!1)break}return t}}function cn(e){return function(t,n,r){return!t||!t.length?-1:(n=mn(n,r,3),$(t,n,e))}}function hn(e,t){return function(n,i,s){return typeof i=="function"&&s===r&&Xn(n)?e(n,i):t(n,on(i,s,3))}}function pn(e,t,n,i,s,o,u){var a=-1,f=e.length,l=t.length,c=!0;if(f!=l&&!(s&&l>f))return!1;while(c&&++a<f){var h=e[a],p=t[a];c=r,i&&(c=s?i(p,h,a):i(h,p,a));if(c===r)if(s){var d=l;while(d--){p=t[d],c=h&&h===p||n(h,p,i,s,o,u);if(c)break}}else c=h&&h===p||n(h,p,i,s,o,u)}return!!c}function dn(e,t,n){switch(n){case a:case f:return+e==+t;case l:return e.name==t.name&&e.message==t.message;case p:return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case v:case g:return e==t+""}return!1}function vn(e,t,n,i,s,o,u){var a=rr(e),f=a.length,l=rr(t),c=l.length;if(f!=c&&!s)return!1;var h=s,p=-1;while(++p<f){var d=a[p],v=s?d in t:nt.call(t,d);if(v){var m=e[d],g=t[d];v=r,i&&(v=s?i(g,m,d):i(m,g,d)),v===r&&(v=m&&m===g||n(m,g,i,s,o,u))}if(!v)return!1;h||(h=d=="constructor")}if(!h){var y=e.constructor,b=t.constructor;if(y!=b&&"constructor"in e&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof b=="function"&&b instanceof b))return!1}return!0}function mn(e,t,n){var r=Ct.callback||ar;return r=r===ar?jt:r,n?r(e,t,n):r}function gn(e,t,n){var r=Ct.indexOf||Dn;return r=r===Dn?J:r,e?r(e,t,n):r}function wn(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&nt.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function En(e){var t=e.constructor;return typeof t=="function"&&t instanceof t||(t=Object),new t}function Sn(e,t,n){var r=e.constructor;switch(t){case b:return un(e);case a:case f:return new r(+e);case w:case E:case S:case x:case T:case N:case C:case k:case L:var i=e.buffer;return new r(n?un(i):i,e.byteOffset,e.length);case p:case g:return new r(e);case v:var s=new r(e.source,H.exec(e));s.lastIndex=e.lastIndex}return s}function xn(e,t){return e=+e,t=t==null?Nt:t,e>-1&&e%1==0&&e<t}function Tn(e,t,n){if(!Jn(n))return!1;var r=typeof t;if(r=="number")var i=yn(n),s=Cn(i)&&xn(t,i);else s=r=="string"&&t in n;if(s){var o=n[t];return e===e?e===o:o!==o}return!1}function Nn(e,t){var n=typeof e;if(n=="string"&&O.test(e)||n=="number")return!0;if(Xn(e))return!1;var r=!A.test(e);return r||t!=null&&e in On(t)}function Cn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Nt}function kn(e){return e===e&&(e===0?1/e>0:!Jn(e))}function Ln(e){var t,n=Ct.support;if(!Y(e)||rt.call(e)!=d||!nt.call(e,"constructor")&&(t=e.constructor,typeof t=="function"&&!(t instanceof t)))return!1;var i;return Ut(e,function(e,t){i=t}),i===r||nt.call(e,i)}function An(e){var t=ir(e),n=t.length,r=n&&e.length,i=Ct.support,s=r&&Cn(r)&&(Xn(e)||i.nonEnumArgs&&Wn(e)),o=-1,u=[];while(++o<n){var a=t[o];(s&&xn(a,r)||nt.call(e,a))&&u.push(a)}return u}function On(e){return Jn(e)?e:Object(e)}function Mn(e){if(Xn(e))return e;var t=[];return Q(e).replace(M,function(e,n,r,i){t.push(r?i.replace(P,"$1"):n||e)}),t}function Dn(e,t,n){var r=e?e.length:0;if(!r)return-1;if(typeof n=="number")n=n<0?yt(r+n,0):n;else if(n){var i=rn(e,t),s=e[i];return(t===t?t===s:s!==s)?i:-1}return J(e,t,n||0)}function Pn(e){var t=e?e.length:0;return t?e[t-1]:r}function Hn(e,t,n){var r=e?e.length:0;return r?(n&&typeof n!="number"&&Tn(e,t,n)&&(t=0,n=r),en(e,t,n)):[]}function Bn(e){var t=-1,n=(e&&e.length&&_t(Mt(e,yn)))>>>0,r=Array(n);while(++t<n)r[t]=Mt(e,Yt(t));return r}function In(e,t,n,r){var i=e?yn(e):0;return Cn(i)||(e=or(e),i=e.length),i?(typeof n!="number"||r&&Tn(t,n,r)?n=0:n=n<0?yt(i+n,0):n||0,typeof e=="string"||!Xn(e)&&Yn(e)?n<i&&e.indexOf(t,n)>-1:gn(e,t,n)>-1):!1}function qn(e,t,n){var r=Xn(e)?Ot:qt;return t=mn(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function Rn(e,t,n){var i=Xn(e)?Dt:tn;n&&Tn(e,t,n)&&(t=null);if(typeof t!="function"||n!==r)t=mn(t,n,3);return i(e,t)}function Un(e,t){if(typeof e!="function")throw new TypeError(s);return t=yt(t===r?e.length-1:+t||0,0),function(){var n=arguments,r=-1,i=yt(n.length-t,0),s=Array(i);while(++r<i)s[r]=n[t+r];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,n[0],s);case 2:return e.call(this,n[0],n[1],s)}var o=Array(t+1);r=-1;while(++r<t)o[r]=n[r];return o[t]=s,e.apply(this,o)}}function zn(e,t,n,r){return t&&typeof t!="boolean"&&Tn(e,t,n)?t=!1:typeof t=="function"&&(r=n,n=t,t=!1),n=typeof n=="function"&&on(n,r,1),Ft(e,t,n)}function Wn(e){var t=Y(e)?e.length:r;return Cn(t)&&rt.call(e)==o}function Vn(e){if(e==null)return!0;var t=yn(e);return Cn(t)&&(Xn(e)||Yn(e)||Wn(e)||Y(e)&&$n(e.splice))?!t:!rr(e).length}function Jn(e){var t=typeof e;return t=="function"||!!e&&t=="object"}function Kn(e){return e==null?!1:rt.call(e)==c?it.test(tt.call(e)):Y(e)&&B.test(e)}function Qn(e){return typeof e=="number"||Y(e)&&rt.call(e)==p}function Yn(e){return typeof e=="string"||Y(e)&&rt.call(e)==g}function Zn(e){return Y(e)&&Cn(e.length)&&!!j[rt.call(e)]}function er(e){return Bt(e,ir(e))}function nr(e,t){if(e==null)return!1;var n=nt.call(e,t);return!n&&!Nn(t)&&(t=Mn(t),e=t.length==1?e:Wt(e,en(t,0,-1)),t=Pn(t),n=e!=null&&nt.call(e,t)),n}function ir(e){if(e==null)return[];Jn(e)||(e=Object(e));var t=e.length;t=t&&Cn(t)&&(Xn(e)||kt.nonEnumArgs&&Wn(e))&&t||0;var n=e.constructor,r=-1,i=typeof n=="function"&&n.prototype===e,s=Array(t),o=t>0;while(++r<t)s[r]=r+"";for(var u in e)(!o||!xn(u,t))&&(u!="constructor"||!i&&!!nt.call(e,u))&&s.push(u);return s}function or(e){return nn(e,rr(e))}function ur(e){return e=Q(e),e&&D.test(e)?e.replace(_,"\\$&"):e}function ar(e,t,n){return n&&Tn(e,t,n)&&(t=null),jt(e,t)}function fr(e){return function(){return e}}function lr(e){return e}function cr(e){return Nn(e)?Yt(e):Zt(e)}var r,i="3.7.0",s="Expected a function",o="[object Arguments]",u="[object Array]",a="[object Boolean]",f="[object Date]",l="[object Error]",c="[object Function]",h="[object Map]",p="[object Number]",d="[object Object]",v="[object RegExp]",m="[object Set]",g="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",E="[object Float64Array]",S="[object Int8Array]",x="[object Int16Array]",T="[object Int32Array]",N="[object Uint8Array]",C="[object Uint8ClampedArray]",k="[object Uint16Array]",L="[object Uint32Array]",A=/\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,O=/^\w*$/,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,_=/[.*+?^${}()|[\]\/\\]/g,D=RegExp(_.source),P=/\\(\\)?/g,H=/\w*$/,B=/^\[object .+?Constructor\]$/,j={};j[w]=j[E]=j[S]=j[x]=j[T]=j[N]=j[C]=j[k]=j[L]=!0,j[o]=j[u]=j[b]=j[a]=j[f]=j[l]=j[c]=j[h]=j[p]=j[d]=j[v]=j[m]=j[g]=j[y]=!1;var F={};F[o]=F[u]=F[b]=F[a]=F[f]=F[w]=F[E]=F[S]=F[x]=F[T]=F[p]=F[d]=F[v]=F[g]=F[N]=F[C]=F[k]=F[L]=!0,F[l]=F[c]=F[h]=F[m]=F[y]=!1;var I={"function":!0,object:!0},q=I[typeof n]&&n&&!n.nodeType&&n,R=I[typeof t]&&t&&!t.nodeType&&t,U=q&&R&&typeof e=="object"&&e&&e.Object&&e,z=I[typeof self]&&self&&self.Object&&self,W=I[typeof window]&&window&&window.Object&&window,X=R&&R.exports===q&&q,V=U||W!==(this&&this.window)&&W||z||this,Z=Array.prototype,et=Object.prototype,tt=Function.prototype.toString,nt=et.hasOwnProperty,rt=et.toString,it=RegExp("^"+ur(rt).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=Kn(st=V.ArrayBuffer)&&st,ot=Kn(ot=st&&(new st(0)).slice)&&ot,ut=Math.floor,at=Kn(at=Object.getOwnPropertySymbols)&&at,ft=Kn(ft=Object.getPrototypeOf)&&ft,lt=Z.push,ct=Kn(Object.preventExtensions=Object.preventExtensions)&&ct,ht=et.propertyIsEnumerable,pt=Kn(pt=V.Uint8Array)&&pt,dt=function(){try{var e=Kn(e=V.Float64Array)&&e,t=new e(new st(10),0,1)&&e}catch(n){}return t}(),vt=function(){var e={1:0},t=ct&&Kn(t=Object.assign)&&t;try{t(ct(e),"xo")}catch(n){}return!e[1]&&t}(),mt=Kn(mt=Array.isArray)&&mt,gt=Kn(gt=Object.keys)&&gt,yt=Math.max,bt=Math.min,wt=Number.NEGATIVE_INFINITY,Et=Math.pow(2,32)-1,St=Et-1,xt=Et>>>1,Tt=dt?dt.BYTES_PER_ELEMENT:0,Nt=Math.pow(2,53)-1,kt=Ct.support={};(function(e){var t=function(){this.x=e},n={0:e,length:e},r=[];t.prototype={valueOf:e,y:e};for(var i in new t)r.push(i);kt.funcDecomp=/\bthis\b/.test(function(){return this}),kt.funcNames=typeof Function.name=="string";try{kt.nonEnumArgs=!ht.call(arguments,1)}catch(s){kt.nonEnumArgs=!0}})(1,0);var Ht=vt||function(e,t){return t==null?e:Bt(t,bn(t),Bt(t,rr(t),e))},It=fn(zt),Rt=ln();ot||(un=!st||!pt?fr(null):function(e){var t=e.byteLength,n=dt?ut(t/Tt):0,r=n*Tt,i=new st(t);if(n){var s=new dt(i,0,n);s.set(new dt(e,0,n))}return t!=r&&(s=new pt(i,r),s.set(new pt(e,r))),i});var yn=Yt("length"),bn=at?function(e){return at(On(e))}:fr([]),_n=cn(!0),jn=Un(Bn),Fn=hn(At,It),Xn=mt||function(e){return Y(e)&&Cn(e.length)&&rt.call(e)==u},$n=K(/x/)||pt&&!K(pt)?function(e){return rt.call(e)==c}:K,Gn=ft?function(e){if(!e||rt.call(e)!=d)return!1;var t=e.valueOf,n=Kn(t)&&(n=ft(t))&&ft(n);return n?e==n||ft(e)==n:Ln(e)}:Ln,tr=an(function(e,t,n){return n?Pt(e,t,n):Ht(e,t)}),rr=gt?function(e){if(e)var t=e.constructor,n=e.length;return typeof t=="function"&&t.prototype===e||typeof e!="function"&&Cn(n)?An(e):Jn(e)?gt(e):[]}:An,sr=an(Qt);Ct.assign=tr,Ct.callback=ar,Ct.constant=fr,Ct.forEach=Fn,Ct.keys=rr,Ct.keysIn=ir,Ct.merge=sr,Ct.property=cr,Ct.reject=qn,Ct.restParam=Un,Ct.slice=Hn,Ct.toPlainObject=er,Ct.unzip=Bn,Ct.values=or,Ct.zip=jn,Ct.each=Fn,Ct.extend=tr,Ct.iteratee=ar,Ct.clone=zn,Ct.escapeRegExp=ur,Ct.findLastIndex=_n,Ct.has=nr,Ct.identity=lr,Ct.includes=In,Ct.indexOf=Dn,Ct.isArguments=Wn,Ct.isArray=Xn,Ct.isEmpty=Vn,Ct.isFunction=$n,Ct.isNative=Kn,Ct.isNumber=Qn,Ct.isObject=Jn,Ct.isPlainObject=Gn,Ct.isString=Yn,Ct.isTypedArray=Zn,Ct.last=Pn,Ct.some=Rn,Ct.any=Rn,Ct.contains=In,Ct.include=In,Ct.VERSION=i,q&&R?X?(R.exports=Ct)._=Ct:q._=Ct:V._=Ct}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],"/node_modules/jshint/src/jshint.js":[function(e,t,n){var r=e("../lodash"),i=e("events"),s=e("./vars.js"),o=e("./messages.js"),u=e("./lex.js").Lexer,a=e("./reg.js"),f=e("./state.js").state,l=e("./style.js"),c=e("./options.js"),h=e("./scope-manager.js"),p=function(){"use strict";function k(e,t){return e=e.trim(),/^[+-]W\d{3}$/g.test(e)?!0:c.validNames.indexOf(e)===-1&&t.type!=="jslint"&&!r.has(c.removed,e)?(q("E001",t,e),!1):!0}function L(e){return Object.prototype.toString.call(e)==="[object String]"}function A(e,t){return e?!e.identifier||e.value!==t?!1:!0:!1}function O(e){if(!e.reserved)return!1;var t=e.meta;if(t&&t.isFutureReservedWord&&f.inES5()){if(!t.es5)return!1;if(t.strictOnly&&!f.option.strict&&!f.isStrict())return!1;if(e.isProperty)return!1}return!0}function M(e,t){return e.replace(/\{([^{}]*)\}/g,function(e,n){var r=t[n];return typeof r=="string"||typeof r=="number"?r:e})}function D(e,t){Object.keys(t).forEach(function(n){if(r.has(p.blacklist,n))return;e[n]=t[n]})}function P(){if(f.option.enforceall){for(var e in c.bool.enforcing)f.option[e]===undefined&&!c.noenforceall[e]&&(f.option[e]=!0);for(var t in c.bool.relaxing)f.option[t]===undefined&&(f.option[t]=!1)}}function H(){P(),!f.option.esversion&&!f.option.moz&&(f.option.es3?f.option.esversion=3:f.option.esnext?f.option.esversion=6:f.option.esversion=5),f.inES5()&&D(S,s.ecmaIdentifiers[5]),f.inES6()&&D(S,s.ecmaIdentifiers[6]),f.option.module&&(f.option.strict===!0&&(f.option.strict="global"),f.inES6()||F("W134",f.tokens.next,"module",6)),f.option.couch&&D(S,s.couch),f.option.qunit&&D(S,s.qunit),f.option.rhino&&D(S,s.rhino),f.option.shelljs&&(D(S,s.shelljs),D(S,s.node)),f.option.typed&&D(S,s.typed),f.option.phantom&&(D(S,s.phantom),f.option.strict===!0&&(f.option.strict="global")),f.option.prototypejs&&D(S,s.prototypejs),f.option.node&&(D(S,s.node),D(S,s.typed),f.option.strict===!0&&(f.option.strict="global")),f.option.devel&&D(S,s.devel),f.option.dojo&&D(S,s.dojo),f.option.browser&&(D(S,s.browser),D(S,s.typed)),f.option.browserify&&(D(S,s.browser),D(S,s.typed),D(S,s.browserify),f.option.strict===!0&&(f.option.strict="global")),f.option.nonstandard&&D(S,s.nonstandard),f.option.jasmine&&D(S,s.jasmine),f.option.jquery&&D(S,s.jquery),f.option.mootools&&D(S,s.mootools),f.option.worker&&D(S,s.worker),f.option.wsh&&D(S,s.wsh),f.option.globalstrict&&f.option.strict!==!1&&(f.option.strict="global"),f.option.yui&&D(S,s.yui),f.option.mocha&&D(S,s.mocha)}function B(e,t,n){var r=Math.floor(t/f.lines.length*100),i=o.errors[e].desc;throw{name:"JSHintError",line:t,character:n,message:i+" ("+r+"% scanned).",raw:i,code:e}}function j(){var e=f.ignoredLines;if(r.isEmpty(e))return;p.errors=r.reject(p.errors,function(t){return e[t.line]})}function F(e,t,n,r,i,s){var u,a,l,c;if(/^W\d{3}$/.test(e)){if(f.ignored[e])return;c=o.warnings[e]}else/E\d{3}/.test(e)?c=o.errors[e]:/I\d{3}/.test(e)&&(c=o.info[e]);return t=t||f.tokens.next||{},t.id==="(end)"&&(t=f.tokens.curr),a=t.line||0,u=t.from||0,l={id:"(error)",raw:c.desc,code:c.code,evidence:f.lines[a-1]||"",line:a,character:u,scope:p.scope,a:n,b:r,c:i,d:s},l.reason=M(c.desc,l),p.errors.push(l),j(),p.errors.length>=f.option.maxerr&&B("E043",a,u),l}function I(e,t,n,r,i,s,o){return F(e,{line:t,from:n},r,i,s,o)}function q(e,t,n,r,i,s){F(e,t,n,r,i,s)}function R(e,t,n,r,i,s,o){return q(e,{line:t,from:n},r,i,s,o)}function U(e,t){var n;return n={id:"(internal)",elem:e,value:t},p.internals.push(n),n}function z(){var e=f.tokens.next,t=e.body.match(/(-\s+)?[^\s,:]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g)||[],i={};if(e.type==="globals"){t.forEach(function(n,r){n=n.split(":");var s=(n[0]||"").trim(),o=(n[1]||"").trim();if(s==="-"||!s.length){if(r>0&&r===t.length-1)return;q("E002",e);return}s.charAt(0)==="-"?(s=s.slice(1),o=!1,p.blacklist[s]=s,delete S[s]):i[s]=o==="true"}),D(S,i);for(var s in i)r.has(i,s)&&(n[s]=e)}e.type==="exported"&&t.forEach(function(n,r){if(!n.length){if(r>0&&r===t.length-1)return;q("E002",e);return}f.funct["(scope)"].addExported(n)}),e.type==="members"&&(E=E||{},t.forEach(function(e){var t=e.charAt(0),n=e.charAt(e.length-1);t===n&&(t==='"'||t==="'")&&(e=e.substr(1,e.length-2).replace('\\"','"')),E[e]=!1}));var o=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];if(e.type==="jshint"||e.type==="jslint")t.forEach(function(t){t=t.split(":");var n=(t[0]||"").trim(),i=(t[1]||"").trim();if(!k(n,e))return;if(o.indexOf(n)>=0){if(i!=="false"){i=+i;if(typeof i!="number"||!isFinite(i)||i<=0||Math.floor(i)!==i){q("E032",e,t[1].trim());return}f.option[n]=i}else f.option[n]=n==="indent"?4:!1;return}if(n==="validthis"){if(f.funct["(global)"])return void q("E009");if(i!=="true"&&i!=="false")return void q("E002",e);f.option.validthis=i==="true";return}if(n==="quotmark"){switch(i){case"true":case"false":f.option.quotmark=i==="true";break;case"double":case"single":f.option.quotmark=i;break;default:q("E002",e)}return}if(n==="shadow"){switch(i){case"true":f.option.shadow=!0;break;case"outer":f.option.shadow="outer";break;case"false":case"inner":f.option.shadow="inner";break;default:q("E002",e)}return}if(n==="unused"){switch(i){case"true":f.option.unused=!0;break;case"false":f.option.unused=!1;break;case"vars":case"strict":f.option.unused=i;break;default:q("E002",e)}return}if(n==="latedef"){switch(i){case"true":f.option.latedef=!0;break;case"false":f.option.latedef=!1;break;case"nofunc":f.option.latedef="nofunc";break;default:q("E002",e)}return}if(n==="ignore"){switch(i){case"line":f.ignoredLines[e.line]=!0,j();break;default:q("E002",e)}return}if(n==="strict"){switch(i){case"true":f.option.strict=!0;break;case"false":f.option.strict=!1;break;case"func":case"global":case"implied":f.option.strict=i;break;default:q("E002",e)}return}n==="module"&&(zt(f.funct)||q("E055",f.tokens.next,"module"));var s={es3:3,es5:5,esnext:6};if(r.has(s,n)){switch(i){case"true":f.option.moz=!1,f.option.esversion=s[n];break;case"false":f.option.moz||(f.option.esversion=5);break;default:q("E002",e)}return}if(n==="esversion"){switch(i){case"5":f.inES5(!0)&&F("I003");case"3":case"6":f.option.moz=!1,f.option.esversion=+i;break;case"2015":f.option.moz=!1,f.option.esversion=6;break;default:q("E002",e)}zt(f.funct)||q("E055",f.tokens.next,"esversion");return}var u=/^([+-])(W\d{3})$/g.exec(n);if(u){f.ignored[u[2]]=u[1]==="-";return}var a;if(i==="true"||i==="false"){e.type==="jslint"?(a=c.renamed[n]||n,f.option[a]=i==="true",c.inverted[a]!==undefined&&(f.option[a]=!f.option[a])):f.option[n]=i==="true",n==="newcap"&&(f.option["(explicitNewcap)"]=!0);return}q("E002",e)}),H()}function W(e){var t=e||0,n=y.length,r;if(t<n)return y[t];while(n<=t)r=y[n],r||(r=y[n]=b.token()),n+=1;return!r&&f.tokens.next.id==="(end)"?f.tokens.next:r}function X(){var e=0,t;do t=W(e++);while(t.id==="(endline)");return t}function V(e,t){switch(f.tokens.curr.id){case"(number)":f.tokens.next.id==="."&&F("W005",f.tokens.curr);break;case"-":(f.tokens.next.id==="-"||f.tokens.next.id==="--")&&F("W006");break;case"+":(f.tokens.next.id==="+"||f.tokens.next.id==="++")&&F("W007")}e&&f.tokens.next.id!==e&&(t?f.tokens.next.id==="(end)"?q("E019",t,t.id):q("E020",f.tokens.next,e,t.id,t.line,f.tokens.next.value):(f.tokens.next.type!=="(identifier)"||f.tokens.next.value!==e)&&F("W116",f.tokens.next,e,f.tokens.next.value)),f.tokens.prev=f.tokens.curr,f.tokens.curr=f.tokens.next;for(;;){f.tokens.next=y.shift()||b.token(),f.tokens.next||B("E041",f.tokens.curr.line);if(f.tokens.next.id==="(end)"||f.tokens.next.id==="(error)")return;f.tokens.next.check&&f.tokens.next.check();if(f.tokens.next.isSpecial)f.tokens.next.type==="falls through"?f.tokens.curr.caseFallsThrough=!0:z();else if(f.tokens.next.id!=="(endline)")break}}function $(e){return e.infix||!e.identifier&&!e.template&&!!e.led}function J(){var e=f.tokens.curr,t=f.tokens.next;return t.id===";"||t.id==="}"||t.id===":"?!0:$(t)===$(e)||e.id==="yield"&&f.inMoz()?e.line!==G(t):!1}function K(e){return!e.left&&e.arity!=="unary"}function Q(e,t){var n,i=!1,s=!1,o=!1;f.nameStack.push(),!t&&f.tokens.next.value==="let"&&W(0).value==="("&&(f.inMoz()||F("W118",f.tokens.next,"let expressions"),o=!0,f.funct["(scope)"].stack(),V("let"),V("("),f.tokens.prev.fud(),V(")")),f.tokens.next.id==="(end)"&&q("E006",f.tokens.curr);var u=f.option.asi&&f.tokens.prev.line!==G(f.tokens.curr)&&r.contains(["]",")"],f.tokens.prev.id)&&r.contains(["[","("],f.tokens.curr.id);u&&F("W014",f.tokens.curr,f.tokens.curr.id),V(),t&&(f.funct["(verb)"]=f.tokens.curr.value,f.tokens.curr.beginsStmt=!0);if(t===!0&&f.tokens.curr.fud)n=f.tokens.curr.fud();else{f.tokens.curr.nud?n=f.tokens.curr.nud():q("E030",f.tokens.curr,f.tokens.curr.id);while((e<f.tokens.next.lbp||f.tokens.next.type==="(template)")&&!J())i=f.tokens.curr.value==="Array",s=f.tokens.curr.value==="Object",n&&(n.value||n.first&&n.first.value)&&(n.value!=="new"||n.first&&n.first.value&&n.first.value===".")&&(i=!1,n.value!==f.tokens.curr.value&&(s=!1)),V(),i&&f.tokens.curr.id==="("&&f.tokens.next.id===")"&&F("W009",f.tokens.curr),s&&f.tokens.curr.id==="("&&f.tokens.next.id===")"&&F("W010",f.tokens.curr),n&&f.tokens.curr.led?n=f.tokens.curr.led(n):q("E033",f.tokens.curr,f.tokens.curr.id)}return o&&f.funct["(scope)"].unstack(),f.nameStack.pop(),n}function G(e){return e.startLine||e.line}function Y(e,t){e=e||f.tokens.curr,t=t||f.tokens.next,!f.option.laxbreak&&e.line!==G(t)&&F("W014",t,t.value)}function Z(e){e=e||f.tokens.curr,e.line!==G(f.tokens.next)&&F("E022",e,e.value)}function et(e,t){e.line!==G(t)&&(f.option.laxcomma||(tt.first&&(F("I001"),tt.first=!1),F("W014",e,t.value)))}function tt(e){e=e||{},e.peek?et(f.tokens.prev,f.tokens.curr):(et(f.tokens.curr,f.tokens.next),V(","));if(f.tokens.next.identifier&&(!e.property||!f.inES5()))switch(f.tokens.next.value){case"break":case"case":case"catch":case"continue":case"default":case"do":case"else":case"finally":case"for":case"if":case"in":case"instanceof":case"return":case"switch":case"throw":case"try":case"var":case"let":case"while":case"with":return q("E024",f.tokens.next,f.tokens.next.value),!1}if(f.tokens.next.type==="(punctuator)")switch(f.tokens.next.value){case"}":case"]":case",":if(e.allowTrailing)return!0;case")":return q("E024",f.tokens.next,f.tokens.next.value),!1}return!0}function nt(e,t){var n=f.syntax[e];if(!n||typeof n!="object")f.syntax[e]=n={id:e,lbp:t,value:e};return n}function rt(e){var t=nt(e,0);return t.delim=!0,t}function it(e,t){var n=rt(e);return n.identifier=n.reserved=!0,n.fud=t,n}function st(e,t){var n=it(e,t);return n.block=!0,n}function ot(e){var t=e.id.charAt(0);if(t>="a"&&t<="z"||t>="A"&&t<="Z")e.identifier=e.reserved=!0;return e}function ut(e,t){var n=nt(e,150);return ot(n),n.nud=typeof t=="function"?t:function(){this.arity="unary",this.right=Q(150);if(this.id==="++"||this.id==="--")f.option.plusplus?F("W016",this,this.id):this.right&&(!this.right.identifier||O(this.right))&&this.right.id!=="."&&this.right.id!=="["&&F("W017",this),this.right&&this.right.isMetaProperty?q("E031",this):this.right&&this.right.identifier&&f.funct["(scope)"].block.modify(this.right.value,this);return this},n}function at(e,t){var n=rt(e);return n.type=e,n.nud=t,n}function ft(e,t){var n=at(e,t);return n.identifier=!0,n.reserved=!0,n}function lt(e,t){var n=at(e,t&&t.nud||function(){return this});return t=t||{},t.isFutureReservedWord=!0,n.value=e,n.identifier=!0,n.reserved=!0,n.meta=t,n}function ct(e,t){return ft(e,function(){return typeof t=="function"&&t(this),this})}function ht(e,t,n,r){var i=nt(e,n);return ot(i),i.infix=!0,i.led=function(i){return r||Y(f.tokens.prev,f.tokens.curr),(e==="in"||e==="instanceof")&&i.id==="!"&&F("W018",i,"!"),typeof t=="function"?t(i,this):(this.left=i,this.right=Q(n),this)},i}function pt(e){var t=nt(e,42);return t.led=function(e){return Y(f.tokens.prev,f.tokens.curr),this.left=e,this.right=Xt({type:"arrow",loneArg:e}),this},t}function dt(e,t){var n=nt(e,100);return n.led=function(e){Y(f.tokens.prev,f.tokens.curr),this.left=e;var n=this.right=Q(100);return A(e,"NaN")||A(n,"NaN")?F("W019",this):t&&t.apply(this,[e,n]),(!e||!n)&&B("E041",f.tokens.curr.line),e.id==="!"&&F("W018",e,"!"),n.id==="!"&&F("W018",n,"!"),this},n}function vt(e){return e&&(e.type==="(number)"&&+e.value===0||e.type==="(string)"&&e.value===""||e.type==="null"&&!f.option.eqnull||e.type==="true"||e.type==="false"||e.type==="undefined")}function gt(e,t,n){var i;return n.option.notypeof?!1:!e||!t?!1:(i=n.inES6()?mt.es6:mt.es3,t.type==="(identifier)"&&t.value==="typeof"&&e.type==="(string)"?!r.contains(i,e.value):!1)}function yt(e,t){var n=!1;return e.type==="this"&&t.funct["(context)"]===null?n=!0:e.type==="(identifier)"&&(t.option.node&&e.value==="global"?n=!0:t.option.browser&&(e.value==="window"||e.value==="document")&&(n=!0)),n}function bt(e){function n(e){if(typeof e!="object")return;return e.right==="prototype"?e:n(e.left)}function r(e){while(!e.identifier&&typeof e.left=="object")e=e.left;if(e.identifier&&t.indexOf(e.value)>=0)return e.value}var t=["Array","ArrayBuffer","Boolean","Collator","DataView","Date","DateTimeFormat","Error","EvalError","Float32Array","Float64Array","Function","Infinity","Intl","Int16Array","Int32Array","Int8Array","Iterator","Number","NumberFormat","Object","RangeError","ReferenceError","RegExp","StopIteration","String","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError"],i=n(e);if(i)return r(i)}function wt(e,t,n){var r=n&&n.allowDestructuring;t=t||e;if(f.option.freeze){var i=bt(e);i&&F("W121",e,i)}return e.identifier&&!e.isMetaProperty&&f.funct["(scope)"].block.reassign(e.value,e),e.id==="."?((!e.left||e.left.value==="arguments"&&!f.isStrict())&&F("E031",t),f.nameStack.set(f.tokens.prev),!0):e.id==="{"||e.id==="["?(r&&f.tokens.curr.left.destructAssign?f.tokens.curr.left.destructAssign.forEach(function(e){e.id&&f.funct["(scope)"].block.modify(e.id,e.token)}):e.id==="{"||!e.left?F("E031",t):e.left.value==="arguments"&&!f.isStrict()&&F("E031",t),e.id==="["&&f.nameStack.set(e.right),!0):e.isMetaProperty?(q("E031",t),!0):e.identifier&&!O(e)?(f.funct["(scope)"].labeltype(e.value)==="exception"&&F("W022",e),f.nameStack.set(e),!0):(e===f.syntax["function"]&&F("W023",f.tokens.curr),!1)}function Et(e,t,n){var r=ht(e,typeof t=="function"?t:function(e,t){t.left=e;if(e&&wt(e,t,{allowDestructuring:!0}))return t.right=Q(10),t;q("E031",t)},n);return r.exps=!0,r.assign=!0,r}function St(e,t,n){var r=nt(e,n);return ot(r),r.led=typeof t=="function"?t:function(e){return f.option.bitwise&&F("W016",this,this.id),this.left=e,this.right=Q(n),this},r}function xt(e){return Et(e,function(e,t){f.option.bitwise&&F("W016",t,t.id);if(e&&wt(e,t))return t.right=Q(10),t;q("E031",t)},20)}function Tt(e){var t=nt(e,150);return t.led=function(e){return f.option.plusplus?F("W016",this,this.id):(!e.identifier||O(e))&&e.id!=="."&&e.id!=="["&&F("W017",this),e.isMetaProperty?q("E031",this):e&&e.identifier&&f.funct["(scope)"].block.modify(e.value,e),this.left=e,this},t}function Nt(e,t,n){if(!f.tokens.next.identifier)return;n||V();var r=f.tokens.curr,i=f.tokens.curr.value;return O(r)?t&&f.inES5()?i:e&&i==="undefined"?i:(F("W024",f.tokens.curr,f.tokens.curr.id),i):i}function Ct(e,t){var n=Nt(e,t,!1);if(n)return n;if(f.tokens.next.value==="..."){f.inES6(!0)||F("W119",f.tokens.next,"spread/rest operator","6"),V();if(pn(f.tokens.next,"...")){F("E024",f.tokens.next,"...");while(pn(f.tokens.next,"..."))V()}if(!f.tokens.next.identifier){F("E024",f.tokens.curr,"...");return}return Ct(e,t)}q("E030",f.tokens.next,f.tokens.next.value),f.tokens.next.id!==";"&&V()}function kt(e){var t=0,n;if(f.tokens.next.id!==";"||e.inBracelessBlock)return;for(;;){do n=W(t),t+=1;while(n.id!=="(end)"&&n.id==="(comment)");if(n.reach)return;if(n.id!=="(endline)"){if(n.id==="function"){f.option.latedef===!0&&F("W026",n);break}F("W027",n,n.value,e.value);break}}}function Lt(){if(f.tokens.next.id!==";"){if(f.tokens.next.isUnclosed)return V();var e=G(f.tokens.next)===f.tokens.curr.line&&f.tokens.next.id!=="(end)",t=pn(f.tokens.next,"}");e&&!t?R("E058",f.tokens.curr.line,f.tokens.curr.character):f.option.asi||(t&&!f.option.lastsemic||!e)&&I("W033",f.tokens.curr.line,f.tokens.curr.character)}else V(";")}function At(){var e=g,t,n=f.tokens.next,r=!1;if(n.id===";"){V(";");return}var i=O(n);i&&n.meta&&n.meta.isFutureReservedWord&&W().id===":"&&(F("W024",n,n.id),i=!1),n.identifier&&!i&&W().id===":"&&(V(),V(":"),r=!0,f.funct["(scope)"].stack(),f.funct["(scope)"].block.addBreakLabel(n.value,{token:f.tokens.curr}),!f.tokens.next.labelled&&f.tokens.next.value!=="{"&&F("W028",f.tokens.next,n.value,f.tokens.next.value),f.tokens.next.label=n.value,n=f.tokens.next);if(n.id==="{"){var s=f.funct["(verb)"]==="case"&&f.tokens.curr.value===":";_t(!0,!0,!1,!1,s);return}return t=Q(0,!0),t&&(!t.identifier||t.value!=="function")&&(t.type!=="(punctuator)"||!t.left||!t.left.identifier||t.left.value!=="function")&&!f.isStrict()&&f.option.strict==="global"&&F("E007"),n.block||(!f.option.expr&&(!t||!t.exps)?F("W030",f.tokens.curr):f.option.nonew&&t&&t.left&&t.id==="("&&t.left.id==="new"&&F("W031",n),Lt()),g=e,r&&f.funct["(scope)"].unstack(),t}function Ot(){var e=[],t;while(!f.tokens.next.reach&&f.tokens.next.id!=="(end)")f.tokens.next.id===";"?(t=W(),(!t||t.id!=="("&&t.id!=="[")&&F("W032"),V(";")):e.push(At());return e}function Mt(){var e,t,n;while(f.tokens.next.id==="(string)"){t=W(0);if(t.id==="(endline)"){e=1;do n=W(e++);while(n.id==="(endline)");if(n.id===";")t=n;else{if(n.value==="["||n.value===".")break;(!f.option.asi||n.value==="(")&&F("W033",f.tokens.next)}}else{if(t.id==="."||t.id==="[")break;t.id!==";"&&F("W033",t)}V();var r=f.tokens.curr.value;(f.directive[r]||r==="use strict"&&f.option.strict==="implied")&&F("W034",f.tokens.curr,r),f.directive[r]=!0,t.id===";"&&V(";")}f.isStrict()&&(f.option["(explicitNewcap)"]||(f.option.newcap=!0),f.option.undef=!0)}function _t(e,t,n,i,s){var o,u=m,a=g,l,c,h,p;m=e,c=f.tokens.next;var d=f.funct["(metrics)"];d.nestedBlockDepth+=1,d.verifyMaxNestedBlockDepthPerFunction();if(f.tokens.next.id==="{"){V("{"),f.funct["(scope)"].stack(),h=f.tokens.curr.line;if(f.tokens.next.id!=="}"){g+=f.option.indent;while(!e&&f.tokens.next.from>g)g+=f.option.indent;if(n){l={};for(p in f.directive)r.has(f.directive,p)&&(l[p]=f.directive[p]);Mt(),f.option.strict&&f.funct["(context)"]["(global)"]&&!l["use strict"]&&!f.isStrict()&&F("E007")}o=Ot(),d.statementCount+=o.length,g-=f.option.indent}V("}",c),n&&(f.funct["(scope)"].validateParams(),l&&(f.directive=l)),f.funct["(scope)"].unstack(),g=a}else if(!e)if(n){f.funct["(scope)"].stack(),l={},t&&!i&&!f.inMoz()&&q("W118",f.tokens.curr,"function closure expressions");if(!t)for(p in f.directive)r.has(f.directive,p)&&(l[p]=f.directive[p]);Q(10),f.option.strict&&f.funct["(context)"]["(global)"]&&!l["use strict"]&&!f.isStrict()&&F("E007"),f.funct["(scope)"].unstack()}else q("E021",f.tokens.next,"{",f.tokens.next.value);else f.funct["(noblockscopedvar)"]=f.tokens.next.id!=="for",f.funct["(scope)"].stack(),(!t||f.option.curly)&&F("W116",f.tokens.next,"{",f.tokens.next.value),f.tokens.next.inBracelessBlock=!0,g+=f.option.indent,o=[At()],g-=f.option.indent,f.funct["(scope)"].unstack(),delete f.funct["(noblockscopedvar)"];switch(f.funct["(verb)"]){case"break":case"continue":case"return":case"throw":if(s)break;default:f.funct["(verb)"]=null}return m=u,e&&f.option.noempty&&(!o||o.length===0)&&F("W035",f.tokens.prev),d.nestedBlockDepth-=1,o}function Dt(e){E&&typeof E[e]!="boolean"&&F("W036",f.tokens.curr,e),typeof w[e]=="number"?w[e]+=1:w[e]=1}function Bt(){var e={};e.exps=!0,f.funct["(comparray)"].stack();var t=!1;return f.tokens.next.value!=="for"&&(t=!0,f.inMoz()||F("W116",f.tokens.next,"for",f.tokens.next.value),f.funct["(comparray)"].setState("use"),e.right=Q(10)),V("for"),f.tokens.next.value==="each"&&(V("each"),f.inMoz()||F("W118",f.tokens.curr,"for each")),V("("),f.funct["(comparray)"].setState("define"),e.left=Q(130),r.contains(["in","of"],f.tokens.next.value)?V():q("E045",f.tokens.curr),f.funct["(comparray)"].setState("generate"),Q(10),V(")"),f.tokens.next.value==="if"&&(V("if"),V("("),f.funct["(comparray)"].setState("filter"),e.filter=Q(10),V(")")),t||(f.funct["(comparray)"].setState("use"),e.right=Q(10)),V("]"),f.funct["(comparray)"].unstack(),e}function jt(){return f.funct["(statement)"]&&f.funct["(statement)"].type==="class"||f.funct["(context)"]&&f.funct["(context)"]["(verb)"]==="class"}function Ft(e){return e.identifier||e.id==="(string)"||e.id==="(number)"}function It(e){var t,n=!0;return typeof e=="object"?t=e:(n=e,t=Nt(!1,!0,n)),t?typeof t=="object"&&(t.id==="(string)"||t.id==="(identifier)"?t=t.value:t.id==="(number)"&&(t=t.value.toString())):f.tokens.next.id==="(string)"?(t=f.tokens.next.value,n||V()):f.tokens.next.id==="(number)"&&(t=f.tokens.next.value.toString(),n||V()),t==="hasOwnProperty"&&F("W001"),t}function qt(e){function h(e){f.funct["(scope)"].addParam.apply(f.funct["(scope)"],e)}var t,n=[],i,s=[],o,u=!1,a=!1,l=0,c=e&&e.loneArg;if(c&&c.identifier===!0)return f.funct["(scope)"].addParam(c.value,c),{arity:1,params:[c.value]};t=f.tokens.next,(!e||!e.parsedOpening)&&V("(");if(f.tokens.next.id===")"){V(")");return}for(;;){l++;var p=[];if(r.contains(["{","["],f.tokens.next.id)){s=Gt();for(o in s)o=s[o],o.id&&(n.push(o.id),p.push([o.id,o.token]))}else{pn(f.tokens.next,"...")&&(a=!0),i=Ct(!0);if(i)n.push(i),p.push([i,f.tokens.curr]);else while(!hn(f.tokens.next,[",",")"]))V()}u&&f.tokens.next.id!=="="&&q("W138",f.tokens.current),f.tokens.next.id==="="&&(f.inES6()||F("W119",f.tokens.next,"default parameters","6"),V("="),u=!0,Q(10)),p.forEach(h);if(f.tokens.next.id!==",")return V(")",t),{arity:l,params:n};a&&F("W131",f.tokens.next),tt()}}function Rt(e,t,n){var i={"(name)":e,"(breakage)":0,"(loopage)":0,"(tokens)":{},"(properties)":{},"(catch)":!1,"(global)":!1,"(line)":null,"(character)":null,"(metrics)":null,"(statement)":null,"(context)":null,"(scope)":null,"(comparray)":null,"(generator)":null,"(arrow)":null,"(params)":null};return t&&r.extend(i,{"(line)":t.line,"(character)":t.character,"(metrics)":Vt(t)}),r.extend(i,n),i["(context)"]&&(i["(scope)"]=i["(context)"]["(scope)"],i["(comparray)"]=i["(context)"]["(comparray)"]),i}function Ut(e){return"(scope)"in e}function zt(e){return e["(global)"]&&!e["(verb)"]}function Wt(e){function i(){if(f.tokens.curr.template&&f.tokens.curr.tail&&f.tokens.curr.context===t)return!0;var e=f.tokens.next.template&&f.tokens.next.tail&&f.tokens.next.context===t;return e&&V(),e||f.tokens.next.isUnclosed}var t=this.context,n=this.noSubst,r=this.depth;if(!n)while(!i())!f.tokens.next.template||f.tokens.next.depth>r?Q(0):V();return{id:"(template)",type:"(template)",tag:e}}function Xt(e){var t,n,r,i,s,o,u,a,l=f.option,c=f.ignored;e&&(r=e.name,i=e.statement,s=e.classExprBinding,o=e.type==="generator",u=e.type==="arrow",a=e.ignoreLoopFunc),f.option=Object.create(f.option),f.ignored=Object.create(f.ignored),f.funct=Rt(r||f.nameStack.infer(),f.tokens.next,{"(statement)":i,"(context)":f.funct,"(arrow)":u,"(generator)":o}),t=f.funct,n=f.tokens.curr,n.funct=f.funct,v.push(f.funct),f.funct["(scope)"].stack("functionouter");var h=r||s;h&&f.funct["(scope)"].block.add(h,s?"class":"function",f.tokens.curr,!1),f.funct["(scope)"].stack("functionparams");var p=qt(e);return p?(f.funct["(params)"]=p.params,f.funct["(metrics)"].arity=p.arity,f.funct["(metrics)"].verifyMaxParametersPerFunction()):f.funct["(metrics)"].arity=0,u&&(f.inES6(!0)||F("W119",f.tokens.curr,"arrow function syntax (=>)","6"),e.loneArg||V("=>")),_t(!1,!0,!0,u),!f.option.noyield&&o&&f.funct["(generator)"]!=="yielded"&&F("W124",f.tokens.curr),f.funct["(metrics)"].verifyMaxStatementsPerFunction(),f.funct["(metrics)"].verifyMaxComplexityPerFunction(),f.funct["(unusedOption)"]=f.option.unused,f.option=l,f.ignored=c,f.funct["(last)"]=f.tokens.curr.line,f.funct["(lastcharacter)"]=f.tokens.curr.character,f.funct["(scope)"].unstack(),f.funct["(scope)"].unstack(),f.funct=f.funct["(context)"],!a&&!f.option.loopfunc&&f.funct["(loopage)"]&&t["(isCapturing)"]&&F("W083",n),t}function Vt(e){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,arity:0,verifyMaxStatementsPerFunction:function(){f.option.maxstatements&&this.statementCount>f.option.maxstatements&&F("W071",e,this.statementCount)},verifyMaxParametersPerFunction:function(){r.isNumber(f.option.maxparams)&&this.arity>f.option.maxparams&&F("W072",e,this.arity)},verifyMaxNestedBlockDepthPerFunction:function(){f.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===f.option.maxdepth+1&&F("W073",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var t=f.option.maxcomplexity,n=this.ComplexityCount;t&&n>t&&F("W074",e,n)}}}function $t(){f.funct["(metrics)"].ComplexityCount+=1}function Jt(e){var t,n;e&&(t=e.id,n=e.paren,t===","&&(e=e.exprs[e.exprs.length-1])&&(t=e.id,n=n||e.paren));switch(t){case"=":case"+=":case"-=":case"*=":case"%=":case"&=":case"|=":case"^=":case"/=":!n&&!f.option.boss&&F("W084")}}function Kt(e){if(f.inES5())for(var t in e)e[t]&&e[t].setterToken&&!e[t].getterToken&&F("W078",e[t].setterToken)}function Qt(e,t){if(pn(f.tokens.next,".")){var n=f.tokens.curr.id;V(".");var r=Ct();return f.tokens.curr.isMetaProperty=!0,e!==r?q("E057",f.tokens.prev,n,r):t(),f.tokens.curr}}function Gt(e){var t=e&&e.assignment;return f.inES6()||F("W104",f.tokens.curr,t?"destructuring assignment":"destructuring binding","6"),Yt(e)}function Yt(e){var t,n=[],r=e&&e.openingParsed,i=e&&e.assignment,s=i?{assignment:i}:null,o=r?f.tokens.curr:f.tokens.next,u=function(){var e;if(hn(f.tokens.next,["[","{"])){t=Yt(s);for(var r in t)r=t[r],n.push({id:r.id,token:r.token})}else if(pn(f.tokens.next,","))n.push({id:null,token:f.tokens.curr});else{if(!pn(f.tokens.next,"(")){var o=pn(f.tokens.next,"...");if(i){var a=o?W(0):f.tokens.next;a.identifier||F("E030",a,a.value);var l=Q(155);l&&(wt(l),l.identifier&&(e=l.value))}else e=Ct();return e&&n.push({id:e,token:f.tokens.curr}),o}V("("),u(),V(")")}return!1},a=function(){var e;pn(f.tokens.next,"[")?(V("["),Q(10),V("]"),V(":"),u()):f.tokens.next.id==="(string)"||f.tokens.next.id==="(number)"?(V(),V(":"),u()):(e=Ct(),pn(f.tokens.next,":")?(V(":"),u()):e&&(i&&wt(f.tokens.curr),n.push({id:e,token:f.tokens.curr})))};if(pn(o,"[")){r||V("["),pn(f.tokens.next,"]")&&F("W137",f.tokens.curr);var l=!1;while(!pn(f.tokens.next,"]"))u()&&!l&&pn(f.tokens.next,",")&&(F("W130",f.tokens.next),l=!0),pn(f.tokens.next,"=")&&(pn(f.tokens.prev,"...")?V("]"):V("="),f.tokens.next.id==="undefined"&&F("W080",f.tokens.prev,f.tokens.prev.value),Q(10)),pn(f.tokens.next,"]")||V(",");V("]")}else if(pn(o,"{")){r||V("{"),pn(f.tokens.next,"}")&&F("W137",f.tokens.curr);while(!pn(f.tokens.next,"}")){a(),pn(f.tokens.next,"=")&&(V("="),f.tokens.next.id==="undefined"&&F("W080",f.tokens.prev,f.tokens.prev.value),Q(10));if(!pn(f.tokens.next,"}")){V(",");if(pn(f.tokens.next,"}"))break}}V("}")}return n}function Zt(e,t){var n=t.first;if(!n)return;r.zip(e,Array.isArray(n)?n:[n]).forEach(function(e){var t=e[0],n=e[1];t&&n?t.first=n:t&&t.first&&!n&&F("W080",t.first,t.first.value)})}function en(e,t,n){var i=n&&n.prefix,s=n&&n.inexport,o=e==="let",u=e==="const",a,l,c,h;f.inES6()||F("W104",f.tokens.curr,e,"6"),o&&f.tokens.next.value==="("?(f.inMoz()||F("W118",f.tokens.next,"let block"),V("("),f.funct["(scope)"].stack(),h=!0):f.funct["(noblockscopedvar)"]&&q("E048",f.tokens.curr,u?"Const":"Let"),t.first=[];for(;;){var p=[];r.contains(["{","["],f.tokens.next.value)?(a=Gt(),l=!1):(a=[{id:Ct(),token:f.tokens.curr}],l=!0),!i&&u&&f.tokens.next.id!=="="&&F("E012",f.tokens.curr,f.tokens.curr.value);for(var d in a)a.hasOwnProperty(d)&&(d=a[d],f.funct["(scope)"].block.isGlobal()&&S[d.id]===!1&&F("W079",d.token,d.id),d.id&&!f.funct["(noblockscopedvar)"]&&(f.funct["(scope)"].addlabel(d.id,{type:e,token:d.token}),p.push(d.token),l&&s&&f.funct["(scope)"].setExported(d.token.value,d.token)));f.tokens.next.id==="="&&(V("="),!i&&f.tokens.next.id==="undefined"&&F("W080",f.tokens.prev,f.tokens.prev.value),!i&&W(0).id==="="&&f.tokens.next.identifier&&F("W120",f.tokens.next,f.tokens.next.value),c=Q(i?120:10),l?a[0].first=c:Zt(p,c)),t.first=t.first.concat(p);if(f.tokens.next.id!==",")break;tt()}return h&&(V(")"),_t(!0,!0),t.block=!0,f.funct["(scope)"].unstack()),t}function sn(e){return f.inES6()||F("W104",f.tokens.curr,"class","6"),e?(this.name=Ct(),f.funct["(scope)"].addlabel(this.name,{type:"class",token:f.tokens.curr})):f.tokens.next.identifier&&f.tokens.next.value!=="extends"?(this.name=Ct(),this.namedExpr=!0):this.name=f.nameStack.infer(),on(this),this}function on(e){var t=f.inClassBody;f.tokens.next.value==="extends"&&(V("extends"),e.heritage=Q(10)),f.inClassBody=!0,V("{"),e.body=un(e),V("}"),f.inClassBody=t}function un(e){var t,n,r,i,s=Object.create(null),o=Object.create(null),u;for(var a=0;f.tokens.next.id!=="}";++a){t=f.tokens.next,n=!1,r=!1,i=null;if(t.id===";"){F("W032"),V(";");continue}t.id==="*"&&(r=!0,V("*"),t=f.tokens.next);if(t.id==="[")t=cn(),u=!0;else{if(!Ft(t)){F("W052",f.tokens.next,f.tokens.next.value||f.tokens.next.type),V();continue}V(),u=!1;if(t.identifier&&t.value==="static"){pn(f.tokens.next,"*")&&(r=!0,V("*"));if(Ft(f.tokens.next)||f.tokens.next.id==="[")u=f.tokens.next.id==="[",n=!0,t=f.tokens.next,f.tokens.next.id==="["?t=cn():V()}t.identifier&&(t.value==="get"||t.value==="set")&&(Ft(f.tokens.next)||f.tokens.next.id==="[")&&(u=f.tokens.next.id==="[",i=t,t=f.tokens.next,f.tokens.next.id==="["?t=cn():V())}if(!pn(f.tokens.next,"(")){q("E054",f.tokens.next,f.tokens.next.value);while(f.tokens.next.id!=="}"&&!pn(f.tokens.next,"("))V();f.tokens.next.value!=="("&&Xt({statement:e})}u||(i?ln(i.value,n?o:s,t.value,t,!0,n):(t.value==="constructor"?f.nameStack.set(e):f.nameStack.set(t),fn(n?o:s,t.value,t,!0,n)));if(i&&t.value==="constructor"){var l=i.value==="get"?"class getter method":"class setter method";q("E049",t,l,"constructor")}else t.value==="prototype"&&q("E049",t,"class method","prototype");It(t),Xt({statement:e,type:r?"generator":null,classExprBinding:e.namedExpr?e.name:null})}Kt(s)}function fn(e,t,n,r,i){var s=["key","class method","static class method"];s=s[(r||!1)+(i||!1)],n.identifier&&(t=n.value),e[t]&&t!=="__proto__"?F("W075",f.tokens.next,s,t):e[t]=Object.create(null),e[t].basic=!0,e[t].basictkn=n}function ln(e,t,n,r,i,s){var o=e==="get"?"getterToken":"setterToken",u="";i?(s&&(u+="static "),u+=e+"ter method"):u="key",f.tokens.curr.accessorType=e,f.nameStack.set(r),t[n]?(t[n].basic||t[n][o])&&n!=="__proto__"&&F("W075",f.tokens.next,u,n):t[n]=Object.create(null),t[n][o]=r}function cn(){V("["),f.inES6()||F("W119",f.tokens.curr,"computed property names","6");var e=Q(10);return V("]"),e}function hn(e,t){return e.type==="(punctuator)"?r.contains(t,e.value):!1}function pn(e,t){return e.type==="(punctuator)"&&e.value===t}function dn(){var e=an();e.notJson?(!f.inES6()&&e.isDestAssign&&F("W104",f.tokens.curr,"destructuring assignment","6"),Ot()):(f.option.laxbreak=!0,f.jsonMode=!0,mn())}function mn(){function e(){var e={},t=f.tokens.next;V("{");if(f.tokens.next.id!=="}")for(;;){if(f.tokens.next.id==="(end)")q("E026",f.tokens.next,t.line);else{if(f.tokens.next.id==="}"){F("W094",f.tokens.curr);break}f.tokens.next.id===","?q("E028",f.tokens.next):f.tokens.next.id!=="(string)"&&F("W095",f.tokens.next,f.tokens.next.value)}e[f.tokens.next.value]===!0?F("W075",f.tokens.next,"key",f.tokens.next.value):f.tokens.next.value==="__proto__"&&!f.option.proto||f.tokens.next.value==="__iterator__"&&!f.option.iterator?F("W096",f.tokens.next,f.tokens.next.value):e[f.tokens.next.value]=!0,V(),V(":"),mn();if(f.tokens.next.id!==",")break;V(",")}V("}")}function t(){var e=f.tokens.next;V("[");if(f.tokens.next.id!=="]")for(;;){if(f.tokens.next.id==="(end)")q("E027",f.tokens.next,e.line);else{if(f.tokens.next.id==="]"){F("W094",f.tokens.curr);break}f.tokens.next.id===","&&q("E028",f.tokens.next)}mn();if(f.tokens.next.id!==",")break;V(",")}V("]")}switch(f.tokens.next.id){case"{":e();break;case"[":t();break;case"true":case"false":case"null":case"(number)":case"(string)":V();break;case"-":V("-"),V("(number)");break;default:q("E003",f.tokens.next)}}var e,t={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},n,d=["closure","exception","global","label","outer","unused","var"],v,m,g,y,b,w,E,S,x,T,N=[],C=new i.EventEmitter,mt={};mt.legacy=["xml","unknown"],mt.es3=["undefined","boolean","number","string","function","object"],mt.es3=mt.es3.concat(mt.legacy),mt.es6=mt.es3.concat("symbol"),at("(number)",function(){return this}),at("(string)",function(){return this}),f.syntax["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var e=this.value;return f.tokens.next.id==="=>"?this:(f.funct["(comparray)"].check(e)||f.funct["(scope)"].block.use(e,f.tokens.curr),this)},led:function(){q("E033",f.tokens.next,f.tokens.next.value)}};var Pt={lbp:0,identifier:!1,template:!0};f.syntax["(template)"]=r.extend({type:"(template)",nud:Wt,led:Wt,noSubst:!1},Pt),f.syntax["(template middle)"]=r.extend({type:"(template middle)",middle:!0,noSubst:!1},Pt),f.syntax["(template tail)"]=r.extend({type:"(template tail)",tail:!0,noSubst:!1},Pt),f.syntax["(no subst template)"]=r.extend({type:"(template)",nud:Wt,led:Wt,noSubst:!0,tail:!0},Pt),at("(regexp)",function(){return this}),rt("(endline)"),rt("(begin)"),rt("(end)").reach=!0,rt("(error)").reach=!0,rt("}").reach=!0,rt(")"),rt("]"),rt('"').reach=!0,rt("'").reach=!0,rt(";"),rt(":").reach=!0,rt("#"),ft("else"),ft("case").reach=!0,ft("catch"),ft("default").reach=!0,ft("finally"),ct("arguments",function(e){f.isStrict()&&f.funct["(global)"]&&F("E008",e)}),ct("eval"),ct("false"),ct("Infinity"),ct("null"),ct("this",function(e){f.isStrict()&&!jt()&&!f.option.validthis&&(f.funct["(statement)"]&&f.funct["(name)"].charAt(0)>"Z"||f.funct["(global)"])&&F("W040",e)}),ct("true"),ct("undefined"),Et("=","assign",20),Et("+=","assignadd",20),Et("-=","assignsub",20),Et("*=","assignmult",20),Et("/=","assigndiv",20).nud=function(){q("E014")},Et("%=","assignmod",20),xt("&="),xt("|="),xt("^="),xt("<<="),xt(">>="),xt(">>>="),ht(",",function(e,t){var n;t.exprs=[e],f.option.nocomma&&F("W127");if(!tt({peek:!0}))return t;for(;;){if(!(n=Q(10)))break;t.exprs.push(n);if(f.tokens.next.value!==","||!tt())break}return t},10,!0),ht("?",function(e,t){return $t(),t.left=e,t.right=Q(10),V(":"),t["else"]=Q(10),t},30);var Ht=40;ht("||",function(e,t){return $t(),t.left=e,t.right=Q(Ht),t},Ht),ht("&&","and",50),St("|","bitor",70),St("^","bitxor",80),St("&","bitand",90),dt("==",function(e,t){var n=f.option.eqnull&&((e&&e.value)==="null"||(t&&t.value)==="null");switch(!0){case!n&&f.option.eqeqeq:this.from=this.character,F("W116",this,"===","==");break;case vt(e):F("W041",this,"===",e.value);break;case vt(t):F("W041",this,"===",t.value);break;case gt(t,e,f):F("W122",this,t.value);break;case gt(e,t,f):F("W122",this,e.value)}return this}),dt("===",function(e,t){return gt(t,e,f)?F("W122",this,t.value):gt(e,t,f)&&F("W122",this,e.value),this}),dt("!=",function(e,t){var n=f.option.eqnull&&((e&&e.value)==="null"||(t&&t.value)==="null");return!n&&f.option.eqeqeq?(this.from=this.character,F("W116",this,"!==","!=")):vt(e)?F("W041",this,"!==",e.value):vt(t)?F("W041",this,"!==",t.value):gt(t,e,f)?F("W122",this,t.value):gt(e,t,f)&&F("W122",this,e.value),this}),dt("!==",function(e,t){return gt(t,e,f)?F("W122",this,t.value):gt(e,t,f)&&F("W122",this,e.value),this}),dt("<"),dt(">"),dt("<="),dt(">="),St("<<","shiftleft",120),St(">>","shiftright",120),St(">>>","shiftrightunsigned",120),ht("in","in",120),ht("instanceof","instanceof",120),ht("+",function(e,t){var n;return t.left=e,t.right=n=Q(130),e&&n&&e.id==="(string)"&&n.id==="(string)"?(e.value+=n.value,e.character=n.character,!f.option.scripturl&&a.javascriptURL.test(e.value)&&F("W050",e),e):t},130),ut("+","num"),ut("+++",function(){return F("W007"),this.arity="unary",this.right=Q(150),this}),ht("+++",function(e){return F("W007"),this.left=e,this.right=Q(130),this},130),ht("-","sub",130),ut("-","neg"),ut("---",function(){return F("W006"),this.arity="unary",this.right=Q(150),this}),ht("---",function(e){return F("W006"),this.left=e,this.right=Q(130),this},130),ht("*","mult",140),ht("/","div",140),ht("%","mod",140),Tt("++"),ut("++","preinc"),f.syntax["++"].exps=!0,Tt("--"),ut("--","predec"),f.syntax["--"].exps=!0,ut("delete",function(){var e=Q(10);return e?(e.id!=="."&&e.id!=="["&&F("W051"),this.first=e,e.identifier&&!f.isStrict()&&(e.forgiveUndef=!0),this):this}).exps=!0,ut("~",function(){return f.option.bitwise&&F("W016",this,"~"),this.arity="unary",this.right=Q(150),this}),ut("...",function(){return f.inES6(!0)||F("W119",this,"spread/rest operator","6"),!f.tokens.next.identifier&&f.tokens.next.type!=="(string)"&&!hn(f.tokens.next,["[","("])&&q("E030",f.tokens.next,f.tokens.next.value),Q(150),this}),ut("!",function(){return this.arity="unary",this.right=Q(150),this.right||B("E041",this.line||0),t[this.right.id]===!0&&F("W018",this,"!"),this}),ut("typeof",function(){var e=Q(150);return this.first=this.right=e,e||B("E041",this.line||0,this.character||0),e.identifier&&(e.forgiveUndef=!0),this}),ut("new",function(){var e=Qt("target",function(){f.inES6(!0)||F("W119",f.tokens.prev,"new.target","6");var e,t=f.funct;while(t){e=!t["(global)"];if(!t["(arrow)"])break;t=t["(context)"]}e||F("W136",f.tokens.prev,"new.target")});if(e)return e;var t=Q(155),n;if(t&&t.id!=="function")if(t.identifier){t["new"]=!0;switch(t.value){case"Number":case"String":case"Boolean":case"Math":case"JSON":F("W053",f.tokens.prev,t.value);break;case"Symbol":f.inES6()&&F("W053",f.tokens.prev,t.value);break;case"Function":f.option.evil||F("W054");break;case"Date":case"RegExp":case"this":break;default:t.id!=="function"&&(n=t.value.substr(0,1),f.option.newcap&&(n<"A"||n>"Z")&&!f.funct["(scope)"].isPredefined(t.value)&&F("W055",f.tokens.curr))}}else t.id!=="."&&t.id!=="["&&t.id!=="("&&F("W056",f.tokens.curr);else f.option.supernew||F("W057",this);return f.tokens.next.id!=="("&&!f.option.supernew&&F("W058",f.tokens.curr,f.tokens.curr.value),this.first=this.right=t,this}),f.syntax["new"].exps=!0,ut("void").exps=!0,ht(".",function(e,t){var n=Ct(!1,!0);return typeof n=="string"&&Dt(n),t.left=e,t.right=n,n&&n==="hasOwnProperty"&&f.tokens.next.value==="="&&F("W001"),!e||e.value!=="arguments"||n!=="callee"&&n!=="caller"?!f.option.evil&&e&&e.value==="document"&&(n==="write"||n==="writeln")&&F("W060",e):f.option.noarg?F("W059",e,n):f.isStrict()&&q("E008"),!f.option.evil&&(n==="eval"||n==="execScript")&&yt(e,f)&&F("W061"),t},160,!0),ht("(",function(e,t){f.option.immed&&e&&!e.immed&&e.id==="function"&&F("W062");var n=0,r=[];e&&e.type==="(identifier)"&&e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&"Array Number String Boolean Date Object Error Symbol".indexOf(e.value)===-1&&(e.value==="Math"?F("W063",e):f.option.newcap&&F("W064",e));if(f.tokens.next.id!==")")for(;;){r[r.length]=Q(10),n+=1;if(f.tokens.next.id!==",")break;tt()}return V(")"),typeof e=="object"&&(!f.inES5()&&e.value==="parseInt"&&n===1&&F("W065",f.tokens.curr),f.option.evil||(e.value==="eval"||e.value==="Function"||e.value==="execScript"?(F("W061",e),r[0]&&[0].id==="(string)"&&U(e,r[0].value)):!r[0]||r[0].id!=="(string)"||e.value!=="setTimeout"&&e.value!=="setInterval"?r[0]&&r[0].id==="(string)"&&e.value==="."&&e.left.value==="window"&&(e.right==="setTimeout"||e.right==="setInterval")&&(F("W066",e),U(e,r[0].value)):(F("W066",e),U(e,r[0].value))),!e.identifier&&e.id!=="."&&e.id!=="["&&e.id!=="=>"&&e.id!=="("&&e.id!=="&&"&&e.id!=="||"&&e.id!=="?"&&(!f.inES6()||!e["(name)"])&&F("W067",t)),t.left=e,t},155,!0).exps=!0,ut("(",function(){var e=f.tokens.next,t,n=-1,r,i,s,o,u=1,a=f.tokens.curr,l=f.tokens.prev,c=!f.option.singleGroups;do e.value==="("?u+=1:e.value===")"&&(u-=1),n+=1,t=e,e=W(n);while((u!==0||t.value!==")")&&e.value!==";"&&e.type!=="(end)");f.tokens.next.id==="function"&&(i=f.tokens.next.immed=!0);if(e.value==="=>")return Xt({type:"arrow",parsedOpening:!0});var h=[];if(f.tokens.next.id!==")")for(;;){h.push(Q(10));if(f.tokens.next.id!==",")break;f.option.nocomma&&F("W127"),tt()}V(")",this),f.option.immed&&h[0]&&h[0].id==="function"&&f.tokens.next.id!=="("&&f.tokens.next.id!=="."&&f.tokens.next.id!=="["&&F("W068",this);if(!h.length)return;return h.length>1?(r=Object.create(f.syntax[","]),r.exprs=h,s=h[0],o=h[h.length-1],c||(c=l.assign||l.delim)):(r=s=o=h[0],c||(c=a.beginsStmt&&(r.id==="{"||i||Ut(r))||i&&(!J()||f.tokens.prev.id!=="}")||Ut(r)&&!J()||r.id==="{"&&l.id==="=>"||r.type==="(number)"&&pn(e,".")&&/^\d+$/.test(r.value))),r&&(!c&&(s.left||s.right||r.exprs)&&(c=!K(l)&&s.lbp<=l.lbp||!J()&&o.lbp<f.tokens.next.lbp),c||F("W126",a),r.paren=!0),r}),pt("=>"),ht("[",function(e,t){var n=Q(10),r;return n&&n.type==="(string)"&&(!f.option.evil&&(n.value==="eval"||n.value==="execScript")&&yt(e,f)&&F("W061"),Dt(n.value),!f.option.sub&&a.identifier.test(n.value)&&(r=f.syntax[n.value],(!r||!O(r))&&F("W069",f.tokens.prev,n.value))),V("]",t),n&&n.value==="hasOwnProperty"&&f.tokens.next.value==="="&&F("W001"),t.left=e,t.right=n,t},160,!0),ut("[",function(){var e=an();if(e.isCompArray)return!f.option.esnext&&!f.inMoz()&&F("W118",f.tokens.curr,"array comprehension"),Bt();if(e.isDestAssign)return this.destructAssign=Gt({openingParsed:!0,assignment:!0}),this;var t=f.tokens.curr.line!==G(f.tokens.next);this.first=[],t&&(g+=f.option.indent,f.tokens.next.from===g+f.option.indent&&(g+=f.option.indent));while(f.tokens.next.id!=="(end)"){while(f.tokens.next.id===","){if(!f.option.elision){if(!!f.inES5()){F("W128");do V(",");while(f.tokens.next.id===",");continue}F("W070")}V(",")}if(f.tokens.next.id==="]")break;this.first.push(Q(10));if(f.tokens.next.id!==",")break;tt({allowTrailing:!0});if(f.tokens.next.id==="]"&&!f.inES5()){F("W070",f.tokens.curr);break}}return t&&(g-=f.option.indent),V("]",this),this}),function(e){e.nud=function(){var e,t,n,r,i,s=!1,o,u=Object.create(null);e=f.tokens.curr.line!==G(f.tokens.next),e&&(g+=f.option.indent,f.tokens.next.from===g+f.option.indent&&(g+=f.option.indent));var a=an();if(a.isDestAssign)return this.destructAssign=Gt({openingParsed:!0,assignment:!0}),this;for(;;){if(f.tokens.next.id==="}")break;o=f.tokens.next.value;if(!f.tokens.next.identifier||X().id!==","&&X().id!=="}")if(W().id===":"||o!=="get"&&o!=="set"){f.tokens.next.value==="*"&&f.tokens.next.type==="(punctuator)"?(f.inES6()||F("W104",f.tokens.next,"generator functions","6"),V("*"),s=!0):s=!1;if(f.tokens.next.id==="[")n=cn(),f.nameStack.set(n);else{f.nameStack.set(f.tokens.next),n=It(),fn(u,n,f.tokens.next);if(typeof n!="string")break}f.tokens.next.value==="("?(f.inES6()||F("W104",f.tokens.curr,"concise methods","6"),Xt({type:s?"generator":null})):(V(":"),Q(10))}else V(o),f.inES5()||q("E034"),n=It(),!n&&!f.inES6()&&q("E035"),n&&ln(o,u,n,f.tokens.curr),i=f.tokens.next,t=Xt(),r=t["(params)"],o==="get"&&n&&r?F("W076",i,r[0],n):o==="set"&&n&&(!r||r.length!==1)&&F("W077",i,n);else f.inES6()||F("W104",f.tokens.next,"object short notation","6"),n=It(!0),fn(u,n,f.tokens.next),Q(10);Dt(n);if(f.tokens.next.id!==",")break;tt({allowTrailing:!0,property:!0}),f.tokens.next.id===","?F("W070",f.tokens.curr):f.tokens.next.id==="}"&&!f.inES5()&&F("W070",f.tokens.curr)}return e&&(g-=f.option.indent),V("}",this),Kt(u),this},e.fud=function(){q("E036",f.tokens.curr)}}(rt("{"));var tn=it("const",function(e){return en("const",this,e)});tn.exps=!0;var nn=it("let",function(e){return en("let",this,e)});nn.exps=!0;var rn=it("var",function(e){var t=e&&e.prefix,n=e&&e.inexport,i,o,u,a=e&&e.implied,l=!e||!e.ignore;this.first=[];for(;;){var c=[];r.contains(["{","["],f.tokens.next.value)?(i=Gt(),o=!1):(i=[{id:Ct(),token:f.tokens.curr}],o=!0),(!t||!a)&&l&&f.option.varstmt&&F("W132",this),this.first=this.first.concat(c);for(var h in i)i.hasOwnProperty(h)&&(h=i[h],!a&&f.funct["(global)"]&&(S[h.id]===!1?F("W079",h.token,h.id):f.option.futurehostile===!1&&(!f.inES5()&&s.ecmaIdentifiers[5][h.id]===!1||!f.inES6()&&s.ecmaIdentifiers[6][h.id]===!1)&&F("W129",h.token,h.id)),h.id&&(a==="for"?(f.funct["(scope)"].has(h.id)||l&&F("W088",h.token,h.id),f.funct["(scope)"].block.use(h.id,h.token)):(f.funct["(scope)"].addlabel(h.id,{type:"var",token:h.token}),o&&n&&f.funct["(scope)"].setExported(h.id,h.token)),c.push(h.token)));f.tokens.next.id==="="&&(f.nameStack.set(f.tokens.curr),V("="),!t&&l&&!f.funct["(loopage)"]&&f.tokens.next.id==="undefined"&&F("W080",f.tokens.prev,f.tokens.prev.value),W(0).id==="="&&f.tokens.next.identifier&&(!t&&l&&!f.funct["(params)"]||f.funct["(params)"].indexOf(f.tokens.next.value)===-1)&&F("W120",f.tokens.next,f.tokens.next.value),u=Q(t?120:10),o?i[0].first=u:Zt(c,u));if(f.tokens.next.id!==",")break;tt()}return this});rn.exps=!0,st("class",function(){return sn.call(this,!0)}),st("function",function(e){var t=e&&e.inexport,n=!1;f.tokens.next.value==="*"&&(V("*"),f.inES6({strict:!0})?n=!0:F("W119",f.tokens.curr,"function*","6")),m&&F("W082",f.tokens.curr);var r=Nt();return f.funct["(scope)"].addlabel(r,{type:"function",token:f.tokens.curr}),r===undefined?F("W025"):t&&f.funct["(scope)"].setExported(r,f.tokens.prev),Xt({name:r,statement:this,type:n?"generator":null,ignoreLoopFunc:m}),f.tokens.next.id==="("&&f.tokens.next.line===f.tokens.curr.line&&q("E039"),this}),ut("function",function(){var e=!1;f.tokens.next.value==="*"&&(f.inES6()||F("W119",f.tokens.curr,"function*","6"),V("*"),e=!0);var t=Nt();return Xt({name:t,type:e?"generator":null}),this}),st("if",function(){var e=f.tokens.next;$t(),f.condition=!0,V("(");var t=Q(0);Jt(t);var n=null;f.option.forin&&f.forinifcheckneeded&&(f.forinifcheckneeded=!1,n=f.forinifchecks[f.forinifchecks.length-1],t.type==="(punctuator)"&&t.value==="!"?n.type="(negative)":n.type="(positive)"),V(")",e),f.condition=!1;var r=_t(!0,!0);return n&&n.type==="(negative)"&&r&&r[0]&&r[0].type==="(identifier)"&&r[0].value==="continue"&&(n.type="(negative-with-continue)"),f.tokens.next.id==="else"&&(V("else"),f.tokens.next.id==="if"||f.tokens.next.id==="switch"?At():_t(!0,!0)),this}),st("try",function(){function t(){V("catch"),V("("),f.funct["(scope)"].stack("catchparams");if(hn(f.tokens.next,["[","{"])){var e=Gt();r.each(e,function(e){e.id&&f.funct["(scope)"].addParam(e.id,e,"exception")})}else f.tokens.next.type!=="(identifier)"?F("E030",f.tokens.next,f.tokens.next.value):f.funct["(scope)"].addParam(Ct(),f.tokens.curr,"exception");f.tokens.next.value==="if"&&(f.inMoz()||F("W118",f.tokens.curr,"catch filter"),V("if"),Q(0)),V(")"),_t(!1),f.funct["(scope)"].unstack()}var e;_t(!0);while(f.tokens.next.id==="catch")$t(),e&&!f.inMoz()&&F("W118",f.tokens.next,"multiple catch blocks"),t(),e=!0;if(f.tokens.next.id==="finally"){V("finally"),_t(!0);return}return e||q("E021",f.tokens.next,"catch",f.tokens.next.value),this}),st("while",function(){var e=f.tokens.next;return f.funct["(breakage)"]+=1,f.funct["(loopage)"]+=1,$t(),V("("),Jt(Q(0)),V(")",e),_t(!0,!0),f.funct["(breakage)"]-=1,f.funct["(loopage)"]-=1,this}).labelled=!0,st("with",function(){var e=f.tokens.next;return f.isStrict()?q("E010",f.tokens.curr):f.option.withstmt||F("W085",f.tokens.curr),V("("),Q(0),V(")",e),_t(!0,!0),this}),st("switch",function(){var e=f.tokens.next,t=!1,n=!1;f.funct["(breakage)"]+=1,V("("),Jt(Q(0)),V(")",e),e=f.tokens.next,V("{"),f.tokens.next.from===g&&(n=!0),n||(g+=f.option.indent),this.cases=[];for(;;)switch(f.tokens.next.id){case"case":switch(f.funct["(verb)"]){case"yield":case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:f.tokens.curr.caseFallsThrough||F("W086",f.tokens.curr,"case")}V("case"),this.cases.push(Q(0)),$t(),t=!0,V(":"),f.funct["(verb)"]="case";break;case"default":switch(f.funct["(verb)"]){case"yield":case"break":case"continue":case"return":case"throw":break;default:this.cases.length&&(f.tokens.curr.caseFallsThrough||F("W086",f.tokens.curr,"default"))}V("default"),t=!0,V(":");break;case"}":n||(g-=f.option.indent),V("}",e),f.funct["(breakage)"]-=1,f.funct["(verb)"]=undefined;return;case"(end)":q("E023",f.tokens.next,"}");return;default:g+=f.option.indent;if(t)switch(f.tokens.curr.id){case",":q("E040");return;case":":t=!1,Ot();break;default:q("E025",f.tokens.curr);return}else{if(f.tokens.curr.id!==":"){q("E021",f.tokens.next,"case",f.tokens.next.value);return}V(":"),q("E024",f.tokens.curr,":"),Ot()}g-=f.option.indent}return this}).labelled=!0,it("debugger",function(){return f.option.debug||F("W087",this),this}).exps=!0,function(){var e=it("do",function(){f.funct["(breakage)"]+=1,f.funct["(loopage)"]+=1,$t(),this.first=_t(!0,!0),V("while");var e=f.tokens.next;return V("("),Jt(Q(0)),V(")",e),f.funct["(breakage)"]-=1,f.funct["(loopage)"]-=1,this});e.labelled=!0,e.exps=!0}(),st("for",function(){var e,t=f.tokens.next,n=!1,i=null;t.value==="each"&&(i=t,V("each"),f.inMoz()||F("W118",f.tokens.curr,"for each")),$t(),V("(");var s,o=0,u=["in","of"],a=0,l,c;hn(f.tokens.next,["{","["])&&++a;do{s=W(o),++o,hn(s,["{","["])?++a:hn(s,["}","]"])&&--a;if(a<0)break;a===0&&(!l&&pn(s,",")?l=s:!c&&pn(s,"=")&&(c=s))}while(a>0||!r.contains(u,s.value)&&s.value!==";"&&s.type!=="(end)");if(r.contains(u,s.value)){!f.inES6()&&s.value==="of"&&F("W104",s,"for of","6");var h=!c&&!l;c&&q("W133",l,s.value,"initializer is forbidden"),l&&q("W133",l,s.value,"more than one ForBinding"),f.tokens.next.id==="var"?(V("var"),f.tokens.curr.fud({prefix:!0})):f.tokens.next.id==="let"||f.tokens.next.id==="const"?(V(f.tokens.next.id),n=!0,f.funct["(scope)"].stack(),f.tokens.curr.fud({prefix:!0})):Object.create(rn).fud({prefix:!0,implied:"for",ignore:!h}),V(s.value),Q(20),V(")",t),s.value==="in"&&f.option.forin&&(f.forinifcheckneeded=!0,f.forinifchecks===undefined&&(f.forinifchecks=[]),f.forinifchecks.push({type:"(none)"})),f.funct["(breakage)"]+=1,f.funct["(loopage)"]+=1,e=_t(!0,!0);if(s.value==="in"&&f.option.forin){if(f.forinifchecks&&f.forinifchecks.length>0){var p=f.forinifchecks.pop();(e&&e.length>0&&(typeof e[0]!="object"||e[0].value!=="if")||p.type==="(positive)"&&e.length>1||p.type==="(negative)")&&F("W089",this)}f.forinifcheckneeded=!1}f.funct["(breakage)"]-=1,f.funct["(loopage)"]-=1}else{i&&q("E045",i);if(f.tokens.next.id!==";")if(f.tokens.next.id==="var")V("var"),f.tokens.curr.fud();else if(f.tokens.next.id==="let")V("let"),n=!0,f.funct["(scope)"].stack(),f.tokens.curr.fud();else for(;;){Q(0,"for");if(f.tokens.next.id!==",")break;l()}Z(f.tokens.curr),V(";"),f.funct["(loopage)"]+=1,f.tokens.next.id!==";"&&Jt(Q(0)),Z(f.tokens.curr),V(";"),f.tokens.next.id===";"&&q("E021",f.tokens.next,")",";");if(f.tokens.next.id!==")")for(;;){Q(0,"for");if(f.tokens.next.id!==",")break;l()}V(")",t),f.funct["(breakage)"]+=1,_t(!0,!0),f.funct["(breakage)"]-=1,f.funct["(loopage)"]-=1}return n&&f.funct["(scope)"].unstack(),this}).labelled=!0,it("break",function(){var e=f.tokens.next.value;return f.option.asi||Z(this),f.tokens.next.id!==";"&&!f.tokens.next.reach&&f.tokens.curr.line===G(f.tokens.next)?(f.funct["(scope)"].funct.hasBreakLabel(e)||F("W090",f.tokens.next,e),this.first=f.tokens.next,V()):f.funct["(breakage)"]===0&&F("W052",f.tokens.next,this.value),kt(this),this}).exps=!0,it("continue",function(){var e=f.tokens.next.value;return f.funct["(breakage)"]===0&&F("W052",f.tokens.next,this.value),f.funct["(loopage)"]||F("W052",f.tokens.next,this.value),f.option.asi||Z(this),f.tokens.next.id!==";"&&!f.tokens.next.reach&&f.tokens.curr.line===G(f.tokens.next)&&(f.funct["(scope)"].funct.hasBreakLabel(e)||F("W090",f.tokens.next,e),this.first=f.tokens.next,V()),kt(this),this}).exps=!0,it("return",function(){return this.line===G(f.tokens.next)?f.tokens.next.id!==";"&&!f.tokens.next.reach&&(this.first=Q(0),this.first&&this.first.type==="(punctuator)"&&this.first.value==="="&&!this.first.paren&&!f.option.boss&&I("W093",this.first.line,this.first.character)):f.tokens.next.type==="(punctuator)"&&["[","{","+","-"].indexOf(f.tokens.next.value)>-1&&Z(this),kt(this),this}).exps=!0,function(e){e.exps=!0,e.lbp=25}(ut("yield",function(){var e=f.tokens.prev;f.inES6(!0)&&!f.funct["(generator)"]?("(catch)"!==f.funct["(name)"]||!f.funct["(context)"]["(generator)"])&&q("E046",f.tokens.curr,"yield"):f.inES6()||F("W104",f.tokens.curr,"yield","6"),f.funct["(generator)"]="yielded";var t=!1;f.tokens.next.value==="*"&&(t=!0,V("*"));if(this.line===G(f.tokens.next)||!f.inMoz()){if(t||f.tokens.next.id!==";"&&!f.option.asi&&!f.tokens.next.reach&&f.tokens.next.nud)Y(f.tokens.curr,f.tokens.next),this.first=Q(10),this.first.type==="(punctuator)"&&this.first.value==="="&&!this.first.paren&&!f.option.boss&&I("W093",this.first.line,this.first.character);f.inMoz()&&f.tokens.next.id!==")"&&(e.lbp>30||!e.assign&&!J()||e.id==="yield")&&q("E050",this)}else f.option.asi||Z(this);return this})),it("throw",function(){return Z(this),this.first=Q(20),kt(this),this}).exps=!0,it("import",function(){f.inES6()||F("W119",f.tokens.curr,"import","6");if(f.tokens.next.type==="(string)")return V("(string)"),this;if(f.tokens.next.identifier){this.name=Ct(),f.funct["(scope)"].addlabel(this.name,{type:"const",token:f.tokens.curr});if(f.tokens.next.value!==",")return V("from"),V("(string)"),this;V(",")}if(f.tokens.next.id==="*")V("*"),V("as"),f.tokens.next.identifier&&(this.name=Ct(),f.funct["(scope)"].addlabel(this.name,{type:"const",token:f.tokens.curr}));else{V("{");for(;;){if(f.tokens.next.value==="}"){V("}");break}var e;f.tokens.next.type==="default"?(e="default",V("default")):e=Ct(),f.tokens.next.value==="as"&&(V("as"),e=Ct()),f.funct["(scope)"].addlabel(e,{type:"const",token:f.tokens.curr});if(f.tokens.next.value!==","){if(f.tokens.next.value==="}"){V("}");break}q("E024",f.tokens.next,f.tokens.next.value);break}V(",")}}return V("from"),V("(string)"),this}).exps=!0,it("export",function(){var e=!0,t,n;f.inES6()||(F("W119",f.tokens.curr,"export","6"),e=!1),f.funct["(scope)"].block.isGlobal()||(q("E053",f.tokens.curr),e=!1);if(f.tokens.next.value==="*")return V("*"),V("from"),V("(string)"),this;if(f.tokens.next.type==="default"){f.nameStack.set(f.tokens.next),V("default");var r=f.tokens.next.id;if(r==="function"||r==="class")this.block=!0;return t=W(),Q(10),n=t.value,this.block&&(f.funct["(scope)"].addlabel(n,{type:r,token:t}),f.funct["(scope)"].setExported(n,t)),this}if(f.tokens.next.value==="{"){V("{");var i=[];for(;;){f.tokens.next.identifier||q("E030",f.tokens.next,f.tokens.next.value),V(),i.push(f.tokens.curr),f.tokens.next.value==="as"&&(V("as"),f.tokens.next.identifier||q("E030",f.tokens.next,f.tokens.next.value),V());if(f.tokens.next.value!==","){if(f.tokens.next.value==="}"){V("}");break}q("E024",f.tokens.next,f.tokens.next.value);break}V(",")}return f.tokens.next.value==="from"?(V("from"),V("(string)")):e&&i.forEach(function(e){f.funct["(scope)"].setExported(e.value,e)}),this}if(f.tokens.next.id==="var")V("var"),f.tokens.curr.fud({inexport:!0});else if(f.tokens.next.id==="let")V("let"),f.tokens.curr.fud({inexport:!0});else if(f.tokens.next.id==="const")V("const"),f.tokens.curr.fud({inexport:!0});else if(f.tokens.next.id==="function")this.block=!0,V("function"),f.syntax["function"].fud({inexport:!0});else if(f.tokens.next.id==="class"){this.block=!0,V("class");var s=f.tokens.next;f.syntax["class"].fud(),f.funct["(scope)"].setExported(s.value,s)}else q("E024",f.tokens.next,f.tokens.next.value);return this}).exps=!0,lt("abstract"),lt("boolean"),lt("byte"),lt("char"),lt("class",{es5:!0,nud:sn}),lt("double"),lt("enum",{es5:!0}),lt("export",{es5:!0}),lt("extends",{es5:!0}),lt("final"),lt("float"),lt("goto"),lt("implements",{es5:!0,strictOnly:!0}),lt("import",{es5:!0}),lt("int"),lt("interface",{es5:!0,strictOnly:!0}),lt("long"),lt("native"),lt("package",{es5:!0,strictOnly:!0}),lt("private",{es5:!0,strictOnly:!0}),lt("protected",{es5:!0,strictOnly:!0}),lt("public",{es5:!0,strictOnly:!0}),lt("short"),lt("static",{es5:!0,strictOnly:!0}),lt("super",{es5:!0}),lt("synchronized"),lt("transient"),lt("volatile");var an=function(){var e,t,n,r=-1,i=0,s={};hn(f.tokens.curr,["[","{"])&&(i+=1);do{n=r===-1?f.tokens.curr:e,e=r===-1?f.tokens.next:W(r),t=W(r+1),r+=1,hn(e,["[","{"])?i+=1:hn(e,["]","}"])&&(i-=1);if(i===1&&e.identifier&&e.value==="for"&&!pn(n,".")){s.isCompArray=!0,s.notJson=!0;break}if(i===0&&hn(e,["}","]"])){if(t.value==="="){s.isDestAssign=!0,s.notJson=!0;break}if(t.value==="."){s.notJson=!0;break}}pn(e,";")&&(s.isBlock=!0,s.notJson=!0)}while(i>0&&e.id!=="(end)");return s},vn=function(){function i(e){var t=n.variables.filter(function(t){if(t.value===e)return t.undef=!1,e}).length;return t!==0}function s(e){var t=n.variables.filter(function(t){if(t.value===e&&!t.undef)return t.unused===!0&&(t.unused=!1),e}).length;return t===0}var e=function(){this.mode="use",this.variables=[]},t=[],n;return{stack:function(){n=new e,t.push(n)},unstack:function(){n.variables.filter(function(e){e.unused&&F("W098",e.token,e.raw_text||e.value),e.undef&&f.funct["(scope)"].block.use(e.value,e.token)}),t.splice(-1,1),n=t[t.length-1]},setState:function(e){r.contains(["use","define","generate","filter"],e)&&(n.mode=e)},check:function(e){if(!n)return;return n&&n.mode==="use"?(s(e)&&n.variables.push({funct:f.funct,token:f.tokens.curr,value:e,undef:!0,unused:!1}),!0):n&&n.mode==="define"?(i(e)||n.variables.push({funct:f.funct,token:f.tokens.curr,value:e,undef:!1,unused:!0}),!0):n&&n.mode==="generate"?(f.funct["(scope)"].block.use(e,f.tokens.curr),!0):n&&n.mode==="filter"?(s(e)&&f.funct["(scope)"].block.use(e,f.tokens.curr),!0):!1}}},gn=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},yn=function(t,i,o){function U(e,t){if(!e)return;!Array.isArray(e)&&typeof e=="object"&&(e=Object.keys(e)),e.forEach(t)}var a,l,c,d,A,O,M={},P={};i=r.clone(i),f.reset(),i&&i.scope?p.scope=i.scope:(p.errors=[],p.undefs=[],p.internals=[],p.blacklist={},p.scope="(main)"),S=Object.create(null),D(S,s.ecmaIdentifiers[3]),D(S,s.reservedVars),D(S,o||{}),n=Object.create(null);var j=Object.create(null);if(i){U(i.predef||null,function(e){var t,n;e[0]==="-"?(t=e.slice(1),p.blacklist[t]=t,delete S[t]):(n=Object.getOwnPropertyDescriptor(i.predef,e),S[e]=n?n.value:!1)}),U(i.exported||null,function(e){j[e]=!0}),delete i.predef,delete i.exported,O=Object.keys(i);for(c=0;c<O.length;c++)if(/^-W\d{3}$/g.test(O[c]))P[O[c].slice(1)]=!0;else{var z=O[c];M[z]=i[z],(z==="esversion"&&i[z]===5||z==="es5"&&i[z])&&F("I003"),O[c]==="newcap"&&i[z]===!1&&(M["(explicitNewcap)"]=!0)}}f.option=M,f.ignored=P,f.option.indent=f.option.indent||4,f.option.maxerr=f.option.maxerr||50,g=1;var W=h(f,S,j,n);W.on("warning",function(e){F.apply(null,[e.code,e.token].concat(e.data))}),W.on("error",function(e){q.apply(null,[e.code,e.token].concat(e.data))}),f.funct=Rt("(global)",null,{"(global)":!0,"(scope)":W,"(comparray)":vn(),"(metrics)":Vt(f.tokens.next)}),v=[f.funct],T=[],x=null,w={},E=null,m=!1,y=[];if(!L(t)&&!Array.isArray(t))return R("E004",0),!1;e={get isJSON(){return f.jsonMode},getOption:function(e){return f.option[e]||null},getCache:function(e){return f.cache[e]},setCache:function(e,t){f.cache[e]=t},warn:function(e,t){I.apply(null,[e,t.line,t.char].concat(t.data))},on:function(e,t){e.split(" ").forEach(function(e){C.on(e,t)}.bind(this))}},C.removeAllListeners(),(N||[]).forEach(function(t){t(e)}),f.tokens.prev=f.tokens.curr=f.tokens.next=f.syntax["(begin)"],i&&i.ignoreDelimiters&&(Array.isArray(i.ignoreDelimiters)||(i.ignoreDelimiters=[i.ignoreDelimiters]),i.ignoreDelimiters.forEach(function(e){if(!e.start||!e.end)return;d=gn(e.start)+"[\\s\\S]*?"+gn(e.end),A=new RegExp(d,"ig"),t=t.replace(A,function(e){return e.replace(/./g," ")})})),b=new u(t),b.on("warning",function(e){I.apply(null,[e.code,e.line,e.character].concat(e.data))}),b.on("error",function(e){R.apply(null,[e.code,e.line,e.character].concat(e.data))}),b.on("fatal",function(e){B("E041",e.line,e.from)}),b.on("Identifier",function(e){C.emit("Identifier",e)}),b.on("String",function(e){C.emit("String",e)}),b.on("Number",function(e){C.emit("Number",e)}),b.start();for(var X in i)r.has(i,X)&&k(X,f.tokens.curr);H(),D(S,o||{}),tt.first=!0;try{V();switch(f.tokens.next.id){case"{":case"[":dn();break;default:Mt(),f.directive["use strict"]&&f.option.strict!=="global"&&F("W097",f.tokens.prev),Ot()}f.tokens.next.id!=="(end)"&&B("E041",f.tokens.curr.line),f.funct["(scope)"].unstack()}catch($){if(!$||$.name!=="JSHintError")throw $;var J=f.tokens.next||{};p.errors.push({scope:"(main)",raw:$.raw,code:$.code,reason:$.message,line:$.line||J.line,character:$.character||J.from},null)}if(p.scope==="(main)"){i=i||{};for(a=0;a<p.internals.length;a+=1)l=p.internals[a],i.scope=l.elem,yn(l.value,i,o)}return p.errors.length===0};return yn.addModule=function(e){N.push(e)},yn.addModule(l.register),yn.data=function(){var e={functions:[],options:f.option},t,n,r,i,s,o;yn.errors.length&&(e.errors=yn.errors),f.jsonMode&&(e.json=!0);var u=f.funct["(scope)"].getImpliedGlobals();u.length>0&&(e.implieds=u),T.length>0&&(e.urls=T),o=f.funct["(scope)"].getUsedOrDefinedGlobals(),o.length>0&&(e.globals=o);for(r=1;r<v.length;r+=1){n=v[r],t={};for(i=0;i<d.length;i+=1)t[d[i]]=[];for(i=0;i<d.length;i+=1)t[d[i]].length===0&&delete t[d[i]];t.name=n["(name)"],t.param=n["(params)"],t.line=n["(line)"],t.character=n["(character)"],t.last=n["(last)"],t.lastcharacter=n["(lastcharacter)"],t.metrics={complexity:n["(metrics)"].ComplexityCount,parameters:n["(metrics)"].arity,statements:n["(metrics)"].statementCount},e.functions.push(t)}var a=f.funct["(scope)"].getUnuseds();a.length>0&&(e.unused=a);for(s in w)if(typeof w[s]=="number"){e.member=w;break}return e},yn.jshint=yn,yn}();typeof n=="object"&&n&&(n.JSHINT=p)},{"../lodash":"/node_modules/jshint/lodash.js","./lex.js":"/node_modules/jshint/src/lex.js","./messages.js":"/node_modules/jshint/src/messages.js","./options.js":"/node_modules/jshint/src/options.js","./reg.js":"/node_modules/jshint/src/reg.js","./scope-manager.js":"/node_modules/jshint/src/scope-manager.js","./state.js":"/node_modules/jshint/src/state.js","./style.js":"/node_modules/jshint/src/style.js","./vars.js":"/node_modules/jshint/src/vars.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/lex.js":[function(e,t,n){"use strict";function h(){var e=[];return{push:function(t){e.push(t)},check:function(){for(var t=0;t<e.length;++t)e[t]();e.splice(0,e.length)}}}function p(e){var t=e;typeof t=="string"&&(t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n")),t[0]&&t[0].substr(0,2)==="#!"&&(t[0].indexOf("node")!==-1&&(o.option.node=!0),t[0]=""),this.emitter=new i.EventEmitter,this.source=e,this.setLines(t),this.prereg=!0,this.line=0,this.char=1,this.from=1,this.input="",this.inComment=!1,this.context=[],this.templateStarts=[];for(var n=0;n<o.option.indent;n+=1)o.tab+=" ";this.ignoreLinterErrors=!1}var r=e("../lodash"),i=e("events"),s=e("./reg.js"),o=e("./state.js").state,u=e("../data/ascii-identifier-data.js"),a=u.asciiIdentifierStartTable,f=u.asciiIdentifierPartTable,l={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,NullLiteral:7,BooleanLiteral:8,RegExp:9,TemplateHead:10,TemplateMiddle:11,TemplateTail:12,NoSubstTemplate:13},c={Block:1,Template:2};p.prototype={_lines:[],inContext:function(e){return this.context.length>0&&this.context[this.context.length-1].type===e},pushContext:function(e){this.context.push({type:e})},popContext:function(){return this.context.pop()},isContext:function(e){return this.context.length>0&&this.context[this.context.length-1]===e},currentContext:function(){return this.context.length>0&&this.context[this.context.length-1]},getLines:function(){return this._lines=o.lines,this._lines},setLines:function(e){this._lines=e,o.lines=this._lines},peek:function(e){return this.input.charAt(e||0)},skip:function(e){e=e||1,this.char+=e,this.input=this.input.slice(e)},on:function(e,t){e.split(" ").forEach(function(e){this.emitter.on(e,t)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(e,t,n,r){n.push(function(){r()&&this.trigger(e,t)}.bind(this))},scanPunctuator:function(){var e=this.peek(),t,n,r;switch(e){case".":if(/^[0-9]$/.test(this.peek(1)))return null;if(this.peek(1)==="."&&this.peek(2)===".")return{type:l.Punctuator,value:"..."};case"(":case")":case";":case",":case"[":case"]":case":":case"~":case"?":return{type:l.Punctuator,value:e};case"{":return this.pushContext(c.Block),{type:l.Punctuator,value:e};case"}":return this.inContext(c.Block)&&this.popContext(),{type:l.Punctuator,value:e};case"#":return{type:l.Punctuator,value:e};case"":return null}return t=this.peek(1),n=this.peek(2),r=this.peek(3),e===">"&&t===">"&&n===">"&&r==="="?{type:l.Punctuator,value:">>>="}:e==="="&&t==="="&&n==="="?{type:l.Punctuator,value:"==="}:e==="!"&&t==="="&&n==="="?{type:l.Punctuator,value:"!=="}:e===">"&&t===">"&&n===">"?{type:l.Punctuator,value:">>>"}:e==="<"&&t==="<"&&n==="="?{type:l.Punctuator,value:"<<="}:e===">"&&t===">"&&n==="="?{type:l.Punctuator,value:">>="}:e==="="&&t===">"?{type:l.Punctuator,value:e+t}:e===t&&"+-<>&|".indexOf(e)>=0?{type:l.Punctuator,value:e+t}:"<>=!+-*%&|^".indexOf(e)>=0?t==="="?{type:l.Punctuator,value:e+t}:{type:l.Punctuator,value:e}:e==="/"?t==="="?{type:l.Punctuator,value:"/="}:{type:l.Punctuator,value:"/"}:null},scanComments:function(){function u(e,t,n){var r=["jshint","jslint","members","member","globals","global","exported"],i=!1,u=e+t,a="plain";return n=n||{},n.isMultiline&&(u+="*/"),t=t.replace(/\n/g," "),e==="/*"&&s.fallsThrough.test(t)&&(i=!0,a="falls through"),r.forEach(function(n){if(i)return;if(e==="//"&&n!=="jshint")return;t.charAt(n.length)===" "&&t.substr(0,n.length)===n&&(i=!0,e+=n,t=t.substr(n.length)),!i&&t.charAt(0)===" "&&t.charAt(n.length+1)===" "&&t.substr(1,n.length)===n&&(i=!0,e=e+" "+n,t=t.substr(n.length+1));if(!i)return;switch(n){case"member":a="members";break;case"global":a="globals";break;default:var r=t.split(":").map(function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")});if(r.length===2)switch(r[0]){case"ignore":switch(r[1]){case"start":o.ignoringLinterErrors=!0,i=!1;break;case"end":o.ignoringLinterErrors=!1,i=!1}}a=n}}),{type:l.Comment,commentType:a,value:u,body:t,isSpecial:i,isMultiline:n.isMultiline||!1,isMalformed:n.isMalformed||!1}}var e=this.peek(),t=this.peek(1),n=this.input.substr(2),r=this.line,i=this.char,o=this;if(e==="*"&&t==="/")return this.trigger("error",{code:"E018",line:r,character:i}),this.skip(2),null;if(e!=="/"||t!=="*"&&t!=="/")return null;if(t==="/")return this.skip(this.input.length),u("//",n);var a="";if(t==="*"){this.inComment=!0,this.skip(2);while(this.peek()!=="*"||this.peek(1)!=="/")if(this.peek()===""){a+="\n";if(!this.nextLine())return this.trigger("error",{code:"E017",line:r,character:i}),this.inComment=!1,u("/*",a,{isMultiline:!0,isMalformed:!0})}else a+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,u("/*",a,{isMultiline:!0})}},scanKeyword:function(){var e=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),t=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];return e&&t.indexOf(e[0])>=0?{type:l.Keyword,value:e[0]}:null},scanIdentifier:function(){function i(e){return e>256}function s(e){return e>256}function o(e){return/^[0-9a-fA-F]$/.test(e)}function p(e){return e.replace(/\\u([0-9a-fA-F]{4})/g,function(e,t){return String.fromCharCode(parseInt(t,16))})}var e="",t=0,n,r,u=function(){t+=1;if(this.peek(t)!=="u")return null;var e=this.peek(t+1),n=this.peek(t+2),r=this.peek(t+3),i=this.peek(t+4),u;return o(e)&&o(n)&&o(r)&&o(i)?(u=parseInt(e+n+r+i,16),f[u]||s(u)?(t+=5,"\\u"+e+n+r+i):null):null}.bind(this),c=function(){var e=this.peek(t),n=e.charCodeAt(0);return n===92?u():n<128?a[n]?(t+=1,e):null:i(n)?(t+=1,e):null}.bind(this),h=function(){var e=this.peek(t),n=e.charCodeAt(0);return n===92?u():n<128?f[n]?(t+=1,e):null:s(n)?(t+=1,e):null}.bind(this);r=c();if(r===null)return null;e=r;for(;;){r=h();if(r===null)break;e+=r}switch(e){case"true":case"false":n=l.BooleanLiteral;break;case"null":n=l.NullLiteral;break;default:n=l.Identifier}return{type:n,value:p(e),text:e,tokenLength:e.length}},scanNumericLiteral:function(){function f(e){return/^[0-9]$/.test(e)}function c(e){return/^[0-7]$/.test(e)}function h(e){return/^[01]$/.test(e)}function p(e){return/^[0-9a-fA-F]$/.test(e)}function d(e){return e==="$"||e==="_"||e==="\\"||e>="a"&&e<="z"||e>="A"&&e<="Z"}var e=0,t="",n=this.input.length,r=this.peek(e),i,s=f,u=10,a=!1;if(r!=="."&&!f(r))return null;if(r!=="."){t=this.peek(e),e+=1,r=this.peek(e);if(t==="0"){if(r==="x"||r==="X")s=p,u=16,e+=1,t+=r;if(r==="o"||r==="O")s=c,u=8,o.inES6(!0)||this.trigger("warning",{code:"W119",line:this.line,character:this.char,data:["Octal integer literal","6"]}),e+=1,t+=r;if(r==="b"||r==="B")s=h,u=2,o.inES6(!0)||this.trigger("warning",{code:"W119",line:this.line,character:this.char,data:["Binary integer literal","6"]}),e+=1,t+=r;c(r)&&(s=c,u=8,a=!0,i=!1,e+=1,t+=r),!c(r)&&f(r)&&(e+=1,t+=r)}while(e<n){r=this.peek(e);if(a&&f(r))i=!0;else if(!s(r))break;t+=r,e+=1}if(s!==f){if(!a&&t.length<=2)return{type:l.NumericLiteral,value:t,isMalformed:!0};if(e<n){r=this.peek(e);if(d(r))return null}return{type:l.NumericLiteral,value:t,base:u,isLegacy:a,isMalformed:!1}}}if(r==="."){t+=r,e+=1;while(e<n){r=this.peek(e);if(!f(r))break;t+=r,e+=1}}if(r==="e"||r==="E"){t+=r,e+=1,r=this.peek(e);if(r==="+"||r==="-")t+=this.peek(e),e+=1;r=this.peek(e);if(!f(r))return null;t+=r,e+=1;while(e<n){r=this.peek(e);if(!f(r))break;t+=r,e+=1}}if(e<n){r=this.peek(e);if(d(r))return null}return{type:l.NumericLiteral,value:t,base:u,isMalformed:!isFinite(t)}},scanEscapeSequence:function(e){var t=!1,n=1;this.skip();var r=this.peek();switch(r){case"'":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\'"]},e,function(){return o.jsonMode});break;case"b":r="\\b";break;case"f":r="\\f";break;case"n":r="\\n";break;case"r":r="\\r";break;case"t":r="\\t";break;case"0":r="\\0";var i=parseInt(this.peek(1),10);this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},e,function(){return i>=0&&i<=7&&o.isStrict()});break;case"u":var s=this.input.substr(1,4),u=parseInt(s,16);isNaN(u)&&this.trigger("warning",{code:"W052",line:this.line,character:this.char,data:["u"+s]}),r=String.fromCharCode(u),n=5;break;case"v":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\v"]},e,function(){return o.jsonMode}),r=" ";break;case"x":var a=parseInt(this.input.substr(1,2),16);this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\x-"]},e,function(){return o.jsonMode}),r=String.fromCharCode(a),n=3;break;case"\\":r="\\\\";break;case'"':r='\\"';break;case"/":break;case"":t=!0,r=""}return{"char":r,jump:n,allowNewLine:t}},scanTemplateLiteral:function(e){var t,n="",r,i=this.line,s=this.char,u=this.templateStarts.length;if(!o.inES6(!0))return null;if(this.peek()==="`")t=l.TemplateHead,this.templateStarts.push({line:this.line,"char":this.char}),u=this.templateStarts.length,this.skip(1),this.pushContext(c.Template);else{if(!this.inContext(c.Template)||this.peek()!=="}")return null;t=l.TemplateMiddle}while(this.peek()!=="`"){while((r=this.peek())===""){n+="\n";if(!this.nextLine()){var a=this.templateStarts.pop();return this.trigger("error",{code:"E052",line:a.line,character:a.char}),{type:t,value:n,startLine:i,startChar:s,isUnclosed:!0,depth:u,context:this.popContext()}}}if(r==="$"&&this.peek(1)==="{")return n+="${",this.skip(2),{type:t,value:n,startLine:i,startChar:s,isUnclosed:!1,depth:u,context:this.currentContext()};if(r==="\\"){var f=this.scanEscapeSequence(e);n+=f.char,this.skip(f.jump)}else r!=="`"&&(n+=r,this.skip(1))}return t=t===l.TemplateHead?l.NoSubstTemplate:l.TemplateTail,this.skip(1),this.templateStarts.pop(),{type:t,value:n,startLine:i,startChar:s,isUnclosed:!1,depth:u,context:this.popContext()}},scanStringLiteral:function(e){var t=this.peek();if(t!=='"'&&t!=="'")return null;this.triggerAsync("warning",{code:"W108",line:this.line,character:this.char},e,function(){return o.jsonMode&&t!=='"'});var n="",r=this.line,i=this.char,s=!1;this.skip();while(this.peek()!==t)if(this.peek()===""){s?(s=!1,this.triggerAsync("warning",{code:"W043",line:this.line,character:this.char},e,function(){return!o.option.multistr}),this.triggerAsync("warning",{code:"W042",line:this.line,character:this.char},e,function(){return o.jsonMode&&o.option.multistr})):this.trigger("warning",{code:"W112",line:this.line,character:this.char});if(!this.nextLine())return this.trigger("error",{code:"E029",line:r,character:i}),{type:l.StringLiteral,value:n,startLine:r,startChar:i,isUnclosed:!0,quote:t}}else{s=!1;var u=this.peek(),a=1;u<" "&&this.trigger("warning",{code:"W113",line:this.line,character:this.char,data:["<non-printable>"]});if(u==="\\"){var f=this.scanEscapeSequence(e);u=f.char,a=f.jump,s=f.allowNewLine}n+=u,this.skip(a)}return this.skip(),{type:l.StringLiteral,value:n,startLine:r,startChar:i,isUnclosed:!1,quote:t}},scanRegExp:function(){var e=0,t=this.input.length,n=this.peek(),r=n,i="",s=[],o=!1,u=!1,a,f=function(){n<" "&&(o=!0,this.trigger("warning",{code:"W048",line:this.line,character:this.char})),n==="<"&&(o=!0,this.trigger("warning",{code:"W049",line:this.line,character:this.char,data:[n]}))}.bind(this);if(!this.prereg||n!=="/")return null;e+=1,a=!1;while(e<t){n=this.peek(e),r+=n,i+=n;if(u){n==="]"&&(this.peek(e-1)!=="\\"||this.peek(e-2)==="\\")&&(u=!1),n==="\\"&&(e+=1,n=this.peek(e),i+=n,r+=n,f()),e+=1;continue}if(n==="\\"){e+=1,n=this.peek(e),i+=n,r+=n,f();if(n==="/"){e+=1;continue}if(n==="["){e+=1;continue}}if(n==="["){u=!0,e+=1;continue}if(n==="/"){i=i.substr(0,i.length-1),a=!0,e+=1;break}e+=1}if(!a)return this.trigger("error",{code:"E015",line:this.line,character:this.from}),void this.trigger("fatal",{line:this.line,from:this.from});while(e<t){n=this.peek(e);if(!/[gim]/.test(n))break;s.push(n),r+=n,e+=1}try{new RegExp(i,s.join(""))}catch(c){o=!0,this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[c.message]})}return{type:l.RegExp,value:r,flags:s,isMalformed:o}},scanNonBreakingSpaces:function(){return o.option.nonbsp?this.input.search(/(\u00A0)/):-1},scanUnsafeChars:function(){return this.input.search(s.unsafeChars)},next:function(e){this.from=this.char;var t;if(/\s/.test(this.peek())){t=this.char;while(/\s/.test(this.peek()))this.from+=1,this.skip()}var n=this.scanComments()||this.scanStringLiteral(e)||this.scanTemplateLiteral(e);return n?n:(n=this.scanRegExp()||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(),n?(this.skip(n.tokenLength||n.value.length),n):null)},nextLine:function(){var e;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var t=this.input.trim(),n=function(){return r.some(arguments,function(e){return t.indexOf(e)===0})},i=function(){return r.some(arguments,function(e){return t.indexOf(e,t.length-e.length)!==-1})};this.ignoringLinterErrors===!0&&!n("/*","//")&&(!this.inComment||!i("*/"))&&(this.input=""),e=this.scanNonBreakingSpaces(),e>=0&&this.trigger("warning",{code:"W125",line:this.line,character:e+1}),this.input=this.input.replace(/\t/g,o.tab),e=this.scanUnsafeChars(),e>=0&&this.trigger("warning",{code:"W100",line:this.line,character:e});if(!this.ignoringLinterErrors&&o.option.maxlen&&o.option.maxlen<this.input.length){var u=this.inComment||n.call(t,"//")||n.call(t,"/*"),a=!u||!s.maxlenException.test(t);a&&this.trigger("warning",{code:"W101",line:this.line,character:this.input.length})}return!0},start:function(){this.nextLine()},token:function(){function n(e,t){if(!e.reserved)return!1;var n=e.meta;if(n&&n.isFutureReservedWord&&o.inES5()){if(!n.es5)return!1;if(n.strictOnly&&!o.option.strict&&!o.isStrict())return!1;if(t)return!1}return!0}var e=h(),t,i=function(t,i,s,u){var a;t!=="(endline)"&&t!=="(end)"&&(this.prereg=!1);if(t==="(punctuator)"){switch(i){case".":case")":case"~":case"#":case"]":case"++":case"--":this.prereg=!1;break;default:this.prereg=!0}a=Object.create(o.syntax[i]||o.syntax["(error)"])}if(t==="(identifier)"){if(i==="return"||i==="case"||i==="typeof")this.prereg=!0;r.has(o.syntax,i)&&(a=Object.create(o.syntax[i]||o.syntax["(error)"]),n(a,s&&t==="(identifier)")||(a=null))}return a||(a=Object.create(o.syntax[t])),a.identifier=t==="(identifier)",a.type=a.type||t,a.value=i,a.line=this.line,a.character=this.char,a.from=this.from,a.identifier&&u&&(a.raw_text=u.text||u.value),u&&u.startLine&&u.startLine!==this.line&&(a.startLine=u.startLine),u&&u.context&&(a.context=u.context),u&&u.depth&&(a.depth=u.depth),u&&u.isUnclosed&&(a.isUnclosed=u.isUnclosed),s&&a.identifier&&(a.isProperty=s),a.check=e.check,a}.bind(this);for(;;){if(!this.input.length)return this.nextLine()?i("(endline)",""):this.exhausted?null:(this.exhausted=!0,i("(end)",""));t=this.next(e);if(!t){this.input.length&&(this.trigger("error",{code:"E024",line:this.line,character:this.char,data:[this.peek()]}),this.input="");continue}switch(t.type){case l.StringLiteral:return this.triggerAsync("String",{line:this.line,"char":this.char,from:this.from,startLine:t.startLine,startChar:t.startChar,value:t.value,quote:t.quote},e,function(){return!0}),i("(string)",t.value,null,t);case l.TemplateHead:return this.trigger("TemplateHead",{line:this.line,"char":this.char,from:this.from,startLine:t.startLine,startChar:t.startChar,value:t.value}),i("(template)",t.value,null,t);case l.TemplateMiddle:return this.trigger("TemplateMiddle",{line:this.line,"char":this.char,from:this.from,startLine:t.startLine,startChar:t.startChar,value:t.value}),i("(template middle)",t.value,null,t);case l.TemplateTail:return this.trigger("TemplateTail",{line:this.line,"char":this.char,from:this.from,startLine:t.startLine,startChar:t.startChar,value:t.value}),i("(template tail)",t.value,null,t);case l.NoSubstTemplate:return this.trigger("NoSubstTemplate",{line:this.line,"char":this.char,from:this.from,startLine:t.startLine,startChar:t.startChar,value:t.value}),i("(no subst template)",t.value,null,t);case l.Identifier:this.triggerAsync("Identifier",{line:this.line,"char":this.char,from:this.form,name:t.value,raw_name:t.text,isProperty:o.tokens.curr.id==="."},e,function(){return!0});case l.Keyword:case l.NullLiteral:case l.BooleanLiteral:return i("(identifier)",t.value,o.tokens.curr.id===".",t);case l.NumericLiteral:return t.isMalformed&&this.trigger("warning",{code:"W045",line:this.line,character:this.char,data:[t.value]}),this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["0x-"]},e,function(){return t.base===16&&o.jsonMode}),this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},e,function(){return o.isStrict()&&t.base===8&&t.isLegacy}),this.trigger("Number",{line:this.line,"char":this.char,from:this.from,value:t.value,base:t.base,isMalformed:t.malformed}),i("(number)",t.value);case l.RegExp:return i("(regexp)",t.value);case l.Comment:o.tokens.curr.comment=!0;if(t.isSpecial)return{id:"(comment)",value:t.value,body:t.body,type:t.commentType,isSpecial:t.isSpecial,line:this.line,character:this.char,from:this.from};break;case"":break;default:return i("(punctuator)",t.value)}}}},n.Lexer=p,n.Context=c},{"../data/ascii-identifier-data.js":"/node_modules/jshint/data/ascii-identifier-data.js","../lodash":"/node_modules/jshint/lodash.js","./reg.js":"/node_modules/jshint/src/reg.js","./state.js":"/node_modules/jshint/src/state.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/messages.js":[function(e,t,n){"use strict";var r=e("../lodash"),i={E001:"Bad option: '{a}'.",E002:"Bad option value.",E003:"Expected a JSON value.",E004:"Input is neither a string nor an array of strings.",E005:"Input is empty.",E006:"Unexpected early end of program.",E007:'Missing "use strict" statement.',E008:"Strict violation.",E009:"Option 'validthis' can't be used in a global scope.",E010:"'with' is not allowed in strict mode.",E011:"'{a}' has already been declared.",E012:"const '{a}' is initialized to 'undefined'.",E013:"Attempting to override '{a}' which is a constant.",E014:"A regular expression literal can be confused with '/='.",E015:"Unclosed regular expression.",E016:"Invalid regular expression.",E017:"Unclosed comment.",E018:"Unbegun comment.",E019:"Unmatched '{a}'.",E020:"Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",E021:"Expected '{a}' and instead saw '{b}'.",E022:"Line breaking error '{a}'.",E023:"Missing '{a}'.",E024:"Unexpected '{a}'.",E025:"Missing ':' on a case clause.",E026:"Missing '}' to match '{' from line {a}.",E027:"Missing ']' to match '[' from line {a}.",E028:"Illegal comma.",E029:"Unclosed string.",E030:"Expected an identifier and instead saw '{a}'.",E031:"Bad assignment.",E032:"Expected a small integer or 'false' and instead saw '{a}'.",E033:"Expected an operator and instead saw '{a}'.",E034:"get/set are ES5 features.",E035:"Missing property name.",E036:"Expected to see a statement and instead saw a block.",E037:null,E038:null,E039:"Function declarations are not invocable. Wrap the whole function invocation in parens.",E040:"Each value should have its own case label.",E041:"Unrecoverable syntax error.",E042:"Stopping.",E043:"Too many errors.",E044:null,E045:"Invalid for each loop.",E046:"A yield statement shall be within a generator function (with syntax: `function*`)",E047:null,E048:"{a} declaration not directly within block.",E049:"A {a} cannot be named '{b}'.",E050:"Mozilla requires the yield expression to be parenthesized here.",E051:null,E052:"Unclosed template literal.",E053:"Export declaration must be in global scope.",E054:"Class properties must be methods. Expected '(' but instead saw '{a}'.",E055:"The '{a}' option cannot be set after any executable code.",E056:"'{a}' was used before it was declared, which is illegal for '{b}' variables.",E057:"Invalid meta property: '{a}.{b}'.",E058:"Missing semicolon."},s={W001:"'hasOwnProperty' is a really bad name.",W002:"Value of '{a}' may be overwritten in IE 8 and earlier.",W003:"'{a}' was used before it was defined.",W004:"'{a}' is already defined.",W005:"A dot following a number can be confused with a decimal point.",W006:"Confusing minuses.",W007:"Confusing plusses.",W008:"A leading decimal point can be confused with a dot: '{a}'.",W009:"The array literal notation [] is preferable.",W010:"The object literal notation {} is preferable.",W011:null,W012:null,W013:null,W014:"Bad line breaking before '{a}'.",W015:null,W016:"Unexpected use of '{a}'.",W017:"Bad operand.",W018:"Confusing use of '{a}'.",W019:"Use the isNaN function to compare with NaN.",W020:"Read only.",W021:"Reassignment of '{a}', which is is a {b}. Use 'var' or 'let' to declare bindings that may change.",W022:"Do not assign to the exception parameter.",W023:"Expected an identifier in an assignment and instead saw a function invocation.",W024:"Expected an identifier and instead saw '{a}' (a reserved word).",W025:"Missing name in function declaration.",W026:"Inner functions should be listed at the top of the outer function.",W027:"Unreachable '{a}' after '{b}'.",W028:"Label '{a}' on {b} statement.",W030:"Expected an assignment or function call and instead saw an expression.",W031:"Do not use 'new' for side effects.",W032:"Unnecessary semicolon.",W033:"Missing semicolon.",W034:'Unnecessary directive "{a}".',W035:"Empty block.",W036:"Unexpected /*member '{a}'.",W037:"'{a}' is a statement label.",W038:"'{a}' used out of scope.",W039:"'{a}' is not allowed.",W040:"Possible strict violation.",W041:"Use '{a}' to compare with '{b}'.",W042:"Avoid EOL escaping.",W043:"Bad escaping of EOL. Use option multistr if needed.",W044:"Bad or unnecessary escaping.",W045:"Bad number '{a}'.",W046:"Don't use extra leading zeros '{a}'.",W047:"A trailing decimal point can be confused with a dot: '{a}'.",W048:"Unexpected control character in regular expression.",W049:"Unexpected escaped character '{a}' in regular expression.",W050:"JavaScript URL.",W051:"Variables should not be deleted.",W052:"Unexpected '{a}'.",W053:"Do not use {a} as a constructor.",W054:"The Function constructor is a form of eval.",W055:"A constructor name should start with an uppercase letter.",W056:"Bad constructor.",W057:"Weird construction. Is 'new' necessary?",W058:"Missing '()' invoking a constructor.",W059:"Avoid arguments.{a}.",W060:"document.write can be a form of eval.",W061:"eval can be harmful.",W062:"Wrap an immediate function invocation in parens to assist the reader in understanding that the expression is the result of a function, and not the function itself.",W063:"Math is not a function.",W064:"Missing 'new' prefix when invoking a constructor.",W065:"Missing radix parameter.",W066:"Implied eval. Consider passing a function instead of a string.",W067:"Bad invocation.",W068:"Wrapping non-IIFE function literals in parens is unnecessary.",W069:"['{a}'] is better written in dot notation.",W070:"Extra comma. (it breaks older versions of IE)",W071:"This function has too many statements. ({a})",W072:"This function has too many parameters. ({a})",W073:"Blocks are nested too deeply. ({a})",W074:"This function's cyclomatic complexity is too high. ({a})",W075:"Duplicate {a} '{b}'.",W076:"Unexpected parameter '{a}' in get {b} function.",W077:"Expected a single parameter in set {a} function.",W078:"Setter is defined without getter.",W079:"Redefinition of '{a}'.",W080:"It's not necessary to initialize '{a}' to 'undefined'.",W081:null,W082:"Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",W083:"Don't make functions within a loop.",W084:"Assignment in conditional expression",W085:"Don't use 'with'.",W086:"Expected a 'break' statement before '{a}'.",W087:"Forgotten 'debugger' statement?",W088:"Creating global 'for' variable. Should be 'for (var {a} ...'.",W089:"The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",W090:"'{a}' is not a statement label.",W091:null,W093:"Did you mean to return a conditional instead of an assignment?",W094:"Unexpected comma.",W095:"Expected a string and instead saw {a}.",W096:"The '{a}' key may produce unexpected results.",W097:'Use the function form of "use strict".',W098:"'{a}' is defined but never used.",W099:null,W100:"This character may get silently deleted by one or more browsers.",W101:"Line is too long.",W102:null,W103:"The '{a}' property is deprecated.",W104:"'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz).",W105:"Unexpected {a} in '{b}'.",W106:"Identifier '{a}' is not in camel case.",W107:"Script URL.",W108:"Strings must use doublequote.",W109:"Strings must use singlequote.",W110:"Mixed double and single quotes.",W112:"Unclosed string.",W113:"Control character in string: {a}.",W114:"Avoid {a}.",W115:"Octal literals are not allowed in strict mode.",W116:"Expected '{a}' and instead saw '{b}'.",W117:"'{a}' is not defined.",W118:"'{a}' is only available in Mozilla JavaScript extensions (use moz option).",W119:"'{a}' is only available in ES{b} (use 'esversion: {b}').",W120:"You might be leaking a variable ({a}) here.",W121:"Extending prototype of native object: '{a}'.",W122:"Invalid typeof value '{a}'",W123:"'{a}' is already defined in outer scope.",W124:"A generator function shall contain a yield statement.",W125:"This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp",W126:"Unnecessary grouping operator.",W127:"Unexpected use of a comma operator.",W128:"Empty array elements require elision=true.",W129:"'{a}' is defined in a future version of JavaScript. Use a different variable name to avoid migration issues.",W130:"Invalid element after rest element.",W131:"Invalid parameter after rest parameter.",W132:"`var` declarations are forbidden. Use `let` or `const` instead.",W133:"Invalid for-{a} loop left-hand-side: {b}.",W134:"The '{a}' option is only available when linting ECMAScript {b} code.",W135:"{a} may not be supported by non-browser environments.",W136:"'{a}' must be in function scope.",W137:"Empty destructuring.",W138:"Regular parameters should not come after default parameters."},o={I001:"Comma warnings can be turned off with 'laxcomma'.",I002:null,I003:"ES5 option is now set per default"};n.errors={},n.warnings={},n.info={},r.each(i,function(e,t){n.errors[t]={code:t,desc:e}}),r.each(s,function(e,t){n.warnings[t]={code:t,desc:e}}),r.each(o,function(e,t){n.info[t]={code:t,desc:e}})},{"../lodash":"/node_modules/jshint/lodash.js"}],"/node_modules/jshint/src/name-stack.js":[function(e,t,n){"use strict";function r(){this._stack=[]}Object.defineProperty(r.prototype,"length",{get:function(){return this._stack.length}}),r.prototype.push=function(){this._stack.push(null)},r.prototype.pop=function(){this._stack.pop()},r.prototype.set=function(e){this._stack[this.length-1]=e},r.prototype.infer=function(){var e=this._stack[this.length-1],t="",n;if(!e||e.type==="class")e=this._stack[this.length-2];return e?(n=e.type,n!=="(string)"&&n!=="(number)"&&n!=="(identifier)"&&n!=="default"?"(expression)":(e.accessorType&&(t=e.accessorType+" "),t+e.value)):"(empty)"},t.exports=r},{}],"/node_modules/jshint/src/options.js":[function(e,t,n){"use strict";n.bool={enforcing:{bitwise:!0,freeze:!0,camelcase:!0,curly:!0,eqeqeq:!0,futurehostile:!0,notypeof:!0,es3:!0,es5:!0,forin:!0,funcscope:!0,immed:!0,iterator:!0,newcap:!0,noarg:!0,nocomma:!0,noempty:!0,nonbsp:!0,nonew:!0,undef:!0,singleGroups:!1,varstmt:!1,enforceall:!1},relaxing:{asi:!0,multistr:!0,debug:!0,boss:!0,evil:!0,globalstrict:!0,plusplus:!0,proto:!0,scripturl:!0,sub:!0,supernew:!0,laxbreak:!0,laxcomma:!0,validthis:!0,withstmt:!0,moz:!0,noyield:!0,eqnull:!0,lastsemic:!0,loopfunc:!0,expr:!0,esnext:!0,elision:!0},environments:{mootools:!0,couch:!0,jasmine:!0,jquery:!0,node:!0,qunit:!0,rhino:!0,shelljs:!0,prototypejs:!0,yui:!0,mocha:!0,module:!0,wsh:!0,worker:!0,nonstandard:!0,browser:!0,browserify:!0,devel:!0,dojo:!0,typed:!0,phantom:!0},obsolete:{onecase:!0,regexp:!0,regexdash:!0}},n.val={maxlen:!1,indent:!1,maxerr:!1,predef:!1,globals:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1,shadow:!1,strict:!0,unused:!0,latedef:!1,ignore:!1,ignoreDelimiters:!1,esversion:5},n.inverted={bitwise:!0,forin:!0,newcap:!0,plusplus:!0,regexp:!0,undef:!0,eqeqeq:!0,strict:!0},n.validNames=Object.keys(n.val).concat(Object.keys(n.bool.relaxing)).concat(Object.keys(n.bool.enforcing)).concat(Object.keys(n.bool.obsolete)).concat(Object.keys(n.bool.environments)),n.renamed={eqeq:"eqeqeq",windows:"wsh",sloppy:"strict"},n.removed={nomen:!0,onevar:!0,passfail:!0,white:!0,gcl:!0,smarttabs:!0,trailing:!0},n.noenforceall={varstmt:!0,strict:!0}},{}],"/node_modules/jshint/src/reg.js":[function(e,t,n){"use strict";n.unsafeString=/@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i,n.unsafeChars=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,n.needEsc=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,n.needEscGlobal=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n.starSlash=/\*\//,n.identifier=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,n.javascriptURL=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i,n.fallsThrough=/^\s*falls?\sthrough\s*$/,n.maxlenException=/^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/},{}],"/node_modules/jshint/src/scope-manager.js":[function(e,t,n){"use strict";var r=e("../lodash"),i=e("events"),s={},o=function(e,t,n,o){function f(e){u={"(labels)":Object.create(null),"(usages)":Object.create(null),"(breakLabels)":Object.create(null),"(parent)":u,"(type)":e,"(params)":e==="functionparams"||e==="catchparams"?[]:null},a.push(u)}function v(e,t){d.emit("warning",{code:e,token:t,data:r.slice(arguments,2)})}function m(e,t){d.emit("warning",{code:e,token:t,data:r.slice(arguments,2)})}function g(e){u["(usages)"][e]||(u["(usages)"][e]={"(modified)":[],"(reassigned)":[],"(tokens)":[]})}function w(){if(u["(type)"]==="functionparams"){E();return}var e=u["(labels)"];for(var t in e)e[t]&&e[t]["(type)"]!=="exception"&&e[t]["(unused)"]&&b(t,e[t]["(token)"],"var")}function E(){var t=u["(params)"];if(!t)return;var n=t.pop(),r;while(n){var i=u["(labels)"][n];r=y(e.funct["(unusedOption)"]);if(n==="undefined")return;if(i["(unused)"])b(n,i["(token)"],"param",e.funct["(unusedOption)"]);else if(r==="last-param")return;n=t.pop()}}function S(e){for(var t=a.length-1;t>=0;--t){var n=a[t]["(labels)"];if(n[e])return n}}function x(e){for(var t=a.length-1;t>=0;t--){var n=a[t];if(n["(usages)"][e])return n["(usages)"][e];if(n===l)break}return!1}function T(t,n){if(e.option.shadow!=="outer")return;var r=l["(type)"]==="global",i=u["(type)"]==="functionparams",s=!r;for(var o=0;o<a.length;o++){var f=a[o];!i&&a[o+1]===l&&(s=!1),s&&f["(labels)"][t]&&v("W123",n,t),f["(breakLabels)"][t]&&v("W123",n,t)}}function N(t,n,r){e.option.latedef&&(e.option.latedef===!0&&t==="function"||t!=="function")&&v("W003",r,n)}var u,a=[];f("global"),u["(predefined)"]=t;var l=u,c=Object.create(null),h=Object.create(null),p=[],d=new i.EventEmitter,y=function(t){return t===undefined&&(t=e.option.unused),t===!0&&(t="last-param"),t},b=function(e,t,n,r){var i=t.line,s=t.from,o=t.raw_text||e;r=y(r);var u={vars:["var"],"last-param":["var","param"],strict:["var","param","last-param"]};r&&u[r]&&u[r].indexOf(n)!==-1&&v("W098",{line:i,from:s},o),(r||n==="var")&&p.push({name:e,line:i,character:s})},C={on:function(e,t){e.split(" ").forEach(function(e){d.on(e,t)})},isPredefined:function(e){return!this.has(e)&&r.has(a[0]["(predefined)"],e)},stack:function(e){var t=u;f(e),!e&&t["(type)"]==="functionparams"&&(u["(isFuncBody)"]=!0,u["(context)"]=l,l=u)},unstack:function(){var t=a.length>1?a[a.length-2]:null,n=u===l,i=u["(type)"]==="functionparams",f=u["(type)"]==="functionouter",p,d,g=u["(usages)"],y=u["(labels)"],E=Object.keys(g);g.__proto__&&E.indexOf("__proto__")===-1&&E.push("__proto__");for(p=0;p<E.length;p++){var S=E[p],x=g[S],T=y[S];if(T){var N=T["(type)"];if(T["(useOutsideOfScope)"]&&!e.option.funcscope){var C=x["(tokens)"];if(C)for(d=0;d<C.length;d++)T["(function)"]===C[d]["(function)"]&&m("W038",C[d],S)}u["(labels)"][S]["(unused)"]=!1;if(N==="const"&&x["(modified)"])for(d=0;d<x["(modified)"].length;d++)m("E013",x["(modified)"][d],S);if((N==="function"||N==="class")&&x["(reassigned)"])for(d=0;d<x["(reassigned)"].length;d++)m("W021",x["(reassigned)"][d],S,N);continue}f&&(e.funct["(isCapturing)"]=!0);if(t)if(!t["(usages)"][S])t["(usages)"][S]=x,n&&(t["(usages)"][S]["(onlyUsedSubFunction)"]=!0);else{var k=t["(usages)"][S];k["(modified)"]=k["(modified)"].concat(x["(modified)"]),k["(tokens)"]=k["(tokens)"].concat(x["(tokens)"]),k["(reassigned)"]=k["(reassigned)"].concat(x["(reassigned)"]),k["(onlyUsedSubFunction)"]=!1}else if(typeof u["(predefined)"][S]=="boolean"){delete o[S],c[S]=s;if(u["(predefined)"][S]===!1&&x["(reassigned)"])for(d=0;d<x["(reassigned)"].length;d++)v("W020",x["(reassigned)"][d])}else if(x["(tokens)"])for(d=0;d<x["(tokens)"].length;d++){var L=x["(tokens)"][d];L.forgiveUndef||(e.option.undef&&!L.ignoreUndef&&v("W117",L,S),h[S]?h[S].line.push(L.line):h[S]={name:S,line:[L.line]})}}t||Object.keys(o).forEach(function(e){b(e,o[e],"var")});if(t&&!n&&!i&&!f){var A=Object.keys(y);for(p=0;p<A.length;p++){var O=A[p];!y[O]["(blockscoped)"]&&y[O]["(type)"]!=="exception"&&!this.funct.has(O,{excludeCurrent:!0})&&(t["(labels)"][O]=y[O],l["(type)"]!=="global"&&(t["(labels)"][O]["(useOutsideOfScope)"]=!0),delete y[O])}}w(),a.pop(),n&&(l=a[r.findLastIndex(a,function(e){return e["(isFuncBody)"]||e["(type)"]==="global"})]),u=t},addParam:function(t,n,i){i=i||"param";if(i==="exception"){var s=this.funct.labeltype(t);s&&s!=="exception"&&(e.option.node||v("W002",e.tokens.next,t))}r.has(u["(labels)"],t)?u["(labels)"][t].duplicated=!0:(T(t,n,i),u["(labels)"][t]={"(type)":i,"(token)":n,"(unused)":!0},u["(params)"].push(t));if(r.has(u["(usages)"],t)){var o=u["(usages)"][t];o["(onlyUsedSubFunction)"]?N(i,t,n):v("E056",n,t,i)}},validateParams:function(){if(l["(type)"]==="global")return;var t=e.isStrict(),n=l["(parent)"];if(!n["(params)"])return;n["(params)"].forEach(function(r){var i=n["(labels)"][r];i&&i.duplicated&&(t?v("E011",i["(token)"],r):e.option.shadow!==!0&&v("W004",i["(token)"],r))})},getUsedOrDefinedGlobals:function(){var e=Object.keys(c);return c.__proto__===s&&e.indexOf("__proto__")===-1&&e.push("__proto__"),e},getImpliedGlobals:function(){var e=r.values(h),t=!1;return h.__proto__&&(t=e.some(function(e){return e.name==="__proto__"}),t||e.push(h.__proto__)),e},getUnuseds:function(){return p},has:function(e){return Boolean(S(e))},labeltype:function(e){var t=S(e);return t?t[e]["(type)"]:null},addExported:function(e){var t=a[0]["(labels)"];if(r.has(o,e))delete o[e];else if(r.has(t,e))t[e]["(unused)"]=!1;else{for(var i=1;i<a.length;i++){var s=a[i];if(!!s["(type)"])break;if(r.has(s["(labels)"],e)&&!s["(labels)"][e]["(blockscoped)"]){s["(labels)"][e]["(unused)"]=!1;return}}n[e]=!0}},setExported:function(e,t){this.block.use(e,t)},addlabel:function(t,i){var o=i.type,a=i.token,f=o==="let"||o==="const"||o==="class",h=(f?u:l)["(type)"]==="global"&&r.has(n,t);T(t,a,o);if(f){var p=u["(labels)"][t];!p&&u===l&&u["(type)"]!=="global"&&(p=!!l["(parent)"]["(labels)"][t]);if(!p&&u["(usages)"][t]){var d=u["(usages)"][t];d["(onlyUsedSubFunction)"]?N(o,t,a):v("E056",a,t,o)}p?v("E011",a,t):e.option.shadow==="outer"&&C.funct.has(t)&&v("W004",a,t),C.block.add(t,o,a,!h)}else{var m=C.funct.has(t);!m&&x(t)&&N(o,t,a),C.funct.has(t,{onlyBlockscoped:!0})?v("E011",a,t):e.option.shadow!==!0&&m&&t!=="__proto__"&&l["(type)"]!=="global"&&v("W004",a,t),C.funct.add(t,o,a,!h),l["(type)"]==="global"&&(c[t]=s)}},funct:{labeltype:function(e,t){var n=t&&t.onlyBlockscoped,r=t&&t.excludeParams,i=a.length-(t&&t.excludeCurrent?2:1);for(var s=i;s>=0;s--){var o=a[s];if(o["(labels)"][e]&&(!n||o["(labels)"][e]["(blockscoped)"]))return o["(labels)"][e]["(type)"];var u=r?a[s-1]:o;if(u&&u["(type)"]==="functionparams")return null}return null},hasBreakLabel:function(e){for(var t=a.length-1;t>=0;t--){var n=a[t];if(n["(breakLabels)"][e])return!0;if(n["(type)"]==="functionparams")return!1}return!1},has:function(e,t){return Boolean(this.labeltype(e,t))},add:function(e,t,n,r){u["(labels)"][e]={"(type)":t,"(token)":n,"(blockscoped)":!1,"(function)":l,"(unused)":r}}},block:{isGlobal:function(){return u["(type)"]==="global"},use:function(t,n){var r=l["(parent)"];r&&r["(labels)"][t]&&r["(labels)"][t]["(type)"]==="param"&&(C.funct.has(t,{excludeParams:!0,onlyBlockscoped:!0})||(r["(labels)"][t]["(unused)"]=!1)),n&&(e.ignored.W117||e.option.undef===!1)&&(n.ignoreUndef=!0),g(t),n&&(n["(function)"]=l,u["(usages)"][t]["(tokens)"].push(n))},reassign:function(e,t){this.modify(e,t),u["(usages)"][e]["(reassigned)"].push(t)},modify:function(e,t){g(e),u["(usages)"][e]["(modified)"].push(t)},add:function(e,t,n,r){u["(labels)"][e]={"(type)":t,"(token)":n,"(blockscoped)":!0,"(unused)":r}},addBreakLabel:function(t,n){var r=n.token;C.funct.hasBreakLabel(t)?v("E011",r,t):e.option.shadow==="outer"&&(C.funct.has(t)?v("W004",r,t):T(t,r)),u["(breakLabels)"][t]=r}}};return C};t.exports=o},{"../lodash":"/node_modules/jshint/lodash.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/state.js":[function(e,t,n){"use strict";var r=e("./name-stack.js"),i={syntax:{},isStrict:function(){return this.directive["use strict"]||this.inClassBody||this.option.module||this.option.strict==="implied"},inMoz:function(){return this.option.moz},inES6:function(){return this.option.moz||this.option.esversion>=6},inES5:function(e){return e?(!this.option.esversion||this.option.esversion===5)&&!this.option.moz:!this.option.esversion||this.option.esversion>=5||this.option.moz},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.funct=null,this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab="",this.cache={},this.ignoredLines={},this.forinifcheckneeded=!1,this.nameStack=new r,this.inClassBody=!1}};n.state=i},{"./name-stack.js":"/node_modules/jshint/src/name-stack.js"}],"/node_modules/jshint/src/style.js":[function(e,t,n){"use strict";n.register=function(e){e.on("Identifier",function(n){if(e.getOption("proto"))return;n.name==="__proto__"&&e.warn("W103",{line:n.line,"char":n.char,data:[n.name,"6"]})}),e.on("Identifier",function(n){if(e.getOption("iterator"))return;n.name==="__iterator__"&&e.warn("W103",{line:n.line,"char":n.char,data:[n.name]})}),e.on("Identifier",function(n){if(!e.getOption("camelcase"))return;n.name.replace(/^_+|_+$/g,"").indexOf("_")>-1&&!n.name.match(/^[A-Z0-9_]*$/)&&e.warn("W106",{line:n.line,"char":n.from,data:[n.name]})}),e.on("String",function(n){var r=e.getOption("quotmark"),i;if(!r)return;r==="single"&&n.quote!=="'"&&(i="W109"),r==="double"&&n.quote!=='"'&&(i="W108"),r===!0&&(e.getCache("quotmark")||e.setCache("quotmark",n.quote),e.getCache("quotmark")!==n.quote&&(i="W110")),i&&e.warn(i,{line:n.line,"char":n.char})}),e.on("Number",function(n){n.value.charAt(0)==="."&&e.warn("W008",{line:n.line,"char":n.char,data:[n.value]}),n.value.substr(n.value.length-1)==="."&&e.warn("W047",{line:n.line,"char":n.char,data:[n.value]}),/^00+/.test(n.value)&&e.warn("W046",{line:n.line,"char":n.char,data:[n.value]})}),e.on("String",function(n){var r=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i;if(e.getOption("scripturl"))return;r.test(n.value)&&e.warn("W107",{line:n.line,"char":n.char})})}},{}],"/node_modules/jshint/src/vars.js":[function(e,t,n){"use strict";n.reservedVars={arguments:!1,NaN:!1},n.ecmaIdentifiers={3:{Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},5:{JSON:!1},6:{Map:!1,Promise:!1,Proxy:!1,Reflect:!1,Set:!1,Symbol:!1,WeakMap:!1,WeakSet:!1}},n.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CSS:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,Comment:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,Document:!1,document:!1,DocumentFragment:!1,Element:!1,ElementTimeControl:!1,Event:!1,event:!1,fetch:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,Intl:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,performance:!1,print:!1,Range:!1,requestAnimationFrame:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},n.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},n.worker={importScripts:!0,postMessage:!0,self:!0,FileReaderSync:!0},n.nonstandard={escape:!1,unescape:!1},n.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},n.node={__filename:!1,__dirname:!1,GLOBAL:!1,global:!1,module:!1,require:!1,Buffer:!0,console:!0,exports:!0,process:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0,setImmediate:!0,clearImmediate:!0},n.browserify={__filename:!1,__dirname:!1,global:!1,module:!1,require:!1,Buffer:!0,exports:!0,process:!0},n.phantom={phantom:!0,require:!0,WebPage:!0,console:!0,exports:!0},n.qunit={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,"throws":!1},n.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},n.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},n.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},n.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},n.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},n.jquery={$:!1,jQuery:!1},n.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,IFrame:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},n.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},n.yui={YUI:!1,Y:!1,YUI_config:!1},n.mocha={mocha:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,context:!1,xcontext:!1,before:!1,after:!1,beforeEach:!1,afterEach:!1,suite:!1,test:!1,setup:!1,teardown:!1,suiteSetup:!1,suiteTeardown:!1},n.jasmine={jasmine:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,beforeEach:!1,afterEach:!1,setFixtures:!1,loadFixtures:!1,spyOn:!1,expect:!1,runs:!1,waitsFor:!1,waits:!1,beforeAll:!1,afterAll:!1,fail:!1,fdescribe:!1,fit:!1,pending:!1}},{}]},{},["/node_modules/jshint/src/jshint.js"])}),ace.define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"],function(require,exports,module){"use strict";function startRegex(e){return RegExp("^("+e.join("|")+")")}var oop=require("../lib/oop"),Mirror=require("../worker/mirror").Mirror,lint=require("./javascript/jshint").JSHINT,disabledWarningsRe=startRegex(["Bad for in variable '(.+)'.",'Missing "use strict"']),errorsRe=startRegex(["Unexpected","Expected ","Confusing (plus|minus)","\\{a\\} unterminated regular expression","Unclosed ","Unmatched ","Unbegun comment","Bad invocation","Missing space after","Missing operator at"]),infoRe=startRegex(["Expected an assignment","Bad escapement of EOL","Unexpected comma","Unexpected space","Missing radix parameter.","A leading decimal point can","\\['{a}'\\] is better written in dot notation.","'{a}' used out of scope"]),JavaScriptWorker=exports.JavaScriptWorker=function(e){Mirror.call(this,e),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(e){this.options=e||{esnext:!0,moz:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(e){oop.mixin(this.options,e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval("throw 0;"+str)}catch(e){if(e===0)return!0}return!1},this.onUpdate=function(){var e=this.doc.getValue();e=e.replace(/^#!.*\n/,"\n");if(!e)return this.sender.emit("annotate",[]);var t=[],n=this.isValidJS(e)?"warning":"error";lint(e,this.options,this.options.globals);var r=lint.errors,i=!1;for(var s=0;s<r.length;s++){var o=r[s];if(!o)continue;var u=o.raw,a="warning";if(u=="Missing semicolon."){var f=o.evidence.substr(o.character);f=f.charAt(f.search(/\S/)),n=="error"&&f&&/[\w\d{(['"]/.test(f)?(o.reason='Missing ";" before statement',a="error"):a="info"}else{if(disabledWarningsRe.test(u))continue;infoRe.test(u)?a="info":errorsRe.test(u)?(i=!0,a=n):u=="'{a}' is not defined."?a="warning":u=="'{a}' is defined but never used."&&(a="info")}t.push({row:o.line-1,column:o.character-1,text:o.reason,type:a,raw:u}),i}this.sender.emit("annotate",t)}}.call(JavaScriptWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _=" \n \f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-json.js b/packages/node_modules/@node-red/editor/public/vendor/ace/worker-json.js deleted file mode 100644 index fc0a9d2be..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-json.js +++ /dev/null @@ -1 +0,0 @@ -"no use strict";!function(e){function t(e,t){var n=e,r="";while(n){var i=t[n];if(typeof i=="string")return i+r;if(i)return i.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(i===!1)return"";var s=n.lastIndexOf("/");if(s===-1)break;r=n.substr(s)+r,n=n.slice(0,s)}return e}if(typeof e.window!="undefined"&&e.document)return;if(e.require&&e.define)return;e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i.data,file:t,line:n,col:r,stack:i.stack}})},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(r,i){i||(i=r,r=null);if(!i.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");i=e.normalizeModule(r,i);var s=e.require.modules[i];if(s)return s.initialized||(s.initialized=!0,s.exports=s.factory().exports),s.exports;if(!e.require.tlns)return console.log("unable to load "+i);var o=t(i,e.require.tlns);return o.slice(-3)!=".js"&&(o+=".js"),e.require.id=i,e.require.modules[i]={},importScripts(o),e.require(r,i)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id);if(typeof r!="function"){e.require.modules[t]={exports:r,initialized:!0};return}n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},require.tlns={},e.initBaseUrls=function(t){for(var n in t)require.tlns[n]=t[n]},e.initSender=function(){var n=e.require("ace/lib/event_emitter").EventEmitter,r=e.require("ace/lib/oop"),i=function(){};return function(){r.implement(this,n),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(i.prototype),new i};var n=e.main=null,r=e.sender=null;e.onmessage=function(t){var i=t.data;if(i.event&&r)r._signal(i.event,i.data);else if(i.command)if(n[i.command])n[i.command].apply(n,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),require("ace/lib/es5-shim"),r=e.sender=e.initSender();var s=require(i.module)[i.classname];n=e.main=new s(r)}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function t(t,n,r){var i=t.action=="insert",s=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),u=t.start,a=i?u:t.end;return e(n,u,r)?{row:n.row,column:n.column}:e(a,n,!r)?{row:n.row+s,column:n.column+(n.row==a.row?o:0)}:{row:u.row,column:u.column}}r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,s),this.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new u(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=new o(i,s,u,a),l=this.$lines.slice(e,t+1);return this.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e)},this.$splitAndapplyLargeDelta=function(e,t){var n=e.lines,r=n.length,i=e.start.row,s=e.start.column,o=0,u=0;do{o=u,u+=t-1;var a=n.slice(o,u);if(u>r){e.lines=a,e.start.row=i+o,e.start.column=s;break}a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}while(!0)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(a.prototype),t.Document=a}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function s(e){if(typeof e!="object"||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=s(e[n]);return t}if(Object.prototype.toString.call(e)!=="[object Object]")return e;t={};for(var n in e)t[n]=s(e[n]);return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../document").Document,s=e("../lib/lang"),o=t.Mirror=function(e){this.sender=e;var t=this.doc=new i(""),n=this.deferredUpdate=s.delayedCall(this.onUpdate.bind(this)),r=this;e.on("change",function(e){var i=e.data;if(i[0].start)t.applyDeltas(i);else for(var s=0;s<i.length;s+=2){if(Array.isArray(i[s+1]))var o={action:"insert",start:i[s],lines:i[s+1]};else var o={action:"remove",start:i[s],end:i[s+1]};t.applyDelta(o,!0)}if(r.$timeout)return n.schedule(r.$timeout);r.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(o.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(e,t,n){"use strict";var r,i,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},o,u=function(e){throw{name:"SyntaxError",message:e,at:r,text:o}},a=function(e){return e&&e!==i&&u("Expected '"+e+"' instead of '"+i+"'"),i=o.charAt(r),r+=1,i},f=function(){var e,t="";i==="-"&&(t="-",a("-"));while(i>="0"&&i<="9")t+=i,a();if(i==="."){t+=".";while(a()&&i>="0"&&i<="9")t+=i}if(i==="e"||i==="E"){t+=i,a();if(i==="-"||i==="+")t+=i,a();while(i>="0"&&i<="9")t+=i,a()}e=+t;if(!isNaN(e))return e;u("Bad number")},l=function(){var e,t,n="",r;if(i==='"')while(a()){if(i==='"')return a(),n;if(i==="\\"){a();if(i==="u"){r=0;for(t=0;t<4;t+=1){e=parseInt(a(),16);if(!isFinite(e))break;r=r*16+e}n+=String.fromCharCode(r)}else{if(typeof s[i]!="string")break;n+=s[i]}}else n+=i}u("Bad string")},c=function(){while(i&&i<=" ")a()},h=function(){switch(i){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}u("Unexpected '"+i+"'")},p,d=function(){var e=[];if(i==="["){a("["),c();if(i==="]")return a("]"),e;while(i){e.push(p()),c();if(i==="]")return a("]"),e;a(","),c()}}u("Bad array")},v=function(){var e,t={};if(i==="{"){a("{"),c();if(i==="}")return a("}"),t;while(i){e=l(),c(),a(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=p(),c();if(i==="}")return a("}"),t;a(","),c()}}u("Bad object")};return p=function(){c();switch(i){case"{":return v();case"[":return d();case'"':return l();case"-":return f();default:return i>="0"&&i<="9"?f():h()}},function(e,t){var n;return o=e,r=0,i=" ",n=p(),c(),i&&u("Syntax error"),typeof t=="function"?function s(e,n){var r,i,o=e[n];if(o&&typeof o=="object")for(r in o)Object.hasOwnProperty.call(o,r)&&(i=s(o,r),i!==undefined?o[r]=i:delete o[r]);return t.call(e,n,o)}({"":n},""):n}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./json/json_parse"),o=t.JsonWorker=function(e){i.call(this,e),this.setTimeout(200)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue(),t=[];try{e&&s(e)}catch(n){var r=this.doc.indexToPosition(n.at-1);t.push({row:r.row,column:r.column,text:n.message,type:"error"})}this.sender.emit("annotate",t)}}.call(o.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _=" \n \f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}) \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-jsonata.js b/packages/node_modules/@node-red/editor/public/vendor/ace/worker-jsonata.js deleted file mode 100644 index 3061e3c1c..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/ace/worker-jsonata.js +++ /dev/null @@ -1,2140 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsonata=e()}}(function(){return function(){return function e(t,r,n){function o(i,s){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};t[i][0].call(f.exports,function(e){return o(t[i][1][e]||e)},f,f.exports,e,t,r,n)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}}()({1:[function(e,t,r){(function(r){"use strict";var n=b(e("babel-runtime/core-js/symbol")),o=b(e("babel-runtime/core-js/object/is")),a=b(e("babel-runtime/core-js/array/from")),i=b(e("babel-runtime/core-js/json/stringify")),s=b(e("babel-runtime/core-js/symbol/iterator")),u=b(e("babel-runtime/core-js/is-iterable")),c=b(e("babel-runtime/core-js/object/keys")),f=b(e("babel-runtime/regenerator")),l=b(e("babel-runtime/core-js/promise")),p=b(e("babel-runtime/core-js/number/is-integer")),d=b(e("babel-runtime/core-js/object/create")),h="function"==typeof n.default&&"symbol"==typeof s.default?function(e){return typeof e}:function(e){return e&&"function"==typeof n.default&&e.constructor===n.default&&e!==n.default.prototype?"symbol":typeof e};function b(e){return e&&e.__esModule?e:{default:e}}var v=function(){var e=f.default.mark(Q),t=f.default.mark(ee),n=f.default.mark(te),b=f.default.mark(re),v=f.default.mark(ne),g=f.default.mark(oe),m=f.default.mark(ae),y=f.default.mark(be),_=f.default.mark(ge),x=f.default.mark(me),k=f.default.mark(ye),w=f.default.mark(xe),j=f.default.mark(we),S=f.default.mark(Oe),O=f.default.mark(Pe),E=f.default.mark(Ye),A=f.default.mark(De),T=f.default.mark(Le),P=f.default.mark(Fe),Y=f.default.mark(Ce),D=f.default.mark(Je),M=f.default.mark(Be),L=f.default.mark(We),N=f.default.mark(Ve),F=f.default.mark(Qe),I=f.default.mark(Ze),R=f.default.mark(Xe),C=f.default.mark(tt),G=f.default.mark(rt),$=f.default.mark(nt),z={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":75,"#":70,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},q={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},U=function(e){var t=0,r=e.length,n=function(e,r){return{type:e,value:r,position:t}};return function(o){if(t>=r)return null;for(var a=e.charAt(t);t<r&&" \t\n\r\v".indexOf(a)>-1;)t++,a=e.charAt(t);if(!0!==o&&"/"===a)return t++,n("regex",function(){for(var n,o,a=t,i=0;t<r;){var s=e.charAt(t);if("/"===s&&"\\"!==e.charAt(t-1)&&0===i){if(""===(n=e.substring(a,t)))throw{code:"S0301",stack:(new Error).stack,position:t};for(t++,s=e.charAt(t),a=t;"i"===s||"m"===s;)t++,s=e.charAt(t);return o=e.substring(a,t)+"g",new RegExp(n,o)}"("!==s&&"["!==s&&"{"!==s||"\\"===e.charAt(t-1)||i++,")"!==s&&"]"!==s&&"}"!==s||"\\"===e.charAt(t-1)||i--,t++}throw{code:"S0302",stack:(new Error).stack,position:t}}());if("."===a&&"."===e.charAt(t+1))return t+=2,n("operator","..");if(":"===a&&"="===e.charAt(t+1))return t+=2,n("operator",":=");if("!"===a&&"="===e.charAt(t+1))return t+=2,n("operator","!=");if(">"===a&&"="===e.charAt(t+1))return t+=2,n("operator",">=");if("<"===a&&"="===e.charAt(t+1))return t+=2,n("operator","<=");if("*"===a&&"*"===e.charAt(t+1))return t+=2,n("operator","**");if("~"===a&&">"===e.charAt(t+1))return t+=2,n("operator","~>");if(z.hasOwnProperty(a))return t++,n("operator",a);if('"'===a||"'"===a){var i=a;t++;for(var s="";t<r;){if("\\"===(a=e.charAt(t)))if(t++,a=e.charAt(t),q.hasOwnProperty(a))s+=q[a];else{if("u"!==a)throw{code:"S0103",stack:(new Error).stack,position:t,token:a};var u=e.substr(t+1,4);if(!/^[0-9a-fA-F]+$/.test(u))throw{code:"S0104",stack:(new Error).stack,position:t};var c=parseInt(u,16);s+=String.fromCharCode(c),t+=4}else{if(a===i)return t++,n("string",s);s+=a}t++}throw{code:"S0101",stack:(new Error).stack,position:t}}var f,l=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(e.substring(t));if(null!==l){var p=parseFloat(l[0]);if(!isNaN(p)&&isFinite(p))return t+=l[0].length,n("number",p);throw{code:"S0102",stack:(new Error).stack,position:t,token:l[0]}}if("`"===a){t++;var d=e.indexOf("`",t);if(-1!==d)return f=e.substring(t,d),t=d+1,n("name",f);throw t=r,{code:"S0105",stack:(new Error).stack,position:t}}for(var h,b=t;;)if(h=e.charAt(b),b===r||" \t\n\r\v".indexOf(h)>-1||z.hasOwnProperty(h)){if("$"===e.charAt(t))return f=e.substring(t+1,b),t=b,n("variable",f);switch(f=e.substring(t,b),t=b,f){case"or":case"in":case"and":return n("operator",f);case"true":return n("value",!0);case"false":return n("value",!1);case"null":return n("value",null);default:return t===r&&""===f?null:n("name",f)}}else b++}};function J(e){for(var t=1,r=[],n={},o=n;t<e.length;){var a=e.charAt(t);if(":"===a)break;var i=function(){r.push(n),o=n,n={}},s=function(e,t,r,n){for(var o=1,i=t;i<e.length;)if(i++,(a=e.charAt(i))===n){if(0===--o)break}else a===r&&o++;return i};switch(a){case"s":case"n":case"b":case"l":case"o":n.regex="["+a+"m]",n.type=a,i();break;case"a":n.regex="[asnblfom]",n.type=a,n.array=!0,i();break;case"f":n.regex="f",n.type=a,i();break;case"j":n.regex="[asnblom]",n.type=a,i();break;case"x":n.regex="[asnblfom]",n.type=a,i();break;case"-":o.context=!0,o.contextRegex=new RegExp(o.regex),o.regex+="?";break;case"?":case"+":o.regex+=a;break;case"(":var u=s(e,t,"(",")"),c=e.substring(t+1,u);if(-1!==c.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:c,offset:t};n.regex="["+c+"m]",n.type="("+c+")",t=u,i();break;case"<":if("a"!==o.type&&"f"!==o.type)throw{code:"S0401",stack:(new Error).stack,value:o.type,offset:t};var f=s(e,t,"<",">");o.subtype=e.substring(t+1,f),t=f}t++}var l="^"+r.map(function(e){return"("+e.regex+")"}).join("")+"$",p=new RegExp(l),d=function(e){var t;if(Ee(e))t="f";else switch(void 0===e?"undefined":h(e)){case"string":t="s";break;case"number":t="n";break;case"boolean":t="b";break;case"object":t=null===e?"l":Array.isArray(e)?"a":"o";break;case"undefined":default:t="m"}return t};return{definition:e,validate:function(e,t){var n="";e.forEach(function(e){n+=d(e)});var o=p.exec(n);if(o){var a=[],i=0;return r.forEach(function(r,n){var s=e[i],u=o[n+1];if(""===u)if(r.context&&r.contextRegex){var c=d(t);if(!r.contextRegex.test(c))throw{code:"T0411",stack:(new Error).stack,value:t,index:i+1};a.push(t)}else a.push(s),i++;else u.split("").forEach(function(t){if("a"===r.type){if("m"===t)s=void 0;else{s=e[i];var n=!0;if(void 0!==r.subtype)if("a"!==t&&u!==r.subtype)n=!1;else if("a"===t&&s.length>0){var o=d(s[0]);if(o!==r.subtype.charAt(0))n=!1;else n=0===s.filter(function(e){return d(e)!==o}).length}if(!n)throw{code:"T0412",stack:(new Error).stack,value:s,index:i+1,type:r.subtype};"a"!==t&&(s=[s])}a.push(s),i++}else a.push(s),i++})}),a}!function(e,t){for(var n="^",o=0,a=0;a<r.length;a++){n+=r[a].regex;var i=t.match(n);if(null===i)throw{code:"T0410",stack:(new Error).stack,value:e[o],index:o+1};o=i[0].length}throw{code:"T0410",stack:(new Error).stack,value:e[o],index:o+1}}(e,n)}}}var B=function(e,t){var r,n,o={},a=[],i=function(){var e=[];"(end)"!==r.id&&e.push({type:r.type,value:r.value,position:r.position});for(var t=n();null!==t;)e.push(t),t=n();return e},s={nud:function(){var e={code:"S0211",token:this.value,position:this.position};if(t)return e.remaining=i(),e.type="error",a.push(e),e;throw e.stack=(new Error).stack,e}},u=function(e,t){var r=o[e];return t=t||0,r?t>=r.lbp&&(r.lbp=t):((r=(0,d.default)(s)).id=r.value=e,r.lbp=t,o[e]=r),r},c=function(e){if(t){e.remaining=i(),a.push(e);var n=o["(error)"];return(r=(0,d.default)(n)).error=e,r.type="(error)",r}throw e.stack=(new Error).stack,e},f=function(t,a){if(t&&r.id!==t){var i={code:"(end)"===r.id?"S0203":"S0202",position:r.position,token:r.value,value:t};return c(i)}var s=n(a);if(null===s)return(r=o["(end)"]).position=e.length,r;var u,f=s.value,l=s.type;switch(l){case"name":case"variable":u=o["(name)"];break;case"operator":if(!(u=o[f]))return c({code:"S0204",stack:(new Error).stack,position:s.position,token:f});break;case"string":case"number":case"value":u=o["(literal)"];break;case"regex":l="regex",u=o["(regex)"];break;default:return c({code:"S0205",stack:(new Error).stack,position:s.position,token:f})}return(r=(0,d.default)(u)).value=f,r.type=l,r.position=s.position,r},l=function(e){var t,n=r;for(f(null,!0),t=n.nud();e<r.lbp;)n=r,f(),t=n.led(t);return t},p=function(e){u(e,0).nud=function(){return this}},h=function(e,t,r){var n=t||z[e],o=u(e,n);return o.led=r||function(e){return this.lhs=e,this.rhs=l(n),this.type="binary",this},o},b=function(e,t,r){var n=u(e,t);return n.led=r,n},v=function(e,t){var r=u(e);return r.nud=t||function(){return this.expression=l(70),this.type="unary",this},r};p("(end)"),p("(name)"),p("(literal)"),p("(regex)"),u(":"),u(";"),u(","),u(")"),u("]"),u("}"),u(".."),h("."),h("+"),h("-"),h("*"),h("/"),h("%"),h("="),h("<"),h(">"),h("!="),h("<="),h(">="),h("&"),h("and"),h("or"),h("in"),p("and"),p("or"),p("in"),v("-"),h("~>"),b("(error)",10,function(e){return this.lhs=e,this.error=r.error,this.remaining=i(),this.type="error",this}),v("*",function(){return this.type="wildcard",this}),v("**",function(){return this.type="descendant",this}),h("(",z["("],function(e){if(this.procedure=e,this.type="function",this.arguments=[],")"!==r.id)for(;"operator"===r.type&&"?"===r.id?(this.type="partial",this.arguments.push(r),f("?")):this.arguments.push(l(0)),","===r.id;)f(",");if(f(")",!0),"name"===e.type&&("function"===e.value||"λ"===e.value)){if(this.arguments.forEach(function(e,t){if("variable"!==e.type)return c({code:"S0208",stack:(new Error).stack,position:e.position,token:e.value,value:t+1})}),this.type="lambda","<"===r.id){for(var t=r.position,n=1,o="<";n>0&&"{"!==r.id&&"(end)"!==r.id;){var a=f();">"===a.id?n--:"<"===a.id&&n++,o+=a.value}f(">");try{this.signature=J(o)}catch(e){return e.position=t+e.offset,c(e)}}f("{"),this.body=l(0),f("}")}return this}),v("(",function(){for(var e=[];")"!==r.id&&(e.push(l(0)),";"===r.id);)f(";");return f(")",!0),this.type="block",this.expressions=e,this}),v("[",function(){var e=[];if("]"!==r.id)for(;;){var t=l(0);if(".."===r.id){var n={type:"binary",value:"..",position:r.position,lhs:t};f(".."),n.rhs=l(0),t=n}if(e.push(t),","!==r.id)break;f(",")}return f("]",!0),this.expressions=e,this.type="unary",this}),h("[",z["["],function(e){if("]"===r.id){for(var t=e;t&&"binary"===t.type&&"["===t.value;)t=t.lhs;return t.keepArray=!0,f("]"),e}return this.lhs=e,this.rhs=l(z["]"]),this.type="binary",f("]",!0),this}),h("^",z["^"],function(e){f("(");for(var t=[];;){var n={descending:!1};if("<"===r.id?f("<"):">"===r.id&&(n.descending=!0,f(">")),n.expression=l(0),t.push(n),","!==r.id)break;f(",")}return f(")"),this.lhs=e,this.rhs=t,this.type="binary",this});var g=function(e){var t=[];if("}"!==r.id)for(;;){var n=l(0);f(":");var o=l(0);if(t.push([n,o]),","!==r.id)break;f(",")}return f("}",!0),void 0===e?(this.lhs=t,this.type="unary"):(this.lhs=e,this.rhs=t,this.type="binary"),this};v("{",g),h("{",z["{"],g),b(":=",z[":="],function(e){return"variable"!==e.type?c({code:"S0212",stack:(new Error).stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=l(z[":="]-1),this.type="binary",this)}),h("?",z["?"],function(e){return this.type="condition",this.condition=e,this.then=l(0),":"===r.id&&(f(":"),this.else=l(0)),this}),v("|",function(){return this.type="transform",this.pattern=l(0),f("|"),this.update=l(0),","===r.id&&(f(","),this.delete=l(0)),f("|"),this});n=U(e),f();var m=l(0);if("(end)"!==r.id){var y={code:"S0201",position:r.position,token:r.value};c(y)}return m=function e(r){var n;switch(r.type){case"binary":switch(r.value){case".":var o=e(r.lhs);n={type:"path",steps:[]},"path"===o.type?Array.prototype.push.apply(n.steps,o.steps):n.steps=[o];var i=e(r.rhs);"function"===i.type&&"path"===i.procedure.type&&1===i.procedure.steps.length&&"name"===i.procedure.steps[0].type&&"function"===n.steps[n.steps.length-1].type&&(n.steps[n.steps.length-1].nextFunction=i.procedure.steps[0].value),"path"!==i.type&&(i={type:"path",steps:[i]}),Array.prototype.push.apply(n.steps,i.steps),n.steps.filter(function(e){if("number"===e.type||"value"===e.type)throw{code:"S0213",stack:(new Error).stack,position:e.position,value:e.value};return"string"===e.type}).forEach(function(e){e.type="name"}),n.steps.filter(function(e){return!0===e.keepArray}).length>0&&(n.keepSingletonArray=!0);var s=n.steps[0];"unary"===s.type&&"["===s.value&&(s.consarray=!0);var u=n.steps[n.steps.length-1];"unary"===u.type&&"["===u.value&&(u.consarray=!0);break;case"[":var c=n=e(r.lhs);if("path"===n.type&&(c=n.steps[n.steps.length-1]),void 0!==c.group)throw{code:"S0209",stack:(new Error).stack,position:r.position};void 0===c.predicate&&(c.predicate=[]),c.predicate.push(e(r.rhs));break;case"{":if(void 0!==(n=e(r.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:r.position};n.group={lhs:r.rhs.map(function(t){return[e(t[0]),e(t[1])]}),position:r.position};break;case"^":(n={type:"sort",value:r.value,position:r.position,consarray:!0}).lhs=e(r.lhs),n.rhs=r.rhs.map(function(t){return{descending:t.descending,expression:e(t.expression)}});break;case":=":(n={type:"bind",value:r.value,position:r.position}).lhs=e(r.lhs),n.rhs=e(r.rhs);break;case"~>":(n={type:"apply",value:r.value,position:r.position}).lhs=e(r.lhs),n.rhs=e(r.rhs);break;default:(n={type:r.type,value:r.value,position:r.position}).lhs=e(r.lhs),n.rhs=e(r.rhs)}break;case"unary":n={type:r.type,value:r.value,position:r.position},"["===r.value?n.expressions=r.expressions.map(function(t){return e(t)}):"{"===r.value?n.lhs=r.lhs.map(function(t){return[e(t[0]),e(t[1])]}):(n.expression=e(r.expression),"-"===r.value&&"number"===n.expression.type&&((n=n.expression).value=-n.value));break;case"function":case"partial":(n={type:r.type,name:r.name,value:r.value,position:r.position}).arguments=r.arguments.map(function(t){return e(t)}),n.procedure=e(r.procedure);break;case"lambda":n={type:r.type,arguments:r.arguments,signature:r.signature,position:r.position};var f=e(r.body);n.body=function e(t){var r;if("function"!==t.type||t.predicate)if("condition"===t.type)t.then=e(t.then),void 0!==t.else&&(t.else=e(t.else)),r=t;else if("block"===t.type){var n=t.expressions.length;n>0&&(t.expressions[n-1]=e(t.expressions[n-1])),r=t}else r=t;else{var o={type:"lambda",thunk:!0,arguments:[],position:t.position};o.body=t,r=o}return r}(f);break;case"condition":(n={type:r.type,position:r.position}).condition=e(r.condition),n.then=e(r.then),void 0!==r.else&&(n.else=e(r.else));break;case"transform":(n={type:r.type,position:r.position}).pattern=e(r.pattern),n.update=e(r.update),void 0!==r.delete&&(n.delete=e(r.delete));break;case"block":(n={type:r.type,position:r.position}).expressions=r.expressions.map(function(t){var r=e(t);return(r.consarray||"path"===r.type&&r.steps[0].consarray)&&(n.consarray=!0),r});break;case"name":n={type:"path",steps:[r]},r.keepArray&&(n.keepSingletonArray=!0);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":n=r;break;case"operator":if("and"===r.value||"or"===r.value||"in"===r.value)r.type="name",n=e(r);else{if("?"!==r.value)throw{code:"S0201",stack:(new Error).stack,position:r.position,token:r.value};n=r}break;case"error":n=r,r.lhs&&(n=e(r.lhs));break;default:var l="S0206";"(end)"===r.id&&(l="S0207");var p={code:l,position:r.position,token:r.value};if(t)return a.push(p),{type:"error",error:p};throw p.stack=(new Error).stack,p}return n}(m),a.length>0&&(m.errors=a),m},W=at(null);function V(e){var t=!1;if("number"==typeof e&&(t=!isNaN(e))&&!isFinite(e))throw{code:"D1001",value:e,stack:(new Error).stack};return t}function K(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter(function(e){return"string"!=typeof e}).length),t}function H(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter(function(e){return!V(e)}).length),t}function Q(t,r,n){var o,a,i;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(a=n.lookup("__evaluate_entry"))&&a(t,r,n),e.t0=t.type,e.next="path"===e.t0?5:"binary"===e.t0?8:"unary"===e.t0?11:"name"===e.t0?14:"string"===e.t0?16:"number"===e.t0?16:"value"===e.t0?16:"wildcard"===e.t0?18:"descendant"===e.t0?20:"condition"===e.t0?22:"block"===e.t0?25:"bind"===e.t0?28:"regex"===e.t0?31:"function"===e.t0?33:"variable"===e.t0?36:"lambda"===e.t0?38:"partial"===e.t0?40:"apply"===e.t0?43:"sort"===e.t0?46:"transform"===e.t0?49:51;break;case 5:return e.delegateYield(ee(t,r,n),"t1",6);case 6:return o=e.t1,e.abrupt("break",51);case 8:return e.delegateYield(oe(t,r,n),"t2",9);case 9:return o=e.t2,e.abrupt("break",51);case 11:return e.delegateYield(ae(t,r,n),"t3",12);case 12:return o=e.t3,e.abrupt("break",51);case 14:return o=ie(t,r,n),e.abrupt("break",51);case 16:return o=se(t),e.abrupt("break",51);case 18:return o=ue(t,r),e.abrupt("break",51);case 20:return o=ce(t,r),e.abrupt("break",51);case 22:return e.delegateYield(me(t,r,n),"t4",23);case 23:return o=e.t4,e.abrupt("break",51);case 25:return e.delegateYield(ye(t,r,n),"t5",26);case 26:return o=e.t5,e.abrupt("break",51);case 28:return e.delegateYield(ge(t,r,n),"t6",29);case 29:return o=e.t6,e.abrupt("break",51);case 31:return o=_e(t),e.abrupt("break",51);case 33:return e.delegateYield(Pe(t,r,n),"t7",34);case 34:return o=e.t7,e.abrupt("break",51);case 36:return o=ke(t,r,n),e.abrupt("break",51);case 38:return o=Me(t,r,n),e.abrupt("break",51);case 40:return e.delegateYield(Le(t,r,n),"t8",41);case 41:return o=e.t8,e.abrupt("break",51);case 43:return e.delegateYield(Oe(t,r,n),"t9",44);case 44:return o=e.t9,e.abrupt("break",51);case 46:return e.delegateYield(we(t,r,n),"t10",47);case 47:return o=e.t10,e.abrupt("break",51);case 49:return o=je(t,r,n),e.abrupt("break",51);case 51:if(!n.lookup("__jsonata_async")||void 0!==o&&null!==o&&"function"==typeof o.then||(o=l.default.resolve(o)),!n.lookup("__jsonata_async")||"function"!=typeof o.then||!t.nextFunction||"function"!=typeof o[t.nextFunction]){e.next=55;break}e.next=58;break;case 55:return e.next=57,o;case 57:o=e.sent;case 58:if(!t.hasOwnProperty("predicate")){e.next=61;break}return e.delegateYield(re(t.predicate,o,n),"t11",60);case 60:o=e.t11;case 61:if(!t.hasOwnProperty("group")){e.next=64;break}return e.delegateYield(be(t.group,o,n),"t12",63);case 63:o=e.t12;case 64:return(i=n.lookup("__evaluate_exit"))&&i(t,r,n,o),o&&o.sequence&&(o=o.value()),e.abrupt("return",o);case 68:case"end":return e.stop()}},e,this)}function Z(){var e=X([]);return 1===arguments.length&&e.push(arguments[0]),e}function X(e){return Object.defineProperty(e,"sequence",{enumerable:!1,configurable:!1,get:function(){return!0}}),Object.defineProperty(e,"keepSingleton",{enumerable:!1,configurable:!1,writable:!0,value:!1}),Object.defineProperty(e,"value",{enumerable:!1,configurable:!1,get:function(){return function(){switch(this.length){case 0:return;case 1:return this.keepSingleton?this:this[0];default:return this}}}}),e}function ee(e,r,n){var o,a,i,s;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o="variable"===e.steps[0].type?Z(r):Array.isArray(r)?r:Z(r),i=0;case 2:if(!(i<e.steps.length)){t.next=18;break}if(s=e.steps[i],0!==i||!s.consarray){t.next=10;break}return t.delegateYield(Q(s,o,n),"t0",6);case 6:a=t.t0,Array.isArray(a)||(a=Z(a)),t.next=12;break;case 10:return t.delegateYield(te(s,o,n,i===e.steps.length-1),"t1",11);case 11:a=t.t1;case 12:if(void 0!==a&&0!==a.length){t.next=14;break}return t.abrupt("break",18);case 14:o=a;case 15:i++,t.next=2;break;case 18:return e.keepSingletonArray&&(a.keepSingleton=!0),t.abrupt("return",a);case 20:case"end":return t.stop()}},t,this)}function te(e,t,r,o){var a,i,s,u;return f.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:a=Z(),i=0;case 2:if(!(i<t.length)){n.next=9;break}return n.delegateYield(Q(e,t[i],r),"t0",4);case 4:void 0!==(s=n.t0)&&a.push(s);case 6:i++,n.next=2;break;case 9:return u=Z(),o&&1===a.length&&Array.isArray(a[0])&&!a[0].sequence?u=a[0]:a.forEach(function(e){!Array.isArray(e)||e.cons||e.keepSingleton?u.push(e):Array.prototype.push.apply(u,e)}),n.abrupt("return",u);case 12:case"end":return n.stop()}},n,this)}function re(e,t,r){var n,o,a,i,s;return f.default.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:n=t,o=Z(),a=0;case 3:if(!(a<e.length)){u.next=19;break}if(i=e[a],Array.isArray(n)||(n=Z(n)),o=Z(),"number"!==i.type){u.next=13;break}(s=Math.floor(i.value))<0&&(s=n.length+s),o=n[s],u.next=15;break;case 13:return u.delegateYield(ne(i,n,r),"t0",14);case 14:o=u.t0;case 15:n=o;case 16:a++,u.next=3;break;case 19:return u.abrupt("return",o);case 20:case"end":return u.stop()}},b,this)}function ne(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:n=Z(),o=0;case 2:if(!(o<t.length)){s.next=11;break}return a=t[o],s.delegateYield(Q(e,a,r),"t0",5);case 5:V(i=s.t0)&&(i=[i]),H(i)?i.forEach(function(e){var r=Math.floor(e);r<0&&(r=t.length+r),r===o&&n.push(a)}):He(i)&&n.push(a);case 8:o++,s.next=2;break;case 11:return s.abrupt("return",n);case 12:case"end":return s.stop()}},v,this)}function oe(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(Q(e.lhs,t,r),"t0",1);case 1:return o=s.t0,s.delegateYield(Q(e.rhs,t,r),"t1",3);case 3:a=s.t1,i=e.value,s.prev=5,s.t2=i,s.next="+"===s.t2?9:"-"===s.t2?9:"*"===s.t2?9:"/"===s.t2?9:"%"===s.t2?9:"="===s.t2?11:"!="===s.t2?11:"<"===s.t2?11:"<="===s.t2?11:">"===s.t2?11:">="===s.t2?11:"&"===s.t2?13:"and"===s.t2?15:"or"===s.t2?15:".."===s.t2?17:"in"===s.t2?19:21;break;case 9:return n=fe(o,a,i),s.abrupt("break",21);case 11:return n=le(o,a,i),s.abrupt("break",21);case 13:return n=he(o,a),s.abrupt("break",21);case 15:return n=de(o,a,i),s.abrupt("break",21);case 17:return n=ve(o,a),s.abrupt("break",21);case 19:return n=pe(o,a),s.abrupt("break",21);case 21:s.next=28;break;case 23:throw s.prev=23,s.t3=s.catch(5),s.t3.position=e.position,s.t3.token=i,s.t3;case 28:return s.abrupt("return",n);case 29:case"end":return s.stop()}},g,this,[[5,23]])}function ae(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:s.t0=e.value,s.next="-"===s.t0?3:"["===s.t0?15:"{"===s.t0?27:30;break;case 3:return s.delegateYield(Q(e.expression,t,r),"t1",4);case 4:if(void 0!==(n=s.t1)){s.next=9;break}n=void 0,s.next=14;break;case 9:if(!V(n)){s.next=13;break}n=-n,s.next=14;break;case 13:throw{code:"D1002",stack:(new Error).stack,position:e.position,token:e.value,value:n};case 14:return s.abrupt("break",30);case 15:n=[],o=0;case 17:if(!(o<e.expressions.length)){s.next=25;break}return a=e.expressions[o],s.delegateYield(Q(a,t,r),"t2",20);case 20:void 0!==(i=s.t2)&&("["===a.value?n.push(i):n=et(n,i));case 22:o++,s.next=17;break;case 25:return e.consarray&&Object.defineProperty(n,"cons",{enumerable:!1,configurable:!1,value:!0}),s.abrupt("break",30);case 27:return s.delegateYield(be(e,t,r),"t3",28);case 28:return n=s.t3,s.abrupt("break",30);case 30:return s.abrupt("return",n);case 31:case"end":return s.stop()}},m,this)}function ie(e,t,r){var n;if(Array.isArray(t)){n=Z();for(var o=0;o<t.length;o++){var a=ie(e,t[o],r);void 0!==a&&n.push(a)}}else null!==t&&"object"===(void 0===t?"undefined":h(t))&&(n=t[e.value]);return n}function se(e){return e.value}function ue(e,t){var r=Z();return null!==t&&"object"===(void 0===t?"undefined":h(t))&&(0,c.default)(t).forEach(function(e){var n=t[e];Array.isArray(n)?(n=function e(t,r){void 0===r&&(r=[]);Array.isArray(t)?t.forEach(function(t){e(t,r)}):r.push(t);return r}(n),r=et(r,n)):r.push(n)}),r}function ce(e,t){var r,n=Z();return void 0!==t&&(!function e(t,r){Array.isArray(t)||r.push(t);Array.isArray(t)?t.forEach(function(t){e(t,r)}):null!==t&&"object"===(void 0===t?"undefined":h(t))&&(0,c.default)(t).forEach(function(n){e(t[n],r)})}(t,n),r=1===n.length?n[0]:n),r}function fe(e,t,r){var n;if(void 0===e||void 0===t)return n;if(!V(e))throw{code:"T2001",stack:(new Error).stack,value:e};if(!V(t))throw{code:"T2002",stack:(new Error).stack,value:t};switch(r){case"+":n=e+t;break;case"-":n=e-t;break;case"*":n=e*t;break;case"/":n=e/t;break;case"%":n=e%t}return n}function le(e,t,r){var n,o=void 0===e?"undefined":h(e),a=void 0===t?"undefined":h(t);if("undefined"===o||"undefined"===a)return!1;var i=function(){if("string"!==o&&"number"!==o||"string"!==a&&"number"!==a)throw{code:"T2010",stack:(new Error).stack,value:"string"!==o&&"number"!==o?e:t};if(o!==a)throw{code:"T2009",stack:(new Error).stack,value:e,value2:t}};switch(r){case"=":n=e===t;break;case"!=":n=e!==t;break;case"<":i(),n=e<t;break;case"<=":i(),n=e<=t;break;case">":i(),n=e>t;break;case">=":i(),n=e>=t}return n}function pe(e,t){var r=!1;if(void 0===e||void 0===t)return!1;Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++)if(t[n]===e){r=!0;break}return r}function de(e,t,r){var n;switch(r){case"and":n=He(e)&&He(t);break;case"or":n=He(e)||He(t)}return n}function he(e,t){var r="",n="";return void 0!==e&&(r=ze(e)),void 0!==t&&(n=ze(t)),r.concat(n)}function be(e,t,r){var n,o,a,i,s,u,c,l,p;return f.default.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:n={},o={},Array.isArray(t)||(t=Z(t)),a=0;case 4:if(!(a<t.length)){d.next=27;break}i=t[a],s=0;case 7:if(!(s<e.lhs.length)){d.next=24;break}return u=e.lhs[s],d.delegateYield(Q(u[0],i,r),"t0",10);case 10:if("string"==typeof(c=d.t0)){d.next=13;break}throw{code:"T1003",stack:(new Error).stack,position:e.position,value:c};case 13:if(l={data:i,exprIndex:s},!o.hasOwnProperty(c)){d.next=20;break}if(o[c].exprIndex===s){d.next=17;break}throw{code:"D1009",stack:(new Error).stack,position:e.position,value:c};case 17:o[c].data=et(o[c].data,i),d.next=21;break;case 20:o[c]=l;case 21:s++,d.next=7;break;case 24:a++,d.next=4;break;case 27:d.t1=f.default.keys(o);case 28:if((d.t2=d.t1()).done){d.next=36;break}return c=d.t2.value,l=o[c],d.delegateYield(Q(e.lhs[l.exprIndex][1],l.data,r),"t3",32);case 32:void 0!==(p=d.t3)&&(n[c]=p),d.next=28;break;case 36:return d.abrupt("return",n);case 37:case"end":return d.stop()}},y,this)}function ve(e,t){var r;if(void 0===e||void 0===t)return r;if(e>t)return r;if(!(0,p.default)(e))throw{code:"T2003",stack:(new Error).stack,value:e};if(!(0,p.default)(t))throw{code:"T2004",stack:(new Error).stack,value:t};r=new Array(t-e+1);for(var n=e,o=0;n<=t;n++,o++)r[o]=n;return X(r)}function ge(e,t,r){var n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.delegateYield(Q(e.rhs,t,r),"t0",1);case 1:return n=o.t0,r.bind(e.lhs.value,n),o.abrupt("return",n);case 4:case"end":return o.stop()}},_,this)}function me(e,t,r){var n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.delegateYield(Q(e.condition,t,r),"t0",1);case 1:if(!He(o.t0)){o.next=7;break}return o.delegateYield(Q(e.then,t,r),"t1",4);case 4:n=o.t1,o.next=10;break;case 7:if(void 0===e.else){o.next=10;break}return o.delegateYield(Q(e.else,t,r),"t2",9);case 9:n=o.t2;case 10:return o.abrupt("return",n);case 11:case"end":return o.stop()}},x,this)}function ye(e,t,r){var n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:o=at(r),a=0;case 2:if(!(a<e.expressions.length)){i.next=8;break}return i.delegateYield(Q(e.expressions[a],t,o),"t0",4);case 4:n=i.t0;case 5:a++,i.next=2;break;case 8:return i.abrupt("return",n);case 9:case"end":return i.stop()}},k,this)}function _e(e){var t=new RegExp(e.value);return function r(n){var o,a=t.exec(n);if(null!==a){if(o={match:a[0],start:a.index,end:a.index+a[0].length,groups:[]},a.length>1)for(var i=1;i<a.length;i++)o.groups.push(a[i]);o.next=function(){if(!(t.lastIndex>=n.length)){var o=r(n);if(o&&""===o.match)throw{code:"D1004",stack:(new Error).stack,position:e.position,value:e.value.source};return o}}}return o}}function xe(e,t){var r;return f.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.delegateYield(Ye(e,[t],null),"t0",1);case 1:if(!(r=n.t0)||"number"==typeof r.start||"number"===r.end||Array.isArray(r.groups)||Ee(r.next)){n.next=4;break}throw{code:"T1010",stack:(new Error).stack};case 4:return n.abrupt("return",r);case 5:case"end":return n.stop()}},w,this)}function ke(e,t,r){return""===e.value?t:r.lookup(e.value)}function we(e,t,r){var n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.delegateYield(Q(e.lhs,t,r),"t0",1);case 1:return o=i.t0,a=f.default.mark(function t(n,o){var a,i,s,u,c,l,p;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=0,i=0;case 2:if(!(0===a&&i<e.rhs.length)){t.next=29;break}return s=e.rhs[i],t.delegateYield(Q(s.expression,n,r),"t0",5);case 5:return u=t.t0,t.delegateYield(Q(s.expression,o,r),"t1",7);case 7:if(c=t.t1,l=void 0===u?"undefined":h(u),p=void 0===c?"undefined":h(c),"undefined"!==l){t.next=13;break}return a="undefined"===p?0:1,t.abrupt("continue",26);case 13:if("undefined"!==p){t.next=16;break}return a=-1,t.abrupt("continue",26);case 16:if(!("string"!==l&&"number"!==l||"string"!==p&&"number"!==p)){t.next=18;break}throw{code:"T2008",stack:(new Error).stack,position:e.position,value:"string"!==l&&"number"!==l?u:c};case 18:if(l===p){t.next=20;break}throw{code:"T2007",stack:(new Error).stack,position:e.position,value:u,value2:c};case 20:if(u!==c){t.next=24;break}return t.abrupt("continue",26);case 24:a=u<c?-1:1;case 25:!0===s.descending&&(a=-a);case 26:i++,t.next=2;break;case 29:return t.abrupt("return",1===a);case 30:case"end":return t.stop()}},t,this)}),i.delegateYield(rt(o,a),"t1",4);case 4:return n=i.t1,i.abrupt("return",n);case 6:case"end":return i.stop()}},j,this)}function je(e,t,r){return $e(f.default.mark(function t(n){var o,a,i,s,u,c,l,p,d,b,v;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==n){t.next=2;break}return t.abrupt("return",void 0);case 2:if(Ee(o=r.lookup("clone"))){t.next=5;break}throw{code:"T2013",stack:(new Error).stack,position:e.position};case 5:return t.delegateYield(Ye(o,[n],null),"t0",6);case 6:return a=t.t0,t.delegateYield(Q(e.pattern,a,r),"t1",8);case 8:if(void 0===(i=t.t1)){t.next=33;break}Array.isArray(i)||(i=[i]),s=0;case 12:if(!(s<i.length)){t.next=33;break}return u=i[s],t.delegateYield(Q(e.update,u,r),"t2",15);case 15:if(c=t.t2,"undefined"===(l=void 0===c?"undefined":h(c))){t.next=21;break}if("object"===l&&null!==c){t.next=20;break}throw{code:"T2011",stack:(new Error).stack,position:e.update.position,value:c};case 20:for(p in c)u[p]=c[p];case 21:if(void 0===e.delete){t.next=30;break}return t.delegateYield(Q(e.delete,u,r),"t3",23);case 23:if(void 0===(d=t.t3)){t.next=30;break}if(b=d,Array.isArray(d)||(d=[d]),K(d)){t.next=29;break}throw{code:"T2012",stack:(new Error).stack,position:e.delete.position,value:b};case 29:for(v=0;v<d.length;v++)delete u[d[v]];case 30:s++,t.next=12;break;case 33:return t.abrupt("return",a);case 34:case"end":return t.stop()}},t,this)}),"<(oa):o>")}Number.isInteger=p.default||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};var Se=B("function($f, $g) { function($x){ $g($f($x)) } }");function Oe(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if("function"!==e.rhs.type){s.next=7;break}return e.rhs.arguments.unshift(e.lhs),s.delegateYield(Pe(e.rhs,t,r),"t0",3);case 3:n=s.t0,e.rhs.arguments.shift(),s.next=22;break;case 7:return s.delegateYield(Q(e.lhs,t,r),"t1",8);case 8:return o=s.t1,s.delegateYield(Q(e.rhs,t,r),"t2",10);case 10:if(Ee(a=s.t2)){s.next=13;break}throw{code:"T2006",stack:(new Error).stack,position:e.position,value:a};case 13:if(!Ee(o)){s.next=20;break}return s.delegateYield(Q(Se,null,r),"t3",15);case 15:return i=s.t3,s.delegateYield(Ye(i,[o,a],null),"t4",17);case 17:n=s.t4,s.next=22;break;case 20:return s.delegateYield(Ye(a,[o],null),"t5",21);case 21:n=s.t5;case 22:return s.abrupt("return",n);case 23:case"end":return s.stop()}},S,this)}function Ee(e){return e&&(!0===e._jsonata_function||!0===e._jsonata_lambda)||"function"==typeof e}function Ae(e){return e&&!0===e._jsonata_lambda}function Te(e){return"object"===(void 0===e?"undefined":h(e))&&null!==e&&(0,u.default)(e)&&"function"==typeof e[s.default]&&"next"in e&&"function"==typeof e.next}function Pe(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(Q(e.procedure,t,r),"t0",1);case 1:if(void 0!==(o=s.t0)||"path"!==e.procedure.type||!r.lookup(e.procedure.steps[0].value)){s.next=4;break}throw{code:"T1005",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};case 4:a=[],i=0;case 6:if(!(i<e.arguments.length)){s.next=14;break}return s.t1=a,s.delegateYield(Q(e.arguments[i],t,r),"t2",9);case 9:s.t3=s.t2,s.t1.push.call(s.t1,s.t3);case 11:i++,s.next=6;break;case 14:return s.prev=14,s.delegateYield(Ye(o,a,t),"t4",16);case 16:n=s.t4,s.next=24;break;case 19:throw s.prev=19,s.t5=s.catch(14),s.t5.position=e.position,s.t5.token="path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value,s.t5;case 24:return s.abrupt("return",n);case 25:case"end":return s.stop()}},O,this,[[14,19]])}function Ye(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(De(e,t,r),"t0",1);case 1:n=s.t0;case 2:if(!Ae(n)||!0!==n.thunk){s.next=19;break}return s.delegateYield(Q(n.body.procedure,n.input,n.environment),"t1",4);case 4:o=s.t1,a=[],i=0;case 7:if(!(i<n.body.arguments.length)){s.next=15;break}return s.t2=a,s.delegateYield(Q(n.body.arguments[i],n.input,n.environment),"t3",10);case 10:s.t4=s.t3,s.t2.push.call(s.t2,s.t4);case 12:i++,s.next=7;break;case 15:return s.delegateYield(De(o,a,r),"t5",16);case 16:n=s.t5,s.next=2;break;case 19:return s.abrupt("return",n);case 20:case"end":return s.stop()}},E,this)}function De(e,t,r){var n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(o=t,e&&(o=Ne(e.signature,t,r)),!Ae(e)){a.next=7;break}return a.delegateYield(Fe(e,o),"t0",4);case 4:n=a.t0,a.next=22;break;case 7:if(!e||!0!==e._jsonata_function){a.next=14;break}if(!Te(n=e.implementation.apply(r,o))){a.next=12;break}return a.delegateYield(n,"t1",11);case 11:n=a.t1;case 12:a.next=22;break;case 14:if("function"!=typeof e){a.next=21;break}if(!Te(n=e.apply(r,o))){a.next=19;break}return a.delegateYield(n,"t2",18);case 18:n=a.t2;case 19:a.next=22;break;case 21:throw{code:"T1006",stack:(new Error).stack};case 22:return a.abrupt("return",n);case 23:case"end":return a.stop()}},A,this)}function Me(e,t,r){var n={_jsonata_lambda:!0,input:t,environment:r,arguments:e.arguments,signature:e.signature,body:e.body};return!0===e.thunk&&(n.thunk=!0),n}function Le(e,t,r){var n,o,a,i,s;return f.default.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:o=[],a=0;case 2:if(!(a<e.arguments.length)){u.next=15;break}if("operator"!==(i=e.arguments[a]).type||"?"!==i.value){u.next=8;break}o.push(i),u.next=12;break;case 8:return u.t0=o,u.delegateYield(Q(i,t,r),"t1",10);case 10:u.t2=u.t1,u.t0.push.call(u.t0,u.t2);case 12:a++,u.next=2;break;case 15:return u.delegateYield(Q(e.procedure,t,r),"t3",16);case 16:if(void 0!==(s=u.t3)||"path"!==e.procedure.type||!r.lookup(e.procedure.steps[0].value)){u.next=19;break}throw{code:"T1007",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};case 19:if(!Ae(s)){u.next=23;break}n=Ie(s,o),u.next=32;break;case 23:if(!s||!0!==s._jsonata_function){u.next=27;break}n=Re(s.implementation,o),u.next=32;break;case 27:if("function"!=typeof s){u.next=31;break}n=Re(s,o),u.next=32;break;case 31:throw{code:"T1008",stack:(new Error).stack,position:e.position,token:"path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value};case 32:return u.abrupt("return",n);case 33:case"end":return u.stop()}},T,this)}function Ne(e,t,r){return void 0===e?t:e.validate(t,r)}function Fe(e,t){var r,n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(n=at(e.environment),e.arguments.forEach(function(e,r){n.bind(e.value,t[r])}),"function"!=typeof e.body){o.next=7;break}return o.delegateYield(Ce(e.body,n),"t0",4);case 4:r=o.t0,o.next=9;break;case 7:return o.delegateYield(Q(e.body,e.input,n),"t1",8);case 8:r=o.t1;case 9:return o.abrupt("return",r);case 10:case"end":return o.stop()}},P,this)}function Ie(e,t){var r=at(e.environment),n=[];return e.arguments.forEach(function(e,o){var a=t[o];a&&"operator"===a.type&&"?"===a.value?n.push(e):r.bind(e.value,a)}),{_jsonata_lambda:!0,input:e.input,environment:r,arguments:n,body:e.body}}function Re(e,t){var r=Ge(e),n="function("+(r=r.map(function(e){return"$"+e.trim()})).join(", ")+"){ _ }",o=B(n);return o.body=e,Ie(o,t)}function Ce(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(r=Ge(e),n=r.map(function(e){return t.lookup(e.trim())}),!Te(o=e.apply(null,n))){a.next=6;break}return a.delegateYield(o,"t0",5);case 5:o=a.t0;case 6:return a.abrupt("return",o);case 7:case"end":return a.stop()}},Y,this)}function Ge(e){var t=e.toString();return/\(([^)]*)\)/.exec(t)[1].split(",")}function $e(e,t){var r={_jsonata_function:!0,implementation:e};return void 0!==t&&(r.signature=J(t)),r}function ze(e){if(void 0!==e){var t;if("string"==typeof e)t=e;else if(Ee(e))t="";else{if("number"==typeof e&&!isFinite(e))throw{code:"D3001",value:e,stack:(new Error).stack};t=(0,i.default)(e,function(e,t){return void 0!==t&&null!==t&&t.toPrecision&&V(t)?Number(t.toPrecision(15)):t&&Ee(t)?"":t})}return t}}function qe(e,t,r){if(void 0!==e){var n=(0,a.default)(e),o=n.length;if(o+t<0&&(t=0),void 0!==r){if(r<=0)return"";var i=t>=0?t+r:o+t+r;return n.slice(t,i).join("")}return n.slice(t).join("")}}function Ue(e){if(void 0!==e)return(0,a.default)(e).length}function Je(e,t){var r,n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==e){o.next=2;break}return o.abrupt("return",void 0);case 2:if("string"!=typeof t){o.next=6;break}r=-1!==e.indexOf(t),o.next=9;break;case 6:return o.delegateYield(xe(t,e),"t0",7);case 7:n=o.t0,r=void 0!==n;case 9:return o.abrupt("return",r);case 10:case"end":return o.stop()}},D,this)}function Be(e,t,r){var n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(void 0!==e){i.next=2;break}return i.abrupt("return",void 0);case 2:if(!(r<0)){i.next=4;break}throw{stack:(new Error).stack,value:r,code:"D3040",index:3};case 4:if(n=Z(),!(void 0===r||r>0)){i.next=17;break}return o=0,i.delegateYield(xe(t,e),"t0",8);case 8:if(void 0===(a=i.t0)){i.next=17;break}case 10:if(void 0===a||!(void 0===r||o<r)){i.next=17;break}return n.push({match:a.match,index:a.start,groups:a.groups}),i.delegateYield(xe(a.next),"t1",13);case 13:a=i.t1,o++,i.next=10;break;case 17:return i.abrupt("return",n);case 18:case"end":return i.stop()}},M,this)}function We(e,t,r,n){var o,a,i,s,u,c,l;return f.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(void 0!==e){f.next=2;break}return f.abrupt("return",void 0);case 2:if(""!==t){f.next=4;break}throw{code:"D3010",stack:(new Error).stack,value:t,index:2};case 4:if(!(n<0)){f.next=6;break}throw{code:"D3011",stack:(new Error).stack,value:n,index:4};case 6:if(o="string"==typeof r?function(e){for(var t="",n=0,o=r.indexOf("$",n);-1!==o&&n<r.length;){t+=r.substring(n,o),n=o+1;var a=r.charAt(n);if("$"===a)t+="$",n++;else if("0"===a)t+=e.match,n++;else{var i;if(i=0===e.groups.length?1:Math.floor(Math.log(e.groups.length)*Math.LOG10E)+1,o=parseInt(r.substring(n,n+i),10),i>1&&o>e.groups.length&&(o=parseInt(r.substring(n,n+i-1),10)),isNaN(o))t+="$";else{if(e.groups.length>0){var s=e.groups[o-1];void 0!==s&&(t+=s)}n+=o.toString().length}}o=r.indexOf("$",n)}return t+=r.substring(n)}:r,a="",i=0,!(void 0===n||n>0)){f.next=41;break}if(s=0,"string"!=typeof t){f.next=17;break}for(u=e.indexOf(t,i);-1!==u&&(void 0===n||s<n);)a+=e.substring(i,u),a+=r,i=u+t.length,s++,u=e.indexOf(t,i);a+=e.substring(i),f.next=39;break;case 17:return f.delegateYield(xe(t,e),"t0",18);case 18:if(void 0===(c=f.t0)){f.next=38;break}case 20:if(void 0===c||!(void 0===n||s<n)){f.next=35;break}return a+=e.substring(i,c.start),f.delegateYield(Ye(o,[c],null),"t1",23);case 23:if("string"!=typeof(l=f.t1)){f.next=28;break}a+=l,f.next=29;break;case 28:throw{code:"D3012",stack:(new Error).stack,value:l};case 29:return i=c.start+c.match.length,s++,f.delegateYield(xe(c.next),"t2",32);case 32:c=f.t2,f.next=20;break;case 35:a+=e.substring(i),f.next=39;break;case 38:a=e;case 39:f.next=42;break;case 41:a=e;case 42:return f.abrupt("return",a);case 43:case"end":return f.stop()}},L,this)}function Ve(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==e){s.next=2;break}return s.abrupt("return",void 0);case 2:if(!(r<0)){s.next=4;break}throw{code:"D3020",stack:(new Error).stack,value:r,index:3};case 4:if(n=[],!(void 0===r||r>0)){s.next=27;break}if("string"!=typeof t){s.next=10;break}n=e.split(t,r),s.next=27;break;case 10:return o=0,s.delegateYield(xe(t,e),"t0",12);case 12:if(void 0===(a=s.t0)){s.next=26;break}i=0;case 15:if(void 0===a||!(void 0===r||o<r)){s.next=23;break}return n.push(e.substring(i,a.start)),i=a.end,s.delegateYield(xe(a.next),"t1",19);case 19:a=s.t1,o++,s.next=15;break;case 23:(void 0===r||o<r)&&n.push(e.substring(i)),s.next=27;break;case 26:n.push(e);case 27:return s.abrupt("return",n);case 28:case"end":return s.stop()}},N,this)}function Ke(e,t){var r;if(void 0!==e){if(t){var n=e.toString().split("e");e=+(n[0]+"e"+(n[1]?+n[1]+t:t))}var a=(r=Math.round(e))-e;return.5===Math.abs(a)&&1===Math.abs(r%2)&&(r-=1),t&&(r=+((n=r.toString().split("e"))[0]+"e"+(n[1]?+n[1]-t:-t))),(0,o.default)(r,-0)&&(r=0),r}}function He(e){if(void 0!==e){var t=!1;if(Array.isArray(e)){if(1===e.length)t=He(e[0]);else if(e.length>1){t=e.filter(function(e){return He(e)}).length>0}}else"string"==typeof e?e.length>0&&(t=!0):V(e)?0!==e&&(t=!0):null!==e&&"object"===(void 0===e?"undefined":h(e))?(0,c.default)(e).length>0&&(Ae(e)||e._jsonata_function||(t=!0)):"boolean"==typeof e&&!0===e&&(t=!0);return t}}function Qe(e,t){var r,n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==e){s.next=2;break}return s.abrupt("return",void 0);case 2:r=Z(),n=0;case 4:if(!(n<e.length)){s.next=15;break}return o=[e[n]],(a="function"==typeof t?t.length:!0===t._jsonata_function?t.implementation.length:t.arguments.length)>=2&&o.push(n),a>=3&&o.push(e),s.delegateYield(Ye(t,o,null),"t0",10);case 10:void 0!==(i=s.t0)&&r.push(i);case 12:n++,s.next=4;break;case 15:return s.abrupt("return",r);case 16:case"end":return s.stop()}},F,this)}function Ze(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==e){a.next=2;break}return a.abrupt("return",void 0);case 2:r=Z(),n=0;case 4:if(!(n<e.length)){a.next=12;break}return o=e[n],a.delegateYield(Ye(t,[o,n,e],null),"t0",7);case 7:He(a.t0)&&r.push(o);case 9:n++,a.next=4;break;case 12:return a.abrupt("return",r);case 13:case"end":return a.stop()}},I,this)}function Xe(e,t,r){var n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==e){a.next=2;break}return a.abrupt("return",void 0);case 2:if(2===t.length||!0===t._jsonata_function&&2===t.implementation.length||2===t.arguments.length){a.next=4;break}throw{stack:(new Error).stack,code:"D3050",index:1};case 4:void 0===r&&e.length>0?(n=e[0],o=1):(n=r,o=0);case 5:if(!(o<e.length)){a.next=11;break}return a.delegateYield(Ye(t,[n,e[o]],null),"t0",7);case 7:n=a.t0,o++,a.next=5;break;case 11:return a.abrupt("return",n);case 12:case"end":return a.stop()}},R,this)}function et(e,t){return void 0===e?t:void 0===t?e:(Array.isArray(e)||(e=Z(e)),Array.isArray(t)||(t=[t]),e.concat(t))}function tt(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:r=Z(),a.t0=f.default.keys(e);case 2:if((a.t1=a.t0()).done){a.next=11;break}return n=a.t1.value,o=[e[n],n],a.t2=r,a.delegateYield(Ye(t,o,null),"t3",7);case 7:a.t4=a.t3,a.t2.push.call(a.t2,a.t4),a.next=2;break;case 11:return a.abrupt("return",r);case 12:case"end":return a.stop()}},C,this)}function rt(e,t){var r,n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(void 0!==e){i.next=2;break}return i.abrupt("return",void 0);case 2:if(!(e.length<=1)){i.next=4;break}return i.abrupt("return",e);case 4:if(void 0!==t){i.next=10;break}if(H(e)||K(e)){i.next=7;break}throw{stack:(new Error).stack,code:"D3070",index:1};case 7:r=f.default.mark(function e(t,r){return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t>r);case 1:case"end":return e.stop()}},e,this)}),i.next=11;break;case 10:r="function"==typeof t?t:f.default.mark(function e(r,n){return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(Ye(t,[r,n],null),"t0",1);case 1:return e.abrupt("return",e.t0);case 2:case"end":return e.stop()}},e,this)});case 11:return n=f.default.mark(function e(t,n){var o,a;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=f.default.mark(function e(t,n,o){return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(0!==n.length){a.next=4;break}Array.prototype.push.apply(t,o),a.next=16;break;case 4:if(0!==o.length){a.next=8;break}Array.prototype.push.apply(t,n),a.next=16;break;case 8:return a.delegateYield(r(n[0],o[0]),"t0",9);case 9:if(!a.t0){a.next=14;break}return t.push(o[0]),a.delegateYield(e(t,n,o.slice(1)),"t1",12);case 12:a.next=16;break;case 14:return t.push(n[0]),a.delegateYield(e(t,n.slice(1),o),"t2",16);case 16:case"end":return a.stop()}},e,this)}),a=[],e.delegateYield(o(a,t,n),"t0",3);case 3:return e.abrupt("return",a);case 4:case"end":return e.stop()}},e,this)}),o=f.default.mark(function e(t){var r,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(Array.isArray(t)&&!(t.length<=1)){i.next=4;break}return i.abrupt("return",t);case 4:return r=Math.floor(t.length/2),o=t.slice(0,r),a=t.slice(r),i.delegateYield(e(o),"t0",8);case 8:return o=i.t0,i.delegateYield(e(a),"t1",10);case 10:return a=i.t1,i.delegateYield(n(o,a),"t2",12);case 12:return i.abrupt("return",i.t2);case 13:case"end":return i.stop()}},e,this)}),i.delegateYield(o(e),"t0",14);case 14:return a=i.t0,i.abrupt("return",a);case 16:case"end":return i.stop()}},G,this)}function nt(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:r={},a.t0=f.default.keys(e);case 2:if((a.t1=a.t0()).done){a.next=10;break}return n=a.t1.value,o=e[n],a.delegateYield(Ye(t,[o,n,e],null),"t2",6);case 6:He(a.t2)&&(r[n]=o),a.next=2;break;case 10:return 0===(0,c.default)(r).length&&(r=void 0),a.abrupt("return",r);case 12:case"end":return a.stop()}},$,this)}var ot=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function at(e){var t={};return{bind:function(e,r){t[e]=r},lookup:function(r){var n;return t.hasOwnProperty(r)?n=t[r]:e&&(n=e.lookup(r)),n}}}W.bind("sum",$e(function(e){if(void 0!==e){var t=0;return e.forEach(function(e){t+=e}),t}},"<a<n>:n>")),W.bind("count",$e(function(e){return void 0===e?0:e.length},"<a:n>")),W.bind("max",$e(function(e){if(void 0!==e&&0!==e.length)return Math.max.apply(Math,e)},"<a<n>:n>")),W.bind("min",$e(function(e){if(void 0!==e&&0!==e.length)return Math.min.apply(Math,e)},"<a<n>:n>")),W.bind("average",$e(function(e){if(void 0!==e&&0!==e.length){var t=0;return e.forEach(function(e){t+=e}),t/e.length}},"<a<n>:n>")),W.bind("string",$e(ze,"<x-:s>")),W.bind("substring",$e(qe,"<s-nn?:s>")),W.bind("substringBefore",$e(function(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(0,r):e}},"<s-s:s>")),W.bind("substringAfter",$e(function(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(r+t.length):e}},"<s-s:s>")),W.bind("lowercase",$e(function(e){if(void 0!==e)return e.toLowerCase()},"<s-:s>")),W.bind("uppercase",$e(function(e){if(void 0!==e)return e.toUpperCase()},"<s-:s>")),W.bind("length",$e(Ue,"<s-:n>")),W.bind("trim",$e(function(e){if(void 0!==e){var t=e.replace(/[ \t\n\r]+/gm," ");return" "===t.charAt(0)&&(t=t.substring(1))," "===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}},"<s-:s>")),W.bind("pad",$e(function(e,t,r){if(void 0!==e){var n;void 0!==r&&0!==r.length||(r=" ");var o=Math.abs(t)-Ue(e);if(o>0){var a=new Array(o+1).join(r);r.length>1&&(a=qe(a,0,o)),n=t>0?e+a:a+e}else n=e;return n}},"<s-ns?:s>")),W.bind("match",$e(Be,"<s-f<s:o>n?:a<o>>")),W.bind("contains",$e(Je,"<s-(sf):b>")),W.bind("replace",$e(We,"<s-(sf)(sf)n?:s>")),W.bind("split",$e(Ve,"<s-(sf)n?:a<s>>")),W.bind("join",$e(function(e,t){if(void 0!==e)return void 0===t&&(t=""),e.join(t)},"<a<s>s?:s>")),W.bind("formatNumber",$e(function(e,t,r){if(void 0!==e){var n={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&(0,c.default)(r).forEach(function(e){n[e]=r[e]});for(var o=[],a=n["zero-digit"].charCodeAt(0),s=a;s<a+10;s++)o.push(String.fromCharCode(s));var u=o.concat([n["decimal-separator"],n["exponent-separator"],n["grouping-separator"],n.digit,n["pattern-separator"]]),f=t.split(n["pattern-separator"]);if(f.length>2)throw{code:"D3080",stack:(new Error).stack};var l=f.map(function(e){var t,r,o,a,i=function(){for(var t,r=0;r<e.length;r++)if(t=e.charAt(r),-1!==u.indexOf(t)&&t!==n["exponent-separator"])return e.substring(0,r)}(),s=function(){for(var t,r=e.length-1;r>=0;r--)if(t=e.charAt(r),-1!==u.indexOf(t)&&t!==n["exponent-separator"])return e.substring(r+1)}(),c=e.substring(i.length,e.length-s.length),f=e.indexOf(n["exponent-separator"],i.length);-1===f||f>e.length-s.length?(t=c,r=void 0):(t=c.substring(0,f),r=c.substring(f+1));var l=t.indexOf(n["decimal-separator"]);return-1===l?(o=t,a=s):(o=t.substring(0,l),a=t.substring(l+1)),{prefix:i,suffix:s,activePart:c,mantissaPart:t,exponentPart:r,integerPart:o,fractionalPart:a,subpicture:e}});l.forEach(function(e){var t,r,a=e.subpicture,i=a.indexOf(n["decimal-separator"]);i!==a.lastIndexOf(n["decimal-separator"])&&(t="D3081"),a.indexOf(n.percent)!==a.lastIndexOf(n.percent)&&(t="D3082"),a.indexOf(n["per-mille"])!==a.lastIndexOf(n["per-mille"])&&(t="D3083"),-1!==a.indexOf(n.percent)&&-1!==a.indexOf(n["per-mille"])&&(t="D3084");var s=!1;for(r=0;r<e.mantissaPart.length;r++){var c=e.mantissaPart.charAt(r);if(-1!==o.indexOf(c)||c===n.digit){s=!0;break}}s||(t="D3085"),-1!==e.activePart.split("").map(function(e){return-1===u.indexOf(e)?"p":"a"}).join("").indexOf("p")&&(t="D3086"),-1!==i?a.charAt(i-1)!==n["grouping-separator"]&&a.charAt(i+1)!==n["grouping-separator"]||(t="D3087"):e.integerPart.charAt(e.integerPart.length-1)===n["grouping-separator"]&&(t="D3088"),-1!==a.indexOf(n["grouping-separator"]+n["grouping-separator"])&&(t="D3089");var f=e.integerPart.indexOf(n.digit);-1!==f&&e.integerPart.substring(0,f).split("").filter(function(e){return o.indexOf(e)>-1}).length>0&&(t="D3090"),-1!==(f=e.fractionalPart.lastIndexOf(n.digit))&&e.fractionalPart.substring(f).split("").filter(function(e){return o.indexOf(e)>-1}).length>0&&(t="D3091");var l="string"==typeof e.exponentPart;if(l&&e.exponentPart.length>0&&(-1!==a.indexOf(n.percent)||-1!==a.indexOf(n["per-mille"]))&&(t="D3092"),l&&(0===e.exponentPart.length||e.exponentPart.split("").filter(function(e){return-1===o.indexOf(e)}).length>0)&&(t="D3093"),t)throw{code:t,stack:(new Error).stack}});var p,d,h,b,v=l.map(function(e){var t=function(t,r){for(var a=[],i=t.indexOf(n["grouping-separator"]);-1!==i;){var s=(r?t.substring(0,i):t.substring(i)).split("").filter(function(e){return-1!==o.indexOf(e)||e===n.digit}).length;a.push(s),i=e.integerPart.indexOf(n["grouping-separator"],i+1)}return a},r=t(e.integerPart),a=function(e){if(0===e.length)return 0;for(var t=e.reduce(function e(t,r){return 0===r?t:e(r,t%r)}),r=1;r<=e.length;r++)if(-1===e.indexOf(r*t))return 0;return t}(r),i=t(e.fractionalPart,!0),s=e.integerPart.split("").filter(function(e){return-1!==o.indexOf(e)}).length,u=s,c=e.fractionalPart.split(""),f=c.filter(function(e){return-1!==o.indexOf(e)}).length,l=c.filter(function(e){return-1!==o.indexOf(e)||e===n.digit}).length,p="string"==typeof e.exponentPart;0===s&&0===l&&(p?(f=1,l=1):s=1),p&&0===s&&-1!==e.integerPart.indexOf(n.digit)&&(s=1),0===s&&0===f&&(f=1);var d=0;return p&&(d=e.exponentPart.split("").filter(function(e){return-1!==o.indexOf(e)}).length),{integerPartGroupingPositions:r,regularGrouping:a,minimumIntegerPartSize:s,scalingFactor:u,prefix:e.prefix,fractionalPartGroupingPositions:i,minimumFactionalPartSize:f,maximumFactionalPartSize:l,minimumExponentSize:d,suffix:e.suffix,picture:e.subpicture}}),g=n["minus-sign"],m=n["zero-digit"],y=n["decimal-separator"],_=n["grouping-separator"];if(1===v.length&&(v.push(JSON.parse((0,i.default)(v[0]))),v[1].prefix=g+v[1].prefix),d=-1!==(p=e>=0?v[0]:v[1]).picture.indexOf(n.percent)?100*e:-1!==p.picture.indexOf(n["per-mille"])?1e3*e:e,0===p.minimumExponentSize)h=d;else{var x=Math.pow(10,p.scalingFactor),k=Math.pow(10,p.scalingFactor-1);for(h=d,b=0;h<k;)h*=10,b-=1;for(;h>x;)h/=10,b+=1}var w=function(e,t){var r=Math.abs(e).toFixed(t);return"0"!==m&&(r=r.split("").map(function(e){return e>="0"&&e<="9"?o[e.charCodeAt(0)-48]:e}).join("")),r},j=w(Ke(h,p.maximumFactionalPartSize),p.maximumFactionalPartSize),S=j.indexOf(".");for(-1===S?j+=y:j=j.replace(".",y);j.charAt(0)===m;)j=j.substring(1);for(;j.charAt(j.length-1)===m;)j=j.substring(0,j.length-1);S=j.indexOf(y);var O=p.minimumIntegerPartSize-S,E=p.minimumFactionalPartSize-(j.length-S-1);if(j=(O>0?new Array(O+1).join(m):"")+j,j+=E>0?new Array(E+1).join(m):"",S=j.indexOf(y),p.regularGrouping>0)for(var A=Math.floor((S-1)/p.regularGrouping),T=1;T<=A;T++)j=[j.slice(0,S-T*p.regularGrouping),_,j.slice(S-T*p.regularGrouping)].join("");else p.integerPartGroupingPositions.forEach(function(e){j=[j.slice(0,S-e),_,j.slice(S-e)].join(""),S++});if(S=j.indexOf(y),p.fractionalPartGroupingPositions.forEach(function(e){j=[j.slice(0,e+S+1),_,j.slice(e+S+1)].join("")}),S=j.indexOf(y),-1!==p.picture.indexOf(y)&&S!==j.length-1||(j=j.substring(0,j.length-1)),void 0!==b){var P=w(b,0);(O=p.minimumExponentSize-P.length)>0&&(P=new Array(O+1).join(m)+P),j=j+n["exponent-separator"]+(b<0?g:"")+P}return j=p.prefix+j+p.suffix}},"<n-so?:s>")),W.bind("formatBase",$e(function(e,t){if(void 0!==e){if(e=Ke(e),(t=void 0===t?10:Ke(t))<2||t>36)throw{code:"D3100",stack:(new Error).stack,value:t};return e.toString(t)}},"<n-n?:s>")),W.bind("number",$e(function(e){var t;if(void 0!==e){if("number"==typeof e)t=e;else{if("string"!=typeof e||!/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(e)||isNaN(parseFloat(e))||!isFinite(e))throw{code:"D3030",value:e,stack:(new Error).stack,index:1};t=parseFloat(e)}return t}},"<(ns)-:n>")),W.bind("floor",$e(function(e){if(void 0!==e)return Math.floor(e)},"<n-:n>")),W.bind("ceil",$e(function(e){if(void 0!==e)return Math.ceil(e)},"<n-:n>")),W.bind("round",$e(Ke,"<n-n?:n>")),W.bind("abs",$e(function(e){if(void 0!==e)return Math.abs(e)},"<n-:n>")),W.bind("sqrt",$e(function(e){if(void 0!==e){if(e<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:e};return Math.sqrt(e)}},"<n-:n>")),W.bind("power",$e(function(e,t){var r;if(void 0!==e){if(r=Math.pow(e,t),!isFinite(r))throw{stack:(new Error).stack,code:"D3061",index:1,value:e,exp:t};return r}},"<n-n:n>")),W.bind("random",$e(function(){return Math.random()},"<:n>")),W.bind("boolean",$e(He,"<x-:b>")),W.bind("not",$e(function(e){return!He(e)},"<x-:b>")),W.bind("map",$e(Qe,"<af>")),W.bind("zip",$e(function(){for(var e=[],t=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,t.map(function(e){return Array.isArray(e)?e.length:0})),n=0;n<r;n++){var o=t.map(function(e){return e[n]});e.push(o)}return e},"<a+>")),W.bind("filter",$e(Ze,"<af>")),W.bind("reduce",$e(Xe,"<afj?:j>")),W.bind("sift",$e(nt,"<o-f?:o>")),W.bind("keys",$e(function e(t){var r=Z();if(Array.isArray(t)){var n={};t.forEach(function(t){var r=e(t);Array.isArray(r)&&r.forEach(function(e){n[e]=!0})}),r=e(n)}else null===t||"object"!==(void 0===t?"undefined":h(t))||Ae(t)?r=void 0:0===(r=(0,c.default)(t)).length&&(r=void 0);return r},"<x-:a<s>>")),W.bind("lookup",$e(function(e,t){return ie({value:t},e)},"<x-s:x>")),W.bind("append",$e(et,"<xx:a>")),W.bind("exists",$e(function(e){return void 0!==e},"<x:b>")),W.bind("spread",$e(function e(t){var r=Z();if(Array.isArray(t))t.forEach(function(t){r=et(r,e(t))});else if(null===t||"object"!==(void 0===t?"undefined":h(t))||Ae(t))r=t;else for(var n in t){var o={};o[n]=t[n],r.push(o)}return r},"<x-:a<o>>")),W.bind("merge",$e(function(e){if(void 0!==e){var t={};return e.forEach(function(e){for(var r in e)t[r]=e[r]}),t}},"<a<o>:o>")),W.bind("reverse",$e(function(e){if(void 0!==e){if(e.length<=1)return e;for(var t=e.length,r=new Array(t),n=0;n<t;n++)r[t-n-1]=e[n];return r}},"<a:a>")),W.bind("each",$e(tt,"<o-f:a>")),W.bind("sort",$e(rt,"<af?:a>")),W.bind("shuffle",$e(function(e){if(void 0!==e){if(e.length<=1)return e;for(var t=new Array(e.length),r=0;r<e.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(t[r]=t[n]),t[n]=e[r]}return t}},"<a:a>")),W.bind("base64encode",$e(function(e){if(void 0!==e)return("undefined"!=typeof window?window.btoa:function(e){return new r.Buffer(e,"binary").toString("base64")})(e)},"<s-:s>")),W.bind("base64decode",$e(function(e){if(void 0!==e)return("undefined"!=typeof window?window.atob:function(e){return new r.Buffer(e,"base64").toString("binary")})(e)},"<s-:s>")),W.bind("toMillis",$e(function(e){if(void 0!==e){if(!ot.test(e))throw{stack:(new Error).stack,code:"D3110",value:e};return Date.parse(e)}},"<s-:n>")),W.bind("fromMillis",$e(function(e){if(void 0!==e)return new Date(e).toISOString()},"<n-:s>")),W.bind("clone",$e(function(e){if(void 0!==e)return JSON.parse(ze(e))},"<(oa)-:o>"));var it={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"First argument of reduce function must be a function with two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}"};function st(e){var t="Unknown error";void 0!==e.message&&(t=e.message);var r=it[e.code];return void 0!==r&&(t=(t=r.replace(/\{\{\{([^}]+)}}}/g,function(){return e[arguments[1]]})).replace(/\{\{([^}]+)}}/g,function(){return(0,i.default)(e[arguments[1]])})),t}function ut(e,t){var r,n;try{r=B(e,t&&t.recover),n=r.errors,delete r.errors}catch(e){throw e.message=st(e),e}var o=at(W),a=new Date;return o.bind("now",$e(function(){return a.toJSON()},"<:s>")),o.bind("millis",$e(function(){return a.getTime()},"<:n>")),{evaluate:function(e,t,i){if(void 0!==n){var s={code:"S0500",position:0};throw s.message=st(s),s}var u,c,f;if(void 0!==t)for(var l in u=at(o),t)u.bind(l,t[l]);else u=o;if(u.bind("$",e),a=new Date,"function"==typeof i){u.bind("__jsonata_async",!0);var p=function(e){e.message=st(e),i(e,null)};f=Q(r,e,u),(c=f.next()).value.then(function e(t){(c=f.next(t)).done?i(null,c.value):c.value.then(e).catch(p)}).catch(p)}else try{for(f=Q(r,e,u),c=f.next();!c.done;)c=f.next(c.value);return c.value}catch(s){throw s.message=st(s),s}},assign:function(e,t){o.bind(e,t)},registerFunction:function(e,t,r){var n=$e(t,r);o.bind(e,n)},ast:function(){return r},errors:function(){return n}}}return ut.parser=B,ut}();void 0!==t&&(t.exports=v)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/array/from":2,"babel-runtime/core-js/is-iterable":3,"babel-runtime/core-js/json/stringify":4,"babel-runtime/core-js/number/is-integer":5,"babel-runtime/core-js/object/create":6,"babel-runtime/core-js/object/is":7,"babel-runtime/core-js/object/keys":8,"babel-runtime/core-js/promise":9,"babel-runtime/core-js/symbol":10,"babel-runtime/core-js/symbol/iterator":11,"babel-runtime/regenerator":12}],2:[function(e,t,r){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":13}],3:[function(e,t,r){t.exports={default:e("core-js/library/fn/is-iterable"),__esModule:!0}},{"core-js/library/fn/is-iterable":14}],4:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":15}],5:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/is-integer"),__esModule:!0}},{"core-js/library/fn/number/is-integer":16}],6:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":17}],7:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/is"),__esModule:!0}},{"core-js/library/fn/object/is":18}],8:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":19}],9:[function(e,t,r){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":20}],10:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":21}],11:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":22}],12:[function(e,t,r){t.exports=e("regenerator-runtime")},{"regenerator-runtime":115}],13:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/_core").Array.from},{"../../modules/_core":30,"../../modules/es6.array.from":100,"../../modules/es6.string.iterator":108}],14:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.is-iterable")},{"../modules/core.is-iterable":99,"../modules/es6.string.iterator":108,"../modules/web.dom.iterable":114}],15:[function(e,t,r){var n=e("../../modules/_core"),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return o.stringify.apply(o,arguments)}},{"../../modules/_core":30}],16:[function(e,t,r){e("../../modules/es6.number.is-integer"),t.exports=e("../../modules/_core").Number.isInteger},{"../../modules/_core":30,"../../modules/es6.number.is-integer":102}],17:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":30,"../../modules/es6.object.create":103}],18:[function(e,t,r){e("../../modules/es6.object.is"),t.exports=e("../../modules/_core").Object.is},{"../../modules/_core":30,"../../modules/es6.object.is":104}],19:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":30,"../../modules/es6.object.keys":105}],20:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),e("../modules/es7.promise.finally"),e("../modules/es7.promise.try"),t.exports=e("../modules/_core").Promise},{"../modules/_core":30,"../modules/es6.object.to-string":106,"../modules/es6.promise":107,"../modules/es6.string.iterator":108,"../modules/es7.promise.finally":110,"../modules/es7.promise.try":111,"../modules/web.dom.iterable":114}],21:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":30,"../../modules/es6.object.to-string":106,"../../modules/es6.symbol":109,"../../modules/es7.symbol.async-iterator":112,"../../modules/es7.symbol.observable":113}],22:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":96,"../../modules/es6.string.iterator":108,"../../modules/web.dom.iterable":114}],23:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],24:[function(e,t,r){t.exports=function(){}},{}],25:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],26:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":51}],27:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_to-length"),a=e("./_to-absolute-index");t.exports=function(e){return function(t,r,i){var s,u=n(t),c=o(u.length),f=a(i,c);if(e&&r!=r){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===r)return e||f||0;return!e&&-1}}},{"./_to-absolute-index":87,"./_to-iobject":89,"./_to-length":90}],28:[function(e,t,r){var n=e("./_cof"),o=e("./_wks")("toStringTag"),a="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:a?n(t):"Object"==(i=n(t))&&"function"==typeof t.callee?"Arguments":i}},{"./_cof":29,"./_wks":97}],29:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],30:[function(e,t,r){var n=t.exports={version:"2.5.6"};"number"==typeof __e&&(__e=n)},{}],31:[function(e,t,r){"use strict";var n=e("./_object-dp"),o=e("./_property-desc");t.exports=function(e,t,r){t in e?n.f(e,t,o(0,r)):e[t]=r}},{"./_object-dp":63,"./_property-desc":76}],32:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":23}],33:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],34:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":39}],35:[function(e,t,r){var n=e("./_is-object"),o=e("./_global").document,a=n(o)&&n(o.createElement);t.exports=function(e){return a?o.createElement(e):{}}},{"./_global":41,"./_is-object":51}],36:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],37:[function(e,t,r){var n=e("./_object-keys"),o=e("./_object-gops"),a=e("./_object-pie");t.exports=function(e){var t=n(e),r=o.f;if(r)for(var i,s=r(e),u=a.f,c=0;s.length>c;)u.call(e,i=s[c++])&&t.push(i);return t}},{"./_object-gops":68,"./_object-keys":71,"./_object-pie":72}],38:[function(e,t,r){var n=e("./_global"),o=e("./_core"),a=e("./_ctx"),i=e("./_hide"),s=e("./_has"),u=function(e,t,r){var c,f,l,p=e&u.F,d=e&u.G,h=e&u.S,b=e&u.P,v=e&u.B,g=e&u.W,m=d?o:o[t]||(o[t]={}),y=m.prototype,_=d?n:h?n[t]:(n[t]||{}).prototype;for(c in d&&(r=t),r)(f=!p&&_&&void 0!==_[c])&&s(m,c)||(l=f?_[c]:r[c],m[c]=d&&"function"!=typeof _[c]?r[c]:v&&f?a(l,n):g&&_[c]==l?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):b&&"function"==typeof l?a(Function.call,l):l,b&&((m.virtual||(m.virtual={}))[c]=l,e&u.R&&y&&!y[c]&&i(y,c,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},{"./_core":30,"./_ctx":32,"./_global":41,"./_has":42,"./_hide":43}],39:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],40:[function(e,t,r){var n=e("./_ctx"),o=e("./_iter-call"),a=e("./_is-array-iter"),i=e("./_an-object"),s=e("./_to-length"),u=e("./core.get-iterator-method"),c={},f={};(r=t.exports=function(e,t,r,l,p){var d,h,b,v,g=p?function(){return e}:u(e),m=n(r,l,t?2:1),y=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(d=s(e.length);d>y;y++)if((v=t?m(i(h=e[y])[0],h[1]):m(e[y]))===c||v===f)return v}else for(b=g.call(e);!(h=b.next()).done;)if((v=o(b,m,h.value,t))===c||v===f)return v}).BREAK=c,r.RETURN=f},{"./_an-object":26,"./_ctx":32,"./_is-array-iter":48,"./_iter-call":52,"./_to-length":90,"./core.get-iterator-method":98}],41:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],42:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],43:[function(e,t,r){var n=e("./_object-dp"),o=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":34,"./_object-dp":63,"./_property-desc":76}],44:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":41}],45:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":34,"./_dom-create":35,"./_fails":39}],46:[function(e,t,r){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],47:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":29}],48:[function(e,t,r){var n=e("./_iterators"),o=e("./_wks")("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},{"./_iterators":57,"./_wks":97}],49:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":29}],50:[function(e,t,r){var n=e("./_is-object"),o=Math.floor;t.exports=function(e){return!n(e)&&isFinite(e)&&o(e)===e}},{"./_is-object":51}],51:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],52:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var a=e.return;throw void 0!==a&&n(a.call(e)),t}}},{"./_an-object":26}],53:[function(e,t,r){"use strict";var n=e("./_object-create"),o=e("./_property-desc"),a=e("./_set-to-string-tag"),i={};e("./_hide")(i,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(i,{next:o(1,r)}),a(e,t+" Iterator")}},{"./_hide":43,"./_object-create":62,"./_property-desc":76,"./_set-to-string-tag":81,"./_wks":97}],54:[function(e,t,r){"use strict";var n=e("./_library"),o=e("./_export"),a=e("./_redefine"),i=e("./_hide"),s=e("./_iterators"),u=e("./_iter-create"),c=e("./_set-to-string-tag"),f=e("./_object-gpo"),l=e("./_wks")("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,h,b,v,g){u(r,t,h);var m,y,_,x=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},k=t+" Iterator",w="values"==b,j=!1,S=e.prototype,O=S[l]||S["@@iterator"]||b&&S[b],E=O||x(b),A=b?w?x("entries"):E:void 0,T="Array"==t&&S.entries||O;if(T&&(_=f(T.call(new e)))!==Object.prototype&&_.next&&(c(_,k,!0),n||"function"==typeof _[l]||i(_,l,d)),w&&O&&"values"!==O.name&&(j=!0,E=function(){return O.call(this)}),n&&!g||!p&&!j&&S[l]||i(S,l,E),s[t]=E,s[k]=d,b)if(m={values:w?E:x("values"),keys:v?E:x("keys"),entries:A},g)for(y in m)y in S||a(S,y,m[y]);else o(o.P+o.F*(p||j),t,m);return m}},{"./_export":38,"./_hide":43,"./_iter-create":53,"./_iterators":57,"./_library":58,"./_object-gpo":69,"./_redefine":78,"./_set-to-string-tag":81,"./_wks":97}],55:[function(e,t,r){var n=e("./_wks")("iterator"),o=!1;try{var a=[7][n]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var a=[7],i=a[n]();i.next=function(){return{done:r=!0}},a[n]=function(){return i},e(a)}catch(e){}return r}},{"./_wks":97}],56:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],57:[function(e,t,r){t.exports={}},{}],58:[function(e,t,r){t.exports=!0},{}],59:[function(e,t,r){var n=e("./_uid")("meta"),o=e("./_is-object"),a=e("./_has"),i=e("./_object-dp").f,s=0,u=Object.isExtensible||function(){return!0},c=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),f=function(e){i(e,n,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,n)){if(!u(e))return"F";if(!t)return"E";f(e)}return e[n].i},getWeak:function(e,t){if(!a(e,n)){if(!u(e))return!0;if(!t)return!1;f(e)}return e[n].w},onFreeze:function(e){return c&&l.NEED&&u(e)&&!a(e,n)&&f(e),e}}},{"./_fails":39,"./_has":42,"./_is-object":51,"./_object-dp":63,"./_uid":93}],60:[function(e,t,r){var n=e("./_global"),o=e("./_task").set,a=n.MutationObserver||n.WebKitMutationObserver,i=n.process,s=n.Promise,u="process"==e("./_cof")(i);t.exports=function(){var e,t,r,c=function(){var n,o;for(u&&(n=i.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(u)r=function(){i.nextTick(c)};else if(!a||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);r=function(){f.then(c)}}else r=function(){o.call(n,c)};else{var l=!0,p=document.createTextNode("");new a(c).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},{"./_cof":29,"./_global":41,"./_task":86}],61:[function(e,t,r){"use strict";var n=e("./_a-function");t.exports.f=function(e){return new function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)}(e)}},{"./_a-function":23}],62:[function(e,t,r){var n=e("./_an-object"),o=e("./_object-dps"),a=e("./_enum-bug-keys"),i=e("./_shared-key")("IE_PROTO"),s=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=a.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[a[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[i]=e):r=u(),void 0===t?r:o(r,t)}},{"./_an-object":26,"./_dom-create":35,"./_enum-bug-keys":36,"./_html":44,"./_object-dps":64,"./_shared-key":82}],63:[function(e,t,r){var n=e("./_an-object"),o=e("./_ie8-dom-define"),a=e("./_to-primitive"),i=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=a(t,!0),n(r),o)try{return i(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":26,"./_descriptors":34,"./_ie8-dom-define":45,"./_to-primitive":92}],64:[function(e,t,r){var n=e("./_object-dp"),o=e("./_an-object"),a=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){o(e);for(var r,i=a(t),s=i.length,u=0;s>u;)n.f(e,r=i[u++],t[r]);return e}},{"./_an-object":26,"./_descriptors":34,"./_object-dp":63,"./_object-keys":71}],65:[function(e,t,r){var n=e("./_object-pie"),o=e("./_property-desc"),a=e("./_to-iobject"),i=e("./_to-primitive"),s=e("./_has"),u=e("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?c:function(e,t){if(e=a(e),t=i(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},{"./_descriptors":34,"./_has":42,"./_ie8-dom-define":45,"./_object-pie":72,"./_property-desc":76,"./_to-iobject":89,"./_to-primitive":92}],66:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_object-gopn").f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(n(e))}},{"./_object-gopn":67,"./_to-iobject":89}],67:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},{"./_enum-bug-keys":36,"./_object-keys-internal":70}],68:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],69:[function(e,t,r){var n=e("./_has"),o=e("./_to-object"),a=e("./_shared-key")("IE_PROTO"),i=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},{"./_has":42,"./_shared-key":82,"./_to-object":91}],70:[function(e,t,r){var n=e("./_has"),o=e("./_to-iobject"),a=e("./_array-includes")(!1),i=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,s=o(e),u=0,c=[];for(r in s)r!=i&&n(s,r)&&c.push(r);for(;t.length>u;)n(s,r=t[u++])&&(~a(c,r)||c.push(r));return c}},{"./_array-includes":27,"./_has":42,"./_shared-key":82,"./_to-iobject":89}],71:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,o)}},{"./_enum-bug-keys":36,"./_object-keys-internal":70}],72:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],73:[function(e,t,r){var n=e("./_export"),o=e("./_core"),a=e("./_fails");t.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],i={};i[e]=t(r),n(n.S+n.F*a(function(){r(1)}),"Object",i)}},{"./_core":30,"./_export":38,"./_fails":39}],74:[function(e,t,r){t.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},{}],75:[function(e,t,r){var n=e("./_an-object"),o=e("./_is-object"),a=e("./_new-promise-capability");t.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=a.f(e);return(0,r.resolve)(t),r.promise}},{"./_an-object":26,"./_is-object":51,"./_new-promise-capability":61}],76:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],77:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},{"./_hide":43}],78:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":43}],79:[function(e,t,r){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],80:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_core"),a=e("./_object-dp"),i=e("./_descriptors"),s=e("./_wks")("species");t.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];i&&t&&!t[s]&&a.f(t,s,{configurable:!0,get:function(){return this}})}},{"./_core":30,"./_descriptors":34,"./_global":41,"./_object-dp":63,"./_wks":97}],81:[function(e,t,r){var n=e("./_object-dp").f,o=e("./_has"),a=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},{"./_has":42,"./_object-dp":63,"./_wks":97}],82:[function(e,t,r){var n=e("./_shared")("keys"),o=e("./_uid");t.exports=function(e){return n[e]||(n[e]=o(e))}},{"./_shared":83,"./_uid":93}],83:[function(e,t,r){var n=e("./_core"),o=e("./_global"),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:e("./_library")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":30,"./_global":41,"./_library":58}],84:[function(e,t,r){var n=e("./_an-object"),o=e("./_a-function"),a=e("./_wks")("species");t.exports=function(e,t){var r,i=n(e).constructor;return void 0===i||void 0==(r=n(i)[a])?t:o(r)}},{"./_a-function":23,"./_an-object":26,"./_wks":97}],85:[function(e,t,r){var n=e("./_to-integer"),o=e("./_defined");t.exports=function(e){return function(t,r){var a,i,s=String(o(t)),u=n(r),c=s.length;return u<0||u>=c?e?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===c||(i=s.charCodeAt(u+1))<56320||i>57343?e?s.charAt(u):a:e?s.slice(u,u+2):i-56320+(a-55296<<10)+65536}}},{"./_defined":33,"./_to-integer":88}],86:[function(e,t,r){var n,o,a,i=e("./_ctx"),s=e("./_invoke"),u=e("./_html"),c=e("./_dom-create"),f=e("./_global"),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,b=f.Dispatch,v=0,g={},m=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},y=function(e){m.call(e.data)};p&&d||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return g[++v]=function(){s("function"==typeof e?e:Function(e),t)},n(v),v},d=function(e){delete g[e]},"process"==e("./_cof")(l)?n=function(e){l.nextTick(i(m,e,1))}:b&&b.now?n=function(e){b.now(i(m,e,1))}:h?(a=(o=new h).port2,o.port1.onmessage=y,n=i(a.postMessage,a,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(e){f.postMessage(e+"","*")},f.addEventListener("message",y,!1)):n="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),m.call(e)}}:function(e){setTimeout(i(m,e,1),0)}),t.exports={set:p,clear:d}},{"./_cof":29,"./_ctx":32,"./_dom-create":35,"./_global":41,"./_html":44,"./_invoke":46}],87:[function(e,t,r){var n=e("./_to-integer"),o=Math.max,a=Math.min;t.exports=function(e,t){return(e=n(e))<0?o(e+t,0):a(e,t)}},{"./_to-integer":88}],88:[function(e,t,r){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},{}],89:[function(e,t,r){var n=e("./_iobject"),o=e("./_defined");t.exports=function(e){return n(o(e))}},{"./_defined":33,"./_iobject":47}],90:[function(e,t,r){var n=e("./_to-integer"),o=Math.min;t.exports=function(e){return e>0?o(n(e),9007199254740991):0}},{"./_to-integer":88}],91:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":33}],92:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":51}],93:[function(e,t,r){var n=0,o=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},{}],94:[function(e,t,r){var n=e("./_global").navigator;t.exports=n&&n.userAgent||""},{"./_global":41}],95:[function(e,t,r){var n=e("./_global"),o=e("./_core"),a=e("./_library"),i=e("./_wks-ext"),s=e("./_object-dp").f;t.exports=function(e){var t=o.Symbol||(o.Symbol=a?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},{"./_core":30,"./_global":41,"./_library":58,"./_object-dp":63,"./_wks-ext":96}],96:[function(e,t,r){r.f=e("./_wks")},{"./_wks":97}],97:[function(e,t,r){var n=e("./_shared")("wks"),o=e("./_uid"),a=e("./_global").Symbol,i="function"==typeof a;(t.exports=function(e){return n[e]||(n[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=n},{"./_global":41,"./_shared":83,"./_uid":93}],98:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),a=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||a[n(e)]}},{"./_classof":28,"./_core":30,"./_iterators":57,"./_wks":97}],99:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),a=e("./_iterators");t.exports=e("./_core").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||a.hasOwnProperty(n(t))}},{"./_classof":28,"./_core":30,"./_iterators":57,"./_wks":97}],100:[function(e,t,r){"use strict";var n=e("./_ctx"),o=e("./_export"),a=e("./_to-object"),i=e("./_iter-call"),s=e("./_is-array-iter"),u=e("./_to-length"),c=e("./_create-property"),f=e("./core.get-iterator-method");o(o.S+o.F*!e("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,o,l,p=a(e),d="function"==typeof this?this:Array,h=arguments.length,b=h>1?arguments[1]:void 0,v=void 0!==b,g=0,m=f(p);if(v&&(b=n(b,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&s(m))for(r=new d(t=u(p.length));t>g;g++)c(r,g,v?b(p[g],g):p[g]);else for(l=m.call(p),r=new d;!(o=l.next()).done;g++)c(r,g,v?i(l,b,[o.value,g],!0):o.value);return r.length=g,r}})},{"./_create-property":31,"./_ctx":32,"./_export":38,"./_is-array-iter":48,"./_iter-call":52,"./_iter-detect":55,"./_to-length":90,"./_to-object":91,"./core.get-iterator-method":98}],101:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),o=e("./_iter-step"),a=e("./_iterators"),i=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=i(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":24,"./_iter-define":54,"./_iter-step":56,"./_iterators":57,"./_to-iobject":89}],102:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{isInteger:e("./_is-integer")})},{"./_export":38,"./_is-integer":50}],103:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":38,"./_object-create":62}],104:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{is:e("./_same-value")})},{"./_export":38,"./_same-value":79}],105:[function(e,t,r){var n=e("./_to-object"),o=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return o(n(e))}})},{"./_object-keys":71,"./_object-sap":73,"./_to-object":91}],106:[function(e,t,r){},{}],107:[function(e,t,r){"use strict";var n,o,a,i,s=e("./_library"),u=e("./_global"),c=e("./_ctx"),f=e("./_classof"),l=e("./_export"),p=e("./_is-object"),d=e("./_a-function"),h=e("./_an-instance"),b=e("./_for-of"),v=e("./_species-constructor"),g=e("./_task").set,m=e("./_microtask")(),y=e("./_new-promise-capability"),_=e("./_perform"),x=e("./_user-agent"),k=e("./_promise-resolve"),w=u.TypeError,j=u.process,S=j&&j.versions,O=S&&S.v8||"",E=u.Promise,A="process"==f(j),T=function(){},P=o=y.f,Y=!!function(){try{var t=E.resolve(1),r=(t.constructor={})[e("./_wks")("species")]=function(e){e(T,T)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof r&&0!==O.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),D=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},M=function(e,t){if(!e._n){e._n=!0;var r=e._c;m(function(){for(var n=e._v,o=1==e._s,a=0,i=function(t){var r,a,i,s=o?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(o||(2==e._h&&F(e),e._h=1),!0===s?r=n:(f&&f.enter(),r=s(n),f&&(f.exit(),i=!0)),r===t.promise?c(w("Promise-chain cycle")):(a=D(r))?a.call(r,u,c):u(r)):c(n)}catch(e){f&&!i&&f.exit(),c(e)}};r.length>a;)i(r[a++]);e._c=[],e._n=!1,t&&!e._h&&L(e)})}},L=function(e){g.call(u,function(){var t,r,n,o=e._v,a=N(e);if(a&&(t=_(function(){A?j.emit("unhandledRejection",o,e):(r=u.onunhandledrejection)?r({promise:e,reason:o}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",o)}),e._h=A||N(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){g.call(u,function(){var t;A?j.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},I=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},R=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw w("Promise can't be resolved itself");(t=D(e))?m(function(){var n={_w:r,_d:!1};try{t.call(e,c(R,n,1),c(I,n,1))}catch(e){I.call(n,e)}}):(r._v=e,r._s=1,M(r,!1))}catch(e){I.call({_w:r,_d:!1},e)}}};Y||(E=function(e){h(this,E,"Promise","_h"),d(e),n.call(this);try{e(c(R,this,1),c(I,this,1))}catch(e){I.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e("./_redefine-all")(E.prototype,{then:function(e,t){var r=P(v(this,E));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=A?j.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&M(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n;this.promise=e,this.resolve=c(R,e,1),this.reject=c(I,e,1)},y.f=P=function(e){return e===E||e===i?new a(e):o(e)}),l(l.G+l.W+l.F*!Y,{Promise:E}),e("./_set-to-string-tag")(E,"Promise"),e("./_set-species")("Promise"),i=e("./_core").Promise,l(l.S+l.F*!Y,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(s||!Y),"Promise",{resolve:function(e){return k(s&&this===i?E:this,e)}}),l(l.S+l.F*!(Y&&e("./_iter-detect")(function(e){E.all(e).catch(T)})),"Promise",{all:function(e){var t=this,r=P(t),n=r.resolve,o=r.reject,a=_(function(){var r=[],a=0,i=1;b(e,!1,function(e){var s=a++,u=!1;r.push(void 0),i++,t.resolve(e).then(function(e){u||(u=!0,r[s]=e,--i||n(r))},o)}),--i||n(r)});return a.e&&o(a.v),r.promise},race:function(e){var t=this,r=P(t),n=r.reject,o=_(function(){b(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}})},{"./_a-function":23,"./_an-instance":25,"./_classof":28,"./_core":30,"./_ctx":32,"./_export":38,"./_for-of":40,"./_global":41,"./_is-object":51,"./_iter-detect":55,"./_library":58,"./_microtask":60,"./_new-promise-capability":61,"./_perform":74,"./_promise-resolve":75,"./_redefine-all":77,"./_set-species":80,"./_set-to-string-tag":81,"./_species-constructor":84,"./_task":86,"./_user-agent":94,"./_wks":97}],108:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":54,"./_string-at":85}],109:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_has"),a=e("./_descriptors"),i=e("./_export"),s=e("./_redefine"),u=e("./_meta").KEY,c=e("./_fails"),f=e("./_shared"),l=e("./_set-to-string-tag"),p=e("./_uid"),d=e("./_wks"),h=e("./_wks-ext"),b=e("./_wks-define"),v=e("./_enum-keys"),g=e("./_is-array"),m=e("./_an-object"),y=e("./_is-object"),_=e("./_to-iobject"),x=e("./_to-primitive"),k=e("./_property-desc"),w=e("./_object-create"),j=e("./_object-gopn-ext"),S=e("./_object-gopd"),O=e("./_object-dp"),E=e("./_object-keys"),A=S.f,T=O.f,P=j.f,Y=n.Symbol,D=n.JSON,M=D&&D.stringify,L=d("_hidden"),N=d("toPrimitive"),F={}.propertyIsEnumerable,I=f("symbol-registry"),R=f("symbols"),C=f("op-symbols"),G=Object.prototype,$="function"==typeof Y,z=n.QObject,q=!z||!z.prototype||!z.prototype.findChild,U=a&&c(function(){return 7!=w(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=A(G,t);n&&delete G[t],T(e,t,r),n&&e!==G&&T(G,t,n)}:T,J=function(e){var t=R[e]=w(Y.prototype);return t._k=e,t},B=$&&"symbol"==typeof Y.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Y},W=function(e,t,r){return e===G&&W(C,t,r),m(e),t=x(t,!0),m(r),o(R,t)?(r.enumerable?(o(e,L)&&e[L][t]&&(e[L][t]=!1),r=w(r,{enumerable:k(0,!1)})):(o(e,L)||T(e,L,k(1,{})),e[L][t]=!0),U(e,t,r)):T(e,t,r)},V=function(e,t){m(e);for(var r,n=v(t=_(t)),o=0,a=n.length;a>o;)W(e,r=n[o++],t[r]);return e},K=function(e){var t=F.call(this,e=x(e,!0));return!(this===G&&o(R,e)&&!o(C,e))&&(!(t||!o(this,e)||!o(R,e)||o(this,L)&&this[L][e])||t)},H=function(e,t){if(e=_(e),t=x(t,!0),e!==G||!o(R,t)||o(C,t)){var r=A(e,t);return!r||!o(R,t)||o(e,L)&&e[L][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=P(_(e)),n=[],a=0;r.length>a;)o(R,t=r[a++])||t==L||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===G,n=P(r?C:_(e)),a=[],i=0;n.length>i;)!o(R,t=n[i++])||r&&!o(G,t)||a.push(R[t]);return a};$||(s((Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(r){this===G&&t.call(C,r),o(this,L)&&o(this[L],e)&&(this[L][e]=!1),U(this,e,k(1,r))};return a&&q&&U(G,e,{configurable:!0,set:t}),J(e)}).prototype,"toString",function(){return this._k}),S.f=H,O.f=W,e("./_object-gopn").f=j.f=Q,e("./_object-pie").f=K,e("./_object-gops").f=Z,a&&!e("./_library")&&s(G,"propertyIsEnumerable",K,!0),h.f=function(e){return J(d(e))}),i(i.G+i.W+i.F*!$,{Symbol:Y});for(var X="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;X.length>ee;)d(X[ee++]);for(var te=E(d.store),re=0;te.length>re;)b(te[re++]);i(i.S+i.F*!$,"Symbol",{for:function(e){return o(I,e+="")?I[e]:I[e]=Y(e)},keyFor:function(e){if(!B(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){q=!0},useSimple:function(){q=!1}}),i(i.S+i.F*!$,"Object",{create:function(e,t){return void 0===t?w(e):V(w(e),t)},defineProperty:W,defineProperties:V,getOwnPropertyDescriptor:H,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),D&&i(i.S+i.F*(!$||c(function(){var e=Y();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=t=n[1],(y(t)||void 0!==e)&&!B(e))return g(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!B(t))return t}),n[1]=t,M.apply(D,n)}}),Y.prototype[N]||e("./_hide")(Y.prototype,N,Y.prototype.valueOf),l(Y,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},{"./_an-object":26,"./_descriptors":34,"./_enum-keys":37,"./_export":38,"./_fails":39,"./_global":41,"./_has":42,"./_hide":43,"./_is-array":49,"./_is-object":51,"./_library":58,"./_meta":59,"./_object-create":62,"./_object-dp":63,"./_object-gopd":65,"./_object-gopn":67,"./_object-gopn-ext":66,"./_object-gops":68,"./_object-keys":71,"./_object-pie":72,"./_property-desc":76,"./_redefine":78,"./_set-to-string-tag":81,"./_shared":83,"./_to-iobject":89,"./_to-primitive":92,"./_uid":93,"./_wks":97,"./_wks-define":95,"./_wks-ext":96}],110:[function(e,t,r){"use strict";var n=e("./_export"),o=e("./_core"),a=e("./_global"),i=e("./_species-constructor"),s=e("./_promise-resolve");n(n.P+n.R,"Promise",{finally:function(e){var t=i(this,o.Promise||a.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},{"./_core":30,"./_export":38,"./_global":41,"./_promise-resolve":75,"./_species-constructor":84}],111:[function(e,t,r){"use strict";var n=e("./_export"),o=e("./_new-promise-capability"),a=e("./_perform");n(n.S,"Promise",{try:function(e){var t=o.f(this),r=a(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},{"./_export":38,"./_new-promise-capability":61,"./_perform":74}],112:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":95}],113:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":95}],114:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),o=e("./_hide"),a=e("./_iterators"),i=e("./_wks")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],f=n[c],l=f&&f.prototype;l&&!l[i]&&o(l,i,c),a[c]=a.Array}},{"./_global":41,"./_hide":43,"./_iterators":57,"./_wks":97,"./es6.array.iterator":101}],115:[function(e,t,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),o)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},{"./runtime":116}],116:[function(e,t,r){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag",c="object"==typeof t,f=e.regeneratorRuntime;if(f)c&&(t.exports=f);else{(f=e.regeneratorRuntime=c?t.exports:{}).wrap=_;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",b={},v={};v[i]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(Y([])));m&&m!==n&&o.call(m,i)&&(v=m);var y=j.prototype=k.prototype=Object.create(v);w.prototype=y.constructor=j,j.constructor=w,j[u]=w.displayName="GeneratorFunction",f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(y),e},f.awrap=function(e){return{__await:e}},S(O.prototype),O.prototype[s]=function(){return this},f.AsyncIterator=O,f.async=function(e,t,r,n){var o=new O(_(e,t,r,n));return f.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(y),y[u]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},f.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},f.values=Y,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return s.type="throw",s.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:Y(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),b}}}function _(e,t,r,n){var o=t&&t.prototype instanceof k?t:k,a=Object.create(o.prototype),i=new P(n||[]);return a._invoke=function(e,t,r){var n=l;return function(o,a){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw a;return D()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=E(i,r);if(s){if(s===b)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=x(e,t,r);if("normal"===u.type){if(n=r.done?h:p,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(e,r,i),a}function x(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function k(){}function w(){}function j(){}function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function O(e){var t;this._invoke=function(r,n){function a(){return new Promise(function(t,a){!function t(r,n,a,i){var s=x(e[r],e,n);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){u.value=e,a(u)},i)}i(s.arg)}(r,n,t,a)})}return t=t?t.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,E(e,t),"throw"===t.method))return b;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var o=x(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,b;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,b):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,b)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function Y(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}return{next:D}}function D(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},{}]},{},[1])(1)});;// jsonata-es5.min.js is prepended to this file as part of the Grunt build - -;(function(window) { - if (typeof window.window != "undefined" && window.document) - return; - if (window.require && window.define) - return; - - if (!window.console) { - window.console = function() { - var msgs = Array.prototype.slice.call(arguments, 0); - postMessage({type: "log", data: msgs}); - }; - window.console.error = - window.console.warn = - window.console.log = - window.console.trace = window.console; - } - window.window = window; - window.ace = window; - window.onerror = function(message, file, line, col, err) { - postMessage({type: "error", data: { - message: message, - data: err.data, - file: file, - line: line, - col: col, - stack: err.stack - }}); - }; - - window.normalizeModule = function(parentId, moduleName) { - // normalize plugin requires - if (moduleName.indexOf("!") !== -1) { - var chunks = moduleName.split("!"); - return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); - } - // normalize relative requires - if (moduleName.charAt(0) == ".") { - var base = parentId.split("/").slice(0, -1).join("/"); - moduleName = (base ? base + "/" : "") + moduleName; - - while (moduleName.indexOf(".") !== -1 && previous != moduleName) { - var previous = moduleName; - moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); - } - } - - return moduleName; - }; - - window.require = function require(parentId, id) { - if (!id) { - id = parentId; - parentId = null; - } - if (!id.charAt) - throw new Error("worker.js require() accepts only (parentId, id) as arguments"); - - id = window.normalizeModule(parentId, id); - - var module = window.require.modules[id]; - if (module) { - if (!module.initialized) { - module.initialized = true; - module.exports = module.factory().exports; - } - return module.exports; - } - - if (!window.require.tlns) - return console.log("unable to load " + id); - - var path = resolveModuleId(id, window.require.tlns); - if (path.slice(-3) != ".js") path += ".js"; - - window.require.id = id; - window.require.modules[id] = {}; // prevent infinite loop on broken modules - importScripts(path); - return window.require(parentId, id); - }; - function resolveModuleId(id, paths) { - var testPath = id, tail = ""; - while (testPath) { - var alias = paths[testPath]; - if (typeof alias == "string") { - return alias + tail; - } else if (alias) { - return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name); - } else if (alias === false) { - return ""; - } - var i = testPath.lastIndexOf("/"); - if (i === -1) break; - tail = testPath.substr(i) + tail; - testPath = testPath.slice(0, i); - } - return id; - } - window.require.modules = {}; - window.require.tlns = {}; - - window.define = function(id, deps, factory) { - if (arguments.length == 2) { - factory = deps; - if (typeof id != "string") { - deps = id; - id = window.require.id; - } - } else if (arguments.length == 1) { - factory = id; - deps = []; - id = window.require.id; - } - - if (typeof factory != "function") { - window.require.modules[id] = { - exports: factory, - initialized: true - }; - return; - } - - if (!deps.length) - // If there is no dependencies, we inject "require", "exports" and - // "module" as dependencies, to provide CommonJS compatibility. - deps = ["require", "exports", "module"]; - - var req = function(childId) { - return window.require(id, childId); - }; - - window.require.modules[id] = { - exports: {}, - factory: function() { - var module = this; - var returnExports = factory.apply(this, deps.map(function(dep) { - switch (dep) { - // Because "require", "exports" and "module" aren't actual - // dependencies, we must handle them seperately. - case "require": return req; - case "exports": return module.exports; - case "module": return module; - // But for all other dependencies, we can just go ahead and - // require them. - default: return req(dep); - } - })); - if (returnExports) - module.exports = returnExports; - return module; - } - }; - }; - window.define.amd = {}; - require.tlns = {}; - window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { - for (var i in topLevelNamespaces) - require.tlns[i] = topLevelNamespaces[i]; - }; - - window.initSender = function initSender() { - - var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; - var oop = window.require("ace/lib/oop"); - - var Sender = function() {}; - - (function() { - - oop.implement(this, EventEmitter); - - this.callback = function(data, callbackId) { - postMessage({ - type: "call", - id: callbackId, - data: data - }); - }; - - this.emit = function(name, data) { - postMessage({ - type: "event", - name: name, - data: data - }); - }; - - }).call(Sender.prototype); - - return new Sender(); - }; - - var main = window.main = null; - var sender = window.sender = null; - - window.onmessage = function(e) { - var msg = e.data; - if (msg.event && sender) { - sender._signal(msg.event, msg.data); - } - else if (msg.command) { - if (main[msg.command]) - main[msg.command].apply(main, msg.args); - else if (window[msg.command]) - window[msg.command].apply(window, msg.args); - else - throw new Error("Unknown command:" + msg.command); - } - else if (msg.init) { - window.initBaseUrls(msg.tlns); - require("ace/lib/es5-shim"); - sender = window.sender = window.initSender(); - var clazz = require(msg.module)[msg.classname]; - main = window.main = new clazz(sender); - } - }; -})(this); - -define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { - "use strict"; - - exports.inherits = function(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - - exports.mixin = function(obj, mixin) { - for (var key in mixin) { - obj[key] = mixin[key]; - } - return obj; - }; - - exports.implement = function(proto, mixin) { - exports.mixin(proto, mixin); - }; - -}); - -define("ace/range",["require","exports","module"], function(require, exports, module) { - "use strict"; - var comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; - }; - var Range = function(startRow, startColumn, endRow, endColumn) { - this.start = { - row: startRow, - column: startColumn - }; - - this.end = { - row: endRow, - column: endColumn - }; - }; - - (function() { - this.isEqual = function(range) { - return this.start.row === range.start.row && - this.end.row === range.end.row && - this.start.column === range.start.column && - this.end.column === range.end.column; - }; - this.toString = function() { - return ("Range: [" + this.start.row + "/" + this.start.column + - "] -> [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.compareRange = function(range) { - var cmp, - end = range.end, - start = range.start; - - cmp = this.compare(end.row, end.column); - if (cmp == 1) { - cmp = this.compare(start.row, start.column); - if (cmp == 1) { - return 2; - } else if (cmp == 0) { - return 1; - } else { - return 0; - } - } else if (cmp == -1) { - return -2; - } else { - cmp = this.compare(start.row, start.column); - if (cmp == -1) { - return -1; - } else if (cmp == 1) { - return 42; - } else { - return 0; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.setStart = function(row, column) { - if (typeof row == "object") { - this.start.column = row.column; - this.start.row = row.row; - } else { - this.start.row = row; - this.start.column = column; - } - }; - this.setEnd = function(row, column) { - if (typeof row == "object") { - this.end.column = row.column; - this.end.row = row.row; - } else { - this.end.row = row; - this.end.column = column; - } - }; - this.inside = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column) || this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.compare = function(row, column) { - if (!this.isMultiLine()) { - if (row === this.start.row) { - return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); - } - } - - if (row < this.start.row) - return -1; - - if (row > this.end.row) - return 1; - - if (this.start.row === row) - return column >= this.start.column ? 0 : -1; - - if (this.end.row === row) - return column <= this.end.column ? 0 : 1; - - return 0; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.compareInside = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.clipRows = function(firstRow, lastRow) { - if (this.end.row > lastRow) - var end = {row: lastRow + 1, column: 0}; - else if (this.end.row < firstRow) - var end = {row: firstRow, column: 0}; - - if (this.start.row > lastRow) - var start = {row: lastRow + 1, column: 0}; - else if (this.start.row < firstRow) - var start = {row: firstRow, column: 0}; - - return Range.fromPoints(start || this.start, end || this.end); - }; - this.extend = function(row, column) { - var cmp = this.compare(row, column); - - if (cmp == 0) - return this; - else if (cmp == -1) - var start = {row: row, column: column}; - else - var end = {row: row, column: column}; - - return Range.fromPoints(start || this.start, end || this.end); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.collapseRows = function() { - if (this.end.column == 0) - return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) - else - return new Range(this.start.row, 0, this.end.row, 0) - }; - this.toScreenRange = function(session) { - var screenPosStart = session.documentToScreenPosition(this.start); - var screenPosEnd = session.documentToScreenPosition(this.end); - - return new Range( - screenPosStart.row, screenPosStart.column, - screenPosEnd.row, screenPosEnd.column - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - - }).call(Range.prototype); - Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); - }; - Range.comparePoints = comparePoints; - - Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; - }; - - - exports.Range = Range; -}); - -define("ace/apply_delta",["require","exports","module"], function(require, exports, module) { - "use strict"; - - function throwDeltaError(delta, errorText){ - console.log("Invalid Delta:", delta); - throw "Invalid Delta: " + errorText; - } - - function positionInDocument(docLines, position) { - return position.row >= 0 && position.row < docLines.length && - position.column >= 0 && position.column <= docLines[position.row].length; - } - - function validateDelta(docLines, delta) { - if (delta.action != "insert" && delta.action != "remove") - throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); - if (!(delta.lines instanceof Array)) - throwDeltaError(delta, "delta.lines must be an Array"); - if (!delta.start || !delta.end) - throwDeltaError(delta, "delta.start/end must be an present"); - var start = delta.start; - if (!positionInDocument(docLines, delta.start)) - throwDeltaError(delta, "delta.start must be contained in document"); - var end = delta.end; - if (delta.action == "remove" && !positionInDocument(docLines, end)) - throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); - var numRangeRows = end.row - start.row; - var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); - if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) - throwDeltaError(delta, "delta.range must match delta lines"); - } - - exports.applyDelta = function(docLines, delta, doNotValidate) { - - var row = delta.start.row; - var startColumn = delta.start.column; - var line = docLines[row] || ""; - switch (delta.action) { - case "insert": - var lines = delta.lines; - if (lines.length === 1) { - docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); - } else { - var args = [row, 1].concat(delta.lines); - docLines.splice.apply(docLines, args); - docLines[row] = line.substring(0, startColumn) + docLines[row]; - docLines[row + delta.lines.length - 1] += line.substring(startColumn); - } - break; - case "remove": - var endColumn = delta.end.column; - var endRow = delta.end.row; - if (row === endRow) { - docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); - } else { - docLines.splice( - row, endRow - row + 1, - line.substring(0, startColumn) + docLines[endRow].substring(endColumn) - ); - } - break; - } - } -}); - -define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { - "use strict"; - - var EventEmitter = {}; - var stopPropagation = function() { this.propagationStopped = true; }; - var preventDefault = function() { this.defaultPrevented = true; }; - - EventEmitter._emit = - EventEmitter._dispatchEvent = function(eventName, e) { - this._eventRegistry || (this._eventRegistry = {}); - this._defaultHandlers || (this._defaultHandlers = {}); - - var listeners = this._eventRegistry[eventName] || []; - var defaultHandler = this._defaultHandlers[eventName]; - if (!listeners.length && !defaultHandler) - return; - - if (typeof e != "object" || !e) - e = {}; - - if (!e.type) - e.type = eventName; - if (!e.stopPropagation) - e.stopPropagation = stopPropagation; - if (!e.preventDefault) - e.preventDefault = preventDefault; - - listeners = listeners.slice(); - for (var i=0; i<listeners.length; i++) { - listeners[i](e, this); - if (e.propagationStopped) - break; - } - - if (defaultHandler && !e.defaultPrevented) - return defaultHandler(e, this); - }; - - - EventEmitter._signal = function(eventName, e) { - var listeners = (this._eventRegistry || {})[eventName]; - if (!listeners) - return; - listeners = listeners.slice(); - for (var i=0; i<listeners.length; i++) - listeners[i](e, this); - }; - - EventEmitter.once = function(eventName, callback) { - var _self = this; - callback && this.addEventListener(eventName, function newCallback() { - _self.removeEventListener(eventName, newCallback); - callback.apply(null, arguments); - }); - }; - - - EventEmitter.setDefaultHandler = function(eventName, callback) { - var handlers = this._defaultHandlers - if (!handlers) - handlers = this._defaultHandlers = {_disabled_: {}}; - - if (handlers[eventName]) { - var old = handlers[eventName]; - var disabled = handlers._disabled_[eventName]; - if (!disabled) - handlers._disabled_[eventName] = disabled = []; - disabled.push(old); - var i = disabled.indexOf(callback); - if (i != -1) - disabled.splice(i, 1); - } - handlers[eventName] = callback; - }; - EventEmitter.removeDefaultHandler = function(eventName, callback) { - var handlers = this._defaultHandlers - if (!handlers) - return; - var disabled = handlers._disabled_[eventName]; - - if (handlers[eventName] == callback) { - var old = handlers[eventName]; - if (disabled) - this.setDefaultHandler(eventName, disabled.pop()); - } else if (disabled) { - var i = disabled.indexOf(callback); - if (i != -1) - disabled.splice(i, 1); - } - }; - - EventEmitter.on = - EventEmitter.addEventListener = function(eventName, callback, capturing) { - this._eventRegistry = this._eventRegistry || {}; - - var listeners = this._eventRegistry[eventName]; - if (!listeners) - listeners = this._eventRegistry[eventName] = []; - - if (listeners.indexOf(callback) == -1) - listeners[capturing ? "unshift" : "push"](callback); - return callback; - }; - - EventEmitter.off = - EventEmitter.removeListener = - EventEmitter.removeEventListener = function(eventName, callback) { - this._eventRegistry = this._eventRegistry || {}; - - var listeners = this._eventRegistry[eventName]; - if (!listeners) - return; - - var index = listeners.indexOf(callback); - if (index !== -1) - listeners.splice(index, 1); - }; - - EventEmitter.removeAllListeners = function(eventName) { - if (this._eventRegistry) this._eventRegistry[eventName] = []; - }; - - exports.EventEmitter = EventEmitter; - -}); - -define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { - "use strict"; - - var oop = require("./lib/oop"); - var EventEmitter = require("./lib/event_emitter").EventEmitter; - - var Anchor = exports.Anchor = function(doc, row, column) { - this.$onChange = this.onChange.bind(this); - this.attach(doc); - - if (typeof column == "undefined") - this.setPosition(row.row, row.column); - else - this.setPosition(row, column); - }; - - (function() { - - oop.implement(this, EventEmitter); - this.getPosition = function() { - return this.$clipPositionToDocument(this.row, this.column); - }; - this.getDocument = function() { - return this.document; - }; - this.$insertRight = false; - this.onChange = function(delta) { - if (delta.start.row == delta.end.row && delta.start.row != this.row) - return; - - if (delta.start.row > this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - function $pointsInOrder(point1, point2, equalPointsInOrder) { - var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; - return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); - } - - function $getTransformedPoint(delta, point, moveIfEqual) { - var deltaIsInsert = delta.action == "insert"; - var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); - var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); - var deltaStart = delta.start; - var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. - if ($pointsInOrder(point, deltaStart, moveIfEqual)) { - return { - row: point.row, - column: point.column - }; - } - if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { - return { - row: point.row + deltaRowShift, - column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) - }; - } - - return { - row: deltaStart.row, - column: deltaStart.column - }; - } - this.setPosition = function(row, column, noClip) { - var pos; - if (noClip) { - pos = { - row: row, - column: column - }; - } else { - pos = this.$clipPositionToDocument(row, column); - } - - if (this.row == pos.row && this.column == pos.column) - return; - - var old = { - row: this.row, - column: this.column - }; - - this.row = pos.row; - this.column = pos.column; - this._signal("change", { - old: old, - value: pos - }); - }; - this.detach = function() { - this.document.removeEventListener("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$clipPositionToDocument = function(row, column) { - var pos = {}; - - if (row >= this.document.getLength()) { - pos.row = Math.max(0, this.document.getLength() - 1); - pos.column = this.document.getLine(pos.row).length; - } - else if (row < 0) { - pos.row = 0; - pos.column = 0; - } - else { - pos.row = row; - pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); - } - - if (column < 0) - pos.column = 0; - - return pos; - }; - - }).call(Anchor.prototype); - -}); - -define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { - "use strict"; - var oop = require("./lib/oop"); - var applyDelta = require("./apply_delta").applyDelta; - var EventEmitter = require("./lib/event_emitter").EventEmitter; - var Range = require("./range").Range; - var Anchor = require("./anchor").Anchor; - - var Document = function(textOrLines) { - this.$lines = [""]; - if (textOrLines.length === 0) { - this.$lines = [""]; - } else if (Array.isArray(textOrLines)) { - this.insertMergedLines({row: 0, column: 0}, textOrLines); - } else { - this.insert({row: 0, column:0}, textOrLines); - } - }; - - (function() { - - oop.implement(this, EventEmitter); - this.setValue = function(text) { - var len = this.getLength() - 1; - this.remove(new Range(0, 0, len, this.getLine(len).length)); - this.insert({row: 0, column: 0}, text); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.getLinesForRange = function(range) { - var lines; - if (range.start.row === range.end.row) { - lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; - } else { - lines = this.getLines(range.start.row, range.end.row); - lines[0] = (lines[0] || "").substring(range.start.column); - var l = lines.length - 1; - if (range.end.row - range.start.row == l) - lines[l] = lines[l].substring(0, range.end.column); - } - return lines; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.insertInLine = function(position, text) { - var start = this.clippedPos(position.row, position.column); - var end = this.pos(position.row, position.column + text.length); - - this.applyDelta({ - start: start, - end: end, - action: "insert", - lines: [text] - }, true); - - return this.clonePos(end); - }; - - this.clippedPos = function(row, column) { - var length = this.getLength(); - if (row === undefined) { - row = length; - } else if (row < 0) { - row = 0; - } else if (row >= length) { - row = length - 1; - column = undefined; - } - var line = this.getLine(row); - if (column == undefined) - column = line.length; - column = Math.min(Math.max(column, 0), line.length); - return {row: row, column: column}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$clipPosition = function(position) { - var length = this.getLength(); - if (position.row >= length) { - position.row = Math.max(0, length - 1); - position.column = this.getLine(length - 1).length; - } else { - position.row = Math.max(0, position.row); - position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); - } - return position; - }; - this.insertFullLines = function(row, lines) { - row = Math.min(Math.max(row, 0), this.getLength()); - var column = 0; - if (row < this.getLength()) { - lines = lines.concat([""]); - column = 0; - } else { - lines = [""].concat(lines); - row--; - column = this.$lines[row].length; - } - this.insertMergedLines({row: row, column: column}, lines); - }; - this.insertMergedLines = function(position, lines) { - var start = this.clippedPos(position.row, position.column); - var end = { - row: start.row + lines.length - 1, - column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length - }; - - this.applyDelta({ - start: start, - end: end, - action: "insert", - lines: lines - }); - - return this.clonePos(end); - }; - this.remove = function(range) { - var start = this.clippedPos(range.start.row, range.start.column); - var end = this.clippedPos(range.end.row, range.end.column); - this.applyDelta({ - start: start, - end: end, - action: "remove", - lines: this.getLinesForRange({start: start, end: end}) - }); - return this.clonePos(start); - }; - this.removeInLine = function(row, startColumn, endColumn) { - var start = this.clippedPos(row, startColumn); - var end = this.clippedPos(row, endColumn); - - this.applyDelta({ - start: start, - end: end, - action: "remove", - lines: this.getLinesForRange({start: start, end: end}) - }, true); - - return this.clonePos(start); - }; - this.removeFullLines = function(firstRow, lastRow) { - firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); - lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1); - var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; - var deleteLastNewLine = lastRow < this.getLength() - 1; - var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow ); - var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 ); - var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow ); - var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); - var range = new Range(startRow, startCol, endRow, endCol); - var deletedLines = this.$lines.slice(firstRow, lastRow + 1); - - this.applyDelta({ - start: range.start, - end: range.end, - action: "remove", - lines: this.getLinesForRange(range) - }); - return deletedLines; - }; - this.removeNewLine = function(row) { - if (row < this.getLength() - 1 && row >= 0) { - this.applyDelta({ - start: this.pos(row, this.getLine(row).length), - end: this.pos(row + 1, 0), - action: "remove", - lines: ["", ""] - }); - } - }; - this.replace = function(range, text) { - if (!(range instanceof Range)) - range = Range.fromPoints(range.start, range.end); - if (text.length === 0 && range.isEmpty()) - return range.start; - if (text == this.getTextRange(range)) - return range.end; - - this.remove(range); - var end; - if (text) { - end = this.insert(range.start, text); - } - else { - end = range.start; - } - - return end; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i<deltas.length; i++) { - this.applyDelta(deltas[i]); - } - }; - this.revertDeltas = function(deltas) { - for (var i=deltas.length-1; i>=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.applyDelta = function(delta, doNotValidate) { - var isInsert = delta.action == "insert"; - if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] - : !Range.comparePoints(delta.start, delta.end)) { - return; - } - - if (isInsert && delta.lines.length > 20000) - this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); - }; - - this.$splitAndapplyLargeDelta = function(delta, MAX) { - var lines = delta.lines; - var l = lines.length; - var row = delta.start.row; - var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; - to += MAX - 1; - var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } - chunk.push(""); - this.applyDelta({ - start: this.pos(row + from, column), - end: this.pos(row + to, column = 0), - action: delta.action, - lines: chunk - }, true); - } while(true); - }; - this.revertDelta = function(delta) { - this.applyDelta({ - start: this.clonePos(delta.start), - end: this.clonePos(delta.end), - action: (delta.action == "insert" ? "remove" : "insert"), - lines: delta.lines.slice() - }); - }; - this.indexToPosition = function(index, startRow) { - var lines = this.$lines || this.getAllLines(); - var newlineLength = this.getNewLineCharacter().length; - for (var i = startRow || 0, l = lines.length; i < l; i++) { - index -= lines[i].length + newlineLength; - if (index < 0) - return {row: i, column: index + lines[i].length + newlineLength}; - } - return {row: l-1, column: lines[l-1].length}; - }; - this.positionToIndex = function(pos, startRow) { - var lines = this.$lines || this.getAllLines(); - var newlineLength = this.getNewLineCharacter().length; - var index = 0; - var row = Math.min(pos.row, lines.length); - for (var i = startRow || 0; i < row; ++i) - index += lines[i].length + newlineLength; - - return index + pos.column; - }; - - }).call(Document.prototype); - - exports.Document = Document; - }); - - define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { - "use strict"; - - exports.last = function(a) { - return a[a.length - 1]; - }; - - exports.stringReverse = function(string) { - return string.split("").reverse().join(""); - }; - - exports.stringRepeat = function (string, count) { - var result = ''; - while (count > 0) { - if (count & 1) - result += string; - - if (count >>= 1) - string += string; - } - return result; - }; - - var trimBeginRegexp = /^\s\s*/; - var trimEndRegexp = /\s\s*$/; - - exports.stringTrimLeft = function (string) { - return string.replace(trimBeginRegexp, ''); - }; - - exports.stringTrimRight = function (string) { - return string.replace(trimEndRegexp, ''); - }; - - exports.copyObject = function(obj) { - var copy = {}; - for (var key in obj) { - copy[key] = obj[key]; - } - return copy; - }; - - exports.copyArray = function(array){ - var copy = []; - for (var i=0, l=array.length; i<l; i++) { - if (array[i] && typeof array[i] == "object") - copy[i] = this.copyObject(array[i]); - else - copy[i] = array[i]; - } - return copy; - }; - - exports.deepCopy = function deepCopy(obj) { - if (typeof obj !== "object" || !obj) - return obj; - var copy; - if (Array.isArray(obj)) { - copy = []; - for (var key = 0; key < obj.length; key++) { - copy[key] = deepCopy(obj[key]); - } - return copy; - } - if (Object.prototype.toString.call(obj) !== "[object Object]") - return obj; - - copy = {}; - for (var key in obj) - copy[key] = deepCopy(obj[key]); - return copy; - }; - - exports.arrayToMap = function(arr) { - var map = {}; - for (var i=0; i<arr.length; i++) { - map[arr[i]] = 1; - } - return map; - - }; - - exports.createMap = function(props) { - var map = Object.create(null); - for (var i in props) { - map[i] = props[i]; - } - return map; - }; - exports.arrayRemove = function(array, value) { - for (var i = 0; i <= array.length; i++) { - if (value === array[i]) { - array.splice(i, 1); - } - } - }; - - exports.escapeRegExp = function(str) { - return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1'); - }; - - exports.escapeHTML = function(str) { - return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;"); - }; - - exports.getMatchOffsets = function(string, regExp) { - var matches = []; - - string.replace(regExp, function(str) { - matches.push({ - offset: arguments[arguments.length-2], - length: str.length - }); - }); - - return matches; - }; - exports.deferredCall = function(fcn) { - var timer = null; - var callback = function() { - timer = null; - fcn(); - }; - - var deferred = function(timeout) { - deferred.cancel(); - timer = setTimeout(callback, timeout || 0); - return deferred; - }; - - deferred.schedule = deferred; - - deferred.call = function() { - this.cancel(); - fcn(); - return deferred; - }; - - deferred.cancel = function() { - clearTimeout(timer); - timer = null; - return deferred; - }; - - deferred.isPending = function() { - return timer; - }; - - return deferred; - }; - - - exports.delayedCall = function(fcn, defaultTimeout) { - var timer = null; - var callback = function() { - timer = null; - fcn(); - }; - - var _self = function(timeout) { - if (timer == null) - timer = setTimeout(callback, timeout || defaultTimeout); - }; - - _self.delay = function(timeout) { - timer && clearTimeout(timer); - timer = setTimeout(callback, timeout || defaultTimeout); - }; - _self.schedule = _self; - - _self.call = function() { - this.cancel(); - fcn(); - }; - - _self.cancel = function() { - timer && clearTimeout(timer); - timer = null; - }; - - _self.isPending = function() { - return timer; - }; - - return _self; - }; - }); - - define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) { - "use strict"; - - var Range = require("../range").Range; - var Document = require("../document").Document; - var lang = require("../lib/lang"); - - var Mirror = exports.Mirror = function(sender) { - this.sender = sender; - var doc = this.doc = new Document(""); - - var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); - - var _self = this; - sender.on("change", function(e) { - var data = e.data; - if (data[0].start) { - doc.applyDeltas(data); - } else { - for (var i = 0; i < data.length; i += 2) { - if (Array.isArray(data[i+1])) { - var d = {action: "insert", start: data[i], lines: data[i+1]}; - } else { - var d = {action: "remove", start: data[i], end: data[i+1]}; - } - doc.applyDelta(d, true); - } - } - if (_self.$timeout) - return deferredUpdate.schedule(_self.$timeout); - _self.onUpdate(); - }); - }; - - (function() { - - this.$timeout = 500; - - this.setTimeout = function(timeout) { - this.$timeout = timeout; - }; - - this.setValue = function(value) { - this.doc.setValue(value); - this.deferredUpdate.schedule(this.$timeout); - }; - - this.getValue = function(callbackId) { - this.sender.callback(this.doc.getValue(), callbackId); - }; - - this.onUpdate = function() { - }; - - this.isPending = function() { - return this.deferredUpdate.isPending(); - }; - - }).call(Mirror.prototype); - - }); - - define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { - - function Empty() {} - - if (!Function.prototype.bind) { - Function.prototype.bind = function bind(that) { // .length is 1 - var target = this; - if (typeof target != "function") { - throw new TypeError("Function.prototype.bind called on incompatible " + target); - } - var args = slice.call(arguments, 1); // for normal call - var bound = function () { - - if (this instanceof bound) { - - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - - } - - }; - if(target.prototype) { - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - return bound; - }; - } - var call = Function.prototype.call; - var prototypeOfArray = Array.prototype; - var prototypeOfObject = Object.prototype; - var slice = prototypeOfArray.slice; - var _toString = call.bind(prototypeOfObject.toString); - var owns = call.bind(prototypeOfObject.hasOwnProperty); - var defineGetter; - var defineSetter; - var lookupGetter; - var lookupSetter; - var supportsAccessors; - if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { - defineGetter = call.bind(prototypeOfObject.__defineGetter__); - defineSetter = call.bind(prototypeOfObject.__defineSetter__); - lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); - lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); - } - if ([1,2].splice(0).length != 2) { - if(function() { // test IE < 9 to splice bug - see issue #138 - function makeArray(l) { - var a = new Array(l+2); - a[0] = a[1] = 0; - return a; - } - var array = [], lengthBefore; - - array.splice.apply(array, makeArray(20)); - array.splice.apply(array, makeArray(26)); - - lengthBefore = array.length; //46 - array.splice(5, 0, "XXX"); // add one element - - lengthBefore + 1 == array.length - - if (lengthBefore + 1 == array.length) { - return true;// has right splice implementation without bugs - } - }()) {//IE 6/7 - var array_splice = Array.prototype.splice; - Array.prototype.splice = function(start, deleteCount) { - if (!arguments.length) { - return []; - } else { - return array_splice.apply(this, [ - start === void 0 ? 0 : start, - deleteCount === void 0 ? (this.length - start) : deleteCount - ].concat(slice.call(arguments, 2))) - } - }; - } else {//IE8 - Array.prototype.splice = function(pos, removeCount){ - var length = this.length; - if (pos > 0) { - if (pos > length) - pos = length; - } else if (pos == void 0) { - pos = 0; - } else if (pos < 0) { - pos = Math.max(length + pos, 0); - } - - if (!(pos+removeCount < length)) - removeCount = length - pos; - - var removed = this.slice(pos, pos+removeCount); - var insert = slice.call(arguments, 2); - var add = insert.length; - if (pos === length) { - if (add) { - this.push.apply(this, insert); - } - } else { - var remove = Math.min(removeCount, length - pos); - var tailOldPos = pos + remove; - var tailNewPos = tailOldPos + add - remove; - var tailCount = length - tailOldPos; - var lengthAfterRemove = length - remove; - - if (tailNewPos < tailOldPos) { // case A - for (var i = 0; i < tailCount; ++i) { - this[tailNewPos+i] = this[tailOldPos+i]; - } - } else if (tailNewPos > tailOldPos) { // case B - for (i = tailCount; i--; ) { - this[tailNewPos+i] = this[tailOldPos+i]; - } - } // else, add == remove (nothing to do) - - if (add && pos === lengthAfterRemove) { - this.length = lengthAfterRemove; // truncate array - this.push.apply(this, insert); - } else { - this.length = lengthAfterRemove + add; // reserves space - for (i = 0; i < add; ++i) { - this[pos+i] = insert[i]; - } - } - } - return removed; - }; - } - } - if (!Array.isArray) { - Array.isArray = function isArray(obj) { - return _toString(obj) == "[object Array]"; - }; - } - var boxedString = Object("a"), - splitString = boxedString[0] != "a" || !(0 in boxedString); - - if (!Array.prototype.forEach) { - Array.prototype.forEach = function forEach(fun /*, thisp*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - thisp = arguments[1], - i = -1, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(); // TODO message - } - - while (++i < length) { - if (i in self) { - fun.call(thisp, self[i], i, object); - } - } - }; - } - if (!Array.prototype.map) { - Array.prototype.map = function map(fun /*, thisp*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - result = Array(length), - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self) - result[i] = fun.call(thisp, self[i], i, object); - } - return result; - }; - } - if (!Array.prototype.filter) { - Array.prototype.filter = function filter(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - result = [], - value, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self) { - value = self[i]; - if (fun.call(thisp, value, i, object)) { - result.push(value); - } - } - } - return result; - }; - } - if (!Array.prototype.every) { - Array.prototype.every = function every(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self && !fun.call(thisp, self[i], i, object)) { - return false; - } - } - return true; - }; - } - if (!Array.prototype.some) { - Array.prototype.some = function some(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self && fun.call(thisp, self[i], i, object)) { - return true; - } - } - return false; - }; - } - if (!Array.prototype.reduce) { - Array.prototype.reduce = function reduce(fun /*, initial*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - if (!length && arguments.length == 1) { - throw new TypeError("reduce of empty array with no initial value"); - } - - var i = 0; - var result; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i++]; - break; - } - if (++i >= length) { - throw new TypeError("reduce of empty array with no initial value"); - } - } while (true); - } - - for (; i < length; i++) { - if (i in self) { - result = fun.call(void 0, result, self[i], i, object); - } - } - - return result; - }; - } - if (!Array.prototype.reduceRight) { - Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - if (!length && arguments.length == 1) { - throw new TypeError("reduceRight of empty array with no initial value"); - } - - var result, i = length - 1; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i--]; - break; - } - if (--i < 0) { - throw new TypeError("reduceRight of empty array with no initial value"); - } - } while (true); - } - - do { - if (i in this) { - result = fun.call(void 0, result, self[i], i, object); - } - } while (i--); - - return result; - }; - } - if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { - Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { - var self = splitString && _toString(this) == "[object String]" ? - this.split("") : - toObject(this), - length = self.length >>> 0; - - if (!length) { - return -1; - } - - var i = 0; - if (arguments.length > 1) { - i = toInteger(arguments[1]); - } - i = i >= 0 ? i : Math.max(0, length + i); - for (; i < length; i++) { - if (i in self && self[i] === sought) { - return i; - } - } - return -1; - }; - } - if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { - Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { - var self = splitString && _toString(this) == "[object String]" ? - this.split("") : - toObject(this), - length = self.length >>> 0; - - if (!length) { - return -1; - } - var i = length - 1; - if (arguments.length > 1) { - i = Math.min(i, toInteger(arguments[1])); - } - i = i >= 0 ? i : length - Math.abs(i); - for (; i >= 0; i--) { - if (i in self && sought === self[i]) { - return i; - } - } - return -1; - }; - } - if (!Object.getPrototypeOf) { - Object.getPrototypeOf = function getPrototypeOf(object) { - return object.__proto__ || ( - object.constructor ? - object.constructor.prototype : - prototypeOfObject - ); - }; - } - if (!Object.getOwnPropertyDescriptor) { - var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + - "non-object: "; - Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { - if ((typeof object != "object" && typeof object != "function") || object === null) - throw new TypeError(ERR_NON_OBJECT + object); - if (!owns(object, property)) - return; - - var descriptor, getter, setter; - descriptor = { enumerable: true, configurable: true }; - if (supportsAccessors) { - var prototype = object.__proto__; - object.__proto__ = prototypeOfObject; - - var getter = lookupGetter(object, property); - var setter = lookupSetter(object, property); - object.__proto__ = prototype; - - if (getter || setter) { - if (getter) descriptor.get = getter; - if (setter) descriptor.set = setter; - return descriptor; - } - } - descriptor.value = object[property]; - return descriptor; - }; - } - if (!Object.getOwnPropertyNames) { - Object.getOwnPropertyNames = function getOwnPropertyNames(object) { - return Object.keys(object); - }; - } - if (!Object.create) { - var createEmpty; - if (Object.prototype.__proto__ === null) { - createEmpty = function () { - return { "__proto__": null }; - }; - } else { - createEmpty = function () { - var empty = {}; - for (var i in empty) - empty[i] = null; - empty.constructor = - empty.hasOwnProperty = - empty.propertyIsEnumerable = - empty.isPrototypeOf = - empty.toLocaleString = - empty.toString = - empty.valueOf = - empty.__proto__ = null; - return empty; - } - } - - Object.create = function create(prototype, properties) { - var object; - if (prototype === null) { - object = createEmpty(); - } else { - if (typeof prototype != "object") - throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); - var Type = function () {}; - Type.prototype = prototype; - object = new Type(); - object.__proto__ = prototype; - } - if (properties !== void 0) - Object.defineProperties(object, properties); - return object; - }; - } - - function doesDefinePropertyWork(object) { - try { - Object.defineProperty(object, "sentinel", {}); - return "sentinel" in object; - } catch (exception) { - } - } - if (Object.defineProperty) { - var definePropertyWorksOnObject = doesDefinePropertyWork({}); - var definePropertyWorksOnDom = typeof document == "undefined" || - doesDefinePropertyWork(document.createElement("div")); - if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { - var definePropertyFallback = Object.defineProperty; - } - } - - if (!Object.defineProperty || definePropertyFallback) { - var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; - var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " - var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + - "on this javascript engine"; - - Object.defineProperty = function defineProperty(object, property, descriptor) { - if ((typeof object != "object" && typeof object != "function") || object === null) - throw new TypeError(ERR_NON_OBJECT_TARGET + object); - if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) - throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); - if (definePropertyFallback) { - try { - return definePropertyFallback.call(Object, object, property, descriptor); - } catch (exception) { - } - } - if (owns(descriptor, "value")) { - - if (supportsAccessors && (lookupGetter(object, property) || - lookupSetter(object, property))) - { - var prototype = object.__proto__; - object.__proto__ = prototypeOfObject; - delete object[property]; - object[property] = descriptor.value; - object.__proto__ = prototype; - } else { - object[property] = descriptor.value; - } - } else { - if (!supportsAccessors) - throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); - if (owns(descriptor, "get")) - defineGetter(object, property, descriptor.get); - if (owns(descriptor, "set")) - defineSetter(object, property, descriptor.set); - } - - return object; - }; - } - if (!Object.defineProperties) { - Object.defineProperties = function defineProperties(object, properties) { - for (var property in properties) { - if (owns(properties, property)) - Object.defineProperty(object, property, properties[property]); - } - return object; - }; - } - if (!Object.seal) { - Object.seal = function seal(object) { - return object; - }; - } - if (!Object.freeze) { - Object.freeze = function freeze(object) { - return object; - }; - } - try { - Object.freeze(function () {}); - } catch (exception) { - Object.freeze = (function freeze(freezeObject) { - return function freeze(object) { - if (typeof object == "function") { - return object; - } else { - return freezeObject(object); - } - }; - })(Object.freeze); - } - if (!Object.preventExtensions) { - Object.preventExtensions = function preventExtensions(object) { - return object; - }; - } - if (!Object.isSealed) { - Object.isSealed = function isSealed(object) { - return false; - }; - } - if (!Object.isFrozen) { - Object.isFrozen = function isFrozen(object) { - return false; - }; - } - if (!Object.isExtensible) { - Object.isExtensible = function isExtensible(object) { - if (Object(object) === object) { - throw new TypeError(); // TODO message - } - var name = ''; - while (owns(object, name)) { - name += '?'; - } - object[name] = true; - var returnValue = owns(object, name); - delete object[name]; - return returnValue; - }; - } - if (!Object.keys) { - var hasDontEnumBug = true, - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - dontEnumsLength = dontEnums.length; - - for (var key in {"toString": null}) { - hasDontEnumBug = false; - } - - Object.keys = function keys(object) { - - if ( - (typeof object != "object" && typeof object != "function") || - object === null - ) { - throw new TypeError("Object.keys called on a non-object"); - } - - var keys = []; - for (var name in object) { - if (owns(object, name)) { - keys.push(name); - } - } - - if (hasDontEnumBug) { - for (var i = 0, ii = dontEnumsLength; i < ii; i++) { - var dontEnum = dontEnums[i]; - if (owns(object, dontEnum)) { - keys.push(dontEnum); - } - } - } - return keys; - }; - - } - if (!Date.now) { - Date.now = function now() { - return new Date().getTime(); - }; - } - var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + - "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + - "\u2029\uFEFF"; - if (!String.prototype.trim || ws.trim()) { - ws = "[" + ws + "]"; - var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), - trimEndRegexp = new RegExp(ws + ws + "*$"); - String.prototype.trim = function trim() { - return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); - }; - } - - function toInteger(n) { - n = +n; - if (n !== n) { // isNaN - n = 0; - } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { - n = (n > 0 || -1) * Math.floor(Math.abs(n)); - } - return n; - } - - function isPrimitive(input) { - var type = typeof input; - return ( - input === null || - type === "undefined" || - type === "boolean" || - type === "number" || - type === "string" - ); - } - - function toPrimitive(input) { - var val, valueOf, toString; - if (isPrimitive(input)) { - return input; - } - valueOf = input.valueOf; - if (typeof valueOf === "function") { - val = valueOf.call(input); - if (isPrimitive(val)) { - return val; - } - } - toString = input.toString; - if (typeof toString === "function") { - val = toString.call(input); - if (isPrimitive(val)) { - return val; - } - } - throw new TypeError(); - } - var toObject = function (o) { - if (o == null) { // this matches both null and undefined - throw new TypeError("can't convert "+o+" to object"); - } - return Object(o); - }; - - }); - define("ace/mode/jsonata_worker",["require","exports","ace/lib/oop","ace/worker/mirror"], function(require, exports) { - var oop = require("../lib/oop"); - var Mirror = require("../worker/mirror").Mirror; - - var JSONataWorker = exports.JSONataWorker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(200); - }; - - oop.inherits(JSONataWorker, Mirror); - - (function() { - - this.onUpdate = function() { - var value = this.doc.getValue(); - var errors = []; - try { - if (value) { - jsonata(value); - } - } catch (e) { - var pos = this.doc.indexToPosition(e.position-1); - var msg = e.message; - msg = msg.replace(/ at column \d+/,""); - errors.push({ - row: pos.row, - column: pos.column, - text: msg, - type: "error" - }); - } - this.sender.emit("annotate", errors); - }; - - }).call(JSONataWorker.prototype); - - }); diff --git a/packages/node_modules/@node-red/editor/public/vendor/bootstrap/css/bootstrap.min.css b/packages/node_modules/@node-red/editor/public/vendor/bootstrap/css/bootstrap.min.css deleted file mode 100644 index cd53d320e..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/bootstrap/css/bootstrap.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap v2.3.2 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}body{margin:0;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:14px;line-height:20px;color:#333333;background-color:#ffffff}a{color:#0088cc;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eeeeee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}.pre-scrollable{max-height:340px;overflow-y:scroll}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #dddddd}.table .table{background-color:#ffffff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#ffffff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#cccccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#ffffff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:linear-gradient(to bottom, #fff, #e6e6e6);background-repeat:repeat-x;border:1px solid #cccccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#cccccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#0044cc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;border-color:#0044cc #0044cc #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#0044cc;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#003399 \9}.btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222222;background-image:-moz-linear-gradient(top, #444, #222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444), to(#222));background-image:-webkit-linear-gradient(top, #444, #222);background-image:-o-linear-gradient(top, #444, #222);background-image:linear-gradient(to bottom, #444, #222);background-repeat:repeat-x;border-color:#222222 #222222 #000000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#0088cc;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#0088cc}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #dddddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555555;cursor:default;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#ffffff;background-color:#0088cc}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#0088cc;border-bottom-color:#0088cc}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#ffffff;background-color:#999999;border-color:#999999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eeeeee #dddddd #eeeeee #eeeeee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #eeeeee #dddddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff}.nav>.disabled>a{color:#999999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #fff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #fff, #f2f2f2);background-image:-o-linear-gradient(top, #fff, #f2f2f2);background-image:linear-gradient(to bottom, #fff, #f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777777;text-shadow:0 1px 0 #ffffff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777777}.navbar-link{color:#777777}.navbar-link:hover,.navbar-link:focus{color:#333333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #ffffff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #ffffff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #ffffff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333333;border-bottom-color:#333333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222, #111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222), to(#111));background-image:-webkit-linear-gradient(top, #222, #111);background-image:-o-linear-gradient(top, #222, #111);background-image:linear-gradient(to bottom, #222, #111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#ffffff}.navbar-inverse .brand{color:#999999}.navbar-inverse .navbar-text{color:#999999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#ffffff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111}.navbar-inverse .navbar-link{color:#999999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#ffffff}.navbar-inverse .divider-vertical{border-right-color:#222222;border-left-color:#111111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#ffffff;background-color:#111111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff}.navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;border-color:#040404 #040404 #000000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#ffffff;background-color:#040404;*background-color:#000000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #ffffff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:none;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity 0.3s linear, top 0.3s ease-out;-moz-transition:opacity 0.3s linear, top 0.3s ease-out;-o-transition:opacity 0.3s linear, top 0.3s ease-out;transition:opacity 0.3s linear, top 0.3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:0.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#ffffff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#ffffff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#ffffff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#ffffff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#ffffff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#ffffff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(to bottom, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(to bottom, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(to bottom, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#ffffff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/packages/node_modules/@node-red/editor/public/vendor/bootstrap/img/glyphicons-halflings-white.png b/packages/node_modules/@node-red/editor/public/vendor/bootstrap/img/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484a2..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/bootstrap/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/bootstrap/img/glyphicons-halflings.png b/packages/node_modules/@node-red/editor/public/vendor/bootstrap/img/glyphicons-halflings.png deleted file mode 100644 index a99699932..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/bootstrap/img/glyphicons-halflings.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/css/font-awesome.min.css b/packages/node_modules/@node-red/editor/public/vendor/font-awesome/css/font-awesome.min.css deleted file mode 100644 index 540440ce8..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/css/font-awesome.min.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/FontAwesome.otf b/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/FontAwesome.otf deleted file mode 100644 index 401ec0f36..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/FontAwesome.otf and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.eot b/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.eot deleted file mode 100644 index e9f60ca95..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.svg b/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.svg deleted file mode 100644 index 855c845e5..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,2671 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg> -<metadata> -Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 - By ,,, -Copyright Dave Gandy 2016. All rights reserved. -</metadata> -<defs> -<font id="FontAwesome" horiz-adv-x="1536" > - <font-face - font-family="FontAwesome" - font-weight="400" - font-stretch="normal" - units-per-em="1792" - panose-1="0 0 0 0 0 0 0 0 0 0" - ascent="1536" - descent="-256" - bbox="-1.02083 -256.962 2304.6 1537.02" - underline-thickness="0" - underline-position="0" - unicode-range="U+0020-F500" - /> -<missing-glyph horiz-adv-x="896" -d="M224 112h448v1312h-448v-1312zM112 0v1536h672v-1536h-672z" /> - <glyph glyph-name=".notdef" horiz-adv-x="896" -d="M224 112h448v1312h-448v-1312zM112 0v1536h672v-1536h-672z" /> - <glyph glyph-name=".null" horiz-adv-x="0" - /> - <glyph glyph-name="nonmarkingreturn" horiz-adv-x="597" - /> - <glyph glyph-name="space" unicode=" " horiz-adv-x="448" - /> - <glyph glyph-name="dieresis" unicode="&#xa8;" horiz-adv-x="1792" - /> - <glyph glyph-name="copyright" unicode="&#xa9;" horiz-adv-x="1792" - /> - <glyph glyph-name="registered" unicode="&#xae;" horiz-adv-x="1792" - /> - <glyph glyph-name="acute" unicode="&#xb4;" horiz-adv-x="1792" - /> - <glyph glyph-name="AE" unicode="&#xc6;" horiz-adv-x="1792" - /> - <glyph glyph-name="Oslash" unicode="&#xd8;" horiz-adv-x="1792" - /> - <glyph glyph-name="trademark" unicode="&#x2122;" horiz-adv-x="1792" - /> - <glyph glyph-name="infinity" unicode="&#x221e;" horiz-adv-x="1792" - /> - <glyph glyph-name="notequal" unicode="&#x2260;" horiz-adv-x="1792" - /> - <glyph glyph-name="glass" unicode="&#xf000;" horiz-adv-x="1792" -d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" /> - <glyph glyph-name="music" unicode="&#xf001;" -d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 -t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" /> - <glyph glyph-name="search" unicode="&#xf002;" horiz-adv-x="1664" -d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 -t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" /> - <glyph glyph-name="envelope" unicode="&#xf003;" horiz-adv-x="1792" -d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 -t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z -M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" /> - <glyph glyph-name="heart" unicode="&#xf004;" horiz-adv-x="1792" -d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 -q-18 -18 -44 -18z" /> - <glyph glyph-name="star" unicode="&#xf005;" horiz-adv-x="1664" -d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 -l502 -73q56 -9 56 -46z" /> - <glyph glyph-name="star_empty" unicode="&#xf006;" horiz-adv-x="1664" -d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 -l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" /> - <glyph glyph-name="user" unicode="&#xf007;" horiz-adv-x="1280" -d="M1280 137q0 -109 -62.5 -187t-150.5 -78h-854q-88 0 -150.5 78t-62.5 187q0 85 8.5 160.5t31.5 152t58.5 131t94 89t134.5 34.5q131 -128 313 -128t313 128q76 0 134.5 -34.5t94 -89t58.5 -131t31.5 -152t8.5 -160.5zM1024 1024q0 -159 -112.5 -271.5t-271.5 -112.5 -t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" /> - <glyph glyph-name="film" unicode="&#xf008;" horiz-adv-x="1920" -d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 -q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 -t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 -q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 -t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> - <glyph glyph-name="th_large" unicode="&#xf009;" horiz-adv-x="1664" -d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 -h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" /> - <glyph glyph-name="th" unicode="&#xf00a;" horiz-adv-x="1792" -d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 -q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 -h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 -q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" /> - <glyph glyph-name="th_list" unicode="&#xf00b;" horiz-adv-x="1792" -d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 -q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 -h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" /> - <glyph glyph-name="ok" unicode="&#xf00c;" horiz-adv-x="1792" -d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" /> - <glyph glyph-name="remove" unicode="&#xf00d;" horiz-adv-x="1408" -d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 -t-28 -68l-294 -294l294 -294q28 -28 28 -68z" /> - <glyph glyph-name="zoom_in" unicode="&#xf00e;" horiz-adv-x="1664" -d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 -q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 -t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" /> - <glyph glyph-name="zoom_out" unicode="&#xf010;" horiz-adv-x="1664" -d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z -M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z -" /> - <glyph glyph-name="off" unicode="&#xf011;" -d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 -t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" /> - <glyph glyph-name="signal" unicode="&#xf012;" horiz-adv-x="1792" -d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 -v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" /> - <glyph glyph-name="cog" unicode="&#xf013;" -d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 -q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 -l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 -q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" /> - <glyph glyph-name="trash" unicode="&#xf014;" horiz-adv-x="1408" -d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 -q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 -q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" /> - <glyph glyph-name="home" unicode="&#xf015;" horiz-adv-x="1664" -d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 -l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" /> - <glyph glyph-name="file_alt" unicode="&#xf016;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -" /> - <glyph glyph-name="time" unicode="&#xf017;" -d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="road" unicode="&#xf018;" horiz-adv-x="1920" -d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 -q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" /> - <glyph glyph-name="download_alt" unicode="&#xf019;" horiz-adv-x="1664" -d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 -q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" /> - <glyph glyph-name="download" unicode="&#xf01a;" -d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 -t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="upload" unicode="&#xf01b;" -d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 -t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="inbox" unicode="&#xf01c;" -d="M1023 576h316q-1 3 -2.5 8.5t-2.5 7.5l-212 496h-708l-212 -496q-1 -3 -2.5 -8.5t-2.5 -7.5h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 -q25 -61 25 -123z" /> - <glyph glyph-name="play_circle" unicode="&#xf01d;" -d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="repeat" unicode="&#xf01e;" -d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q15 0 25 -9 -l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" /> - <glyph glyph-name="refresh" unicode="&#xf021;" -d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 -q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 -q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" /> - <glyph glyph-name="list_alt" unicode="&#xf022;" horiz-adv-x="1792" -d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z -M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 -t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 -t47 -113z" /> - <glyph glyph-name="lock" unicode="&#xf023;" horiz-adv-x="1152" -d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" /> - <glyph glyph-name="flag" unicode="&#xf024;" horiz-adv-x="1792" -d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 -t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" /> - <glyph glyph-name="headphones" unicode="&#xf025;" horiz-adv-x="1664" -d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 -t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 -t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" /> - <glyph glyph-name="volume_off" unicode="&#xf026;" horiz-adv-x="768" -d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" /> - <glyph glyph-name="volume_down" unicode="&#xf027;" horiz-adv-x="1152" -d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 36 -t12 56.5t-12 56.5t-29 36t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" /> - <glyph glyph-name="volume_up" unicode="&#xf028;" horiz-adv-x="1664" -d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 36 -t12 56.5t-12 56.5t-29 36t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 -t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 -t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" /> - <glyph glyph-name="qrcode" unicode="&#xf029;" horiz-adv-x="1408" -d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z -M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" /> - <glyph glyph-name="barcode" unicode="&#xf02a;" horiz-adv-x="1792" -d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z -M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" /> - <glyph glyph-name="tag" unicode="&#xf02b;" -d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 -l715 -714q37 -39 37 -91z" /> - <glyph glyph-name="tags" unicode="&#xf02c;" horiz-adv-x="1920" -d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 -l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" /> - <glyph glyph-name="book" unicode="&#xf02d;" horiz-adv-x="1664" -d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 -q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 -q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 -t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" /> - <glyph glyph-name="bookmark" unicode="&#xf02e;" horiz-adv-x="1280" -d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" /> - <glyph glyph-name="print" unicode="&#xf02f;" horiz-adv-x="1664" -d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 -v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" /> - <glyph glyph-name="camera" unicode="&#xf030;" horiz-adv-x="1920" -d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 -q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="font" unicode="&#xf031;" horiz-adv-x="1664" -d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 -q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -5 -0.5 -13.5t-0.5 -12.5q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 -q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" /> - <glyph glyph-name="bold" unicode="&#xf032;" horiz-adv-x="1408" -d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 -q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 -t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68 -0.5t68 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 -t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" /> - <glyph glyph-name="italic" unicode="&#xf033;" horiz-adv-x="1024" -d="M0 -126l17 85q22 7 61.5 16.5t72 19t59.5 23.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 -q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" /> - <glyph glyph-name="text_height" unicode="&#xf034;" horiz-adv-x="1792" -d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 -t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 -q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 -q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" /> - <glyph glyph-name="text_width" unicode="&#xf035;" -d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 -t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 -q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 -t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49 -t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" /> - <glyph glyph-name="align_left" unicode="&#xf036;" horiz-adv-x="1792" -d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 -t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> - <glyph glyph-name="align_center" unicode="&#xf037;" horiz-adv-x="1792" -d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 -h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" /> - <glyph glyph-name="align_right" unicode="&#xf038;" horiz-adv-x="1792" -d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 -t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> - <glyph glyph-name="align_justify" unicode="&#xf039;" horiz-adv-x="1792" -d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 -t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" /> - <glyph glyph-name="list" unicode="&#xf03a;" horiz-adv-x="1792" -d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 -t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 -q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 -t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 -q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" /> - <glyph glyph-name="indent_left" unicode="&#xf03b;" horiz-adv-x="1792" -d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 -t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 -q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" /> - <glyph glyph-name="indent_right" unicode="&#xf03c;" horiz-adv-x="1792" -d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 -t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 -q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" /> - <glyph glyph-name="facetime_video" unicode="&#xf03d;" horiz-adv-x="1792" -d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 -q39 -17 39 -59z" /> - <glyph glyph-name="picture" unicode="&#xf03e;" horiz-adv-x="1920" -d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 -q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> - <glyph glyph-name="pencil" unicode="&#xf040;" -d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 -q53 0 91 -38l235 -234q37 -39 37 -91z" /> - <glyph glyph-name="map_marker" unicode="&#xf041;" horiz-adv-x="1024" -d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" /> - <glyph glyph-name="adjust" unicode="&#xf042;" -d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="tint" unicode="&#xf043;" horiz-adv-x="1024" -d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 -q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" /> - <glyph glyph-name="edit" unicode="&#xf044;" horiz-adv-x="1792" -d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 -q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 -l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" /> - <glyph glyph-name="share" unicode="&#xf045;" horiz-adv-x="1664" -d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 -q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 -t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" /> - <glyph glyph-name="check" unicode="&#xf046;" horiz-adv-x="1664" -d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 -q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 -q24 -24 24 -57t-24 -57z" /> - <glyph glyph-name="move" unicode="&#xf047;" horiz-adv-x="1792" -d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 -t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" /> - <glyph glyph-name="step_backward" unicode="&#xf048;" horiz-adv-x="1024" -d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 10 13 19z" /> - <glyph glyph-name="fast_backward" unicode="&#xf049;" horiz-adv-x="1792" -d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 10 13 19l710 710 -q19 19 32 13t13 -32v-710q4 10 13 19z" /> - <glyph glyph-name="backward" unicode="&#xf04a;" horiz-adv-x="1664" -d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q4 10 13 19z" /> - <glyph glyph-name="play" unicode="&#xf04b;" horiz-adv-x="1408" -d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" /> - <glyph glyph-name="pause" unicode="&#xf04c;" -d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" /> - <glyph glyph-name="stop" unicode="&#xf04d;" -d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" /> - <glyph glyph-name="forward" unicode="&#xf04e;" horiz-adv-x="1664" -d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q9 -9 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-4 -10 -13 -19z" /> - <glyph glyph-name="fast_forward" unicode="&#xf050;" horiz-adv-x="1792" -d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q9 -9 13 -19v710q0 26 13 32t32 -13l710 -710q9 -9 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-4 -10 -13 -19l-710 -710 -q-19 -19 -32 -13t-13 32v710q-4 -10 -13 -19z" /> - <glyph glyph-name="step_forward" unicode="&#xf051;" horiz-adv-x="1024" -d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q9 -9 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-4 -10 -13 -19z" /> - <glyph glyph-name="eject" unicode="&#xf052;" horiz-adv-x="1538" -d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" /> - <glyph glyph-name="chevron_left" unicode="&#xf053;" horiz-adv-x="1280" -d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" /> - <glyph glyph-name="chevron_right" unicode="&#xf054;" horiz-adv-x="1280" -d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" /> - <glyph glyph-name="plus_sign" unicode="&#xf055;" -d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 -t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="minus_sign" unicode="&#xf056;" -d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 -t103 -385.5z" /> - <glyph glyph-name="remove_sign" unicode="&#xf057;" -d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 -q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="ok_sign" unicode="&#xf058;" -d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 -t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="question_sign" unicode="&#xf059;" -d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 -q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 -t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="info_sign" unicode="&#xf05a;" -d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 -t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="screenshot" unicode="&#xf05b;" -d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 -q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 -q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" /> - <glyph glyph-name="remove_circle" unicode="&#xf05c;" -d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 -l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 -t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="ok_circle" unicode="&#xf05d;" -d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 -t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="ban_circle" unicode="&#xf05e;" -d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 -t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" /> - <glyph glyph-name="arrow_left" unicode="&#xf060;" -d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 -t32.5 -90.5z" /> - <glyph glyph-name="arrow_right" unicode="&#xf061;" -d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" /> - <glyph glyph-name="arrow_up" unicode="&#xf062;" horiz-adv-x="1664" -d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 -q37 -39 37 -91z" /> - <glyph glyph-name="arrow_down" unicode="&#xf063;" horiz-adv-x="1664" -d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" /> - <glyph glyph-name="share_alt" unicode="&#xf064;" horiz-adv-x="1792" -d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 -t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" /> - <glyph glyph-name="resize_full" unicode="&#xf065;" -d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 -q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" /> - <glyph glyph-name="resize_small" unicode="&#xf066;" -d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 -t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" /> - <glyph glyph-name="plus" unicode="&#xf067;" horiz-adv-x="1408" -d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" /> - <glyph glyph-name="minus" unicode="&#xf068;" horiz-adv-x="1408" -d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" /> - <glyph glyph-name="asterisk" unicode="&#xf069;" horiz-adv-x="1664" -d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 -q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" /> - <glyph glyph-name="exclamation_sign" unicode="&#xf06a;" -d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 -q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" /> - <glyph glyph-name="gift" unicode="&#xf06b;" -d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 -q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 -t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" /> - <glyph glyph-name="leaf" unicode="&#xf06c;" horiz-adv-x="1792" -d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 -q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-43 0 -63.5 17.5t-45.5 59.5q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 -t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" /> - <glyph glyph-name="fire" unicode="&#xf06d;" horiz-adv-x="1408" -d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 -q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" /> - <glyph glyph-name="eye_open" unicode="&#xf06e;" horiz-adv-x="1792" -d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 -t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" /> - <glyph glyph-name="eye_close" unicode="&#xf070;" horiz-adv-x="1792" -d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 -q-106 -189 -316 -567t-315 -566l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 -q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z -" /> - <glyph glyph-name="warning_sign" unicode="&#xf071;" horiz-adv-x="1792" -d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 -q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" /> - <glyph glyph-name="plane" unicode="&#xf072;" horiz-adv-x="1408" -d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 -q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" /> - <glyph glyph-name="calendar" unicode="&#xf073;" horiz-adv-x="1664" -d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z -M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 -q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 -h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> - <glyph glyph-name="random" unicode="&#xf074;" horiz-adv-x="1792" -d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 -t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 -v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 -t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" /> - <glyph glyph-name="comment" unicode="&#xf075;" horiz-adv-x="1792" -d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 -q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" /> - <glyph glyph-name="magnet" unicode="&#xf076;" -d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 -q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" /> - <glyph glyph-name="chevron_up" unicode="&#xf077;" horiz-adv-x="1792" -d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" /> - <glyph glyph-name="chevron_down" unicode="&#xf078;" horiz-adv-x="1792" -d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" /> - <glyph glyph-name="retweet" unicode="&#xf079;" horiz-adv-x="1920" -d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -10 7 -21 -zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z -" /> - <glyph glyph-name="shopping_cart" unicode="&#xf07a;" horiz-adv-x="1664" -d="M640 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1536 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1664 1088v-512q0 -24 -16.5 -42.5t-40.5 -21.5l-1044 -122q13 -60 13 -70q0 -16 -24 -64h920q26 0 45 -19t19 -45 -t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 11 8 31.5t16 36t21.5 40t15.5 29.5l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t19.5 -15.5t13 -24.5t8 -26t5.5 -29.5t4.5 -26h1201q26 0 45 -19t19 -45z" /> - <glyph glyph-name="folder_close" unicode="&#xf07b;" horiz-adv-x="1664" -d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" /> - <glyph glyph-name="folder_open" unicode="&#xf07c;" horiz-adv-x="1920" -d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 -t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" /> - <glyph glyph-name="resize_vertical" unicode="&#xf07d;" horiz-adv-x="768" -d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" /> - <glyph glyph-name="resize_horizontal" unicode="&#xf07e;" horiz-adv-x="1792" -d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" /> - <glyph glyph-name="bar_chart" unicode="&#xf080;" horiz-adv-x="2048" -d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" /> - <glyph glyph-name="twitter_sign" unicode="&#xf081;" -d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 -q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 -t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="facebook_sign" unicode="&#xf082;" -d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-188v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-532q-119 0 -203.5 84.5t-84.5 203.5v960 -q0 119 84.5 203.5t203.5 84.5h960z" /> - <glyph glyph-name="camera_retro" unicode="&#xf083;" horiz-adv-x="1792" -d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 -t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 -q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" /> - <glyph glyph-name="key" unicode="&#xf084;" horiz-adv-x="1792" -d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 -l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 -t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" /> - <glyph glyph-name="cogs" unicode="&#xf085;" horiz-adv-x="1920" -d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 -t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -11 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 -l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 -l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -8 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 -q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 -t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 -q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 -q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" /> - <glyph glyph-name="comments" unicode="&#xf086;" horiz-adv-x="1792" -d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 -q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 -q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" /> - <glyph glyph-name="thumbs_up_alt" unicode="&#xf087;" -d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 -t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 -q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 -q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" /> - <glyph glyph-name="thumbs_down_alt" unicode="&#xf088;" -d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 31 18 69q0 37 -17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 -t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z -M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 -h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -73 49 -163z" /> - <glyph glyph-name="star_half" unicode="&#xf089;" horiz-adv-x="896" -d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" /> - <glyph glyph-name="heart_empty" unicode="&#xf08a;" horiz-adv-x="1792" -d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 -q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 -q224 0 351 -124t127 -344z" /> - <glyph glyph-name="signout" unicode="&#xf08b;" horiz-adv-x="1664" -d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 -q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" /> - <glyph glyph-name="linkedin_sign" unicode="&#xf08c;" -d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 -q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="pushpin" unicode="&#xf08d;" horiz-adv-x="1152" -d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 -t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" /> - <glyph glyph-name="external_link" unicode="&#xf08e;" horiz-adv-x="1792" -d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 -q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" /> - <glyph glyph-name="signin" unicode="&#xf090;" -d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 -q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="trophy" unicode="&#xf091;" horiz-adv-x="1664" -d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 -t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 -q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" /> - <glyph glyph-name="github_sign" unicode="&#xf092;" -d="M519 336q4 6 -3 13q-9 7 -14 2q-4 -6 3 -13q9 -7 14 -2zM491 377q-5 7 -12 4q-6 -4 0 -12q7 -8 12 -5q6 4 0 13zM450 417q2 4 -5 8q-7 2 -8 -2q-3 -5 4 -8q8 -2 9 2zM471 394q2 1 1.5 4.5t-3.5 5.5q-6 7 -10 3t1 -11q6 -6 11 -2zM557 319q2 7 -9 11q-9 3 -13 -4 -q-2 -7 9 -11q9 -3 13 4zM599 316q0 8 -12 8q-10 0 -10 -8t11 -8t11 8zM638 323q-2 7 -13 5t-9 -9q2 -8 12 -6t10 10zM1280 640q0 212 -150 362t-362 150t-362 -150t-150 -362q0 -167 98 -300.5t252 -185.5q18 -3 26.5 5t8.5 20q0 52 -1 95q-6 -1 -15.5 -2.5t-35.5 -2t-48 4 -t-43.5 20t-29.5 41.5q-23 59 -57 74q-2 1 -4.5 3.5l-8 8t-7 9.5t4 7.5t19.5 3.5q6 0 15 -2t30 -15.5t33 -35.5q16 -28 37.5 -42t43.5 -14t38 3.5t30 9.5q7 47 33 69q-49 6 -86 18.5t-73 39t-55.5 76t-19.5 119.5q0 79 53 137q-24 62 5 136q19 6 54.5 -7.5t60.5 -29.5l26 -16 -q58 17 128 17t128 -17q11 7 28.5 18t55.5 26t57 9q29 -74 5 -136q53 -58 53 -137q0 -57 -14 -100.5t-35.5 -70t-53.5 -44.5t-62.5 -26t-68.5 -12q35 -31 35 -95q0 -40 -0.5 -89t-0.5 -51q0 -12 8.5 -20t26.5 -5q154 52 252 185.5t98 300.5zM1536 1120v-960 -q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="upload_alt" unicode="&#xf093;" horiz-adv-x="1664" -d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 -t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" /> - <glyph glyph-name="lemon" unicode="&#xf094;" -d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 -q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 -q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 -q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -13 2 -25t3.5 -16.5t7.5 -20.5t8 -20q16 -40 25 -118.5t9 -136.5z" /> - <glyph glyph-name="phone" unicode="&#xf095;" horiz-adv-x="1408" -d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -53 3.5t-57.5 12.5t-47 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-127 79 -264 216t-216 264q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47t-12.5 57.5t-3.5 53q0 92 51 186 -q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174q2 -1 19 -11.5t24 -14 -t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" /> - <glyph glyph-name="check_empty" unicode="&#xf096;" horiz-adv-x="1408" -d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 -q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="bookmark_empty" unicode="&#xf097;" horiz-adv-x="1280" -d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 -q0 34 19.5 62t52.5 41q21 9 44 9h1048z" /> - <glyph glyph-name="phone_sign" unicode="&#xf098;" -d="M1280 343q0 11 -2 16t-18 16.5t-40.5 25t-47.5 26.5t-45.5 25t-28.5 15q-5 3 -19 13t-25 15t-21 5q-15 0 -36.5 -20.5t-39.5 -45t-38.5 -45t-33.5 -20.5q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170 126.5t-127 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5 -t-3.5 16.5q0 13 20.5 33.5t45 38.5t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5 -t320.5 -216.5q6 -2 30 -11t33 -12.5t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z -" /> - <glyph glyph-name="twitter" unicode="&#xf099;" horiz-adv-x="1664" -d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 -q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" /> - <glyph glyph-name="facebook" unicode="&#xf09a;" horiz-adv-x="1024" -d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" /> - <glyph glyph-name="github" unicode="&#xf09b;" -d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -40 7t-13 30q0 3 0.5 76.5t0.5 134.5q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 119 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24 -q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-85 13.5q-45 -113 -8 -204q-79 -87 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-39 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5 -t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -88.5t0.5 -54.5q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103zM291 305q3 7 -7 12 -q-10 3 -13 -2q-3 -7 7 -12q9 -6 13 2zM322 271q7 5 -2 16q-10 9 -16 3q-7 -5 2 -16q10 -10 16 -3zM352 226q9 7 0 19q-8 13 -17 6q-9 -5 0 -18t17 -7zM394 184q8 8 -4 19q-12 12 -20 3q-9 -8 4 -19q12 -12 20 -3zM451 159q3 11 -13 16q-15 4 -19 -7t13 -15q15 -6 19 6z -M514 154q0 13 -17 11q-16 0 -16 -11q0 -13 17 -11q16 0 16 11zM572 164q-2 11 -18 9q-16 -3 -14 -15t18 -8t14 14z" /> - <glyph glyph-name="unlock" unicode="&#xf09c;" horiz-adv-x="1664" -d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 -t316.5 -131.5t131.5 -316.5z" /> - <glyph glyph-name="credit_card" unicode="&#xf09d;" horiz-adv-x="1920" -d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 -q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" /> - <glyph glyph-name="rss" unicode="&#xf09e;" horiz-adv-x="1408" -d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 -t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 -q187 -186 294 -425.5t120 -501.5z" /> - <glyph glyph-name="hdd" unicode="&#xf0a0;" -d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 -h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 -l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" /> - <glyph glyph-name="bullhorn" unicode="&#xf0a1;" horiz-adv-x="1792" -d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 -t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" /> - <glyph glyph-name="bell" unicode="&#xf0a2;" horiz-adv-x="1792" -d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z -M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 -t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" /> - <glyph glyph-name="certificate" unicode="&#xf0a3;" -d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 -l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 -l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" /> - <glyph glyph-name="hand_right" unicode="&#xf0a4;" horiz-adv-x="1792" -d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 -q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 -q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 -t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" /> - <glyph glyph-name="hand_left" unicode="&#xf0a5;" horiz-adv-x="1792" -d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-8 9 -12 14q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576q-50 0 -89 -38.5 -t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45z -M1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128q0 122 81.5 189t206.5 67 -q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" /> - <glyph glyph-name="hand_up" unicode="&#xf0a6;" -d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 -q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 -t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 -q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" /> - <glyph glyph-name="hand_down" unicode="&#xf0a7;" -d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 -t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 -q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 -q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" /> - <glyph glyph-name="circle_arrow_left" unicode="&#xf0a8;" -d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="circle_arrow_right" unicode="&#xf0a9;" -d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="circle_arrow_up" unicode="&#xf0aa;" -d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="circle_arrow_down" unicode="&#xf0ab;" -d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="globe" unicode="&#xf0ac;" -d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 -q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 11t-9.5 10q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 -q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 -q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 -t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-4 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 -q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 -q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 -t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 -t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10.5t17 -19.5q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 -q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 -q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 -q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 -t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q8 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 -q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 -q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" /> - <glyph glyph-name="wrench" unicode="&#xf0ad;" horiz-adv-x="1664" -d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 -t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" /> - <glyph glyph-name="tasks" unicode="&#xf0ae;" horiz-adv-x="1792" -d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 -t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" /> - <glyph glyph-name="filter" unicode="&#xf0b0;" horiz-adv-x="1408" -d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" /> - <glyph glyph-name="briefcase" unicode="&#xf0b1;" horiz-adv-x="1792" -d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 -t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" /> - <glyph glyph-name="fullscreen" unicode="&#xf0b2;" -d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 -l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z -" /> - <glyph glyph-name="group" unicode="&#xf0c0;" horiz-adv-x="1920" -d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 -t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 -t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 -t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" /> - <glyph glyph-name="link" unicode="&#xf0c1;" horiz-adv-x="1664" -d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 -l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 -t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 -q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" /> - <glyph glyph-name="cloud" unicode="&#xf0c2;" horiz-adv-x="1920" -d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z -" /> - <glyph glyph-name="beaker" unicode="&#xf0c3;" horiz-adv-x="1664" -d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" /> - <glyph glyph-name="cut" unicode="&#xf0c4;" horiz-adv-x="1792" -d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 -q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 -q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 -q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 -q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" /> - <glyph glyph-name="copy" unicode="&#xf0c5;" horiz-adv-x="1792" -d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 -h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" /> - <glyph glyph-name="paper_clip" unicode="&#xf0c6;" horiz-adv-x="1408" -d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 -l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 -z" /> - <glyph glyph-name="save" unicode="&#xf0c7;" -d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 -h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" /> - <glyph glyph-name="sign_blank" unicode="&#xf0c8;" -d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="reorder" unicode="&#xf0c9;" -d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 -t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" /> - <glyph glyph-name="ul" unicode="&#xf0ca;" horiz-adv-x="1792" -d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 -t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z -M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" /> - <glyph glyph-name="ol" unicode="&#xf0cb;" horiz-adv-x="1792" -d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 -q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 -t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 121.5t0.5 121.5v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216 -q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" /> - <glyph glyph-name="strikethrough" unicode="&#xf0cc;" horiz-adv-x="1792" -d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 98 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 -l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -56 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 -l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" /> - <glyph glyph-name="underline" unicode="&#xf0cd;" -d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 -q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 -q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 -q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" /> - <glyph glyph-name="table" unicode="&#xf0ce;" horiz-adv-x="1664" -d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 -v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 -q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 -q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 -z" /> - <glyph glyph-name="magic" unicode="&#xf0d0;" horiz-adv-x="1664" -d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 -l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" /> - <glyph glyph-name="truck" unicode="&#xf0d1;" horiz-adv-x="1792" -d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 -t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 -t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" /> - <glyph glyph-name="pinterest" unicode="&#xf0d2;" -d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 -q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 -q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="pinterest_sign" unicode="&#xf0d3;" -d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 -t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 -t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" /> - <glyph glyph-name="google_plus_sign" unicode="&#xf0d4;" -d="M917 631q0 26 -6 64h-362v-132h217q-3 -24 -16.5 -50t-37.5 -53t-66.5 -44.5t-96.5 -17.5q-99 0 -169 71t-70 171t70 171t169 71q92 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585 -h109v110h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="google_plus" unicode="&#xf0d5;" horiz-adv-x="2304" -d="M1437 623q0 -208 -87 -370.5t-248 -254t-369 -91.5q-149 0 -285 58t-234 156t-156 234t-58 285t58 285t156 234t234 156t285 58q286 0 491 -192l-199 -191q-117 113 -292 113q-123 0 -227.5 -62t-165.5 -168.5t-61 -232.5t61 -232.5t165.5 -168.5t227.5 -62 -q83 0 152.5 23t114.5 57.5t78.5 78.5t49 83t21.5 74h-416v252h692q12 -63 12 -122zM2304 745v-210h-209v-209h-210v209h-209v210h209v209h210v-209h209z" /> - <glyph glyph-name="money" unicode="&#xf0d6;" horiz-adv-x="1920" -d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 -v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" /> - <glyph glyph-name="caret_down" unicode="&#xf0d7;" horiz-adv-x="1024" -d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" /> - <glyph glyph-name="caret_up" unicode="&#xf0d8;" horiz-adv-x="1024" -d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" /> - <glyph glyph-name="caret_left" unicode="&#xf0d9;" horiz-adv-x="640" -d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" /> - <glyph glyph-name="caret_right" unicode="&#xf0da;" horiz-adv-x="640" -d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" /> - <glyph glyph-name="columns" unicode="&#xf0db;" horiz-adv-x="1664" -d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" /> - <glyph glyph-name="sort" unicode="&#xf0dc;" horiz-adv-x="1024" -d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" /> - <glyph glyph-name="sort_down" unicode="&#xf0dd;" horiz-adv-x="1024" -d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" /> - <glyph glyph-name="sort_up" unicode="&#xf0de;" horiz-adv-x="1024" -d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" /> - <glyph glyph-name="envelope_alt" unicode="&#xf0e0;" horiz-adv-x="1792" -d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 -q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" /> - <glyph glyph-name="linkedin" unicode="&#xf0e1;" -d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 -q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" /> - <glyph glyph-name="undo" unicode="&#xf0e2;" -d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 -t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" /> - <glyph glyph-name="legal" unicode="&#xf0e3;" horiz-adv-x="1792" -d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 -t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 -q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 -q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" /> - <glyph glyph-name="dashboard" unicode="&#xf0e4;" horiz-adv-x="1792" -d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 -t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 -t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 -q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="comment_alt" unicode="&#xf0e5;" horiz-adv-x="1792" -d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 -q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 -t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" /> - <glyph glyph-name="comments_alt" unicode="&#xf0e6;" horiz-adv-x="1792" -d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 -t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 -t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 -q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" /> - <glyph glyph-name="bolt" unicode="&#xf0e7;" horiz-adv-x="896" -d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" /> - <glyph glyph-name="sitemap" unicode="&#xf0e8;" horiz-adv-x="1792" -d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 -q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 -z" /> - <glyph glyph-name="umbrella" unicode="&#xf0e9;" horiz-adv-x="1664" -d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 -q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 -q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" /> - <glyph glyph-name="paste" unicode="&#xf0ea;" horiz-adv-x="1792" -d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 -h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" /> - <glyph glyph-name="light_bulb" unicode="&#xf0eb;" horiz-adv-x="1024" -d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 -q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 -q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 -t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" /> - <glyph glyph-name="exchange" unicode="&#xf0ec;" horiz-adv-x="1792" -d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 -q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" /> - <glyph glyph-name="cloud_download" unicode="&#xf0ed;" horiz-adv-x="1920" -d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 -q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" /> - <glyph glyph-name="cloud_upload" unicode="&#xf0ee;" horiz-adv-x="1920" -d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 -q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" /> - <glyph glyph-name="user_md" unicode="&#xf0f0;" horiz-adv-x="1408" -d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 -t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 -t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 -t271.5 -112.5t112.5 -271.5z" /> - <glyph glyph-name="stethoscope" unicode="&#xf0f1;" horiz-adv-x="1408" -d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 -t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 -t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" /> - <glyph glyph-name="suitcase" unicode="&#xf0f2;" horiz-adv-x="1792" -d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 -t66 -158z" /> - <glyph glyph-name="bell_alt" unicode="&#xf0f3;" horiz-adv-x="1792" -d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5 -t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" /> - <glyph glyph-name="coffee" unicode="&#xf0f4;" horiz-adv-x="1920" -d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 -t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" /> - <glyph glyph-name="food" unicode="&#xf0f5;" horiz-adv-x="1408" -d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 -t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" /> - <glyph glyph-name="file_text_alt" unicode="&#xf0f6;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704 -q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" /> - <glyph glyph-name="building" unicode="&#xf0f7;" horiz-adv-x="1408" -d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" /> - <glyph glyph-name="hospital" unicode="&#xf0f8;" horiz-adv-x="1408" -d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z -M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 -t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 -v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" /> - <glyph glyph-name="ambulance" unicode="&#xf0f9;" horiz-adv-x="1920" -d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 -t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 -q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> - <glyph glyph-name="medkit" unicode="&#xf0fa;" horiz-adv-x="1792" -d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 -q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" /> - <glyph glyph-name="fighter_jet" unicode="&#xf0fb;" horiz-adv-x="1920" -d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 -q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q128 -28 200 -52t80 -34z" /> - <glyph glyph-name="beer" unicode="&#xf0fc;" horiz-adv-x="1664" -d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" /> - <glyph glyph-name="h_sign" unicode="&#xf0fd;" -d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 -q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="f0fe" unicode="&#xf0fe;" -d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 -q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="double_angle_left" unicode="&#xf100;" horiz-adv-x="1024" -d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 -t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" /> - <glyph glyph-name="double_angle_right" unicode="&#xf101;" horiz-adv-x="1024" -d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 -l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> - <glyph glyph-name="double_angle_up" unicode="&#xf102;" horiz-adv-x="1152" -d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 -q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> - <glyph glyph-name="double_angle_down" unicode="&#xf103;" horiz-adv-x="1152" -d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 -t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" /> - <glyph glyph-name="angle_left" unicode="&#xf104;" horiz-adv-x="640" -d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" /> - <glyph glyph-name="angle_right" unicode="&#xf105;" horiz-adv-x="640" -d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> - <glyph glyph-name="angle_up" unicode="&#xf106;" horiz-adv-x="1152" -d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" /> - <glyph glyph-name="angle_down" unicode="&#xf107;" horiz-adv-x="1152" -d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" /> - <glyph glyph-name="desktop" unicode="&#xf108;" horiz-adv-x="1920" -d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 -t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> - <glyph glyph-name="laptop" unicode="&#xf109;" horiz-adv-x="1920" -d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z -M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" /> - <glyph glyph-name="tablet" unicode="&#xf10a;" horiz-adv-x="1152" -d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 -q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" /> - <glyph glyph-name="mobile_phone" unicode="&#xf10b;" horiz-adv-x="768" -d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 -q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" /> - <glyph glyph-name="circle_blank" unicode="&#xf10c;" -d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 -t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="quote_left" unicode="&#xf10d;" horiz-adv-x="1664" -d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z -M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" /> - <glyph glyph-name="quote_right" unicode="&#xf10e;" horiz-adv-x="1664" -d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 -v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" /> - <glyph glyph-name="spinner" unicode="&#xf110;" horiz-adv-x="1792" -d="M526 142q0 -53 -37.5 -90.5t-90.5 -37.5q-52 0 -90 38t-38 90q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 -64q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -53 -37.5 -90.5t-90.5 -37.5 -t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1522 142q0 -52 -38 -90t-90 -38q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM558 1138q0 -66 -47 -113t-113 -47t-113 47t-47 113t47 113t113 47t113 -47t47 -113z -M1728 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1088 1344q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1618 1138q0 -93 -66 -158.5t-158 -65.5q-93 0 -158.5 65.5t-65.5 158.5 -q0 92 65.5 158t158.5 66q92 0 158 -66t66 -158z" /> - <glyph glyph-name="circle" unicode="&#xf111;" -d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="reply" unicode="&#xf112;" horiz-adv-x="1792" -d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 -l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" /> - <glyph glyph-name="github_alt" unicode="&#xf113;" horiz-adv-x="1664" -d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 -q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 -t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 -q0 -87 -27 -168q136 -160 136 -398z" /> - <glyph glyph-name="folder_close_alt" unicode="&#xf114;" horiz-adv-x="1664" -d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 -q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" /> - <glyph glyph-name="folder_open_alt" unicode="&#xf115;" horiz-adv-x="1920" -d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 -v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z -" /> - <glyph glyph-name="expand_alt" unicode="&#xf116;" horiz-adv-x="1792" - /> - <glyph glyph-name="collapse_alt" unicode="&#xf117;" horiz-adv-x="1792" - /> - <glyph glyph-name="smile" unicode="&#xf118;" -d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 -t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 -t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="frown" unicode="&#xf119;" -d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 -t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 -t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="meh" unicode="&#xf11a;" -d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 -t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="gamepad" unicode="&#xf11b;" horiz-adv-x="1920" -d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 -t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 -t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" /> - <glyph glyph-name="keyboard" unicode="&#xf11c;" horiz-adv-x="1920" -d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 -h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 -h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 -q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 -h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" /> - <glyph glyph-name="flag_alt" unicode="&#xf11d;" horiz-adv-x="1792" -d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 -h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 -q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" /> - <glyph glyph-name="flag_checkered" unicode="&#xf11e;" horiz-adv-x="1792" -d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 -q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 -q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 -q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" /> - <glyph glyph-name="terminal" unicode="&#xf120;" horiz-adv-x="1664" -d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 -t9 -23z" /> - <glyph glyph-name="code" unicode="&#xf121;" horiz-adv-x="1920" -d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 -l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" /> - <glyph glyph-name="reply_all" unicode="&#xf122;" horiz-adv-x="1792" -d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 -q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" /> - <glyph glyph-name="star_half_empty" unicode="&#xf123;" horiz-adv-x="1664" -d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 -l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" /> - <glyph glyph-name="location_arrow" unicode="&#xf124;" horiz-adv-x="1408" -d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" /> - <glyph glyph-name="crop" unicode="&#xf125;" horiz-adv-x="1664" -d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 -v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" /> - <glyph glyph-name="code_fork" unicode="&#xf126;" horiz-adv-x="1024" -d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 -q-2 -287 -226 -414q-67 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 -q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" /> - <glyph glyph-name="unlink" unicode="&#xf127;" horiz-adv-x="1664" -d="M439 265l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 -q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 -l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 -t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" /> - <glyph glyph-name="question" unicode="&#xf128;" horiz-adv-x="1024" -d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 -t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" /> - <glyph glyph-name="_279" unicode="&#xf129;" horiz-adv-x="640" -d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 -q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" /> - <glyph glyph-name="exclamation" unicode="&#xf12a;" horiz-adv-x="640" -d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" /> - <glyph glyph-name="superscript" unicode="&#xf12b;" -d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3q-1 -3 -2.5 -6.5t-3.5 -8t-3 -6.5q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109z -M1534 846v-206h-514l-3 27q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5 -t-65.5 -51.5t-30.5 -63h232v80h126z" /> - <glyph glyph-name="subscript" unicode="&#xf12c;" -d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3q-1 -3 -2.5 -6.5t-3.5 -8t-3 -6.5q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109z -M1536 -50v-206h-514l-4 27q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73 -h232v80h126z" /> - <glyph glyph-name="_283" unicode="&#xf12d;" horiz-adv-x="1920" -d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" /> - <glyph glyph-name="puzzle_piece" unicode="&#xf12e;" horiz-adv-x="1664" -d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 -t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 -q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 -q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" /> - <glyph glyph-name="microphone" unicode="&#xf130;" horiz-adv-x="1152" -d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 -t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" /> - <glyph glyph-name="microphone_off" unicode="&#xf131;" horiz-adv-x="1408" -d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 -q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 -t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" /> - <glyph glyph-name="shield" unicode="&#xf132;" horiz-adv-x="1280" -d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 -t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" /> - <glyph glyph-name="calendar_empty" unicode="&#xf133;" horiz-adv-x="1664" -d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 -q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> - <glyph glyph-name="fire_extinguisher" unicode="&#xf134;" horiz-adv-x="1408" -d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 -q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 -q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" /> - <glyph glyph-name="rocket" unicode="&#xf135;" horiz-adv-x="1664" -d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 -q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" /> - <glyph glyph-name="maxcdn" unicode="&#xf136;" horiz-adv-x="1792" -d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" /> - <glyph glyph-name="chevron_sign_left" unicode="&#xf137;" -d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 -t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="chevron_sign_right" unicode="&#xf138;" -d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 -t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="chevron_sign_up" unicode="&#xf139;" -d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 -t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="chevron_sign_down" unicode="&#xf13a;" -d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 -t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="html5" unicode="&#xf13b;" horiz-adv-x="1408" -d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" /> - <glyph glyph-name="css3" unicode="&#xf13c;" horiz-adv-x="1792" -d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" /> - <glyph glyph-name="anchor" unicode="&#xf13d;" horiz-adv-x="1792" -d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 -q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 -t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" /> - <glyph glyph-name="unlock_alt" unicode="&#xf13e;" horiz-adv-x="1152" -d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 -v-320h736z" /> - <glyph glyph-name="bullseye" unicode="&#xf140;" -d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 -t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 -q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="ellipsis_horizontal" unicode="&#xf141;" horiz-adv-x="1408" -d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 -q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" /> - <glyph glyph-name="ellipsis_vertical" unicode="&#xf142;" horiz-adv-x="384" -d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 -q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" /> - <glyph glyph-name="_303" unicode="&#xf143;" -d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 233 -176.5 396.5t-396.5 176.5q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128 -q13 0 23 10t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960 -q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="play_sign" unicode="&#xf144;" -d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 -q16 -8 32 -8q17 0 32 9z" /> - <glyph glyph-name="ticket" unicode="&#xf145;" horiz-adv-x="1792" -d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 -t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" /> - <glyph glyph-name="minus_sign_alt" unicode="&#xf146;" -d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 -t84.5 -203.5z" /> - <glyph glyph-name="check_minus" unicode="&#xf147;" horiz-adv-x="1408" -d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 -t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="level_up" unicode="&#xf148;" horiz-adv-x="1024" -d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" /> - <glyph glyph-name="level_down" unicode="&#xf149;" horiz-adv-x="1024" -d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" /> - <glyph glyph-name="check_sign" unicode="&#xf14a;" -d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 -t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="edit_sign" unicode="&#xf14b;" -d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 -v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_312" unicode="&#xf14c;" -d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 -q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="share_sign" unicode="&#xf14d;" -d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q11 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 -t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="compass" unicode="&#xf14e;" -d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 -t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="collapse" unicode="&#xf150;" -d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 -v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="collapse_top" unicode="&#xf151;" -d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 -q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_317" unicode="&#xf152;" -d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 -t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="eur" unicode="&#xf153;" horiz-adv-x="1024" -d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 -t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 -l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" /> - <glyph glyph-name="gbp" unicode="&#xf154;" horiz-adv-x="1024" -d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 -q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" /> - <glyph glyph-name="usd" unicode="&#xf155;" horiz-adv-x="1024" -d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 -t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 -t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 -t53 -63.5t31.5 -76.5t13 -94z" /> - <glyph glyph-name="inr" unicode="&#xf156;" horiz-adv-x="898" -d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 -q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" /> - <glyph glyph-name="jpy" unicode="&#xf157;" horiz-adv-x="1027" -d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 -l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" /> - <glyph glyph-name="rub" unicode="&#xf158;" horiz-adv-x="1280" -d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 -q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" /> - <glyph glyph-name="krw" unicode="&#xf159;" horiz-adv-x="1792" -d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 -t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 -q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" /> - <glyph glyph-name="btc" unicode="&#xf15a;" horiz-adv-x="1280" -d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 -l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 -t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" /> - <glyph glyph-name="file" unicode="&#xf15b;" -d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" /> - <glyph glyph-name="file_text" unicode="&#xf15c;" -d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704 -q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" /> - <glyph glyph-name="sort_by_alphabet" unicode="&#xf15d;" horiz-adv-x="1664" -d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 -v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 -l230 -662h70z" /> - <glyph glyph-name="_329" unicode="&#xf15e;" horiz-adv-x="1664" -d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 -v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 -v119h121z" /> - <glyph glyph-name="sort_by_attributes" unicode="&#xf160;" horiz-adv-x="1792" -d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 -q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 -q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" /> - <glyph glyph-name="sort_by_attributes_alt" unicode="&#xf161;" horiz-adv-x="1792" -d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 -q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 -q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" /> - <glyph glyph-name="sort_by_order" unicode="&#xf162;" -d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 -zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 -t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" /> - <glyph glyph-name="sort_by_order_alt" unicode="&#xf163;" -d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 -t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 -q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" /> - <glyph glyph-name="_334" unicode="&#xf164;" horiz-adv-x="1664" -d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 -q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 -t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" /> - <glyph glyph-name="_335" unicode="&#xf165;" horiz-adv-x="1664" -d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 -t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 -t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" /> - <glyph glyph-name="youtube_sign" unicode="&#xf166;" -d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 17 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 -q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 -q21 -29 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 -q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78q7 -23 23 -69l24 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38 -q-51 0 -78 -38q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5 -h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="youtube" unicode="&#xf167;" -d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 -q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 -q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 -q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-38 -51 -106 -51q-67 0 -105 51 -q-28 38 -28 118v175q0 80 28 117q38 51 105 51q68 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" /> - <glyph glyph-name="xing" unicode="&#xf168;" horiz-adv-x="1408" -d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 -q25 45 64 45h241q22 0 31 -15z" /> - <glyph glyph-name="xing_sign" unicode="&#xf169;" -d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 -l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="youtube_play" unicode="&#xf16a;" horiz-adv-x="1792" -d="M711 408l484 250l-484 253v-503zM896 1270q168 0 324.5 -4.5t229.5 -9.5l73 -4q1 0 17 -1.5t23 -3t23.5 -4.5t28.5 -8t28 -13t31 -19.5t29 -26.5q6 -6 15.5 -18.5t29 -58.5t26.5 -101q8 -64 12.5 -136.5t5.5 -113.5v-40v-136q1 -145 -18 -290q-7 -55 -25 -99.5t-32 -61.5 -l-14 -17q-14 -15 -29 -26.5t-31 -19t-28 -12.5t-28.5 -8t-24 -4.5t-23 -3t-16.5 -1.5q-251 -19 -627 -19q-207 2 -359.5 6.5t-200.5 7.5l-49 4l-36 4q-36 5 -54.5 10t-51 21t-56.5 41q-6 6 -15.5 18.5t-29 58.5t-26.5 101q-8 64 -12.5 136.5t-5.5 113.5v40v136 -q-1 145 18 290q7 55 25 99.5t32 61.5l14 17q14 15 29 26.5t31 19.5t28 13t28.5 8t23.5 4.5t23 3t17 1.5q251 18 627 18z" /> - <glyph glyph-name="dropbox" unicode="&#xf16b;" horiz-adv-x="1792" -d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" /> - <glyph glyph-name="stackexchange" unicode="&#xf16c;" -d="M1289 -96h-1118v480h-160v-640h1438v640h-160v-480zM347 428l33 157l783 -165l-33 -156zM450 802l67 146l725 -339l-67 -145zM651 1158l102 123l614 -513l-102 -123zM1048 1536l477 -641l-128 -96l-477 641zM330 65v159h800v-159h-800z" /> - <glyph glyph-name="instagram" unicode="&#xf16d;" -d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1162 640q0 -164 -115 -279t-279 -115t-279 115t-115 279t115 279t279 115t279 -115t115 -279zM1270 1050q0 -38 -27 -65t-65 -27t-65 27t-27 65t27 65t65 27t65 -27t27 -65zM768 1270 -q-7 0 -76.5 0.5t-105.5 0t-96.5 -3t-103 -10t-71.5 -18.5q-50 -20 -88 -58t-58 -88q-11 -29 -18.5 -71.5t-10 -103t-3 -96.5t0 -105.5t0.5 -76.5t-0.5 -76.5t0 -105.5t3 -96.5t10 -103t18.5 -71.5q20 -50 58 -88t88 -58q29 -11 71.5 -18.5t103 -10t96.5 -3t105.5 0t76.5 0.5 -t76.5 -0.5t105.5 0t96.5 3t103 10t71.5 18.5q50 20 88 58t58 88q11 29 18.5 71.5t10 103t3 96.5t0 105.5t-0.5 76.5t0.5 76.5t0 105.5t-3 96.5t-10 103t-18.5 71.5q-20 50 -58 88t-88 58q-29 11 -71.5 18.5t-103 10t-96.5 3t-105.5 0t-76.5 -0.5zM1536 640q0 -229 -5 -317 -q-10 -208 -124 -322t-322 -124q-88 -5 -317 -5t-317 5q-208 10 -322 124t-124 322q-5 88 -5 317t5 317q10 208 124 322t322 124q88 5 317 5t317 -5q208 -10 322 -124t124 -322q5 -88 5 -317z" /> - <glyph glyph-name="flickr" unicode="&#xf16e;" -d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 -t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" /> - <glyph glyph-name="adn" unicode="&#xf170;" -d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="f171" unicode="&#xf171;" horiz-adv-x="1408" -d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 -t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 -t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 -t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" /> - <glyph glyph-name="bitbucket_sign" unicode="&#xf172;" -d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 -t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z -M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 -v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="tumblr" unicode="&#xf173;" horiz-adv-x="1024" -d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 -q78 2 134 29z" /> - <glyph glyph-name="tumblr_sign" unicode="&#xf174;" -d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z -M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="long_arrow_down" unicode="&#xf175;" horiz-adv-x="768" -d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" /> - <glyph glyph-name="long_arrow_up" unicode="&#xf176;" horiz-adv-x="768" -d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" /> - <glyph glyph-name="long_arrow_left" unicode="&#xf177;" horiz-adv-x="1792" -d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" /> - <glyph glyph-name="long_arrow_right" unicode="&#xf178;" horiz-adv-x="1792" -d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" /> - <glyph glyph-name="apple" unicode="&#xf179;" horiz-adv-x="1408" -d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q113 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 -q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" /> - <glyph glyph-name="windows" unicode="&#xf17a;" horiz-adv-x="1664" -d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" /> - <glyph glyph-name="android" unicode="&#xf17b;" horiz-adv-x="1408" -d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 -t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 -h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" /> - <glyph glyph-name="linux" unicode="&#xf17c;" -d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-10 -11 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z -M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 -q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 -q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 -t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 -q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 -q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18q-2 -1 -4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 -q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 -q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-6 0 -8 -2t0 -4 -t5 -3q14 -4 18 -31q0 -3 8 2q2 2 2 3zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5 -t-30 -18.5t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43 -q-19 4 -51 9.5t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49 -t-14 -48q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54 -q110 143 124 195q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5 -t-40.5 -33.5t-61 -14q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5 -t15.5 47.5q1 -31 8 -56.5t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" /> - <glyph glyph-name="dribble" unicode="&#xf17d;" -d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 -t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 -q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -5 6.5 -17t7.5 -17q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 -t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="skype" unicode="&#xf17e;" -d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 -t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 -q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 -q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" /> - <glyph glyph-name="foursquare" unicode="&#xf180;" horiz-adv-x="1280" -d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z -M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324 -l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" /> - <glyph glyph-name="trello" unicode="&#xf181;" -d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 -q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" /> - <glyph glyph-name="female" unicode="&#xf182;" horiz-adv-x="1280" -d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 -q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" /> - <glyph glyph-name="male" unicode="&#xf183;" horiz-adv-x="1024" -d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z -M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" /> - <glyph glyph-name="gittip" unicode="&#xf184;" -d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 -t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="sun" unicode="&#xf185;" horiz-adv-x="1792" -d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 -l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 -q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" /> - <glyph glyph-name="_366" unicode="&#xf186;" -d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 -t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" /> - <glyph glyph-name="archive" unicode="&#xf187;" horiz-adv-x="1792" -d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 -q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" /> - <glyph glyph-name="bug" unicode="&#xf188;" horiz-adv-x="1664" -d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 -q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 -t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" /> - <glyph glyph-name="vk" unicode="&#xf189;" horiz-adv-x="1920" -d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-40 -51 -55 -72t-30.5 -49.5t-12 -42t13 -34.5t32.5 -43t57 -53q4 -2 5 -4q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 -t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 -q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q16 19 38 30q53 26 239 24 -q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 -q39 5 64 -2.5t31 -16.5z" /> - <glyph glyph-name="weibo" unicode="&#xf18a;" horiz-adv-x="1792" -d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 -q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 -q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 -q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z -M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" /> - <glyph glyph-name="renren" unicode="&#xf18b;" -d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 -q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" /> - <glyph glyph-name="_372" unicode="&#xf18c;" horiz-adv-x="1408" -d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 -t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 -t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -4 1 -50t-1 -72q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 -t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" /> - <glyph glyph-name="stack_exchange" unicode="&#xf18d;" horiz-adv-x="1280" -d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z -" /> - <glyph glyph-name="_374" unicode="&#xf18e;" -d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 -t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="arrow_circle_alt_left" unicode="&#xf190;" -d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 -t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_376" unicode="&#xf191;" -d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z -M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="dot_circle_alt" unicode="&#xf192;" -d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 -t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_378" unicode="&#xf193;" horiz-adv-x="1664" -d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 -q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 17 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" /> - <glyph glyph-name="vimeo_square" unicode="&#xf194;" -d="M1292 898q10 216 -161 222q-231 8 -312 -261q44 19 82 19q85 0 74 -96q-4 -57 -74 -167t-105 -110q-43 0 -82 169q-13 54 -45 255q-30 189 -160 177q-59 -7 -164 -100l-81 -72l-81 -72l52 -67q76 52 87 52q57 0 107 -179q15 -55 45 -164.5t45 -164.5q68 -179 164 -179 -q157 0 383 294q220 283 226 444zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_380" unicode="&#xf195;" horiz-adv-x="1152" -d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 -q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" /> - <glyph glyph-name="plus_square_o" unicode="&#xf196;" horiz-adv-x="1408" -d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 -q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_382" unicode="&#xf197;" horiz-adv-x="2176" -d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40 -t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29 -q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" /> - <glyph glyph-name="_383" unicode="&#xf198;" horiz-adv-x="1664" -d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9 -q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102 -t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" /> - <glyph glyph-name="_384" unicode="&#xf199;" -d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69 -q-47 32 -142 92.5t-142 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13 -t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" /> - <glyph glyph-name="_385" unicode="&#xf19a;" horiz-adv-x="1792" -d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5 -t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21 -t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286 -t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273 -t273 -182.5t331.5 -68z" /> - <glyph glyph-name="_386" unicode="&#xf19b;" horiz-adv-x="1792" -d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" /> - <glyph glyph-name="_387" unicode="&#xf19c;" horiz-adv-x="2048" -d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64 -q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" /> - <glyph glyph-name="_388" unicode="&#xf19d;" horiz-adv-x="2304" -d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433 -q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" /> - <glyph glyph-name="_389" unicode="&#xf19e;" -d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q44 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0 -q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" /> - <glyph glyph-name="uniF1A0" unicode="&#xf1a0;" -d="M768 750h725q12 -67 12 -128q0 -217 -91 -387.5t-259.5 -266.5t-386.5 -96q-157 0 -299 60.5t-245 163.5t-163.5 245t-60.5 299t60.5 299t163.5 245t245 163.5t299 60.5q300 0 515 -201l-209 -201q-123 119 -306 119q-129 0 -238.5 -65t-173.5 -176.5t-64 -243.5 -t64 -243.5t173.5 -176.5t238.5 -65q87 0 160 24t120 60t82 82t51.5 87t22.5 78h-436v264z" /> - <glyph glyph-name="f1a1" unicode="&#xf1a1;" horiz-adv-x="1792" -d="M1095 369q16 -16 0 -31q-62 -62 -199 -62t-199 62q-16 15 0 31q6 6 15 6t15 -6q48 -49 169 -49q120 0 169 49q6 6 15 6t15 -6zM788 550q0 -37 -26 -63t-63 -26t-63.5 26t-26.5 63q0 38 26.5 64t63.5 26t63 -26.5t26 -63.5zM1183 550q0 -37 -26.5 -63t-63.5 -26t-63 26 -t-26 63t26 63.5t63 26.5t63.5 -26t26.5 -64zM1434 670q0 49 -35 84t-85 35t-86 -36q-130 90 -311 96l63 283l200 -45q0 -37 26 -63t63 -26t63.5 26.5t26.5 63.5t-26.5 63.5t-63.5 26.5q-54 0 -80 -50l-221 49q-19 5 -25 -16l-69 -312q-180 -7 -309 -97q-35 37 -87 37 -q-50 0 -85 -35t-35 -84q0 -35 18.5 -64t49.5 -44q-6 -27 -6 -56q0 -142 140 -243t337 -101q198 0 338 101t140 243q0 32 -7 57q30 15 48 43.5t18 63.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191 -t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="_392" unicode="&#xf1a2;" -d="M939 407q13 -13 0 -26q-53 -53 -171 -53t-171 53q-13 13 0 26q5 6 13 6t13 -6q42 -42 145 -42t145 42q5 6 13 6t13 -6zM676 563q0 -31 -23 -54t-54 -23t-54 23t-23 54q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1014 563q0 -31 -23 -54t-54 -23t-54 23t-23 54 -q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1229 666q0 42 -30 72t-73 30q-42 0 -73 -31q-113 78 -267 82l54 243l171 -39q1 -32 23.5 -54t53.5 -22q32 0 54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5q-48 0 -69 -43l-189 42q-17 5 -21 -13l-60 -268q-154 -6 -265 -83 -q-30 32 -74 32q-43 0 -73 -30t-30 -72q0 -30 16 -55t42 -38q-5 -25 -5 -48q0 -122 120 -208.5t289 -86.5q170 0 290 86.5t120 208.5q0 25 -6 49q25 13 40.5 37.5t15.5 54.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 -q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_393" unicode="&#xf1a3;" -d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150 -v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103 -t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="f1a4" unicode="&#xf1a4;" horiz-adv-x="1920" -d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328 -v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" /> - <glyph glyph-name="_395" unicode="&#xf1a5;" -d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 -t84.5 -203.5z" /> - <glyph glyph-name="_396" unicode="&#xf1a6;" horiz-adv-x="2048" -d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123 -v-369h123z" /> - <glyph glyph-name="_397" unicode="&#xf1a7;" -d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101 -v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 -q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_398" unicode="&#xf1a8;" horiz-adv-x="2038" -d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14 -q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24 -q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33 -q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5 -t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43 -q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5 -t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13 -t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" /> - <glyph glyph-name="_399" unicode="&#xf1a9;" -d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10 -q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14 -q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14 -t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44 -q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" /> - <glyph glyph-name="_400" unicode="&#xf1aa;" -d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z -M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5 -t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5 -q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126 -t135.5 51q85 0 145 -60.5t60 -145.5z" /> - <glyph glyph-name="f1ab" unicode="&#xf1ab;" -d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 -q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 -q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z -M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 -q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q107 36 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 -q20 0 20 -21v-418z" /> - <glyph glyph-name="_402" unicode="&#xf1ac;" horiz-adv-x="1792" -d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48 -l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23 -t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128 -q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128 -q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" /> - <glyph glyph-name="_403" unicode="&#xf1ad;" -d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9 -t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64 -q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 -q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9 -t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64 -q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 -q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9 -t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" /> - <glyph glyph-name="_404" unicode="&#xf1ae;" horiz-adv-x="1280" -d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68q29 28 68.5 28t67.5 -28l228 -228h368l228 228q28 28 68 28t68 -28q28 -29 28 -68.5t-28 -67.5zM864 1152 -q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" /> - <glyph glyph-name="uniF1B1" unicode="&#xf1b0;" horiz-adv-x="1664" -d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5 -q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819 -q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5 -t100.5 134t141.5 55.5z" /> - <glyph glyph-name="_406" unicode="&#xf1b1;" horiz-adv-x="768" -d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" /> - <glyph glyph-name="_407" unicode="&#xf1b2;" horiz-adv-x="1792" -d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z -" /> - <glyph glyph-name="_408" unicode="&#xf1b3;" horiz-adv-x="2304" -d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67 -t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-4 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70 -v-400l434 -186q36 -16 57 -48t21 -70z" /> - <glyph glyph-name="_409" unicode="&#xf1b4;" horiz-adv-x="2048" -d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658 -q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204 -q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" /> - <glyph glyph-name="_410" unicode="&#xf1b5;" -d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5 -t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217 -t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" /> - <glyph glyph-name="_411" unicode="&#xf1b6;" horiz-adv-x="1792" -d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5 -q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89 -q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" /> - <glyph glyph-name="_412" unicode="&#xf1b7;" -d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5 -q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5 -q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z -" /> - <glyph glyph-name="_413" unicode="&#xf1b8;" horiz-adv-x="1792" -d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188 -l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5 -t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1 -q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" /> - <glyph glyph-name="_414" unicode="&#xf1b9;" horiz-adv-x="2048" -d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384 -q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5 -l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" /> - <glyph glyph-name="_415" unicode="&#xf1ba;" horiz-adv-x="2048" -d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5 -t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z -M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" /> - <glyph glyph-name="_416" unicode="&#xf1bb;" -d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384 -q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" /> - <glyph glyph-name="_417" unicode="&#xf1bc;" -d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64 -q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37 -q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_418" unicode="&#xf1bd;" horiz-adv-x="1024" -d="M1024 1233l-303 -582l24 -31h279v-415h-507l-44 -30l-142 -273l-30 -30h-301v303l303 583l-24 30h-279v415h507l44 30l142 273l30 30h301v-303z" /> - <glyph glyph-name="_419" unicode="&#xf1be;" horiz-adv-x="2304" -d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11 -q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245 -q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785 -l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242 -q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236 -q0 -11 -8 -19t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786 -q-13 2 -22 11t-9 22v899q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" /> - <glyph glyph-name="uniF1C0" unicode="&#xf1c0;" -d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127 -t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5 -t-103 128v128q0 69 103 128t280 93.5t385 34.5z" /> - <glyph glyph-name="uniF1C1" unicode="&#xf1c1;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197 -q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8 -q-1 1 -1 2q-1 2 -1 3q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" /> - <glyph glyph-name="_422" unicode="&#xf1c2;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4q0 3 -0.5 6.5t-1.5 8t-1 6.5q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5 -t-3.5 -21.5l-4 -21h-4l-2 21q-2 26 -7 46l-99 438h90v107h-300z" /> - <glyph glyph-name="_423" unicode="&#xf1c3;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107 -h-290v-107h68l189 -272l-194 -283h-68z" /> - <glyph glyph-name="_424" unicode="&#xf1c4;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" /> - <glyph glyph-name="_425" unicode="&#xf1c5;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" /> - <glyph glyph-name="_426" unicode="&#xf1c6;" -d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400 -v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79 -q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" /> - <glyph glyph-name="_427" unicode="&#xf1c7;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5 -q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" /> - <glyph glyph-name="_428" unicode="&#xf1c8;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" /> - <glyph glyph-name="_429" unicode="&#xf1c9;" -d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z -M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243 -l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" /> - <glyph glyph-name="_430" unicode="&#xf1ca;" -d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406 -q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" /> - <glyph glyph-name="_431" unicode="&#xf1cb;" horiz-adv-x="1792" -d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546 -q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" /> - <glyph glyph-name="_432" unicode="&#xf1cc;" horiz-adv-x="2048" -d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94 -q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55 -t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97l93 -108q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5t-85 -189.5z" /> - <glyph glyph-name="_433" unicode="&#xf1cd;" horiz-adv-x="1792" -d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194 -q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5 -t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" /> - <glyph glyph-name="_434" unicode="&#xf1ce;" horiz-adv-x="1792" -d="M1760 640q0 -176 -68.5 -336t-184 -275.5t-275.5 -184t-336 -68.5t-336 68.5t-275.5 184t-184 275.5t-68.5 336q0 213 97 398.5t265 305.5t374 151v-228q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5 -t136.5 204t51 248.5q0 230 -145.5 406t-366.5 221v228q206 -31 374 -151t265 -305.5t97 -398.5z" /> - <glyph glyph-name="uniF1D0" unicode="&#xf1d0;" horiz-adv-x="1792" -d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41 -t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170 -t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136 -q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" /> - <glyph glyph-name="uniF1D1" unicode="&#xf1d1;" horiz-adv-x="1792" -d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251 -l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162 -q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33 -q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5 -t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 -t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="uniF1D2" unicode="&#xf1d2;" -d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85 -q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392 -q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072 -q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_438" unicode="&#xf1d3;" horiz-adv-x="1792" -d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58 -q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47 -q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171 -v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" /> - <glyph glyph-name="_439" unicode="&#xf1d4;" -d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="uniF1D5" unicode="&#xf1d5;" horiz-adv-x="1280" -d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5 -t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153 -t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" /> - <glyph glyph-name="uniF1D6" unicode="&#xf1d6;" horiz-adv-x="1792" -d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5 -q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20 -t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5 -t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" /> - <glyph glyph-name="uniF1D7" unicode="&#xf1d7;" horiz-adv-x="2048" -d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25 -q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5 -q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109 -q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" /> - <glyph glyph-name="_443" unicode="&#xf1d8;" horiz-adv-x="1792" -d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" /> - <glyph glyph-name="_444" unicode="&#xf1d9;" horiz-adv-x="1792" -d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 -l863 639l-478 -797z" /> - <glyph glyph-name="_445" unicode="&#xf1da;" -d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 -t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23 -t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" /> - <glyph glyph-name="_446" unicode="&#xf1db;" -d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 -t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_447" unicode="&#xf1dc;" horiz-adv-x="1792" -d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15 -t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2 -t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160 -q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5 -q0 -26 -12 -48t-36 -22z" /> - <glyph glyph-name="_448" unicode="&#xf1dd;" horiz-adv-x="1280" -d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179 -q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" /> - <glyph glyph-name="_449" unicode="&#xf1de;" -d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256 -q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" /> - <glyph glyph-name="uniF1E0" unicode="&#xf1e0;" -d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5 -t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" /> - <glyph glyph-name="_451" unicode="&#xf1e1;" -d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5 -t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_452" unicode="&#xf1e2;" horiz-adv-x="1792" -d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5 -t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91 -q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9 -t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" /> - <glyph glyph-name="_453" unicode="&#xf1e3;" horiz-adv-x="1792" -d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323 -l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" /> - <glyph glyph-name="_454" unicode="&#xf1e4;" horiz-adv-x="1792" -d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 -v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192 -q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23 -zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5 -t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" /> - <glyph glyph-name="_455" unicode="&#xf1e5;" horiz-adv-x="1792" -d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z -M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" /> - <glyph glyph-name="_456" unicode="&#xf1e6;" horiz-adv-x="1792" -d="M1755 1083q37 -38 37 -90.5t-37 -90.5l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234 -l401 400q38 37 91 37t90 -37z" /> - <glyph glyph-name="_457" unicode="&#xf1e7;" horiz-adv-x="1792" -d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5 -t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z -M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q4 -2 11.5 -7 -t10.5 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" /> - <glyph glyph-name="_458" unicode="&#xf1e8;" horiz-adv-x="1792" -d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" /> - <glyph glyph-name="_459" unicode="&#xf1e9;" -d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36 -q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q71 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5 -t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87 -q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" /> - <glyph glyph-name="_460" unicode="&#xf1ea;" horiz-adv-x="2048" -d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19 -t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" /> - <glyph glyph-name="_461" unicode="&#xf1eb;" horiz-adv-x="2048" -d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121 -q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z -M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" /> - <glyph glyph-name="_462" unicode="&#xf1ec;" horiz-adv-x="1792" -d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 -t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5 -t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5 -t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z -M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38 -h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_463" unicode="&#xf1ed;" -d="M1519 890q18 -84 -4 -204q-87 -444 -565 -444h-44q-25 0 -44 -16.5t-24 -42.5l-4 -19l-55 -346l-2 -15q-5 -26 -24.5 -42.5t-44.5 -16.5h-251q-21 0 -33 15t-9 36q9 56 26.5 168t26.5 168t27 167.5t27 167.5q5 37 43 37h131q133 -2 236 21q175 39 287 144q102 95 155 246 -q24 70 35 133q1 6 2.5 7.5t3.5 1t6 -3.5q79 -59 98 -162zM1347 1172q0 -107 -46 -236q-80 -233 -302 -315q-113 -40 -252 -42q0 -1 -90 -1l-90 1q-100 0 -118 -96q-2 -8 -85 -530q-1 -10 -12 -10h-295q-22 0 -36.5 16.5t-11.5 38.5l232 1471q5 29 27.5 48t51.5 19h598 -q34 0 97.5 -13t111.5 -32q107 -41 163.5 -123t56.5 -196z" /> - <glyph glyph-name="_464" unicode="&#xf1ee;" horiz-adv-x="1792" -d="M441 864q33 0 52 -26q266 -364 362 -774h-446q-127 441 -367 749q-12 16 -3 33.5t29 17.5h373zM1000 507q-49 -199 -125 -393q-79 310 -256 594q40 221 44 449q211 -340 337 -650zM1099 1216q235 -324 384.5 -698.5t184.5 -773.5h-451q-41 665 -553 1472h435zM1792 640 -q0 -424 -101 -812q-67 560 -359 1083q-25 301 -106 584q-4 16 5.5 28.5t25.5 12.5h359q21 0 38.5 -13t22.5 -33q115 -409 115 -850z" /> - <glyph glyph-name="uniF1F0" unicode="&#xf1f0;" horiz-adv-x="2304" -d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27 -q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128 -q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_466" unicode="&#xf1f1;" horiz-adv-x="2304" -d="M1119 1195q-128 85 -281 85q-103 0 -197.5 -40.5t-162.5 -108.5t-108.5 -162t-40.5 -197q0 -104 40.5 -198t108.5 -162t162 -108.5t198 -40.5q153 0 281 85q-131 107 -178 265.5t0.5 316.5t177.5 265zM1152 1171q-126 -99 -172 -249.5t-0.5 -300.5t172.5 -249 -q127 99 172.5 249t-0.5 300.5t-172 249.5zM1185 1195q130 -107 177.5 -265.5t0.5 -317t-178 -264.5q128 -85 281 -85q104 0 198 40.5t162 108.5t108.5 162t40.5 198q0 103 -40.5 197t-108.5 162t-162.5 108.5t-197.5 40.5q-153 0 -281 -85zM1926 473h7v3h-17v-3h7v-17h3v17z -M1955 456h4v20h-5l-6 -13l-6 13h-5v-20h3v15l6 -13h4l5 13v-15zM1947 16v-2h-2h-3v3h3h2v-1zM1947 7h3l-4 5h2l1 1q1 1 1 3t-1 3l-1 1h-3h-6v-13h3v5h1zM685 75q0 19 11 31t30 12q18 0 29 -12.5t11 -30.5q0 -19 -11 -31t-29 -12q-19 0 -30 12t-11 31zM1158 119q30 0 35 -32 -h-70q5 32 35 32zM1514 75q0 19 11 31t29 12t29.5 -12.5t11.5 -30.5q0 -19 -11 -31t-30 -12q-18 0 -29 12t-11 31zM1786 75q0 18 11.5 30.5t29.5 12.5t29.5 -12.5t11.5 -30.5q0 -19 -11.5 -31t-29.5 -12t-29.5 12.5t-11.5 30.5zM1944 3q-2 0 -4 1q-1 0 -3 2t-2 3q-1 2 -1 4 -q0 3 1 4q0 2 2 4l1 1q2 0 2 1q2 1 4 1q3 0 4 -1l4 -2l2 -4v-1q1 -2 1 -3l-1 -1v-3t-1 -1l-1 -2q-2 -2 -4 -2q-1 -1 -4 -1zM599 7h30v85q0 24 -14.5 38.5t-39.5 15.5q-32 0 -47 -24q-14 24 -45 24q-24 0 -39 -20v16h-30v-135h30v75q0 36 33 36q30 0 30 -36v-75h29v75 -q0 36 33 36q30 0 30 -36v-75zM765 7h29v68v67h-29v-16q-17 20 -43 20q-29 0 -48 -20t-19 -51t19 -51t48 -20q28 0 43 20v-17zM943 48q0 34 -47 40l-14 2q-23 4 -23 14q0 15 25 15q23 0 43 -11l12 24q-22 14 -55 14q-26 0 -41 -12t-15 -32q0 -33 47 -39l13 -2q24 -4 24 -14 -q0 -17 -31 -17q-25 0 -45 14l-13 -23q25 -17 58 -17q29 0 45.5 12t16.5 32zM1073 14l-8 25q-13 -7 -26 -7q-19 0 -19 22v61h48v27h-48v41h-30v-41h-28v-27h28v-61q0 -50 47 -50q21 0 36 10zM1159 146q-29 0 -48 -20t-19 -51q0 -32 19.5 -51.5t49.5 -19.5q33 0 55 19l-14 22 -q-18 -15 -39 -15q-34 0 -41 33h101v12q0 32 -18 51.5t-46 19.5zM1318 146q-23 0 -35 -20v16h-30v-135h30v76q0 35 29 35q10 0 18 -4l9 28q-9 4 -21 4zM1348 75q0 -31 19.5 -51t52.5 -20q29 0 48 16l-14 24q-18 -13 -35 -12q-18 0 -29.5 12t-11.5 31t11.5 31t29.5 12 -q19 0 35 -12l14 24q-20 16 -48 16q-33 0 -52.5 -20t-19.5 -51zM1593 7h30v68v67h-30v-16q-15 20 -42 20q-29 0 -48.5 -20t-19.5 -51t19.5 -51t48.5 -20q28 0 42 20v-17zM1726 146q-23 0 -35 -20v16h-29v-135h29v76q0 35 29 35q10 0 18 -4l9 28q-8 4 -21 4zM1866 7h29v68v122 -h-29v-71q-15 20 -43 20t-47.5 -20.5t-19.5 -50.5t19.5 -50.5t47.5 -20.5q29 0 43 20v-17zM1944 27l-2 -1h-3q-2 -1 -4 -3q-3 -1 -3 -4q-1 -2 -1 -6q0 -3 1 -5q0 -2 3 -4q2 -2 4 -3t5 -1q4 0 6 1q0 1 2 2l2 1q1 1 3 4q1 2 1 5q0 4 -1 6q-1 1 -3 4q0 1 -2 2l-2 1q-1 0 -3 0.5 -t-3 0.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_467" unicode="&#xf1f2;" horiz-adv-x="2304" -d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42 -q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604 -v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569 -q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73 -t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" /> - <glyph glyph-name="f1f3" unicode="&#xf1f3;" horiz-adv-x="2304" -d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z -M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260 -l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279 -v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040 -q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168 -q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5 -t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21 -h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5 -t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" /> - <glyph glyph-name="_469" unicode="&#xf1f4;" horiz-adv-x="2304" -d="M745 630q0 -37 -25.5 -61.5t-62.5 -24.5q-29 0 -46.5 16t-17.5 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM1530 779q0 -42 -22 -57t-66 -15l-32 -1l17 107q2 11 13 11h18q22 0 35 -2t25 -12.5t12 -30.5zM1881 630q0 -36 -25.5 -61t-61.5 -25q-29 0 -47 16 -t-18 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM513 801q0 59 -38.5 85.5t-100.5 26.5h-160q-19 0 -21 -19l-65 -408q-1 -6 3 -11t10 -5h76q20 0 22 19l18 110q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM822 489l41 261q1 6 -3 11t-10 5h-76 -q-14 0 -17 -33q-27 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q28 0 58 12t48 32q-4 -12 -4 -21q0 -16 13 -16h69q19 0 22 19zM1269 752q0 5 -4 9.5t-9 4.5h-77q-11 0 -18 -10l-106 -156l-44 150q-5 16 -22 16h-75q-5 0 -9 -4.5t-4 -9.5q0 -2 19.5 -59 -t42 -123t23.5 -70q-82 -112 -82 -120q0 -13 13 -13h77q11 0 18 10l255 368q2 2 2 7zM1649 801q0 59 -38.5 85.5t-100.5 26.5h-159q-20 0 -22 -19l-65 -408q-1 -6 3 -11t10 -5h82q12 0 16 13l18 116q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM1958 489 -l41 261q1 6 -3 11t-10 5h-76q-14 0 -17 -33q-26 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q29 0 59 12t47 32q0 -1 -2 -9t-2 -12q0 -16 13 -16h69q19 0 22 19zM2176 898v1q0 14 -13 14h-74q-11 0 -13 -11l-65 -416l-1 -2q0 -5 4 -9.5t10 -4.5h66 -q19 0 21 19zM392 764q-5 -35 -26 -46t-60 -11l-33 -1l17 107q2 11 13 11h19q40 0 58 -11.5t12 -48.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_470" unicode="&#xf1f5;" horiz-adv-x="2304" -d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109 -q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118 -q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151 -q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31 -q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_471" unicode="&#xf1f6;" horiz-adv-x="2048" -d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5 -l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5 -l418 363q10 8 23.5 7t21.5 -11z" /> - <glyph glyph-name="_472" unicode="&#xf1f7;" horiz-adv-x="2048" -d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128 -q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161 -q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" /> - <glyph glyph-name="_473" unicode="&#xf1f8;" horiz-adv-x="1408" -d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704 -q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167 -q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" /> - <glyph glyph-name="_474" unicode="&#xf1f9;" -d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5 -t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 -t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_475" unicode="&#xf1fa;" -d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53 -q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24 -t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61 -t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" /> - <glyph glyph-name="_476" unicode="&#xf1fb;" horiz-adv-x="1792" -d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10 -t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" /> - <glyph glyph-name="f1fc" unicode="&#xf1fc;" horiz-adv-x="1792" -d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5 -t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" /> - <glyph glyph-name="_478" unicode="&#xf1fd;" horiz-adv-x="1792" -d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11q24 0 44 -7t31 -15t33 -27q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5 -t47 37.5q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-24 0 -44 7t-31 15t-33 27q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38 -t-58 27t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448 -h256v448h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5 -q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" /> - <glyph glyph-name="_479" unicode="&#xf1fe;" horiz-adv-x="2048" -d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" /> - <glyph glyph-name="_480" unicode="&#xf200;" horiz-adv-x="1792" -d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_481" unicode="&#xf201;" horiz-adv-x="2048" -d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9 -t9 -23z" /> - <glyph glyph-name="_482" unicode="&#xf202;" horiz-adv-x="1792" -d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20 -q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50 -t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1 -q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" /> - <glyph glyph-name="_483" unicode="&#xf203;" -d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73 -q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110 -q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960 -q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_484" unicode="&#xf204;" horiz-adv-x="2048" -d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5 -t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5 -t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" /> - <glyph glyph-name="_485" unicode="&#xf205;" horiz-adv-x="2048" -d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5 -t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" /> - <glyph glyph-name="_486" unicode="&#xf206;" horiz-adv-x="2304" -d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94 -q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469 -q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400 -q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" /> - <glyph glyph-name="_487" unicode="&#xf207;" -d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5 -h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 -t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" /> - <glyph glyph-name="_488" unicode="&#xf208;" horiz-adv-x="2048" -d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327 -q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5 -q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" /> - <glyph glyph-name="_489" unicode="&#xf209;" horiz-adv-x="1280" -d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q17 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119 -t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5 -t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14 -q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88 -q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5 -t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" /> - <glyph glyph-name="_490" unicode="&#xf20a;" horiz-adv-x="2048" -d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206 -q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307 -t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14 -t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" /> - <glyph glyph-name="_491" unicode="&#xf20b;" -d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5 -t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" /> - <glyph glyph-name="_492" unicode="&#xf20c;" -d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55 -q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410 -q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" /> - <glyph glyph-name="_493" unicode="&#xf20d;" -d="M915 450h-294l147 551zM1001 128h311l-324 1024h-440l-324 -1024h311l383 314zM1536 1120v-960q0 -118 -85 -203t-203 -85h-960q-118 0 -203 85t-85 203v960q0 118 85 203t203 85h960q118 0 203 -85t85 -203z" /> - <glyph glyph-name="_494" unicode="&#xf20e;" horiz-adv-x="2048" -d="M2048 641q0 -21 -13 -36.5t-33 -19.5l-205 -356q3 -9 3 -18q0 -20 -12.5 -35.5t-32.5 -19.5l-193 -337q3 -8 3 -16q0 -23 -16.5 -40t-40.5 -17q-25 0 -41 18h-400q-17 -20 -43 -20t-43 20h-399q-17 -20 -43 -20q-23 0 -40 16.5t-17 40.5q0 8 4 20l-193 335 -q-20 4 -32.5 19.5t-12.5 35.5q0 9 3 18l-206 356q-20 5 -32.5 20.5t-12.5 35.5q0 21 13.5 36.5t33.5 19.5l199 344q0 1 -0.5 3t-0.5 3q0 36 34 51l209 363q-4 10 -4 18q0 24 17 40.5t40 16.5q26 0 44 -21h396q16 21 43 21t43 -21h398q18 21 44 21q23 0 40 -16.5t17 -40.5 -q0 -6 -4 -18l207 -358q23 -1 39 -17.5t16 -38.5q0 -13 -7 -27l187 -324q19 -4 31.5 -19.5t12.5 -35.5zM1063 -158h389l-342 354h-143l-342 -354h360q18 16 39 16t39 -16zM112 654q1 -4 1 -13q0 -10 -2 -15l208 -360l15 -6l188 199v347l-187 194q-13 -8 -29 -10zM986 1438 -h-388l190 -200l554 200h-280q-16 -16 -38 -16t-38 16zM1689 226q1 6 5 11l-64 68l-17 -79h76zM1583 226l22 105l-252 266l-296 -307l63 -64h463zM1495 -142l16 28l65 310h-427l333 -343q8 4 13 5zM578 -158h5l342 354h-373v-335l4 -6q14 -5 22 -13zM552 226h402l64 66 -l-309 321l-157 -166v-221zM359 226h163v189l-168 -177q4 -8 5 -12zM358 1051q0 -1 0.5 -2t0.5 -2q0 -16 -8 -29l171 -177v269zM552 1121v-311l153 -157l297 314l-223 236zM556 1425l-4 -8v-264l205 74l-191 201q-6 -2 -10 -3zM1447 1438h-16l-621 -224l213 -225zM1023 946 -l-297 -315l311 -319l296 307zM688 634l-136 141v-284zM1038 270l-42 -44h85zM1374 618l238 -251l132 624l-3 5l-1 1zM1718 1018q-8 13 -8 29v2l-216 376q-5 1 -13 5l-437 -463l310 -327zM522 1142v223l-163 -282zM522 196h-163l163 -283v283zM1607 196l-48 -227l130 227h-82 -zM1729 266l207 361q-2 10 -2 14q0 1 3 16l-171 296l-129 -612l77 -82q5 3 15 7z" /> - <glyph glyph-name="f210" unicode="&#xf210;" -d="M0 856q0 131 91.5 226.5t222.5 95.5h742l352 358v-1470q0 -132 -91.5 -227t-222.5 -95h-780q-131 0 -222.5 95t-91.5 227v790zM1232 102l-176 180v425q0 46 -32 79t-78 33h-484q-46 0 -78 -33t-32 -79v-492q0 -46 32.5 -79.5t77.5 -33.5h770z" /> - <glyph glyph-name="_496" unicode="&#xf211;" -d="M934 1386q-317 -121 -556 -362.5t-358 -560.5q-20 89 -20 176q0 208 102.5 384.5t278.5 279t384 102.5q82 0 169 -19zM1203 1267q93 -65 164 -155q-389 -113 -674.5 -400.5t-396.5 -676.5q-93 72 -155 162q112 386 395 671t667 399zM470 -67q115 356 379.5 622t619.5 384 -q40 -92 54 -195q-292 -120 -516 -345t-343 -518q-103 14 -194 52zM1536 -125q-193 50 -367 115q-135 -84 -290 -107q109 205 274 370.5t369 275.5q-21 -152 -101 -284q65 -175 115 -370z" /> - <glyph glyph-name="f212" unicode="&#xf212;" horiz-adv-x="2048" -d="M1893 1144l155 -1272q-131 0 -257 57q-200 91 -393 91q-226 0 -374 -148q-148 148 -374 148q-193 0 -393 -91q-128 -57 -252 -57h-5l155 1272q224 127 482 127q233 0 387 -106q154 106 387 106q258 0 482 -127zM1398 157q129 0 232 -28.5t260 -93.5l-124 1021 -q-171 78 -368 78q-224 0 -374 -141q-150 141 -374 141q-197 0 -368 -78l-124 -1021q105 43 165.5 65t148.5 39.5t178 17.5q202 0 374 -108q172 108 374 108zM1438 191l-55 907q-211 -4 -359 -155q-152 155 -374 155q-176 0 -336 -66l-114 -941q124 51 228.5 76t221.5 25 -q209 0 374 -102q172 107 374 102z" /> - <glyph glyph-name="_498" unicode="&#xf213;" horiz-adv-x="2048" -d="M1500 165v733q0 21 -15 36t-35 15h-93q-20 0 -35 -15t-15 -36v-733q0 -20 15 -35t35 -15h93q20 0 35 15t15 35zM1216 165v531q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-531q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM924 165v429q0 20 -15 35t-35 15h-101 -q-20 0 -35 -15t-15 -35v-429q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM632 165v362q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-362q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM2048 311q0 -166 -118 -284t-284 -118h-1244q-166 0 -284 118t-118 284 -q0 116 63 214.5t168 148.5q-10 34 -10 73q0 113 80.5 193.5t193.5 80.5q102 0 180 -67q45 183 194 300t338 117q149 0 275 -73.5t199.5 -199.5t73.5 -275q0 -66 -14 -122q135 -33 221 -142.5t86 -247.5z" /> - <glyph glyph-name="_499" unicode="&#xf214;" -d="M0 1536h1536v-1392l-776 -338l-760 338v1392zM1436 209v926h-1336v-926l661 -294zM1436 1235v201h-1336v-201h1336zM181 937v-115h-37v115h37zM181 789v-115h-37v115h37zM181 641v-115h-37v115h37zM181 493v-115h-37v115h37zM181 345v-115h-37v115h37zM207 202l15 34 -l105 -47l-15 -33zM343 142l15 34l105 -46l-15 -34zM478 82l15 34l105 -46l-15 -34zM614 23l15 33l104 -46l-15 -34zM797 10l105 46l15 -33l-105 -47zM932 70l105 46l15 -34l-105 -46zM1068 130l105 46l15 -34l-105 -46zM1203 189l105 47l15 -34l-105 -46zM259 1389v-36h-114 -v36h114zM421 1389v-36h-115v36h115zM583 1389v-36h-115v36h115zM744 1389v-36h-114v36h114zM906 1389v-36h-114v36h114zM1068 1389v-36h-115v36h115zM1230 1389v-36h-115v36h115zM1391 1389v-36h-114v36h114zM181 1049v-79h-37v115h115v-36h-78zM421 1085v-36h-115v36h115z -M583 1085v-36h-115v36h115zM744 1085v-36h-114v36h114zM906 1085v-36h-114v36h114zM1068 1085v-36h-115v36h115zM1230 1085v-36h-115v36h115zM1355 970v79h-78v36h115v-115h-37zM1355 822v115h37v-115h-37zM1355 674v115h37v-115h-37zM1355 526v115h37v-115h-37zM1355 378 -v115h37v-115h-37zM1355 230v115h37v-115h-37zM760 265q-129 0 -221 91.5t-92 221.5q0 129 92 221t221 92q130 0 221.5 -92t91.5 -221q0 -130 -91.5 -221.5t-221.5 -91.5zM595 646q0 -36 19.5 -56.5t49.5 -25t64 -7t64 -2t49.5 -9t19.5 -30.5q0 -49 -112 -49q-97 0 -123 51 -h-3l-31 -63q67 -42 162 -42q29 0 56.5 5t55.5 16t45.5 33t17.5 53q0 46 -27.5 69.5t-67.5 27t-79.5 3t-67 5t-27.5 25.5q0 21 20.5 33t40.5 15t41 3q34 0 70.5 -11t51.5 -34h3l30 58q-3 1 -21 8.5t-22.5 9t-19.5 7t-22 7t-20 4.5t-24 4t-23 1q-29 0 -56.5 -5t-54 -16.5 -t-43 -34t-16.5 -53.5z" /> - <glyph glyph-name="_500" unicode="&#xf215;" horiz-adv-x="2048" -d="M863 504q0 112 -79.5 191.5t-191.5 79.5t-191 -79.5t-79 -191.5t79 -191t191 -79t191.5 79t79.5 191zM1726 505q0 112 -79 191t-191 79t-191.5 -79t-79.5 -191q0 -113 79.5 -192t191.5 -79t191 79.5t79 191.5zM2048 1314v-1348q0 -44 -31.5 -75.5t-76.5 -31.5h-1832 -q-45 0 -76.5 31.5t-31.5 75.5v1348q0 44 31.5 75.5t76.5 31.5h431q44 0 76 -31.5t32 -75.5v-161h754v161q0 44 32 75.5t76 31.5h431q45 0 76.5 -31.5t31.5 -75.5z" /> - <glyph glyph-name="_501" unicode="&#xf216;" horiz-adv-x="2048" -d="M1430 953zM1690 749q148 0 253 -98.5t105 -244.5q0 -157 -109 -261.5t-267 -104.5q-85 0 -162 27.5t-138 73.5t-118 106t-109 126t-103.5 132.5t-108.5 126.5t-117 106t-136 73.5t-159 27.5q-154 0 -251.5 -91.5t-97.5 -244.5q0 -157 104 -250t263 -93q100 0 208 37.5 -t193 98.5q5 4 21 18.5t30 24t22 9.5q14 0 24.5 -10.5t10.5 -24.5q0 -24 -60 -77q-101 -88 -234.5 -142t-260.5 -54q-133 0 -245.5 58t-180 165t-67.5 241q0 205 141.5 341t347.5 136q120 0 226.5 -43.5t185.5 -113t151.5 -153t139 -167.5t133.5 -153.5t149.5 -113 -t172.5 -43.5q102 0 168.5 61.5t66.5 162.5q0 95 -64.5 159t-159.5 64q-30 0 -81.5 -18.5t-68.5 -18.5q-20 0 -35.5 15t-15.5 35q0 18 8.5 57t8.5 59q0 159 -107.5 263t-266.5 104q-58 0 -111.5 -18.5t-84 -40.5t-55.5 -40.5t-33 -18.5q-15 0 -25.5 10.5t-10.5 25.5 -q0 19 25 46q59 67 147 103.5t182 36.5q191 0 318 -125.5t127 -315.5q0 -37 -4 -66q57 15 115 15z" /> - <glyph glyph-name="_502" unicode="&#xf217;" horiz-adv-x="1664" -d="M1216 832q0 26 -19 45t-45 19h-128v128q0 26 -19 45t-45 19t-45 -19t-19 -45v-128h-128q-26 0 -45 -19t-19 -45t19 -45t45 -19h128v-128q0 -26 19 -45t45 -19t45 19t19 45v128h128q26 0 45 19t19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 -t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 -q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" /> - <glyph glyph-name="_503" unicode="&#xf218;" horiz-adv-x="1664" -d="M1280 832q0 26 -19 45t-45 19t-45 -19l-147 -146v293q0 26 -19 45t-45 19t-45 -19t-19 -45v-293l-147 146q-19 19 -45 19t-45 -19t-19 -45t19 -45l256 -256q19 -19 45 -19t45 19l256 256q19 19 19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 -t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 -q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" /> - <glyph glyph-name="_504" unicode="&#xf219;" horiz-adv-x="2048" -d="M212 768l623 -665l-300 665h-323zM1024 -4l349 772h-698zM538 896l204 384h-262l-288 -384h346zM1213 103l623 665h-323zM683 896h682l-204 384h-274zM1510 896h346l-288 384h-262zM1651 1382l384 -512q14 -18 13 -41.5t-17 -40.5l-960 -1024q-18 -20 -47 -20t-47 20 -l-960 1024q-16 17 -17 40.5t13 41.5l384 512q18 26 51 26h1152q33 0 51 -26z" /> - <glyph glyph-name="_505" unicode="&#xf21a;" horiz-adv-x="2048" -d="M1811 -19q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 -q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83 -q19 19 45 19t45 -19l83 -83zM237 19q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -82l83 82q19 19 45 19t45 -19l83 -82l64 64v293l-210 314q-17 26 -7 56.5t40 40.5l177 58v299h128v128h256v128h256v-128h256v-128h128v-299l177 -58q30 -10 40 -40.5t-7 -56.5l-210 -314 -v-293l19 18q19 19 45 19t45 -19l83 -82l83 82q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 -q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83zM640 1152v-128l384 128l384 -128v128h-128v128h-512v-128h-128z" /> - <glyph glyph-name="_506" unicode="&#xf21b;" -d="M576 0l96 448l-96 128l-128 64zM832 0l128 640l-128 -64l-96 -128zM992 1010q-2 4 -4 6q-10 8 -96 8q-70 0 -167 -19q-7 -2 -21 -2t-21 2q-97 19 -167 19q-86 0 -96 -8q-2 -2 -4 -6q2 -18 4 -27q2 -3 7.5 -6.5t7.5 -10.5q2 -4 7.5 -20.5t7 -20.5t7.5 -17t8.5 -17t9 -14 -t12 -13.5t14 -9.5t17.5 -8t20.5 -4t24.5 -2q36 0 59 12.5t32.5 30t14.5 34.5t11.5 29.5t17.5 12.5h12q11 0 17.5 -12.5t11.5 -29.5t14.5 -34.5t32.5 -30t59 -12.5q13 0 24.5 2t20.5 4t17.5 8t14 9.5t12 13.5t9 14t8.5 17t7.5 17t7 20.5t7.5 20.5q2 7 7.5 10.5t7.5 6.5 -q2 9 4 27zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 61 4.5 118t19 125.5t37.5 123.5t63.5 103.5t93.5 74.5l-90 220h214q-22 64 -22 128q0 12 2 32q-194 40 -194 96q0 57 210 99q17 62 51.5 134t70.5 114q32 37 76 37q30 0 84 -31t84 -31t84 31 -t84 31q44 0 76 -37q36 -42 70.5 -114t51.5 -134q210 -42 210 -99q0 -56 -194 -96q7 -81 -20 -160h214l-82 -225q63 -33 107.5 -96.5t65.5 -143.5t29 -151.5t8 -148.5z" /> - <glyph glyph-name="_507" unicode="&#xf21c;" horiz-adv-x="2304" -d="M2301 500q12 -103 -22 -198.5t-99 -163.5t-158.5 -106t-196.5 -31q-161 11 -279.5 125t-134.5 274q-12 111 27.5 210.5t118.5 170.5l-71 107q-96 -80 -151 -194t-55 -244q0 -27 -18.5 -46.5t-45.5 -19.5h-256h-69q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5 -t-131.5 316.5t131.5 316.5t316.5 131.5q76 0 152 -27l24 45q-123 110 -304 110h-64q-26 0 -45 19t-19 45t19 45t45 19h128q78 0 145 -13.5t116.5 -38.5t71.5 -39.5t51 -36.5h512h115l-85 128h-222q-30 0 -49 22.5t-14 52.5q4 23 23 38t43 15h253q33 0 53 -28l70 -105 -l114 114q19 19 46 19h101q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-179l115 -172q131 63 275 36q143 -26 244 -134.5t118 -253.5zM448 128q115 0 203 72.5t111 183.5h-314q-35 0 -55 31q-18 32 -1 63l147 277q-47 13 -91 13q-132 0 -226 -94t-94 -226t94 -226 -t226 -94zM1856 128q132 0 226 94t94 226t-94 226t-226 94q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94z" /> - <glyph glyph-name="_508" unicode="&#xf21d;" -d="M1408 0q0 -63 -61.5 -113.5t-164 -81t-225 -46t-253.5 -15.5t-253.5 15.5t-225 46t-164 81t-61.5 113.5q0 49 33 88.5t91 66.5t118 44.5t131 29.5q26 5 48 -10.5t26 -41.5q5 -26 -10.5 -48t-41.5 -26q-58 -10 -106 -23.5t-76.5 -25.5t-48.5 -23.5t-27.5 -19.5t-8.5 -12 -q3 -11 27 -26.5t73 -33t114 -32.5t160.5 -25t201.5 -10t201.5 10t160.5 25t114 33t73 33.5t27 27.5q-1 4 -8.5 11t-27.5 19t-48.5 23.5t-76.5 25t-106 23.5q-26 4 -41.5 26t-10.5 48q4 26 26 41.5t48 10.5q71 -12 131 -29.5t118 -44.5t91 -66.5t33 -88.5zM1024 896v-384 -q0 -26 -19 -45t-45 -19h-64v-384q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v384h-64q-26 0 -45 19t-19 45v384q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5zM928 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5 -t158.5 -65.5t65.5 -158.5z" /> - <glyph glyph-name="_509" unicode="&#xf21e;" horiz-adv-x="1792" -d="M1280 512h305q-5 -6 -10 -10.5t-9 -7.5l-3 -4l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-5 2 -21 20h369q22 0 39.5 13.5t22.5 34.5l70 281l190 -667q6 -20 23 -33t39 -13q21 0 38 13t23 33l146 485l56 -112q18 -35 57 -35zM1792 940q0 -145 -103 -300h-369l-111 221 -q-8 17 -25.5 27t-36.5 8q-45 -5 -56 -46l-129 -430l-196 686q-6 20 -23.5 33t-39.5 13t-39 -13.5t-22 -34.5l-116 -464h-423q-103 155 -103 300q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124 -t127 -344z" /> - <glyph glyph-name="venus" unicode="&#xf221;" horiz-adv-x="1280" -d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292 -q11 134 80.5 249t182 188t245.5 88q170 19 319 -54t236 -212t87 -306zM128 960q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5z" /> - <glyph glyph-name="_511" unicode="&#xf222;" -d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-382 -383q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5 -q203 0 359 -126l382 382h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_512" unicode="&#xf223;" horiz-adv-x="1280" -d="M830 1220q145 -72 233.5 -210.5t88.5 -305.5q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5 -t-147.5 384.5q0 167 88.5 305.5t233.5 210.5q-165 96 -228 273q-6 16 3.5 29.5t26.5 13.5h69q21 0 29 -20q44 -106 140 -171t214 -65t214 65t140 171q8 20 37 20h61q17 0 26.5 -13.5t3.5 -29.5q-63 -177 -228 -273zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 -t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_513" unicode="&#xf224;" -d="M1024 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 -q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-149 16 -270.5 103t-186.5 223.5t-53 291.5q16 204 160 353.5t347 172.5q118 14 228 -19t198 -103l255 254h-134q-14 0 -23 9t-9 23v64zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 -t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_514" unicode="&#xf225;" horiz-adv-x="1792" -d="M1280 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 -q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5t-147.5 384.5q0 201 126 359l-52 53l-101 -111q-9 -10 -22 -10.5t-23 7.5l-48 44q-10 8 -10.5 21.5t8.5 23.5l105 115l-111 112v-134q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9 -t-9 23v288q0 26 19 45t45 19h288q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-133l106 -107l86 94q9 10 22 10.5t23 -7.5l48 -44q10 -8 10.5 -21.5t-8.5 -23.5l-90 -99l57 -56q158 126 359 126t359 -126l255 254h-134q-14 0 -23 9t-9 23v64zM832 256q185 0 316.5 131.5 -t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_515" unicode="&#xf226;" horiz-adv-x="1792" -d="M1790 1007q12 -155 -52.5 -292t-186 -224t-271.5 -103v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-512v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23 -t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292q17 206 164.5 356.5t352.5 169.5q206 21 377 -94q171 115 377 94q205 -19 352.5 -169.5t164.5 -356.5zM896 647q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM576 512q115 0 218 57q-154 165 -154 391 -q0 224 154 391q-103 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5zM1152 128v260q-137 15 -256 94q-119 -79 -256 -94v-260h512zM1216 512q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5q-115 0 -218 -57q154 -167 154 -391 -q0 -226 -154 -391q103 -57 218 -57z" /> - <glyph glyph-name="_516" unicode="&#xf227;" horiz-adv-x="1920" -d="M1536 1120q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-31 -182 -166 -312t-318 -156q-210 -29 -384.5 80t-241.5 300q-117 6 -221 57.5t-177.5 133t-113.5 192.5t-32 230 -q9 135 78 252t182 191.5t248 89.5q118 14 227.5 -19t198.5 -103l255 254h-134q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q59 -74 93 -169q182 -9 328 -124l255 254h-134q-14 0 -23 9 -t-9 23v64zM1024 704q0 20 -4 58q-162 -25 -271 -150t-109 -292q0 -20 4 -58q162 25 271 150t109 292zM128 704q0 -168 111 -294t276 -149q-3 29 -3 59q0 210 135 369.5t338 196.5q-53 120 -163.5 193t-245.5 73q-185 0 -316.5 -131.5t-131.5 -316.5zM1088 -128 -q185 0 316.5 131.5t131.5 316.5q0 168 -111 294t-276 149q3 -28 3 -59q0 -210 -135 -369.5t-338 -196.5q53 -120 163.5 -193t245.5 -73z" /> - <glyph glyph-name="_517" unicode="&#xf228;" horiz-adv-x="2048" -d="M1664 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-32 -180 -164.5 -310t-313.5 -157q-223 -34 -409 90q-117 -78 -256 -93v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23 -t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-155 17 -279.5 109.5t-187 237.5t-39.5 307q25 187 159.5 322.5t320.5 164.5q224 34 410 -90q146 97 320 97q201 0 359 -126l255 254h-134q-14 0 -23 9 -t-9 23v64zM896 391q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM128 704q0 -185 131.5 -316.5t316.5 -131.5q117 0 218 57q-154 167 -154 391t154 391q-101 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5zM1216 256q185 0 316.5 131.5t131.5 316.5 -t-131.5 316.5t-316.5 131.5q-117 0 -218 -57q154 -167 154 -391t-154 -391q101 -57 218 -57z" /> - <glyph glyph-name="_518" unicode="&#xf229;" -d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-213 -214l140 -140q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-140 141l-78 -79q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5 -t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5q203 0 359 -126l78 78l-172 172q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l172 -172l213 213h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 -t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_519" unicode="&#xf22a;" horiz-adv-x="1280" -d="M640 892q217 -24 364.5 -187.5t147.5 -384.5q0 -167 -87 -306t-236 -212t-319 -54q-133 15 -245.5 88t-182 188t-80.5 249q-12 155 52.5 292t186 224t271.5 103v132h-160q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h160v165l-92 -92q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22 -t9 23l202 201q19 19 45 19t45 -19l202 -201q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-92 92v-165h160q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-160v-132zM576 -128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5 -t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_520" unicode="&#xf22b;" horiz-adv-x="2048" -d="M1901 621q19 -19 19 -45t-19 -45l-294 -294q-9 -10 -22.5 -10t-22.5 10l-45 45q-10 9 -10 22.5t10 22.5l185 185h-294v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-132q-24 -217 -187.5 -364.5t-384.5 -147.5q-167 0 -306 87t-212 236t-54 319q15 133 88 245.5 -t188 182t249 80.5q155 12 292 -52.5t224 -186t103 -271.5h132v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h294l-185 185q-10 9 -10 22.5t10 22.5l45 45q9 10 22.5 10t22.5 -10zM576 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5 -t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_521" unicode="&#xf22c;" horiz-adv-x="1280" -d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-612q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v612q-217 24 -364.5 187.5t-147.5 384.5q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM576 512q185 0 316.5 131.5 -t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" /> - <glyph glyph-name="_522" unicode="&#xf22d;" horiz-adv-x="1280" -d="M1024 576q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1152 576q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123 -t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5z" /> - <glyph glyph-name="_523" unicode="&#xf22e;" horiz-adv-x="1792" - /> - <glyph glyph-name="_524" unicode="&#xf22f;" horiz-adv-x="1792" - /> - <glyph glyph-name="_525" unicode="&#xf230;" -d="M1451 1408q35 0 60 -25t25 -60v-1366q0 -35 -25 -60t-60 -25h-391v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-735q-35 0 -60 25t-25 60v1366q0 35 25 60t60 25h1366z" /> - <glyph glyph-name="_526" unicode="&#xf231;" horiz-adv-x="1280" -d="M0 939q0 108 37.5 203.5t103.5 166.5t152 123t185 78t202 26q158 0 294 -66.5t221 -193.5t85 -287q0 -96 -19 -188t-60 -177t-100 -149.5t-145 -103t-189 -38.5q-68 0 -135 32t-96 88q-10 -39 -28 -112.5t-23.5 -95t-20.5 -71t-26 -71t-32 -62.5t-46 -77.5t-62 -86.5 -l-14 -5l-9 10q-15 157 -15 188q0 92 21.5 206.5t66.5 287.5t52 203q-32 65 -32 169q0 83 52 156t132 73q61 0 95 -40.5t34 -102.5q0 -66 -44 -191t-44 -187q0 -63 45 -104.5t109 -41.5q55 0 102 25t78.5 68t56 95t38 110.5t20 111t6.5 99.5q0 173 -109.5 269.5t-285.5 96.5 -q-200 0 -334 -129.5t-134 -328.5q0 -44 12.5 -85t27 -65t27 -45.5t12.5 -30.5q0 -28 -15 -73t-37 -45q-2 0 -17 3q-51 15 -90.5 56t-61 94.5t-32.5 108t-11 106.5z" /> - <glyph glyph-name="_527" unicode="&#xf232;" -d="M985 562q13 0 97.5 -44t89.5 -53q2 -5 2 -15q0 -33 -17 -76q-16 -39 -71 -65.5t-102 -26.5q-57 0 -190 62q-98 45 -170 118t-148 185q-72 107 -71 194v8q3 91 74 158q24 22 52 22q6 0 18 -1.5t19 -1.5q19 0 26.5 -6.5t15.5 -27.5q8 -20 33 -88t25 -75q0 -21 -34.5 -57.5 -t-34.5 -46.5q0 -7 5 -15q34 -73 102 -137q56 -53 151 -101q12 -7 22 -7q15 0 54 48.5t52 48.5zM782 32q127 0 243.5 50t200.5 134t134 200.5t50 243.5t-50 243.5t-134 200.5t-200.5 134t-243.5 50t-243.5 -50t-200.5 -134t-134 -200.5t-50 -243.5q0 -203 120 -368l-79 -233 -l242 77q158 -104 345 -104zM782 1414q153 0 292.5 -60t240.5 -161t161 -240.5t60 -292.5t-60 -292.5t-161 -240.5t-240.5 -161t-292.5 -60q-195 0 -365 94l-417 -134l136 405q-108 178 -108 389q0 153 60 292.5t161 240.5t240.5 161t292.5 60z" /> - <glyph glyph-name="_528" unicode="&#xf233;" horiz-adv-x="1792" -d="M128 128h1024v128h-1024v-128zM128 640h1024v128h-1024v-128zM1696 192q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM128 1152h1024v128h-1024v-128zM1696 704q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1696 1216 -q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1792 384v-384h-1792v384h1792zM1792 896v-384h-1792v384h1792zM1792 1408v-384h-1792v384h1792z" /> - <glyph glyph-name="_529" unicode="&#xf234;" horiz-adv-x="2048" -d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1664 512h352q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-352q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5 -t-9.5 22.5v352h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v352q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-352zM928 288q0 -52 38 -90t90 -38h256v-238q-68 -50 -171 -50h-874q-121 0 -194 69t-73 190q0 53 3.5 103.5t14 109t26.5 108.5 -t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q79 -61 154.5 -91.5t164.5 -30.5t164.5 30.5t154.5 91.5q20 17 39 17q132 0 217 -96h-223q-52 0 -90 -38t-38 -90v-192z" /> - <glyph glyph-name="_530" unicode="&#xf235;" horiz-adv-x="2048" -d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1781 320l249 -249q9 -9 9 -23q0 -13 -9 -22l-136 -136q-9 -9 -22 -9q-14 0 -23 9l-249 249l-249 -249q-9 -9 -23 -9q-13 0 -22 9l-136 136 -q-9 9 -9 22q0 14 9 23l249 249l-249 249q-9 9 -9 23q0 13 9 22l136 136q9 9 22 9q14 0 23 -9l249 -249l249 249q9 9 23 9q13 0 22 -9l136 -136q9 -9 9 -22q0 -14 -9 -23zM1283 320l-181 -181q-37 -37 -37 -91q0 -53 37 -90l83 -83q-21 -3 -44 -3h-874q-121 0 -194 69 -t-73 190q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q154 -122 319 -122t319 122q20 17 39 17q28 0 57 -6q-28 -27 -41 -50t-13 -56q0 -54 37 -91z" /> - <glyph glyph-name="_531" unicode="&#xf236;" horiz-adv-x="2048" -d="M256 512h1728q26 0 45 -19t19 -45v-448h-256v256h-1536v-256h-256v1216q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-704zM832 832q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM2048 576v64q0 159 -112.5 271.5t-271.5 112.5h-704 -q-26 0 -45 -19t-19 -45v-384h1152z" /> - <glyph glyph-name="_532" unicode="&#xf237;" -d="M1536 1536l-192 -448h192v-192h-274l-55 -128h329v-192h-411l-357 -832l-357 832h-411v192h329l-55 128h-274v192h192l-192 448h256l323 -768h378l323 768h256zM768 320l108 256h-216z" /> - <glyph glyph-name="_533" unicode="&#xf238;" -d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM768 192q80 0 136 56t56 136t-56 136t-136 56 -t-136 -56t-56 -136t56 -136t136 -56zM1344 768v512h-1152v-512h1152z" /> - <glyph glyph-name="_534" unicode="&#xf239;" -d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM288 224q66 0 113 47t47 113t-47 113t-113 47 -t-113 -47t-47 -113t47 -113t113 -47zM704 768v512h-544v-512h544zM1248 224q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM1408 768v512h-576v-512h576z" /> - <glyph glyph-name="_535" unicode="&#xf23a;" horiz-adv-x="1792" -d="M597 1115v-1173q0 -25 -12.5 -42.5t-36.5 -17.5q-17 0 -33 8l-465 233q-21 10 -35.5 33.5t-14.5 46.5v1140q0 20 10 34t29 14q14 0 44 -15l511 -256q3 -3 3 -5zM661 1014l534 -866l-534 266v600zM1792 996v-1054q0 -25 -14 -40.5t-38 -15.5t-47 13l-441 220zM1789 1116 -q0 -3 -256.5 -419.5t-300.5 -487.5l-390 634l324 527q17 28 52 28q14 0 26 -6l541 -270q4 -2 4 -6z" /> - <glyph glyph-name="_536" unicode="&#xf23b;" -d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1408v-1536h-1536v1536h1536z" /> - <glyph glyph-name="_537" unicode="&#xf23c;" horiz-adv-x="2296" -d="M478 -139q-8 -16 -27 -34.5t-37 -25.5q-25 -9 -51.5 3.5t-28.5 31.5q-1 22 40 55t68 38q23 4 34 -21.5t2 -46.5zM1819 -139q7 -16 26 -34.5t38 -25.5q25 -9 51.5 3.5t27.5 31.5q2 22 -39.5 55t-68.5 38q-22 4 -33 -21.5t-2 -46.5zM1867 -30q13 -27 56.5 -59.5t77.5 -41.5 -q45 -13 82 4.5t37 50.5q0 46 -67.5 100.5t-115.5 59.5q-40 5 -63.5 -37.5t-6.5 -76.5zM428 -30q-13 -27 -56 -59.5t-77 -41.5q-45 -13 -82 4.5t-37 50.5q0 46 67.5 100.5t115.5 59.5q40 5 63 -37.5t6 -76.5zM1158 1094h1q-41 0 -76 -15q27 -8 44 -30.5t17 -49.5 -q0 -35 -27 -60t-65 -25q-52 0 -80 43q-5 -23 -5 -42q0 -74 56 -126.5t135 -52.5q80 0 136 52.5t56 126.5t-56 126.5t-136 52.5zM1462 1312q-99 109 -220.5 131.5t-245.5 -44.5q27 60 82.5 96.5t118 39.5t121.5 -17t99.5 -74.5t44.5 -131.5zM2212 73q8 -11 -11 -42 -q7 -23 7 -40q1 -56 -44.5 -112.5t-109.5 -91.5t-118 -37q-48 -2 -92 21.5t-66 65.5q-687 -25 -1259 0q-23 -41 -66.5 -65t-92.5 -22q-86 3 -179.5 80.5t-92.5 160.5q2 22 7 40q-19 31 -11 42q6 10 31 1q14 22 41 51q-7 29 2 38q11 10 39 -4q29 20 59 34q0 29 13 37 -q23 12 51 -16q35 5 61 -2q18 -4 38 -19v73q-11 0 -18 2q-53 10 -97 44.5t-55 87.5q-9 38 0 81q15 62 93 95q2 17 19 35.5t36 23.5t33 -7.5t19 -30.5h13q46 -5 60 -23q3 -3 5 -7q10 1 30.5 3.5t30.5 3.5q-15 11 -30 17q-23 40 -91 43q0 6 1 10q-62 2 -118.5 18.5t-84.5 47.5 -q-32 36 -42.5 92t-2.5 112q16 126 90 179q23 16 52 4.5t32 -40.5q0 -1 1.5 -14t2.5 -21t3 -20t5.5 -19t8.5 -10q27 -14 76 -12q48 46 98 74q-40 4 -162 -14l47 46q61 58 163 111q145 73 282 86q-20 8 -41 15.5t-47 14t-42.5 10.5t-47.5 11t-43 10q595 126 904 -139 -q98 -84 158 -222q85 -10 121 9h1q5 3 8.5 10t5.5 19t3 19.5t3 21.5l1 14q3 28 32 40t52 -5q73 -52 91 -178q7 -57 -3.5 -113t-42.5 -91q-28 -32 -83.5 -48.5t-115.5 -18.5v-10q-71 -2 -95 -43q-14 -5 -31 -17q11 -1 32 -3.5t30 -3.5q1 5 5 8q16 18 60 23h13q5 18 19 30t33 8 -t36 -23t19 -36q79 -32 93 -95q9 -40 1 -81q-12 -53 -56 -88t-97 -44q-10 -2 -17 -2q0 -49 -1 -73q20 15 38 19q26 7 61 2q28 28 51 16q14 -9 14 -37q33 -16 59 -34q27 13 38 4q10 -10 2 -38q28 -30 41 -51q23 8 31 -1zM1937 1025q0 -29 -9 -54q82 -32 112 -132 -q4 37 -9.5 98.5t-41.5 90.5q-20 19 -36 17t-16 -20zM1859 925q35 -42 47.5 -108.5t-0.5 -124.5q67 13 97 45q13 14 18 28q-3 64 -31 114.5t-79 66.5q-15 -15 -52 -21zM1822 921q-30 0 -44 1q42 -115 53 -239q21 0 43 3q16 68 1 135t-53 100zM258 839q30 100 112 132 -q-9 25 -9 54q0 18 -16.5 20t-35.5 -17q-28 -29 -41.5 -90.5t-9.5 -98.5zM294 737q29 -31 97 -45q-13 58 -0.5 124.5t47.5 108.5v0q-37 6 -52 21q-51 -16 -78.5 -66t-31.5 -115q9 -17 18 -28zM471 683q14 124 73 235q-19 -4 -55 -18l-45 -19v1q-46 -89 -20 -196q25 -3 47 -3z -M1434 644q8 -38 16.5 -108.5t11.5 -89.5q3 -18 9.5 -21.5t23.5 4.5q40 20 62 85.5t23 125.5q-24 2 -146 4zM1152 1285q-116 0 -199 -82.5t-83 -198.5q0 -117 83 -199.5t199 -82.5t199 82.5t83 199.5q0 116 -83 198.5t-199 82.5zM1380 646q-105 2 -211 0v1q-1 -27 2.5 -86 -t13.5 -66q29 -14 93.5 -14.5t95.5 10.5q9 3 11 39t-0.5 69.5t-4.5 46.5zM1112 447q8 4 9.5 48t-0.5 88t-4 63v1q-212 -3 -214 -3q-4 -20 -7 -62t0 -83t14 -46q34 -15 101 -16t101 10zM718 636q-16 -59 4.5 -118.5t77.5 -84.5q15 -8 24 -5t12 21q3 16 8 90t10 103 -q-69 -2 -136 -6zM591 510q3 -23 -34 -36q132 -141 271.5 -240t305.5 -154q172 49 310.5 146t293.5 250q-33 13 -30 34q0 2 0.5 3.5t1.5 3t1 2.5v1v-1q-17 2 -50 5.5t-48 4.5q-26 -90 -82 -132q-51 -38 -82 1q-5 6 -9 14q-7 13 -17 62q-2 -5 -5 -9t-7.5 -7t-8 -5.5t-9.5 -4 -l-10 -2.5t-12 -2l-12 -1.5t-13.5 -1t-13.5 -0.5q-106 -9 -163 11q-4 -17 -10 -26.5t-21 -15t-23 -7t-36 -3.5q-6 -1 -9 -1q-179 -17 -203 40q-2 -63 -56 -54q-47 8 -91 54q-12 13 -20 26q-17 29 -26 65q-58 -6 -87 -10q1 -2 4 -10zM507 -118q3 14 3 30q-17 71 -51 130 -t-73 70q-41 12 -101.5 -14.5t-104.5 -80t-39 -107.5q35 -53 100 -93t119 -42q51 -2 94 28t53 79zM510 53q23 -63 27 -119q195 113 392 174q-98 52 -180.5 120t-179.5 165q-6 -4 -29 -13q0 -1 -1 -4t-1 -5q31 -18 22 -37q-12 -23 -56 -34q-10 -13 -29 -24h-1q-2 -83 1 -150 -q19 -34 35 -73zM579 -113q532 -21 1145 0q-254 147 -428 196q-76 -35 -156 -57q-8 -3 -16 0q-65 21 -129 49q-208 -60 -416 -188h-1v-1q1 0 1 1zM1763 -67q4 54 28 120q14 38 33 71l-1 -1q3 77 3 153q-15 8 -30 25q-42 9 -56 33q-9 20 22 38q-2 4 -2 9q-16 4 -28 12 -q-204 -190 -383 -284q198 -59 414 -176zM2155 -90q5 54 -39 107.5t-104 80t-102 14.5q-38 -11 -72.5 -70.5t-51.5 -129.5q0 -16 3 -30q10 -49 53 -79t94 -28q54 2 119 42t100 93z" /> - <glyph glyph-name="_538" unicode="&#xf23d;" horiz-adv-x="2304" -d="M1524 -25q0 -68 -48 -116t-116 -48t-116.5 48t-48.5 116t48.5 116.5t116.5 48.5t116 -48.5t48 -116.5zM775 -25q0 -68 -48.5 -116t-116.5 -48t-116 48t-48 116t48 116.5t116 48.5t116.5 -48.5t48.5 -116.5zM0 1469q57 -60 110.5 -104.5t121 -82t136 -63t166 -45.5 -t200 -31.5t250 -18.5t304 -9.5t372.5 -2.5q139 0 244.5 -5t181 -16.5t124 -27.5t71 -39.5t24 -51.5t-19.5 -64t-56.5 -76.5t-89.5 -91t-116 -104.5t-139 -119q-185 -157 -286 -247q29 51 76.5 109t94 105.5t94.5 98.5t83 91.5t54 80.5t13 70t-45.5 55.5t-116.5 41t-204 23.5 -t-304 5q-168 -2 -314 6t-256 23t-204.5 41t-159.5 51.5t-122.5 62.5t-91.5 66.5t-68 71.5t-50.5 69.5t-40 68t-36.5 59.5z" /> - <glyph glyph-name="_539" unicode="&#xf23e;" horiz-adv-x="1792" -d="M896 1472q-169 0 -323 -66t-265.5 -177.5t-177.5 -265.5t-66 -323t66 -323t177.5 -265.5t265.5 -177.5t323 -66t323 66t265.5 177.5t177.5 265.5t66 323t-66 323t-177.5 265.5t-265.5 177.5t-323 66zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348 -t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM496 704q16 0 16 -16v-480q0 -16 -16 -16h-32q-16 0 -16 16v480q0 16 16 16h32zM896 640q53 0 90.5 -37.5t37.5 -90.5q0 -35 -17.5 -64t-46.5 -46v-114q0 -14 -9 -23 -t-23 -9h-64q-14 0 -23 9t-9 23v114q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5zM896 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM544 928v-96 -q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 93 65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5v-96q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 146 -103 249t-249 103t-249 -103t-103 -249zM1408 192v512q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-512 -q0 -26 19 -45t45 -19h896q26 0 45 19t19 45z" /> - <glyph glyph-name="_540" unicode="&#xf240;" horiz-adv-x="2304" -d="M1920 1024v-768h-1664v768h1664zM2048 448h128v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288zM2304 832v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113 -v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160q53 0 90.5 -37.5t37.5 -90.5z" /> - <glyph glyph-name="_541" unicode="&#xf241;" horiz-adv-x="2304" -d="M256 256v768h1280v-768h-1280zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 -h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> - <glyph glyph-name="_542" unicode="&#xf242;" horiz-adv-x="2304" -d="M256 256v768h896v-768h-896zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 -h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> - <glyph glyph-name="_543" unicode="&#xf243;" horiz-adv-x="2304" -d="M256 256v768h512v-768h-512zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 -h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> - <glyph glyph-name="_544" unicode="&#xf244;" horiz-adv-x="2304" -d="M2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23 -v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" /> - <glyph glyph-name="_545" unicode="&#xf245;" horiz-adv-x="1280" -d="M1133 493q31 -30 14 -69q-17 -40 -59 -40h-382l201 -476q10 -25 0 -49t-34 -35l-177 -75q-25 -10 -49 0t-35 34l-191 452l-312 -312q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v1504q0 42 40 59q12 5 24 5q27 0 45 -19z" /> - <glyph glyph-name="_546" unicode="&#xf246;" horiz-adv-x="1024" -d="M832 1408q-320 0 -320 -224v-416h128v-128h-128v-544q0 -224 320 -224h64v-128h-64q-272 0 -384 146q-112 -146 -384 -146h-64v128h64q320 0 320 224v544h-128v128h128v416q0 224 -320 224h-64v128h64q272 0 384 -146q112 146 384 146h64v-128h-64z" /> - <glyph glyph-name="_547" unicode="&#xf247;" horiz-adv-x="2048" -d="M2048 1152h-128v-1024h128v-384h-384v128h-1280v-128h-384v384h128v1024h-128v384h384v-128h1280v128h384v-384zM1792 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 -128v128h-128v-128h128zM1664 0v128h128v1024h-128v128h-1280v-128h-128v-1024h128v-128 -h1280zM1920 -128v128h-128v-128h128zM1280 896h384v-768h-896v256h-384v768h896v-256zM512 512h640v512h-640v-512zM1536 256v512h-256v-384h-384v-128h640z" /> - <glyph glyph-name="_548" unicode="&#xf248;" horiz-adv-x="2304" -d="M2304 768h-128v-640h128v-384h-384v128h-896v-128h-384v384h128v128h-384v-128h-384v384h128v640h-128v384h384v-128h896v128h384v-384h-128v-128h384v128h384v-384zM2048 1024v-128h128v128h-128zM1408 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 256 -v128h-128v-128h128zM1536 384h-128v-128h128v128zM384 384h896v128h128v640h-128v128h-896v-128h-128v-640h128v-128zM896 -128v128h-128v-128h128zM2176 -128v128h-128v-128h128zM2048 128v640h-128v128h-384v-384h128v-384h-384v128h-384v-128h128v-128h896v128h128z" /> - <glyph glyph-name="_549" unicode="&#xf249;" -d="M1024 288v-416h-928q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68v-928h-416q-40 0 -68 -28t-28 -68zM1152 256h381q-15 -82 -65 -132l-184 -184q-50 -50 -132 -65v381z" /> - <glyph glyph-name="_550" unicode="&#xf24a;" -d="M1400 256h-248v-248q29 10 41 22l185 185q12 12 22 41zM1120 384h288v896h-1280v-1280h896v288q0 40 28 68t68 28zM1536 1312v-1024q0 -40 -20 -88t-48 -76l-184 -184q-28 -28 -76 -48t-88 -20h-1024q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68 -z" /> - <glyph glyph-name="_551" unicode="&#xf24b;" horiz-adv-x="2304" -d="M1951 538q0 -26 -15.5 -44.5t-38.5 -23.5q-8 -2 -18 -2h-153v140h153q10 0 18 -2q23 -5 38.5 -23.5t15.5 -44.5zM1933 751q0 -25 -15 -42t-38 -21q-3 -1 -15 -1h-139v129h139q3 0 8.5 -0.5t6.5 -0.5q23 -4 38 -21.5t15 -42.5zM728 587v308h-228v-308q0 -58 -38 -94.5 -t-105 -36.5q-108 0 -229 59v-112q53 -15 121 -23t109 -9l42 -1q328 0 328 217zM1442 403v113q-99 -52 -200 -59q-108 -8 -169 41t-61 142t61 142t169 41q101 -7 200 -58v112q-48 12 -100 19.5t-80 9.5l-28 2q-127 6 -218.5 -14t-140.5 -60t-71 -88t-22 -106t22 -106t71 -88 -t140.5 -60t218.5 -14q101 4 208 31zM2176 518q0 54 -43 88.5t-109 39.5v3q57 8 89 41.5t32 79.5q0 55 -41 88t-107 36q-3 0 -12 0.5t-14 0.5h-455v-510h491q74 0 121.5 36.5t47.5 96.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90 -t90 38h2048q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_552" unicode="&#xf24c;" horiz-adv-x="2304" -d="M858 295v693q-106 -41 -172 -135.5t-66 -211.5t66 -211.5t172 -134.5zM1362 641q0 117 -66 211.5t-172 135.5v-694q106 41 172 135.5t66 211.5zM1577 641q0 -159 -78.5 -294t-213.5 -213.5t-294 -78.5q-119 0 -227.5 46.5t-187 125t-125 187t-46.5 227.5q0 159 78.5 294 -t213.5 213.5t294 78.5t294 -78.5t213.5 -213.5t78.5 -294zM1960 634q0 139 -55.5 261.5t-147.5 205.5t-213.5 131t-252.5 48h-301q-176 0 -323.5 -81t-235 -230t-87.5 -335q0 -171 87 -317.5t236 -231.5t323 -85h301q129 0 251.5 50.5t214.5 135t147.5 202.5t55.5 246z -M2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_553" unicode="&#xf24d;" horiz-adv-x="1792" -d="M1664 -96v1088q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5zM1792 992v-1088q0 -66 -47 -113t-113 -47h-1088q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113 -zM1408 1376v-160h-128v160q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h160v-128h-160q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113z" /> - <glyph glyph-name="_554" unicode="&#xf24e;" horiz-adv-x="2304" -d="M1728 1088l-384 -704h768zM448 1088l-384 -704h768zM1269 1280q-14 -40 -45.5 -71.5t-71.5 -45.5v-1291h608q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1344q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h608v1291q-40 14 -71.5 45.5t-45.5 71.5h-491q-14 0 -23 9t-9 23v64 -q0 14 9 23t23 9h491q21 57 70 92.5t111 35.5t111 -35.5t70 -92.5h491q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-491zM1088 1264q33 0 56.5 23.5t23.5 56.5t-23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5zM2176 384q0 -73 -46.5 -131t-117.5 -91 -t-144.5 -49.5t-139.5 -16.5t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81zM896 384q0 -73 -46.5 -131t-117.5 -91t-144.5 -49.5t-139.5 -16.5 -t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81z" /> - <glyph glyph-name="_555" unicode="&#xf250;" -d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 -t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-77 -29 -149 -92.5 -t-129.5 -152.5t-92.5 -210t-35 -253h1024q0 132 -35 253t-92.5 210t-129.5 152.5t-149 92.5q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" /> - <glyph glyph-name="_556" unicode="&#xf251;" -d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 -t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -66 9 -128h1006q9 61 9 128zM1280 -128q0 130 -34 249.5t-90.5 208t-126.5 152t-146 94.5h-230q-76 -31 -146 -94.5t-126.5 -152t-90.5 -208t-34 -249.5h1024z" /> - <glyph glyph-name="_557" unicode="&#xf252;" -d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 -t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -206 85 -384h854q85 178 85 384zM1223 192q-54 141 -145.5 241.5t-194.5 142.5h-230q-103 -42 -194.5 -142.5t-145.5 -241.5h910z" /> - <glyph glyph-name="_558" unicode="&#xf253;" -d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 -t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-137 -51 -244 -196 -h700q-107 145 -244 196q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" /> - <glyph glyph-name="_559" unicode="&#xf254;" -d="M1504 -64q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472zM130 0q3 55 16 107t30 95t46 87t53.5 76t64.5 69.5t66 60t70.5 55t66.5 47.5t65 43q-43 28 -65 43t-66.5 47.5t-70.5 55t-66 60t-64.5 69.5t-53.5 76t-46 87 -t-30 95t-16 107h1276q-3 -55 -16 -107t-30 -95t-46 -87t-53.5 -76t-64.5 -69.5t-66 -60t-70.5 -55t-66.5 -47.5t-65 -43q43 -28 65 -43t66.5 -47.5t70.5 -55t66 -60t64.5 -69.5t53.5 -76t46 -87t30 -95t16 -107h-1276zM1504 1536q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9 -h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472z" /> - <glyph glyph-name="_560" unicode="&#xf255;" -d="M768 1152q-53 0 -90.5 -37.5t-37.5 -90.5v-128h-32v93q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-429l-32 30v172q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-224q0 -47 35 -82l310 -296q39 -39 39 -102q0 -26 19 -45t45 -19h640q26 0 45 19t19 45v25 -q0 41 10 77l108 436q10 36 10 77v246q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-32h-32v125q0 40 -25 72.5t-64 40.5q-14 2 -23 2q-46 0 -79 -33t-33 -79v-128h-32v122q0 51 -32.5 89.5t-82.5 43.5q-5 1 -13 1zM768 1280q84 0 149 -50q57 34 123 34q59 0 111 -27 -t86 -76q27 7 59 7q100 0 170 -71.5t70 -171.5v-246q0 -51 -13 -108l-109 -436q-6 -24 -6 -71q0 -80 -56 -136t-136 -56h-640q-84 0 -138 58.5t-54 142.5l-308 296q-76 73 -76 175v224q0 99 70.5 169.5t169.5 70.5q11 0 16 -1q6 95 75.5 160t164.5 65q52 0 98 -21 -q72 69 174 69z" /> - <glyph glyph-name="_561" unicode="&#xf256;" horiz-adv-x="1792" -d="M880 1408q-46 0 -79 -33t-33 -79v-656h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528v-256l-154 205q-38 51 -102 51q-53 0 -90.5 -37.5t-37.5 -90.5q0 -43 26 -77l384 -512q38 -51 102 -51h688q34 0 61 22t34 56l76 405q5 32 5 59v498q0 46 -33 79t-79 33t-79 -33 -t-33 -79v-272h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528h-32v656q0 46 -33 79t-79 33zM880 1536q68 0 125.5 -35.5t88.5 -96.5q19 4 42 4q99 0 169.5 -70.5t70.5 -169.5v-17q105 6 180.5 -64t75.5 -175v-498q0 -40 -8 -83l-76 -404q-14 -79 -76.5 -131t-143.5 -52 -h-688q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 106 75 181t181 75q78 0 128 -34v434q0 99 70.5 169.5t169.5 70.5q23 0 42 -4q31 61 88.5 96.5t125.5 35.5z" /> - <glyph glyph-name="_562" unicode="&#xf257;" horiz-adv-x="1792" -d="M1073 -128h-177q-163 0 -226 141q-23 49 -23 102v5q-62 30 -98.5 88.5t-36.5 127.5q0 38 5 48h-261q-106 0 -181 75t-75 181t75 181t181 75h113l-44 17q-74 28 -119.5 93.5t-45.5 145.5q0 106 75 181t181 75q46 0 91 -17l628 -239h401q106 0 181 -75t75 -181v-668 -q0 -88 -54 -157.5t-140 -90.5l-339 -85q-92 -23 -186 -23zM1024 583l-155 -71l-163 -74q-30 -14 -48 -41.5t-18 -60.5q0 -46 33 -79t79 -33q26 0 46 10l338 154q-49 10 -80.5 50t-31.5 90v55zM1344 272q0 46 -33 79t-79 33q-26 0 -46 -10l-290 -132q-28 -13 -37 -17 -t-30.5 -17t-29.5 -23.5t-16 -29t-8 -40.5q0 -50 31.5 -82t81.5 -32q20 0 38 9l352 160q30 14 48 41.5t18 60.5zM1112 1024l-650 248q-24 8 -46 8q-53 0 -90.5 -37.5t-37.5 -90.5q0 -40 22.5 -73t59.5 -47l526 -200v-64h-640q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5 -t90.5 -37.5h535l233 106v198q0 63 46 106l111 102h-69zM1073 0q82 0 155 19l339 85q43 11 70 45.5t27 78.5v668q0 53 -37.5 90.5t-90.5 37.5h-308l-136 -126q-36 -33 -36 -82v-296q0 -46 33 -77t79 -31t79 35t33 81v208h32v-208q0 -70 -57 -114q52 -8 86.5 -48.5t34.5 -93.5 -q0 -42 -23 -78t-61 -53l-310 -141h91z" /> - <glyph glyph-name="_563" unicode="&#xf258;" horiz-adv-x="2048" -d="M1151 1536q61 0 116 -28t91 -77l572 -781q118 -159 118 -359v-355q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v177l-286 143h-546q-80 0 -136 56t-56 136v32q0 119 84.5 203.5t203.5 84.5h420l42 128h-686q-100 0 -173.5 67.5t-81.5 166.5q-65 79 -65 182v32 -q0 80 56 136t136 56h959zM1920 -64v355q0 157 -93 284l-573 781q-39 52 -103 52h-959q-26 0 -45 -19t-19 -45q0 -32 1.5 -49.5t9.5 -40.5t25 -43q10 31 35.5 50t56.5 19h832v-32h-832q-26 0 -45 -19t-19 -45q0 -44 3 -58q8 -44 44 -73t81 -29h640h91q40 0 68 -28t28 -68 -q0 -15 -5 -30l-64 -192q-10 -29 -35 -47.5t-56 -18.5h-443q-66 0 -113 -47t-47 -113v-32q0 -26 19 -45t45 -19h561q16 0 29 -7l317 -158q24 -13 38.5 -36t14.5 -50v-197q0 -26 19 -45t45 -19h384q26 0 45 19t19 45z" /> - <glyph glyph-name="_564" unicode="&#xf259;" horiz-adv-x="2048" -d="M459 -256q-77 0 -137.5 47.5t-79.5 122.5l-101 401q-13 57 -13 108q0 45 -5 67l-116 477q-7 27 -7 57q0 93 62 161t155 78q17 85 82.5 139t152.5 54q83 0 148 -51.5t85 -132.5l83 -348l103 428q20 81 85 132.5t148 51.5q89 0 155.5 -57.5t80.5 -144.5q92 -10 152 -79 -t60 -162q0 -24 -7 -59l-123 -512q10 7 37.5 28.5t38.5 29.5t35 23t41 20.5t41.5 11t49.5 5.5q105 0 180 -74t75 -179q0 -62 -28.5 -118t-78.5 -94l-507 -380q-68 -51 -153 -51h-694zM1104 1408q-38 0 -68.5 -24t-39.5 -62l-164 -682h-127l-145 602q-9 38 -39.5 62t-68.5 24 -q-48 0 -80 -33t-32 -80q0 -15 3 -28l132 -547h-26l-99 408q-9 37 -40 62.5t-69 25.5q-47 0 -80 -33t-33 -79q0 -14 3 -26l116 -478q7 -28 9 -86t10 -88l100 -401q8 -32 34 -52.5t59 -20.5h694q42 0 76 26l507 379q56 43 56 110q0 52 -37.5 88.5t-89.5 36.5q-43 0 -77 -26 -l-307 -230v227q0 4 32 138t68 282t39 161q4 18 4 29q0 47 -32 81t-79 34q-39 0 -69.5 -24t-39.5 -62l-116 -482h-26l150 624q3 14 3 28q0 48 -31.5 82t-79.5 34z" /> - <glyph glyph-name="_565" unicode="&#xf25a;" horiz-adv-x="1792" -d="M640 1408q-53 0 -90.5 -37.5t-37.5 -90.5v-512v-384l-151 202q-41 54 -107 54q-52 0 -89 -38t-37 -90q0 -43 26 -77l384 -512q38 -51 102 -51h718q22 0 39.5 13.5t22.5 34.5l92 368q24 96 24 194v217q0 41 -28 71t-68 30t-68 -28t-28 -68h-32v61q0 48 -32 81.5t-80 33.5 -q-46 0 -79 -33t-33 -79v-64h-32v90q0 55 -37 94.5t-91 39.5q-53 0 -90.5 -37.5t-37.5 -90.5v-96h-32v570q0 55 -37 94.5t-91 39.5zM640 1536q107 0 181.5 -77.5t74.5 -184.5v-220q22 2 32 2q99 0 173 -69q47 21 99 21q113 0 184 -87q27 7 56 7q94 0 159 -67.5t65 -161.5 -v-217q0 -116 -28 -225l-92 -368q-16 -64 -68 -104.5t-118 -40.5h-718q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 105 74.5 180.5t179.5 75.5q71 0 130 -35v547q0 106 75 181t181 75zM768 128v384h-32v-384h32zM1024 128v384h-32v-384h32zM1280 128v384h-32 -v-384h32z" /> - <glyph glyph-name="_566" unicode="&#xf25b;" -d="M1288 889q60 0 107 -23q141 -63 141 -226v-177q0 -94 -23 -186l-85 -339q-21 -86 -90.5 -140t-157.5 -54h-668q-106 0 -181 75t-75 181v401l-239 628q-17 45 -17 91q0 106 75 181t181 75q80 0 145.5 -45.5t93.5 -119.5l17 -44v113q0 106 75 181t181 75t181 -75t75 -181 -v-261q27 5 48 5q69 0 127.5 -36.5t88.5 -98.5zM1072 896q-33 0 -60.5 -18t-41.5 -48l-74 -163l-71 -155h55q50 0 90 -31.5t50 -80.5l154 338q10 20 10 46q0 46 -33 79t-79 33zM1293 761q-22 0 -40.5 -8t-29 -16t-23.5 -29.5t-17 -30.5t-17 -37l-132 -290q-10 -20 -10 -46 -q0 -46 33 -79t79 -33q33 0 60.5 18t41.5 48l160 352q9 18 9 38q0 50 -32 81.5t-82 31.5zM128 1120q0 -22 8 -46l248 -650v-69l102 111q43 46 106 46h198l106 233v535q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5v-640h-64l-200 526q-14 37 -47 59.5t-73 22.5 -q-53 0 -90.5 -37.5t-37.5 -90.5zM1180 -128q44 0 78.5 27t45.5 70l85 339q19 73 19 155v91l-141 -310q-17 -38 -53 -61t-78 -23q-53 0 -93.5 34.5t-48.5 86.5q-44 -57 -114 -57h-208v32h208q46 0 81 33t35 79t-31 79t-77 33h-296q-49 0 -82 -36l-126 -136v-308 -q0 -53 37.5 -90.5t90.5 -37.5h668z" /> - <glyph glyph-name="_567" unicode="&#xf25c;" horiz-adv-x="1973" -d="M857 992v-117q0 -13 -9.5 -22t-22.5 -9h-298v-812q0 -13 -9 -22.5t-22 -9.5h-135q-13 0 -22.5 9t-9.5 23v812h-297q-13 0 -22.5 9t-9.5 22v117q0 14 9 23t23 9h793q13 0 22.5 -9.5t9.5 -22.5zM1895 995l77 -961q1 -13 -8 -24q-10 -10 -23 -10h-134q-12 0 -21 8.5 -t-10 20.5l-46 588l-189 -425q-8 -19 -29 -19h-120q-20 0 -29 19l-188 427l-45 -590q-1 -12 -10 -20.5t-21 -8.5h-135q-13 0 -23 10q-9 10 -9 24l78 961q1 12 10 20.5t21 8.5h142q20 0 29 -19l220 -520q10 -24 20 -51q3 7 9.5 24.5t10.5 26.5l221 520q9 19 29 19h141 -q13 0 22 -8.5t10 -20.5z" /> - <glyph glyph-name="_568" unicode="&#xf25d;" horiz-adv-x="1792" -d="M1042 833q0 88 -60 121q-33 18 -117 18h-123v-281h162q66 0 102 37t36 105zM1094 548l205 -373q8 -17 -1 -31q-8 -16 -27 -16h-152q-20 0 -28 17l-194 365h-155v-350q0 -14 -9 -23t-23 -9h-134q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h294q128 0 190 -24q85 -31 134 -109 -t49 -180q0 -92 -42.5 -165.5t-115.5 -109.5q6 -10 9 -16zM896 1376q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM1792 640 -q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="_569" unicode="&#xf25e;" horiz-adv-x="1792" -d="M605 303q153 0 257 104q14 18 3 36l-45 82q-6 13 -24 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13.5t-23.5 -14.5t-28.5 -13t-33.5 -9.5t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78 -q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-148 0 -246 -96.5t-98 -240.5q0 -146 97 -241.5t247 -95.5zM1235 303q153 0 257 104q14 18 4 36l-45 82q-8 14 -25 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13.5t-23.5 -14.5t-28.5 -13t-33.5 -9.5 -t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-147 0 -245.5 -96.5t-98.5 -240.5q0 -146 97 -241.5t247 -95.5zM896 1376 -q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191 -t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71z" /> - <glyph glyph-name="f260" unicode="&#xf260;" horiz-adv-x="2048" -d="M736 736l384 -384l-384 -384l-672 672l672 672l168 -168l-96 -96l-72 72l-480 -480l480 -480l193 193l-289 287zM1312 1312l672 -672l-672 -672l-168 168l96 96l72 -72l480 480l-480 480l-193 -193l289 -287l-96 -96l-384 384z" /> - <glyph glyph-name="f261" unicode="&#xf261;" horiz-adv-x="1792" -d="M717 182l271 271l-279 279l-88 -88l192 -191l-96 -96l-279 279l279 279l40 -40l87 87l-127 128l-454 -454zM1075 190l454 454l-454 454l-271 -271l279 -279l88 88l-192 191l96 96l279 -279l-279 -279l-40 40l-87 -88zM1792 640q0 -182 -71 -348t-191 -286t-286 -191 -t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="_572" unicode="&#xf262;" horiz-adv-x="2304" -d="M651 539q0 -39 -27.5 -66.5t-65.5 -27.5q-39 0 -66.5 27.5t-27.5 66.5q0 38 27.5 65.5t66.5 27.5q38 0 65.5 -27.5t27.5 -65.5zM1805 540q0 -39 -27.5 -66.5t-66.5 -27.5t-66.5 27.5t-27.5 66.5t27.5 66t66.5 27t66.5 -27t27.5 -66zM765 539q0 79 -56.5 136t-136.5 57 -t-136.5 -56.5t-56.5 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM1918 540q0 80 -56.5 136.5t-136.5 56.5q-79 0 -136 -56.5t-57 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM850 539q0 -116 -81.5 -197.5t-196.5 -81.5q-116 0 -197.5 82t-81.5 197 -t82 196.5t197 81.5t196.5 -81.5t81.5 -196.5zM2004 540q0 -115 -81.5 -196.5t-197.5 -81.5q-115 0 -196.5 81.5t-81.5 196.5t81.5 196.5t196.5 81.5q116 0 197.5 -81.5t81.5 -196.5zM1040 537q0 191 -135.5 326.5t-326.5 135.5q-125 0 -231 -62t-168 -168.5t-62 -231.5 -t62 -231.5t168 -168.5t231 -62q191 0 326.5 135.5t135.5 326.5zM1708 1110q-254 111 -556 111q-319 0 -573 -110q117 0 223 -45.5t182.5 -122.5t122 -183t45.5 -223q0 115 43.5 219.5t118 180.5t177.5 123t217 50zM2187 537q0 191 -135 326.5t-326 135.5t-326.5 -135.5 -t-135.5 -326.5t135.5 -326.5t326.5 -135.5t326 135.5t135 326.5zM1921 1103h383q-44 -51 -75 -114.5t-40 -114.5q110 -151 110 -337q0 -156 -77 -288t-209 -208.5t-287 -76.5q-133 0 -249 56t-196 155q-47 -56 -129 -179q-11 22 -53.5 82.5t-74.5 97.5 -q-80 -99 -196.5 -155.5t-249.5 -56.5q-155 0 -287 76.5t-209 208.5t-77 288q0 186 110 337q-9 51 -40 114.5t-75 114.5h365q149 100 355 156.5t432 56.5q224 0 421 -56t348 -157z" /> - <glyph glyph-name="f263" unicode="&#xf263;" horiz-adv-x="1280" -d="M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5 -t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94 -q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z" /> - <glyph glyph-name="_574" unicode="&#xf264;" -d="M927 956q0 -66 -46.5 -112.5t-112.5 -46.5t-112.5 46.5t-46.5 112.5t46.5 112.5t112.5 46.5t112.5 -46.5t46.5 -112.5zM1141 593q-10 20 -28 32t-47.5 9.5t-60.5 -27.5q-10 -8 -29 -20t-81 -32t-127 -20t-124 18t-86 36l-27 18q-31 25 -60.5 27.5t-47.5 -9.5t-28 -32 -q-22 -45 -2 -74.5t87 -73.5q83 -53 226 -67l-51 -52q-142 -142 -191 -190q-22 -22 -22 -52.5t22 -52.5l9 -9q22 -22 52.5 -22t52.5 22l191 191q114 -115 191 -191q22 -22 52.5 -22t52.5 22l9 9q22 22 22 52.5t-22 52.5l-191 190l-52 52q141 14 225 67q67 44 87 73.5t-2 74.5 -zM1092 956q0 134 -95 229t-229 95t-229 -95t-95 -229t95 -229t229 -95t229 95t95 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="_575" unicode="&#xf265;" horiz-adv-x="1720" -d="M1565 1408q65 0 110 -45.5t45 -110.5v-519q0 -176 -68 -336t-182.5 -275t-274 -182.5t-334.5 -67.5q-176 0 -335.5 67.5t-274.5 182.5t-183 275t-68 336v519q0 64 46 110t110 46h1409zM861 344q47 0 82 33l404 388q37 35 37 85q0 49 -34.5 83.5t-83.5 34.5q-47 0 -82 -33 -l-323 -310l-323 310q-35 33 -81 33q-49 0 -83.5 -34.5t-34.5 -83.5q0 -51 36 -85l405 -388q33 -33 81 -33z" /> - <glyph glyph-name="_576" unicode="&#xf266;" horiz-adv-x="2304" -d="M1494 -103l-295 695q-25 -49 -158.5 -305.5t-198.5 -389.5q-1 -1 -27.5 -0.5t-26.5 1.5q-82 193 -255.5 587t-259.5 596q-21 50 -66.5 107.5t-103.5 100.5t-102 43q0 5 -0.5 24t-0.5 27h583v-50q-39 -2 -79.5 -16t-66.5 -43t-10 -64q26 -59 216.5 -499t235.5 -540 -q31 61 140 266.5t131 247.5q-19 39 -126 281t-136 295q-38 69 -201 71v50l513 -1v-47q-60 -2 -93.5 -25t-12.5 -69q33 -70 87 -189.5t86 -187.5q110 214 173 363q24 55 -10 79.5t-129 26.5q1 7 1 25v24q64 0 170.5 0.5t180 1t92.5 0.5v-49q-62 -2 -119 -33t-90 -81 -l-213 -442q13 -33 127.5 -290t121.5 -274l441 1017q-14 38 -49.5 62.5t-65 31.5t-55.5 8v50l460 -4l1 -2l-1 -44q-139 -4 -201 -145q-526 -1216 -559 -1291h-49z" /> - <glyph glyph-name="_577" unicode="&#xf267;" horiz-adv-x="1792" -d="M949 643q0 -26 -16.5 -45t-41.5 -19q-26 0 -45 16.5t-19 41.5q0 26 17 45t42 19t44 -16.5t19 -41.5zM964 585l350 581q-9 -8 -67.5 -62.5t-125.5 -116.5t-136.5 -127t-117 -110.5t-50.5 -51.5l-349 -580q7 7 67 62t126 116.5t136 127t117 111t50 50.5zM1611 640 -q0 -201 -104 -371q-3 2 -17 11t-26.5 16.5t-16.5 7.5q-13 0 -13 -13q0 -10 59 -44q-74 -112 -184.5 -190.5t-241.5 -110.5l-16 67q-1 10 -15 10q-5 0 -8 -5.5t-2 -9.5l16 -68q-72 -15 -146 -15q-199 0 -372 105q1 2 13 20.5t21.5 33.5t9.5 19q0 13 -13 13q-6 0 -17 -14.5 -t-22.5 -34.5t-13.5 -23q-113 75 -192 187.5t-110 244.5l69 15q10 3 10 15q0 5 -5.5 8t-10.5 2l-68 -15q-14 72 -14 139q0 206 109 379q2 -1 18.5 -12t30 -19t17.5 -8q13 0 13 12q0 6 -12.5 15.5t-32.5 21.5l-20 12q77 112 189 189t244 107l15 -67q2 -10 15 -10q5 0 8 5.5 -t2 10.5l-15 66q71 13 134 13q204 0 379 -109q-39 -56 -39 -65q0 -13 12 -13q11 0 48 64q111 -75 187.5 -186t107.5 -241l-56 -12q-10 -2 -10 -16q0 -5 5.5 -8t9.5 -2l57 13q14 -72 14 -140zM1696 640q0 163 -63.5 311t-170.5 255t-255 170.5t-311 63.5t-311 -63.5 -t-255 -170.5t-170.5 -255t-63.5 -311t63.5 -311t170.5 -255t255 -170.5t311 -63.5t311 63.5t255 170.5t170.5 255t63.5 311zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191 -t191 -286t71 -348z" /> - <glyph glyph-name="_578" unicode="&#xf268;" horiz-adv-x="1792" -d="M893 1536q240 2 451 -120q232 -134 352 -372l-742 39q-160 9 -294 -74.5t-185 -229.5l-276 424q128 159 311 245.5t383 87.5zM146 1131l337 -663q72 -143 211 -217t293 -45l-230 -451q-212 33 -385 157.5t-272.5 316t-99.5 411.5q0 267 146 491zM1732 962 -q58 -150 59.5 -310.5t-48.5 -306t-153 -272t-246 -209.5q-230 -133 -498 -119l405 623q88 131 82.5 290.5t-106.5 277.5zM896 942q125 0 213.5 -88.5t88.5 -213.5t-88.5 -213.5t-213.5 -88.5t-213.5 88.5t-88.5 213.5t88.5 213.5t213.5 88.5z" /> - <glyph glyph-name="_579" unicode="&#xf269;" horiz-adv-x="1792" -d="M903 -256q-283 0 -504.5 150.5t-329.5 398.5q-58 131 -67 301t26 332.5t111 312t179 242.5l-11 -281q11 14 68 15.5t70 -15.5q42 81 160.5 138t234.5 59q-54 -45 -119.5 -148.5t-58.5 -163.5q25 -8 62.5 -13.5t63 -7.5t68 -4t50.5 -3q15 -5 9.5 -45.5t-30.5 -75.5 -q-5 -7 -16.5 -18.5t-56.5 -35.5t-101 -34l15 -189l-139 67q-18 -43 -7.5 -81.5t36 -66.5t65.5 -41.5t81 -6.5q51 9 98 34.5t83.5 45t73.5 17.5q61 -4 89.5 -33t19.5 -65q-1 -2 -2.5 -5.5t-8.5 -12.5t-18 -15.5t-31.5 -10.5t-46.5 -1q-60 -95 -144.5 -135.5t-209.5 -29.5 -q74 -61 162.5 -82.5t168.5 -6t154.5 52t128 87.5t80.5 104q43 91 39 192.5t-37.5 188.5t-78.5 125q87 -38 137 -79.5t77 -112.5q15 170 -57.5 343t-209.5 284q265 -77 412 -279.5t151 -517.5q2 -127 -40.5 -255t-123.5 -238t-189 -196t-247.5 -135.5t-288.5 -49.5z" /> - <glyph glyph-name="_580" unicode="&#xf26a;" horiz-adv-x="1792" -d="M1493 1308q-165 110 -359 110q-155 0 -293 -73t-240 -200q-75 -93 -119.5 -218t-48.5 -266v-42q4 -141 48.5 -266t119.5 -218q102 -127 240 -200t293 -73q194 0 359 110q-121 -108 -274.5 -168t-322.5 -60q-29 0 -43 1q-175 8 -333 82t-272 193t-181 281t-67 339 -q0 182 71 348t191 286t286 191t348 71h3q168 -1 320.5 -60.5t273.5 -167.5zM1792 640q0 -192 -77 -362.5t-213 -296.5q-104 -63 -222 -63q-137 0 -255 84q154 56 253.5 233t99.5 405q0 227 -99 404t-253 234q119 83 254 83q119 0 226 -65q135 -125 210.5 -295t75.5 -361z -" /> - <glyph glyph-name="_581" unicode="&#xf26b;" horiz-adv-x="1792" -d="M1792 599q0 -56 -7 -104h-1151q0 -146 109.5 -244.5t257.5 -98.5q99 0 185.5 46.5t136.5 130.5h423q-56 -159 -170.5 -281t-267.5 -188.5t-321 -66.5q-187 0 -356 83q-228 -116 -394 -116q-237 0 -237 263q0 115 45 275q17 60 109 229q199 360 475 606 -q-184 -79 -427 -354q63 274 283.5 449.5t501.5 175.5q30 0 45 -1q255 117 433 117q64 0 116 -13t94.5 -40.5t66.5 -76.5t24 -115q0 -116 -75 -286q101 -182 101 -390zM1722 1239q0 83 -53 132t-137 49q-108 0 -254 -70q121 -47 222.5 -131.5t170.5 -195.5q51 135 51 216z -M128 2q0 -86 48.5 -132.5t134.5 -46.5q115 0 266 83q-122 72 -213.5 183t-137.5 245q-98 -205 -98 -332zM632 715h728q-5 142 -113 237t-251 95q-144 0 -251.5 -95t-112.5 -237z" /> - <glyph glyph-name="_582" unicode="&#xf26c;" horiz-adv-x="2048" -d="M1792 288v960q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1248v-960q0 -66 -47 -113t-113 -47h-736v-128h352q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23 -v64q0 14 9 23t23 9h352v128h-736q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" /> - <glyph glyph-name="_583" unicode="&#xf26d;" horiz-adv-x="1792" -d="M138 1408h197q-70 -64 -126 -149q-36 -56 -59 -115t-30 -125.5t-8.5 -120t10.5 -132t21 -126t28 -136.5q4 -19 6 -28q51 -238 81 -329q57 -171 152 -275h-272q-48 0 -82 34t-34 82v1304q0 48 34 82t82 34zM1346 1408h308q48 0 82 -34t34 -82v-1304q0 -48 -34 -82t-82 -34 -h-178q212 210 196 565l-469 -101q-2 -45 -12 -82t-31 -72t-59.5 -59.5t-93.5 -36.5q-123 -26 -199 40q-32 27 -53 61t-51.5 129t-64.5 258q-35 163 -45.5 263t-5.5 139t23 77q20 41 62.5 73t102.5 45q45 12 83.5 6.5t67 -17t54 -35t43 -48t34.5 -56.5l468 100 -q-68 175 -180 287z" /> - <glyph glyph-name="_584" unicode="&#xf26e;" -d="M1401 -11l-6 -6q-113 -113 -259 -175q-154 -64 -317 -64q-165 0 -317 64q-148 63 -259 175q-113 112 -175 258q-42 103 -54 189q-4 28 48 36q51 8 56 -20q1 -1 1 -4q18 -90 46 -159q50 -124 152 -226q98 -98 226 -152q132 -56 276 -56q143 0 276 56q128 55 225 152l6 6 -q10 10 25 6q12 -3 33 -22q36 -37 17 -58zM929 604l-66 -66l63 -63q21 -21 -7 -49q-17 -17 -32 -17q-10 0 -19 10l-62 61l-66 -66q-5 -5 -15 -5q-15 0 -31 16l-2 2q-18 15 -18 29q0 7 8 17l66 65l-66 66q-16 16 14 45q18 18 31 18q6 0 13 -5l65 -66l65 65q18 17 48 -13 -q27 -27 11 -44zM1400 547q0 -118 -46 -228q-45 -105 -126 -186q-80 -80 -187 -126t-228 -46t-228 46t-187 126q-82 82 -125 186q-15 33 -15 40h-1q-9 27 43 44q50 16 60 -12q37 -99 97 -167h1v339v2q3 136 102 232q105 103 253 103q147 0 251 -103t104 -249 -q0 -147 -104.5 -251t-250.5 -104q-58 0 -112 16q-28 11 -13 61q16 51 44 43l14 -3q14 -3 33 -6t30 -3q104 0 176 71.5t72 174.5q0 101 -72 171q-71 71 -175 71q-107 0 -178 -80q-64 -72 -64 -160v-413q110 -67 242 -67q96 0 185 36.5t156 103.5t103.5 155t36.5 183 -q0 198 -141 339q-140 140 -339 140q-200 0 -340 -140q-53 -53 -77 -87l-2 -2q-8 -11 -13 -15.5t-21.5 -9.5t-38.5 3q-21 5 -36.5 16.5t-15.5 26.5v680q0 15 10.5 26.5t27.5 11.5h877q30 0 30 -55t-30 -55h-811v-483h1q40 42 102 84t108 61q109 46 231 46q121 0 228 -46 -t187 -126q81 -81 126 -186q46 -112 46 -229zM1369 1128q9 -8 9 -18t-5.5 -18t-16.5 -21q-26 -26 -39 -26q-9 0 -16 7q-106 91 -207 133q-128 56 -276 56q-133 0 -262 -49q-27 -10 -45 37q-9 25 -8 38q3 16 16 20q130 57 299 57q164 0 316 -64q137 -58 235 -152z" /> - <glyph glyph-name="_585" unicode="&#xf270;" horiz-adv-x="1792" -d="M1551 60q15 6 26 3t11 -17.5t-15 -33.5q-13 -16 -44 -43.5t-95.5 -68t-141 -74t-188 -58t-229.5 -24.5q-119 0 -238 31t-209 76.5t-172.5 104t-132.5 105t-84 87.5q-8 9 -10 16.5t1 12t8 7t11.5 2t11.5 -4.5q192 -117 300 -166q389 -176 799 -90q190 40 391 135z -M1758 175q11 -16 2.5 -69.5t-28.5 -102.5q-34 -83 -85 -124q-17 -14 -26 -9t0 24q21 45 44.5 121.5t6.5 98.5q-5 7 -15.5 11.5t-27 6t-29.5 2.5t-35 0t-31.5 -2t-31 -3t-22.5 -2q-6 -1 -13 -1.5t-11 -1t-8.5 -1t-7 -0.5h-5.5h-4.5t-3 0.5t-2 1.5l-1.5 3q-6 16 47 40t103 30 -q46 7 108 1t76 -24zM1364 618q0 -31 13.5 -64t32 -58t37.5 -46t33 -32l13 -11l-227 -224q-40 37 -79 75.5t-58 58.5l-19 20q-11 11 -25 33q-38 -59 -97.5 -102.5t-127.5 -63.5t-140 -23t-137.5 21t-117.5 65.5t-83 113t-31 162.5q0 84 28 154t72 116.5t106.5 83t122.5 57 -t130 34.5t119.5 18.5t99.5 6.5v127q0 65 -21 97q-34 53 -121 53q-6 0 -16.5 -1t-40.5 -12t-56 -29.5t-56 -59.5t-48 -96l-294 27q0 60 22 119t67 113t108 95t151.5 65.5t190.5 24.5q100 0 181 -25t129.5 -61.5t81 -83t45 -86t12.5 -73.5v-589zM692 597q0 -86 70 -133 -q66 -44 139 -22q84 25 114 123q14 45 14 101v162q-59 -2 -111 -12t-106.5 -33.5t-87 -71t-32.5 -114.5z" /> - <glyph glyph-name="_586" unicode="&#xf271;" horiz-adv-x="1792" -d="M1536 1280q52 0 90 -38t38 -90v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128zM1152 1376v-288q0 -14 9 -23t23 -9 -h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 1376v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM1536 -128v1024h-1408v-1024h1408zM896 448h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224 -v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224z" /> - <glyph glyph-name="_587" unicode="&#xf272;" horiz-adv-x="1792" -d="M1152 416v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23 -t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47 -t47 -113v-96h128q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_588" unicode="&#xf273;" horiz-adv-x="1792" -d="M1111 151l-46 -46q-9 -9 -22 -9t-23 9l-188 189l-188 -189q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22t9 23l189 188l-189 188q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l188 -188l188 188q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23l-188 -188l188 -188q9 -10 9 -23t-9 -22z -M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 -q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_589" unicode="&#xf274;" horiz-adv-x="1792" -d="M1303 572l-512 -512q-10 -9 -23 -9t-23 9l-288 288q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l220 -220l444 444q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23 -t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47 -t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" /> - <glyph glyph-name="_590" unicode="&#xf275;" horiz-adv-x="1792" -d="M448 1536q26 0 45 -19t19 -45v-891l536 429q17 14 40 14q26 0 45 -19t19 -45v-379l536 429q17 14 40 14q26 0 45 -19t19 -45v-1152q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h384z" /> - <glyph glyph-name="_591" unicode="&#xf276;" horiz-adv-x="1024" -d="M512 448q66 0 128 15v-655q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v655q62 -15 128 -15zM512 1536q212 0 362 -150t150 -362t-150 -362t-362 -150t-362 150t-150 362t150 362t362 150zM512 1312q14 0 23 9t9 23t-9 23t-23 9q-146 0 -249 -103t-103 -249 -q0 -14 9 -23t23 -9t23 9t9 23q0 119 84.5 203.5t203.5 84.5z" /> - <glyph glyph-name="_592" unicode="&#xf277;" horiz-adv-x="1792" -d="M1745 1239q10 -10 10 -23t-10 -23l-141 -141q-28 -28 -68 -28h-1344q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h576v64q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-64h512q40 0 68 -28zM768 320h256v-512q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v512zM1600 768 -q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-1344q-40 0 -68 28l-141 141q-10 10 -10 23t10 23l141 141q28 28 68 28h512v192h256v-192h576z" /> - <glyph glyph-name="_593" unicode="&#xf278;" horiz-adv-x="2048" -d="M2020 1525q28 -20 28 -53v-1408q0 -20 -11 -36t-29 -23l-640 -256q-24 -11 -48 0l-616 246l-616 -246q-10 -5 -24 -5q-19 0 -36 11q-28 20 -28 53v1408q0 20 11 36t29 23l640 256q24 11 48 0l616 -246l616 246q32 13 60 -6zM736 1390v-1270l576 -230v1270zM128 1173 -v-1270l544 217v1270zM1920 107v1270l-544 -217v-1270z" /> - <glyph glyph-name="_594" unicode="&#xf279;" horiz-adv-x="1792" -d="M512 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472q0 20 17 28l480 256q7 4 15 4zM1760 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472 -q0 20 17 28l480 256q7 4 15 4zM640 1536q8 0 14 -3l512 -256q18 -10 18 -29v-1472q0 -13 -9.5 -22.5t-22.5 -9.5q-8 0 -14 3l-512 256q-18 10 -18 29v1472q0 13 9.5 22.5t22.5 9.5z" /> - <glyph glyph-name="_595" unicode="&#xf27a;" horiz-adv-x="1792" -d="M640 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 640q0 53 -37.5 90.5t-90.5 37.5 -t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-110 0 -211 18q-173 -173 -435 -229q-52 -10 -86 -13q-12 -1 -22 6t-13 18q-4 15 20 37q5 5 23.5 21.5t25.5 23.5t23.5 25.5t24 31.5t20.5 37 -t20 48t14.5 57.5t12.5 72.5q-146 90 -229.5 216.5t-83.5 269.5q0 174 120 321.5t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" /> - <glyph glyph-name="_596" unicode="&#xf27b;" horiz-adv-x="1792" -d="M640 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 -53 -37.5 -90.5t-90.5 -37.5 -t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5 -t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51 -t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 130 71 248.5t191 204.5t286 136.5t348 50.5t348 -50.5t286 -136.5t191 -204.5t71 -248.5z" /> - <glyph glyph-name="_597" unicode="&#xf27c;" horiz-adv-x="1024" -d="M512 345l512 295v-591l-512 -296v592zM0 640v-591l512 296zM512 1527v-591l-512 -296v591zM512 936l512 295v-591z" /> - <glyph glyph-name="_598" unicode="&#xf27d;" horiz-adv-x="1792" -d="M1709 1018q-10 -236 -332 -651q-333 -431 -562 -431q-142 0 -240 263q-44 160 -132 482q-72 262 -157 262q-18 0 -127 -76l-77 98q24 21 108 96.5t130 115.5q156 138 241 146q95 9 153 -55.5t81 -203.5q44 -287 66 -373q55 -249 120 -249q51 0 154 161q101 161 109 246 -q13 139 -109 139q-57 0 -121 -26q120 393 459 382q251 -8 236 -326z" /> - <glyph glyph-name="f27e" unicode="&#xf27e;" -d="M0 1408h1536v-1536h-1536v1536zM1085 293l-221 631l221 297h-634l221 -297l-221 -631l317 -304z" /> - <glyph glyph-name="uniF280" unicode="&#xf280;" -d="M0 1408h1536v-1536h-1536v1536zM908 1088l-12 -33l75 -83l-31 -114l25 -25l107 57l107 -57l25 25l-31 114l75 83l-12 33h-95l-53 96h-32l-53 -96h-95zM641 925q32 0 44.5 -16t11.5 -63l174 21q0 55 -17.5 92.5t-50.5 56t-69 25.5t-85 7q-133 0 -199 -57.5t-66 -182.5v-72 -h-96v-128h76q20 0 20 -8v-382q0 -14 -5 -20t-18 -7l-73 -7v-88h448v86l-149 14q-6 1 -8.5 1.5t-3.5 2.5t-0.5 4t1 7t0.5 10v387h191l38 128h-231q-6 0 -2 6t4 9v80q0 27 1.5 40.5t7.5 28t19.5 20t36.5 5.5zM1248 96v86l-54 9q-7 1 -9.5 2.5t-2.5 3t1 7.5t1 12v520h-275 -l-23 -101l83 -22q23 -7 23 -27v-370q0 -14 -6 -18.5t-20 -6.5l-70 -9v-86h352z" /> - <glyph glyph-name="uniF281" unicode="&#xf281;" horiz-adv-x="1792" -d="M1792 690q0 -58 -29.5 -105.5t-79.5 -72.5q12 -46 12 -96q0 -155 -106.5 -287t-290.5 -208.5t-400 -76.5t-399.5 76.5t-290 208.5t-106.5 287q0 47 11 94q-51 25 -82 73.5t-31 106.5q0 82 58 140.5t141 58.5q85 0 145 -63q218 152 515 162l116 521q3 13 15 21t26 5 -l369 -81q18 37 54 59.5t79 22.5q62 0 106 -43.5t44 -105.5t-44 -106t-106 -44t-105.5 43.5t-43.5 105.5l-334 74l-104 -472q300 -9 519 -160q58 61 143 61q83 0 141 -58.5t58 -140.5zM418 491q0 -62 43.5 -106t105.5 -44t106 44t44 106t-44 105.5t-106 43.5q-61 0 -105 -44 -t-44 -105zM1228 136q11 11 11 26t-11 26q-10 10 -25 10t-26 -10q-41 -42 -121 -62t-160 -20t-160 20t-121 62q-11 10 -26 10t-25 -10q-11 -10 -11 -25.5t11 -26.5q43 -43 118.5 -68t122.5 -29.5t91 -4.5t91 4.5t122.5 29.5t118.5 68zM1225 341q62 0 105.5 44t43.5 106 -q0 61 -44 105t-105 44q-62 0 -106 -43.5t-44 -105.5t44 -106t106 -44z" /> - <glyph glyph-name="_602" unicode="&#xf282;" horiz-adv-x="1792" -d="M69 741h1q16 126 58.5 241.5t115 217t167.5 176t223.5 117.5t276.5 43q231 0 414 -105.5t294 -303.5q104 -187 104 -442v-188h-1125q1 -111 53.5 -192.5t136.5 -122.5t189.5 -57t213 -3t208 46.5t173.5 84.5v-377q-92 -55 -229.5 -92t-312.5 -38t-316 53 -q-189 73 -311.5 249t-124.5 372q-3 242 111 412t325 268q-48 -60 -78 -125.5t-46 -159.5h635q8 77 -8 140t-47 101.5t-70.5 66.5t-80.5 41t-75 20.5t-56 8.5l-22 1q-135 -5 -259.5 -44.5t-223.5 -104.5t-176 -140.5t-138 -163.5z" /> - <glyph glyph-name="_603" unicode="&#xf283;" horiz-adv-x="2304" -d="M0 32v608h2304v-608q0 -66 -47 -113t-113 -47h-1984q-66 0 -113 47t-47 113zM640 256v-128h384v128h-384zM256 256v-128h256v128h-256zM2144 1408q66 0 113 -47t47 -113v-224h-2304v224q0 66 47 113t113 47h1984z" /> - <glyph glyph-name="_604" unicode="&#xf284;" horiz-adv-x="1792" -d="M1584 246l-218 111q-74 -120 -196.5 -189t-263.5 -69q-147 0 -271 72t-196 196t-72 270q0 110 42.5 209.5t115 172t172 115t209.5 42.5q131 0 247.5 -60.5t192.5 -168.5l215 125q-110 169 -286.5 265t-378.5 96q-161 0 -308 -63t-253 -169t-169 -253t-63 -308t63 -308 -t169 -253t253 -169t308 -63q213 0 397.5 107t290.5 292zM1030 643l693 -352q-116 -253 -334.5 -400t-492.5 -147q-182 0 -348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71q260 0 470.5 -133.5t335.5 -366.5zM1543 640h-39v-160h-96v352h136q32 0 54.5 -20 -t28.5 -48t1 -56t-27.5 -48t-57.5 -20z" /> - <glyph glyph-name="uniF285" unicode="&#xf285;" horiz-adv-x="1792" -d="M1427 827l-614 386l92 151h855zM405 562l-184 116v858l1183 -743zM1424 697l147 -95v-858l-532 335zM1387 718l-500 -802h-855l356 571z" /> - <glyph glyph-name="uniF286" unicode="&#xf286;" horiz-adv-x="1792" -d="M640 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1152 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1664 496v-752h-640v320q0 80 -56 136t-136 56t-136 -56t-56 -136v-320h-640v752q0 16 16 16h96 -q16 0 16 -16v-112h128v624q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 6 2.5 9.5t8.5 5t9.5 2t11.5 0t9 -0.5v391q-32 15 -32 50q0 23 16.5 39t38.5 16t38.5 -16t16.5 -39q0 -35 -32 -50v-17q45 10 83 10q21 0 59.5 -7.5t54.5 -7.5 -q17 0 47 7.5t37 7.5q16 0 16 -16v-210q0 -15 -35 -21.5t-62 -6.5q-18 0 -54.5 7.5t-55.5 7.5q-40 0 -90 -12v-133q1 0 9 0.5t11.5 0t9.5 -2t8.5 -5t2.5 -9.5v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-624h128v112q0 16 16 16h96 -q16 0 16 -16z" /> - <glyph glyph-name="_607" unicode="&#xf287;" horiz-adv-x="2304" -d="M2288 731q16 -8 16 -27t-16 -27l-320 -192q-8 -5 -16 -5q-9 0 -16 4q-16 10 -16 28v128h-858q37 -58 83 -165q16 -37 24.5 -55t24 -49t27 -47t27 -34t31.5 -26t33 -8h96v96q0 14 9 23t23 9h320q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v96h-96 -q-32 0 -61 10t-51 23.5t-45 40.5t-37 46t-33.5 57t-28.5 57.5t-28 60.5q-23 53 -37 81.5t-36 65t-44.5 53.5t-46.5 17h-360q-22 -84 -91 -138t-157 -54q-106 0 -181 75t-75 181t75 181t181 75q88 0 157 -54t91 -138h104q24 0 46.5 17t44.5 53.5t36 65t37 81.5q19 41 28 60.5 -t28.5 57.5t33.5 57t37 46t45 40.5t51 23.5t61 10h107q21 57 70 92.5t111 35.5q80 0 136 -56t56 -136t-56 -136t-136 -56q-62 0 -111 35.5t-70 92.5h-107q-17 0 -33 -8t-31.5 -26t-27 -34t-27 -47t-24 -49t-24.5 -55q-46 -107 -83 -165h1114v128q0 18 16 28t32 -1z" /> - <glyph glyph-name="_608" unicode="&#xf288;" horiz-adv-x="1792" -d="M1150 774q0 -56 -39.5 -95t-95.5 -39h-253v269h253q56 0 95.5 -39.5t39.5 -95.5zM1329 774q0 130 -91.5 222t-222.5 92h-433v-896h180v269h253q130 0 222 91.5t92 221.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348 -t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="_609" unicode="&#xf289;" horiz-adv-x="2304" -d="M1645 438q0 59 -34 106.5t-87 68.5q-7 -45 -23 -92q-7 -24 -27.5 -38t-44.5 -14q-12 0 -24 3q-31 10 -45 38.5t-4 58.5q23 71 23 143q0 123 -61 227.5t-166 165.5t-228 61q-134 0 -247 -73t-167 -194q108 -28 188 -106q22 -23 22 -55t-22 -54t-54 -22t-55 22 -q-75 75 -180 75q-106 0 -181 -74.5t-75 -180.5t75 -180.5t181 -74.5h1046q79 0 134.5 55.5t55.5 133.5zM1798 438q0 -142 -100.5 -242t-242.5 -100h-1046q-169 0 -289 119.5t-120 288.5q0 153 100 267t249 136q62 184 221 298t354 114q235 0 408.5 -158.5t196.5 -389.5 -q116 -25 192.5 -118.5t76.5 -214.5zM2048 438q0 -175 -97 -319q-23 -33 -64 -33q-24 0 -43 13q-26 17 -32 48.5t12 57.5q71 104 71 233t-71 233q-18 26 -12 57t32 49t57.5 11.5t49.5 -32.5q97 -142 97 -318zM2304 438q0 -244 -134 -443q-23 -34 -64 -34q-23 0 -42 13 -q-26 18 -32.5 49t11.5 57q108 164 108 358q0 195 -108 357q-18 26 -11.5 57.5t32.5 48.5q26 18 57 12t49 -33q134 -198 134 -442z" /> - <glyph glyph-name="_610" unicode="&#xf28a;" -d="M1500 -13q0 -89 -63 -152.5t-153 -63.5t-153.5 63.5t-63.5 152.5q0 90 63.5 153.5t153.5 63.5t153 -63.5t63 -153.5zM1267 268q-115 -15 -192.5 -102.5t-77.5 -205.5q0 -74 33 -138q-146 -78 -379 -78q-109 0 -201 21t-153.5 54.5t-110.5 76.5t-76 85t-44.5 83 -t-23.5 66.5t-6 39.5q0 19 4.5 42.5t18.5 56t36.5 58t64 43.5t94.5 18t94 -17.5t63 -41t35.5 -53t17.5 -49t4 -33.5q0 -34 -23 -81q28 -27 82 -42t93 -17l40 -1q115 0 190 51t75 133q0 26 -9 48.5t-31.5 44.5t-49.5 41t-74 44t-93.5 47.5t-119.5 56.5q-28 13 -43 20 -q-116 55 -187 100t-122.5 102t-72 125.5t-20.5 162.5q0 78 20.5 150t66 137.5t112.5 114t166.5 77t221.5 28.5q120 0 220 -26t164.5 -67t109.5 -94t64 -105.5t19 -103.5q0 -46 -15 -82.5t-36.5 -58t-48.5 -36t-49 -19.5t-39 -5h-8h-32t-39 5t-44 14t-41 28t-37 46t-24 70.5 -t-10 97.5q-15 16 -59 25.5t-81 10.5l-37 1q-68 0 -117.5 -31t-70.5 -70t-21 -76q0 -24 5 -43t24 -46t53 -51t97 -53.5t150 -58.5q76 -25 138.5 -53.5t109 -55.5t83 -59t60.5 -59.5t41 -62.5t26.5 -62t14.5 -63.5t6 -62t1 -62.5z" /> - <glyph glyph-name="_611" unicode="&#xf28b;" -d="M704 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1152 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103 -t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_612" unicode="&#xf28c;" -d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 -t73 -273t198 -198t273 -73zM864 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192z" /> - <glyph glyph-name="_613" unicode="&#xf28d;" -d="M1088 352v576q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 -t103 -385.5z" /> - <glyph glyph-name="_614" unicode="&#xf28e;" -d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 -t73 -273t198 -198t273 -73zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h576q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-576z" /> - <glyph glyph-name="_615" unicode="&#xf290;" horiz-adv-x="1792" -d="M1757 128l35 -313q3 -28 -16 -50q-19 -21 -48 -21h-1664q-29 0 -48 21q-19 22 -16 50l35 313h1722zM1664 967l86 -775h-1708l86 775q3 24 21 40.5t43 16.5h256v-128q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5v128h384v-128q0 -53 37.5 -90.5t90.5 -37.5 -t90.5 37.5t37.5 90.5v128h256q25 0 43 -16.5t21 -40.5zM1280 1152v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" /> - <glyph glyph-name="_616" unicode="&#xf291;" horiz-adv-x="2048" -d="M1920 768q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-15l-115 -662q-8 -46 -44 -76t-82 -30h-1280q-46 0 -82 30t-44 76l-115 662h-15q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5h1792zM485 -32q26 2 43.5 22.5t15.5 46.5l-32 416q-2 26 -22.5 43.5 -t-46.5 15.5t-43.5 -22.5t-15.5 -46.5l32 -416q2 -25 20.5 -42t43.5 -17h5zM896 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1280 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1632 27l32 416 -q2 26 -15.5 46.5t-43.5 22.5t-46.5 -15.5t-22.5 -43.5l-32 -416q-2 -26 15.5 -46.5t43.5 -22.5h5q25 0 43.5 17t20.5 42zM476 1244l-93 -412h-132l101 441q19 88 89 143.5t160 55.5h167q0 26 19 45t45 19h384q26 0 45 -19t19 -45h167q90 0 160 -55.5t89 -143.5l101 -441 -h-132l-93 412q-11 44 -45.5 72t-79.5 28h-167q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45h-167q-45 0 -79.5 -28t-45.5 -72z" /> - <glyph glyph-name="_617" unicode="&#xf292;" horiz-adv-x="1792" -d="M991 512l64 256h-254l-64 -256h254zM1759 1016l-56 -224q-7 -24 -31 -24h-327l-64 -256h311q15 0 25 -12q10 -14 6 -28l-56 -224q-5 -24 -31 -24h-327l-81 -328q-7 -24 -31 -24h-224q-16 0 -26 12q-9 12 -6 28l78 312h-254l-81 -328q-7 -24 -31 -24h-225q-15 0 -25 12 -q-9 12 -6 28l78 312h-311q-15 0 -25 12q-9 12 -6 28l56 224q7 24 31 24h327l64 256h-311q-15 0 -25 12q-10 14 -6 28l56 224q5 24 31 24h327l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h254l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h311 -q15 0 25 -12q9 -12 6 -28z" /> - <glyph glyph-name="_618" unicode="&#xf293;" -d="M841 483l148 -148l-149 -149zM840 1094l149 -149l-148 -148zM710 -130l464 464l-306 306l306 306l-464 464v-611l-255 255l-93 -93l320 -321l-320 -321l93 -93l255 255v-611zM1429 640q0 -209 -32 -365.5t-87.5 -257t-140.5 -162.5t-181.5 -86.5t-219.5 -24.5 -t-219.5 24.5t-181.5 86.5t-140.5 162.5t-87.5 257t-32 365.5t32 365.5t87.5 257t140.5 162.5t181.5 86.5t219.5 24.5t219.5 -24.5t181.5 -86.5t140.5 -162.5t87.5 -257t32 -365.5z" /> - <glyph glyph-name="_619" unicode="&#xf294;" horiz-adv-x="1024" -d="M596 113l173 172l-173 172v-344zM596 823l173 172l-173 172v-344zM628 640l356 -356l-539 -540v711l-297 -296l-108 108l372 373l-372 373l108 108l297 -296v711l539 -540z" /> - <glyph glyph-name="_620" unicode="&#xf295;" -d="M1280 256q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM512 1024q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5 -t112.5 -271.5zM1440 1344q0 -20 -13 -38l-1056 -1408q-19 -26 -51 -26h-160q-26 0 -45 19t-19 45q0 20 13 38l1056 1408q19 26 51 26h160q26 0 45 -19t19 -45zM768 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 -t271.5 -112.5t112.5 -271.5z" /> - <glyph glyph-name="_621" unicode="&#xf296;" horiz-adv-x="1792" -d="M104 830l792 -1015l-868 630q-18 13 -25 34.5t0 42.5l101 308v0zM566 830h660l-330 -1015v0zM368 1442l198 -612h-462l198 612q8 23 33 23t33 -23zM1688 830l101 -308q7 -21 0 -42.5t-25 -34.5l-868 -630l792 1015v0zM1688 830h-462l198 612q8 23 33 23t33 -23z" /> - <glyph glyph-name="_622" unicode="&#xf297;" horiz-adv-x="1792" -d="M384 704h160v224h-160v-224zM1221 372v92q-104 -36 -243 -38q-135 -1 -259.5 46.5t-220.5 122.5l1 -96q88 -80 212 -128.5t272 -47.5q129 0 238 49zM640 704h640v224h-640v-224zM1792 736q0 -187 -99 -352q89 -102 89 -229q0 -157 -129.5 -268t-313.5 -111 -q-122 0 -225 52.5t-161 140.5q-19 -1 -57 -1t-57 1q-58 -88 -161 -140.5t-225 -52.5q-184 0 -313.5 111t-129.5 268q0 127 89 229q-99 165 -99 352q0 209 120 385.5t326.5 279.5t449.5 103t449.5 -103t326.5 -279.5t120 -385.5z" /> - <glyph glyph-name="_623" unicode="&#xf298;" -d="M515 625v-128h-252v128h252zM515 880v-127h-252v127h252zM1273 369v-128h-341v128h341zM1273 625v-128h-672v128h672zM1273 880v-127h-672v127h672zM1408 20v1240q0 8 -6 14t-14 6h-32l-378 -256l-210 171l-210 -171l-378 256h-32q-8 0 -14 -6t-6 -14v-1240q0 -8 6 -14 -t14 -6h1240q8 0 14 6t6 14zM553 1130l185 150h-406zM983 1130l221 150h-406zM1536 1260v-1240q0 -62 -43 -105t-105 -43h-1240q-62 0 -105 43t-43 105v1240q0 62 43 105t105 43h1240q62 0 105 -43t43 -105z" /> - <glyph glyph-name="_624" unicode="&#xf299;" horiz-adv-x="1792" -d="M896 720q-104 196 -160 278q-139 202 -347 318q-34 19 -70 36q-89 40 -94 32t34 -38l39 -31q62 -43 112.5 -93.5t94.5 -116.5t70.5 -113t70.5 -131q9 -17 13 -25q44 -84 84 -153t98 -154t115.5 -150t131 -123.5t148.5 -90.5q153 -66 154 -60q1 3 -49 37q-53 36 -81 57 -q-77 58 -179 211t-185 310zM549 177q-76 60 -132.5 125t-98 143.5t-71 154.5t-58.5 186t-52 209t-60.5 252t-76.5 289q273 0 497.5 -36t379 -92t271 -144.5t185.5 -172.5t110 -198.5t56 -199.5t12.5 -198.5t-9.5 -173t-20 -143.5t-13 -107l323 -327h-104l-281 285 -q-22 -2 -91.5 -14t-121.5 -19t-138 -6t-160.5 17t-167.5 59t-179 111z" /> - <glyph glyph-name="_625" unicode="&#xf29a;" horiz-adv-x="1792" -d="M1374 879q-6 26 -28.5 39.5t-48.5 7.5q-261 -62 -401 -62t-401 62q-26 6 -48.5 -7.5t-28.5 -39.5t7.5 -48.5t39.5 -28.5q194 -46 303 -58q-2 -158 -15.5 -269t-26.5 -155.5t-41 -115.5l-9 -21q-10 -25 1 -49t36 -34q9 -4 23 -4q44 0 60 41l8 20q54 139 71 259h42 -q17 -120 71 -259l8 -20q16 -41 60 -41q14 0 23 4q25 10 36 34t1 49l-9 21q-28 71 -41 115.5t-26.5 155.5t-15.5 269q109 12 303 58q26 6 39.5 28.5t7.5 48.5zM1024 1024q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z -M1600 640q0 -143 -55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5zM896 1408q-156 0 -298 -61t-245 -164t-164 -245t-61 -298t61 -298 -t164 -245t245 -164t298 -61t298 61t245 164t164 245t61 298t-61 298t-164 245t-245 164t-298 61zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="_626" unicode="&#xf29b;" -d="M1438 723q34 -35 29 -82l-44 -551q-4 -42 -34.5 -70t-71.5 -28q-6 0 -9 1q-44 3 -72.5 36.5t-25.5 77.5l35 429l-143 -8q55 -113 55 -240q0 -216 -148 -372l-137 137q91 101 91 235q0 145 -102.5 248t-247.5 103q-134 0 -236 -92l-137 138q120 114 284 141l264 300 -l-149 87l-181 -161q-33 -30 -77 -27.5t-73 35.5t-26.5 77t34.5 73l239 213q26 23 60 26.5t64 -14.5l488 -283q36 -21 48 -68q17 -67 -26 -117l-205 -232l371 20q49 3 83 -32zM1240 1180q-74 0 -126 52t-52 126t52 126t126 52t126.5 -52t52.5 -126t-52.5 -126t-126.5 -52z -M613 -62q106 0 196 61l139 -139q-146 -116 -335 -116q-148 0 -273.5 73t-198.5 198t-73 273q0 188 116 336l139 -139q-60 -88 -60 -197q0 -145 102.5 -247.5t247.5 -102.5z" /> - <glyph glyph-name="_627" unicode="&#xf29c;" -d="M880 336v-160q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h160q14 0 23 -9t9 -23zM1136 832q0 -50 -15 -90t-45.5 -69t-52 -44t-59.5 -36q-32 -18 -46.5 -28t-26 -24t-11.5 -29v-32q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v68q0 35 10.5 64.5 -t24 47.5t39 35.5t41 25.5t44.5 21q53 25 75 43t22 49q0 42 -43.5 71.5t-95.5 29.5q-56 0 -95 -27q-29 -20 -80 -83q-9 -12 -25 -12q-11 0 -19 6l-108 82q-10 7 -12 20t5 23q122 192 349 192q129 0 238.5 -89.5t109.5 -214.5zM768 1280q-130 0 -248.5 -51t-204 -136.5 -t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5 -t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="_628" unicode="&#xf29d;" horiz-adv-x="1408" -d="M366 1225q-64 0 -110 45.5t-46 110.5q0 64 46 109.5t110 45.5t109.5 -45.5t45.5 -109.5q0 -65 -45.5 -110.5t-109.5 -45.5zM917 583q0 -50 -30 -67.5t-63.5 -6.5t-47.5 34l-367 438q-7 12 -14 15.5t-11 1.5l-3 -3q-7 -8 4 -21l122 -139l1 -354l-161 -457 -q-67 -192 -92 -234q-15 -26 -28 -32q-50 -26 -103 -1q-29 13 -41.5 43t-9.5 57q2 17 197 618l5 416l-85 -164l35 -222q4 -24 -1 -42t-14 -27.5t-19 -16t-17 -7.5l-7 -2q-19 -3 -34.5 3t-24 16t-14 22t-7.5 19.5t-2 9.5l-46 299l211 381q23 34 113 34q75 0 107 -40l424 -521 -q7 -5 14 -17l3 -3l-1 -1q7 -13 7 -29zM514 433q43 -113 88.5 -225t69.5 -168l24 -55q36 -93 42 -125q11 -70 -36 -97q-35 -22 -66 -16t-51 22t-29 35h-1q-6 16 -8 25l-124 351zM1338 -159q31 -49 31 -57q0 -5 -3 -7q-9 -5 -14.5 0.5t-15.5 26t-16 30.5q-114 172 -423 661 -q3 -1 7 1t7 4l3 2q11 9 11 17z" /> - <glyph glyph-name="_629" unicode="&#xf29e;" horiz-adv-x="2304" -d="M504 542h171l-1 265zM1530 641q0 87 -50.5 140t-146.5 53h-54v-388h52q91 0 145 57t54 138zM956 1018l1 -756q0 -14 -9.5 -24t-23.5 -10h-216q-14 0 -23.5 10t-9.5 24v62h-291l-55 -81q-10 -15 -28 -15h-267q-21 0 -30.5 18t3.5 35l556 757q9 14 27 14h332q14 0 24 -10 -t10 -24zM1783 641q0 -193 -125.5 -303t-324.5 -110h-270q-14 0 -24 10t-10 24v756q0 14 10 24t24 10h268q200 0 326 -109t126 -302zM1939 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5 -t-7.5 60t-20 91.5t-41 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2123 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-45 -108t-74 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5 -h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2304 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66 104.5t41 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96 -t9.5 -70.5z" /> - <glyph glyph-name="uniF2A0" unicode="&#xf2a0;" horiz-adv-x="1408" -d="M617 -153q0 11 -13 58t-31 107t-20 69q-1 4 -5 26.5t-8.5 36t-13.5 21.5q-15 14 -51 14q-23 0 -70 -5.5t-71 -5.5q-34 0 -47 11q-6 5 -11 15.5t-7.5 20t-6.5 24t-5 18.5q-37 128 -37 255t37 255q1 4 5 18.5t6.5 24t7.5 20t11 15.5q13 11 47 11q24 0 71 -5.5t70 -5.5 -q36 0 51 14q9 8 13.5 21.5t8.5 36t5 26.5q2 9 20 69t31 107t13 58q0 22 -43.5 52.5t-75.5 42.5q-20 8 -45 8q-34 0 -98 -18q-57 -17 -96.5 -40.5t-71 -66t-46 -70t-45.5 -94.5q-6 -12 -9 -19q-49 -107 -68 -216t-19 -244t19 -244t68 -216q56 -122 83 -161q63 -91 179 -127 -l6 -2q64 -18 98 -18q25 0 45 8q32 12 75.5 42.5t43.5 52.5zM776 760q-26 0 -45 19t-19 45.5t19 45.5q37 37 37 90q0 52 -37 91q-19 19 -19 45t19 45t45 19t45 -19q75 -75 75 -181t-75 -181q-21 -19 -45 -19zM957 579q-27 0 -45 19q-19 19 -19 45t19 45q112 114 112 272 -t-112 272q-19 19 -19 45t19 45t45 19t45 -19q150 -150 150 -362t-150 -362q-18 -19 -45 -19zM1138 398q-27 0 -45 19q-19 19 -19 45t19 45q90 91 138.5 208t48.5 245t-48.5 245t-138.5 208q-19 19 -19 45t19 45t45 19t45 -19q109 -109 167 -249t58 -294t-58 -294t-167 -249 -q-18 -19 -45 -19z" /> - <glyph glyph-name="uniF2A1" unicode="&#xf2a1;" horiz-adv-x="2176" -d="M192 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 352 -q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 864 -q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 1376q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 192q0 -80 -56 -136 -t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 1216q0 -80 -56 -136t-136 -56 -t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 192q0 -80 -56 -136t-136 -56t-136 56 -t-56 136t56 136t136 56t136 -56t56 -136zM1664 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136 -t56 136t136 56t136 -56t56 -136zM2176 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136z" /> - <glyph glyph-name="uniF2A2" unicode="&#xf2a2;" horiz-adv-x="1792" -d="M128 -192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM320 0q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM365 365l256 -256l-90 -90l-256 256zM704 384q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45z -M1411 704q0 -59 -11.5 -108.5t-37.5 -93.5t-44 -67.5t-53 -64.5q-31 -35 -45.5 -54t-33.5 -50t-26.5 -64t-7.5 -74q0 -159 -112.5 -271.5t-271.5 -112.5q-26 0 -45 19t-19 45t19 45t45 19q106 0 181 75t75 181q0 57 11.5 105.5t37 91t43.5 66.5t52 63q40 46 59.5 72 -t37.5 74.5t18 103.5q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM896 576q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45 -t45 19t45 -19t19 -45zM1184 704q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 93 -65.5 158.5t-158.5 65.5q-92 0 -158 -65.5t-66 -158.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 146 103 249t249 103t249 -103t103 -249zM1578 993q10 -25 -1 -49t-36 -34q-9 -4 -23 -4 -q-19 0 -35.5 11t-23.5 30q-68 178 -224 295q-21 16 -25 42t12 47q17 21 43 25t47 -12q183 -137 266 -351zM1788 1074q9 -25 -1.5 -49t-35.5 -34q-11 -4 -23 -4q-44 0 -60 41q-92 238 -297 393q-22 16 -25.5 42t12.5 47q16 22 42 25.5t47 -12.5q235 -175 341 -449z" /> - <glyph glyph-name="uniF2A3" unicode="&#xf2a3;" horiz-adv-x="2304" -d="M1032 576q-59 2 -84 55q-17 34 -48 53.5t-68 19.5q-53 0 -90.5 -37.5t-37.5 -90.5q0 -56 36 -89l10 -8q34 -31 82 -31q37 0 68 19.5t48 53.5q25 53 84 55zM1600 704q0 56 -36 89l-10 8q-34 31 -82 31q-37 0 -68 -19.5t-48 -53.5q-25 -53 -84 -55q59 -2 84 -55 -q17 -34 48 -53.5t68 -19.5q53 0 90.5 37.5t37.5 90.5zM1174 925q-17 -35 -55 -48t-73 4q-62 31 -134 31q-51 0 -99 -17q3 0 9.5 0.5t9.5 0.5q92 0 170.5 -50t118.5 -133q17 -36 3.5 -73.5t-49.5 -54.5q-18 -9 -39 -9q21 0 39 -9q36 -17 49.5 -54.5t-3.5 -73.5 -q-40 -83 -118.5 -133t-170.5 -50h-6q-16 2 -44 4l-290 27l-239 -120q-14 -7 -29 -7q-40 0 -57 35l-160 320q-11 23 -4 47.5t29 37.5l209 119l148 267q17 155 91.5 291.5t195.5 236.5q31 25 70.5 21.5t64.5 -34.5t21.5 -70t-34.5 -65q-70 -59 -117 -128q123 84 267 101 -q40 5 71.5 -19t35.5 -64q5 -40 -19 -71.5t-64 -35.5q-84 -10 -159 -55q46 10 99 10q115 0 218 -50q36 -18 49 -55.5t-5 -73.5zM2137 1085l160 -320q11 -23 4 -47.5t-29 -37.5l-209 -119l-148 -267q-17 -155 -91.5 -291.5t-195.5 -236.5q-26 -22 -61 -22q-45 0 -74 35 -q-25 31 -21.5 70t34.5 65q70 59 117 128q-123 -84 -267 -101q-4 -1 -12 -1q-36 0 -63.5 24t-31.5 60q-5 40 19 71.5t64 35.5q84 10 159 55q-46 -10 -99 -10q-115 0 -218 50q-36 18 -49 55.5t5 73.5q17 35 55 48t73 -4q62 -31 134 -31q51 0 99 17q-3 0 -9.5 -0.5t-9.5 -0.5 -q-92 0 -170.5 50t-118.5 133q-17 36 -3.5 73.5t49.5 54.5q18 9 39 9q-21 0 -39 9q-36 17 -49.5 54.5t3.5 73.5q40 83 118.5 133t170.5 50h6h1q14 -2 42 -4l291 -27l239 120q14 7 29 7q40 0 57 -35z" /> - <glyph glyph-name="uniF2A4" unicode="&#xf2a4;" horiz-adv-x="1792" -d="M1056 704q0 -26 19 -45t45 -19t45 19t19 45q0 146 -103 249t-249 103t-249 -103t-103 -249q0 -26 19 -45t45 -19t45 19t19 45q0 93 66 158.5t158 65.5t158 -65.5t66 -158.5zM835 1280q-117 0 -223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5q0 -26 19 -45t45 -19t45 19 -t19 45q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -55 -18 -103.5t-37.5 -74.5t-59.5 -72q-34 -39 -52 -63t-43.5 -66.5t-37 -91t-11.5 -105.5q0 -106 -75 -181t-181 -75q-26 0 -45 -19t-19 -45t19 -45t45 -19q159 0 271.5 112.5t112.5 271.5q0 41 7.5 74 -t26.5 64t33.5 50t45.5 54q35 41 53 64.5t44 67.5t37.5 93.5t11.5 108.5q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5zM591 561l226 -226l-579 -579q-12 -12 -29 -12t-29 12l-168 168q-12 12 -12 29t12 29zM1612 1524l168 -168q12 -12 12 -29t-12 -30l-233 -233 -l-26 -25l-71 -71q-66 153 -195 258l91 91l207 207q13 12 30 12t29 -12z" /> - <glyph glyph-name="uniF2A5" unicode="&#xf2a5;" -d="M866 1021q0 -27 -13 -94q-11 -50 -31.5 -150t-30.5 -150q-2 -11 -4.5 -12.5t-13.5 -2.5q-20 -2 -31 -2q-58 0 -84 49.5t-26 113.5q0 88 35 174t103 124q28 14 51 14q28 0 36.5 -16.5t8.5 -47.5zM1352 597q0 14 -39 75.5t-52 66.5q-21 8 -34 8q-91 0 -226 -77l-2 2 -q3 22 27.5 135t24.5 178q0 233 -242 233q-24 0 -68 -6q-94 -17 -168.5 -89.5t-111.5 -166.5t-37 -189q0 -146 80.5 -225t227.5 -79q25 0 25 -3t-1 -5q-4 -34 -26 -117q-14 -52 -51.5 -101t-82.5 -49q-42 0 -42 47q0 24 10.5 47.5t25 39.5t29.5 28.5t26 20t11 8.5q0 3 -7 10 -q-24 22 -58.5 36.5t-65.5 14.5q-35 0 -63.5 -34t-41 -75t-12.5 -75q0 -88 51.5 -142t138.5 -54q82 0 155 53t117.5 126t65.5 153q6 22 15.5 66.5t14.5 66.5q3 12 14 18q118 60 227 60q48 0 127 -18q1 -1 4 -1q5 0 9.5 4.5t4.5 8.5zM1536 1120v-960q0 -119 -84.5 -203.5 -t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="uniF2A6" unicode="&#xf2a6;" horiz-adv-x="1535" -d="M744 1231q0 24 -2 38.5t-8.5 30t-21 23t-37.5 7.5q-39 0 -78 -23q-105 -58 -159 -190.5t-54 -269.5q0 -44 8.5 -85.5t26.5 -80.5t52.5 -62.5t81.5 -23.5q4 0 18 -0.5t20 0t16 3t15 8.5t7 16q16 77 48 231.5t48 231.5q19 91 19 146zM1498 575q0 -7 -7.5 -13.5t-15.5 -6.5 -l-6 1q-22 3 -62 11t-72 12.5t-63 4.5q-167 0 -351 -93q-15 -8 -21 -27q-10 -36 -24.5 -105.5t-22.5 -100.5q-23 -91 -70 -179.5t-112.5 -164.5t-154.5 -123t-185 -47q-135 0 -214.5 83.5t-79.5 219.5q0 53 19.5 117t63 116.5t97.5 52.5q38 0 120 -33.5t83 -61.5 -q0 -1 -16.5 -12.5t-39.5 -31t-46 -44.5t-39 -61t-16 -74q0 -33 16.5 -53t48.5 -20q45 0 85 31.5t66.5 78t48 105.5t32.5 107t16 90v9q0 2 -3.5 3.5t-8.5 1.5h-10t-10 -0.5t-6 -0.5q-227 0 -352 122.5t-125 348.5q0 108 34.5 221t96 210t156 167.5t204.5 89.5q52 9 106 9 -q374 0 374 -360q0 -98 -38 -273t-43 -211l3 -3q101 57 182.5 88t167.5 31q22 0 53 -13q19 -7 80 -102.5t61 -116.5z" /> - <glyph glyph-name="uniF2A7" unicode="&#xf2a7;" horiz-adv-x="1664" -d="M831 863q32 0 59 -18l222 -148q61 -40 110 -97l146 -170q40 -46 29 -106l-72 -413q-6 -32 -29.5 -53.5t-55.5 -25.5l-527 -56l-352 -32h-9q-39 0 -67.5 28t-28.5 68q0 37 27 64t65 32l260 32h-448q-41 0 -69.5 30t-26.5 71q2 39 32 65t69 26l442 1l-521 64q-41 5 -66 37 -t-19 73q6 35 34.5 57.5t65.5 22.5h10l481 -60l-351 94q-38 10 -62 41.5t-18 68.5q6 36 33 58.5t62 22.5q6 0 20 -2l448 -96l217 -37q1 0 3 -0.5t3 -0.5q23 0 30.5 23t-12.5 36l-186 125q-35 23 -42 63.5t18 73.5q27 38 76 38zM761 661l186 -125l-218 37l-5 2l-36 38 -l-238 262q-1 1 -2.5 3.5t-2.5 3.5q-24 31 -18.5 70t37.5 64q31 23 68 17.5t64 -33.5l142 -147q-2 -1 -5 -3.5t-4 -4.5q-32 -45 -23 -99t55 -85zM1648 1115l15 -266q4 -73 -11 -147l-48 -219q-12 -59 -67 -87l-106 -54q2 62 -39 109l-146 170q-53 61 -117 103l-222 148 -q-34 23 -76 23q-51 0 -88 -37l-235 312q-25 33 -18 73.5t41 63.5q33 22 71.5 14t62.5 -40l266 -352l-262 455q-21 35 -10.5 75t47.5 59q35 18 72.5 6t57.5 -46l241 -420l-136 337q-15 35 -4.5 74t44.5 56q37 19 76 6t56 -51l193 -415l101 -196q8 -15 23 -17.5t27 7.5t11 26 -l-12 224q-2 41 26 71t69 31q39 0 67 -28.5t30 -67.5z" /> - <glyph glyph-name="uniF2A8" unicode="&#xf2a8;" horiz-adv-x="1792" -d="M335 180q-2 0 -6 2q-86 57 -168.5 145t-139.5 180q-21 30 -21 69q0 9 2 19t4 18t7 18t8.5 16t10.5 17t10 15t12 15.5t11 14.5q184 251 452 365q-110 198 -110 211q0 19 17 29q116 64 128 64q18 0 28 -16l124 -229q92 19 192 19q266 0 497.5 -137.5t378.5 -369.5 -q20 -31 20 -69t-20 -69q-91 -142 -218.5 -253.5t-278.5 -175.5q110 -198 110 -211q0 -20 -17 -29q-116 -64 -127 -64q-19 0 -29 16l-124 229l-64 119l-444 820l7 7q-58 -24 -99 -47q3 -5 127 -234t243 -449t119 -223q0 -7 -9 -9q-13 -3 -72 -3q-57 0 -60 7l-456 841 -q-39 -28 -82 -68q24 -43 214 -393.5t190 -354.5q0 -10 -11 -10q-14 0 -82.5 22t-72.5 28l-106 197l-224 413q-44 -53 -78 -106q2 -3 18 -25t23 -34l176 -327q0 -10 -10 -10zM1165 282l49 -91q273 111 450 385q-180 277 -459 389q67 -64 103 -148.5t36 -176.5 -q0 -106 -47 -200.5t-132 -157.5zM848 896q0 -20 14 -34t34 -14q86 0 147 -61t61 -147q0 -20 14 -34t34 -14t34 14t14 34q0 126 -89 215t-215 89q-20 0 -34 -14t-14 -34zM1214 961l-9 4l7 -7z" /> - <glyph glyph-name="uniF2A9" unicode="&#xf2a9;" horiz-adv-x="1280" -d="M1050 430q0 -215 -147 -374q-148 -161 -378 -161q-232 0 -378 161q-147 159 -147 374q0 147 68 270.5t189 196.5t268 73q96 0 182 -31q-32 -62 -39 -126q-66 28 -143 28q-167 0 -280.5 -123t-113.5 -291q0 -170 112.5 -288.5t281.5 -118.5t281 118.5t112 288.5 -q0 89 -32 166q66 13 123 49q41 -98 41 -212zM846 619q0 -192 -79.5 -345t-238.5 -253l-14 -1q-29 0 -62 5q83 32 146.5 102.5t99.5 154.5t58.5 189t30 192.5t7.5 178.5q0 69 -3 103q55 -160 55 -326zM791 947v-2q-73 214 -206 440q88 -59 142.5 -186.5t63.5 -251.5z -M1035 744q-83 0 -160 75q218 120 290 247q19 37 21 56q-42 -94 -139.5 -166.5t-204.5 -97.5q-35 54 -35 113q0 37 17 79t43 68q46 44 157 74q59 16 106 58.5t74 100.5q74 -105 74 -253q0 -109 -24 -170q-32 -77 -88.5 -130.5t-130.5 -53.5z" /> - <glyph glyph-name="uniF2AA" unicode="&#xf2aa;" -d="M1050 495q0 78 -28 147q-41 -25 -85 -34q22 -50 22 -114q0 -117 -77 -198.5t-193 -81.5t-193.5 81.5t-77.5 198.5q0 115 78 199.5t193 84.5q53 0 98 -19q4 43 27 87q-60 21 -125 21q-154 0 -257.5 -108.5t-103.5 -263.5t103.5 -261t257.5 -106t257.5 106.5t103.5 260.5z -M872 850q2 -24 2 -71q0 -63 -5 -123t-20.5 -132.5t-40.5 -130t-68.5 -106t-100.5 -70.5q21 -3 42 -3h10q219 139 219 411q0 116 -38 225zM872 850q-4 80 -44 171.5t-98 130.5q92 -156 142 -302zM1207 955q0 102 -51 174q-41 -86 -124 -109q-69 -19 -109 -53.5t-40 -99.5 -q0 -40 24 -77q74 17 140.5 67t95.5 115q-4 -52 -74.5 -111.5t-138.5 -97.5q52 -52 110 -52q51 0 90 37t60 90q17 42 17 117zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 -t84.5 -203.5z" /> - <glyph glyph-name="uniF2AB" unicode="&#xf2ab;" -d="M1279 388q0 22 -22 27q-67 15 -118 59t-80 108q-7 19 -7 25q0 15 19.5 26t43 17t43 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-12 0 -32 -8t-31 -8q-4 0 -12 2q5 95 5 114q0 79 -17 114q-36 78 -103 121.5t-152 43.5q-199 0 -275 -165q-17 -35 -17 -114q0 -19 5 -114 -q-4 -2 -14 -2q-12 0 -32 7.5t-30 7.5q-21 0 -38.5 -12t-17.5 -32q0 -21 19.5 -35.5t43 -20.5t43 -17t19.5 -26q0 -6 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -46 137 -68q2 -5 6 -26t11.5 -30.5t23.5 -9.5q12 0 37.5 4.5t39.5 4.5q35 0 67 -15t54 -32.5t57.5 -32.5 -t76.5 -15q43 0 79 15t57.5 32.5t53.5 32.5t67 15q14 0 39.5 -4t38.5 -4q16 0 23 10t11 30t6 25q137 22 137 68zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 -t103 -385.5z" /> - <glyph glyph-name="uniF2AC" unicode="&#xf2ac;" horiz-adv-x="1664" -d="M848 1408q134 1 240.5 -68.5t163.5 -192.5q27 -58 27 -179q0 -47 -9 -191q14 -7 28 -7q18 0 51 13.5t51 13.5q29 0 56 -18t27 -46q0 -32 -31.5 -54t-69 -31.5t-69 -29t-31.5 -47.5q0 -15 12 -43q37 -82 102.5 -150t144.5 -101q28 -12 80 -23q28 -6 28 -35 -q0 -70 -219 -103q-7 -11 -11 -39t-14 -46.5t-33 -18.5q-20 0 -62 6.5t-64 6.5q-37 0 -62 -5q-32 -5 -63 -22.5t-58 -38t-58 -40.5t-76 -33.5t-99 -13.5q-52 0 -96.5 13.5t-75 33.5t-57.5 40.5t-58 38t-62 22.5q-26 5 -63 5q-24 0 -65.5 -7.5t-58.5 -7.5q-25 0 -35 18.5 -t-14 47.5t-11 40q-219 33 -219 103q0 29 28 35q52 11 80 23q78 32 144.5 101t102.5 150q12 28 12 43q0 28 -31.5 47.5t-69.5 29.5t-69.5 31.5t-31.5 52.5q0 27 26 45.5t55 18.5q15 0 48 -13t53 -13q18 0 32 7q-9 142 -9 190q0 122 27 180q64 137 172 198t264 63z" /> - <glyph glyph-name="uniF2AD" unicode="&#xf2ad;" -d="M1280 388q0 22 -22 27q-67 14 -118 58t-80 109q-7 14 -7 25q0 15 19.5 26t42.5 17t42.5 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-11 0 -31 -8t-32 -8q-4 0 -12 2q5 63 5 115q0 78 -17 114q-36 78 -102.5 121.5t-152.5 43.5q-198 0 -275 -165q-18 -38 -18 -115 -q0 -38 6 -114q-10 -2 -15 -2q-11 0 -31.5 8t-30.5 8q-20 0 -37.5 -12.5t-17.5 -32.5q0 -21 19.5 -35.5t42.5 -20.5t42.5 -17t19.5 -26q0 -11 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -47 138 -69q2 -5 6 -26t11 -30.5t23 -9.5q13 0 38.5 5t38.5 5q35 0 67.5 -15 -t54.5 -32.5t57.5 -32.5t76.5 -15q43 0 79 15t57.5 32.5t54 32.5t67.5 15q13 0 39 -4.5t39 -4.5q15 0 22.5 9.5t11.5 31t5 24.5q138 22 138 69zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 -q119 0 203.5 -84.5t84.5 -203.5z" /> - <glyph glyph-name="uniF2AE" unicode="&#xf2ae;" horiz-adv-x="2304" -d="M2304 1536q-69 -46 -125 -92t-89 -81t-59.5 -71.5t-37.5 -57.5t-22 -44.5t-14 -29.5q-10 -18 -35.5 -136.5t-48.5 -164.5q-15 -29 -50 -60.5t-67.5 -50.5t-72.5 -41t-48 -28q-47 -31 -151 -231q-341 14 -630 -158q-92 -53 -303 -179q47 16 86 31t55 22l15 7 -q71 27 163 64.5t133.5 53.5t108 34.5t142.5 31.5q186 31 465 -7q1 0 10 -3q11 -6 14 -17t-3 -22l-194 -345q-15 -29 -47 -22q-128 24 -354 24q-146 0 -402 -44.5t-392 -46.5q-82 -1 -149 13t-107 37t-61 40t-33 34l-1 1v2q0 6 6 6q138 0 371 55q192 366 374.5 524t383.5 158 -q5 0 14.5 -0.5t38 -5t55 -12t61.5 -24.5t63 -39.5t54 -59t40 -82.5l102 177q2 4 21 42.5t44.5 86.5t61 109.5t84 133.5t100.5 137q66 82 128 141.5t121.5 96.5t92.5 53.5t88 39.5z" /> - <glyph glyph-name="uniF2B0" unicode="&#xf2b0;" -d="M1322 640q0 -45 -5 -76l-236 14l224 -78q-19 -73 -58 -141l-214 103l177 -158q-44 -61 -107 -108l-157 178l103 -215q-61 -37 -140 -59l-79 228l14 -240q-38 -6 -76 -6t-76 6l14 238l-78 -226q-74 19 -140 59l103 215l-157 -178q-59 43 -108 108l178 158l-214 -104 -q-39 69 -58 141l224 79l-237 -14q-5 42 -5 76q0 35 5 77l238 -14l-225 79q19 73 58 140l214 -104l-177 159q46 61 107 108l158 -178l-103 215q67 39 140 58l77 -224l-13 236q36 6 75 6q38 0 76 -6l-14 -237l78 225q74 -19 140 -59l-103 -214l158 178q61 -47 107 -108 -l-177 -159l213 104q37 -62 58 -141l-224 -78l237 14q5 -31 5 -77zM1352 640q0 160 -78.5 295.5t-213 214t-292.5 78.5q-119 0 -227 -46.5t-186.5 -125t-124.5 -187.5t-46 -229q0 -119 46 -228t124.5 -187.5t186.5 -125t227 -46.5q158 0 292.5 78.5t213 214t78.5 294.5z -M1425 1023v-766l-657 -383l-657 383v766l657 383zM768 -183l708 412v823l-708 411l-708 -411v-823zM1536 1088v-896l-768 -448l-768 448v896l768 448z" /> - <glyph glyph-name="uniF2B1" unicode="&#xf2b1;" horiz-adv-x="1664" -d="M339 1318h691l-26 -72h-665q-110 0 -188.5 -79t-78.5 -189v-771q0 -95 60.5 -169.5t153.5 -93.5q23 -5 98 -5v-72h-45q-140 0 -239.5 100t-99.5 240v771q0 140 99.5 240t239.5 100zM1190 1536h247l-482 -1294q-23 -61 -40.5 -103.5t-45 -98t-54 -93.5t-64.5 -78.5 -t-79.5 -65t-95.5 -41t-116 -18.5v195q163 26 220 182q20 52 20 105q0 54 -20 106l-285 733h228l187 -585zM1664 978v-1111h-795q37 55 45 73h678v1038q0 85 -49.5 155t-129.5 99l25 67q101 -34 163.5 -123.5t62.5 -197.5z" /> - <glyph glyph-name="uniF2B2" unicode="&#xf2b2;" horiz-adv-x="1792" -d="M852 1227q0 -29 -17 -52.5t-45 -23.5t-45 23.5t-17 52.5t17 52.5t45 23.5t45 -23.5t17 -52.5zM688 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50 -21.5t-20 -51.5v-114q0 -30 20.5 -52t49.5 -22q30 0 50.5 22t20.5 52zM860 -149v114q0 30 -20 51.5t-50 21.5t-50.5 -21.5 -t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22q29 0 49.5 22t20.5 52zM1034 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1208 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114 -q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1476 535q-84 -160 -232 -259.5t-323 -99.5q-123 0 -229.5 51.5t-178.5 137t-113 197.5t-41 232q0 88 21 174q-104 -175 -104 -390q0 -162 65 -312t185 -251q30 57 91 57q56 0 86 -50q32 50 87 50q56 0 86 -50q32 50 87 50t87 -50 -q30 50 86 50q28 0 52.5 -15.5t37.5 -40.5q112 94 177 231.5t73 287.5zM1326 564q0 75 -72 75q-17 0 -47 -6q-95 -19 -149 -19q-226 0 -226 243q0 86 30 204q-83 -127 -83 -275q0 -150 89 -260.5t235 -110.5q111 0 210 70q13 48 13 79zM884 1223q0 50 -32 89.5t-81 39.5 -t-81 -39.5t-32 -89.5q0 -51 31.5 -90.5t81.5 -39.5t81.5 39.5t31.5 90.5zM1513 884q0 96 -37.5 179t-113 137t-173.5 54q-77 0 -149 -35t-127 -94q-48 -159 -48 -268q0 -104 45.5 -157t147.5 -53q53 0 142 19q36 6 53 6q51 0 77.5 -28t26.5 -80q0 -26 -4 -46 -q75 68 117.5 165.5t42.5 200.5zM1792 667q0 -111 -33.5 -249.5t-93.5 -204.5q-58 -64 -195 -142.5t-228 -104.5l-4 -1v-114q0 -43 -29.5 -75t-72.5 -32q-56 0 -86 50q-32 -50 -87 -50t-87 50q-30 -50 -86 -50q-55 0 -87 50q-30 -50 -86 -50q-47 0 -75 33.5t-28 81.5 -q-90 -68 -198 -68q-118 0 -211 80q54 1 106 20q-113 31 -182 127q32 -7 71 -7q89 0 164 46q-192 192 -240 306q-24 56 -24 160q0 57 9 125.5t31.5 146.5t55 141t86.5 105t120 42q59 0 81 -52q19 29 42 54q2 3 12 13t13 16q10 15 23 38t25 42t28 39q87 111 211.5 177 -t260.5 66q35 0 62 -4q59 64 146 64q83 0 140 -57q5 -5 5 -12q0 -5 -6 -13.5t-12.5 -16t-16 -17l-10.5 -10.5q17 -6 36 -18t19 -24q0 -6 -16 -25q157 -138 197 -378q25 30 60 30q45 0 100 -49q90 -80 90 -279z" /> - <glyph glyph-name="uniF2B3" unicode="&#xf2b3;" -d="M917 631q0 33 -6 64h-362v-132h217q-12 -76 -74.5 -120.5t-142.5 -44.5q-99 0 -169 71.5t-70 170.5t70 170.5t169 71.5q93 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585h109v110 -h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" /> - <glyph glyph-name="uniF2B4" unicode="&#xf2b4;" -d="M1536 1024v-839q0 -48 -49 -62q-174 -52 -338 -52q-73 0 -215.5 29.5t-227.5 29.5q-164 0 -370 -48v-338h-160v1368q-63 25 -101 81t-38 124q0 91 64 155t155 64t155 -64t64 -155q0 -68 -38 -124t-101 -81v-68q190 44 343 44q99 0 198 -15q14 -2 111.5 -22.5t149.5 -20.5 -q77 0 165 18q11 2 80 21t89 19q26 0 45 -19t19 -45z" /> - <glyph glyph-name="uniF2B5" unicode="&#xf2b5;" horiz-adv-x="2304" -d="M192 384q40 0 56 32t0 64t-56 32t-56 -32t0 -64t56 -32zM1665 442q-10 13 -38.5 50t-41.5 54t-38 49t-42.5 53t-40.5 47t-45 49l-125 -140q-83 -94 -208.5 -92t-205.5 98q-57 69 -56.5 158t58.5 157l177 206q-22 11 -51 16.5t-47.5 6t-56.5 -0.5t-49 -1q-92 0 -158 -66 -l-158 -158h-155v-544q5 0 21 0.5t22 0t19.5 -2t20.5 -4.5t17.5 -8.5t18.5 -13.5l297 -292q115 -111 227 -111q78 0 125 47q57 -20 112.5 8t72.5 85q74 -6 127 44q20 18 36 45.5t14 50.5q10 -10 43 -10q43 0 77 21t49.5 53t12 71.5t-30.5 73.5zM1824 384h96v512h-93l-157 180 -q-66 76 -169 76h-167q-89 0 -146 -67l-209 -243q-28 -33 -28 -75t27 -75q43 -51 110 -52t111 49l193 218q25 23 53.5 21.5t47 -27t8.5 -56.5q16 -19 56 -63t60 -68q29 -36 82.5 -105.5t64.5 -84.5q52 -66 60 -140zM2112 384q40 0 56 32t0 64t-56 32t-56 -32t0 -64t56 -32z -M2304 960v-640q0 -26 -19 -45t-45 -19h-434q-27 -65 -82 -106.5t-125 -51.5q-33 -48 -80.5 -81.5t-102.5 -45.5q-42 -53 -104.5 -81.5t-128.5 -24.5q-60 -34 -126 -39.5t-127.5 14t-117 53.5t-103.5 81l-287 282h-358q-26 0 -45 19t-19 45v672q0 26 19 45t45 19h421 -q14 14 47 48t47.5 48t44 40t50.5 37.5t51 25.5t62 19.5t68 5.5h117q99 0 181 -56q82 56 181 56h167q35 0 67 -6t56.5 -14.5t51.5 -26.5t44.5 -31t43 -39.5t39 -42t41 -48t41.5 -48.5h355q26 0 45 -19t19 -45z" /> - <glyph glyph-name="uniF2B6" unicode="&#xf2b6;" horiz-adv-x="1792" -d="M1792 882v-978q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v978q0 15 11 24q8 7 39 34.5t41.5 36t45.5 37.5t70 55.5t96 73t143.5 107t192.5 140.5q5 4 52.5 40t71.5 52.5t64 35t69 18.5t69 -18.5t65 -35.5t71 -52t52 -40q110 -80 192.5 -140.5t143.5 -107 -t96 -73t70 -55.5t45.5 -37.5t41.5 -36t39 -34.5q11 -9 11 -24zM1228 297q263 191 345 252q11 8 12.5 20.5t-6.5 23.5l-38 52q-8 11 -21 12.5t-24 -6.5q-231 -169 -343 -250q-5 -3 -52 -39t-71.5 -52.5t-64.5 -35t-69 -18.5t-69 18.5t-64.5 35t-71.5 52.5t-52 39 -q-186 134 -343 250q-11 8 -24 6.5t-21 -12.5l-38 -52q-8 -11 -6.5 -23.5t12.5 -20.5q82 -61 345 -252q10 -8 50 -38t65 -47t64 -39.5t77.5 -33.5t75.5 -11t75.5 11t79 34.5t64.5 39.5t65 47.5t48 36.5z" /> - <glyph glyph-name="uniF2B7" unicode="&#xf2b7;" horiz-adv-x="1792" -d="M1474 623l39 -51q8 -11 6.5 -23.5t-11.5 -20.5q-43 -34 -126.5 -98.5t-146.5 -113t-67 -51.5q-39 -32 -60 -48t-60.5 -41t-76.5 -36.5t-74 -11.5h-1h-1q-37 0 -74 11.5t-76 36.5t-61 41.5t-60 47.5q-5 4 -65 50.5t-143.5 111t-122.5 94.5q-11 8 -12.5 20.5t6.5 23.5 -l37 52q8 11 21.5 13t24.5 -7q94 -73 306 -236q5 -4 43.5 -35t60.5 -46.5t56.5 -32.5t58.5 -17h1h1q24 0 58.5 17t56.5 32.5t60.5 46.5t43.5 35q258 198 313 242q11 8 24 6.5t21 -12.5zM1664 -96v928q-90 83 -159 139q-91 74 -389 304q-3 2 -43 35t-61 48t-56 32.5t-59 17.5 -h-1h-1q-24 0 -59 -17.5t-56 -32.5t-61 -48t-43 -35q-215 -166 -315.5 -245.5t-129.5 -104t-82 -74.5q-14 -12 -21 -19v-928q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 832v-928q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v928q0 56 41 94 -q123 114 350 290.5t233 181.5q36 30 59 47.5t61.5 42t76 36.5t74.5 12h1h1q37 0 74.5 -12t76 -36.5t61.5 -42t59 -47.5q43 -36 156 -122t226 -177t201 -173q41 -38 41 -94z" /> - <glyph glyph-name="uniF2B8" unicode="&#xf2b8;" -d="M330 1l202 -214l-34 236l-216 213zM556 -225l274 218l-11 245l-300 -215zM245 413l227 -213l-48 327l-245 204zM495 189l317 214l-14 324l-352 -200zM843 178l95 -80l-2 239l-103 79q0 -1 1 -8.5t0 -12t-5 -7.5l-78 -52l85 -70q7 -6 7 -88zM138 930l256 -200l-68 465 -l-279 173zM1173 267l15 234l-230 -164l2 -240zM417 722l373 194l-19 441l-423 -163zM1270 357l20 233l-226 142l-2 -105l144 -95q6 -4 4 -9l-7 -119zM1461 496l30 222l-179 -128l-20 -228zM1273 329l-71 49l-8 -117q0 -5 -4 -8l-234 -187q-7 -5 -14 0l-98 83l7 -161 -q0 -5 -4 -8l-293 -234q-4 -2 -6 -2q-8 2 -8 3l-228 242q-4 4 -59 277q-2 7 5 11l61 37q-94 86 -95 92l-72 351q-2 7 6 12l94 45q-133 100 -135 108l-96 466q-2 10 7 13l433 135q5 0 8 -1l317 -153q6 -4 6 -9l20 -463q0 -7 -6 -10l-118 -61l126 -85q5 -2 5 -8l5 -123l121 74 -q5 4 11 0l84 -56l3 110q0 6 5 9l206 126q6 3 11 0l245 -135q4 -4 5 -7t-6.5 -60t-17.5 -124.5t-10 -70.5q0 -5 -4 -7l-191 -153q-6 -5 -13 0z" /> - <glyph glyph-name="uniF2B9" unicode="&#xf2b9;" horiz-adv-x="1664" -d="M1201 298q0 57 -5.5 107t-21 100.5t-39.5 86t-64 58t-91 22.5q-6 -4 -33.5 -20.5t-42.5 -24.5t-40.5 -20t-49 -17t-46.5 -5t-46.5 5t-49 17t-40.5 20t-42.5 24.5t-33.5 20.5q-51 0 -91 -22.5t-64 -58t-39.5 -86t-21 -100.5t-5.5 -107q0 -73 42 -121.5t103 -48.5h576 -q61 0 103 48.5t42 121.5zM1028 892q0 108 -76.5 184t-183.5 76t-183.5 -76t-76.5 -184q0 -107 76.5 -183t183.5 -76t183.5 76t76.5 183zM1664 352v-192q0 -14 -9 -23t-23 -9h-96v-224q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v1472q0 66 47 113t113 47h1216 -q66 0 113 -47t47 -113v-224h96q14 0 23 -9t9 -23v-192q0 -14 -9 -23t-23 -9h-96v-128h96q14 0 23 -9t9 -23v-192q0 -14 -9 -23t-23 -9h-96v-128h96q14 0 23 -9t9 -23z" /> - <glyph glyph-name="uniF2BA" unicode="&#xf2ba;" horiz-adv-x="1664" -d="M1028 892q0 -107 -76.5 -183t-183.5 -76t-183.5 76t-76.5 183q0 108 76.5 184t183.5 76t183.5 -76t76.5 -184zM980 672q46 0 82.5 -17t60 -47.5t39.5 -67t24 -81t11.5 -82.5t3.5 -79q0 -67 -39.5 -118.5t-105.5 -51.5h-576q-66 0 -105.5 51.5t-39.5 118.5q0 48 4.5 93.5 -t18.5 98.5t36.5 91.5t63 64.5t93.5 26h5q7 -4 32 -19.5t35.5 -21t33 -17t37 -16t35 -9t39.5 -4.5t39.5 4.5t35 9t37 16t33 17t35.5 21t32 19.5zM1664 928q0 -13 -9.5 -22.5t-22.5 -9.5h-96v-128h96q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-96v-128h96 -q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-96v-224q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v1472q0 66 47 113t113 47h1216q66 0 113 -47t47 -113v-224h96q13 0 22.5 -9.5t9.5 -22.5v-192zM1408 -96v1472q0 13 -9.5 22.5t-22.5 9.5h-1216 -q-13 0 -22.5 -9.5t-9.5 -22.5v-1472q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5z" /> - <glyph glyph-name="uniF2BB" unicode="&#xf2bb;" horiz-adv-x="2048" -d="M1024 405q0 64 -9 117.5t-29.5 103t-60.5 78t-97 28.5q-6 -4 -30 -18t-37.5 -21.5t-35.5 -17.5t-43 -14.5t-42 -4.5t-42 4.5t-43 14.5t-35.5 17.5t-37.5 21.5t-30 18q-57 0 -97 -28.5t-60.5 -78t-29.5 -103t-9 -117.5t37 -106.5t91 -42.5h512q54 0 91 42.5t37 106.5z -M867 925q0 94 -66.5 160.5t-160.5 66.5t-160.5 -66.5t-66.5 -160.5t66.5 -160.5t160.5 -66.5t160.5 66.5t66.5 160.5zM1792 416v64q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM1792 676v56q0 15 -10.5 25.5t-25.5 10.5h-568 -q-15 0 -25.5 -10.5t-10.5 -25.5v-56q0 -15 10.5 -25.5t25.5 -10.5h568q15 0 25.5 10.5t10.5 25.5zM1792 928v64q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM2048 1248v-1216q0 -66 -47 -113t-113 -47h-352v96q0 14 -9 23t-23 9 -h-64q-14 0 -23 -9t-9 -23v-96h-768v96q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-96h-352q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1728q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2BC" unicode="&#xf2bc;" horiz-adv-x="2048" -d="M1024 405q0 -64 -37 -106.5t-91 -42.5h-512q-54 0 -91 42.5t-37 106.5t9 117.5t29.5 103t60.5 78t97 28.5q6 -4 30 -18t37.5 -21.5t35.5 -17.5t43 -14.5t42 -4.5t42 4.5t43 14.5t35.5 17.5t37.5 21.5t30 18q57 0 97 -28.5t60.5 -78t29.5 -103t9 -117.5zM867 925 -q0 -94 -66.5 -160.5t-160.5 -66.5t-160.5 66.5t-66.5 160.5t66.5 160.5t160.5 66.5t160.5 -66.5t66.5 -160.5zM1792 480v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM1792 732v-56q0 -15 -10.5 -25.5t-25.5 -10.5h-568 -q-15 0 -25.5 10.5t-10.5 25.5v56q0 15 10.5 25.5t25.5 10.5h568q15 0 25.5 -10.5t10.5 -25.5zM1792 992v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM1920 32v1216q0 13 -9.5 22.5t-22.5 9.5h-1728q-13 0 -22.5 -9.5 -t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h352v96q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-96h768v96q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-96h352q13 0 22.5 9.5t9.5 22.5zM2048 1248v-1216q0 -66 -47 -113t-113 -47h-1728q-66 0 -113 47t-47 113v1216q0 66 47 113 -t113 47h1728q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2BD" unicode="&#xf2bd;" horiz-adv-x="1792" -d="M1523 197q-22 155 -87.5 257.5t-184.5 118.5q-67 -74 -159.5 -115.5t-195.5 -41.5t-195.5 41.5t-159.5 115.5q-119 -16 -184.5 -118.5t-87.5 -257.5q106 -150 271 -237.5t356 -87.5t356 87.5t271 237.5zM1280 896q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5 -t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1792 640q0 -182 -71 -347.5t-190.5 -286t-285.5 -191.5t-349 -71q-182 0 -348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="uniF2BE" unicode="&#xf2be;" horiz-adv-x="1792" -d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348q0 -181 -70.5 -347t-190.5 -286t-286 -191.5t-349 -71.5t-349 71t-285.5 191.5t-190.5 286t-71 347.5t71 348t191 286t286 191t348 71zM1515 185q149 205 149 455q0 156 -61 298t-164 245t-245 164t-298 61t-298 -61 -t-245 -164t-164 -245t-61 -298q0 -250 149 -455q66 327 306 327q131 -128 313 -128t313 128q240 0 306 -327zM1280 832q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5z" /> - <glyph glyph-name="uniF2C0" unicode="&#xf2c0;" -d="M1201 752q47 -14 89.5 -38t89 -73t79.5 -115.5t55 -172t22 -236.5q0 -154 -100 -263.5t-241 -109.5h-854q-141 0 -241 109.5t-100 263.5q0 131 22 236.5t55 172t79.5 115.5t89 73t89.5 38q-79 125 -79 272q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5 -t198.5 -40.5t163.5 -109.5t109.5 -163.5t40.5 -198.5q0 -147 -79 -272zM768 1408q-159 0 -271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5zM1195 -128q88 0 150.5 71.5t62.5 173.5q0 239 -78.5 377t-225.5 145 -q-145 -127 -336 -127t-336 127q-147 -7 -225.5 -145t-78.5 -377q0 -102 62.5 -173.5t150.5 -71.5h854z" /> - <glyph glyph-name="uniF2C1" unicode="&#xf2c1;" horiz-adv-x="1280" -d="M1024 278q0 -64 -37 -107t-91 -43h-512q-54 0 -91 43t-37 107t9 118t29.5 104t61 78.5t96.5 28.5q80 -75 188 -75t188 75q56 0 96.5 -28.5t61 -78.5t29.5 -104t9 -118zM870 797q0 -94 -67.5 -160.5t-162.5 -66.5t-162.5 66.5t-67.5 160.5t67.5 160.5t162.5 66.5 -t162.5 -66.5t67.5 -160.5zM1152 -96v1376h-1024v-1376q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1280 1376v-1472q0 -66 -47 -113t-113 -47h-960q-66 0 -113 47t-47 113v1472q0 66 47 113t113 47h352v-96q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v96h352 -q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2C2" unicode="&#xf2c2;" horiz-adv-x="2048" -d="M896 324q0 54 -7.5 100.5t-24.5 90t-51 68.5t-81 25q-64 -64 -156 -64t-156 64q-47 0 -81 -25t-51 -68.5t-24.5 -90t-7.5 -100.5q0 -55 31.5 -93.5t75.5 -38.5h426q44 0 75.5 38.5t31.5 93.5zM768 768q0 80 -56 136t-136 56t-136 -56t-56 -136t56 -136t136 -56t136 56 -t56 136zM1792 288v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1408 544v64q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1792 544v64q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23 -v-64q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1792 800v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM128 1152h1792v96q0 14 -9 23t-23 9h-1728q-14 0 -23 -9t-9 -23v-96zM2048 1248v-1216q0 -66 -47 -113t-113 -47h-1728 -q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1728q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2C3" unicode="&#xf2c3;" horiz-adv-x="2048" -d="M896 324q0 -55 -31.5 -93.5t-75.5 -38.5h-426q-44 0 -75.5 38.5t-31.5 93.5q0 54 7.5 100.5t24.5 90t51 68.5t81 25q64 -64 156 -64t156 64q47 0 81 -25t51 -68.5t24.5 -90t7.5 -100.5zM768 768q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136z -M1792 352v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM1408 608v-64q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h320q14 0 23 -9t9 -23zM1792 608v-64q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v64 -q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 864v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM1920 32v1120h-1792v-1120q0 -13 9.5 -22.5t22.5 -9.5h1728q13 0 22.5 9.5t9.5 22.5zM2048 1248v-1216q0 -66 -47 -113t-113 -47 -h-1728q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1728q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2C4" unicode="&#xf2c4;" horiz-adv-x="1792" -d="M1255 749q0 318 -105 474.5t-330 156.5q-222 0 -326 -157t-104 -474q0 -316 104 -471.5t326 -155.5q74 0 131 17q-22 43 -39 73t-44 65t-53.5 56.5t-63 36t-77.5 14.5q-46 0 -79 -16l-49 97q105 91 276 91q132 0 215.5 -54t150.5 -155q67 149 67 402zM1645 117h117 -q3 -27 -2 -67t-26.5 -95t-58 -100.5t-107 -78t-162.5 -32.5q-71 0 -130.5 19t-105.5 56t-79 78t-66 96q-97 -27 -205 -27q-150 0 -292.5 58t-253 158.5t-178 249t-67.5 317.5q0 170 67.5 319.5t178.5 250.5t253.5 159t291.5 58q121 0 238.5 -36t217 -106t176 -164.5 -t119.5 -219t43 -261.5q0 -190 -80.5 -347.5t-218.5 -264.5q47 -70 93.5 -106.5t104.5 -36.5q61 0 94 37.5t38 85.5z" /> - <glyph glyph-name="uniF2C5" unicode="&#xf2c5;" horiz-adv-x="2304" -d="M453 -101q0 -21 -16 -37.5t-37 -16.5q-1 0 -13 3q-63 15 -162 140q-225 284 -225 676q0 341 213 614q39 51 95 103.5t94 52.5q19 0 35 -13.5t16 -32.5q0 -27 -63 -90q-98 -102 -147 -184q-119 -199 -119 -449q0 -281 123 -491q50 -85 136 -173q2 -3 14.5 -16t19.5 -21 -t17 -20.5t14.5 -23.5t4.5 -21zM1796 33q0 -29 -17.5 -48.5t-46.5 -19.5h-1081q-26 0 -45 19t-19 45q0 29 17.5 48.5t46.5 19.5h1081q26 0 45 -19t19 -45zM1581 644q0 -134 -67 -233q-25 -38 -69.5 -78.5t-83.5 -60.5q-16 -10 -27 -10q-7 0 -15 6t-8 12q0 9 19 30t42 46 -t42 67.5t19 88.5q0 76 -35 130q-29 42 -46 42q-3 0 -3 -5q0 -12 7.5 -35.5t7.5 -36.5q0 -22 -21.5 -35t-44.5 -13q-66 0 -66 76q0 15 1.5 44t1.5 44q0 25 -10 46q-13 25 -42 53.5t-51 28.5q-5 0 -7 -0.5t-3.5 -2.5t-1.5 -6q0 -2 16 -26t16 -54q0 -37 -19 -68t-46 -54 -t-53.5 -46t-45.5 -54t-19 -68q0 -98 42 -160q29 -43 79 -63q16 -5 17 -10q1 -2 1 -5q0 -16 -18 -16q-6 0 -33 11q-119 43 -195 139.5t-76 218.5q0 55 24.5 115.5t60 115t70.5 108.5t59.5 113.5t24.5 111.5q0 53 -25 94q-29 48 -56 64q-19 9 -19 21q0 20 41 20q50 0 110 -29 -q41 -19 71 -44.5t49.5 -51t33.5 -62.5t22 -69t16 -80q0 -1 3 -17.5t4.5 -25t5.5 -25t9 -27t11 -21.5t14.5 -16.5t18.5 -5.5q23 0 37 14t14 37q0 25 -20 67t-20 52t10 10q27 0 93 -70q72 -76 102.5 -156t30.5 -186zM2304 615q0 -274 -138 -503q-19 -32 -48 -72t-68 -86.5 -t-81 -77t-74 -30.5q-16 0 -31 15.5t-15 31.5q0 15 29 50.5t68.5 77t48.5 52.5q183 230 183 531q0 131 -20.5 235t-72.5 211q-58 119 -163 228q-2 3 -13 13.5t-16.5 16.5t-15 17.5t-15 20t-9.5 18.5t-4 19q0 19 16 35.5t35 16.5q70 0 196 -169q98 -131 146 -273t60 -314 -q2 -42 2 -64z" /> - <glyph glyph-name="uniF2C6" unicode="&#xf2c6;" horiz-adv-x="1792" -d="M1189 229l147 693q9 44 -10.5 63t-51.5 7l-864 -333q-29 -11 -39.5 -25t-2.5 -26.5t32 -19.5l221 -69l513 323q21 14 32 6q7 -5 -4 -15l-415 -375v0v0l-16 -228q23 0 45 22l108 104l224 -165q64 -36 81 38zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 -t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="uniF2C7" unicode="&#xf2c7;" horiz-adv-x="1024" -d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v907h128v-907q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5 -t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192 -v128h192z" /> - <glyph glyph-name="uniF2C8" unicode="&#xf2c8;" horiz-adv-x="1024" -d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v651h128v-651q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5 -t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192 -v128h192z" /> - <glyph glyph-name="uniF2C9" unicode="&#xf2c9;" horiz-adv-x="1024" -d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v395h128v-395q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5 -t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192 -v128h192z" /> - <glyph glyph-name="uniF2CA" unicode="&#xf2ca;" horiz-adv-x="1024" -d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v139h128v-139q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5 -t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192 -v128h192z" /> - <glyph glyph-name="uniF2CB" unicode="&#xf2cb;" horiz-adv-x="1024" -d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 79 56 135.5t136 56.5t136 -56.5t56 -135.5zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5t93.5 226.5z -M896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192v128h192z" /> - <glyph glyph-name="uniF2CC" unicode="&#xf2cc;" horiz-adv-x="1920" -d="M1433 1287q10 -10 10 -23t-10 -23l-626 -626q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l44 44q-72 91 -81.5 207t46.5 215q-74 71 -176 71q-106 0 -181 -75t-75 -181v-1280h-256v1280q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5q106 0 201 -41 -t166 -115q94 39 197 24.5t185 -79.5l44 44q10 10 23 10t23 -10zM1344 1024q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1600 896q-26 0 -45 19t-19 45t19 45t45 19t45 -19t19 -45t-19 -45t-45 -19zM1856 1024q26 0 45 -19t19 -45t-19 -45t-45 -19 -t-45 19t-19 45t19 45t45 19zM1216 896q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1408 832q0 26 19 45t45 19t45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45zM1728 896q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1088 768 -q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1344 640q-26 0 -45 19t-19 45t19 45t45 19t45 -19t19 -45t-19 -45t-45 -19zM1600 768q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1216 512q-26 0 -45 19t-19 45t19 45t45 19t45 -19 -t19 -45t-19 -45t-45 -19zM1472 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1088 512q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1344 512q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1216 384 -q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1088 256q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19z" /> - <glyph glyph-name="uniF2CD" unicode="&#xf2cd;" horiz-adv-x="1792" -d="M1664 448v-192q0 -169 -128 -286v-194q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v118q-63 -22 -128 -22h-768q-65 0 -128 22v-110q0 -17 -9.5 -28.5t-22.5 -11.5h-64q-13 0 -22.5 11.5t-9.5 28.5v186q-128 117 -128 286v192h1536zM704 864q0 -14 -9 -23t-23 -9t-23 9 -t-9 23t9 23t23 9t23 -9t9 -23zM768 928q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM704 992q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM832 992q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM768 1056q0 -14 -9 -23t-23 -9t-23 9 -t-9 23t9 23t23 9t23 -9t9 -23zM704 1120q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM1792 608v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v640q0 106 75 181t181 75q108 0 184 -78q46 19 98 12t93 -39l22 22q11 11 22 0l42 -42 -q11 -11 0 -22l-314 -314q-11 -11 -22 0l-42 42q-11 11 0 22l22 22q-36 46 -40.5 104t23.5 108q-37 35 -88 35q-53 0 -90.5 -37.5t-37.5 -90.5v-640h1504q14 0 23 -9t9 -23zM896 1056q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM832 1120q0 -14 -9 -23t-23 -9 -t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM768 1184q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM960 1120q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM896 1184q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM832 1248q0 -14 -9 -23 -t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM1024 1184q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM960 1248q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM1088 1248q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23z" /> - <glyph glyph-name="uniF2CE" unicode="&#xf2ce;" -d="M994 344q0 -86 -17 -197q-31 -215 -55 -313q-22 -90 -152 -90t-152 90q-24 98 -55 313q-17 110 -17 197q0 168 224 168t224 -168zM1536 768q0 -240 -134 -434t-350 -280q-8 -3 -15 3t-6 15q7 48 10 66q4 32 6 47q1 9 9 12q159 81 255.5 234t96.5 337q0 180 -91 330.5 -t-247 234.5t-337 74q-124 -7 -237 -61t-193.5 -140.5t-128 -202t-46.5 -240.5q1 -184 99 -336.5t257 -231.5q7 -3 9 -12q3 -21 6 -45q1 -9 5 -32.5t6 -35.5q1 -9 -6.5 -15t-15.5 -2q-148 58 -261 169.5t-173.5 264t-52.5 319.5q7 143 66 273.5t154.5 227t225 157.5t272.5 70 -q164 10 315.5 -46.5t261 -160.5t175 -250.5t65.5 -308.5zM994 800q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5zM1282 768q0 -122 -53.5 -228.5t-146.5 -177.5q-8 -6 -16 -2t-10 14q-6 52 -29 92q-7 10 3 20 -q58 54 91 127t33 155q0 111 -58.5 204t-157.5 141.5t-212 36.5q-133 -15 -229 -113t-109 -231q-10 -92 23.5 -176t98.5 -144q10 -10 3 -20q-24 -41 -29 -93q-2 -9 -10 -13t-16 2q-95 74 -148.5 183t-51.5 234q3 131 69 244t177 181.5t241 74.5q144 7 268 -60t196.5 -187.5 -t72.5 -263.5z" /> - <glyph glyph-name="uniF2D0" unicode="&#xf2d0;" horiz-adv-x="1792" -d="M256 128h1280v768h-1280v-768zM1792 1248v-1216q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2D1" unicode="&#xf2d1;" horiz-adv-x="1792" -d="M1792 224v-192q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2D2" unicode="&#xf2d2;" horiz-adv-x="2048" -d="M256 0h768v512h-768v-512zM1280 512h512v768h-768v-256h96q66 0 113 -47t47 -113v-352zM2048 1376v-960q0 -66 -47 -113t-113 -47h-608v-352q0 -66 -47 -113t-113 -47h-960q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h608v352q0 66 47 113t113 47h960q66 0 113 -47 -t47 -113z" /> - <glyph glyph-name="uniF2D3" unicode="&#xf2d3;" horiz-adv-x="1792" -d="M1175 215l146 146q10 10 10 23t-10 23l-233 233l233 233q10 10 10 23t-10 23l-146 146q-10 10 -23 10t-23 -10l-233 -233l-233 233q-10 10 -23 10t-23 -10l-146 -146q-10 -10 -10 -23t10 -23l233 -233l-233 -233q-10 -10 -10 -23t10 -23l146 -146q10 -10 23 -10t23 10 -l233 233l233 -233q10 -10 23 -10t23 10zM1792 1248v-1216q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2D4" unicode="&#xf2d4;" horiz-adv-x="1792" -d="M1257 425l-146 -146q-10 -10 -23 -10t-23 10l-169 169l-169 -169q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l169 169l-169 169q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l169 -169l169 169q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 -l-169 -169l169 -169q10 -10 10 -23t-10 -23zM256 128h1280v1024h-1280v-1024zM1792 1248v-1216q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2D5" unicode="&#xf2d5;" horiz-adv-x="1792" -d="M1070 358l306 564h-654l-306 -564h654zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="uniF2D6" unicode="&#xf2d6;" horiz-adv-x="1794" -d="M1291 1060q-15 17 -35 8.5t-26 -28.5t5 -38q14 -17 40 -14.5t34 20.5t-18 52zM895 814q-8 -8 -19.5 -8t-18.5 8q-8 8 -8 19t8 18q7 8 18.5 8t19.5 -8q7 -7 7 -18t-7 -19zM1060 740l-35 -35q-12 -13 -29.5 -13t-30.5 13l-38 38q-12 13 -12 30t12 30l35 35q12 12 29.5 12 -t30.5 -12l38 -39q12 -12 12 -29.5t-12 -29.5zM951 870q-7 -8 -18.5 -8t-19.5 8q-7 8 -7 19t7 19q8 8 19 8t19 -8t8 -19t-8 -19zM1354 968q-34 -64 -107.5 -85.5t-127.5 16.5q-38 28 -61 66.5t-21 87.5t39 92t75.5 53t70.5 -5t70 -51q2 -2 13 -12.5t14.5 -13.5t13 -13.5 -t12.5 -15.5t10 -15.5t8.5 -18t4 -18.5t1 -21t-5 -22t-9.5 -24zM1555 486q3 20 -8.5 34.5t-27.5 21.5t-33 17t-23 20q-40 71 -84 98.5t-113 11.5q19 13 40 18.5t33 4.5l12 -1q2 45 -34 90q6 20 6.5 40.5t-2.5 30.5l-3 10q43 24 71 65t34 91q10 84 -43 150.5t-137 76.5 -q-60 7 -114 -18.5t-82 -74.5q-30 -51 -33.5 -101t14.5 -87t43.5 -64t56.5 -42q-45 4 -88 36t-57 88q-28 108 32 222q-16 21 -29 32q-50 0 -89 -19q19 24 42 37t36 14l13 1q0 50 -13 78q-10 21 -32.5 28.5t-47 -3.5t-37.5 -40q2 4 4 7q-7 -28 -6.5 -75.5t19 -117t48.5 -122.5 -q-25 -14 -47 -36q-35 -16 -85.5 -70.5t-84.5 -101.5l-33 -46q-90 -34 -181 -125.5t-75 -162.5q1 -16 11 -27q-15 -12 -30 -30q-21 -25 -21 -54t21.5 -40t63.5 6q41 19 77 49.5t55 60.5q-2 2 -6.5 5t-20.5 7.5t-33 3.5q23 5 51 12.5t40 10t27.5 6t26 4t23.5 0.5q14 -7 22 34 -q7 37 7 90q0 102 -40 150q106 -103 101 -219q-1 -29 -15 -50t-27 -27l-13 -6q-4 -7 -19 -32t-26 -45.5t-26.5 -52t-25 -61t-17 -63t-6.5 -66.5t10 -63q-35 54 -37 80q-22 -24 -34.5 -39t-33.5 -42t-30.5 -46t-16.5 -41t-0.5 -38t25.5 -27q45 -25 144 64t190.5 221.5 -t122.5 228.5q86 52 145 115.5t86 119.5q47 -93 154 -178q104 -83 167 -80q39 2 46 43zM1794 640q0 -182 -71 -348t-191 -286t-286.5 -191t-348.5 -71t-348.5 71t-286.5 191t-191 286t-71 348t71 348t191 286t286.5 191t348.5 71t348.5 -71t286.5 -191t191 -286t71 -348z" /> - <glyph glyph-name="uniF2D7" unicode="&#xf2d7;" -d="M518 1353v-655q103 -1 191.5 1.5t125.5 5.5l37 3q68 2 90.5 24.5t39.5 94.5l33 142h103l-14 -322l7 -319h-103l-29 127q-15 68 -45 93t-84 26q-87 8 -352 8v-556q0 -78 43.5 -115.5t133.5 -37.5h357q35 0 59.5 2t55 7.5t54 18t48.5 32t46 50.5t39 73l93 216h89 -q-6 -37 -31.5 -252t-30.5 -276q-146 5 -263.5 8t-162.5 4h-44h-628l-376 -12v102l127 25q67 13 91.5 37t25.5 79l8 643q3 402 -8 645q-2 61 -25.5 84t-91.5 36l-127 24v102l376 -12h702q139 0 374 27q-6 -68 -14 -194.5t-12 -219.5l-5 -92h-93l-32 124q-31 121 -74 179.5 -t-113 58.5h-548q-28 0 -35.5 -8.5t-7.5 -30.5z" /> - <glyph glyph-name="uniF2D8" unicode="&#xf2d8;" -d="M922 739v-182q0 -4 0.5 -15t0 -15l-1.5 -12t-3.5 -11.5t-6.5 -7.5t-11 -5.5t-16 -1.5v309q9 0 16 -1t11 -5t6.5 -5.5t3.5 -9.5t1 -10.5v-13.5v-14zM1238 643v-121q0 -1 0.5 -12.5t0 -15.5t-2.5 -11.5t-7.5 -10.5t-13.5 -3q-9 0 -14 9q-4 10 -4 165v7v8.5v9t1.5 8.5l3.5 7 -t5 5.5t8 1.5q6 0 10 -1.5t6.5 -4.5t4 -6t2 -8.5t0.5 -8v-9.5v-9zM180 407h122v472h-122v-472zM614 407h106v472h-159l-28 -221q-20 148 -32 221h-158v-472h107v312l45 -312h76l43 319v-319zM1039 712q0 67 -5 90q-3 16 -11 28.5t-17 20.5t-25 14t-26.5 8.5t-31 4t-29 1.5 -h-29.5h-12h-91v-472h56q169 -1 197 24.5t25 180.5q-1 62 -1 100zM1356 515v133q0 29 -2 45t-9.5 33.5t-24.5 25t-46 7.5q-46 0 -77 -34v154h-117v-472h110l7 30q30 -36 77 -36q50 0 66 30.5t16 83.5zM1536 1248v-1216q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113 -v1216q0 66 47 113t113 47h1216q66 0 113 -47t47 -113z" /> - <glyph glyph-name="uniF2D9" unicode="&#xf2d9;" horiz-adv-x="2176" -d="M1143 -197q-6 1 -11 4q-13 8 -36 23t-86 65t-116.5 104.5t-112 140t-89.5 172.5q-17 3 -175 37q66 -213 235 -362t391 -184zM502 409l168 -28q-25 76 -41 167.5t-19 145.5l-4 53q-84 -82 -121 -224q5 -65 17 -114zM612 1018q-43 -64 -77 -148q44 46 74 68zM2049 584 -q0 161 -62 307t-167.5 252t-250.5 168.5t-304 62.5q-147 0 -281 -52.5t-240 -148.5q-30 -58 -45 -160q60 51 143 83.5t158.5 43t143 13.5t108.5 -1l40 -3q33 -1 53 -15.5t24.5 -33t6.5 -37t-1 -28.5q-126 11 -227.5 0.5t-183 -43.5t-142.5 -71.5t-131 -98.5 -q4 -36 11.5 -92.5t35.5 -178t62 -179.5q123 -6 247.5 14.5t214.5 53.5t162.5 67t109.5 59l37 24q22 16 39.5 20.5t30.5 -5t17 -34.5q14 -97 -39 -121q-208 -97 -467 -134q-135 -20 -317 -16q41 -96 110 -176.5t137 -127t130.5 -79t101.5 -43.5l39 -12q143 -23 263 15 -q195 99 314 289t119 418zM2123 621q-14 -135 -40 -212q-70 -208 -181.5 -346.5t-318.5 -253.5q-48 -33 -82 -44q-72 -26 -163 -16q-36 -3 -73 -3q-283 0 -504.5 173t-295.5 442q-1 0 -4 0.5t-5 0.5q-6 -50 2.5 -112.5t26 -115t36 -98t31.5 -71.5l14 -26q8 -12 54 -82 -q-71 38 -124.5 106.5t-78.5 140t-39.5 137t-17.5 107.5l-2 42q-5 2 -33.5 12.5t-48.5 18t-53 20.5t-57.5 25t-50 25.5t-42.5 27t-25 25.5q19 -10 50.5 -25.5t113 -45.5t145.5 -38l2 32q11 149 94 290q41 202 176 365q28 115 81 214q15 28 32 45t49 32q158 74 303.5 104 -t302 11t306.5 -97q220 -115 333 -336t87 -474z" /> - <glyph glyph-name="uniF2DA" unicode="&#xf2da;" horiz-adv-x="1792" -d="M1341 752q29 44 -6.5 129.5t-121.5 142.5q-58 39 -125.5 53.5t-118 4.5t-68.5 -37q-12 -23 -4.5 -28t42.5 -10q23 -3 38.5 -5t44.5 -9.5t56 -17.5q36 -13 67.5 -31.5t53 -37t40 -38.5t30.5 -38t22 -34.5t16.5 -28.5t12 -18.5t10.5 -6t11 9.5zM1704 178 -q-52 -127 -148.5 -220t-214.5 -141.5t-253 -60.5t-266 13.5t-251 91t-210 161.5t-141.5 235.5t-46.5 303.5q1 41 8.5 84.5t12.5 64t24 80.5t23 73q-51 -208 1 -397t173 -318t291 -206t346 -83t349 74.5t289 244.5q20 27 18 14q0 -4 -4 -14zM1465 627q0 -104 -40.5 -199 -t-108.5 -164t-162 -109.5t-198 -40.5t-198 40.5t-162 109.5t-108.5 164t-40.5 199t40.5 199t108.5 164t162 109.5t198 40.5t198 -40.5t162 -109.5t108.5 -164t40.5 -199zM1752 915q-65 147 -180.5 251t-253 153.5t-292 53.5t-301 -36.5t-275.5 -129t-220 -211.5t-131 -297 -t-10 -373q-49 161 -51.5 311.5t35.5 272.5t109 227t165.5 180.5t207 126t232 71t242.5 9t236 -54t216 -124.5t178 -197q33 -50 62 -121t31 -112zM1690 573q12 244 -136.5 416t-396.5 240q-8 0 -10 5t24 8q125 -4 230 -50t173 -120t116 -168.5t58.5 -199t-1 -208 -t-61.5 -197.5t-122.5 -167t-185 -117.5t-248.5 -46.5q108 30 201.5 80t174 123t129.5 176.5t55 225.5z" /> - <glyph glyph-name="uniF2DB" unicode="&#xf2db;" -d="M192 256v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM192 512v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM192 768v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16 -q0 16 16 16h112zM192 1024v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM192 1280v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM1280 1440v-1472q0 -40 -28 -68t-68 -28h-832q-40 0 -68 28 -t-28 68v1472q0 40 28 68t68 28h832q40 0 68 -28t28 -68zM1536 208v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 464v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 720v-32 -q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 976v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 1232v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16 -h48q16 0 16 -16z" /> - <glyph glyph-name="uniF2DC" unicode="&#xf2dc;" horiz-adv-x="1664" -d="M1566 419l-167 -33l186 -107q23 -13 29.5 -38.5t-6.5 -48.5q-14 -23 -39 -29.5t-48 6.5l-186 106l55 -160q13 -38 -12 -63.5t-60.5 -20.5t-48.5 42l-102 300l-271 156v-313l208 -238q16 -18 17 -39t-11 -36.5t-28.5 -25t-37 -5.5t-36.5 22l-112 128v-214q0 -26 -19 -45 -t-45 -19t-45 19t-19 45v214l-112 -128q-16 -18 -36.5 -22t-37 5.5t-28.5 25t-11 36.5t17 39l208 238v313l-271 -156l-102 -300q-13 -37 -48.5 -42t-60.5 20.5t-12 63.5l55 160l-186 -106q-23 -13 -48 -6.5t-39 29.5q-13 23 -6.5 48.5t29.5 38.5l186 107l-167 33 -q-29 6 -42 29t-8.5 46.5t25.5 40t50 10.5l310 -62l271 157l-271 157l-310 -62q-4 -1 -13 -1q-27 0 -44 18t-19 40t11 43t40 26l167 33l-186 107q-23 13 -29.5 38.5t6.5 48.5t39 30t48 -7l186 -106l-55 160q-13 38 12 63.5t60.5 20.5t48.5 -42l102 -300l271 -156v313 -l-208 238q-16 18 -17 39t11 36.5t28.5 25t37 5.5t36.5 -22l112 -128v214q0 26 19 45t45 19t45 -19t19 -45v-214l112 128q16 18 36.5 22t37 -5.5t28.5 -25t11 -36.5t-17 -39l-208 -238v-313l271 156l102 300q13 37 48.5 42t60.5 -20.5t12 -63.5l-55 -160l186 106 -q23 13 48 6.5t39 -29.5q13 -23 6.5 -48.5t-29.5 -38.5l-186 -107l167 -33q27 -5 40 -26t11 -43t-19 -40t-44 -18q-9 0 -13 1l-310 62l-271 -157l271 -157l310 62q29 6 50 -10.5t25.5 -40t-8.5 -46.5t-42 -29z" /> - <glyph glyph-name="uniF2DD" unicode="&#xf2dd;" horiz-adv-x="1792" -d="M1473 607q7 118 -33 226.5t-113 189t-177 131t-221 57.5q-116 7 -225.5 -32t-192 -110.5t-135 -175t-59.5 -220.5q-7 -118 33 -226.5t113 -189t177.5 -131t221.5 -57.5q155 -9 293 59t224 195.5t94 283.5zM1792 1536l-349 -348q120 -117 180.5 -272t50.5 -321 -q-11 -183 -102 -339t-241 -255.5t-332 -124.5l-999 -132l347 347q-120 116 -180.5 271.5t-50.5 321.5q11 184 102 340t241.5 255.5t332.5 124.5q167 22 500 66t500 66z" /> - <glyph glyph-name="uniF2DE" unicode="&#xf2de;" horiz-adv-x="1792" -d="M948 508l163 -329h-51l-175 350l-171 -350h-49l179 374l-78 33l21 49l240 -102l-21 -50zM563 1100l304 -130l-130 -304l-304 130zM907 915l240 -103l-103 -239l-239 102zM1188 765l191 -81l-82 -190l-190 81zM1680 640q0 159 -62 304t-167.5 250.5t-250.5 167.5t-304 62 -t-304 -62t-250.5 -167.5t-167.5 -250.5t-62 -304t62 -304t167.5 -250.5t250.5 -167.5t304 -62t304 62t250.5 167.5t167.5 250.5t62 304zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71 -t286 -191t191 -286t71 -348z" /> - <glyph glyph-name="uniF2E0" unicode="&#xf2e0;" horiz-adv-x="1920" -d="M1334 302q-4 24 -27.5 34t-49.5 10.5t-48.5 12.5t-25.5 38q-5 47 33 139.5t75 181t32 127.5q-14 101 -117 103q-45 1 -75 -16l-3 -2l-5 -2.5t-4.5 -2t-5 -2t-5 -0.5t-6 1.5t-6 3.5t-6.5 5q-3 2 -9 8.5t-9 9t-8.5 7.5t-9.5 7.5t-9.5 5.5t-11 4.5t-11.5 2.5q-30 5 -48 -3 -t-45 -31q-1 -1 -9 -8.5t-12.5 -11t-15 -10t-16.5 -5.5t-17 3q-54 27 -84 40q-41 18 -94 -5t-76 -65q-16 -28 -41 -98.5t-43.5 -132.5t-40 -134t-21.5 -73q-22 -69 18.5 -119t110.5 -46q30 2 50.5 15t38.5 46q7 13 79 199.5t77 194.5q6 11 21.5 18t29.5 0q27 -15 21 -53 -q-2 -18 -51 -139.5t-50 -132.5q-6 -38 19.5 -56.5t60.5 -7t55 49.5q4 8 45.5 92t81.5 163.5t46 88.5q20 29 41 28q29 0 25 -38q-2 -16 -65.5 -147.5t-70.5 -159.5q-12 -53 13 -103t74 -74q17 -9 51 -15.5t71.5 -8t62.5 14t20 48.5zM383 86q3 -15 -5 -27.5t-23 -15.5 -q-14 -3 -26.5 5t-15.5 23q-3 14 5 27t22 16t27 -5t16 -23zM953 -177q12 -17 8.5 -37.5t-20.5 -32.5t-37.5 -8t-32.5 21q-11 17 -7.5 37.5t20.5 32.5t37.5 8t31.5 -21zM177 635q-18 -27 -49.5 -33t-57.5 13q-26 18 -32 50t12 58q18 27 49.5 33t57.5 -12q26 -19 32 -50.5 -t-12 -58.5zM1467 -42q19 -28 13 -61.5t-34 -52.5t-60.5 -13t-51.5 34t-13 61t33 53q28 19 60.5 13t52.5 -34zM1579 562q69 -113 42.5 -244.5t-134.5 -207.5q-90 -63 -199 -60q-20 -80 -84.5 -127t-143.5 -44.5t-140 57.5q-12 -9 -13 -10q-103 -71 -225 -48.5t-193 126.5 -q-50 73 -53 164q-83 14 -142.5 70.5t-80.5 128t-2 152t81 138.5q-36 60 -38 128t24.5 125t79.5 98.5t121 50.5q32 85 99 148t146.5 91.5t168 17t159.5 -66.5q72 21 140 17.5t128.5 -36t104.5 -80t67.5 -115t17.5 -140.5q52 -16 87 -57t45.5 -89t-5.5 -99.5t-58 -87.5z -M455 1222q14 -20 9.5 -44.5t-24.5 -38.5q-19 -14 -43.5 -9.5t-37.5 24.5q-14 20 -9.5 44.5t24.5 38.5q19 14 43.5 9.5t37.5 -24.5zM614 1503q4 -16 -5 -30.5t-26 -18.5t-31 5.5t-18 26.5q-3 17 6.5 31t25.5 18q17 4 31 -5.5t17 -26.5zM1800 555q4 -20 -6.5 -37t-30.5 -21 -q-19 -4 -36 6.5t-21 30.5t6.5 37t30.5 22q20 4 36.5 -7.5t20.5 -30.5zM1136 1448q16 -27 8.5 -58.5t-35.5 -47.5q-27 -16 -57.5 -8.5t-46.5 34.5q-16 28 -8.5 59t34.5 48t58 9t47 -36zM1882 792q4 -15 -4 -27.5t-23 -16.5q-15 -3 -27.5 5.5t-15.5 22.5q-3 15 5 28t23 16 -q14 3 26.5 -5t15.5 -23zM1691 1033q15 -22 10.5 -49t-26.5 -43q-22 -15 -49 -10t-42 27t-10 49t27 43t48.5 11t41.5 -28z" /> - <glyph glyph-name="uniF2E1" unicode="&#xf2e1;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2E2" unicode="&#xf2e2;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2E3" unicode="&#xf2e3;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2E4" unicode="&#xf2e4;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2E5" unicode="&#xf2e5;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2E6" unicode="&#xf2e6;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2E7" unicode="&#xf2e7;" horiz-adv-x="1792" - /> - <glyph glyph-name="_698" unicode="&#xf2e8;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2E9" unicode="&#xf2e9;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2EA" unicode="&#xf2ea;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2EB" unicode="&#xf2eb;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2EC" unicode="&#xf2ec;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2ED" unicode="&#xf2ed;" horiz-adv-x="1792" - /> - <glyph glyph-name="uniF2EE" unicode="&#xf2ee;" horiz-adv-x="1792" - /> - <glyph glyph-name="lessequal" unicode="&#xf500;" horiz-adv-x="1792" - /> - </font> -</defs></svg> diff --git a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.ttf b/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 35acda2fa..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.woff b/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.woff deleted file mode 100644 index 400014a4b..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.woff2 b/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 4d13fc604..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/font-awesome/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/animated-overlay.gif b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/animated-overlay.gif deleted file mode 100644 index d441f75eb..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/animated-overlay.gif and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png deleted file mode 100644 index 736b15aa8..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png deleted file mode 100644 index 450d29ef9..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index d1f362187..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index a7a65012f..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index eadb5fbc5..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png deleted file mode 100644 index 24ae2b76b..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png deleted file mode 100644 index c48f52003..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png deleted file mode 100644 index f8e7c296e..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png deleted file mode 100644 index c1cb1170c..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 84b601bf0..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png deleted file mode 100644 index b6db1acdd..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png deleted file mode 100644 index feea0e202..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index ed5b6b093..000000000 Binary files a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css b/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css deleted file mode 100644 index 8d0e72cd0..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery UI - v1.10.3 - 2013-08-17 -* http://jqueryui.com -* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor/public/vendor/jsonata/jsonata.min.js b/packages/node_modules/@node-red/editor/public/vendor/jsonata/jsonata.min.js deleted file mode 100644 index 18faa078a..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/jsonata/jsonata.min.js +++ /dev/null @@ -1,178 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsonata=e()}}(function(){return function(){return function e(t,r,n){function o(i,s){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};t[i][0].call(f.exports,function(e){return o(t[i][1][e]||e)},f,f.exports,e,t,r,n)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}}()({1:[function(e,t,r){(function(r){"use strict";var n=b(e("babel-runtime/core-js/symbol")),o=b(e("babel-runtime/core-js/object/is")),a=b(e("babel-runtime/core-js/array/from")),i=b(e("babel-runtime/core-js/json/stringify")),s=b(e("babel-runtime/core-js/symbol/iterator")),u=b(e("babel-runtime/core-js/is-iterable")),c=b(e("babel-runtime/core-js/object/keys")),f=b(e("babel-runtime/regenerator")),l=b(e("babel-runtime/core-js/promise")),p=b(e("babel-runtime/core-js/number/is-integer")),d=b(e("babel-runtime/core-js/object/create")),h="function"==typeof n.default&&"symbol"==typeof s.default?function(e){return typeof e}:function(e){return e&&"function"==typeof n.default&&e.constructor===n.default&&e!==n.default.prototype?"symbol":typeof e};function b(e){return e&&e.__esModule?e:{default:e}}var v=function(){var e=f.default.mark(Q),t=f.default.mark(ee),n=f.default.mark(te),b=f.default.mark(re),v=f.default.mark(ne),g=f.default.mark(oe),m=f.default.mark(ae),y=f.default.mark(be),_=f.default.mark(ge),x=f.default.mark(me),k=f.default.mark(ye),w=f.default.mark(xe),j=f.default.mark(we),S=f.default.mark(Oe),O=f.default.mark(Pe),E=f.default.mark(Ye),A=f.default.mark(De),T=f.default.mark(Le),P=f.default.mark(Fe),Y=f.default.mark(Ce),D=f.default.mark(Je),M=f.default.mark(Be),L=f.default.mark(We),N=f.default.mark(Ve),F=f.default.mark(Qe),I=f.default.mark(Ze),R=f.default.mark(Xe),C=f.default.mark(tt),G=f.default.mark(rt),$=f.default.mark(nt),z={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":75,"#":70,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},q={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},U=function(e){var t=0,r=e.length,n=function(e,r){return{type:e,value:r,position:t}};return function(o){if(t>=r)return null;for(var a=e.charAt(t);t<r&&" \t\n\r\v".indexOf(a)>-1;)t++,a=e.charAt(t);if(!0!==o&&"/"===a)return t++,n("regex",function(){for(var n,o,a=t,i=0;t<r;){var s=e.charAt(t);if("/"===s&&"\\"!==e.charAt(t-1)&&0===i){if(""===(n=e.substring(a,t)))throw{code:"S0301",stack:(new Error).stack,position:t};for(t++,s=e.charAt(t),a=t;"i"===s||"m"===s;)t++,s=e.charAt(t);return o=e.substring(a,t)+"g",new RegExp(n,o)}"("!==s&&"["!==s&&"{"!==s||"\\"===e.charAt(t-1)||i++,")"!==s&&"]"!==s&&"}"!==s||"\\"===e.charAt(t-1)||i--,t++}throw{code:"S0302",stack:(new Error).stack,position:t}}());if("."===a&&"."===e.charAt(t+1))return t+=2,n("operator","..");if(":"===a&&"="===e.charAt(t+1))return t+=2,n("operator",":=");if("!"===a&&"="===e.charAt(t+1))return t+=2,n("operator","!=");if(">"===a&&"="===e.charAt(t+1))return t+=2,n("operator",">=");if("<"===a&&"="===e.charAt(t+1))return t+=2,n("operator","<=");if("*"===a&&"*"===e.charAt(t+1))return t+=2,n("operator","**");if("~"===a&&">"===e.charAt(t+1))return t+=2,n("operator","~>");if(z.hasOwnProperty(a))return t++,n("operator",a);if('"'===a||"'"===a){var i=a;t++;for(var s="";t<r;){if("\\"===(a=e.charAt(t)))if(t++,a=e.charAt(t),q.hasOwnProperty(a))s+=q[a];else{if("u"!==a)throw{code:"S0103",stack:(new Error).stack,position:t,token:a};var u=e.substr(t+1,4);if(!/^[0-9a-fA-F]+$/.test(u))throw{code:"S0104",stack:(new Error).stack,position:t};var c=parseInt(u,16);s+=String.fromCharCode(c),t+=4}else{if(a===i)return t++,n("string",s);s+=a}t++}throw{code:"S0101",stack:(new Error).stack,position:t}}var f,l=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(e.substring(t));if(null!==l){var p=parseFloat(l[0]);if(!isNaN(p)&&isFinite(p))return t+=l[0].length,n("number",p);throw{code:"S0102",stack:(new Error).stack,position:t,token:l[0]}}if("`"===a){t++;var d=e.indexOf("`",t);if(-1!==d)return f=e.substring(t,d),t=d+1,n("name",f);throw t=r,{code:"S0105",stack:(new Error).stack,position:t}}for(var h,b=t;;)if(h=e.charAt(b),b===r||" \t\n\r\v".indexOf(h)>-1||z.hasOwnProperty(h)){if("$"===e.charAt(t))return f=e.substring(t+1,b),t=b,n("variable",f);switch(f=e.substring(t,b),t=b,f){case"or":case"in":case"and":return n("operator",f);case"true":return n("value",!0);case"false":return n("value",!1);case"null":return n("value",null);default:return t===r&&""===f?null:n("name",f)}}else b++}};function J(e){for(var t=1,r=[],n={},o=n;t<e.length;){var a=e.charAt(t);if(":"===a)break;var i=function(){r.push(n),o=n,n={}},s=function(e,t,r,n){for(var o=1,i=t;i<e.length;)if(i++,(a=e.charAt(i))===n){if(0===--o)break}else a===r&&o++;return i};switch(a){case"s":case"n":case"b":case"l":case"o":n.regex="["+a+"m]",n.type=a,i();break;case"a":n.regex="[asnblfom]",n.type=a,n.array=!0,i();break;case"f":n.regex="f",n.type=a,i();break;case"j":n.regex="[asnblom]",n.type=a,i();break;case"x":n.regex="[asnblfom]",n.type=a,i();break;case"-":o.context=!0,o.contextRegex=new RegExp(o.regex),o.regex+="?";break;case"?":case"+":o.regex+=a;break;case"(":var u=s(e,t,"(",")"),c=e.substring(t+1,u);if(-1!==c.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:c,offset:t};n.regex="["+c+"m]",n.type="("+c+")",t=u,i();break;case"<":if("a"!==o.type&&"f"!==o.type)throw{code:"S0401",stack:(new Error).stack,value:o.type,offset:t};var f=s(e,t,"<",">");o.subtype=e.substring(t+1,f),t=f}t++}var l="^"+r.map(function(e){return"("+e.regex+")"}).join("")+"$",p=new RegExp(l),d=function(e){var t;if(Ee(e))t="f";else switch(void 0===e?"undefined":h(e)){case"string":t="s";break;case"number":t="n";break;case"boolean":t="b";break;case"object":t=null===e?"l":Array.isArray(e)?"a":"o";break;case"undefined":default:t="m"}return t};return{definition:e,validate:function(e,t){var n="";e.forEach(function(e){n+=d(e)});var o=p.exec(n);if(o){var a=[],i=0;return r.forEach(function(r,n){var s=e[i],u=o[n+1];if(""===u)if(r.context&&r.contextRegex){var c=d(t);if(!r.contextRegex.test(c))throw{code:"T0411",stack:(new Error).stack,value:t,index:i+1};a.push(t)}else a.push(s),i++;else u.split("").forEach(function(t){if("a"===r.type){if("m"===t)s=void 0;else{s=e[i];var n=!0;if(void 0!==r.subtype)if("a"!==t&&u!==r.subtype)n=!1;else if("a"===t&&s.length>0){var o=d(s[0]);if(o!==r.subtype.charAt(0))n=!1;else n=0===s.filter(function(e){return d(e)!==o}).length}if(!n)throw{code:"T0412",stack:(new Error).stack,value:s,index:i+1,type:r.subtype};"a"!==t&&(s=[s])}a.push(s),i++}else a.push(s),i++})}),a}!function(e,t){for(var n="^",o=0,a=0;a<r.length;a++){n+=r[a].regex;var i=t.match(n);if(null===i)throw{code:"T0410",stack:(new Error).stack,value:e[o],index:o+1};o=i[0].length}throw{code:"T0410",stack:(new Error).stack,value:e[o],index:o+1}}(e,n)}}}var B=function(e,t){var r,n,o={},a=[],i=function(){var e=[];"(end)"!==r.id&&e.push({type:r.type,value:r.value,position:r.position});for(var t=n();null!==t;)e.push(t),t=n();return e},s={nud:function(){var e={code:"S0211",token:this.value,position:this.position};if(t)return e.remaining=i(),e.type="error",a.push(e),e;throw e.stack=(new Error).stack,e}},u=function(e,t){var r=o[e];return t=t||0,r?t>=r.lbp&&(r.lbp=t):((r=(0,d.default)(s)).id=r.value=e,r.lbp=t,o[e]=r),r},c=function(e){if(t){e.remaining=i(),a.push(e);var n=o["(error)"];return(r=(0,d.default)(n)).error=e,r.type="(error)",r}throw e.stack=(new Error).stack,e},f=function(t,a){if(t&&r.id!==t){var i={code:"(end)"===r.id?"S0203":"S0202",position:r.position,token:r.value,value:t};return c(i)}var s=n(a);if(null===s)return(r=o["(end)"]).position=e.length,r;var u,f=s.value,l=s.type;switch(l){case"name":case"variable":u=o["(name)"];break;case"operator":if(!(u=o[f]))return c({code:"S0204",stack:(new Error).stack,position:s.position,token:f});break;case"string":case"number":case"value":u=o["(literal)"];break;case"regex":l="regex",u=o["(regex)"];break;default:return c({code:"S0205",stack:(new Error).stack,position:s.position,token:f})}return(r=(0,d.default)(u)).value=f,r.type=l,r.position=s.position,r},l=function(e){var t,n=r;for(f(null,!0),t=n.nud();e<r.lbp;)n=r,f(),t=n.led(t);return t},p=function(e){u(e,0).nud=function(){return this}},h=function(e,t,r){var n=t||z[e],o=u(e,n);return o.led=r||function(e){return this.lhs=e,this.rhs=l(n),this.type="binary",this},o},b=function(e,t,r){var n=u(e,t);return n.led=r,n},v=function(e,t){var r=u(e);return r.nud=t||function(){return this.expression=l(70),this.type="unary",this},r};p("(end)"),p("(name)"),p("(literal)"),p("(regex)"),u(":"),u(";"),u(","),u(")"),u("]"),u("}"),u(".."),h("."),h("+"),h("-"),h("*"),h("/"),h("%"),h("="),h("<"),h(">"),h("!="),h("<="),h(">="),h("&"),h("and"),h("or"),h("in"),p("and"),p("or"),p("in"),v("-"),h("~>"),b("(error)",10,function(e){return this.lhs=e,this.error=r.error,this.remaining=i(),this.type="error",this}),v("*",function(){return this.type="wildcard",this}),v("**",function(){return this.type="descendant",this}),h("(",z["("],function(e){if(this.procedure=e,this.type="function",this.arguments=[],")"!==r.id)for(;"operator"===r.type&&"?"===r.id?(this.type="partial",this.arguments.push(r),f("?")):this.arguments.push(l(0)),","===r.id;)f(",");if(f(")",!0),"name"===e.type&&("function"===e.value||"λ"===e.value)){if(this.arguments.forEach(function(e,t){if("variable"!==e.type)return c({code:"S0208",stack:(new Error).stack,position:e.position,token:e.value,value:t+1})}),this.type="lambda","<"===r.id){for(var t=r.position,n=1,o="<";n>0&&"{"!==r.id&&"(end)"!==r.id;){var a=f();">"===a.id?n--:"<"===a.id&&n++,o+=a.value}f(">");try{this.signature=J(o)}catch(e){return e.position=t+e.offset,c(e)}}f("{"),this.body=l(0),f("}")}return this}),v("(",function(){for(var e=[];")"!==r.id&&(e.push(l(0)),";"===r.id);)f(";");return f(")",!0),this.type="block",this.expressions=e,this}),v("[",function(){var e=[];if("]"!==r.id)for(;;){var t=l(0);if(".."===r.id){var n={type:"binary",value:"..",position:r.position,lhs:t};f(".."),n.rhs=l(0),t=n}if(e.push(t),","!==r.id)break;f(",")}return f("]",!0),this.expressions=e,this.type="unary",this}),h("[",z["["],function(e){if("]"===r.id){for(var t=e;t&&"binary"===t.type&&"["===t.value;)t=t.lhs;return t.keepArray=!0,f("]"),e}return this.lhs=e,this.rhs=l(z["]"]),this.type="binary",f("]",!0),this}),h("^",z["^"],function(e){f("(");for(var t=[];;){var n={descending:!1};if("<"===r.id?f("<"):">"===r.id&&(n.descending=!0,f(">")),n.expression=l(0),t.push(n),","!==r.id)break;f(",")}return f(")"),this.lhs=e,this.rhs=t,this.type="binary",this});var g=function(e){var t=[];if("}"!==r.id)for(;;){var n=l(0);f(":");var o=l(0);if(t.push([n,o]),","!==r.id)break;f(",")}return f("}",!0),void 0===e?(this.lhs=t,this.type="unary"):(this.lhs=e,this.rhs=t,this.type="binary"),this};v("{",g),h("{",z["{"],g),b(":=",z[":="],function(e){return"variable"!==e.type?c({code:"S0212",stack:(new Error).stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=l(z[":="]-1),this.type="binary",this)}),h("?",z["?"],function(e){return this.type="condition",this.condition=e,this.then=l(0),":"===r.id&&(f(":"),this.else=l(0)),this}),v("|",function(){return this.type="transform",this.pattern=l(0),f("|"),this.update=l(0),","===r.id&&(f(","),this.delete=l(0)),f("|"),this});n=U(e),f();var m=l(0);if("(end)"!==r.id){var y={code:"S0201",position:r.position,token:r.value};c(y)}return m=function e(r){var n;switch(r.type){case"binary":switch(r.value){case".":var o=e(r.lhs);n={type:"path",steps:[]},"path"===o.type?Array.prototype.push.apply(n.steps,o.steps):n.steps=[o];var i=e(r.rhs);"function"===i.type&&"path"===i.procedure.type&&1===i.procedure.steps.length&&"name"===i.procedure.steps[0].type&&"function"===n.steps[n.steps.length-1].type&&(n.steps[n.steps.length-1].nextFunction=i.procedure.steps[0].value),"path"!==i.type&&(i={type:"path",steps:[i]}),Array.prototype.push.apply(n.steps,i.steps),n.steps.filter(function(e){if("number"===e.type||"value"===e.type)throw{code:"S0213",stack:(new Error).stack,position:e.position,value:e.value};return"string"===e.type}).forEach(function(e){e.type="name"}),n.steps.filter(function(e){return!0===e.keepArray}).length>0&&(n.keepSingletonArray=!0);var s=n.steps[0];"unary"===s.type&&"["===s.value&&(s.consarray=!0);var u=n.steps[n.steps.length-1];"unary"===u.type&&"["===u.value&&(u.consarray=!0);break;case"[":var c=n=e(r.lhs);if("path"===n.type&&(c=n.steps[n.steps.length-1]),void 0!==c.group)throw{code:"S0209",stack:(new Error).stack,position:r.position};void 0===c.predicate&&(c.predicate=[]),c.predicate.push(e(r.rhs));break;case"{":if(void 0!==(n=e(r.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:r.position};n.group={lhs:r.rhs.map(function(t){return[e(t[0]),e(t[1])]}),position:r.position};break;case"^":(n={type:"sort",value:r.value,position:r.position,consarray:!0}).lhs=e(r.lhs),n.rhs=r.rhs.map(function(t){return{descending:t.descending,expression:e(t.expression)}});break;case":=":(n={type:"bind",value:r.value,position:r.position}).lhs=e(r.lhs),n.rhs=e(r.rhs);break;case"~>":(n={type:"apply",value:r.value,position:r.position}).lhs=e(r.lhs),n.rhs=e(r.rhs);break;default:(n={type:r.type,value:r.value,position:r.position}).lhs=e(r.lhs),n.rhs=e(r.rhs)}break;case"unary":n={type:r.type,value:r.value,position:r.position},"["===r.value?n.expressions=r.expressions.map(function(t){return e(t)}):"{"===r.value?n.lhs=r.lhs.map(function(t){return[e(t[0]),e(t[1])]}):(n.expression=e(r.expression),"-"===r.value&&"number"===n.expression.type&&((n=n.expression).value=-n.value));break;case"function":case"partial":(n={type:r.type,name:r.name,value:r.value,position:r.position}).arguments=r.arguments.map(function(t){return e(t)}),n.procedure=e(r.procedure);break;case"lambda":n={type:r.type,arguments:r.arguments,signature:r.signature,position:r.position};var f=e(r.body);n.body=function e(t){var r;if("function"!==t.type||t.predicate)if("condition"===t.type)t.then=e(t.then),void 0!==t.else&&(t.else=e(t.else)),r=t;else if("block"===t.type){var n=t.expressions.length;n>0&&(t.expressions[n-1]=e(t.expressions[n-1])),r=t}else r=t;else{var o={type:"lambda",thunk:!0,arguments:[],position:t.position};o.body=t,r=o}return r}(f);break;case"condition":(n={type:r.type,position:r.position}).condition=e(r.condition),n.then=e(r.then),void 0!==r.else&&(n.else=e(r.else));break;case"transform":(n={type:r.type,position:r.position}).pattern=e(r.pattern),n.update=e(r.update),void 0!==r.delete&&(n.delete=e(r.delete));break;case"block":(n={type:r.type,position:r.position}).expressions=r.expressions.map(function(t){var r=e(t);return(r.consarray||"path"===r.type&&r.steps[0].consarray)&&(n.consarray=!0),r});break;case"name":n={type:"path",steps:[r]},r.keepArray&&(n.keepSingletonArray=!0);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":n=r;break;case"operator":if("and"===r.value||"or"===r.value||"in"===r.value)r.type="name",n=e(r);else{if("?"!==r.value)throw{code:"S0201",stack:(new Error).stack,position:r.position,token:r.value};n=r}break;case"error":n=r,r.lhs&&(n=e(r.lhs));break;default:var l="S0206";"(end)"===r.id&&(l="S0207");var p={code:l,position:r.position,token:r.value};if(t)return a.push(p),{type:"error",error:p};throw p.stack=(new Error).stack,p}return n}(m),a.length>0&&(m.errors=a),m},W=at(null);function V(e){var t=!1;if("number"==typeof e&&(t=!isNaN(e))&&!isFinite(e))throw{code:"D1001",value:e,stack:(new Error).stack};return t}function K(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter(function(e){return"string"!=typeof e}).length),t}function H(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter(function(e){return!V(e)}).length),t}function Q(t,r,n){var o,a,i;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(a=n.lookup("__evaluate_entry"))&&a(t,r,n),e.t0=t.type,e.next="path"===e.t0?5:"binary"===e.t0?8:"unary"===e.t0?11:"name"===e.t0?14:"string"===e.t0?16:"number"===e.t0?16:"value"===e.t0?16:"wildcard"===e.t0?18:"descendant"===e.t0?20:"condition"===e.t0?22:"block"===e.t0?25:"bind"===e.t0?28:"regex"===e.t0?31:"function"===e.t0?33:"variable"===e.t0?36:"lambda"===e.t0?38:"partial"===e.t0?40:"apply"===e.t0?43:"sort"===e.t0?46:"transform"===e.t0?49:51;break;case 5:return e.delegateYield(ee(t,r,n),"t1",6);case 6:return o=e.t1,e.abrupt("break",51);case 8:return e.delegateYield(oe(t,r,n),"t2",9);case 9:return o=e.t2,e.abrupt("break",51);case 11:return e.delegateYield(ae(t,r,n),"t3",12);case 12:return o=e.t3,e.abrupt("break",51);case 14:return o=ie(t,r,n),e.abrupt("break",51);case 16:return o=se(t),e.abrupt("break",51);case 18:return o=ue(t,r),e.abrupt("break",51);case 20:return o=ce(t,r),e.abrupt("break",51);case 22:return e.delegateYield(me(t,r,n),"t4",23);case 23:return o=e.t4,e.abrupt("break",51);case 25:return e.delegateYield(ye(t,r,n),"t5",26);case 26:return o=e.t5,e.abrupt("break",51);case 28:return e.delegateYield(ge(t,r,n),"t6",29);case 29:return o=e.t6,e.abrupt("break",51);case 31:return o=_e(t),e.abrupt("break",51);case 33:return e.delegateYield(Pe(t,r,n),"t7",34);case 34:return o=e.t7,e.abrupt("break",51);case 36:return o=ke(t,r,n),e.abrupt("break",51);case 38:return o=Me(t,r,n),e.abrupt("break",51);case 40:return e.delegateYield(Le(t,r,n),"t8",41);case 41:return o=e.t8,e.abrupt("break",51);case 43:return e.delegateYield(Oe(t,r,n),"t9",44);case 44:return o=e.t9,e.abrupt("break",51);case 46:return e.delegateYield(we(t,r,n),"t10",47);case 47:return o=e.t10,e.abrupt("break",51);case 49:return o=je(t,r,n),e.abrupt("break",51);case 51:if(!n.lookup("__jsonata_async")||void 0!==o&&null!==o&&"function"==typeof o.then||(o=l.default.resolve(o)),!n.lookup("__jsonata_async")||"function"!=typeof o.then||!t.nextFunction||"function"!=typeof o[t.nextFunction]){e.next=55;break}e.next=58;break;case 55:return e.next=57,o;case 57:o=e.sent;case 58:if(!t.hasOwnProperty("predicate")){e.next=61;break}return e.delegateYield(re(t.predicate,o,n),"t11",60);case 60:o=e.t11;case 61:if(!t.hasOwnProperty("group")){e.next=64;break}return e.delegateYield(be(t.group,o,n),"t12",63);case 63:o=e.t12;case 64:return(i=n.lookup("__evaluate_exit"))&&i(t,r,n,o),o&&o.sequence&&(o=o.value()),e.abrupt("return",o);case 68:case"end":return e.stop()}},e,this)}function Z(){var e=X([]);return 1===arguments.length&&e.push(arguments[0]),e}function X(e){return Object.defineProperty(e,"sequence",{enumerable:!1,configurable:!1,get:function(){return!0}}),Object.defineProperty(e,"keepSingleton",{enumerable:!1,configurable:!1,writable:!0,value:!1}),Object.defineProperty(e,"value",{enumerable:!1,configurable:!1,get:function(){return function(){switch(this.length){case 0:return;case 1:return this.keepSingleton?this:this[0];default:return this}}}}),e}function ee(e,r,n){var o,a,i,s;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o="variable"===e.steps[0].type?Z(r):Array.isArray(r)?r:Z(r),i=0;case 2:if(!(i<e.steps.length)){t.next=18;break}if(s=e.steps[i],0!==i||!s.consarray){t.next=10;break}return t.delegateYield(Q(s,o,n),"t0",6);case 6:a=t.t0,Array.isArray(a)||(a=Z(a)),t.next=12;break;case 10:return t.delegateYield(te(s,o,n,i===e.steps.length-1),"t1",11);case 11:a=t.t1;case 12:if(void 0!==a&&0!==a.length){t.next=14;break}return t.abrupt("break",18);case 14:o=a;case 15:i++,t.next=2;break;case 18:return e.keepSingletonArray&&(a.keepSingleton=!0),t.abrupt("return",a);case 20:case"end":return t.stop()}},t,this)}function te(e,t,r,o){var a,i,s,u;return f.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:a=Z(),i=0;case 2:if(!(i<t.length)){n.next=9;break}return n.delegateYield(Q(e,t[i],r),"t0",4);case 4:void 0!==(s=n.t0)&&a.push(s);case 6:i++,n.next=2;break;case 9:return u=Z(),o&&1===a.length&&Array.isArray(a[0])&&!a[0].sequence?u=a[0]:a.forEach(function(e){!Array.isArray(e)||e.cons||e.keepSingleton?u.push(e):Array.prototype.push.apply(u,e)}),n.abrupt("return",u);case 12:case"end":return n.stop()}},n,this)}function re(e,t,r){var n,o,a,i,s;return f.default.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:n=t,o=Z(),a=0;case 3:if(!(a<e.length)){u.next=19;break}if(i=e[a],Array.isArray(n)||(n=Z(n)),o=Z(),"number"!==i.type){u.next=13;break}(s=Math.floor(i.value))<0&&(s=n.length+s),o=n[s],u.next=15;break;case 13:return u.delegateYield(ne(i,n,r),"t0",14);case 14:o=u.t0;case 15:n=o;case 16:a++,u.next=3;break;case 19:return u.abrupt("return",o);case 20:case"end":return u.stop()}},b,this)}function ne(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:n=Z(),o=0;case 2:if(!(o<t.length)){s.next=11;break}return a=t[o],s.delegateYield(Q(e,a,r),"t0",5);case 5:V(i=s.t0)&&(i=[i]),H(i)?i.forEach(function(e){var r=Math.floor(e);r<0&&(r=t.length+r),r===o&&n.push(a)}):He(i)&&n.push(a);case 8:o++,s.next=2;break;case 11:return s.abrupt("return",n);case 12:case"end":return s.stop()}},v,this)}function oe(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(Q(e.lhs,t,r),"t0",1);case 1:return o=s.t0,s.delegateYield(Q(e.rhs,t,r),"t1",3);case 3:a=s.t1,i=e.value,s.prev=5,s.t2=i,s.next="+"===s.t2?9:"-"===s.t2?9:"*"===s.t2?9:"/"===s.t2?9:"%"===s.t2?9:"="===s.t2?11:"!="===s.t2?11:"<"===s.t2?11:"<="===s.t2?11:">"===s.t2?11:">="===s.t2?11:"&"===s.t2?13:"and"===s.t2?15:"or"===s.t2?15:".."===s.t2?17:"in"===s.t2?19:21;break;case 9:return n=fe(o,a,i),s.abrupt("break",21);case 11:return n=le(o,a,i),s.abrupt("break",21);case 13:return n=he(o,a),s.abrupt("break",21);case 15:return n=de(o,a,i),s.abrupt("break",21);case 17:return n=ve(o,a),s.abrupt("break",21);case 19:return n=pe(o,a),s.abrupt("break",21);case 21:s.next=28;break;case 23:throw s.prev=23,s.t3=s.catch(5),s.t3.position=e.position,s.t3.token=i,s.t3;case 28:return s.abrupt("return",n);case 29:case"end":return s.stop()}},g,this,[[5,23]])}function ae(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:s.t0=e.value,s.next="-"===s.t0?3:"["===s.t0?15:"{"===s.t0?27:30;break;case 3:return s.delegateYield(Q(e.expression,t,r),"t1",4);case 4:if(void 0!==(n=s.t1)){s.next=9;break}n=void 0,s.next=14;break;case 9:if(!V(n)){s.next=13;break}n=-n,s.next=14;break;case 13:throw{code:"D1002",stack:(new Error).stack,position:e.position,token:e.value,value:n};case 14:return s.abrupt("break",30);case 15:n=[],o=0;case 17:if(!(o<e.expressions.length)){s.next=25;break}return a=e.expressions[o],s.delegateYield(Q(a,t,r),"t2",20);case 20:void 0!==(i=s.t2)&&("["===a.value?n.push(i):n=et(n,i));case 22:o++,s.next=17;break;case 25:return e.consarray&&Object.defineProperty(n,"cons",{enumerable:!1,configurable:!1,value:!0}),s.abrupt("break",30);case 27:return s.delegateYield(be(e,t,r),"t3",28);case 28:return n=s.t3,s.abrupt("break",30);case 30:return s.abrupt("return",n);case 31:case"end":return s.stop()}},m,this)}function ie(e,t,r){var n;if(Array.isArray(t)){n=Z();for(var o=0;o<t.length;o++){var a=ie(e,t[o],r);void 0!==a&&n.push(a)}}else null!==t&&"object"===(void 0===t?"undefined":h(t))&&(n=t[e.value]);return n}function se(e){return e.value}function ue(e,t){var r=Z();return null!==t&&"object"===(void 0===t?"undefined":h(t))&&(0,c.default)(t).forEach(function(e){var n=t[e];Array.isArray(n)?(n=function e(t,r){void 0===r&&(r=[]);Array.isArray(t)?t.forEach(function(t){e(t,r)}):r.push(t);return r}(n),r=et(r,n)):r.push(n)}),r}function ce(e,t){var r,n=Z();return void 0!==t&&(!function e(t,r){Array.isArray(t)||r.push(t);Array.isArray(t)?t.forEach(function(t){e(t,r)}):null!==t&&"object"===(void 0===t?"undefined":h(t))&&(0,c.default)(t).forEach(function(n){e(t[n],r)})}(t,n),r=1===n.length?n[0]:n),r}function fe(e,t,r){var n;if(void 0===e||void 0===t)return n;if(!V(e))throw{code:"T2001",stack:(new Error).stack,value:e};if(!V(t))throw{code:"T2002",stack:(new Error).stack,value:t};switch(r){case"+":n=e+t;break;case"-":n=e-t;break;case"*":n=e*t;break;case"/":n=e/t;break;case"%":n=e%t}return n}function le(e,t,r){var n,o=void 0===e?"undefined":h(e),a=void 0===t?"undefined":h(t);if("undefined"===o||"undefined"===a)return!1;var i=function(){if("string"!==o&&"number"!==o||"string"!==a&&"number"!==a)throw{code:"T2010",stack:(new Error).stack,value:"string"!==o&&"number"!==o?e:t};if(o!==a)throw{code:"T2009",stack:(new Error).stack,value:e,value2:t}};switch(r){case"=":n=e===t;break;case"!=":n=e!==t;break;case"<":i(),n=e<t;break;case"<=":i(),n=e<=t;break;case">":i(),n=e>t;break;case">=":i(),n=e>=t}return n}function pe(e,t){var r=!1;if(void 0===e||void 0===t)return!1;Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++)if(t[n]===e){r=!0;break}return r}function de(e,t,r){var n;switch(r){case"and":n=He(e)&&He(t);break;case"or":n=He(e)||He(t)}return n}function he(e,t){var r="",n="";return void 0!==e&&(r=ze(e)),void 0!==t&&(n=ze(t)),r.concat(n)}function be(e,t,r){var n,o,a,i,s,u,c,l,p;return f.default.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:n={},o={},Array.isArray(t)||(t=Z(t)),a=0;case 4:if(!(a<t.length)){d.next=27;break}i=t[a],s=0;case 7:if(!(s<e.lhs.length)){d.next=24;break}return u=e.lhs[s],d.delegateYield(Q(u[0],i,r),"t0",10);case 10:if("string"==typeof(c=d.t0)){d.next=13;break}throw{code:"T1003",stack:(new Error).stack,position:e.position,value:c};case 13:if(l={data:i,exprIndex:s},!o.hasOwnProperty(c)){d.next=20;break}if(o[c].exprIndex===s){d.next=17;break}throw{code:"D1009",stack:(new Error).stack,position:e.position,value:c};case 17:o[c].data=et(o[c].data,i),d.next=21;break;case 20:o[c]=l;case 21:s++,d.next=7;break;case 24:a++,d.next=4;break;case 27:d.t1=f.default.keys(o);case 28:if((d.t2=d.t1()).done){d.next=36;break}return c=d.t2.value,l=o[c],d.delegateYield(Q(e.lhs[l.exprIndex][1],l.data,r),"t3",32);case 32:void 0!==(p=d.t3)&&(n[c]=p),d.next=28;break;case 36:return d.abrupt("return",n);case 37:case"end":return d.stop()}},y,this)}function ve(e,t){var r;if(void 0===e||void 0===t)return r;if(e>t)return r;if(!(0,p.default)(e))throw{code:"T2003",stack:(new Error).stack,value:e};if(!(0,p.default)(t))throw{code:"T2004",stack:(new Error).stack,value:t};r=new Array(t-e+1);for(var n=e,o=0;n<=t;n++,o++)r[o]=n;return X(r)}function ge(e,t,r){var n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.delegateYield(Q(e.rhs,t,r),"t0",1);case 1:return n=o.t0,r.bind(e.lhs.value,n),o.abrupt("return",n);case 4:case"end":return o.stop()}},_,this)}function me(e,t,r){var n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.delegateYield(Q(e.condition,t,r),"t0",1);case 1:if(!He(o.t0)){o.next=7;break}return o.delegateYield(Q(e.then,t,r),"t1",4);case 4:n=o.t1,o.next=10;break;case 7:if(void 0===e.else){o.next=10;break}return o.delegateYield(Q(e.else,t,r),"t2",9);case 9:n=o.t2;case 10:return o.abrupt("return",n);case 11:case"end":return o.stop()}},x,this)}function ye(e,t,r){var n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:o=at(r),a=0;case 2:if(!(a<e.expressions.length)){i.next=8;break}return i.delegateYield(Q(e.expressions[a],t,o),"t0",4);case 4:n=i.t0;case 5:a++,i.next=2;break;case 8:return i.abrupt("return",n);case 9:case"end":return i.stop()}},k,this)}function _e(e){var t=new RegExp(e.value);return function r(n){var o,a=t.exec(n);if(null!==a){if(o={match:a[0],start:a.index,end:a.index+a[0].length,groups:[]},a.length>1)for(var i=1;i<a.length;i++)o.groups.push(a[i]);o.next=function(){if(!(t.lastIndex>=n.length)){var o=r(n);if(o&&""===o.match)throw{code:"D1004",stack:(new Error).stack,position:e.position,value:e.value.source};return o}}}return o}}function xe(e,t){var r;return f.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.delegateYield(Ye(e,[t],null),"t0",1);case 1:if(!(r=n.t0)||"number"==typeof r.start||"number"===r.end||Array.isArray(r.groups)||Ee(r.next)){n.next=4;break}throw{code:"T1010",stack:(new Error).stack};case 4:return n.abrupt("return",r);case 5:case"end":return n.stop()}},w,this)}function ke(e,t,r){return""===e.value?t:r.lookup(e.value)}function we(e,t,r){var n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.delegateYield(Q(e.lhs,t,r),"t0",1);case 1:return o=i.t0,a=f.default.mark(function t(n,o){var a,i,s,u,c,l,p;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=0,i=0;case 2:if(!(0===a&&i<e.rhs.length)){t.next=29;break}return s=e.rhs[i],t.delegateYield(Q(s.expression,n,r),"t0",5);case 5:return u=t.t0,t.delegateYield(Q(s.expression,o,r),"t1",7);case 7:if(c=t.t1,l=void 0===u?"undefined":h(u),p=void 0===c?"undefined":h(c),"undefined"!==l){t.next=13;break}return a="undefined"===p?0:1,t.abrupt("continue",26);case 13:if("undefined"!==p){t.next=16;break}return a=-1,t.abrupt("continue",26);case 16:if(!("string"!==l&&"number"!==l||"string"!==p&&"number"!==p)){t.next=18;break}throw{code:"T2008",stack:(new Error).stack,position:e.position,value:"string"!==l&&"number"!==l?u:c};case 18:if(l===p){t.next=20;break}throw{code:"T2007",stack:(new Error).stack,position:e.position,value:u,value2:c};case 20:if(u!==c){t.next=24;break}return t.abrupt("continue",26);case 24:a=u<c?-1:1;case 25:!0===s.descending&&(a=-a);case 26:i++,t.next=2;break;case 29:return t.abrupt("return",1===a);case 30:case"end":return t.stop()}},t,this)}),i.delegateYield(rt(o,a),"t1",4);case 4:return n=i.t1,i.abrupt("return",n);case 6:case"end":return i.stop()}},j,this)}function je(e,t,r){return $e(f.default.mark(function t(n){var o,a,i,s,u,c,l,p,d,b,v;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==n){t.next=2;break}return t.abrupt("return",void 0);case 2:if(Ee(o=r.lookup("clone"))){t.next=5;break}throw{code:"T2013",stack:(new Error).stack,position:e.position};case 5:return t.delegateYield(Ye(o,[n],null),"t0",6);case 6:return a=t.t0,t.delegateYield(Q(e.pattern,a,r),"t1",8);case 8:if(void 0===(i=t.t1)){t.next=33;break}Array.isArray(i)||(i=[i]),s=0;case 12:if(!(s<i.length)){t.next=33;break}return u=i[s],t.delegateYield(Q(e.update,u,r),"t2",15);case 15:if(c=t.t2,"undefined"===(l=void 0===c?"undefined":h(c))){t.next=21;break}if("object"===l&&null!==c){t.next=20;break}throw{code:"T2011",stack:(new Error).stack,position:e.update.position,value:c};case 20:for(p in c)u[p]=c[p];case 21:if(void 0===e.delete){t.next=30;break}return t.delegateYield(Q(e.delete,u,r),"t3",23);case 23:if(void 0===(d=t.t3)){t.next=30;break}if(b=d,Array.isArray(d)||(d=[d]),K(d)){t.next=29;break}throw{code:"T2012",stack:(new Error).stack,position:e.delete.position,value:b};case 29:for(v=0;v<d.length;v++)delete u[d[v]];case 30:s++,t.next=12;break;case 33:return t.abrupt("return",a);case 34:case"end":return t.stop()}},t,this)}),"<(oa):o>")}Number.isInteger=p.default||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};var Se=B("function($f, $g) { function($x){ $g($f($x)) } }");function Oe(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if("function"!==e.rhs.type){s.next=7;break}return e.rhs.arguments.unshift(e.lhs),s.delegateYield(Pe(e.rhs,t,r),"t0",3);case 3:n=s.t0,e.rhs.arguments.shift(),s.next=22;break;case 7:return s.delegateYield(Q(e.lhs,t,r),"t1",8);case 8:return o=s.t1,s.delegateYield(Q(e.rhs,t,r),"t2",10);case 10:if(Ee(a=s.t2)){s.next=13;break}throw{code:"T2006",stack:(new Error).stack,position:e.position,value:a};case 13:if(!Ee(o)){s.next=20;break}return s.delegateYield(Q(Se,null,r),"t3",15);case 15:return i=s.t3,s.delegateYield(Ye(i,[o,a],null),"t4",17);case 17:n=s.t4,s.next=22;break;case 20:return s.delegateYield(Ye(a,[o],null),"t5",21);case 21:n=s.t5;case 22:return s.abrupt("return",n);case 23:case"end":return s.stop()}},S,this)}function Ee(e){return e&&(!0===e._jsonata_function||!0===e._jsonata_lambda)||"function"==typeof e}function Ae(e){return e&&!0===e._jsonata_lambda}function Te(e){return"object"===(void 0===e?"undefined":h(e))&&null!==e&&(0,u.default)(e)&&"function"==typeof e[s.default]&&"next"in e&&"function"==typeof e.next}function Pe(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(Q(e.procedure,t,r),"t0",1);case 1:if(void 0!==(o=s.t0)||"path"!==e.procedure.type||!r.lookup(e.procedure.steps[0].value)){s.next=4;break}throw{code:"T1005",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};case 4:a=[],i=0;case 6:if(!(i<e.arguments.length)){s.next=14;break}return s.t1=a,s.delegateYield(Q(e.arguments[i],t,r),"t2",9);case 9:s.t3=s.t2,s.t1.push.call(s.t1,s.t3);case 11:i++,s.next=6;break;case 14:return s.prev=14,s.delegateYield(Ye(o,a,t),"t4",16);case 16:n=s.t4,s.next=24;break;case 19:throw s.prev=19,s.t5=s.catch(14),s.t5.position=e.position,s.t5.token="path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value,s.t5;case 24:return s.abrupt("return",n);case 25:case"end":return s.stop()}},O,this,[[14,19]])}function Ye(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(De(e,t,r),"t0",1);case 1:n=s.t0;case 2:if(!Ae(n)||!0!==n.thunk){s.next=19;break}return s.delegateYield(Q(n.body.procedure,n.input,n.environment),"t1",4);case 4:o=s.t1,a=[],i=0;case 7:if(!(i<n.body.arguments.length)){s.next=15;break}return s.t2=a,s.delegateYield(Q(n.body.arguments[i],n.input,n.environment),"t3",10);case 10:s.t4=s.t3,s.t2.push.call(s.t2,s.t4);case 12:i++,s.next=7;break;case 15:return s.delegateYield(De(o,a,r),"t5",16);case 16:n=s.t5,s.next=2;break;case 19:return s.abrupt("return",n);case 20:case"end":return s.stop()}},E,this)}function De(e,t,r){var n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(o=t,e&&(o=Ne(e.signature,t,r)),!Ae(e)){a.next=7;break}return a.delegateYield(Fe(e,o),"t0",4);case 4:n=a.t0,a.next=22;break;case 7:if(!e||!0!==e._jsonata_function){a.next=14;break}if(!Te(n=e.implementation.apply(r,o))){a.next=12;break}return a.delegateYield(n,"t1",11);case 11:n=a.t1;case 12:a.next=22;break;case 14:if("function"!=typeof e){a.next=21;break}if(!Te(n=e.apply(r,o))){a.next=19;break}return a.delegateYield(n,"t2",18);case 18:n=a.t2;case 19:a.next=22;break;case 21:throw{code:"T1006",stack:(new Error).stack};case 22:return a.abrupt("return",n);case 23:case"end":return a.stop()}},A,this)}function Me(e,t,r){var n={_jsonata_lambda:!0,input:t,environment:r,arguments:e.arguments,signature:e.signature,body:e.body};return!0===e.thunk&&(n.thunk=!0),n}function Le(e,t,r){var n,o,a,i,s;return f.default.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:o=[],a=0;case 2:if(!(a<e.arguments.length)){u.next=15;break}if("operator"!==(i=e.arguments[a]).type||"?"!==i.value){u.next=8;break}o.push(i),u.next=12;break;case 8:return u.t0=o,u.delegateYield(Q(i,t,r),"t1",10);case 10:u.t2=u.t1,u.t0.push.call(u.t0,u.t2);case 12:a++,u.next=2;break;case 15:return u.delegateYield(Q(e.procedure,t,r),"t3",16);case 16:if(void 0!==(s=u.t3)||"path"!==e.procedure.type||!r.lookup(e.procedure.steps[0].value)){u.next=19;break}throw{code:"T1007",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};case 19:if(!Ae(s)){u.next=23;break}n=Ie(s,o),u.next=32;break;case 23:if(!s||!0!==s._jsonata_function){u.next=27;break}n=Re(s.implementation,o),u.next=32;break;case 27:if("function"!=typeof s){u.next=31;break}n=Re(s,o),u.next=32;break;case 31:throw{code:"T1008",stack:(new Error).stack,position:e.position,token:"path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value};case 32:return u.abrupt("return",n);case 33:case"end":return u.stop()}},T,this)}function Ne(e,t,r){return void 0===e?t:e.validate(t,r)}function Fe(e,t){var r,n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(n=at(e.environment),e.arguments.forEach(function(e,r){n.bind(e.value,t[r])}),"function"!=typeof e.body){o.next=7;break}return o.delegateYield(Ce(e.body,n),"t0",4);case 4:r=o.t0,o.next=9;break;case 7:return o.delegateYield(Q(e.body,e.input,n),"t1",8);case 8:r=o.t1;case 9:return o.abrupt("return",r);case 10:case"end":return o.stop()}},P,this)}function Ie(e,t){var r=at(e.environment),n=[];return e.arguments.forEach(function(e,o){var a=t[o];a&&"operator"===a.type&&"?"===a.value?n.push(e):r.bind(e.value,a)}),{_jsonata_lambda:!0,input:e.input,environment:r,arguments:n,body:e.body}}function Re(e,t){var r=Ge(e),n="function("+(r=r.map(function(e){return"$"+e.trim()})).join(", ")+"){ _ }",o=B(n);return o.body=e,Ie(o,t)}function Ce(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(r=Ge(e),n=r.map(function(e){return t.lookup(e.trim())}),!Te(o=e.apply(null,n))){a.next=6;break}return a.delegateYield(o,"t0",5);case 5:o=a.t0;case 6:return a.abrupt("return",o);case 7:case"end":return a.stop()}},Y,this)}function Ge(e){var t=e.toString();return/\(([^)]*)\)/.exec(t)[1].split(",")}function $e(e,t){var r={_jsonata_function:!0,implementation:e};return void 0!==t&&(r.signature=J(t)),r}function ze(e){if(void 0!==e){var t;if("string"==typeof e)t=e;else if(Ee(e))t="";else{if("number"==typeof e&&!isFinite(e))throw{code:"D3001",value:e,stack:(new Error).stack};t=(0,i.default)(e,function(e,t){return void 0!==t&&null!==t&&t.toPrecision&&V(t)?Number(t.toPrecision(15)):t&&Ee(t)?"":t})}return t}}function qe(e,t,r){if(void 0!==e){var n=(0,a.default)(e),o=n.length;if(o+t<0&&(t=0),void 0!==r){if(r<=0)return"";var i=t>=0?t+r:o+t+r;return n.slice(t,i).join("")}return n.slice(t).join("")}}function Ue(e){if(void 0!==e)return(0,a.default)(e).length}function Je(e,t){var r,n;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==e){o.next=2;break}return o.abrupt("return",void 0);case 2:if("string"!=typeof t){o.next=6;break}r=-1!==e.indexOf(t),o.next=9;break;case 6:return o.delegateYield(xe(t,e),"t0",7);case 7:n=o.t0,r=void 0!==n;case 9:return o.abrupt("return",r);case 10:case"end":return o.stop()}},D,this)}function Be(e,t,r){var n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(void 0!==e){i.next=2;break}return i.abrupt("return",void 0);case 2:if(!(r<0)){i.next=4;break}throw{stack:(new Error).stack,value:r,code:"D3040",index:3};case 4:if(n=Z(),!(void 0===r||r>0)){i.next=17;break}return o=0,i.delegateYield(xe(t,e),"t0",8);case 8:if(void 0===(a=i.t0)){i.next=17;break}case 10:if(void 0===a||!(void 0===r||o<r)){i.next=17;break}return n.push({match:a.match,index:a.start,groups:a.groups}),i.delegateYield(xe(a.next),"t1",13);case 13:a=i.t1,o++,i.next=10;break;case 17:return i.abrupt("return",n);case 18:case"end":return i.stop()}},M,this)}function We(e,t,r,n){var o,a,i,s,u,c,l;return f.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(void 0!==e){f.next=2;break}return f.abrupt("return",void 0);case 2:if(""!==t){f.next=4;break}throw{code:"D3010",stack:(new Error).stack,value:t,index:2};case 4:if(!(n<0)){f.next=6;break}throw{code:"D3011",stack:(new Error).stack,value:n,index:4};case 6:if(o="string"==typeof r?function(e){for(var t="",n=0,o=r.indexOf("$",n);-1!==o&&n<r.length;){t+=r.substring(n,o),n=o+1;var a=r.charAt(n);if("$"===a)t+="$",n++;else if("0"===a)t+=e.match,n++;else{var i;if(i=0===e.groups.length?1:Math.floor(Math.log(e.groups.length)*Math.LOG10E)+1,o=parseInt(r.substring(n,n+i),10),i>1&&o>e.groups.length&&(o=parseInt(r.substring(n,n+i-1),10)),isNaN(o))t+="$";else{if(e.groups.length>0){var s=e.groups[o-1];void 0!==s&&(t+=s)}n+=o.toString().length}}o=r.indexOf("$",n)}return t+=r.substring(n)}:r,a="",i=0,!(void 0===n||n>0)){f.next=41;break}if(s=0,"string"!=typeof t){f.next=17;break}for(u=e.indexOf(t,i);-1!==u&&(void 0===n||s<n);)a+=e.substring(i,u),a+=r,i=u+t.length,s++,u=e.indexOf(t,i);a+=e.substring(i),f.next=39;break;case 17:return f.delegateYield(xe(t,e),"t0",18);case 18:if(void 0===(c=f.t0)){f.next=38;break}case 20:if(void 0===c||!(void 0===n||s<n)){f.next=35;break}return a+=e.substring(i,c.start),f.delegateYield(Ye(o,[c],null),"t1",23);case 23:if("string"!=typeof(l=f.t1)){f.next=28;break}a+=l,f.next=29;break;case 28:throw{code:"D3012",stack:(new Error).stack,value:l};case 29:return i=c.start+c.match.length,s++,f.delegateYield(xe(c.next),"t2",32);case 32:c=f.t2,f.next=20;break;case 35:a+=e.substring(i),f.next=39;break;case 38:a=e;case 39:f.next=42;break;case 41:a=e;case 42:return f.abrupt("return",a);case 43:case"end":return f.stop()}},L,this)}function Ve(e,t,r){var n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==e){s.next=2;break}return s.abrupt("return",void 0);case 2:if(!(r<0)){s.next=4;break}throw{code:"D3020",stack:(new Error).stack,value:r,index:3};case 4:if(n=[],!(void 0===r||r>0)){s.next=27;break}if("string"!=typeof t){s.next=10;break}n=e.split(t,r),s.next=27;break;case 10:return o=0,s.delegateYield(xe(t,e),"t0",12);case 12:if(void 0===(a=s.t0)){s.next=26;break}i=0;case 15:if(void 0===a||!(void 0===r||o<r)){s.next=23;break}return n.push(e.substring(i,a.start)),i=a.end,s.delegateYield(xe(a.next),"t1",19);case 19:a=s.t1,o++,s.next=15;break;case 23:(void 0===r||o<r)&&n.push(e.substring(i)),s.next=27;break;case 26:n.push(e);case 27:return s.abrupt("return",n);case 28:case"end":return s.stop()}},N,this)}function Ke(e,t){var r;if(void 0!==e){if(t){var n=e.toString().split("e");e=+(n[0]+"e"+(n[1]?+n[1]+t:t))}var a=(r=Math.round(e))-e;return.5===Math.abs(a)&&1===Math.abs(r%2)&&(r-=1),t&&(r=+((n=r.toString().split("e"))[0]+"e"+(n[1]?+n[1]-t:-t))),(0,o.default)(r,-0)&&(r=0),r}}function He(e){if(void 0!==e){var t=!1;if(Array.isArray(e)){if(1===e.length)t=He(e[0]);else if(e.length>1){t=e.filter(function(e){return He(e)}).length>0}}else"string"==typeof e?e.length>0&&(t=!0):V(e)?0!==e&&(t=!0):null!==e&&"object"===(void 0===e?"undefined":h(e))?(0,c.default)(e).length>0&&(Ae(e)||e._jsonata_function||(t=!0)):"boolean"==typeof e&&!0===e&&(t=!0);return t}}function Qe(e,t){var r,n,o,a,i;return f.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==e){s.next=2;break}return s.abrupt("return",void 0);case 2:r=Z(),n=0;case 4:if(!(n<e.length)){s.next=15;break}return o=[e[n]],(a="function"==typeof t?t.length:!0===t._jsonata_function?t.implementation.length:t.arguments.length)>=2&&o.push(n),a>=3&&o.push(e),s.delegateYield(Ye(t,o,null),"t0",10);case 10:void 0!==(i=s.t0)&&r.push(i);case 12:n++,s.next=4;break;case 15:return s.abrupt("return",r);case 16:case"end":return s.stop()}},F,this)}function Ze(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==e){a.next=2;break}return a.abrupt("return",void 0);case 2:r=Z(),n=0;case 4:if(!(n<e.length)){a.next=12;break}return o=e[n],a.delegateYield(Ye(t,[o,n,e],null),"t0",7);case 7:He(a.t0)&&r.push(o);case 9:n++,a.next=4;break;case 12:return a.abrupt("return",r);case 13:case"end":return a.stop()}},I,this)}function Xe(e,t,r){var n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==e){a.next=2;break}return a.abrupt("return",void 0);case 2:if(2===t.length||!0===t._jsonata_function&&2===t.implementation.length||2===t.arguments.length){a.next=4;break}throw{stack:(new Error).stack,code:"D3050",index:1};case 4:void 0===r&&e.length>0?(n=e[0],o=1):(n=r,o=0);case 5:if(!(o<e.length)){a.next=11;break}return a.delegateYield(Ye(t,[n,e[o]],null),"t0",7);case 7:n=a.t0,o++,a.next=5;break;case 11:return a.abrupt("return",n);case 12:case"end":return a.stop()}},R,this)}function et(e,t){return void 0===e?t:void 0===t?e:(Array.isArray(e)||(e=Z(e)),Array.isArray(t)||(t=[t]),e.concat(t))}function tt(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:r=Z(),a.t0=f.default.keys(e);case 2:if((a.t1=a.t0()).done){a.next=11;break}return n=a.t1.value,o=[e[n],n],a.t2=r,a.delegateYield(Ye(t,o,null),"t3",7);case 7:a.t4=a.t3,a.t2.push.call(a.t2,a.t4),a.next=2;break;case 11:return a.abrupt("return",r);case 12:case"end":return a.stop()}},C,this)}function rt(e,t){var r,n,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(void 0!==e){i.next=2;break}return i.abrupt("return",void 0);case 2:if(!(e.length<=1)){i.next=4;break}return i.abrupt("return",e);case 4:if(void 0!==t){i.next=10;break}if(H(e)||K(e)){i.next=7;break}throw{stack:(new Error).stack,code:"D3070",index:1};case 7:r=f.default.mark(function e(t,r){return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t>r);case 1:case"end":return e.stop()}},e,this)}),i.next=11;break;case 10:r="function"==typeof t?t:f.default.mark(function e(r,n){return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(Ye(t,[r,n],null),"t0",1);case 1:return e.abrupt("return",e.t0);case 2:case"end":return e.stop()}},e,this)});case 11:return n=f.default.mark(function e(t,n){var o,a;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=f.default.mark(function e(t,n,o){return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(0!==n.length){a.next=4;break}Array.prototype.push.apply(t,o),a.next=16;break;case 4:if(0!==o.length){a.next=8;break}Array.prototype.push.apply(t,n),a.next=16;break;case 8:return a.delegateYield(r(n[0],o[0]),"t0",9);case 9:if(!a.t0){a.next=14;break}return t.push(o[0]),a.delegateYield(e(t,n,o.slice(1)),"t1",12);case 12:a.next=16;break;case 14:return t.push(n[0]),a.delegateYield(e(t,n.slice(1),o),"t2",16);case 16:case"end":return a.stop()}},e,this)}),a=[],e.delegateYield(o(a,t,n),"t0",3);case 3:return e.abrupt("return",a);case 4:case"end":return e.stop()}},e,this)}),o=f.default.mark(function e(t){var r,o,a;return f.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(Array.isArray(t)&&!(t.length<=1)){i.next=4;break}return i.abrupt("return",t);case 4:return r=Math.floor(t.length/2),o=t.slice(0,r),a=t.slice(r),i.delegateYield(e(o),"t0",8);case 8:return o=i.t0,i.delegateYield(e(a),"t1",10);case 10:return a=i.t1,i.delegateYield(n(o,a),"t2",12);case 12:return i.abrupt("return",i.t2);case 13:case"end":return i.stop()}},e,this)}),i.delegateYield(o(e),"t0",14);case 14:return a=i.t0,i.abrupt("return",a);case 16:case"end":return i.stop()}},G,this)}function nt(e,t){var r,n,o;return f.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:r={},a.t0=f.default.keys(e);case 2:if((a.t1=a.t0()).done){a.next=10;break}return n=a.t1.value,o=e[n],a.delegateYield(Ye(t,[o,n,e],null),"t2",6);case 6:He(a.t2)&&(r[n]=o),a.next=2;break;case 10:return 0===(0,c.default)(r).length&&(r=void 0),a.abrupt("return",r);case 12:case"end":return a.stop()}},$,this)}var ot=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function at(e){var t={};return{bind:function(e,r){t[e]=r},lookup:function(r){var n;return t.hasOwnProperty(r)?n=t[r]:e&&(n=e.lookup(r)),n}}}W.bind("sum",$e(function(e){if(void 0!==e){var t=0;return e.forEach(function(e){t+=e}),t}},"<a<n>:n>")),W.bind("count",$e(function(e){return void 0===e?0:e.length},"<a:n>")),W.bind("max",$e(function(e){if(void 0!==e&&0!==e.length)return Math.max.apply(Math,e)},"<a<n>:n>")),W.bind("min",$e(function(e){if(void 0!==e&&0!==e.length)return Math.min.apply(Math,e)},"<a<n>:n>")),W.bind("average",$e(function(e){if(void 0!==e&&0!==e.length){var t=0;return e.forEach(function(e){t+=e}),t/e.length}},"<a<n>:n>")),W.bind("string",$e(ze,"<x-:s>")),W.bind("substring",$e(qe,"<s-nn?:s>")),W.bind("substringBefore",$e(function(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(0,r):e}},"<s-s:s>")),W.bind("substringAfter",$e(function(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(r+t.length):e}},"<s-s:s>")),W.bind("lowercase",$e(function(e){if(void 0!==e)return e.toLowerCase()},"<s-:s>")),W.bind("uppercase",$e(function(e){if(void 0!==e)return e.toUpperCase()},"<s-:s>")),W.bind("length",$e(Ue,"<s-:n>")),W.bind("trim",$e(function(e){if(void 0!==e){var t=e.replace(/[ \t\n\r]+/gm," ");return" "===t.charAt(0)&&(t=t.substring(1))," "===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}},"<s-:s>")),W.bind("pad",$e(function(e,t,r){if(void 0!==e){var n;void 0!==r&&0!==r.length||(r=" ");var o=Math.abs(t)-Ue(e);if(o>0){var a=new Array(o+1).join(r);r.length>1&&(a=qe(a,0,o)),n=t>0?e+a:a+e}else n=e;return n}},"<s-ns?:s>")),W.bind("match",$e(Be,"<s-f<s:o>n?:a<o>>")),W.bind("contains",$e(Je,"<s-(sf):b>")),W.bind("replace",$e(We,"<s-(sf)(sf)n?:s>")),W.bind("split",$e(Ve,"<s-(sf)n?:a<s>>")),W.bind("join",$e(function(e,t){if(void 0!==e)return void 0===t&&(t=""),e.join(t)},"<a<s>s?:s>")),W.bind("formatNumber",$e(function(e,t,r){if(void 0!==e){var n={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&(0,c.default)(r).forEach(function(e){n[e]=r[e]});for(var o=[],a=n["zero-digit"].charCodeAt(0),s=a;s<a+10;s++)o.push(String.fromCharCode(s));var u=o.concat([n["decimal-separator"],n["exponent-separator"],n["grouping-separator"],n.digit,n["pattern-separator"]]),f=t.split(n["pattern-separator"]);if(f.length>2)throw{code:"D3080",stack:(new Error).stack};var l=f.map(function(e){var t,r,o,a,i=function(){for(var t,r=0;r<e.length;r++)if(t=e.charAt(r),-1!==u.indexOf(t)&&t!==n["exponent-separator"])return e.substring(0,r)}(),s=function(){for(var t,r=e.length-1;r>=0;r--)if(t=e.charAt(r),-1!==u.indexOf(t)&&t!==n["exponent-separator"])return e.substring(r+1)}(),c=e.substring(i.length,e.length-s.length),f=e.indexOf(n["exponent-separator"],i.length);-1===f||f>e.length-s.length?(t=c,r=void 0):(t=c.substring(0,f),r=c.substring(f+1));var l=t.indexOf(n["decimal-separator"]);return-1===l?(o=t,a=s):(o=t.substring(0,l),a=t.substring(l+1)),{prefix:i,suffix:s,activePart:c,mantissaPart:t,exponentPart:r,integerPart:o,fractionalPart:a,subpicture:e}});l.forEach(function(e){var t,r,a=e.subpicture,i=a.indexOf(n["decimal-separator"]);i!==a.lastIndexOf(n["decimal-separator"])&&(t="D3081"),a.indexOf(n.percent)!==a.lastIndexOf(n.percent)&&(t="D3082"),a.indexOf(n["per-mille"])!==a.lastIndexOf(n["per-mille"])&&(t="D3083"),-1!==a.indexOf(n.percent)&&-1!==a.indexOf(n["per-mille"])&&(t="D3084");var s=!1;for(r=0;r<e.mantissaPart.length;r++){var c=e.mantissaPart.charAt(r);if(-1!==o.indexOf(c)||c===n.digit){s=!0;break}}s||(t="D3085"),-1!==e.activePart.split("").map(function(e){return-1===u.indexOf(e)?"p":"a"}).join("").indexOf("p")&&(t="D3086"),-1!==i?a.charAt(i-1)!==n["grouping-separator"]&&a.charAt(i+1)!==n["grouping-separator"]||(t="D3087"):e.integerPart.charAt(e.integerPart.length-1)===n["grouping-separator"]&&(t="D3088"),-1!==a.indexOf(n["grouping-separator"]+n["grouping-separator"])&&(t="D3089");var f=e.integerPart.indexOf(n.digit);-1!==f&&e.integerPart.substring(0,f).split("").filter(function(e){return o.indexOf(e)>-1}).length>0&&(t="D3090"),-1!==(f=e.fractionalPart.lastIndexOf(n.digit))&&e.fractionalPart.substring(f).split("").filter(function(e){return o.indexOf(e)>-1}).length>0&&(t="D3091");var l="string"==typeof e.exponentPart;if(l&&e.exponentPart.length>0&&(-1!==a.indexOf(n.percent)||-1!==a.indexOf(n["per-mille"]))&&(t="D3092"),l&&(0===e.exponentPart.length||e.exponentPart.split("").filter(function(e){return-1===o.indexOf(e)}).length>0)&&(t="D3093"),t)throw{code:t,stack:(new Error).stack}});var p,d,h,b,v=l.map(function(e){var t=function(t,r){for(var a=[],i=t.indexOf(n["grouping-separator"]);-1!==i;){var s=(r?t.substring(0,i):t.substring(i)).split("").filter(function(e){return-1!==o.indexOf(e)||e===n.digit}).length;a.push(s),i=e.integerPart.indexOf(n["grouping-separator"],i+1)}return a},r=t(e.integerPart),a=function(e){if(0===e.length)return 0;for(var t=e.reduce(function e(t,r){return 0===r?t:e(r,t%r)}),r=1;r<=e.length;r++)if(-1===e.indexOf(r*t))return 0;return t}(r),i=t(e.fractionalPart,!0),s=e.integerPart.split("").filter(function(e){return-1!==o.indexOf(e)}).length,u=s,c=e.fractionalPart.split(""),f=c.filter(function(e){return-1!==o.indexOf(e)}).length,l=c.filter(function(e){return-1!==o.indexOf(e)||e===n.digit}).length,p="string"==typeof e.exponentPart;0===s&&0===l&&(p?(f=1,l=1):s=1),p&&0===s&&-1!==e.integerPart.indexOf(n.digit)&&(s=1),0===s&&0===f&&(f=1);var d=0;return p&&(d=e.exponentPart.split("").filter(function(e){return-1!==o.indexOf(e)}).length),{integerPartGroupingPositions:r,regularGrouping:a,minimumIntegerPartSize:s,scalingFactor:u,prefix:e.prefix,fractionalPartGroupingPositions:i,minimumFactionalPartSize:f,maximumFactionalPartSize:l,minimumExponentSize:d,suffix:e.suffix,picture:e.subpicture}}),g=n["minus-sign"],m=n["zero-digit"],y=n["decimal-separator"],_=n["grouping-separator"];if(1===v.length&&(v.push(JSON.parse((0,i.default)(v[0]))),v[1].prefix=g+v[1].prefix),d=-1!==(p=e>=0?v[0]:v[1]).picture.indexOf(n.percent)?100*e:-1!==p.picture.indexOf(n["per-mille"])?1e3*e:e,0===p.minimumExponentSize)h=d;else{var x=Math.pow(10,p.scalingFactor),k=Math.pow(10,p.scalingFactor-1);for(h=d,b=0;h<k;)h*=10,b-=1;for(;h>x;)h/=10,b+=1}var w=function(e,t){var r=Math.abs(e).toFixed(t);return"0"!==m&&(r=r.split("").map(function(e){return e>="0"&&e<="9"?o[e.charCodeAt(0)-48]:e}).join("")),r},j=w(Ke(h,p.maximumFactionalPartSize),p.maximumFactionalPartSize),S=j.indexOf(".");for(-1===S?j+=y:j=j.replace(".",y);j.charAt(0)===m;)j=j.substring(1);for(;j.charAt(j.length-1)===m;)j=j.substring(0,j.length-1);S=j.indexOf(y);var O=p.minimumIntegerPartSize-S,E=p.minimumFactionalPartSize-(j.length-S-1);if(j=(O>0?new Array(O+1).join(m):"")+j,j+=E>0?new Array(E+1).join(m):"",S=j.indexOf(y),p.regularGrouping>0)for(var A=Math.floor((S-1)/p.regularGrouping),T=1;T<=A;T++)j=[j.slice(0,S-T*p.regularGrouping),_,j.slice(S-T*p.regularGrouping)].join("");else p.integerPartGroupingPositions.forEach(function(e){j=[j.slice(0,S-e),_,j.slice(S-e)].join(""),S++});if(S=j.indexOf(y),p.fractionalPartGroupingPositions.forEach(function(e){j=[j.slice(0,e+S+1),_,j.slice(e+S+1)].join("")}),S=j.indexOf(y),-1!==p.picture.indexOf(y)&&S!==j.length-1||(j=j.substring(0,j.length-1)),void 0!==b){var P=w(b,0);(O=p.minimumExponentSize-P.length)>0&&(P=new Array(O+1).join(m)+P),j=j+n["exponent-separator"]+(b<0?g:"")+P}return j=p.prefix+j+p.suffix}},"<n-so?:s>")),W.bind("formatBase",$e(function(e,t){if(void 0!==e){if(e=Ke(e),(t=void 0===t?10:Ke(t))<2||t>36)throw{code:"D3100",stack:(new Error).stack,value:t};return e.toString(t)}},"<n-n?:s>")),W.bind("number",$e(function(e){var t;if(void 0!==e){if("number"==typeof e)t=e;else{if("string"!=typeof e||!/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(e)||isNaN(parseFloat(e))||!isFinite(e))throw{code:"D3030",value:e,stack:(new Error).stack,index:1};t=parseFloat(e)}return t}},"<(ns)-:n>")),W.bind("floor",$e(function(e){if(void 0!==e)return Math.floor(e)},"<n-:n>")),W.bind("ceil",$e(function(e){if(void 0!==e)return Math.ceil(e)},"<n-:n>")),W.bind("round",$e(Ke,"<n-n?:n>")),W.bind("abs",$e(function(e){if(void 0!==e)return Math.abs(e)},"<n-:n>")),W.bind("sqrt",$e(function(e){if(void 0!==e){if(e<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:e};return Math.sqrt(e)}},"<n-:n>")),W.bind("power",$e(function(e,t){var r;if(void 0!==e){if(r=Math.pow(e,t),!isFinite(r))throw{stack:(new Error).stack,code:"D3061",index:1,value:e,exp:t};return r}},"<n-n:n>")),W.bind("random",$e(function(){return Math.random()},"<:n>")),W.bind("boolean",$e(He,"<x-:b>")),W.bind("not",$e(function(e){return!He(e)},"<x-:b>")),W.bind("map",$e(Qe,"<af>")),W.bind("zip",$e(function(){for(var e=[],t=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,t.map(function(e){return Array.isArray(e)?e.length:0})),n=0;n<r;n++){var o=t.map(function(e){return e[n]});e.push(o)}return e},"<a+>")),W.bind("filter",$e(Ze,"<af>")),W.bind("reduce",$e(Xe,"<afj?:j>")),W.bind("sift",$e(nt,"<o-f?:o>")),W.bind("keys",$e(function e(t){var r=Z();if(Array.isArray(t)){var n={};t.forEach(function(t){var r=e(t);Array.isArray(r)&&r.forEach(function(e){n[e]=!0})}),r=e(n)}else null===t||"object"!==(void 0===t?"undefined":h(t))||Ae(t)?r=void 0:0===(r=(0,c.default)(t)).length&&(r=void 0);return r},"<x-:a<s>>")),W.bind("lookup",$e(function(e,t){return ie({value:t},e)},"<x-s:x>")),W.bind("append",$e(et,"<xx:a>")),W.bind("exists",$e(function(e){return void 0!==e},"<x:b>")),W.bind("spread",$e(function e(t){var r=Z();if(Array.isArray(t))t.forEach(function(t){r=et(r,e(t))});else if(null===t||"object"!==(void 0===t?"undefined":h(t))||Ae(t))r=t;else for(var n in t){var o={};o[n]=t[n],r.push(o)}return r},"<x-:a<o>>")),W.bind("merge",$e(function(e){if(void 0!==e){var t={};return e.forEach(function(e){for(var r in e)t[r]=e[r]}),t}},"<a<o>:o>")),W.bind("reverse",$e(function(e){if(void 0!==e){if(e.length<=1)return e;for(var t=e.length,r=new Array(t),n=0;n<t;n++)r[t-n-1]=e[n];return r}},"<a:a>")),W.bind("each",$e(tt,"<o-f:a>")),W.bind("sort",$e(rt,"<af?:a>")),W.bind("shuffle",$e(function(e){if(void 0!==e){if(e.length<=1)return e;for(var t=new Array(e.length),r=0;r<e.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(t[r]=t[n]),t[n]=e[r]}return t}},"<a:a>")),W.bind("base64encode",$e(function(e){if(void 0!==e)return("undefined"!=typeof window?window.btoa:function(e){return new r.Buffer(e,"binary").toString("base64")})(e)},"<s-:s>")),W.bind("base64decode",$e(function(e){if(void 0!==e)return("undefined"!=typeof window?window.atob:function(e){return new r.Buffer(e,"base64").toString("binary")})(e)},"<s-:s>")),W.bind("toMillis",$e(function(e){if(void 0!==e){if(!ot.test(e))throw{stack:(new Error).stack,code:"D3110",value:e};return Date.parse(e)}},"<s-:n>")),W.bind("fromMillis",$e(function(e){if(void 0!==e)return new Date(e).toISOString()},"<n-:s>")),W.bind("clone",$e(function(e){if(void 0!==e)return JSON.parse(ze(e))},"<(oa)-:o>"));var it={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"First argument of reduce function must be a function with two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}"};function st(e){var t="Unknown error";void 0!==e.message&&(t=e.message);var r=it[e.code];return void 0!==r&&(t=(t=r.replace(/\{\{\{([^}]+)}}}/g,function(){return e[arguments[1]]})).replace(/\{\{([^}]+)}}/g,function(){return(0,i.default)(e[arguments[1]])})),t}function ut(e,t){var r,n;try{r=B(e,t&&t.recover),n=r.errors,delete r.errors}catch(e){throw e.message=st(e),e}var o=at(W),a=new Date;return o.bind("now",$e(function(){return a.toJSON()},"<:s>")),o.bind("millis",$e(function(){return a.getTime()},"<:n>")),{evaluate:function(e,t,i){if(void 0!==n){var s={code:"S0500",position:0};throw s.message=st(s),s}var u,c,f;if(void 0!==t)for(var l in u=at(o),t)u.bind(l,t[l]);else u=o;if(u.bind("$",e),a=new Date,"function"==typeof i){u.bind("__jsonata_async",!0);var p=function(e){e.message=st(e),i(e,null)};f=Q(r,e,u),(c=f.next()).value.then(function e(t){(c=f.next(t)).done?i(null,c.value):c.value.then(e).catch(p)}).catch(p)}else try{for(f=Q(r,e,u),c=f.next();!c.done;)c=f.next(c.value);return c.value}catch(s){throw s.message=st(s),s}},assign:function(e,t){o.bind(e,t)},registerFunction:function(e,t,r){var n=$e(t,r);o.bind(e,n)},ast:function(){return r},errors:function(){return n}}}return ut.parser=B,ut}();void 0!==t&&(t.exports=v)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/array/from":2,"babel-runtime/core-js/is-iterable":3,"babel-runtime/core-js/json/stringify":4,"babel-runtime/core-js/number/is-integer":5,"babel-runtime/core-js/object/create":6,"babel-runtime/core-js/object/is":7,"babel-runtime/core-js/object/keys":8,"babel-runtime/core-js/promise":9,"babel-runtime/core-js/symbol":10,"babel-runtime/core-js/symbol/iterator":11,"babel-runtime/regenerator":12}],2:[function(e,t,r){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":13}],3:[function(e,t,r){t.exports={default:e("core-js/library/fn/is-iterable"),__esModule:!0}},{"core-js/library/fn/is-iterable":14}],4:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":15}],5:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/is-integer"),__esModule:!0}},{"core-js/library/fn/number/is-integer":16}],6:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":17}],7:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/is"),__esModule:!0}},{"core-js/library/fn/object/is":18}],8:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":19}],9:[function(e,t,r){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":20}],10:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":21}],11:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":22}],12:[function(e,t,r){t.exports=e("regenerator-runtime")},{"regenerator-runtime":115}],13:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/_core").Array.from},{"../../modules/_core":30,"../../modules/es6.array.from":100,"../../modules/es6.string.iterator":108}],14:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.is-iterable")},{"../modules/core.is-iterable":99,"../modules/es6.string.iterator":108,"../modules/web.dom.iterable":114}],15:[function(e,t,r){var n=e("../../modules/_core"),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return o.stringify.apply(o,arguments)}},{"../../modules/_core":30}],16:[function(e,t,r){e("../../modules/es6.number.is-integer"),t.exports=e("../../modules/_core").Number.isInteger},{"../../modules/_core":30,"../../modules/es6.number.is-integer":102}],17:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":30,"../../modules/es6.object.create":103}],18:[function(e,t,r){e("../../modules/es6.object.is"),t.exports=e("../../modules/_core").Object.is},{"../../modules/_core":30,"../../modules/es6.object.is":104}],19:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":30,"../../modules/es6.object.keys":105}],20:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),e("../modules/es7.promise.finally"),e("../modules/es7.promise.try"),t.exports=e("../modules/_core").Promise},{"../modules/_core":30,"../modules/es6.object.to-string":106,"../modules/es6.promise":107,"../modules/es6.string.iterator":108,"../modules/es7.promise.finally":110,"../modules/es7.promise.try":111,"../modules/web.dom.iterable":114}],21:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":30,"../../modules/es6.object.to-string":106,"../../modules/es6.symbol":109,"../../modules/es7.symbol.async-iterator":112,"../../modules/es7.symbol.observable":113}],22:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":96,"../../modules/es6.string.iterator":108,"../../modules/web.dom.iterable":114}],23:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],24:[function(e,t,r){t.exports=function(){}},{}],25:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],26:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":51}],27:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_to-length"),a=e("./_to-absolute-index");t.exports=function(e){return function(t,r,i){var s,u=n(t),c=o(u.length),f=a(i,c);if(e&&r!=r){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===r)return e||f||0;return!e&&-1}}},{"./_to-absolute-index":87,"./_to-iobject":89,"./_to-length":90}],28:[function(e,t,r){var n=e("./_cof"),o=e("./_wks")("toStringTag"),a="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:a?n(t):"Object"==(i=n(t))&&"function"==typeof t.callee?"Arguments":i}},{"./_cof":29,"./_wks":97}],29:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],30:[function(e,t,r){var n=t.exports={version:"2.5.6"};"number"==typeof __e&&(__e=n)},{}],31:[function(e,t,r){"use strict";var n=e("./_object-dp"),o=e("./_property-desc");t.exports=function(e,t,r){t in e?n.f(e,t,o(0,r)):e[t]=r}},{"./_object-dp":63,"./_property-desc":76}],32:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":23}],33:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],34:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":39}],35:[function(e,t,r){var n=e("./_is-object"),o=e("./_global").document,a=n(o)&&n(o.createElement);t.exports=function(e){return a?o.createElement(e):{}}},{"./_global":41,"./_is-object":51}],36:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],37:[function(e,t,r){var n=e("./_object-keys"),o=e("./_object-gops"),a=e("./_object-pie");t.exports=function(e){var t=n(e),r=o.f;if(r)for(var i,s=r(e),u=a.f,c=0;s.length>c;)u.call(e,i=s[c++])&&t.push(i);return t}},{"./_object-gops":68,"./_object-keys":71,"./_object-pie":72}],38:[function(e,t,r){var n=e("./_global"),o=e("./_core"),a=e("./_ctx"),i=e("./_hide"),s=e("./_has"),u=function(e,t,r){var c,f,l,p=e&u.F,d=e&u.G,h=e&u.S,b=e&u.P,v=e&u.B,g=e&u.W,m=d?o:o[t]||(o[t]={}),y=m.prototype,_=d?n:h?n[t]:(n[t]||{}).prototype;for(c in d&&(r=t),r)(f=!p&&_&&void 0!==_[c])&&s(m,c)||(l=f?_[c]:r[c],m[c]=d&&"function"!=typeof _[c]?r[c]:v&&f?a(l,n):g&&_[c]==l?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):b&&"function"==typeof l?a(Function.call,l):l,b&&((m.virtual||(m.virtual={}))[c]=l,e&u.R&&y&&!y[c]&&i(y,c,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},{"./_core":30,"./_ctx":32,"./_global":41,"./_has":42,"./_hide":43}],39:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],40:[function(e,t,r){var n=e("./_ctx"),o=e("./_iter-call"),a=e("./_is-array-iter"),i=e("./_an-object"),s=e("./_to-length"),u=e("./core.get-iterator-method"),c={},f={};(r=t.exports=function(e,t,r,l,p){var d,h,b,v,g=p?function(){return e}:u(e),m=n(r,l,t?2:1),y=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(d=s(e.length);d>y;y++)if((v=t?m(i(h=e[y])[0],h[1]):m(e[y]))===c||v===f)return v}else for(b=g.call(e);!(h=b.next()).done;)if((v=o(b,m,h.value,t))===c||v===f)return v}).BREAK=c,r.RETURN=f},{"./_an-object":26,"./_ctx":32,"./_is-array-iter":48,"./_iter-call":52,"./_to-length":90,"./core.get-iterator-method":98}],41:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],42:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],43:[function(e,t,r){var n=e("./_object-dp"),o=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":34,"./_object-dp":63,"./_property-desc":76}],44:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":41}],45:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":34,"./_dom-create":35,"./_fails":39}],46:[function(e,t,r){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],47:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":29}],48:[function(e,t,r){var n=e("./_iterators"),o=e("./_wks")("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||a[o]===e)}},{"./_iterators":57,"./_wks":97}],49:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":29}],50:[function(e,t,r){var n=e("./_is-object"),o=Math.floor;t.exports=function(e){return!n(e)&&isFinite(e)&&o(e)===e}},{"./_is-object":51}],51:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],52:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var a=e.return;throw void 0!==a&&n(a.call(e)),t}}},{"./_an-object":26}],53:[function(e,t,r){"use strict";var n=e("./_object-create"),o=e("./_property-desc"),a=e("./_set-to-string-tag"),i={};e("./_hide")(i,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(i,{next:o(1,r)}),a(e,t+" Iterator")}},{"./_hide":43,"./_object-create":62,"./_property-desc":76,"./_set-to-string-tag":81,"./_wks":97}],54:[function(e,t,r){"use strict";var n=e("./_library"),o=e("./_export"),a=e("./_redefine"),i=e("./_hide"),s=e("./_iterators"),u=e("./_iter-create"),c=e("./_set-to-string-tag"),f=e("./_object-gpo"),l=e("./_wks")("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,h,b,v,g){u(r,t,h);var m,y,_,x=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},k=t+" Iterator",w="values"==b,j=!1,S=e.prototype,O=S[l]||S["@@iterator"]||b&&S[b],E=O||x(b),A=b?w?x("entries"):E:void 0,T="Array"==t&&S.entries||O;if(T&&(_=f(T.call(new e)))!==Object.prototype&&_.next&&(c(_,k,!0),n||"function"==typeof _[l]||i(_,l,d)),w&&O&&"values"!==O.name&&(j=!0,E=function(){return O.call(this)}),n&&!g||!p&&!j&&S[l]||i(S,l,E),s[t]=E,s[k]=d,b)if(m={values:w?E:x("values"),keys:v?E:x("keys"),entries:A},g)for(y in m)y in S||a(S,y,m[y]);else o(o.P+o.F*(p||j),t,m);return m}},{"./_export":38,"./_hide":43,"./_iter-create":53,"./_iterators":57,"./_library":58,"./_object-gpo":69,"./_redefine":78,"./_set-to-string-tag":81,"./_wks":97}],55:[function(e,t,r){var n=e("./_wks")("iterator"),o=!1;try{var a=[7][n]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var a=[7],i=a[n]();i.next=function(){return{done:r=!0}},a[n]=function(){return i},e(a)}catch(e){}return r}},{"./_wks":97}],56:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],57:[function(e,t,r){t.exports={}},{}],58:[function(e,t,r){t.exports=!0},{}],59:[function(e,t,r){var n=e("./_uid")("meta"),o=e("./_is-object"),a=e("./_has"),i=e("./_object-dp").f,s=0,u=Object.isExtensible||function(){return!0},c=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),f=function(e){i(e,n,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,n)){if(!u(e))return"F";if(!t)return"E";f(e)}return e[n].i},getWeak:function(e,t){if(!a(e,n)){if(!u(e))return!0;if(!t)return!1;f(e)}return e[n].w},onFreeze:function(e){return c&&l.NEED&&u(e)&&!a(e,n)&&f(e),e}}},{"./_fails":39,"./_has":42,"./_is-object":51,"./_object-dp":63,"./_uid":93}],60:[function(e,t,r){var n=e("./_global"),o=e("./_task").set,a=n.MutationObserver||n.WebKitMutationObserver,i=n.process,s=n.Promise,u="process"==e("./_cof")(i);t.exports=function(){var e,t,r,c=function(){var n,o;for(u&&(n=i.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(u)r=function(){i.nextTick(c)};else if(!a||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);r=function(){f.then(c)}}else r=function(){o.call(n,c)};else{var l=!0,p=document.createTextNode("");new a(c).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},{"./_cof":29,"./_global":41,"./_task":86}],61:[function(e,t,r){"use strict";var n=e("./_a-function");t.exports.f=function(e){return new function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)}(e)}},{"./_a-function":23}],62:[function(e,t,r){var n=e("./_an-object"),o=e("./_object-dps"),a=e("./_enum-bug-keys"),i=e("./_shared-key")("IE_PROTO"),s=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=a.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[a[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[i]=e):r=u(),void 0===t?r:o(r,t)}},{"./_an-object":26,"./_dom-create":35,"./_enum-bug-keys":36,"./_html":44,"./_object-dps":64,"./_shared-key":82}],63:[function(e,t,r){var n=e("./_an-object"),o=e("./_ie8-dom-define"),a=e("./_to-primitive"),i=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=a(t,!0),n(r),o)try{return i(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":26,"./_descriptors":34,"./_ie8-dom-define":45,"./_to-primitive":92}],64:[function(e,t,r){var n=e("./_object-dp"),o=e("./_an-object"),a=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){o(e);for(var r,i=a(t),s=i.length,u=0;s>u;)n.f(e,r=i[u++],t[r]);return e}},{"./_an-object":26,"./_descriptors":34,"./_object-dp":63,"./_object-keys":71}],65:[function(e,t,r){var n=e("./_object-pie"),o=e("./_property-desc"),a=e("./_to-iobject"),i=e("./_to-primitive"),s=e("./_has"),u=e("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?c:function(e,t){if(e=a(e),t=i(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},{"./_descriptors":34,"./_has":42,"./_ie8-dom-define":45,"./_object-pie":72,"./_property-desc":76,"./_to-iobject":89,"./_to-primitive":92}],66:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_object-gopn").f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(n(e))}},{"./_object-gopn":67,"./_to-iobject":89}],67:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},{"./_enum-bug-keys":36,"./_object-keys-internal":70}],68:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],69:[function(e,t,r){var n=e("./_has"),o=e("./_to-object"),a=e("./_shared-key")("IE_PROTO"),i=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},{"./_has":42,"./_shared-key":82,"./_to-object":91}],70:[function(e,t,r){var n=e("./_has"),o=e("./_to-iobject"),a=e("./_array-includes")(!1),i=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,s=o(e),u=0,c=[];for(r in s)r!=i&&n(s,r)&&c.push(r);for(;t.length>u;)n(s,r=t[u++])&&(~a(c,r)||c.push(r));return c}},{"./_array-includes":27,"./_has":42,"./_shared-key":82,"./_to-iobject":89}],71:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,o)}},{"./_enum-bug-keys":36,"./_object-keys-internal":70}],72:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],73:[function(e,t,r){var n=e("./_export"),o=e("./_core"),a=e("./_fails");t.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],i={};i[e]=t(r),n(n.S+n.F*a(function(){r(1)}),"Object",i)}},{"./_core":30,"./_export":38,"./_fails":39}],74:[function(e,t,r){t.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},{}],75:[function(e,t,r){var n=e("./_an-object"),o=e("./_is-object"),a=e("./_new-promise-capability");t.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=a.f(e);return(0,r.resolve)(t),r.promise}},{"./_an-object":26,"./_is-object":51,"./_new-promise-capability":61}],76:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],77:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},{"./_hide":43}],78:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":43}],79:[function(e,t,r){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],80:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_core"),a=e("./_object-dp"),i=e("./_descriptors"),s=e("./_wks")("species");t.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];i&&t&&!t[s]&&a.f(t,s,{configurable:!0,get:function(){return this}})}},{"./_core":30,"./_descriptors":34,"./_global":41,"./_object-dp":63,"./_wks":97}],81:[function(e,t,r){var n=e("./_object-dp").f,o=e("./_has"),a=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},{"./_has":42,"./_object-dp":63,"./_wks":97}],82:[function(e,t,r){var n=e("./_shared")("keys"),o=e("./_uid");t.exports=function(e){return n[e]||(n[e]=o(e))}},{"./_shared":83,"./_uid":93}],83:[function(e,t,r){var n=e("./_core"),o=e("./_global"),a=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:e("./_library")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":30,"./_global":41,"./_library":58}],84:[function(e,t,r){var n=e("./_an-object"),o=e("./_a-function"),a=e("./_wks")("species");t.exports=function(e,t){var r,i=n(e).constructor;return void 0===i||void 0==(r=n(i)[a])?t:o(r)}},{"./_a-function":23,"./_an-object":26,"./_wks":97}],85:[function(e,t,r){var n=e("./_to-integer"),o=e("./_defined");t.exports=function(e){return function(t,r){var a,i,s=String(o(t)),u=n(r),c=s.length;return u<0||u>=c?e?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===c||(i=s.charCodeAt(u+1))<56320||i>57343?e?s.charAt(u):a:e?s.slice(u,u+2):i-56320+(a-55296<<10)+65536}}},{"./_defined":33,"./_to-integer":88}],86:[function(e,t,r){var n,o,a,i=e("./_ctx"),s=e("./_invoke"),u=e("./_html"),c=e("./_dom-create"),f=e("./_global"),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,b=f.Dispatch,v=0,g={},m=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},y=function(e){m.call(e.data)};p&&d||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return g[++v]=function(){s("function"==typeof e?e:Function(e),t)},n(v),v},d=function(e){delete g[e]},"process"==e("./_cof")(l)?n=function(e){l.nextTick(i(m,e,1))}:b&&b.now?n=function(e){b.now(i(m,e,1))}:h?(a=(o=new h).port2,o.port1.onmessage=y,n=i(a.postMessage,a,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(e){f.postMessage(e+"","*")},f.addEventListener("message",y,!1)):n="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),m.call(e)}}:function(e){setTimeout(i(m,e,1),0)}),t.exports={set:p,clear:d}},{"./_cof":29,"./_ctx":32,"./_dom-create":35,"./_global":41,"./_html":44,"./_invoke":46}],87:[function(e,t,r){var n=e("./_to-integer"),o=Math.max,a=Math.min;t.exports=function(e,t){return(e=n(e))<0?o(e+t,0):a(e,t)}},{"./_to-integer":88}],88:[function(e,t,r){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},{}],89:[function(e,t,r){var n=e("./_iobject"),o=e("./_defined");t.exports=function(e){return n(o(e))}},{"./_defined":33,"./_iobject":47}],90:[function(e,t,r){var n=e("./_to-integer"),o=Math.min;t.exports=function(e){return e>0?o(n(e),9007199254740991):0}},{"./_to-integer":88}],91:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":33}],92:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":51}],93:[function(e,t,r){var n=0,o=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},{}],94:[function(e,t,r){var n=e("./_global").navigator;t.exports=n&&n.userAgent||""},{"./_global":41}],95:[function(e,t,r){var n=e("./_global"),o=e("./_core"),a=e("./_library"),i=e("./_wks-ext"),s=e("./_object-dp").f;t.exports=function(e){var t=o.Symbol||(o.Symbol=a?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},{"./_core":30,"./_global":41,"./_library":58,"./_object-dp":63,"./_wks-ext":96}],96:[function(e,t,r){r.f=e("./_wks")},{"./_wks":97}],97:[function(e,t,r){var n=e("./_shared")("wks"),o=e("./_uid"),a=e("./_global").Symbol,i="function"==typeof a;(t.exports=function(e){return n[e]||(n[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=n},{"./_global":41,"./_shared":83,"./_uid":93}],98:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),a=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||a[n(e)]}},{"./_classof":28,"./_core":30,"./_iterators":57,"./_wks":97}],99:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),a=e("./_iterators");t.exports=e("./_core").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||a.hasOwnProperty(n(t))}},{"./_classof":28,"./_core":30,"./_iterators":57,"./_wks":97}],100:[function(e,t,r){"use strict";var n=e("./_ctx"),o=e("./_export"),a=e("./_to-object"),i=e("./_iter-call"),s=e("./_is-array-iter"),u=e("./_to-length"),c=e("./_create-property"),f=e("./core.get-iterator-method");o(o.S+o.F*!e("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,o,l,p=a(e),d="function"==typeof this?this:Array,h=arguments.length,b=h>1?arguments[1]:void 0,v=void 0!==b,g=0,m=f(p);if(v&&(b=n(b,h>2?arguments[2]:void 0,2)),void 0==m||d==Array&&s(m))for(r=new d(t=u(p.length));t>g;g++)c(r,g,v?b(p[g],g):p[g]);else for(l=m.call(p),r=new d;!(o=l.next()).done;g++)c(r,g,v?i(l,b,[o.value,g],!0):o.value);return r.length=g,r}})},{"./_create-property":31,"./_ctx":32,"./_export":38,"./_is-array-iter":48,"./_iter-call":52,"./_iter-detect":55,"./_to-length":90,"./_to-object":91,"./core.get-iterator-method":98}],101:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),o=e("./_iter-step"),a=e("./_iterators"),i=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=i(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":24,"./_iter-define":54,"./_iter-step":56,"./_iterators":57,"./_to-iobject":89}],102:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{isInteger:e("./_is-integer")})},{"./_export":38,"./_is-integer":50}],103:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":38,"./_object-create":62}],104:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{is:e("./_same-value")})},{"./_export":38,"./_same-value":79}],105:[function(e,t,r){var n=e("./_to-object"),o=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return o(n(e))}})},{"./_object-keys":71,"./_object-sap":73,"./_to-object":91}],106:[function(e,t,r){},{}],107:[function(e,t,r){"use strict";var n,o,a,i,s=e("./_library"),u=e("./_global"),c=e("./_ctx"),f=e("./_classof"),l=e("./_export"),p=e("./_is-object"),d=e("./_a-function"),h=e("./_an-instance"),b=e("./_for-of"),v=e("./_species-constructor"),g=e("./_task").set,m=e("./_microtask")(),y=e("./_new-promise-capability"),_=e("./_perform"),x=e("./_user-agent"),k=e("./_promise-resolve"),w=u.TypeError,j=u.process,S=j&&j.versions,O=S&&S.v8||"",E=u.Promise,A="process"==f(j),T=function(){},P=o=y.f,Y=!!function(){try{var t=E.resolve(1),r=(t.constructor={})[e("./_wks")("species")]=function(e){e(T,T)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof r&&0!==O.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),D=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},M=function(e,t){if(!e._n){e._n=!0;var r=e._c;m(function(){for(var n=e._v,o=1==e._s,a=0,i=function(t){var r,a,i,s=o?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(o||(2==e._h&&F(e),e._h=1),!0===s?r=n:(f&&f.enter(),r=s(n),f&&(f.exit(),i=!0)),r===t.promise?c(w("Promise-chain cycle")):(a=D(r))?a.call(r,u,c):u(r)):c(n)}catch(e){f&&!i&&f.exit(),c(e)}};r.length>a;)i(r[a++]);e._c=[],e._n=!1,t&&!e._h&&L(e)})}},L=function(e){g.call(u,function(){var t,r,n,o=e._v,a=N(e);if(a&&(t=_(function(){A?j.emit("unhandledRejection",o,e):(r=u.onunhandledrejection)?r({promise:e,reason:o}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",o)}),e._h=A||N(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){g.call(u,function(){var t;A?j.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},I=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},R=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw w("Promise can't be resolved itself");(t=D(e))?m(function(){var n={_w:r,_d:!1};try{t.call(e,c(R,n,1),c(I,n,1))}catch(e){I.call(n,e)}}):(r._v=e,r._s=1,M(r,!1))}catch(e){I.call({_w:r,_d:!1},e)}}};Y||(E=function(e){h(this,E,"Promise","_h"),d(e),n.call(this);try{e(c(R,this,1),c(I,this,1))}catch(e){I.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e("./_redefine-all")(E.prototype,{then:function(e,t){var r=P(v(this,E));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=A?j.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&M(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n;this.promise=e,this.resolve=c(R,e,1),this.reject=c(I,e,1)},y.f=P=function(e){return e===E||e===i?new a(e):o(e)}),l(l.G+l.W+l.F*!Y,{Promise:E}),e("./_set-to-string-tag")(E,"Promise"),e("./_set-species")("Promise"),i=e("./_core").Promise,l(l.S+l.F*!Y,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(s||!Y),"Promise",{resolve:function(e){return k(s&&this===i?E:this,e)}}),l(l.S+l.F*!(Y&&e("./_iter-detect")(function(e){E.all(e).catch(T)})),"Promise",{all:function(e){var t=this,r=P(t),n=r.resolve,o=r.reject,a=_(function(){var r=[],a=0,i=1;b(e,!1,function(e){var s=a++,u=!1;r.push(void 0),i++,t.resolve(e).then(function(e){u||(u=!0,r[s]=e,--i||n(r))},o)}),--i||n(r)});return a.e&&o(a.v),r.promise},race:function(e){var t=this,r=P(t),n=r.reject,o=_(function(){b(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}})},{"./_a-function":23,"./_an-instance":25,"./_classof":28,"./_core":30,"./_ctx":32,"./_export":38,"./_for-of":40,"./_global":41,"./_is-object":51,"./_iter-detect":55,"./_library":58,"./_microtask":60,"./_new-promise-capability":61,"./_perform":74,"./_promise-resolve":75,"./_redefine-all":77,"./_set-species":80,"./_set-to-string-tag":81,"./_species-constructor":84,"./_task":86,"./_user-agent":94,"./_wks":97}],108:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":54,"./_string-at":85}],109:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_has"),a=e("./_descriptors"),i=e("./_export"),s=e("./_redefine"),u=e("./_meta").KEY,c=e("./_fails"),f=e("./_shared"),l=e("./_set-to-string-tag"),p=e("./_uid"),d=e("./_wks"),h=e("./_wks-ext"),b=e("./_wks-define"),v=e("./_enum-keys"),g=e("./_is-array"),m=e("./_an-object"),y=e("./_is-object"),_=e("./_to-iobject"),x=e("./_to-primitive"),k=e("./_property-desc"),w=e("./_object-create"),j=e("./_object-gopn-ext"),S=e("./_object-gopd"),O=e("./_object-dp"),E=e("./_object-keys"),A=S.f,T=O.f,P=j.f,Y=n.Symbol,D=n.JSON,M=D&&D.stringify,L=d("_hidden"),N=d("toPrimitive"),F={}.propertyIsEnumerable,I=f("symbol-registry"),R=f("symbols"),C=f("op-symbols"),G=Object.prototype,$="function"==typeof Y,z=n.QObject,q=!z||!z.prototype||!z.prototype.findChild,U=a&&c(function(){return 7!=w(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=A(G,t);n&&delete G[t],T(e,t,r),n&&e!==G&&T(G,t,n)}:T,J=function(e){var t=R[e]=w(Y.prototype);return t._k=e,t},B=$&&"symbol"==typeof Y.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Y},W=function(e,t,r){return e===G&&W(C,t,r),m(e),t=x(t,!0),m(r),o(R,t)?(r.enumerable?(o(e,L)&&e[L][t]&&(e[L][t]=!1),r=w(r,{enumerable:k(0,!1)})):(o(e,L)||T(e,L,k(1,{})),e[L][t]=!0),U(e,t,r)):T(e,t,r)},V=function(e,t){m(e);for(var r,n=v(t=_(t)),o=0,a=n.length;a>o;)W(e,r=n[o++],t[r]);return e},K=function(e){var t=F.call(this,e=x(e,!0));return!(this===G&&o(R,e)&&!o(C,e))&&(!(t||!o(this,e)||!o(R,e)||o(this,L)&&this[L][e])||t)},H=function(e,t){if(e=_(e),t=x(t,!0),e!==G||!o(R,t)||o(C,t)){var r=A(e,t);return!r||!o(R,t)||o(e,L)&&e[L][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=P(_(e)),n=[],a=0;r.length>a;)o(R,t=r[a++])||t==L||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===G,n=P(r?C:_(e)),a=[],i=0;n.length>i;)!o(R,t=n[i++])||r&&!o(G,t)||a.push(R[t]);return a};$||(s((Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(r){this===G&&t.call(C,r),o(this,L)&&o(this[L],e)&&(this[L][e]=!1),U(this,e,k(1,r))};return a&&q&&U(G,e,{configurable:!0,set:t}),J(e)}).prototype,"toString",function(){return this._k}),S.f=H,O.f=W,e("./_object-gopn").f=j.f=Q,e("./_object-pie").f=K,e("./_object-gops").f=Z,a&&!e("./_library")&&s(G,"propertyIsEnumerable",K,!0),h.f=function(e){return J(d(e))}),i(i.G+i.W+i.F*!$,{Symbol:Y});for(var X="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;X.length>ee;)d(X[ee++]);for(var te=E(d.store),re=0;te.length>re;)b(te[re++]);i(i.S+i.F*!$,"Symbol",{for:function(e){return o(I,e+="")?I[e]:I[e]=Y(e)},keyFor:function(e){if(!B(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){q=!0},useSimple:function(){q=!1}}),i(i.S+i.F*!$,"Object",{create:function(e,t){return void 0===t?w(e):V(w(e),t)},defineProperty:W,defineProperties:V,getOwnPropertyDescriptor:H,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),D&&i(i.S+i.F*(!$||c(function(){var e=Y();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=t=n[1],(y(t)||void 0!==e)&&!B(e))return g(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!B(t))return t}),n[1]=t,M.apply(D,n)}}),Y.prototype[N]||e("./_hide")(Y.prototype,N,Y.prototype.valueOf),l(Y,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},{"./_an-object":26,"./_descriptors":34,"./_enum-keys":37,"./_export":38,"./_fails":39,"./_global":41,"./_has":42,"./_hide":43,"./_is-array":49,"./_is-object":51,"./_library":58,"./_meta":59,"./_object-create":62,"./_object-dp":63,"./_object-gopd":65,"./_object-gopn":67,"./_object-gopn-ext":66,"./_object-gops":68,"./_object-keys":71,"./_object-pie":72,"./_property-desc":76,"./_redefine":78,"./_set-to-string-tag":81,"./_shared":83,"./_to-iobject":89,"./_to-primitive":92,"./_uid":93,"./_wks":97,"./_wks-define":95,"./_wks-ext":96}],110:[function(e,t,r){"use strict";var n=e("./_export"),o=e("./_core"),a=e("./_global"),i=e("./_species-constructor"),s=e("./_promise-resolve");n(n.P+n.R,"Promise",{finally:function(e){var t=i(this,o.Promise||a.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},{"./_core":30,"./_export":38,"./_global":41,"./_promise-resolve":75,"./_species-constructor":84}],111:[function(e,t,r){"use strict";var n=e("./_export"),o=e("./_new-promise-capability"),a=e("./_perform");n(n.S,"Promise",{try:function(e){var t=o.f(this),r=a(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},{"./_export":38,"./_new-promise-capability":61,"./_perform":74}],112:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":95}],113:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":95}],114:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),o=e("./_hide"),a=e("./_iterators"),i=e("./_wks")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],f=n[c],l=f&&f.prototype;l&&!l[i]&&o(l,i,c),a[c]=a.Array}},{"./_global":41,"./_hide":43,"./_iterators":57,"./_wks":97,"./es6.array.iterator":101}],115:[function(e,t,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),o)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},{"./runtime":116}],116:[function(e,t,r){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag",c="object"==typeof t,f=e.regeneratorRuntime;if(f)c&&(t.exports=f);else{(f=e.regeneratorRuntime=c?t.exports:{}).wrap=_;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",b={},v={};v[i]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(Y([])));m&&m!==n&&o.call(m,i)&&(v=m);var y=j.prototype=k.prototype=Object.create(v);w.prototype=y.constructor=j,j.constructor=w,j[u]=w.displayName="GeneratorFunction",f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(y),e},f.awrap=function(e){return{__await:e}},S(O.prototype),O.prototype[s]=function(){return this},f.AsyncIterator=O,f.async=function(e,t,r,n){var o=new O(_(e,t,r,n));return f.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(y),y[u]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},f.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},f.values=Y,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return s.type="throw",s.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:Y(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),b}}}function _(e,t,r,n){var o=t&&t.prototype instanceof k?t:k,a=Object.create(o.prototype),i=new P(n||[]);return a._invoke=function(e,t,r){var n=l;return function(o,a){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw a;return D()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=E(i,r);if(s){if(s===b)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=x(e,t,r);if("normal"===u.type){if(n=r.done?h:p,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(e,r,i),a}function x(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function k(){}function w(){}function j(){}function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function O(e){var t;this._invoke=function(r,n){function a(){return new Promise(function(t,a){!function t(r,n,a,i){var s=x(e[r],e,n);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(c).then(function(e){u.value=e,a(u)},i)}i(s.arg)}(r,n,t,a)})}return t=t?t.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,E(e,t),"throw"===t.method))return b;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var o=x(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,b;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,b):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,b)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function Y(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}return{next:D}}function D(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},{}]},{},[1])(1)});;(function() { - function indentLine(str,length) { - if (length <= 0) { - return str; - } - var i = (new Array(length)).join(" "); - str = str.replace(/^\s*/,i); - return str; - } - function formatExpression(str) { - var length = str.length; - var start = 0; - var inString = false; - var inBox = false; - var quoteChar; - var list = []; - var stack = []; - var frame; - var v; - var matchingBrackets = { - "(":")", - "[":"]", - "{":"}" - } - for (var i=0;i<length;i++) { - var c = str[i]; - if (!inString) { - if (c === "'" || c === '"') { - inString = true; - quoteChar = c; - frame = {type:"string",pos:i}; - list.push(frame); - stack.push(frame); - } else if (c === ";") { - frame = {type:";",pos:i}; - list.push(frame); - } else if (c === ",") { - frame = {type:",",pos:i}; - list.push(frame); - } else if (/[\(\[\{]/.test(c)) { - frame = {type:"open-block",char:c,pos:i}; - list.push(frame); - stack.push(frame); - } else if (/[\}\)\]]/.test(c)) { - var oldFrame = stack.pop(); - if (matchingBrackets[oldFrame.char] !== c) { - //console.log("Stack frame mismatch",c,"at",i,"expected",matchingBrackets[oldFrame.char],"from",oldFrame.pos); - return str; - } - //console.log("Closing",c,"at",i,"compare",oldFrame.type,oldFrame.pos); - oldFrame.width = i-oldFrame.pos; - frame = {type:"close-block",pos:i,char:c,width:oldFrame.width} - list.push(frame); - } - } else { - if (c === quoteChar) { - // Next char must be a ] - inString = false; - stack.pop(); - } - } - - } - // console.log(stack); - var result = str; - var indent = 0; - var offset = 0; - var pre,post,indented; - var longStack = []; - list.forEach(function(f) { - if (f.type === ";" || f.type === ",") { - if (longStack[longStack.length-1]) { - pre = result.substring(0,offset+f.pos+1); - post = result.substring(offset+f.pos+1); - indented = indentLine(post,indent); - result = pre+"\n"+indented; - offset += indented.length-post.length+1; - } - } else if (f.type === "open-block") { - if (f.width > 30) { - longStack.push(true); - indent += 4; - pre = result.substring(0,offset+f.pos+1); - post = result.substring(offset+f.pos+1); - indented = indentLine(post,indent); - result = pre+"\n"+indented; - offset += indented.length-post.length+1; - } else { - longStack.push(false); - } - } else if (f.type === "close-block") { - if (f.width > 30) { - indent -= 4; - pre = result.substring(0,offset+f.pos); - post = result.substring(offset+f.pos); - indented = indentLine(post,indent); - result = pre+"\n"+indented; - offset += indented.length-post.length+1; - } - longStack.pop(); - } - }) - //console.log(result); - return result; - } - - jsonata.format = formatExpression; - jsonata.functions = - { - '$abs':{ args:[ 'number' ]}, - '$append':{ args:[ 'array1', 'array2' ]}, - '$average':{ args:[ 'array' ]}, - '$base64decode':{ args:[ ]}, - '$base64encode':{ args:[ ]}, - '$boolean':{ args:[ 'arg' ]}, - '$ceil':{ args:[ 'number' ]}, - '$contains':{ args:[ 'str', 'pattern' ]}, - '$count':{ args:[ 'array' ]}, - '$each':{ args:[ 'object', 'function' ]}, - '$env': { args:[ 'arg' ]}, - '$exists':{ args:[ 'arg' ]}, - '$filter':{ args:[ 'array', 'function' ]}, - '$floor':{ args:[ 'number' ]}, - '$flowContext': {args:['string']}, - '$formatBase': {args:['number','radix']}, - '$formatNumber': {args:['number', 'picture', 'options']}, - '$fromMillis': {args:['number']}, - '$globalContext': {args:['string']}, - '$join':{ args:[ 'array', 'separator' ]}, - '$keys':{ args:[ 'object' ]}, - '$length':{ args:[ 'str' ]}, - '$lookup':{ args:[ 'object', 'key' ]}, - '$lowercase':{ args:[ 'str' ]}, - '$map':{ args:[ 'array', 'function' ]}, - '$match':{ args:[ 'str', 'pattern', 'limit' ]}, - '$max':{ args:[ 'array' ]}, - '$merge':{ args:[ 'array' ]}, - '$millis':{ args:[ ]}, - '$min':{ args:[ 'array' ]}, - '$not':{ args:[ 'arg' ]}, - '$now':{ args:[ ]}, - '$number':{ args:[ 'arg' ]}, - '$pad': {args:['str', 'width','char']}, - '$power':{ args:[ 'base', 'exponent' ]}, - '$random':{ args:[ ]}, - '$reduce':{ args:[ 'array', 'function' , 'init' ]}, - '$replace':{ args:[ 'str', 'pattern', 'replacement', 'limit' ]}, - '$reverse':{ args:[ 'array' ]}, - '$round':{ args:[ 'number', 'precision' ]}, - '$shuffle':{ args:[ 'array' ]}, - '$sift':{ args:[ 'object', 'function' ]}, - '$sort':{ args:[ 'array', 'function' ]}, - '$split':{ args:[ 'str', 'separator', 'limit' ]}, - '$spread':{ args:[ 'object' ]}, - '$sqrt':{ args:[ 'number' ]}, - '$string':{ args:[ 'arg' ]}, - '$substring':{ args:[ 'str', 'start', 'length' ]}, - '$substringAfter':{ args:[ 'str', 'chars' ]}, - '$substringBefore':{ args:[ 'str', 'chars' ]}, - '$sum':{ args:[ 'array' ]}, - '$toMillis':{args:['timestamp']}, // <------------- - '$trim':{ args:[ 'str' ]}, - '$uppercase':{ args:[ 'str' ]}, - '$zip':{ args:[ 'array1' ]} - } - jsonata.getFunctionSnippet = function(fn) { - var snippetText = ""; - if (jsonata.functions.hasOwnProperty(fn)) { - var def = jsonata.functions[fn]; - snippetText = "\\"+fn+"("; - if (def.args) { - snippetText += def.args.map(function(a,i) { return "${"+(i+1)+":"+a+"}"}).join(", "); - } - snippetText += ")\n" - } - return snippetText; - } -})(); diff --git a/packages/node_modules/@node-red/editor/public/vendor/vendor.css b/packages/node_modules/@node-red/editor/public/vendor/vendor.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/node_modules/@node-red/editor/public/vendor/vendor.js b/packages/node_modules/@node-red/editor/public/vendor/vendor.js deleted file mode 100644 index 3ccfee0cd..000000000 --- a/packages/node_modules/@node-red/editor/public/vendor/vendor.js +++ /dev/null @@ -1,39 +0,0 @@ -/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; - -return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){ -return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m}); -;/*! -* Bootstrap.js by @fat & @mdo -* Copyright 2013 Twitter, Inc. -* http://www.apache.org/licenses/LICENSE-2.0.txt -*/ -!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);;/*! jQuery UI - v1.10.3 - 2013-08-17 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js -* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ - -(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=t.pageX,l=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(document).scrollTop()<s.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(document).scrollLeft()<s.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),s=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(t,i){var s,n,a,o,r,h,l,u,c,d,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,y=b+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,r-m>v||g>h+m||l-m>y||b>u+m||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===s.options.scope&&t.accept.call(t.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n,a,o=(e.positionAbs||e.position.absolute).left,r=o+e.helperProportions.width,h=(e.positionAbs||e.position.absolute).top,l=h+e.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return o>=u&&c>=r&&h>=d&&p>=l;case"intersect":return o+e.helperProportions.width/2>u&&c>r-e.helperProportions.width/2&&h+e.helperProportions.height/2>d&&p>l-e.helperProportions.height/2;case"pointer":return n=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,a=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(a,d,i.proportions.height)&&t(n,u,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(o>=u&&c>=o||r>=u&&c>=r||u>o&&r>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions.height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions={width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight})}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===n}),a.length&&(s=e.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery);(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery);(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):undefined}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-t(document).scrollTop()<o.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed)),e.pageX-t(document).scrollLeft()<o.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>a&&o>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&s||"left"===a&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,a,o=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&r.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){o.push(this)});return t(o)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(u.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=u.length-1;i>=0;i--)for(o=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),c.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,a,o,r,h,l,c,u,d,p,f=null,m=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],m=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],a=this.items.length-1;a>=0;a--)t.contains(this.containers[m].element[0],this.items[a].item[0])&&this.items[a].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height))&&(u=this.items[a].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][l]-c)&&(d=!0,u+=this.items[a][l]),o>Math.abs(u-c)&&(o=Math.abs(u-c),r=this.items[a],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[m].element,!0),this._trigger("change",s,this._uiHash()),this.containers[m]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,a=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),a=n.attr("id");s||(s=o+"-header-"+e,i.attr("id",s)),a||(a=o+"-panel-"+e,n.attr("id",a)),i.attr("aria-controls",a),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=a.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var a,o,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(i,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,o,p):t.animate(s,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})})(jQuery);(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})})(jQuery);(function(t){var e,i,s,n,a="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var e=o.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,o.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+o+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(a.inline?e.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var a,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),a=this._newInst(t(e),n),a.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[o?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,a=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,a,o){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),n(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,a){var r,o,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(r=s||{},"string"==typeof s&&(r={},r[s]=a),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,r),null!==h&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,a=t.datepicker._getInst(e.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv),n[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),i=t.datepicker._get(a,"onSelect"),i?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,a=t.datepicker._getInst(i.target);return t.datepicker._get(a,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,a,r,o,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),a=s?s.apply(e,[e,i]):{},a!==!1&&(n(i.settings,a),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),o={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),o=t.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",r*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,a,o=this._curInst;!o||e&&o!==t.data(e,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[i]||t.effects[i])?o.dpDiv.hide(i,t.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var a,r,o,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,_=-1,b=-1,y=!1,x=function(t){var e=i.length>a+1&&i.charAt(a+1)===t;return e&&a++,e},k=function(t){var e=x(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),a=s.substring(l).match(n);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},w=function(i,n,a){var r=-1,o=t.map(x(i)?a:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=i[0],l+=n.length,!1):e}),-1!==r)return r+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(a))throw"Unexpected literal at position "+l;l++};for(a=0;i.length>a;a++)if(y)"'"!==i.charAt(a)||x("'")?D():y=!1;else switch(i.charAt(a)){case"d":_=k("d");break;case"D":w("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=w("M",f,m);break;case"y":g=k("y");break;case"@":h=new Date(k("@")),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":x("'")?D():y=!0;break;default:D()}if(s.length>l&&(o=s.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(v=1,_=b;;){if(r=this._getDaysInMonth(g,v-1),r>=_)break;v++,_-=r}if(h=this._daylightSavingAdjust(new Date(g,v-1,_)),h.getFullYear()!==g||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),r,o);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,r=this._getFormatConfig(t);try{a=this.parseDate(i,s,r)||n}catch(o){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},a=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,r,o,h,l,c,u,d,p,f,m,g,v,_,b,y,x,k,w,D,T,C,M,S,N,I,P,A,z,H,E,F,O,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),J=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),Q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),q=1!==Q[0]||1!==Q[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),$=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),$)for(e=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-Q[0]*Q[1]+1,$.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?X:L,r=K?this.formatDate(r,o,this._getFormatConfig(t)):r,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;Q[0]>k;k++){for(w="",this.maxRows=4,D=0;Q[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),C=" ui-corner-all",M="",q){if(M+="<div class='ui-datepicker-group",Q[1]>1)switch(D){case 0:M+=" ui-datepicker-group-first",C=" ui-corner-"+(Y?"right":"left");break;case Q[1]-1:M+=" ui-datepicker-group-last",C=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",C=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===k?Y?a:s:"")+(/all|right/.test(C)&&0===k?Y?s:a:"")+this._generateMonthYearHeader(t,Z,te,G,$,k>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+c)%7,S+="<th"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[N]+"'>"+p[N]+"</span></th>";for(M+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((P+I)/7),z=q?this.maxRows>A?this.maxRows:A:A,this.maxRows=z,H=this._daylightSavingAdjust(new Date(te,Z,1-P)),E=0;z>E;E++){for(M+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(H)+"</td>":"",x=0;7>x;x++)O=g?g.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,j=W&&!_||!O[0]||G&&G>H||$&&H>$,F+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(H.getTime()===X.getTime()?" "+this._currentClass:"")+(H.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===L.getTime()?" ui-state-highlight":"")+(H.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=F+"</tr>"}Z++,Z>11&&(Z=0,te++),M+="</tbody></table>"+(q?"</div>"+(Q[0]>0&&D===Q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=M}y+=w}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,r,o){var h,l,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>");y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10); -return isNaN(e)?d:e},f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!a&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),r=null,o=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!r||e.getFullYear()>=r)&&(!o||o>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"})(jQuery);(function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(a))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,a){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(a))}}).css("position",a)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,a=!1,o={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(a=!0),t in i&&(o[t]=s)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),u=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),u={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,u))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[c[l].cache]=o[c[l].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,o,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),a=c[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],l=s[a],c=u[n.type]||{};null!==l&&(null===o?h[a]=l:(c.mod&&(l-o>c.mod/2?o+=c.mod:o-l>c.mod/2&&(o-=c.mod)),h[a]=i((l-o)*e+o,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[o]=d,n):l(d)},f(a,function(e,i){l.fn[e]||(l.fn[e]=function(n){var a,o=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var h=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,m,g)),l&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g).animate(a,m,g),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),l&&(n.css(d,0),n.css(p,a/2)),f[d]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var a,o,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(h=g.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=g.left+o*v,l=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?l*v:0),top:h+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(g,m,e.easing).animate(v,m,e.easing,function(){l&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=o.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(l),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=t.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,m[d]=(p?"+=":"-=")+2*h,g[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(m,u,e.easing).animate(g,u,e.easing);n.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);;/*! - * jQuery UI Touch Punch 0.2.3 - * - * Copyright 2011–2014, Dave Furfero - * Dual licensed under the MIT or GPL Version 2 licenses. - * - * Depends: - * jquery.ui.widget.js - * jquery.ui.mouse.js - */ -!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);;/** - * marked - a markdown parser - * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) - * https://github.com/chjj/marked - */ -(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].split(/ *\| */)}this.tokens.push(item);continue}if(cap=this.rules.lheading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[2]==="="?1:2,text:cap[1]});continue}if(cap=this.rules.hr.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"hr"});continue}if(cap=this.rules.blockquote.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"blockquote_start"});cap=cap[0].replace(/^ *> ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i<l;i++){item=cap[i];space=item.length;item=item.replace(/^ *([*+-]|\d+\.) +/,"");if(~item.indexOf("\n ")){space-=item.length;item=!this.options.pedantic?item.replace(new RegExp("^ {1,"+space+"}","gm"),""):item.replace(/^ {1,4}/gm,"")}if(this.options.smartLists&&i!==l-1){b=block.bullet.exec(cap[i+1])[0];if(bull!==b&&!(bull.length>1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */)}this.tokens.push(item);continue}if(top&&(cap=this.rules.paragraph.exec(src))){src=src.substring(cap[0].length);this.tokens.push({type:"paragraph",text:cap[1].charAt(cap[1].length-1)==="\n"?cap[1].slice(0,-1):cap[1]});continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"text",text:cap[0]});continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return this.tokens};var inline={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};inline._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;inline._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^<a /i.test(cap[0])){this.inLink=true}else if(this.inLink&&/^<\/a>/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i<l;i++){ch=text.charCodeAt(i);if(Math.random()>.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"<pre><code>"+(escaped?code:escape(code,true))+"\n</code></pre>"}return'<pre><code class="'+this.options.langPrefix+escape(lang,true)+'">'+(escaped?code:escape(code,true))+"\n</code></pre>\n"};Renderer.prototype.blockquote=function(quote){return"<blockquote>\n"+quote+"</blockquote>\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"<h"+level+' id="'+this.options.headerPrefix+raw.toLowerCase().replace(/[^\w]+/g,"-")+'">'+text+"</h"+level+">\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"</"+type+">\n"};Renderer.prototype.listitem=function(text){return"<li>"+text+"</li>\n"};Renderer.prototype.paragraph=function(text){return"<p>"+text+"</p>\n"};Renderer.prototype.table=function(header,body){return"<table>\n"+"<thead>\n"+header+"</thead>\n"+"<tbody>\n"+body+"</tbody>\n"+"</table>\n"};Renderer.prototype.tablerow=function(content){return"<tr>\n"+content+"</tr>\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"</"+type+">\n"};Renderer.prototype.strong=function(text){return"<strong>"+text+"</strong>"};Renderer.prototype.em=function(text){return"<em>"+text+"</em>"};Renderer.prototype.codespan=function(text){return"<code>"+text+"</code>"};Renderer.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"};Renderer.prototype.del=function(text){return"<del>"+text+"</del>"};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='<a href="'+href+'"';if(title){out+=' title="'+title+'"'}out+=">"+text+"</a>";return out};Renderer.prototype.image=function(href,title,text){var out='<img src="'+href+'" alt="'+text+'"';if(title){out+=' title="'+title+'"'}out+=this.options.xhtml?"/>":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i<this.token.header.length;i++){flags={header:true,align:this.token.align[i]};cell+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:true,align:this.token.align[i]})}header+=this.renderer.tablerow(cell);for(i=0;i<this.token.cells.length;i++){row=this.token.cells[i];cell="";for(j=0;j<row.length;j++){cell+=this.renderer.tablecell(this.inline.output(row[j]),{header:false,align:this.token.align[j]})}body+=this.renderer.tablerow(cell)}return this.renderer.table(header,body)}case"blockquote_start":{var body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return this.renderer.blockquote(body)}case"list_start":{var body="",ordered=this.token.ordered;while(this.next().type!=="list_end"){body+=this.tok()}return this.renderer.list(body,ordered)}case"list_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return this.renderer.listitem(body)}case"loose_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return this.renderer.listitem(body)}case"html":{var html=!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text;return this.renderer.html(html)}case"paragraph":{return this.renderer.paragraph(this.inline.output(this.token.text))}case"text":{return this.renderer.paragraph(this.parseText())}}};function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;i<arguments.length;i++){target=arguments[i];for(key in target){if(Object.prototype.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return obj}function marked(src,opt,callback){if(callback||typeof opt==="function"){if(!callback){callback=opt;opt=null}opt=merge({},marked.defaults,opt||{});var highlight=opt.highlight,tokens,pending,i=0;try{tokens=Lexer.lex(src,opt)}catch(e){return callback(e)}pending=tokens.length;var done=function(err){if(err){opt.highlight=highlight;return callback(err)}var out;try{out=Parser.parse(tokens,opt)}catch(e){err=e}opt.highlight=highlight;return err?callback(err):callback(null,out)};if(!highlight||highlight.length<3){return done()}delete opt.highlight;if(!pending)return done();for(;i<tokens.length;i++){(function(token){if(token.type!=="code"){return--pending||done()}return highlight(token.text,token.lang,function(err,code){if(err)return done(err);if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease report this to https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An error occured:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());;(function(){function t(t){return t.target}function n(t){return t.source}function e(t,n){try{for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}catch(r){t.prototype=n}}function r(t){for(var n=-1,e=t.length,r=[];e>++n;)r.push(t[n]);return r}function i(t){return Array.prototype.slice.call(t)}function u(){}function a(t){return t}function o(){return!0}function c(t){return"function"==typeof t?t:function(){return t}}function l(t,n,e){return function(){var r=e.apply(n,arguments);return arguments.length?t:r}}function s(t){return null!=t&&!isNaN(t)}function f(t){return t.length}function h(t){return t.trim().replace(/\s+/g," ")}function d(t){for(var n=1;t*n%1;)n*=10;return n}function g(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function p(t){return t.responseText}function m(t){return JSON.parse(t.responseText)}function v(t){var n=document.createRange();return n.selectNode(document.body),n.createContextualFragment(t.responseText)}function y(t){return t.responseXML}function M(){}function b(t){function n(){for(var n,r=e,i=-1,u=r.length;u>++i;)(n=r[i].on)&&n.apply(this,arguments);return t}var e=[],r=new u;return n.on=function(n,i){var u,a=r.get(n);return 2>arguments.length?a&&a.on:(a&&(a.on=null,e=e.slice(0,u=e.indexOf(a)).concat(e.slice(u+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function x(t,n){return n-(t?1+Math.floor(Math.log(t+Math.pow(10,1+Math.floor(Math.log(t)/Math.LN10)-n))/Math.LN10):1)}function _(t){return t+""}function w(t,n){var e=Math.pow(10,3*Math.abs(8-n));return{scale:n>8?function(t){return t/e}:function(t){return t*e},symbol:t}}function S(t){return function(n){return 0>=n?0:n>=1?1:t(n)}}function k(t){return function(n){return 1-t(1-n)}}function E(t){return function(n){return.5*(.5>n?t(2*n):2-t(2-2*n))}}function A(t){return t*t}function N(t){return t*t*t}function T(t){if(0>=t)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(.5>t?e:3*(t-n)+e-.75)}function q(t){return function(n){return Math.pow(n,t)}}function C(t){return 1-Math.cos(t*Ru/2)}function z(t){return Math.pow(2,10*(t-1))}function D(t){return 1-Math.sqrt(1-t*t)}function L(t,n){var e;return 2>arguments.length&&(n=.45),arguments.length?e=n/(2*Ru)*Math.asin(1/t):(t=1,e=n/4),function(r){return 1+t*Math.pow(2,10*-r)*Math.sin(2*(r-e)*Ru/n)}}function F(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}}function H(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function R(){d3.event.stopPropagation(),d3.event.preventDefault()}function P(){for(var t,n=d3.event;t=n.sourceEvent;)n=t;return n}function j(t){for(var n=new M,e=0,r=arguments.length;r>++e;)n[arguments[e]]=b(n);return n.of=function(e,r){return function(i){try{var u=i.sourceEvent=d3.event;i.target=t,d3.event=i,n[i.type].apply(e,r)}finally{d3.event=u}}},n}function O(t){var n=[t.a,t.b],e=[t.c,t.d],r=U(n),i=Y(n,e),u=U(I(e,n,-i))||0;n[0]*e[1]<e[0]*n[1]&&(n[0]*=-1,n[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(n[1],n[0]):Math.atan2(-e[0],e[1]))*Ou,this.translate=[t.e,t.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*Ou:0}function Y(t,n){return t[0]*n[0]+t[1]*n[1]}function U(t){var n=Math.sqrt(Y(t,t));return n&&(t[0]/=n,t[1]/=n),n}function I(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}function V(t){return"transform"==t?d3.interpolateTransform:d3.interpolate}function X(t,n){return n=n-(t=+t)?1/(n-t):0,function(e){return(e-t)*n}}function Z(t,n){return n=n-(t=+t)?1/(n-t):0,function(e){return Math.max(0,Math.min(1,(e-t)*n))}}function B(){}function $(t,n,e){return new J(t,n,e)}function J(t,n,e){this.r=t,this.g=n,this.b=e}function G(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function K(t,n,e){var r,i,u,a=0,o=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(nn(i[0]),nn(i[1]),nn(i[2]))}return(u=aa.get(t))?n(u.r,u.g,u.b):(null!=t&&"#"===t.charAt(0)&&(4===t.length?(a=t.charAt(1),a+=a,o=t.charAt(2),o+=o,c=t.charAt(3),c+=c):7===t.length&&(a=t.substring(1,3),o=t.substring(3,5),c=t.substring(5,7)),a=parseInt(a,16),o=parseInt(o,16),c=parseInt(c,16)),n(a,o,c))}function W(t,n,e){var r,i,u=Math.min(t/=255,n/=255,e/=255),a=Math.max(t,n,e),o=a-u,c=(a+u)/2;return o?(i=.5>c?o/(a+u):o/(2-a-u),r=t==a?(n-e)/o+(e>n?6:0):n==a?(e-t)/o+2:(t-n)/o+4,r*=60):i=r=0,en(r,i,c)}function Q(t,n,e){t=tn(t),n=tn(n),e=tn(e);var r=gn((.4124564*t+.3575761*n+.1804375*e)/sa),i=gn((.2126729*t+.7151522*n+.072175*e)/fa),u=gn((.0193339*t+.119192*n+.9503041*e)/ha);return ln(116*i-16,500*(r-i),200*(i-u))}function tn(t){return.04045>=(t/=255)?t/12.92:Math.pow((t+.055)/1.055,2.4)}function nn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}function en(t,n,e){return new rn(t,n,e)}function rn(t,n,e){this.h=t,this.s=n,this.l=e}function un(t,n,e){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?u+(a-u)*t/60:180>t?a:240>t?u+(a-u)*(240-t)/60:u}function i(t){return Math.round(255*r(t))}var u,a;return t%=360,0>t&&(t+=360),n=0>n?0:n>1?1:n,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+n):e+n-e*n,u=2*e-a,$(i(t+120),i(t),i(t-120))}function an(t,n,e){return new on(t,n,e)}function on(t,n,e){this.h=t,this.c=n,this.l=e}function cn(t,n,e){return ln(e,Math.cos(t*=ju)*n,Math.sin(t)*n)}function ln(t,n,e){return new sn(t,n,e)}function sn(t,n,e){this.l=t,this.a=n,this.b=e}function fn(t,n,e){var r=(t+16)/116,i=r+n/500,u=r-e/200;return i=dn(i)*sa,r=dn(r)*fa,u=dn(u)*ha,$(pn(3.2404542*i-1.5371385*r-.4985314*u),pn(-.969266*i+1.8760108*r+.041556*u),pn(.0556434*i-.2040259*r+1.0572252*u))}function hn(t,n,e){return an(180*(Math.atan2(e,n)/Ru),Math.sqrt(n*n+e*e),t)}function dn(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function gn(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function pn(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function mn(t){return Iu(t,Ma),t}function vn(t){return function(){return ga(t,this)}}function yn(t){return function(){return pa(t,this)}}function Mn(t,n){function e(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,n)}function u(){this.setAttributeNS(t.space,t.local,n)}function a(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}function o(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}return t=d3.ns.qualify(t),null==n?t.local?r:e:"function"==typeof n?t.local?o:a:t.local?u:i}function bn(t){return RegExp("(?:^|\\s+)"+d3.requote(t)+"(?:\\s+|$)","g")}function xn(t,n){function e(){for(var e=-1;i>++e;)t[e](this,n)}function r(){for(var e=-1,r=n.apply(this,arguments);i>++e;)t[e](this,r)}t=t.trim().split(/\s+/).map(_n);var i=t.length;return"function"==typeof n?r:e}function _n(t){var n=bn(t);return function(e,r){if(i=e.classList)return r?i.add(t):i.remove(t);var i=e.className,u=null!=i.baseVal,a=u?i.baseVal:i;r?(n.lastIndex=0,n.test(a)||(a=h(a+" "+t),u?i.baseVal=a:e.className=a)):a&&(a=h(a.replace(n," ")),u?i.baseVal=a:e.className=a)}}function wn(t,n,e){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,n,e)}function u(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}return null==n?r:"function"==typeof n?u:i}function Sn(t,n){function e(){delete this[t]}function r(){this[t]=n}function i(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}return null==n?e:"function"==typeof n?i:r}function kn(t){return{__data__:t}}function En(t){return function(){return ya(this,t)}}function An(t){return arguments.length||(t=d3.ascending),function(n,e){return t(n&&n.__data__,e&&e.__data__)}}function Nn(t,n,e){function r(){var n=this[u];n&&(this.removeEventListener(t,n,n.$),delete this[u])}function i(){function i(t){var e=d3.event;d3.event=t,o[0]=a.__data__;try{n.apply(a,o)}finally{d3.event=e}}var a=this,o=Yu(arguments);r.call(this),this.addEventListener(t,this[u]=i,i.$=e),i._=n}var u="__on"+t,a=t.indexOf(".");return a>0&&(t=t.substring(0,a)),n?i:r}function Tn(t,n){for(var e=0,r=t.length;r>e;e++)for(var i,u=t[e],a=0,o=u.length;o>a;a++)(i=u[a])&&n(i,a,e);return t}function qn(t){return Iu(t,xa),t}function Cn(t,n){return Iu(t,wa),t.id=n,t}function zn(t,n,e,r){var i=t.__transition__||(t.__transition__={active:0,count:0}),a=i[e];if(!a){var o=r.time;return a=i[e]={tween:new u,event:d3.dispatch("start","end"),time:o,ease:r.ease,delay:r.delay,duration:r.duration},++i.count,d3.timer(function(r){function u(r){return i.active>e?l():(i.active=e,h.start.call(t,s,n),a.tween.forEach(function(e,r){(r=r.call(t,s,n))&&p.push(r)}),c(r)||d3.timer(c,0,o),1)}function c(r){if(i.active!==e)return l();for(var u=(r-d)/g,a=f(u),o=p.length;o>0;)p[--o].call(t,a);return u>=1?(l(),h.end.call(t,s,n),1):void 0}function l(){return--i.count?delete i[e]:delete t.__transition__,1}var s=t.__data__,f=a.ease,h=a.event,d=a.delay,g=a.duration,p=[];return r>=d?u(r):d3.timer(u,d,o),1},0,o),a}}function Dn(t){return null==t&&(t=""),function(){this.textContent=t}}function Ln(t,n,e,r){var i=t.id;return Tn(t,"function"==typeof e?function(t,u,a){t.__transition__[i].tween.set(n,r(e.call(t,t.__data__,u,a)))}:(e=r(e),function(t){t.__transition__[i].tween.set(n,e)}))}function Fn(){for(var t,n=Date.now(),e=qa;e;)t=n-e.then,t>=e.delay&&(e.flush=e.callback(t)),e=e.next;var r=Hn()-n;r>24?(isFinite(r)&&(clearTimeout(Aa),Aa=setTimeout(Fn,r)),Ea=0):(Ea=1,Ca(Fn))}function Hn(){for(var t=null,n=qa,e=1/0;n;)n.flush?(delete Ta[n.callback.id],n=t?t.next=n.next:qa=n.next):(e=Math.min(e,n.then+n.delay),n=(t=n).next);return e}function Rn(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>za&&(window.scrollX||window.scrollY)){e=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=e[0][0].getScreenCTM();za=!(i.f||i.e),e.remove()}return za?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function Pn(){}function jn(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function On(t){return t.rangeExtent?t.rangeExtent():jn(t.range())}function Yn(t,n){var e,r=0,i=t.length-1,u=t[r],a=t[i];return u>a&&(e=r,r=i,i=e,e=u,u=a,a=e),(n=n(a-u))&&(t[r]=n.floor(u),t[i]=n.ceil(a)),t}function Un(){return Math}function In(t,n,e,r){function i(){var i=Math.min(t.length,n.length)>2?Gn:Jn,c=r?Z:X;return a=i(t,n,c,e),o=i(n,t,c,d3.interpolate),u}function u(t){return a(t)}var a,o;return u.invert=function(t){return o(t)},u.domain=function(n){return arguments.length?(t=n.map(Number),i()):t},u.range=function(t){return arguments.length?(n=t,i()):n},u.rangeRound=function(t){return u.range(t).interpolate(d3.interpolateRound)},u.clamp=function(t){return arguments.length?(r=t,i()):r},u.interpolate=function(t){return arguments.length?(e=t,i()):e},u.ticks=function(n){return Bn(t,n)},u.tickFormat=function(n){return $n(t,n)},u.nice=function(){return Yn(t,Xn),i()},u.copy=function(){return In(t,n,e,r)},i()}function Vn(t,n){return d3.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Xn(t){return t=Math.pow(10,Math.round(Math.log(t)/Math.LN10)-1),t&&{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}}function Zn(t,n){var e=jn(t),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),u=n/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Bn(t,n){return d3.range.apply(d3,Zn(t,n))}function $n(t,n){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Zn(t,n)[2])/Math.LN10+.01))+"f")}function Jn(t,n,e,r){var i=e(t[0],t[1]),u=r(n[0],n[1]);return function(t){return u(i(t))}}function Gn(t,n,e,r){var i=[],u=[],a=0,o=Math.min(t.length,n.length)-1;for(t[o]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());o>=++a;)i.push(e(t[a-1],t[a])),u.push(r(n[a-1],n[a]));return function(n){var e=d3.bisect(t,n,1,o)-1;return u[e](i[e](n))}}function Kn(t,n){function e(e){return t(n(e))}var r=n.pow;return e.invert=function(n){return r(t.invert(n))},e.domain=function(i){return arguments.length?(n=0>i[0]?Qn:Wn,r=n.pow,t.domain(i.map(n)),e):t.domain().map(r)},e.nice=function(){return t.domain(Yn(t.domain(),Un)),e},e.ticks=function(){var e=jn(t.domain()),i=[];if(e.every(isFinite)){var u=Math.floor(e[0]),a=Math.ceil(e[1]),o=r(e[0]),c=r(e[1]);if(n===Qn)for(i.push(r(u));a>u++;)for(var l=9;l>0;l--)i.push(r(u)*l);else{for(;a>u;u++)for(var l=1;10>l;l++)i.push(r(u)*l);i.push(r(u))}for(u=0;o>i[u];u++);for(a=i.length;i[a-1]>c;a--);i=i.slice(u,a)}return i},e.tickFormat=function(t,i){if(2>arguments.length&&(i=Da),!arguments.length)return i;var u,a=Math.max(.1,t/e.ticks().length),o=n===Qn?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil);return function(t){return a>=t/r(o(n(t)+u))?i(t):""}},e.copy=function(){return Kn(t.copy(),n)},Vn(e,t)}function Wn(t){return Math.log(0>t?0:t)/Math.LN10}function Qn(t){return-Math.log(t>0?0:-t)/Math.LN10}function te(t,n){function e(n){return t(r(n))}var r=ne(n),i=ne(1/n);return e.invert=function(n){return i(t.invert(n))},e.domain=function(n){return arguments.length?(t.domain(n.map(r)),e):t.domain().map(i)},e.ticks=function(t){return Bn(e.domain(),t)},e.tickFormat=function(t){return $n(e.domain(),t)},e.nice=function(){return e.domain(Yn(e.domain(),Xn))},e.exponent=function(t){if(!arguments.length)return n;var u=e.domain();return r=ne(n=t),i=ne(1/n),e.domain(u)},e.copy=function(){return te(t.copy(),n)},Vn(e,t)}function ne(t){return function(n){return 0>n?-Math.pow(-n,t):Math.pow(n,t)}}function ee(t,n){function e(n){return a[((i.get(n)||i.set(n,t.push(n)))-1)%a.length]}function r(n,e){return d3.range(t.length).map(function(t){return n+e*t})}var i,a,o;return e.domain=function(r){if(!arguments.length)return t;t=[],i=new u;for(var a,o=-1,c=r.length;c>++o;)i.has(a=r[o])||i.set(a,t.push(a));return e[n.t].apply(e,n.a)},e.range=function(t){return arguments.length?(a=t,o=0,n={t:"range",a:arguments},e):a},e.rangePoints=function(i,u){2>arguments.length&&(u=0);var c=i[0],l=i[1],s=(l-c)/(Math.max(1,t.length-1)+u);return a=r(2>t.length?(c+l)/2:c+s*u/2,s),o=0,n={t:"rangePoints",a:arguments},e},e.rangeBands=function(i,u,c){2>arguments.length&&(u=0),3>arguments.length&&(c=u);var l=i[1]<i[0],s=i[l-0],f=i[1-l],h=(f-s)/(t.length-u+2*c);return a=r(s+h*c,h),l&&a.reverse(),o=h*(1-u),n={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,u,c){2>arguments.length&&(u=0),3>arguments.length&&(c=u);var l=i[1]<i[0],s=i[l-0],f=i[1-l],h=Math.floor((f-s)/(t.length-u+2*c)),d=f-s-(t.length-u)*h;return a=r(s+Math.round(d/2),h),l&&a.reverse(),o=Math.round(h*(1-u)),n={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return jn(n.a[0])},e.copy=function(){return ee(t,n)},e.domain(t)}function re(t,n){function e(){var e=0,u=n.length;for(i=[];u>++e;)i[e-1]=d3.quantile(t,e/u);return r}function r(t){return isNaN(t=+t)?0/0:n[d3.bisect(i,t)]}var i;return r.domain=function(n){return arguments.length?(t=n.filter(function(t){return!isNaN(t)}).sort(d3.ascending),e()):t},r.range=function(t){return arguments.length?(n=t,e()):n},r.quantiles=function(){return i},r.copy=function(){return re(t,n)},e()}function ie(t,n,e){function r(n){return e[Math.max(0,Math.min(a,Math.floor(u*(n-t))))]}function i(){return u=e.length/(n-t),a=e.length-1,r}var u,a;return r.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],i()):[t,n]},r.range=function(t){return arguments.length?(e=t,i()):e},r.copy=function(){return ie(t,n,e)},i()}function ue(t,n){function e(e){return n[d3.bisect(t,e)]}return e.domain=function(n){return arguments.length?(t=n,e):t},e.range=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return ue(t,n)},e}function ae(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(n){return Bn(t,n)},n.tickFormat=function(n){return $n(t,n)},n.copy=function(){return ae(t)},n}function oe(t){return t.innerRadius}function ce(t){return t.outerRadius}function le(t){return t.startAngle}function se(t){return t.endAngle}function fe(t){function n(n){function a(){s.push("M",u(t(f),l))}for(var o,s=[],f=[],h=-1,d=n.length,g=c(e),p=c(r);d>++h;)i.call(this,o=n[h],h)?f.push([+g.call(this,o,h),+p.call(this,o,h)]):f.length&&(a(),f=[]);return f.length&&a(),s.length?s.join(""):null}var e=he,r=de,i=o,u=ge,a=u.key,l=.7;return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n.defined=function(t){return arguments.length?(i=t,n):i},n.interpolate=function(t){return arguments.length?(a="function"==typeof t?u=t:(u=Oa.get(t)||ge).key,n):a},n.tension=function(t){return arguments.length?(l=t,n):l},n}function he(t){return t[0]}function de(t){return t[1]}function ge(t){return t.join("L")}function pe(t){return ge(t)+"Z"}function me(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];e>++n;)i.push("V",(r=t[n])[1],"H",r[0]);return i.join("")}function ve(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];e>++n;)i.push("H",(r=t[n])[0],"V",r[1]);return i.join("")}function ye(t,n){return 4>t.length?ge(t):t[1]+xe(t.slice(1,t.length-1),_e(t,n))}function Me(t,n){return 3>t.length?ge(t):t[0]+xe((t.push(t[0]),t),_e([t[t.length-2]].concat(t,[t[1]]),n))}function be(t,n){return 3>t.length?ge(t):t[0]+xe(t,_e(t,n))}function xe(t,n){if(1>n.length||t.length!=n.length&&t.length!=n.length+2)return ge(t);var e=t.length!=n.length,r="",i=t[0],u=t[1],a=n[0],o=a,c=1;if(e&&(r+="Q"+(u[0]-2*a[0]/3)+","+(u[1]-2*a[1]/3)+","+u[0]+","+u[1],i=t[1],c=2),n.length>1){o=n[1],u=t[c],c++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1];for(var l=2;n.length>l;l++,c++)u=t[c],o=n[l],r+="S"+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1]}if(e){var s=t[c];r+="Q"+(u[0]+2*o[0]/3)+","+(u[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function _e(t,n){for(var e,r=[],i=(1-n)/2,u=t[0],a=t[1],o=1,c=t.length;c>++o;)e=u,u=a,a=t[o],r.push([i*(a[0]-e[0]),i*(a[1]-e[1])]);return r}function we(t){if(3>t.length)return ge(t);var n=1,e=t.length,r=t[0],i=r[0],u=r[1],a=[i,i,i,(r=t[1])[0]],o=[u,u,u,r[1]],c=[i,",",u];for(Ne(c,a,o);e>++n;)r=t[n],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Ne(c,a,o);for(n=-1;2>++n;)a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Ne(c,a,o);return c.join("")}function Se(t){if(4>t.length)return ge(t);for(var n,e=[],r=-1,i=t.length,u=[0],a=[0];3>++r;)n=t[r],u.push(n[0]),a.push(n[1]);for(e.push(Ae(Ia,u)+","+Ae(Ia,a)),--r;i>++r;)n=t[r],u.shift(),u.push(n[0]),a.shift(),a.push(n[1]),Ne(e,u,a);return e.join("")}function ke(t){for(var n,e,r=-1,i=t.length,u=i+4,a=[],o=[];4>++r;)e=t[r%i],a.push(e[0]),o.push(e[1]);for(n=[Ae(Ia,a),",",Ae(Ia,o)],--r;u>++r;)e=t[r%i],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Ne(n,a,o);return n.join("")}function Ee(t,n){var e=t.length-1;if(e)for(var r,i,u=t[0][0],a=t[0][1],o=t[e][0]-u,c=t[e][1]-a,l=-1;e>=++l;)r=t[l],i=l/e,r[0]=n*r[0]+(1-n)*(u+i*o),r[1]=n*r[1]+(1-n)*(a+i*c);return we(t)}function Ae(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function Ne(t,n,e){t.push("C",Ae(Ya,n),",",Ae(Ya,e),",",Ae(Ua,n),",",Ae(Ua,e),",",Ae(Ia,n),",",Ae(Ia,e))}function Te(t,n){return(n[1]-t[1])/(n[0]-t[0])}function qe(t){for(var n=0,e=t.length-1,r=[],i=t[0],u=t[1],a=r[0]=Te(i,u);e>++n;)r[n]=(a+(a=Te(i=u,u=t[n+1])))/2;return r[n]=a,r}function Ce(t){for(var n,e,r,i,u=[],a=qe(t),o=-1,c=t.length-1;c>++o;)n=Te(t[o],t[o+1]),1e-6>Math.abs(n)?a[o]=a[o+1]=0:(e=a[o]/n,r=a[o+1]/n,i=e*e+r*r,i>9&&(i=3*n/Math.sqrt(i),a[o]=i*e,a[o+1]=i*r));for(o=-1;c>=++o;)i=(t[Math.min(c,o+1)][0]-t[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),u.push([i||0,a[o]*i||0]);return u}function ze(t){return 3>t.length?ge(t):t[0]+xe(t,Ce(t))}function De(t){for(var n,e,r,i=-1,u=t.length;u>++i;)n=t[i],e=n[0],r=n[1]+Pa,n[0]=e*Math.cos(r),n[1]=e*Math.sin(r);return t}function Le(t){function n(n){function o(){m.push("M",l(t(y),d),h,f(t(v.reverse()),d),"Z")}for(var s,g,p,m=[],v=[],y=[],M=-1,b=n.length,x=c(e),_=c(i),w=e===r?function(){return g}:c(r),S=i===u?function(){return p}:c(u);b>++M;)a.call(this,s=n[M],M)?(v.push([g=+x.call(this,s,M),p=+_.call(this,s,M)]),y.push([+w.call(this,s,M),+S.call(this,s,M)])):v.length&&(o(),v=[],y=[]);return v.length&&o(),m.length?m.join(""):null}var e=he,r=he,i=0,u=de,a=o,l=ge,s=l.key,f=l,h="L",d=.7;return n.x=function(t){return arguments.length?(e=r=t,n):r},n.x0=function(t){return arguments.length?(e=t,n):e},n.x1=function(t){return arguments.length?(r=t,n):r},n.y=function(t){return arguments.length?(i=u=t,n):u},n.y0=function(t){return arguments.length?(i=t,n):i},n.y1=function(t){return arguments.length?(u=t,n):u},n.defined=function(t){return arguments.length?(a=t,n):a},n.interpolate=function(t){return arguments.length?(s="function"==typeof t?l=t:(l=Oa.get(t)||ge).key,f=l.reverse||l,h=l.closed?"M":"L",n):s},n.tension=function(t){return arguments.length?(d=t,n):d},n}function Fe(t){return t.radius}function He(t){return[t.x,t.y]}function Re(t){return function(){var n=t.apply(this,arguments),e=n[0],r=n[1]+Pa;return[e*Math.cos(r),e*Math.sin(r)]}}function Pe(){return 64}function je(){return"circle"}function Oe(t){var n=Math.sqrt(t/Ru);return"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"Z"}function Ye(t,n){t.attr("transform",function(t){return"translate("+n(t)+",0)"})}function Ue(t,n){t.attr("transform",function(t){return"translate(0,"+n(t)+")"})}function Ie(t,n,e){if(r=[],e&&n.length>1){for(var r,i,u,a=jn(t.domain()),o=-1,c=n.length,l=(n[1]-n[0])/++e;c>++o;)for(i=e;--i>0;)(u=+n[o]-i*l)>=a[0]&&r.push(u);for(--o,i=0;e>++i&&(u=+n[o]+i*l)<a[1];)r.push(u)}return r}function Ve(){Ja||(Ja=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var t,n=d3.event;try{Ja.scrollTop=1e3,Ja.dispatchEvent(n),t=1e3-Ja.scrollTop}catch(e){t=n.wheelDelta||5*-n.detail}return t}function Xe(t){for(var n=t.source,e=t.target,r=Be(n,e),i=[n];n!==r;)n=n.parent,i.push(n);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function Ze(t){for(var n=[],e=t.parent;null!=e;)n.push(t),t=e,e=e.parent;return n.push(t),n}function Be(t,n){if(t===n)return t;for(var e=Ze(t),r=Ze(n),i=e.pop(),u=r.pop(),a=null;i===u;)a=i,i=e.pop(),u=r.pop();return a}function $e(t){t.fixed|=2}function Je(t){t.fixed&=1}function Ge(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Ke(t){t.fixed&=3}function We(t,n,e){var r=0,i=0;if(t.charge=0,!t.leaf)for(var u,a=t.nodes,o=a.length,c=-1;o>++c;)u=a[c],null!=u&&(We(u,n,e),t.charge+=u.charge,r+=u.charge*u.cx,i+=u.charge*u.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=n*e[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function Qe(){return 20}function tr(){return 1}function nr(t){return t.x}function er(t){return t.y}function rr(t,n,e){t.y0=n,t.y=e}function ir(t){return d3.range(t.length)}function ur(t){for(var n=-1,e=t[0].length,r=[];e>++n;)r[n]=0;return r}function ar(t){for(var n,e=1,r=0,i=t[0][1],u=t.length;u>e;++e)(n=t[e][1])>i&&(r=e,i=n);return r}function or(t){return t.reduce(cr,0)}function cr(t,n){return t+n[1]}function lr(t,n){return sr(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function sr(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,u=[];n>=++e;)u[e]=i*e+r;return u}function fr(t){return[d3.min(t),d3.max(t)]}function hr(t,n){return d3.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=mr,t}function dr(t){return t.children}function gr(t){return t.value}function pr(t,n){return n.value-t.value}function mr(t){return d3.merge(t.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}function vr(t,n){return t.value-n.value}function yr(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function Mr(t,n){t._pack_next=n,n._pack_prev=t}function br(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i-e*e-r*r>.001}function xr(t){function n(t){s=Math.min(t.x-t.r,s),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((e=t.children)&&(l=e.length)){var e,r,i,u,a,o,c,l,s=1/0,f=-1/0,h=1/0,d=-1/0;if(e.forEach(_r),r=e[0],r.x=-r.r,r.y=0,n(r),l>1&&(i=e[1],i.x=i.r,i.y=0,n(i),l>2))for(u=e[2],kr(r,i,u),n(u),yr(r,u),r._pack_prev=u,yr(u,i),i=r._pack_next,a=3;l>a;a++){kr(r,i,u=e[a]);var g=0,p=1,m=1;for(o=i._pack_next;o!==i;o=o._pack_next,p++)if(br(o,u)){g=1;break}if(1==g)for(c=r._pack_prev;c!==o._pack_prev&&!br(c,u);c=c._pack_prev,m++);g?(m>p||p==m&&i.r<r.r?Mr(r,i=o):Mr(r=c,i),a--):(yr(r,u),i=u,n(u))}var v=(s+f)/2,y=(h+d)/2,M=0;for(a=0;l>a;a++)u=e[a],u.x-=v,u.y-=y,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));t.r=M,e.forEach(wr)}}function _r(t){t._pack_next=t._pack_prev=t}function wr(t){delete t._pack_next,delete t._pack_prev}function Sr(t,n,e,r){var i=t.children;if(t.x=n+=r*t.x,t.y=e+=r*t.y,t.r*=r,i)for(var u=-1,a=i.length;a>++u;)Sr(i[u],n,e,r)}function kr(t,n,e){var r=t.r+e.r,i=n.x-t.x,u=n.y-t.y;if(r&&(i||u)){var a=n.r+e.r,o=i*i+u*u;a*=a,r*=r;var c=.5+(r-a)/(2*o),l=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=t.x+c*i+l*u,e.y=t.y+c*u-l*i}else e.x=t.x+r,e.y=t.y}function Er(t){return 1+d3.max(t,function(t){return t.y})}function Ar(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}function Nr(t){var n=t.children;return n&&n.length?Nr(n[0]):t}function Tr(t){var n,e=t.children;return e&&(n=e.length)?Tr(e[n-1]):t}function qr(t,n){return t.parent==n.parent?1:2}function Cr(t){var n=t.children;return n&&n.length?n[0]:t._tree.thread}function zr(t){var n,e=t.children;return e&&(n=e.length)?e[n-1]:t._tree.thread}function Dr(t,n){var e=t.children;if(e&&(i=e.length))for(var r,i,u=-1;i>++u;)n(r=Dr(e[u],n),t)>0&&(t=r);return t}function Lr(t,n){return t.x-n.x}function Fr(t,n){return n.x-t.x}function Hr(t,n){return t.depth-n.depth}function Rr(t,n){function e(t,r){var i=t.children;if(i&&(a=i.length))for(var u,a,o=null,c=-1;a>++c;)u=i[c],e(u,o),o=u;n(t,r)}e(t,null)}function Pr(t){for(var n,e=0,r=0,i=t.children,u=i.length;--u>=0;)n=i[u]._tree,n.prelim+=e,n.mod+=e,e+=n.shift+(r+=n.change)}function jr(t,n,e){t=t._tree,n=n._tree;var r=e/(n.number-t.number);t.change+=r,n.change-=r,n.shift+=e,n.prelim+=e,n.mod+=e}function Or(t,n,e){return t._tree.ancestor.parent==n.parent?t._tree.ancestor:e}function Yr(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ur(t,n){var e=t.x+n[3],r=t.y+n[0],i=t.dx-n[1]-n[3],u=t.dy-n[0]-n[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Ir(t,n){function e(t,e){return d3.xhr(t,n,e).response(r)}function r(t){return e.parse(t.responseText)}function i(n){return n.map(u).join(t)}function u(t){return a.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var a=RegExp('["'+t+"\n]"),o=t.charCodeAt(0);return e.parse=function(t){var n;return e.parseRows(t,function(t){return n?n(t):(n=Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}"),void 0)})},e.parseRows=function(t,n){function e(){if(s>=l)return a;if(i)return i=!1,u;var n=s;if(34===t.charCodeAt(n)){for(var e=n;l>e++;)if(34===t.charCodeAt(e)){if(34!==t.charCodeAt(e+1))break;++e}s=e+2;var r=t.charCodeAt(e+1);return 13===r?(i=!0,10===t.charCodeAt(e+2)&&++s):10===r&&(i=!0),t.substring(n+1,e).replace(/""/g,'"')}for(;l>s;){var r=t.charCodeAt(s++),c=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(s)&&(++s,++c);else if(r!==o)continue;return t.substring(n,s-c)}return t.substring(n)}for(var r,i,u={},a={},c=[],l=t.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==u&&r!==a;)h.push(r),r=e();(!n||(h=n(h,f++)))&&c.push(h)}return c},e.format=function(t){return t.map(i).join("\n")},e}function Vr(t,n){no.hasOwnProperty(t.type)&&no[t.type](t,n)}function Xr(t,n,e){var r,i=-1,u=t.length-e;for(n.lineStart();u>++i;)r=t[i],n.point(r[0],r[1]);n.lineEnd()}function Zr(t,n){var e=-1,r=t.length;for(n.polygonStart();r>++e;)Xr(t[e],n,1);n.polygonEnd()}function Br(t){return[Math.atan2(t[1],t[0]),Math.asin(Math.max(-1,Math.min(1,t[2])))]}function $r(t,n){return Pu>Math.abs(t[0]-n[0])&&Pu>Math.abs(t[1]-n[1])}function Jr(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function Gr(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Kr(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Wr(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Qr(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function ti(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function ni(t){function n(n){function r(e,r){e=t(e,r),n.point(e[0],e[1])}function u(){s=0/0,p.point=a,n.lineStart()}function a(r,u){var a=Jr([r,u]),o=t(r,u);e(s,f,l,h,d,g,s=o[0],f=o[1],l=r,h=a[0],d=a[1],g=a[2],i,n),n.point(s,f)}function o(){p.point=r,n.lineEnd()}function c(){var t,r,c,m,v,y,M;u(),p.point=function(n,e){a(t=n,r=e),c=s,m=f,v=h,y=d,M=g,p.point=a},p.lineEnd=function(){e(s,f,l,h,d,g,c,m,t,v,y,M,i,n),p.lineEnd=o,o()}}var l,s,f,h,d,g,p={point:r,lineStart:u,lineEnd:o,polygonStart:function(){n.polygonStart(),p.lineStart=c},polygonEnd:function(){n.polygonEnd(),p.lineStart=u}};return p}function e(n,i,u,a,o,c,l,s,f,h,d,g,p,m){var v=l-n,y=s-i,M=v*v+y*y;if(M>4*r&&p--){var b=a+h,x=o+d,_=c+g,w=Math.sqrt(b*b+x*x+_*_),S=Math.asin(_/=w),k=Pu>Math.abs(Math.abs(_)-1)?(u+f)/2:Math.atan2(x,b),E=t(k,S),A=E[0],N=E[1],T=A-n,q=N-i,C=y*T-v*q;(C*C/M>r||Math.abs((v*T+y*q)/M-.5)>.3)&&(e(n,i,u,a,o,c,A,N,k,b/=w,x/=w,_,p,m),m.point(A,N),e(A,N,k,b,x,_,l,s,f,h,d,g,p,m))}}var r=.5,i=16;return n.precision=function(t){return arguments.length?(i=(r=t*t)>0&&16,n):Math.sqrt(r)},n}function ei(t,n){function e(t,n){var e=Math.sqrt(u-2*i*Math.sin(n))/i;return[e*Math.sin(t*=i),a-e*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(n))/2,u=1+r*(2*i-r),a=Math.sqrt(u)/i;return e.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/i,Math.asin((u-(t*t+e*e)*i*i)/(2*i))]},e}function ri(t){function n(t,n){r>t&&(r=t),t>u&&(u=t),i>n&&(i=n),n>a&&(a=n)}function e(){o.point=o.lineEnd=Pn}var r,i,u,a,o={point:n,lineStart:Pn,lineEnd:Pn,polygonStart:function(){o.lineEnd=e},polygonEnd:function(){o.point=n}};return function(n){return a=u=-(r=i=1/0),d3.geo.stream(n,t(o)),[[r,i],[u,a]]}}function ii(t,n){if(!io){++uo,t*=ju;var e=Math.cos(n*=ju);ao+=(e*Math.cos(t)-ao)/uo,oo+=(e*Math.sin(t)-oo)/uo,co+=(Math.sin(n)-co)/uo}}function ui(){var t,n;io=1,ai(),io=2;var e=lo.point;lo.point=function(r,i){e(t=r,n=i)},lo.lineEnd=function(){lo.point(t,n),oi(),lo.lineEnd=oi}}function ai(){function t(t,i){t*=ju;var u=Math.cos(i*=ju),a=u*Math.cos(t),o=u*Math.sin(t),c=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*c-r*o)*l+(l=r*a-n*c)*l+(l=n*o-e*a)*l),n*a+e*o+r*c);uo+=l,ao+=l*(n+(n=a)),oo+=l*(e+(e=o)),co+=l*(r+(r=c))}var n,e,r;io>1||(1>io&&(io=1,uo=ao=oo=co=0),lo.point=function(i,u){i*=ju;var a=Math.cos(u*=ju);n=a*Math.cos(i),e=a*Math.sin(i),r=Math.sin(u),lo.point=t})}function oi(){lo.point=ii}function ci(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,u,a,o){null!=i?(i=li(e,i),u=li(e,u),(a>0?u>i:i>u)&&(i+=2*a*Ru)):(i=t+2*a*Ru,u=t);for(var c,l=a*n,s=i;a>0?s>u:u>s;s-=l)o.point((c=Br([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function li(t,n){var e=Jr(n);e[0]-=t,ti(e);var r=Math.acos(Math.max(-1,Math.min(1,-e[1])));return((0>-e[2]?-r:r)+2*Math.PI-Pu)%(2*Math.PI)}function si(t,n,e){return function(r){function i(n,e){t(n,e)&&r.point(n,e)}function u(t,n){m.point(t,n)}function a(){v.point=u,m.lineStart()}function o(){v.point=i,m.lineEnd()}function c(t,n){M.point(t,n),p.push([t,n])}function l(){M.lineStart(),p=[]}function s(){c(p[0][0],p[0][1]),M.lineEnd();var t,n=M.clean(),e=y.buffer(),i=e.length;if(!i)return g=!0,d+=mi(p,-1),p=null,void 0;if(p=null,1&n){t=e[0],h+=mi(t,1);var u,i=t.length-1,a=-1;for(r.lineStart();i>++a;)r.point((u=t[a])[0],u[1]);return r.lineEnd(),void 0}i>1&&2&n&&e.push(e.pop().concat(e.shift())),f.push(e.filter(gi))}var f,h,d,g,p,m=n(r),v={point:i,lineStart:a,lineEnd:o,polygonStart:function(){v.point=c,v.lineStart=l,v.lineEnd=s,g=!1,d=h=0,f=[],r.polygonStart() -},polygonEnd:function(){v.point=i,v.lineStart=a,v.lineEnd=o,f=d3.merge(f),f.length?fi(f,e,r):(-Pu>h||g&&-Pu>d)&&(r.lineStart(),e(null,null,1,r),r.lineEnd()),r.polygonEnd(),f=null},sphere:function(){r.polygonStart(),r.lineStart(),e(null,null,1,r),r.lineEnd(),r.polygonEnd()}},y=pi(),M=n(y);return v}}function fi(t,n,e){var r=[],i=[];if(t.forEach(function(t){var n=t.length;if(!(1>=n)){var e=t[0],u=t[n-1],a={point:e,points:t,other:null,visited:!1,entry:!0,subject:!0},o={point:e,points:[e],other:a,visited:!1,entry:!1,subject:!1};a.other=o,r.push(a),i.push(o),a={point:u,points:[u],other:null,visited:!1,entry:!1,subject:!0},o={point:u,points:[u],other:a,visited:!1,entry:!0,subject:!1},a.other=o,r.push(a),i.push(o)}}),i.sort(di),hi(r),hi(i),r.length)for(var u,a,o,c=r[0];;){for(u=c;u.visited;)if((u=u.next)===c)return;a=u.points,e.lineStart();do{if(u.visited=u.other.visited=!0,u.entry){if(u.subject)for(var l=0;a.length>l;l++)e.point((o=a[l])[0],o[1]);else n(u.point,u.next.point,1,e);u=u.next}else{if(u.subject){a=u.prev.points;for(var l=a.length;--l>=0;)e.point((o=a[l])[0],o[1])}else n(u.point,u.prev.point,-1,e);u=u.prev}u=u.other,a=u.points}while(!u.visited);e.lineEnd()}}function hi(t){if(n=t.length){for(var n,e,r=0,i=t[0];n>++r;)i.next=e=t[r],e.prev=i,i=e;i.next=e=t[0],e.prev=i}}function di(t,n){return(0>(t=t.point)[0]?t[1]-Ru/2-Pu:Ru/2-t[1])-(0>(n=n.point)[0]?n[1]-Ru/2-Pu:Ru/2-n[1])}function gi(t){return t.length>1}function pi(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:Pn,buffer:function(){var e=n;return n=[],t=null,e}}}function mi(t,n){if(!(e=t.length))return 0;for(var e,r,i,u=0,a=0,o=t[0],c=o[0],l=o[1],s=Math.cos(l),f=Math.atan2(n*Math.sin(c)*s,Math.sin(l)),h=1-n*Math.cos(c)*s,d=f;e>++u;)o=t[u],s=Math.cos(l=o[1]),r=Math.atan2(n*Math.sin(c=o[0])*s,Math.sin(l)),i=1-n*Math.cos(c)*s,Pu>Math.abs(h-2)&&Pu>Math.abs(i-2)||(Pu>Math.abs(i)||Pu>Math.abs(h)||(Pu>Math.abs(Math.abs(r-f)-Ru)?i+h>2&&(a+=4*(r-f)):a+=Pu>Math.abs(h-2)?4*(r-d):((3*Ru+r-f)%(2*Ru)-Ru)*(h+i)),d=f,f=r,h=i);return a}function vi(t){var n,e=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),n=1},point:function(u,a){var o=u>0?Ru:-Ru,c=Math.abs(u-e);Pu>Math.abs(c-Ru)?(t.point(e,r=(r+a)/2>0?Ru/2:-Ru/2),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(o,r),t.point(u,r),n=0):i!==o&&c>=Ru&&(Pu>Math.abs(e-i)&&(e-=i*Pu),Pu>Math.abs(u-o)&&(u-=o*Pu),r=yi(e,r,u,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(o,r),n=0),t.point(e=u,r=a),i=o},lineEnd:function(){t.lineEnd(),e=r=0/0},clean:function(){return 2-n}}}function yi(t,n,e,r){var i,u,a=Math.sin(t-e);return Math.abs(a)>Pu?Math.atan((Math.sin(n)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*u*a)):(n+r)/2}function Mi(t,n,e,r){var i;if(null==t)i=e*Ru/2,r.point(-Ru,i),r.point(0,i),r.point(Ru,i),r.point(Ru,0),r.point(Ru,-i),r.point(0,-i),r.point(-Ru,-i),r.point(-Ru,0),r.point(-Ru,i);else if(Math.abs(t[0]-n[0])>Pu){var u=(t[0]<n[0]?1:-1)*Ru;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(n[0],n[1])}function bi(t){function n(t,n){return Math.cos(t)*Math.cos(n)>u}function e(t){var e,i,u,a;return{lineStart:function(){u=i=!1,a=1},point:function(o,c){var l,s=[o,c],f=n(o,c);!e&&(u=i=f)&&t.lineStart(),f!==i&&(l=r(e,s),($r(e,l)||$r(s,l))&&(s[0]+=Pu,s[1]+=Pu,f=n(s[0],s[1]))),f!==i&&(a=0,(i=f)?(t.lineStart(),l=r(s,e),t.point(l[0],l[1])):(l=r(e,s),t.point(l[0],l[1]),t.lineEnd()),e=l),!f||e&&$r(e,s)||t.point(s[0],s[1]),e=s},lineEnd:function(){i&&t.lineEnd(),e=null},clean:function(){return a|(u&&i)<<1}}}function r(t,n){var e=Jr(t,0),r=Jr(n,0),i=[1,0,0],a=Kr(e,r),o=Gr(a,a),c=a[0],l=o-c*c;if(!l)return t;var s=u*o/l,f=-u*c/l,h=Kr(i,a),d=Qr(i,s),g=Qr(a,f);Wr(d,g);var p=h,m=Gr(d,p),v=Gr(p,p),y=Math.sqrt(m*m-v*(Gr(d,d)-1)),M=Qr(p,(-m-y)/v);return Wr(M,d),Br(M)}var i=t*ju,u=Math.cos(i),a=ci(i,6*ju);return si(n,e,a)}function xi(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return e=n.invert(e,r),e&&t.invert(e[0],e[1])}),e}function _i(t,n){return[t,n]}function wi(t,n,e){var r=d3.range(t,n-Pu,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function Si(t,n,e){var r=d3.range(t,n-Pu,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function ki(t,n,e,r){function i(t){var n=Math.sin(t*=d)*g,e=Math.sin(d-t)*g,r=e*l+n*f,i=e*s+n*h,u=e*a+n*c;return[Math.atan2(i,r)/ju,Math.atan2(u,Math.sqrt(r*r+i*i))/ju]}var u=Math.cos(n),a=Math.sin(n),o=Math.cos(r),c=Math.sin(r),l=u*Math.cos(t),s=u*Math.sin(t),f=o*Math.cos(e),h=o*Math.sin(e),d=Math.acos(Math.max(-1,Math.min(1,a*c+u*o*Math.cos(e-t)))),g=1/Math.sin(d);return i.distance=d,i}function Ei(t,n){return[t/(2*Ru),Math.max(-.5,Math.min(.5,Math.log(Math.tan(Ru/4+n/2))/(2*Ru)))]}function Ai(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ni(t){var n=ni(function(n,e){return t([n*Ou,e*Ou])});return function(t){return t=n(t),{point:function(n,e){t.point(n*ju,e*ju)},sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}}function Ti(){function t(t,n){a.push("M",t,",",n,u)}function n(t,n){a.push("M",t,",",n),o.point=e}function e(t,n){a.push("L",t,",",n)}function r(){o.point=t}function i(){a.push("Z")}var u=Ai(4.5),a=[],o={point:t,lineStart:function(){o.point=n},lineEnd:r,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=r,o.point=t},pointRadius:function(t){return u=Ai(t),o},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return o}function qi(t){function n(n,e){t.moveTo(n,e),t.arc(n,e,a,0,2*Ru)}function e(n,e){t.moveTo(n,e),o.point=r}function r(n,e){t.lineTo(n,e)}function i(){o.point=n}function u(){t.closePath()}var a=4.5,o={point:n,lineStart:function(){o.point=e},lineEnd:i,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=i,o.point=n},pointRadius:function(t){return a=t,o},result:Pn};return o}function Ci(){function t(t,n){po+=i*t-r*n,r=t,i=n}var n,e,r,i;mo.point=function(u,a){mo.point=t,n=r=u,e=i=a},mo.lineEnd=function(){t(n,e)}}function zi(t,n){io||(ao+=t,oo+=n,++co)}function Di(){function t(t,r){var i=t-n,u=r-e,a=Math.sqrt(i*i+u*u);ao+=a*(n+t)/2,oo+=a*(e+r)/2,co+=a,n=t,e=r}var n,e;if(1!==io){if(!(1>io))return;io=1,ao=oo=co=0}vo.point=function(r,i){vo.point=t,n=r,e=i}}function Li(){vo.point=zi}function Fi(){function t(t,n){var e=i*t-r*n;ao+=e*(r+t),oo+=e*(i+n),co+=3*e,r=t,i=n}var n,e,r,i;2>io&&(io=2,ao=oo=co=0),vo.point=function(u,a){vo.point=t,n=r=u,e=i=a},vo.lineEnd=function(){t(n,e)}}function Hi(){function t(t,n){if(t*=ju,n*=ju,!(Pu>Math.abs(Math.abs(u)-Ru/2)&&Pu>Math.abs(Math.abs(n)-Ru/2))){var e=Math.cos(n),c=Math.sin(n);if(Pu>Math.abs(u-Ru/2))Mo+=2*(t-r);else{var l=t-i,s=Math.cos(l),f=Math.atan2(Math.sqrt((f=e*Math.sin(l))*f+(f=a*c-o*e*s)*f),o*c+a*e*s),h=(f+Ru+u+n)/4;Mo+=(0>l&&l>-Ru||l>Ru?-4:4)*Math.atan(Math.sqrt(Math.abs(Math.tan(h)*Math.tan(h-f/2)*Math.tan(h-Ru/4-u/2)*Math.tan(h-Ru/4-n/2))))}r=i,i=t,u=n,a=e,o=c}}var n,e,r,i,u,a,o;bo.point=function(c,l){bo.point=t,r=i=(n=c)*ju,u=(e=l)*ju,a=Math.cos(u),o=Math.sin(u)},bo.lineEnd=function(){t(n,e)}}function Ri(t){return Pi(function(){return t})()}function Pi(t){function n(t){return t=a(t[0]*ju,t[1]*ju),[t[0]*s+o,c-t[1]*s]}function e(t){return t=a.invert((t[0]-o)/s,(c-t[1])/s),t&&[t[0]*Ou,t[1]*Ou]}function r(){a=xi(u=Oi(p,m,v),i);var t=i(d,g);return o=f-t[0]*s,c=h+t[1]*s,n}var i,u,a,o,c,l=ni(function(t,n){return t=i(t,n),[t[0]*s+o,c-t[1]*s]}),s=150,f=480,h=250,d=0,g=0,p=0,m=0,v=0,y=so,M=null;return n.stream=function(t){return ji(u,y(l(t)))},n.clipAngle=function(t){return arguments.length?(y=null==t?(M=t,so):bi(M=+t),n):M},n.scale=function(t){return arguments.length?(s=+t,r()):s},n.translate=function(t){return arguments.length?(f=+t[0],h=+t[1],r()):[f,h]},n.center=function(t){return arguments.length?(d=t[0]%360*ju,g=t[1]%360*ju,r()):[d*Ou,g*Ou]},n.rotate=function(t){return arguments.length?(p=t[0]%360*ju,m=t[1]%360*ju,v=t.length>2?t[2]%360*ju:0,r()):[p*Ou,m*Ou,v*Ou]},d3.rebind(n,l,"precision"),function(){return i=t.apply(this,arguments),n.invert=i.invert&&e,r()}}function ji(t,n){return{point:function(e,r){r=t(e*ju,r*ju),e=r[0],n.point(e>Ru?e-2*Ru:-Ru>e?e+2*Ru:e,r[1])},sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Oi(t,n,e){return t?n||e?xi(Ui(t),Ii(n,e)):Ui(t):n||e?Ii(n,e):_i}function Yi(t){return function(n,e){return n+=t,[n>Ru?n-2*Ru:-Ru>n?n+2*Ru:n,e]}}function Ui(t){var n=Yi(t);return n.invert=Yi(-t),n}function Ii(t,n){function e(t,n){var e=Math.cos(n),o=Math.cos(t)*e,c=Math.sin(t)*e,l=Math.sin(n),s=l*r+o*i;return[Math.atan2(c*u-s*a,o*r-l*i),Math.asin(Math.max(-1,Math.min(1,s*u+c*a)))]}var r=Math.cos(t),i=Math.sin(t),u=Math.cos(n),a=Math.sin(n);return e.invert=function(t,n){var e=Math.cos(n),o=Math.cos(t)*e,c=Math.sin(t)*e,l=Math.sin(n),s=l*u-c*a;return[Math.atan2(c*u+l*a,o*r+s*i),Math.asin(Math.max(-1,Math.min(1,s*r-o*i)))]},e}function Vi(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),u=t(r*i);return[u*i*Math.sin(n),u*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),u=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*u,r*a),Math.asin(r&&e*u/r)]},e}function Xi(t,n,e,r){var i,u,a,o,c,l,s;return i=r[t],u=i[0],a=i[1],i=r[n],o=i[0],c=i[1],i=r[e],l=i[0],s=i[1],(s-a)*(o-u)-(c-a)*(l-u)>0}function Zi(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function Bi(t,n,e,r){var i=t[0],u=e[0],a=n[0]-i,o=r[0]-u,c=t[1],l=e[1],s=n[1]-c,f=r[1]-l,h=(o*(c-l)-f*(i-u))/(f*a-o*s);return[i+h*a,c+h*s]}function $i(t,n){var e={list:t.map(function(t,n){return{index:n,x:t[0],y:t[1]}}).sort(function(t,n){return t.y<n.y?-1:t.y>n.y?1:t.x<n.x?-1:t.x>n.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(t,n){return{edge:t,side:n,vertex:null,l:null,r:null}},insert:function(t,n){n.l=t,n.r=t.r,t.r.l=n,t.r=n},leftBound:function(t){var n=r.leftEnd;do n=n.r;while(n!=r.rightEnd&&i.rightOf(n,t));return n=n.l},del:function(t){t.l.r=t.r,t.r.l=t.l,t.edge=null},right:function(t){return t.r},left:function(t){return t.l},leftRegion:function(t){return null==t.edge?e.bottomSite:t.edge.region[t.side]},rightRegion:function(t){return null==t.edge?e.bottomSite:t.edge.region[_o[t.side]]}},i={bisect:function(t,n){var e={region:{l:t,r:n},ep:{l:null,r:null}},r=n.x-t.x,i=n.y-t.y,u=r>0?r:-r,a=i>0?i:-i;return e.c=t.x*r+t.y*i+.5*(r*r+i*i),u>a?(e.a=1,e.b=i/r,e.c/=r):(e.b=1,e.a=r/i,e.c/=i),e},intersect:function(t,n){var e=t.edge,r=n.edge;if(!e||!r||e.region.r==r.region.r)return null;var i=e.a*r.b-e.b*r.a;if(1e-10>Math.abs(i))return null;var u,a,o=(e.c*r.b-r.c*e.b)/i,c=(r.c*e.a-e.c*r.a)/i,l=e.region.r,s=r.region.r;l.y<s.y||l.y==s.y&&l.x<s.x?(u=t,a=e):(u=n,a=r);var f=o>=a.region.r.x;return f&&"l"===u.side||!f&&"r"===u.side?null:{x:o,y:c}},rightOf:function(t,n){var e=t.edge,r=e.region.r,i=n.x>r.x;if(i&&"l"===t.side)return 1;if(!i&&"r"===t.side)return 0;if(1===e.a){var u=n.y-r.y,a=n.x-r.x,o=0,c=0;if(!i&&0>e.b||i&&e.b>=0?c=o=u>=e.b*a:(c=n.x+n.y*e.b>e.c,0>e.b&&(c=!c),c||(o=1)),!o){var l=r.x-e.region.l.x;c=e.b*(a*a-u*u)<l*u*(1+2*a/l+e.b*e.b),0>e.b&&(c=!c)}}else{var s=e.c-e.a*n.x,f=n.y-s,h=n.x-r.x,d=s-r.y;c=f*f>h*h+d*d}return"l"===t.side?c:!c},endPoint:function(t,e,r){t.ep[e]=r,t.ep[_o[e]]&&n(t)},distance:function(t,n){var e=t.x-n.x,r=t.y-n.y;return Math.sqrt(e*e+r*r)}},u={list:[],insert:function(t,n,e){t.vertex=n,t.ystar=n.y+e;for(var r=0,i=u.list,a=i.length;a>r;r++){var o=i[r];if(!(t.ystar>o.ystar||t.ystar==o.ystar&&n.x>o.vertex.x))break}i.splice(r,0,t)},del:function(t){for(var n=0,e=u.list,r=e.length;r>n&&e[n]!=t;++n);e.splice(n,1)},empty:function(){return 0===u.list.length},nextEvent:function(t){for(var n=0,e=u.list,r=e.length;r>n;++n)if(e[n]==t)return e[n+1];return null},min:function(){var t=u.list[0];return{x:t.vertex.x,y:t.ystar}},extractMin:function(){return u.list.shift()}};r.init(),e.bottomSite=e.list.shift();for(var a,o,c,l,s,f,h,d,g,p,m,v,y,M=e.list.shift();;)if(u.empty()||(a=u.min()),M&&(u.empty()||M.y<a.y||M.y==a.y&&M.x<a.x))o=r.leftBound(M),c=r.right(o),h=r.rightRegion(o),v=i.bisect(h,M),f=r.createHalfEdge(v,"l"),r.insert(o,f),p=i.intersect(o,f),p&&(u.del(o),u.insert(o,p,i.distance(p,M))),o=f,f=r.createHalfEdge(v,"r"),r.insert(o,f),p=i.intersect(f,c),p&&u.insert(f,p,i.distance(p,M)),M=e.list.shift();else{if(u.empty())break;o=u.extractMin(),l=r.left(o),c=r.right(o),s=r.right(c),h=r.leftRegion(o),d=r.rightRegion(c),m=o.vertex,i.endPoint(o.edge,o.side,m),i.endPoint(c.edge,c.side,m),r.del(o),u.del(c),r.del(c),y="l",h.y>d.y&&(g=h,h=d,d=g,y="r"),v=i.bisect(h,d),f=r.createHalfEdge(v,y),r.insert(l,f),i.endPoint(v,_o[y],m),p=i.intersect(l,f),p&&(u.del(l),u.insert(l,p,i.distance(p,h))),p=i.intersect(f,s),p&&u.insert(f,p,i.distance(p,h))}for(o=r.right(r.leftEnd);o!=r.rightEnd;o=r.right(o))n(o.edge)}function Ji(){return{leaf:!0,nodes:[],point:null}}function Gi(t,n,e,r,i,u){if(!t(n,e,r,i,u)){var a=.5*(e+i),o=.5*(r+u),c=n.nodes;c[0]&&Gi(t,c[0],e,r,a,o),c[1]&&Gi(t,c[1],a,r,i,o),c[2]&&Gi(t,c[2],e,o,a,u),c[3]&&Gi(t,c[3],a,o,i,u)}}function Ki(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Wi(t,n,e,r){for(var i,u,a=0,o=n.length,c=e.length;o>a;){if(r>=c)return-1;if(i=n.charCodeAt(a++),37===i){if(u=Yo[n.charAt(a++)],!u||0>(r=u(t,e,r)))return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function Qi(t){return RegExp("^(?:"+t.map(d3.requote).join("|")+")","i")}function tu(t){for(var n=new u,e=-1,r=t.length;r>++e;)n.set(t[e].toLowerCase(),e);return n}function nu(t,n,e){t+="";var r=t.length;return e>r?Array(e-r+1).join(n)+t:t}function eu(t,n,e){Lo.lastIndex=0;var r=Lo.exec(n.substring(e));return r?e+=r[0].length:-1}function ru(t,n,e){Do.lastIndex=0;var r=Do.exec(n.substring(e));return r?e+=r[0].length:-1}function iu(t,n,e){Ro.lastIndex=0;var r=Ro.exec(n.substring(e));return r?(t.m=Po.get(r[0].toLowerCase()),e+=r[0].length):-1}function uu(t,n,e){Fo.lastIndex=0;var r=Fo.exec(n.substring(e));return r?(t.m=Ho.get(r[0].toLowerCase()),e+=r[0].length):-1}function au(t,n,e){return Wi(t,""+Oo.c,n,e)}function ou(t,n,e){return Wi(t,""+Oo.x,n,e)}function cu(t,n,e){return Wi(t,""+Oo.X,n,e)}function lu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+4));return r?(t.y=+r[0],e+=r[0].length):-1}function su(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.y=fu(+r[0]),e+=r[0].length):-1}function fu(t){return t+(t>68?1900:2e3)}function hu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.m=r[0]-1,e+=r[0].length):-1}function du(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.d=+r[0],e+=r[0].length):-1}function gu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.H=+r[0],e+=r[0].length):-1}function pu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.M=+r[0],e+=r[0].length):-1}function mu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+2));return r?(t.S=+r[0],e+=r[0].length):-1}function vu(t,n,e){Uo.lastIndex=0;var r=Uo.exec(n.substring(e,e+3));return r?(t.L=+r[0],e+=r[0].length):-1}function yu(t,n,e){var r=Io.get(n.substring(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}function Mu(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=~~(Math.abs(n)/60),i=Math.abs(n)%60;return e+nu(r,"0",2)+nu(i,"0",2)}function bu(t){return t.toISOString()}function xu(t,n,e){function r(n){var e=t(n),r=u(e,1);return r-n>n-e?e:r}function i(e){return n(e=t(new wo(e-1)),1),e}function u(t,e){return n(t=new wo(+t),e),t}function a(t,r,u){var a=i(t),o=[];if(u>1)for(;r>a;)e(a)%u||o.push(new Date(+a)),n(a,1);else for(;r>a;)o.push(new Date(+a)),n(a,1);return o}function o(t,n,e){try{wo=Ki;var r=new Ki;return r._=t,a(r,n,e)}finally{wo=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=u,t.range=a;var c=t.utc=_u(t);return c.floor=c,c.round=_u(r),c.ceil=_u(i),c.offset=_u(u),c.range=o,t}function _u(t){return function(n,e){try{wo=Ki;var r=new Ki;return r._=n,t(r,e)._}finally{wo=Date}}}function wu(t,n,e){function r(n){return t(n)}return r.invert=function(n){return ku(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain(n),r):t.domain().map(ku)},r.nice=function(t){return r.domain(Yn(r.domain(),function(){return t}))},r.ticks=function(e,i){var u=Su(r.domain());if("function"!=typeof e){var a=u[1]-u[0],o=a/e,c=d3.bisect(Xo,o);if(c==Xo.length)return n.year(u,e);if(!c)return t.ticks(e).map(ku);Math.log(o/Xo[c-1])<Math.log(Xo[c]/o)&&--c,e=n[c],i=e[1],e=e[0].range}return e(u[0],new Date(+u[1]+1),i)},r.tickFormat=function(){return e},r.copy=function(){return wu(t.copy(),n,e)},d3.rebind(r,t,"range","rangeRound","interpolate","clamp")}function Su(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function ku(t){return new Date(t)}function Eu(t){return function(n){for(var e=t.length-1,r=t[e];!r[1](n);)r=t[--e];return r[0](n)}}function Au(t){var n=new Date(t,0,1);return n.setFullYear(t),n}function Nu(t){var n=t.getFullYear(),e=Au(n),r=Au(n+1);return n+(t-e)/(r-e)}function Tu(t){var n=new Date(Date.UTC(t,0,1));return n.setUTCFullYear(t),n}function qu(t){var n=t.getUTCFullYear(),e=Tu(n),r=Tu(n+1);return n+(t-e)/(r-e)}var Cu=".",zu=",",Du=[3,3];Date.now||(Date.now=function(){return+new Date});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Lu){var Fu=CSSStyleDeclaration.prototype,Hu=Fu.setProperty;Fu.setProperty=function(t,n,e){Hu.call(this,t,n+"",e)}}d3={version:"3.0.3"};var Ru=Math.PI,Pu=1e-6,ju=Ru/180,Ou=180/Ru,Yu=i;try{Yu(document.documentElement.childNodes)[0].nodeType}catch(Uu){Yu=r}var Iu=[].__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};d3.map=function(t){var n=new u;for(var e in t)n.set(e,t[e]);return n},e(u,{has:function(t){return Vu+t in this},get:function(t){return this[Vu+t]},set:function(t,n){return this[Vu+t]=n},remove:function(t){return t=Vu+t,t in this&&delete this[t]},keys:function(){var t=[];return this.forEach(function(n){t.push(n)}),t},values:function(){var t=[];return this.forEach(function(n,e){t.push(e)}),t},entries:function(){var t=[];return this.forEach(function(n,e){t.push({key:n,value:e})}),t},forEach:function(t){for(var n in this)n.charCodeAt(0)===Xu&&t.call(this,n.substring(1),this[n])}});var Vu="\0",Xu=Vu.charCodeAt(0);d3.functor=c,d3.rebind=function(t,n){for(var e,r=1,i=arguments.length;i>++r;)t[e=arguments[r]]=l(t,n,n[e]);return t},d3.ascending=function(t,n){return n>t?-1:t>n?1:t>=n?0:0/0},d3.descending=function(t,n){return t>n?-1:n>t?1:n>=t?0:0/0},d3.mean=function(t,n){var e,r=t.length,i=0,u=-1,a=0;if(1===arguments.length)for(;r>++u;)s(e=t[u])&&(i+=(e-i)/++a);else for(;r>++u;)s(e=n.call(t,t[u],u))&&(i+=(e-i)/++a);return a?i:void 0},d3.median=function(t,n){return arguments.length>1&&(t=t.map(n)),t=t.filter(s),t.length?d3.quantile(t.sort(d3.ascending),.5):void 0},d3.min=function(t,n){var e,r,i=-1,u=t.length;if(1===arguments.length){for(;u>++i&&(null==(e=t[i])||e!=e);)e=void 0;for(;u>++i;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;u>++i&&(null==(e=n.call(t,t[i],i))||e!=e);)e=void 0;for(;u>++i;)null!=(r=n.call(t,t[i],i))&&e>r&&(e=r)}return e},d3.max=function(t,n){var e,r,i=-1,u=t.length;if(1===arguments.length){for(;u>++i&&(null==(e=t[i])||e!=e);)e=void 0;for(;u>++i;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;u>++i&&(null==(e=n.call(t,t[i],i))||e!=e);)e=void 0;for(;u>++i;)null!=(r=n.call(t,t[i],i))&&r>e&&(e=r)}return e},d3.extent=function(t,n){var e,r,i,u=-1,a=t.length;if(1===arguments.length){for(;a>++u&&(null==(e=i=t[u])||e!=e);)e=i=void 0;for(;a>++u;)null!=(r=t[u])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;a>++u&&(null==(e=i=n.call(t,t[u],u))||e!=e);)e=void 0;for(;a>++u;)null!=(r=n.call(t,t[u],u))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},d3.random={normal:function(t,n){var e=arguments.length;return 2>e&&(n=1),1>e&&(t=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(t,n){var e=arguments.length;2>e&&(n=1),1>e&&(t=0);var r=d3.random.normal();return function(){return Math.exp(t+n*r())}},irwinHall:function(t){return function(){for(var n=0,e=0;t>e;e++)n+=Math.random();return n/t}}},d3.sum=function(t,n){var e,r=0,i=t.length,u=-1;if(1===arguments.length)for(;i>++u;)isNaN(e=+t[u])||(r+=e);else for(;i>++u;)isNaN(e=+n.call(t,t[u],u))||(r+=e);return r},d3.quantile=function(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),i=+t[r-1],u=e-r;return u?i+u*(t[r]-i):i},d3.shuffle=function(t){for(var n,e,r=t.length;r;)e=0|Math.random()*r--,n=t[r],t[r]=t[e],t[e]=n;return t},d3.transpose=function(t){return d3.zip.apply(d3,t)},d3.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,n=d3.min(arguments,f),e=Array(n);n>++t;)for(var r,i=-1,u=e[t]=Array(r);r>++i;)u[i]=arguments[i][t];return e},d3.bisector=function(t){return{left:function(n,e,r,i){for(3>arguments.length&&(r=0),4>arguments.length&&(i=n.length);i>r;){var u=r+i>>>1;e>t.call(n,n[u],u)?r=u+1:i=u}return r},right:function(n,e,r,i){for(3>arguments.length&&(r=0),4>arguments.length&&(i=n.length);i>r;){var u=r+i>>>1;t.call(n,n[u],u)>e?i=u:r=u+1}return r}}};var Zu=d3.bisector(function(t){return t});d3.bisectLeft=Zu.left,d3.bisect=d3.bisectRight=Zu.right,d3.nest=function(){function t(n,o){if(o>=a.length)return r?r.call(i,n):e?n.sort(e):n;for(var c,l,s,f=-1,h=n.length,d=a[o++],g=new u,p={};h>++f;)(s=g.get(c=d(l=n[f])))?s.push(l):g.set(c,[l]);return g.forEach(function(n,e){p[n]=t(e,o)}),p}function n(t,e){if(e>=a.length)return t;var r,i=[],u=o[e++];for(r in t)i.push({key:r,values:n(t[r],e)});return u&&i.sort(function(t,n){return u(t.key,n.key)}),i}var e,r,i={},a=[],o=[];return i.map=function(n){return t(n,0)},i.entries=function(e){return n(t(e,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return e=t,i},i.rollup=function(t){return r=t,i},i},d3.keys=function(t){var n=[];for(var e in t)n.push(e);return n},d3.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},d3.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},d3.permute=function(t,n){for(var e=[],r=-1,i=n.length;i>++r;)e[r]=t[n[r]];return e},d3.merge=function(t){return Array.prototype.concat.apply([],t)},d3.range=function(t,n,e){if(3>arguments.length&&(e=1,2>arguments.length&&(n=t,t=0)),1/0===(n-t)/e)throw Error("infinite range");var r,i=[],u=d(Math.abs(e)),a=-1;if(t*=u,n*=u,e*=u,0>e)for(;(r=t+e*++a)>n;)i.push(r/u);else for(;n>(r=t+e*++a);)i.push(r/u);return i},d3.requote=function(t){return t.replace(Bu,"\\$&")};var Bu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(t,n){return n?Math.round(t*(n=Math.pow(10,n)))/n:Math.round(t)},d3.xhr=function(t,n,e){function r(){var t=l.status;!t&&l.responseText||t>=200&&300>t||304===t?u.load.call(i,c.call(i,l)):u.error.call(i,l)}var i={},u=d3.dispatch("progress","load","error"),o={},c=a,l=new(window.XDomainRequest&&/^(http(s)?:)?\/\//.test(t)?XDomainRequest:XMLHttpRequest);return"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(t){var n=d3.event;d3.event=t;try{u.progress.call(i,l)}finally{d3.event=n}},i.header=function(t,n){return t=(t+"").toLowerCase(),2>arguments.length?o[t]:(null==n?delete o[t]:o[t]=n+"",i)},i.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",i):n},i.response=function(t){return c=t,i},["get","post"].forEach(function(t){i[t]=function(){return i.send.apply(i,[t].concat(Yu(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,t,!0),null==n||"accept"in o||(o.accept=n+",*/*"),l.setRequestHeader)for(var a in o)l.setRequestHeader(a,o[a]);return null!=n&&l.overrideMimeType&&l.overrideMimeType(n),null!=u&&i.on("error",u).on("load",function(t){u(null,t)}),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},d3.rebind(i,u,"on"),2===arguments.length&&"function"==typeof n&&(e=n,n=null),null==e?i:i.get(g(e))},d3.text=function(){return d3.xhr.apply(d3,arguments).response(p)},d3.json=function(t,n){return d3.xhr(t,"application/json",n).response(m)},d3.html=function(t,n){return d3.xhr(t,"text/html",n).response(v)},d3.xml=function(){return d3.xhr.apply(d3,arguments).response(y)};var $u={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:$u,qualify:function(t){var n=t.indexOf(":"),e=t;return n>=0&&(e=t.substring(0,n),t=t.substring(n+1)),$u.hasOwnProperty(e)?{space:$u[e],local:t}:t}},d3.dispatch=function(){for(var t=new M,n=-1,e=arguments.length;e>++n;)t[arguments[n]]=b(t);return t},M.prototype.on=function(t,n){var e=t.indexOf("."),r="";return e>0&&(r=t.substring(e+1),t=t.substring(0,e)),2>arguments.length?this[t].on(r):this[t].on(r,n)},d3.format=function(t){var n=Ju.exec(t),e=n[1]||" ",r=n[2]||">",i=n[3]||"",u=n[4]||"",a=n[5],o=+n[6],c=n[7],l=n[8],s=n[9],f=1,h="",d=!1;switch(l&&(l=+l.substring(1)),(a||"0"===e&&"="===r)&&(a=e="0",r="=",c&&(o-=Math.floor((o-1)/4))),s){case"n":c=!0,s="g";break;case"%":f=100,h="%",s="f";break;case"p":f=100,h="%",s="r";break;case"b":case"o":case"x":case"X":u&&(u="0"+s.toLowerCase());case"c":case"d":d=!0,l=0;break;case"s":f=-1,s="r"}"#"===u&&(u=""),"r"!=s||l||(s="g"),s=Gu.get(s)||_;var g=a&&c;return function(t){if(d&&t%1)return"";var n=0>t||0===t&&0>1/t?(t=-t,"-"):i;if(0>f){var p=d3.formatPrefix(t,l);t=p.scale(t),h=p.symbol}else t*=f;t=s(t,l),!a&&c&&(t=Ku(t));var m=u.length+t.length+(g?0:n.length),v=o>m?Array(m=o-m+1).join(e):"";return g&&(t=Ku(v+t)),Cu&&t.replace(".",Cu),n+=u,("<"===r?n+t+v:">"===r?v+n+t:"^"===r?v.substring(0,m>>=1)+n+t+v.substring(m):n+(g?t:v+t))+h}};var Ju=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,Gu=d3.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return d3.round(t,n=x(t,n)).toFixed(Math.max(0,Math.min(20,n)))}}),Ku=a;if(Du){var Wu=Du.length;Ku=function(t){for(var n=t.lastIndexOf("."),e=n>=0?"."+t.substring(n+1):(n=t.length,""),r=[],i=0,u=Du[0];n>0&&u>0;)r.push(t.substring(n-=u,n+u)),u=Du[i=(i+1)%Wu];return r.reverse().join(zu||"")+e}}var Qu=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(w);d3.formatPrefix=function(t,n){var e=0;return t&&(0>t&&(t*=-1),n&&(t=d3.round(t,x(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((0>=e?e+1:e-1)/3)))),Qu[8+e/3]};var ta=function(){return a},na=d3.map({linear:ta,poly:q,quad:function(){return A},cubic:function(){return N},sin:function(){return C},exp:function(){return z},circle:function(){return D},elastic:L,back:F,bounce:function(){return H}}),ea=d3.map({"in":a,out:k,"in-out":E,"out-in":function(t){return E(k(t))}});d3.ease=function(t){var n=t.indexOf("-"),e=n>=0?t.substring(0,n):t,r=n>=0?t.substring(n+1):"in";return e=na.get(e)||ta,r=ea.get(r)||a,S(r(e.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(t){var n=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate();return new O(e?e.matrix:ra)})(t)},O.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ra={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(t,n){for(var e,r=d3.interpolators.length;--r>=0&&!(e=d3.interpolators[r](t,n)););return e},d3.interpolateNumber=function(t,n){return n-=t,function(e){return t+n*e}},d3.interpolateRound=function(t,n){return n-=t,function(e){return Math.round(t+n*e)}},d3.interpolateString=function(t,n){var e,r,i,u,a,o=0,c=0,l=[],s=[];for(ia.lastIndex=0,r=0;e=ia.exec(n);++r)e.index&&l.push(n.substring(o,c=e.index)),s.push({i:l.length,x:e[0]}),l.push(null),o=ia.lastIndex;for(n.length>o&&l.push(n.substring(o)),r=0,u=s.length;(e=ia.exec(t))&&u>r;++r)if(a=s[r],a.x==e[0]){if(a.i)if(null==l[a.i+1])for(l[a.i-1]+=a.x,l.splice(a.i,1),i=r+1;u>i;++i)s[i].i--;else for(l[a.i-1]+=a.x+l[a.i+1],l.splice(a.i,2),i=r+1;u>i;++i)s[i].i-=2;else if(null==l[a.i+1])l[a.i]=a.x;else for(l[a.i]=a.x+l[a.i+1],l.splice(a.i+1,1),i=r+1;u>i;++i)s[i].i--;s.splice(r,1),u--,r--}else a.x=d3.interpolateNumber(parseFloat(e[0]),parseFloat(a.x));for(;u>r;)a=s.pop(),null==l[a.i+1]?l[a.i]=a.x:(l[a.i]=a.x+l[a.i+1],l.splice(a.i+1,1)),u--;return 1===l.length?null==l[0]?s[0].x:function(){return n}:function(t){for(r=0;u>r;++r)l[(a=s[r]).i]=a.x(t);return l.join("")}},d3.interpolateTransform=function(t,n){var e,r=[],i=[],u=d3.transform(t),a=d3.transform(n),o=u.translate,c=a.translate,l=u.rotate,s=a.rotate,f=u.skew,h=a.skew,d=u.scale,g=a.scale;return o[0]!=c[0]||o[1]!=c[1]?(r.push("translate(",null,",",null,")"),i.push({i:1,x:d3.interpolateNumber(o[0],c[0])},{i:3,x:d3.interpolateNumber(o[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),d[0]!=g[0]||d[1]!=g[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:e-4,x:d3.interpolateNumber(d[0],g[0])},{i:e-2,x:d3.interpolateNumber(d[1],g[1])})):(1!=g[0]||1!=g[1])&&r.push(r.pop()+"scale("+g+")"),e=i.length,function(t){for(var n,u=-1;e>++u;)r[(n=i[u]).i]=n.x(t);return r.join("")}},d3.interpolateRgb=function(t,n){t=d3.rgb(t),n=d3.rgb(n);var e=t.r,r=t.g,i=t.b,u=n.r-e,a=n.g-r,o=n.b-i;return function(t){return"#"+G(Math.round(e+u*t))+G(Math.round(r+a*t))+G(Math.round(i+o*t))}},d3.interpolateHsl=function(t,n){t=d3.hsl(t),n=d3.hsl(n);var e=t.h,r=t.s,i=t.l,u=n.h-e,a=n.s-r,o=n.l-i;return u>180?u-=360:-180>u&&(u+=360),function(t){return un(e+u*t,r+a*t,i+o*t)+""}},d3.interpolateLab=function(t,n){t=d3.lab(t),n=d3.lab(n);var e=t.l,r=t.a,i=t.b,u=n.l-e,a=n.a-r,o=n.b-i;return function(t){return fn(e+u*t,r+a*t,i+o*t)+""}},d3.interpolateHcl=function(t,n){t=d3.hcl(t),n=d3.hcl(n);var e=t.h,r=t.c,i=t.l,u=n.h-e,a=n.c-r,o=n.l-i;return u>180?u-=360:-180>u&&(u+=360),function(t){return cn(e+u*t,r+a*t,i+o*t)+""}},d3.interpolateArray=function(t,n){var e,r=[],i=[],u=t.length,a=n.length,o=Math.min(t.length,n.length);for(e=0;o>e;++e)r.push(d3.interpolate(t[e],n[e]));for(;u>e;++e)i[e]=t[e];for(;a>e;++e)i[e]=n[e];return function(t){for(e=0;o>e;++e)i[e]=r[e](t);return i}},d3.interpolateObject=function(t,n){var e,r={},i={};for(e in t)e in n?r[e]=V(e)(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}};var ia=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(t,n){return n instanceof Array&&d3.interpolateArray(t,n)},function(t,n){return("string"==typeof t||"string"==typeof n)&&d3.interpolateString(t+"",n+"")},function(t,n){return("string"==typeof n?aa.has(n)||/^(#|rgb\(|hsl\()/.test(n):n instanceof B)&&d3.interpolateRgb(t,n)},function(t,n){return!isNaN(t=+t)&&!isNaN(n=+n)&&d3.interpolateNumber(t,n)}],B.prototype.toString=function(){return this.rgb()+""},d3.rgb=function(t,n,e){return 1===arguments.length?t instanceof J?$(t.r,t.g,t.b):K(""+t,$,un):$(~~t,~~n,~~e)};var ua=J.prototype=new B;ua.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&i>n&&(n=i),e&&i>e&&(e=i),r&&i>r&&(r=i),$(Math.min(255,Math.floor(n/t)),Math.min(255,Math.floor(e/t)),Math.min(255,Math.floor(r/t)))):$(i,i,i)},ua.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),$(Math.floor(t*this.r),Math.floor(t*this.g),Math.floor(t*this.b)) -},ua.hsl=function(){return W(this.r,this.g,this.b)},ua.toString=function(){return"#"+G(this.r)+G(this.g)+G(this.b)};var aa=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});aa.forEach(function(t,n){aa.set(t,K(n,$,un))}),d3.hsl=function(t,n,e){return 1===arguments.length?t instanceof rn?en(t.h,t.s,t.l):K(""+t,W,en):en(+t,+n,+e)};var oa=rn.prototype=new B;oa.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),en(this.h,this.s,this.l/t)},oa.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),en(this.h,this.s,t*this.l)},oa.rgb=function(){return un(this.h,this.s,this.l)},d3.hcl=function(t,n,e){return 1===arguments.length?t instanceof on?an(t.h,t.c,t.l):t instanceof sn?hn(t.l,t.a,t.b):hn((t=Q((t=d3.rgb(t)).r,t.g,t.b)).l,t.a,t.b):an(+t,+n,+e)};var ca=on.prototype=new B;ca.brighter=function(t){return an(this.h,this.c,Math.min(100,this.l+la*(arguments.length?t:1)))},ca.darker=function(t){return an(this.h,this.c,Math.max(0,this.l-la*(arguments.length?t:1)))},ca.rgb=function(){return cn(this.h,this.c,this.l).rgb()},d3.lab=function(t,n,e){return 1===arguments.length?t instanceof sn?ln(t.l,t.a,t.b):t instanceof on?cn(t.l,t.c,t.h):Q((t=d3.rgb(t)).r,t.g,t.b):ln(+t,+n,+e)};var la=18,sa=.95047,fa=1,ha=1.08883,da=sn.prototype=new B;da.brighter=function(t){return ln(Math.min(100,this.l+la*(arguments.length?t:1)),this.a,this.b)},da.darker=function(t){return ln(Math.max(0,this.l-la*(arguments.length?t:1)),this.a,this.b)},da.rgb=function(){return fn(this.l,this.a,this.b)};var ga=function(t,n){return n.querySelector(t)},pa=function(t,n){return n.querySelectorAll(t)},ma=document.documentElement,va=ma.matchesSelector||ma.webkitMatchesSelector||ma.mozMatchesSelector||ma.msMatchesSelector||ma.oMatchesSelector,ya=function(t,n){return va.call(t,n)};"function"==typeof Sizzle&&(ga=function(t,n){return Sizzle(t,n)[0]||null},pa=function(t,n){return Sizzle.uniqueSort(Sizzle(t,n))},ya=Sizzle.matchesSelector);var Ma=[];d3.selection=function(){return ba},d3.selection.prototype=Ma,Ma.select=function(t){var n,e,r,i,u=[];"function"!=typeof t&&(t=vn(t));for(var a=-1,o=this.length;o>++a;){u.push(n=[]),n.parentNode=(r=this[a]).parentNode;for(var c=-1,l=r.length;l>++c;)(i=r[c])?(n.push(e=t.call(i,i.__data__,c)),e&&"__data__"in i&&(e.__data__=i.__data__)):n.push(null)}return mn(u)},Ma.selectAll=function(t){var n,e,r=[];"function"!=typeof t&&(t=yn(t));for(var i=-1,u=this.length;u>++i;)for(var a=this[i],o=-1,c=a.length;c>++o;)(e=a[o])&&(r.push(n=Yu(t.call(e,e.__data__,o))),n.parentNode=e);return mn(r)},Ma.attr=function(t,n){if(2>arguments.length){if("string"==typeof t){var e=this.node();return t=d3.ns.qualify(t),t.local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(Mn(n,t[n]));return this}return this.each(Mn(t,n))},Ma.classed=function(t,n){if(2>arguments.length){if("string"==typeof t){var e=this.node(),r=(t=t.trim().split(/^|\s+/g)).length,i=-1;if(n=e.classList){for(;r>++i;)if(!n.contains(t[i]))return!1}else for(n=e.className,null!=n.baseVal&&(n=n.baseVal);r>++i;)if(!bn(t[i]).test(n))return!1;return!0}for(n in t)this.each(xn(n,t[n]));return this}return this.each(xn(t,n))},Ma.style=function(t,n,e){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n="");for(e in t)this.each(wn(e,t[e],n));return this}if(2>r)return getComputedStyle(this.node(),null).getPropertyValue(t);e=""}return this.each(wn(t,n,e))},Ma.property=function(t,n){if(2>arguments.length){if("string"==typeof t)return this.node()[t];for(n in t)this.each(Sn(n,t[n]));return this}return this.each(Sn(t,n))},Ma.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ma.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ma.append=function(t){function n(){return this.appendChild(document.createElementNS(this.namespaceURI,t))}function e(){return this.appendChild(document.createElementNS(t.space,t.local))}return t=d3.ns.qualify(t),this.select(t.local?e:n)},Ma.insert=function(t,n){function e(){return this.insertBefore(document.createElementNS(this.namespaceURI,t),ga(n,this))}function r(){return this.insertBefore(document.createElementNS(t.space,t.local),ga(n,this))}return t=d3.ns.qualify(t),this.select(t.local?r:e)},Ma.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},Ma.data=function(t,n){function e(t,e){var r,i,a,o=t.length,f=e.length,h=Math.min(o,f),d=Array(f),g=Array(f),p=Array(o);if(n){var m,v=new u,y=new u,M=[];for(r=-1;o>++r;)m=n.call(i=t[r],i.__data__,r),v.has(m)?p[r]=i:v.set(m,i),M.push(m);for(r=-1;f>++r;)m=n.call(e,a=e[r],r),(i=v.get(m))?(d[r]=i,i.__data__=a):y.has(m)||(g[r]=kn(a)),y.set(m,a),v.remove(m);for(r=-1;o>++r;)v.has(M[r])&&(p[r]=t[r])}else{for(r=-1;h>++r;)i=t[r],a=e[r],i?(i.__data__=a,d[r]=i):g[r]=kn(a);for(;f>r;++r)g[r]=kn(e[r]);for(;o>r;++r)p[r]=t[r]}g.update=d,g.parentNode=d.parentNode=p.parentNode=t.parentNode,c.push(g),l.push(d),s.push(p)}var r,i,a=-1,o=this.length;if(!arguments.length){for(t=Array(o=(r=this[0]).length);o>++a;)(i=r[a])&&(t[a]=i.__data__);return t}var c=qn([]),l=mn([]),s=mn([]);if("function"==typeof t)for(;o>++a;)e(r=this[a],t.call(r,r.parentNode.__data__,a));else for(;o>++a;)e(r=this[a],t);return l.enter=function(){return c},l.exit=function(){return s},l},Ma.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ma.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=En(t));for(var u=0,a=this.length;a>u;u++){i.push(n=[]),n.parentNode=(e=this[u]).parentNode;for(var o=0,c=e.length;c>o;o++)(r=e[o])&&t.call(r,r.__data__,o)&&n.push(r)}return mn(i)},Ma.order=function(){for(var t=-1,n=this.length;n>++t;)for(var e,r=this[t],i=r.length-1,u=r[i];--i>=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Ma.sort=function(t){t=An.apply(this,arguments);for(var n=-1,e=this.length;e>++n;)this[n].sort(t);return this.order()},Ma.on=function(t,n,e){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n=!1);for(e in t)this.each(Nn(e,t[e],n));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;e=!1}return this.each(Nn(t,n,e))},Ma.each=function(t){return Tn(this,function(n,e,r){t.call(n,n.__data__,e,r)})},Ma.call=function(t){var n=Yu(arguments);return t.apply(n[0]=this,n),this},Ma.empty=function(){return!this.node()},Ma.node=function(){for(var t=0,n=this.length;n>t;t++)for(var e=this[t],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},Ma.transition=function(){var t,n,e=_a||++Sa,r=[],i=Object.create(ka);i.time=Date.now();for(var u=-1,a=this.length;a>++u;){r.push(t=[]);for(var o=this[u],c=-1,l=o.length;l>++c;)(n=o[c])&&zn(n,c,e,i),t.push(n)}return Cn(r,e)};var ba=mn([[document]]);ba[0].parentNode=ma,d3.select=function(t){return"string"==typeof t?ba.select(t):mn([[t]])},d3.selectAll=function(t){return"string"==typeof t?ba.selectAll(t):mn([Yu(t)])};var xa=[];d3.selection.enter=qn,d3.selection.enter.prototype=xa,xa.append=Ma.append,xa.insert=Ma.insert,xa.empty=Ma.empty,xa.node=Ma.node,xa.select=function(t){for(var n,e,r,i,u,a=[],o=-1,c=this.length;c>++o;){r=(i=this[o]).update,a.push(n=[]),n.parentNode=i.parentNode;for(var l=-1,s=i.length;s>++l;)(u=i[l])?(n.push(r[l]=e=t.call(i.parentNode,u.__data__,l)),e.__data__=u.__data__):n.push(null)}return mn(a)};var _a,wa=[],Sa=0,ka={ease:T,delay:0,duration:250};wa.call=Ma.call,wa.empty=Ma.empty,wa.node=Ma.node,d3.transition=function(t){return arguments.length?_a?t.transition():t:ba.transition()},d3.transition.prototype=wa,wa.select=function(t){var n,e,r,i=this.id,u=[];"function"!=typeof t&&(t=vn(t));for(var a=-1,o=this.length;o>++a;){u.push(n=[]);for(var c=this[a],l=-1,s=c.length;s>++l;)(r=c[l])&&(e=t.call(r,r.__data__,l))?("__data__"in r&&(e.__data__=r.__data__),zn(e,l,i,r.__transition__[i]),n.push(e)):n.push(null)}return Cn(u,i)},wa.selectAll=function(t){var n,e,r,i,u,a=this.id,o=[];"function"!=typeof t&&(t=yn(t));for(var c=-1,l=this.length;l>++c;)for(var s=this[c],f=-1,h=s.length;h>++f;)if(r=s[f]){u=r.__transition__[a],e=t.call(r,r.__data__,f),o.push(n=[]);for(var d=-1,g=e.length;g>++d;)zn(i=e[d],d,a,u),n.push(i)}return Cn(o,a)},wa.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=En(t));for(var u=0,a=this.length;a>u;u++){i.push(n=[]);for(var e=this[u],o=0,c=e.length;c>o;o++)(r=e[o])&&t.call(r,r.__data__,o)&&n.push(r)}return Cn(i,this.id,this.time).ease(this.ease())},wa.attr=function(t,n){function e(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}if(2>arguments.length){for(n in t)this.attr(n,t[n]);return this}var i=V(t),u=d3.ns.qualify(t);return Ln(this,"attr."+t,n,function(t){function n(){var n,e=this.getAttribute(u);return e!==t&&(n=i(e,t),function(t){this.setAttribute(u,n(t))})}function a(){var n,e=this.getAttributeNS(u.space,u.local);return e!==t&&(n=i(e,t),function(t){this.setAttributeNS(u.space,u.local,n(t))})}return null==t?u.local?r:e:(t+="",u.local?a:n)})},wa.attrTween=function(t,n){function e(t,e){var r=n.call(this,t,e,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,e){var r=n.call(this,t,e,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=d3.ns.qualify(t);return this.tween("attr."+t,i.local?r:e)},wa.style=function(t,n,e){function r(){this.style.removeProperty(t)}var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(n="");for(e in t)this.style(e,t[e],n);return this}e=""}var u=V(t);return Ln(this,"style."+t,n,function(n){function i(){var r,i=getComputedStyle(this,null).getPropertyValue(t);return i!==n&&(r=u(i,n),function(n){this.style.setProperty(t,r(n),e)})}return null==n?r:(n+="",i)})},wa.styleTween=function(t,n,e){return 3>arguments.length&&(e=""),this.tween("style."+t,function(r,i){var u=n.call(this,r,i,getComputedStyle(this,null).getPropertyValue(t));return u&&function(n){this.style.setProperty(t,u(n),e)}})},wa.text=function(t){return Ln(this,"text",t,Dn)},wa.remove=function(){return this.each("end.transition",function(){var t;!this.__transition__&&(t=this.parentNode)&&t.removeChild(this)})},wa.ease=function(t){var n=this.id;return 1>arguments.length?this.node().__transition__[n].ease:("function"!=typeof t&&(t=d3.ease.apply(d3,arguments)),Tn(this,function(e){e.__transition__[n].ease=t}))},wa.delay=function(t){var n=this.id;return Tn(this,"function"==typeof t?function(e,r,i){e.__transition__[n].delay=0|t.call(e,e.__data__,r,i)}:(t|=0,function(e){e.__transition__[n].delay=t}))},wa.duration=function(t){var n=this.id;return Tn(this,"function"==typeof t?function(e,r,i){e.__transition__[n].duration=Math.max(1,0|t.call(e,e.__data__,r,i))}:(t=Math.max(1,0|t),function(e){e.__transition__[n].duration=t}))},wa.each=function(t,n){var e=this.id;if(2>arguments.length){var r=ka,i=_a;_a=e,Tn(this,function(n,r,i){ka=n.__transition__[e],t.call(n,n.__data__,r,i)}),ka=r,_a=i}else Tn(this,function(r){r.__transition__[e].event.on(t,n)});return this},wa.transition=function(){for(var t,n,e,r,i=this.id,u=++Sa,a=[],o=0,c=this.length;c>o;o++){a.push(t=[]);for(var n=this[o],l=0,s=n.length;s>l;l++)(e=n[l])&&(r=Object.create(e.__transition__[i]),r.delay+=r.duration,zn(e,l,u,r)),t.push(e)}return Cn(a,u)},wa.tween=function(t,n){var e=this.id;return 2>arguments.length?this.node().__transition__[e].tween.get(t):Tn(this,null==n?function(n){n.__transition__[e].tween.remove(t)}:function(r){r.__transition__[e].tween.set(t,n)})};var Ea,Aa,Na=0,Ta={},qa=null;d3.timer=function(t,n,e){if(3>arguments.length){if(2>arguments.length)n=0;else if(!isFinite(n))return;e=Date.now()}var r=Ta[t.id];r&&r.callback===t?(r.then=e,r.delay=n):Ta[t.id=++Na]=qa={callback:t,then:e,delay:n,next:qa},Ea||(Aa=clearTimeout(Aa),Ea=1,Ca(Fn))},d3.timer.flush=function(){for(var t,n=Date.now(),e=qa;e;)t=n-e.then,e.delay||(e.flush=e.callback(t)),e=e.next;Hn()};var Ca=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,17)};d3.mouse=function(t){return Rn(t,P())};var za=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(t,n){return 2>arguments.length&&(n=P().touches),n?Yu(n).map(function(n){var e=Rn(t,n);return e.identifier=n.identifier,e}):[]},d3.scale={},d3.scale.linear=function(){return In([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return Kn(d3.scale.linear(),Wn)};var Da=d3.format(".0e");Wn.pow=function(t){return Math.pow(10,t)},Qn.pow=function(t){return-Math.pow(10,-t)},d3.scale.pow=function(){return te(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return ee([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(La)},d3.scale.category20=function(){return d3.scale.ordinal().range(Fa)},d3.scale.category20b=function(){return d3.scale.ordinal().range(Ha)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Ra)};var La=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Fa=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],Ha=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Ra=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return re([],[])},d3.scale.quantize=function(){return ie(0,1,[0,1])},d3.scale.threshold=function(){return ue([.5],[0,1])},d3.scale.identity=function(){return ae([0,1])},d3.svg={},d3.svg.arc=function(){function t(){var t=n.apply(this,arguments),u=e.apply(this,arguments),a=r.apply(this,arguments)+Pa,o=i.apply(this,arguments)+Pa,c=(a>o&&(c=a,a=o,o=c),o-a),l=Ru>c?"0":"1",s=Math.cos(a),f=Math.sin(a),h=Math.cos(o),d=Math.sin(o);return c>=ja?t?"M0,"+u+"A"+u+","+u+" 0 1,1 0,"+-u+"A"+u+","+u+" 0 1,1 0,"+u+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+u+"A"+u+","+u+" 0 1,1 0,"+-u+"A"+u+","+u+" 0 1,1 0,"+u+"Z":t?"M"+u*s+","+u*f+"A"+u+","+u+" 0 "+l+",1 "+u*h+","+u*d+"L"+t*h+","+t*d+"A"+t+","+t+" 0 "+l+",0 "+t*s+","+t*f+"Z":"M"+u*s+","+u*f+"A"+u+","+u+" 0 "+l+",1 "+u*h+","+u*d+"L0,0"+"Z"}var n=oe,e=ce,r=le,i=se;return t.innerRadius=function(e){return arguments.length?(n=c(e),t):n},t.outerRadius=function(n){return arguments.length?(e=c(n),t):e},t.startAngle=function(n){return arguments.length?(r=c(n),t):r},t.endAngle=function(n){return arguments.length?(i=c(n),t):i},t.centroid=function(){var t=(n.apply(this,arguments)+e.apply(this,arguments))/2,u=(r.apply(this,arguments)+i.apply(this,arguments))/2+Pa;return[Math.cos(u)*t,Math.sin(u)*t]},t};var Pa=-Ru/2,ja=2*Ru-1e-6;d3.svg.line=function(){return fe(a)};var Oa=d3.map({linear:ge,"linear-closed":pe,"step-before":me,"step-after":ve,basis:we,"basis-open":Se,"basis-closed":ke,bundle:Ee,cardinal:be,"cardinal-open":ye,"cardinal-closed":Me,monotone:ze});Oa.forEach(function(t,n){n.key=t,n.closed=/-closed$/.test(t)});var Ya=[0,2/3,1/3,0],Ua=[0,1/3,2/3,0],Ia=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var t=fe(De);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},me.reverse=ve,ve.reverse=me,d3.svg.area=function(){return Le(a)},d3.svg.area.radial=function(){var t=Le(De);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},d3.svg.chord=function(){function e(t,n){var e=r(this,o,t,n),c=r(this,l,t,n);return"M"+e.p0+u(e.r,e.p1,e.a1-e.a0)+(i(e,c)?a(e.r,e.p1,e.r,e.p0):a(e.r,e.p1,c.r,c.p0)+u(c.r,c.p1,c.a1-c.a0)+a(c.r,c.p1,e.r,e.p0))+"Z"}function r(t,n,e,r){var i=n.call(t,e,r),u=s.call(t,i,r),a=f.call(t,i,r)+Pa,o=h.call(t,i,r)+Pa;return{r:u,a0:a,a1:o,p0:[u*Math.cos(a),u*Math.sin(a)],p1:[u*Math.cos(o),u*Math.sin(o)]}}function i(t,n){return t.a0==n.a0&&t.a1==n.a1}function u(t,n,e){return"A"+t+","+t+" 0 "+ +(e>Ru)+",1 "+n}function a(t,n,e,r){return"Q 0,0 "+r}var o=n,l=t,s=Fe,f=le,h=se;return e.radius=function(t){return arguments.length?(s=c(t),e):s},e.source=function(t){return arguments.length?(o=c(t),e):o},e.target=function(t){return arguments.length?(l=c(t),e):l},e.startAngle=function(t){return arguments.length?(f=c(t),e):f},e.endAngle=function(t){return arguments.length?(h=c(t),e):h},e},d3.svg.diagonal=function(){function e(t,n){var e=r.call(this,t,n),a=i.call(this,t,n),o=(e.y+a.y)/2,c=[e,{x:e.x,y:o},{x:a.x,y:o},a];return c=c.map(u),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var r=n,i=t,u=He;return e.source=function(t){return arguments.length?(r=c(t),e):r},e.target=function(t){return arguments.length?(i=c(t),e):i},e.projection=function(t){return arguments.length?(u=t,e):u},e},d3.svg.diagonal.radial=function(){var t=d3.svg.diagonal(),n=He,e=t.projection;return t.projection=function(t){return arguments.length?e(Re(n=t)):n},t},d3.svg.symbol=function(){function t(t,r){return(Va.get(n.call(this,t,r))||Oe)(e.call(this,t,r))}var n=je,e=Pe;return t.type=function(e){return arguments.length?(n=c(e),t):n},t.size=function(n){return arguments.length?(e=c(n),t):e},t};var Va=d3.map({circle:Oe,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Za)),e=n*Za;return"M0,"+-n+"L"+e+",0"+" 0,"+n+" "+-e+",0"+"Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/Xa),e=n*Xa/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/Xa),e=n*Xa/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});d3.svg.symbolTypes=Va.keys();var Xa=Math.sqrt(3),Za=Math.tan(30*ju);d3.svg.axis=function(){function t(t){t.each(function(){var t,f=d3.select(this),h=null==l?e.ticks?e.ticks.apply(e,c):e.domain():l,d=null==n?e.tickFormat?e.tickFormat.apply(e,c):String:n,g=Ie(e,h,s),p=f.selectAll(".minor").data(g,String),m=p.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),v=d3.transition(p.exit()).style("opacity",1e-6).remove(),y=d3.transition(p).style("opacity",1),M=f.selectAll("g").data(h,String),b=M.enter().insert("g","path").style("opacity",1e-6),x=d3.transition(M.exit()).style("opacity",1e-6).remove(),_=d3.transition(M).style("opacity",1),w=On(e),S=f.selectAll(".domain").data([0]),k=d3.transition(S),E=e.copy(),A=this.__chart__||E;this.__chart__=E,S.enter().append("path").attr("class","domain"),b.append("line").attr("class","tick"),b.append("text");var N=b.select("line"),T=_.select("line"),q=M.select("text").text(d),C=b.select("text"),z=_.select("text");switch(r){case"bottom":t=Ye,m.attr("y2",u),y.attr("x2",0).attr("y2",u),N.attr("y2",i),C.attr("y",Math.max(i,0)+o),T.attr("x2",0).attr("y2",i),z.attr("x",0).attr("y",Math.max(i,0)+o),q.attr("dy",".71em").style("text-anchor","middle"),k.attr("d","M"+w[0]+","+a+"V0H"+w[1]+"V"+a);break;case"top":t=Ye,m.attr("y2",-u),y.attr("x2",0).attr("y2",-u),N.attr("y2",-i),C.attr("y",-(Math.max(i,0)+o)),T.attr("x2",0).attr("y2",-i),z.attr("x",0).attr("y",-(Math.max(i,0)+o)),q.attr("dy","0em").style("text-anchor","middle"),k.attr("d","M"+w[0]+","+-a+"V0H"+w[1]+"V"+-a);break;case"left":t=Ue,m.attr("x2",-u),y.attr("x2",-u).attr("y2",0),N.attr("x2",-i),C.attr("x",-(Math.max(i,0)+o)),T.attr("x2",-i).attr("y2",0),z.attr("x",-(Math.max(i,0)+o)).attr("y",0),q.attr("dy",".32em").style("text-anchor","end"),k.attr("d","M"+-a+","+w[0]+"H0V"+w[1]+"H"+-a);break;case"right":t=Ue,m.attr("x2",u),y.attr("x2",u).attr("y2",0),N.attr("x2",i),C.attr("x",Math.max(i,0)+o),T.attr("x2",i).attr("y2",0),z.attr("x",Math.max(i,0)+o).attr("y",0),q.attr("dy",".32em").style("text-anchor","start"),k.attr("d","M"+a+","+w[0]+"H0V"+w[1]+"H"+a)}if(e.ticks)b.call(t,A),_.call(t,E),x.call(t,E),m.call(t,A),y.call(t,E),v.call(t,E);else{var D=E.rangeBand()/2,L=function(t){return E(t)+D};b.call(t,L),_.call(t,L)}})}var n,e=d3.scale.linear(),r="bottom",i=6,u=6,a=6,o=3,c=[10],l=null,s=0;return t.scale=function(n){return arguments.length?(e=n,t):e},t.orient=function(n){return arguments.length?(r=n,t):r},t.ticks=function(){return arguments.length?(c=arguments,t):c},t.tickValues=function(n){return arguments.length?(l=n,t):l},t.tickFormat=function(e){return arguments.length?(n=e,t):n},t.tickSize=function(n,e){if(!arguments.length)return i;var r=arguments.length-1;return i=+n,u=r>1?+e:i,a=r>0?+arguments[r]:i,t},t.tickPadding=function(n){return arguments.length?(o=+n,t):o},t.tickSubdivide=function(n){return arguments.length?(s=+n,t):s},t},d3.svg.brush=function(){function t(u){u.each(function(){var u,a=d3.select(this),s=a.selectAll(".background").data([0]),f=a.selectAll(".extent").data([0]),h=a.selectAll(".resize").data(l,String);a.style("pointer-events","all").on("mousedown.brush",i).on("touchstart.brush",i),s.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),f.enter().append("rect").attr("class","extent").style("cursor","move"),h.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Ba[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),h.style("display",t.empty()?"none":null),h.exit().remove(),o&&(u=On(o),s.attr("x",u[0]).attr("width",u[1]-u[0]),e(a)),c&&(u=On(c),s.attr("y",u[0]).attr("height",u[1]-u[0]),r(a)),n(a)})}function n(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+s[+/e$/.test(t)][0]+","+s[+/^s/.test(t)][1]+")"})}function e(t){t.select(".extent").attr("x",s[0][0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1][0]-s[0][0])}function r(t){t.select(".extent").attr("y",s[0][1]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1][1]-s[0][1])}function i(){function i(){var t=d3.event.changedTouches;return t?d3.touches(v,t)[0]:d3.mouse(v)}function l(){32==d3.event.keyCode&&(S||(p=null,k[0]-=s[1][0],k[1]-=s[1][1],S=2),R())}function f(){32==d3.event.keyCode&&2==S&&(k[0]+=s[1][0],k[1]+=s[1][1],S=0,R())}function h(){var t=i(),u=!1;m&&(t[0]+=m[0],t[1]+=m[1]),S||(d3.event.altKey?(p||(p=[(s[0][0]+s[1][0])/2,(s[0][1]+s[1][1])/2]),k[0]=s[+(t[0]<p[0])][0],k[1]=s[+(t[1]<p[1])][1]):p=null),_&&d(t,o,0)&&(e(b),u=!0),w&&d(t,c,1)&&(r(b),u=!0),u&&(n(b),M({type:"brush",mode:S?"move":"resize"}))}function d(t,n,e){var r,i,a=On(n),o=a[0],c=a[1],l=k[e],f=s[1][e]-s[0][e];return S&&(o-=l,c-=f+l),r=Math.max(o,Math.min(c,t[e])),S?i=(r+=l)+f:(p&&(l=Math.max(o,Math.min(c,2*p[e]-r))),r>l?(i=r,r=l):i=l),s[0][e]!==r||s[1][e]!==i?(u=null,s[0][e]=r,s[1][e]=i,!0):void 0}function g(){h(),b.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),d3.select("body").style("cursor",null),E.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),M({type:"brushend"}),R()}var p,m,v=this,y=d3.select(d3.event.target),M=a.of(v,arguments),b=d3.select(v),x=y.datum(),_=!/^(n|s)$/.test(x)&&o,w=!/^(e|w)$/.test(x)&&c,S=y.classed("extent"),k=i(),E=d3.select(window).on("mousemove.brush",h).on("mouseup.brush",g).on("touchmove.brush",h).on("touchend.brush",g).on("keydown.brush",l).on("keyup.brush",f);if(S)k[0]=s[0][0]-k[0],k[1]=s[0][1]-k[1];else if(x){var A=+/w$/.test(x),N=+/^n/.test(x);m=[s[1-A][0]-k[0],s[1-N][1]-k[1]],k[0]=s[A][0],k[1]=s[N][1]}else d3.event.altKey&&(p=k.slice());b.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",y.style("cursor")),M({type:"brushstart"}),h(),R()}var u,a=j(t,"brushstart","brush","brushend"),o=null,c=null,l=$a[0],s=[[0,0],[0,0]];return t.x=function(n){return arguments.length?(o=n,l=$a[!o<<1|!c],t):o},t.y=function(n){return arguments.length?(c=n,l=$a[!o<<1|!c],t):c},t.extent=function(n){var e,r,i,a,l;return arguments.length?(u=[[0,0],[0,0]],o&&(e=n[0],r=n[1],c&&(e=e[0],r=r[0]),u[0][0]=e,u[1][0]=r,o.invert&&(e=o(e),r=o(r)),e>r&&(l=e,e=r,r=l),s[0][0]=0|e,s[1][0]=0|r),c&&(i=n[0],a=n[1],o&&(i=i[1],a=a[1]),u[0][1]=i,u[1][1]=a,c.invert&&(i=c(i),a=c(a)),i>a&&(l=i,i=a,a=l),s[0][1]=0|i,s[1][1]=0|a),t):(n=u||s,o&&(e=n[0][0],r=n[1][0],u||(e=s[0][0],r=s[1][0],o.invert&&(e=o.invert(e),r=o.invert(r)),e>r&&(l=e,e=r,r=l))),c&&(i=n[0][1],a=n[1][1],u||(i=s[0][1],a=s[1][1],c.invert&&(i=c.invert(i),a=c.invert(a)),i>a&&(l=i,i=a,a=l))),o&&c?[[e,i],[r,a]]:o?[e,r]:c&&[i,a])},t.clear=function(){return u=null,s[0][0]=s[0][1]=s[1][0]=s[1][1]=0,t},t.empty=function(){return o&&s[0][0]===s[1][0]||c&&s[0][1]===s[1][1]},d3.rebind(t,a,"on")};var Ba={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},$a=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function t(){this.on("mousedown.drag",n).on("touchstart.drag",n)}function n(){function t(){var t=o.parentNode;return null!=s?d3.touches(t).filter(function(t){return t.identifier===s})[0]:d3.mouse(t)}function n(){if(!o.parentNode)return i();var n=t(),e=n[0]-f[0],r=n[1]-f[1];h|=e|r,f=n,R(),c({type:"drag",x:n[0]+a[0],y:n[1]+a[1],dx:e,dy:r})}function i(){c({type:"dragend"}),h&&(R(),d3.event.target===l&&d.on("click.drag",u,!0)),d.on(null!=s?"touchmove.drag-"+s:"mousemove.drag",null).on(null!=s?"touchend.drag-"+s:"mouseup.drag",null)}function u(){R(),d.on("click.drag",null)}var a,o=this,c=e.of(o,arguments),l=d3.event.target,s=d3.event.touches?d3.event.changedTouches[0].identifier:null,f=t(),h=0,d=d3.select(window).on(null!=s?"touchmove.drag-"+s:"mousemove.drag",n).on(null!=s?"touchend.drag-"+s:"mouseup.drag",i,!0);r?(a=r.apply(o,arguments),a=[a.x-f[0],a.y-f[1]]):a=[0,0],null==s&&R(),c({type:"dragstart"})}var e=j(t,"drag","dragstart","dragend"),r=null;return t.origin=function(n){return arguments.length?(r=n,t):r},d3.rebind(t,e,"on")},d3.behavior.zoom=function(){function t(){this.on("mousedown.zoom",o).on("mousewheel.zoom",c).on("mousemove.zoom",l).on("DOMMouseScroll.zoom",c).on("dblclick.zoom",s).on("touchstart.zoom",f).on("touchmove.zoom",h).on("touchend.zoom",f)}function n(t){return[(t[0]-b[0])/x,(t[1]-b[1])/x]}function e(t){return[t[0]*x+b[0],t[1]*x+b[1]]}function r(t){x=Math.max(_[0],Math.min(_[1],t))}function i(t,n){n=e(n),b[0]+=t[0]-n[0],b[1]+=t[1]-n[1]}function u(){m&&m.domain(p.range().map(function(t){return(t-b[0])/x}).map(p.invert)),y&&y.domain(v.range().map(function(t){return(t-b[1])/x}).map(v.invert))}function a(t){u(),d3.event.preventDefault(),t({type:"zoom",scale:x,translate:b})}function o(){function t(){l=1,i(d3.mouse(u),f),a(o)}function e(){l&&R(),s.on("mousemove.zoom",null).on("mouseup.zoom",null),l&&d3.event.target===c&&s.on("click.zoom",r,!0)}function r(){R(),s.on("click.zoom",null)}var u=this,o=w.of(u,arguments),c=d3.event.target,l=0,s=d3.select(window).on("mousemove.zoom",t).on("mouseup.zoom",e),f=n(d3.mouse(u));window.focus(),R()}function c(){d||(d=n(d3.mouse(this))),r(Math.pow(2,.002*Ve())*x),i(d3.mouse(this),d),a(w.of(this,arguments))}function l(){d=null}function s(){var t=d3.mouse(this),e=n(t),u=Math.log(x)/Math.LN2;r(Math.pow(2,d3.event.shiftKey?Math.ceil(u)-1:Math.floor(u)+1)),i(t,e),a(w.of(this,arguments))}function f(){var t=d3.touches(this),e=Date.now();if(g=x,d={},t.forEach(function(t){d[t.identifier]=n(t)}),R(),1===t.length){if(500>e-M){var u=t[0],o=n(t[0]);r(2*x),i(u,o),a(w.of(this,arguments))}M=e}}function h(){var t=d3.touches(this),n=t[0],e=d[n.identifier];if(u=t[1]){var u,o=d[u.identifier];n=[(n[0]+u[0])/2,(n[1]+u[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],r(d3.event.scale*g)}i(n,e),M=null,a(w.of(this,arguments))}var d,g,p,m,v,y,M,b=[0,0],x=1,_=Ga,w=j(t,"zoom");return t.translate=function(n){return arguments.length?(b=n.map(Number),u(),t):b},t.scale=function(n){return arguments.length?(x=+n,u(),t):x},t.scaleExtent=function(n){return arguments.length?(_=null==n?Ga:n.map(Number),t):_},t.x=function(n){return arguments.length?(m=n,p=n.copy(),b=[0,0],x=1,t):m},t.y=function(n){return arguments.length?(y=n,v=n.copy(),b=[0,0],x=1,t):y},d3.rebind(t,w,"on")};var Ja,Ga=[0,1/0];d3.layout={},d3.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;r>++e;)n.push(Xe(t[e]));return n}},d3.layout.chord=function(){function t(){var t,l,f,h,d,g={},p=[],m=d3.range(u),v=[];for(e=[],r=[],t=0,h=-1;u>++h;){for(l=0,d=-1;u>++d;)l+=i[h][d];p.push(l),v.push(d3.range(u)),t+=l}for(a&&m.sort(function(t,n){return a(p[t],p[n])}),o&&v.forEach(function(t,n){t.sort(function(t,e){return o(i[n][t],i[n][e]) -})}),t=(2*Ru-s*u)/t,l=0,h=-1;u>++h;){for(f=l,d=-1;u>++d;){var y=m[h],M=v[y][d],b=i[y][M],x=l,_=l+=b*t;g[y+"-"+M]={index:y,subindex:M,startAngle:x,endAngle:_,value:b}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/t},l+=s}for(h=-1;u>++h;)for(d=h-1;u>++d;){var w=g[h+"-"+d],S=g[d+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&n()}function n(){e.sort(function(t,n){return c((t.source.value+t.target.value)/2,(n.source.value+n.target.value)/2)})}var e,r,i,u,a,o,c,l={},s=0;return l.matrix=function(t){return arguments.length?(u=(i=t)&&i.length,e=r=null,l):i},l.padding=function(t){return arguments.length?(s=t,e=r=null,l):s},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(o=t,e=null,l):o},l.sortChords=function(t){return arguments.length?(c=t,e&&n(),l):c},l.chords=function(){return e||t(),e},l.groups=function(){return r||t(),r},l},d3.layout.force=function(){function t(t){return function(n,e,r,i){if(n.point!==t){var u=n.cx-t.x,a=n.cy-t.y,o=1/Math.sqrt(u*u+a*a);if(v>(i-e)*o){var c=n.charge*o*o;return t.px-=u*c,t.py-=a*c,!0}if(n.point&&isFinite(o)){var c=n.pointCharge*o*o;t.px-=u*c,t.py-=a*c}}return!n.charge}}function n(t){t.px=d3.event.x,t.py=d3.event.y,l.resume()}var e,r,i,u,o,l={},s=d3.dispatch("start","tick","end"),f=[1,1],h=.9,d=Qe,g=tr,p=-30,m=.1,v=.8,y=[],M=[];return l.tick=function(){if(.005>(r*=.99))return s.end({type:"end",alpha:r=0}),!0;var n,e,a,c,l,d,g,v,b,x=y.length,_=M.length;for(e=0;_>e;++e)a=M[e],c=a.source,l=a.target,v=l.x-c.x,b=l.y-c.y,(d=v*v+b*b)&&(d=r*u[e]*((d=Math.sqrt(d))-i[e])/d,v*=d,b*=d,l.x-=v*(g=c.weight/(l.weight+c.weight)),l.y-=b*g,c.x+=v*(g=1-g),c.y+=b*g);if((g=r*m)&&(v=f[0]/2,b=f[1]/2,e=-1,g))for(;x>++e;)a=y[e],a.x+=(v-a.x)*g,a.y+=(b-a.y)*g;if(p)for(We(n=d3.geom.quadtree(y),r,o),e=-1;x>++e;)(a=y[e]).fixed||n.visit(t(a));for(e=-1;x>++e;)a=y[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*h,a.y-=(a.py-(a.py=a.y))*h);s.tick({type:"tick",alpha:r})},l.nodes=function(t){return arguments.length?(y=t,l):y},l.links=function(t){return arguments.length?(M=t,l):M},l.size=function(t){return arguments.length?(f=t,l):f},l.linkDistance=function(t){return arguments.length?(d=c(t),l):d},l.distance=l.linkDistance,l.linkStrength=function(t){return arguments.length?(g=c(t),l):g},l.friction=function(t){return arguments.length?(h=t,l):h},l.charge=function(t){return arguments.length?(p="function"==typeof t?t:+t,l):p},l.gravity=function(t){return arguments.length?(m=t,l):m},l.theta=function(t){return arguments.length?(v=t,l):v},l.alpha=function(t){return arguments.length?(r?r=t>0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),d3.timer(l.tick)),l):r},l.start=function(){function t(t,r){for(var i,u=n(e),a=-1,o=u.length;o>++a;)if(!isNaN(i=u[a][t]))return i;return Math.random()*r}function n(){if(!a){for(a=[],r=0;s>r;++r)a[r]=[];for(r=0;h>r;++r){var t=M[r];a[t.source.index].push(t.target),a[t.target.index].push(t.source)}}return a[e]}var e,r,a,c,s=y.length,h=M.length,m=f[0],v=f[1];for(e=0;s>e;++e)(c=y[e]).index=e,c.weight=0;for(i=[],u=[],e=0;h>e;++e)c=M[e],"number"==typeof c.source&&(c.source=y[c.source]),"number"==typeof c.target&&(c.target=y[c.target]),i[e]=d.call(this,c,e),u[e]=g.call(this,c,e),++c.source.weight,++c.target.weight;for(e=0;s>e;++e)c=y[e],isNaN(c.x)&&(c.x=t("x",m)),isNaN(c.y)&&(c.y=t("y",v)),isNaN(c.px)&&(c.px=c.x),isNaN(c.py)&&(c.py=c.y);if(o=[],"function"==typeof p)for(e=0;s>e;++e)o[e]=+p.call(this,y[e],e);else for(e=0;s>e;++e)o[e]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){e||(e=d3.behavior.drag().origin(a).on("dragstart",$e).on("drag",n).on("dragend",Je)),this.on("mouseover.force",Ge).on("mouseout.force",Ke).call(e)},d3.rebind(l,s,"on")},d3.layout.partition=function(){function t(n,e,r,i){var u=n.children;if(n.x=e,n.y=n.depth*i,n.dx=r,n.dy=i,u&&(a=u.length)){var a,o,c,l=-1;for(r=n.value?r/n.value:0;a>++l;)t(o=u[l],e,c=o.value*r,i),e+=c}}function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,u=-1;i>++u;)r=Math.max(r,n(e[u]));return 1+r}function e(e,u){var a=r.call(this,e,u);return t(a[0],0,i[0],i[1]/n(a[0])),a}var r=d3.layout.hierarchy(),i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},hr(e,r)},d3.layout.pie=function(){function t(u){var a=u.map(function(e,r){return+n.call(t,e,r)}),o=+("function"==typeof r?r.apply(this,arguments):r),c=(("function"==typeof i?i.apply(this,arguments):i)-r)/d3.sum(a),l=d3.range(u.length);null!=e&&l.sort(e===Ka?function(t,n){return a[n]-a[t]}:function(t,n){return e(u[t],u[n])});var s=[];return l.forEach(function(t){var n;s[t]={data:u[t],value:n=a[t],startAngle:o,endAngle:o+=n*c}}),s}var n=Number,e=Ka,r=0,i=2*Ru;return t.value=function(e){return arguments.length?(n=e,t):n},t.sort=function(n){return arguments.length?(e=n,t):e},t.startAngle=function(n){return arguments.length?(r=n,t):r},t.endAngle=function(n){return arguments.length?(i=n,t):i},t};var Ka={};d3.layout.stack=function(){function t(a,c){var l=a.map(function(e,r){return n.call(t,e,r)}),s=l.map(function(n){return n.map(function(n,e){return[u.call(t,n,e),o.call(t,n,e)]})}),f=e.call(t,s,c);l=d3.permute(l,f),s=d3.permute(s,f);var h,d,g,p=r.call(t,s,c),m=l.length,v=l[0].length;for(d=0;v>d;++d)for(i.call(t,l[0][d],g=p[d],s[0][d][1]),h=1;m>h;++h)i.call(t,l[h][d],g+=s[h-1][d][1],s[h][d][1]);return a}var n=a,e=ir,r=ur,i=rr,u=nr,o=er;return t.values=function(e){return arguments.length?(n=e,t):n},t.order=function(n){return arguments.length?(e="function"==typeof n?n:Wa.get(n)||ir,t):e},t.offset=function(n){return arguments.length?(r="function"==typeof n?n:Qa.get(n)||ur,t):r},t.x=function(n){return arguments.length?(u=n,t):u},t.y=function(n){return arguments.length?(o=n,t):o},t.out=function(n){return arguments.length?(i=n,t):i},t};var Wa=d3.map({"inside-out":function(t){var n,e,r=t.length,i=t.map(ar),u=t.map(or),a=d3.range(r).sort(function(t,n){return i[t]-i[n]}),o=0,c=0,l=[],s=[];for(n=0;r>n;++n)e=a[n],c>o?(o+=u[e],l.push(e)):(c+=u[e],s.push(e));return s.reverse().concat(l)},reverse:function(t){return d3.range(t.length).reverse()},"default":ir}),Qa=d3.map({silhouette:function(t){var n,e,r,i=t.length,u=t[0].length,a=[],o=0,c=[];for(e=0;u>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];r>o&&(o=r),a.push(r)}for(e=0;u>e;++e)c[e]=(o-a[e])/2;return c},wiggle:function(t){var n,e,r,i,u,a,o,c,l,s=t.length,f=t[0],h=f.length,d=[];for(d[0]=c=l=0,e=1;h>e;++e){for(n=0,i=0;s>n;++n)i+=t[n][e][1];for(n=0,u=0,o=f[e][0]-f[e-1][0];s>n;++n){for(r=0,a=(t[n][e][1]-t[n][e-1][1])/(2*o);n>r;++r)a+=(t[r][e][1]-t[r][e-1][1])/o;u+=a*t[n][e][1]}d[e]=c-=i?u/i*o:0,l>c&&(l=c)}for(e=0;h>e;++e)d[e]-=l;return d},expand:function(t){var n,e,r,i=t.length,u=t[0].length,a=1/i,o=[];for(e=0;u>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];if(r)for(n=0;i>n;n++)t[n][e][1]/=r;else for(n=0;i>n;n++)t[n][e][1]=a}for(e=0;u>e;++e)o[e]=0;return o},zero:ur});d3.layout.histogram=function(){function t(t,u){for(var a,o,c=[],l=t.map(e,this),s=r.call(this,l,u),f=i.call(this,s,l,u),u=-1,h=l.length,d=f.length-1,g=n?1:1/h;d>++u;)a=c[u]=[],a.dx=f[u+1]-(a.x=f[u]),a.y=0;if(d>0)for(u=-1;h>++u;)o=l[u],o>=s[0]&&s[1]>=o&&(a=c[d3.bisect(f,o,1,d)-1],a.y+=g,a.push(t[u]));return c}var n=!0,e=Number,r=fr,i=lr;return t.value=function(n){return arguments.length?(e=n,t):e},t.range=function(n){return arguments.length?(r=c(n),t):r},t.bins=function(n){return arguments.length?(i="number"==typeof n?function(t){return sr(t,n)}:c(n),t):i},t.frequency=function(e){return arguments.length?(n=!!e,t):n},t},d3.layout.hierarchy=function(){function t(n,a,o){var c=i.call(e,n,a);if(n.depth=a,o.push(n),c&&(l=c.length)){for(var l,s,f=-1,h=n.children=[],d=0,g=a+1;l>++f;)s=t(c[f],g,o),s.parent=n,h.push(s),d+=s.value;r&&h.sort(r),u&&(n.value=d)}else u&&(n.value=+u.call(e,n,a)||0);return n}function n(t,r){var i=t.children,a=0;if(i&&(o=i.length))for(var o,c=-1,l=r+1;o>++c;)a+=n(i[c],l);else u&&(a=+u.call(e,t,r)||0);return u&&(t.value=a),a}function e(n){var e=[];return t(n,0,e),e}var r=pr,i=dr,u=gr;return e.sort=function(t){return arguments.length?(r=t,e):r},e.children=function(t){return arguments.length?(i=t,e):i},e.value=function(t){return arguments.length?(u=t,e):u},e.revalue=function(t){return n(t,0),t},e},d3.layout.pack=function(){function t(t,i){var u=n.call(this,t,i),a=u[0];a.x=0,a.y=0,Rr(a,function(t){t.r=Math.sqrt(t.value)}),Rr(a,xr);var o=r[0],c=r[1],l=Math.max(2*a.r/o,2*a.r/c);if(e>0){var s=e*l/2;Rr(a,function(t){t.r+=s}),Rr(a,xr),Rr(a,function(t){t.r-=s}),l=Math.max(2*a.r/o,2*a.r/c)}return Sr(a,o/2,c/2,1/l),u}var n=d3.layout.hierarchy().sort(vr),e=0,r=[1,1];return t.size=function(n){return arguments.length?(r=n,t):r},t.padding=function(n){return arguments.length?(e=+n,t):e},hr(t,n)},d3.layout.cluster=function(){function t(t,i){var u,a=n.call(this,t,i),o=a[0],c=0;Rr(o,function(t){var n=t.children;n&&n.length?(t.x=Ar(n),t.y=Er(n)):(t.x=u?c+=e(t,u):0,t.y=0,u=t)});var l=Nr(o),s=Tr(o),f=l.x-e(l,s)/2,h=s.x+e(s,l)/2;return Rr(o,function(t){t.x=(t.x-f)/(h-f)*r[0],t.y=(1-(o.y?t.y/o.y:1))*r[1]}),a}var n=d3.layout.hierarchy().sort(null).value(null),e=qr,r=[1,1];return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(r=n,t):r},hr(t,n)},d3.layout.tree=function(){function t(t,i){function u(t,n){var r=t.children,i=t._tree;if(r&&(a=r.length)){for(var a,c,l,s=r[0],f=s,h=-1;a>++h;)l=r[h],u(l,c),f=o(l,c,f),c=l;Pr(t);var d=.5*(s._tree.prelim+l._tree.prelim);n?(i.prelim=n._tree.prelim+e(t,n),i.mod=i.prelim-d):i.prelim=d}else n&&(i.prelim=n._tree.prelim+e(t,n))}function a(t,n){t.x=t._tree.prelim+n;var e=t.children;if(e&&(r=e.length)){var r,i=-1;for(n+=t._tree.mod;r>++i;)a(e[i],n)}}function o(t,n,r){if(n){for(var i,u=t,a=t,o=n,c=t.parent.children[0],l=u._tree.mod,s=a._tree.mod,f=o._tree.mod,h=c._tree.mod;o=zr(o),u=Cr(u),o&&u;)c=Cr(c),a=zr(a),a._tree.ancestor=t,i=o._tree.prelim+f-u._tree.prelim-l+e(o,u),i>0&&(jr(Or(o,t,r),t,i),l+=i,s+=i),f+=o._tree.mod,l+=u._tree.mod,h+=c._tree.mod,s+=a._tree.mod;o&&!zr(a)&&(a._tree.thread=o,a._tree.mod+=f-s),u&&!Cr(c)&&(c._tree.thread=u,c._tree.mod+=l-h,r=t)}return r}var c=n.call(this,t,i),l=c[0];Rr(l,function(t,n){t._tree={ancestor:t,prelim:0,mod:0,change:0,shift:0,number:n?n._tree.number+1:0}}),u(l),a(l,-l._tree.prelim);var s=Dr(l,Fr),f=Dr(l,Lr),h=Dr(l,Hr),d=s.x-e(s,f)/2,g=f.x+e(f,s)/2,p=h.depth||1;return Rr(l,function(t){t.x=(t.x-d)/(g-d)*r[0],t.y=t.depth/p*r[1],delete t._tree}),c}var n=d3.layout.hierarchy().sort(null).value(null),e=qr,r=[1,1];return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(r=n,t):r},hr(t,n)},d3.layout.treemap=function(){function t(t,n){for(var e,r,i=-1,u=t.length;u>++i;)r=(e=t[i]).value*(0>n?0:n),e.area=isNaN(r)||0>=r?0:r}function n(e){var u=e.children;if(u&&u.length){var a,o,c,l=f(e),s=[],h=u.slice(),g=1/0,p="slice"===d?l.dx:"dice"===d?l.dy:"slice-dice"===d?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(a=h[c-1]),s.area+=a.area,"squarify"!==d||g>=(o=r(s,p))?(h.pop(),g=o):(s.area-=s.pop().area,i(s,p,l,!1),p=Math.min(l.dx,l.dy),s.length=s.area=0,g=1/0);s.length&&(i(s,p,l,!0),s.length=s.area=0),u.forEach(n)}}function e(n){var r=n.children;if(r&&r.length){var u,a=f(n),o=r.slice(),c=[];for(t(o,a.dx*a.dy/n.value),c.area=0;u=o.pop();)c.push(u),c.area+=u.area,null!=u.z&&(i(c,u.z?a.dx:a.dy,a,!o.length),c.length=c.area=0);r.forEach(e)}}function r(t,n){for(var e,r=t.area,i=0,u=1/0,a=-1,o=t.length;o>++a;)(e=t[a].area)&&(u>e&&(u=e),e>i&&(i=e));return r*=r,n*=n,r?Math.max(n*i*g/r,r/(n*u*g)):1/0}function i(t,n,e,r){var i,u=-1,a=t.length,o=e.x,l=e.y,s=n?c(t.area/n):0;if(n==e.dx){for((r||s>e.dy)&&(s=e.dy);a>++u;)i=t[u],i.x=o,i.y=l,i.dy=s,o+=i.dx=Math.min(e.x+e.dx-o,s?c(i.area/s):0);i.z=!0,i.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);a>++u;)i=t[u],i.x=o,i.y=l,i.dx=s,l+=i.dy=Math.min(e.y+e.dy-l,s?c(i.area/s):0);i.z=!1,i.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function u(r){var i=a||o(r),u=i[0];return u.x=0,u.y=0,u.dx=l[0],u.dy=l[1],a&&o.revalue(u),t([u],u.dx*u.dy/u.value),(a?e:n)(u),h&&(a=i),i}var a,o=d3.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Yr,h=!1,d="squarify",g=.5*(1+Math.sqrt(5));return u.size=function(t){return arguments.length?(l=t,u):l},u.padding=function(t){function n(n){var e=t.call(u,n,n.depth);return null==e?Yr(n):Ur(n,"number"==typeof e?[e,e,e,e]:e)}function e(n){return Ur(n,t)}if(!arguments.length)return s;var r;return f=null==(s=t)?Yr:"function"==(r=typeof t)?n:"number"===r?(t=[t,t,t,t],e):e,u},u.round=function(t){return arguments.length?(c=t?Math.round:Number,u):c!=Number},u.sticky=function(t){return arguments.length?(h=t,a=null,u):h},u.ratio=function(t){return arguments.length?(g=t,u):g},u.mode=function(t){return arguments.length?(d=t+"",u):d},hr(u,o)},d3.csv=Ir(",","text/csv"),d3.tsv=Ir(" ","text/tab-separated-values"),d3.geo={},d3.geo.stream=function(t,n){to.hasOwnProperty(t.type)?to[t.type](t,n):Vr(t,n)};var to={Feature:function(t,n){Vr(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;i>++r;)Vr(e[r].geometry,n)}},no={Sphere:function(t,n){n.sphere()},Point:function(t,n){var e=t.coordinates;n.point(e[0],e[1])},MultiPoint:function(t,n){for(var e,r=t.coordinates,i=-1,u=r.length;u>++i;)e=r[i],n.point(e[0],e[1])},LineString:function(t,n){Xr(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;i>++r;)Xr(e[r],n,0)},Polygon:function(t,n){Zr(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;i>++r;)Zr(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;i>++r;)Vr(e[r],n)}};d3.geo.albersUsa=function(){function t(t){return n(t)(t)}function n(t){var n=t[0],a=t[1];return a>50?r:-140>n?i:21>a?u:e}var e=d3.geo.albers(),r=d3.geo.albers().rotate([160,0]).center([0,60]).parallels([55,65]),i=d3.geo.albers().rotate([160,0]).center([0,20]).parallels([8,18]),u=d3.geo.albers().rotate([60,0]).center([0,10]).parallels([8,18]);return t.scale=function(n){return arguments.length?(e.scale(n),r.scale(.6*n),i.scale(n),u.scale(1.5*n),t.translate(e.translate())):e.scale()},t.translate=function(n){if(!arguments.length)return e.translate();var a=e.scale(),o=n[0],c=n[1];return e.translate(n),r.translate([o-.4*a,c+.17*a]),i.translate([o-.19*a,c+.2*a]),u.translate([o+.58*a,c+.43*a]),t},t.scale(e.scale())},(d3.geo.albers=function(){var t=29.5*ju,n=45.5*ju,e=Pi(ei),r=e(t,n);return r.parallels=function(r){return arguments.length?e(t=r[0]*ju,n=r[1]*ju):[t*Ou,n*Ou]},r.rotate([98,0]).center([0,38]).scale(1e3)}).raw=ei;var eo=Vi(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(d3.geo.azimuthalEqualArea=function(){return Ri(eo)}).raw=eo;var ro=Vi(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},a);(d3.geo.azimuthalEquidistant=function(){return Ri(ro)}).raw=ro,d3.geo.bounds=ri(a),d3.geo.centroid=function(t){io=uo=ao=oo=co=0,d3.geo.stream(t,lo);var n;return uo&&Math.abs(n=Math.sqrt(ao*ao+oo*oo+co*co))>Pu?[Math.atan2(oo,ao)*Ou,Math.asin(Math.max(-1,Math.min(1,co/n)))*Ou]:void 0};var io,uo,ao,oo,co,lo={sphere:function(){2>io&&(io=2,uo=ao=oo=co=0)},point:ii,lineStart:ai,lineEnd:oi,polygonStart:function(){2>io&&(io=2,uo=ao=oo=co=0),lo.lineStart=ui},polygonEnd:function(){lo.lineStart=ai}};d3.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,n=Oi(-t[0]*ju,-t[1]*ju,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Ou,t[1]*=Ou}}),{type:"Polygon",coordinates:[i]}}var n,e,r=[0,0],i=6;return t.origin=function(n){return arguments.length?(r=n,t):r},t.angle=function(r){return arguments.length?(e=ci((n=+r)*ju,i*ju),t):n},t.precision=function(r){return arguments.length?(e=ci(n*ju,(i=+r)*ju),t):i},t.angle(90)};var so=si(o,vi,Mi);(d3.geo.equirectangular=function(){return Ri(_i).scale(250/Ru)}).raw=_i.invert=_i;var fo=Vi(function(t){return 1/t},Math.atan);(d3.geo.gnomonic=function(){return Ri(fo)}).raw=fo,d3.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return d3.range(Math.ceil(r/c)*c,e,c).map(a).concat(d3.range(Math.ceil(u/l)*l,i,l).map(o))}var e,r,i,u,a,o,c=22.5,l=c,s=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[a(r).concat(o(i).slice(1),a(e).reverse().slice(1),o(u).reverse().slice(1))]}},t.extent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],u=+n[0][1],i=+n[1][1],r>e&&(n=r,r=e,e=n),u>i&&(n=u,u=i,i=n),t.precision(s)):[[r,u],[e,i]]},t.step=function(n){return arguments.length?(c=+n[0],l=+n[1],t):[c,l]},t.precision=function(n){return arguments.length?(s=+n,a=wi(u,i,s),o=Si(r,e,s),t):s},t.extent([[-180+Pu,-90+Pu],[180-Pu,90-Pu]])},d3.geo.interpolate=function(t,n){return ki(t[0]*ju,t[1]*ju,n[0]*ju,n[1]*ju)},d3.geo.greatArc=function(){function e(){for(var t=r||a.apply(this,arguments),n=i||o.apply(this,arguments),e=u||d3.geo.interpolate(t,n),i=0,l=c/e.distance,s=[t];1>(i+=l);)s.push(e(i));return s.push(n),{type:"LineString",coordinates:s}}var r,i,u,a=n,o=t,c=6*ju;return e.distance=function(){return(u||d3.geo.interpolate(r||a.apply(this,arguments),i||o.apply(this,arguments))).distance},e.source=function(t){return arguments.length?(a=t,r="function"==typeof t?null:t,u=r&&i?d3.geo.interpolate(r,i):null,e):a},e.target=function(t){return arguments.length?(o=t,i="function"==typeof t?null:t,u=r&&i?d3.geo.interpolate(r,i):null,e):o},e.precision=function(t){return arguments.length?(c=t*ju,e):c/ju},e},Ei.invert=function(t,n){return[2*Ru*t,2*Math.atan(Math.exp(2*Ru*n))-Ru/2]},(d3.geo.mercator=function(){return Ri(Ei).scale(500)}).raw=Ei;var ho=Vi(function(){return 1},Math.asin);(d3.geo.orthographic=function(){return Ri(ho)}).raw=ho,d3.geo.path=function(){function t(t){return t&&d3.geo.stream(t,r(i.pointRadius("function"==typeof u?+u.apply(this,arguments):u))),i.result()}var n,e,r,i,u=4.5;return t.area=function(t){return go=0,d3.geo.stream(t,r(mo)),go},t.centroid=function(t){return io=ao=oo=co=0,d3.geo.stream(t,r(vo)),co?[ao/co,oo/co]:void 0},t.bounds=function(t){return ri(r)(t)},t.projection=function(e){return arguments.length?(r=(n=e)?e.stream||Ni(e):a,t):n},t.context=function(n){return arguments.length?(i=null==(e=n)?new Ti:new qi(n),t):e},t.pointRadius=function(n){return arguments.length?(u="function"==typeof n?n:+n,t):u},t.projection(d3.geo.albersUsa()).context(null)};var go,po,mo={point:Pn,lineStart:Pn,lineEnd:Pn,polygonStart:function(){po=0,mo.lineStart=Ci},polygonEnd:function(){mo.lineStart=mo.lineEnd=mo.point=Pn,go+=Math.abs(po/2)}},vo={point:zi,lineStart:Di,lineEnd:Li,polygonStart:function(){vo.lineStart=Fi},polygonEnd:function(){vo.point=zi,vo.lineStart=Di,vo.lineEnd=Li}};d3.geo.area=function(t){return yo=0,d3.geo.stream(t,bo),yo};var yo,Mo,bo={sphere:function(){yo+=4*Ru},point:Pn,lineStart:Pn,lineEnd:Pn,polygonStart:function(){Mo=0,bo.lineStart=Hi},polygonEnd:function(){yo+=0>Mo?4*Ru+Mo:Mo,bo.lineStart=bo.lineEnd=bo.point=Pn}};d3.geo.projection=Ri,d3.geo.projectionMutator=Pi;var xo=Vi(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(d3.geo.stereographic=function(){return Ri(xo)}).raw=xo,d3.geom={},d3.geom.hull=function(t){if(3>t.length)return[];var n,e,r,i,u,a,o,c,l,s,f=t.length,h=f-1,d=[],g=[],p=0;for(n=1;f>n;++n)t[n][1]<t[p][1]?p=n:t[n][1]==t[p][1]&&(p=t[n][0]<t[p][0]?n:p);for(n=0;f>n;++n)n!==p&&(i=t[n][1]-t[p][1],r=t[n][0]-t[p][0],d.push({angle:Math.atan2(i,r),index:n}));for(d.sort(function(t,n){return t.angle-n.angle}),l=d[0].angle,c=d[0].index,o=0,n=1;h>n;++n)e=d[n].index,l==d[n].angle?(r=t[c][0]-t[p][0],i=t[c][1]-t[p][1],u=t[e][0]-t[p][0],a=t[e][1]-t[p][1],r*r+i*i>=u*u+a*a?d[n].index=-1:(d[o].index=-1,l=d[n].angle,o=n,c=e)):(l=d[n].angle,o=n,c=e);for(g.push(p),n=0,e=0;2>n;++e)-1!==d[e].index&&(g.push(d[e].index),n++);for(s=g.length;h>e;++e)if(-1!==d[e].index){for(;!Xi(g[s-2],g[s-1],d[e].index,t);)--s;g[s++]=d[e].index}var m=[];for(n=0;s>n;++n)m.push(t[g[n]]);return m},d3.geom.polygon=function(t){return t.area=function(){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];e>++n;)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return.5*r},t.centroid=function(n){var e,r,i=-1,u=t.length,a=0,o=0,c=t[u-1];for(arguments.length||(n=-1/(6*t.area()));u>++i;)e=c,c=t[i],r=e[0]*c[1]-c[0]*e[1],a+=(e[0]+c[0])*r,o+=(e[1]+c[1])*r;return[a*n,o*n]},t.clip=function(n){for(var e,r,i,u,a,o,c=-1,l=t.length,s=t[l-1];l>++c;){for(e=n.slice(),n.length=0,u=t[c],a=e[(i=e.length)-1],r=-1;i>++r;)o=e[r],Zi(o,s,u)?(Zi(a,s,u)||n.push(Bi(a,o,s,u)),n.push(o)):Zi(a,s,u)&&n.push(Bi(a,o,s,u)),a=o;s=u}return n},t},d3.geom.voronoi=function(t){var n=t.map(function(){return[]}),e=1e6;return $i(t,function(t){var r,i,u,a,o,c;1===t.a&&t.b>=0?(r=t.ep.r,i=t.ep.l):(r=t.ep.l,i=t.ep.r),1===t.a?(o=r?r.y:-e,u=t.c-t.b*o,c=i?i.y:e,a=t.c-t.b*c):(u=r?r.x:-e,o=t.c-t.a*u,a=i?i.x:e,c=t.c-t.a*a);var l=[u,o],s=[a,c];n[t.region.l.index].push(l,s),n[t.region.r.index].push(l,s)}),n=n.map(function(n,e){var r=t[e][0],i=t[e][1],u=n.map(function(t){return Math.atan2(t[0]-r,t[1]-i)});return d3.range(n.length).sort(function(t,n){return u[t]-u[n]}).filter(function(t,n,e){return!n||u[t]-u[e[n-1]]>Pu}).map(function(t){return n[t]})}),n.forEach(function(n,r){var i=n.length;if(!i)return n.push([-e,-e],[-e,e],[e,e],[e,-e]);if(!(i>2)){var u=t[r],a=n[0],o=n[1],c=u[0],l=u[1],s=a[0],f=a[1],h=o[0],d=o[1],g=Math.abs(h-s),p=d-f;if(Pu>Math.abs(p)){var m=f>l?-e:e;n.push([-e,m],[e,m])}else if(Pu>g){var v=s>c?-e:e;n.push([v,-e],[v,e])}else{var m=(s-c)*(d-f)>(h-s)*(f-l)?e:-e,y=Math.abs(p)-g;Pu>Math.abs(y)?n.push([0>p?m:-m,m]):(y>0&&(m*=-1),n.push([-e,m],[e,m]))}}}),n};var _o={l:"r",r:"l"};d3.geom.delaunay=function(t){var n=t.map(function(){return[]}),e=[];return $i(t,function(e){n[e.region.l.index].push(t[e.region.r.index])}),n.forEach(function(n,r){var i=t[r],u=i[0],a=i[1];n.forEach(function(t){t.angle=Math.atan2(t[0]-u,t[1]-a)}),n.sort(function(t,n){return t.angle-n.angle});for(var o=0,c=n.length-1;c>o;o++)e.push([i,n[o],n[o+1]])}),e},d3.geom.quadtree=function(t,n,e,r,i){function u(t,n,e,r,i,u){if(!isNaN(n.x)&&!isNaN(n.y))if(t.leaf){var o=t.point;o?.01>Math.abs(o.x-n.x)+Math.abs(o.y-n.y)?a(t,n,e,r,i,u):(t.point=null,a(t,o,e,r,i,u),a(t,n,e,r,i,u)):t.point=n}else a(t,n,e,r,i,u)}function a(t,n,e,r,i,a){var o=.5*(e+i),c=.5*(r+a),l=n.x>=o,s=n.y>=c,f=(s<<1)+l;t.leaf=!1,t=t.nodes[f]||(t.nodes[f]=Ji()),l?e=o:i=o,s?r=c:a=c,u(t,n,e,r,i,a)}var o,c=-1,l=t.length;if(5>arguments.length)if(3===arguments.length)i=e,r=n,e=n=0;else for(n=e=1/0,r=i=-1/0;l>++c;)o=t[c],n>o.x&&(n=o.x),e>o.y&&(e=o.y),o.x>r&&(r=o.x),o.y>i&&(i=o.y);var s=r-n,f=i-e;s>f?i=e+s:r=n+f;var h=Ji();return h.add=function(t){u(h,t,n,e,r,i)},h.visit=function(t){Gi(t,h,n,e,r,i)},t.forEach(h.add),h},d3.time={};var wo=Date,So=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Ki.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ko.setUTCDate.apply(this._,arguments)},setDay:function(){ko.setUTCDay.apply(this._,arguments)},setFullYear:function(){ko.setUTCFullYear.apply(this._,arguments)},setHours:function(){ko.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ko.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ko.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ko.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ko.setUTCSeconds.apply(this._,arguments)},setTime:function(){ko.setTime.apply(this._,arguments)}};var ko=Date.prototype,Eo="%a %b %e %X %Y",Ao="%m/%d/%Y",No="%H:%M:%S",To=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],qo=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Co=["January","February","March","April","May","June","July","August","September","October","November","December"],zo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];d3.time.format=function(t){function n(n){for(var r,i,u,a=[],o=-1,c=0;e>++o;)37===t.charCodeAt(o)&&(a.push(t.substring(c,o)),null!=(i=jo[r=t.charAt(++o)])&&(r=t.charAt(++o)),(u=Oo[r])&&(r=u(n,null==i?"e"===r?" ":"0":i)),a.push(r),c=o+1);return a.push(t.substring(c,o)),a.join("")}var e=t.length;return n.parse=function(n){var e={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Wi(e,t,n,0);if(r!=n.length)return null;"p"in e&&(e.H=e.H%12+12*e.p);var i=new wo;return i.setFullYear(e.y,e.m,e.d),i.setHours(e.H,e.M,e.S,e.L),i},n.toString=function(){return t},n};var Do=Qi(To),Lo=Qi(qo),Fo=Qi(Co),Ho=tu(Co),Ro=Qi(zo),Po=tu(zo),jo={"-":"",_:" ",0:"0"},Oo={a:function(t){return qo[t.getDay()]},A:function(t){return To[t.getDay()]},b:function(t){return zo[t.getMonth()]},B:function(t){return Co[t.getMonth()]},c:d3.time.format(Eo),d:function(t,n){return nu(t.getDate(),n,2)},e:function(t,n){return nu(t.getDate(),n,2)},H:function(t,n){return nu(t.getHours(),n,2)},I:function(t,n){return nu(t.getHours()%12||12,n,2)},j:function(t,n){return nu(1+d3.time.dayOfYear(t),n,3)},L:function(t,n){return nu(t.getMilliseconds(),n,3)},m:function(t,n){return nu(t.getMonth()+1,n,2)},M:function(t,n){return nu(t.getMinutes(),n,2)},p:function(t){return t.getHours()>=12?"PM":"AM"},S:function(t,n){return nu(t.getSeconds(),n,2)},U:function(t,n){return nu(d3.time.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return nu(d3.time.mondayOfYear(t),n,2)},x:d3.time.format(Ao),X:d3.time.format(No),y:function(t,n){return nu(t.getFullYear()%100,n,2)},Y:function(t,n){return nu(t.getFullYear()%1e4,n,4)},Z:Mu,"%":function(){return"%"}},Yo={a:eu,A:ru,b:iu,B:uu,c:au,d:du,e:du,H:gu,I:gu,L:vu,m:hu,M:pu,p:yu,S:mu,x:ou,X:cu,y:su,Y:lu},Uo=/^\s*\d+/,Io=d3.map({am:0,pm:1});d3.time.format.utc=function(t){function n(t){try{wo=Ki;var n=new wo;return n._=t,e(n)}finally{wo=Date}}var e=d3.time.format(t);return n.parse=function(t){try{wo=Ki;var n=e.parse(t);return n&&n._}finally{wo=Date}},n.toString=e.toString,n};var Vo=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?bu:Vo,bu.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},bu.toString=Vo.toString,d3.time.second=xu(function(t){return new wo(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))},function(t){return t.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=xu(function(t){return new wo(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))},function(t){return t.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=xu(function(t){var n=t.getTimezoneOffset()/60;return new wo(36e5*(Math.floor(t/36e5-n)+n))},function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))},function(t){return t.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=xu(function(t){var n=new wo(1970,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(t){var n=d3.time.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},So.forEach(function(t,n){t=t.toLowerCase(),n=7-n;var e=d3.time[t]=xu(function(t){return(t=d3.time.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=d3.time.year(t).getDay();return Math.floor((d3.time.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});d3.time[t+"s"]=e.range,d3.time[t+"s"].utc=e.utc.range,d3.time[t+"OfYear"]=function(t){var e=d3.time.year(t).getDay();return Math.floor((d3.time.dayOfYear(t)+(e+n)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=xu(function(t){return t=d3.time.day(t),t.setDate(1),t},function(t,n){t.setMonth(t.getMonth()+n)},function(t){return t.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=xu(function(t){return t=d3.time.day(t),t.setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Xo=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Zo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Bo=[[d3.time.format("%Y"),o],[d3.time.format("%B"),function(t){return t.getMonth()}],[d3.time.format("%b %d"),function(t){return 1!=t.getDate()}],[d3.time.format("%a %d"),function(t){return t.getDay()&&1!=t.getDate()}],[d3.time.format("%I %p"),function(t){return t.getHours()}],[d3.time.format("%I:%M"),function(t){return t.getMinutes()}],[d3.time.format(":%S"),function(t){return t.getSeconds()}],[d3.time.format(".%L"),function(t){return t.getMilliseconds()}]],$o=d3.scale.linear(),Jo=Eu(Bo);Zo.year=function(t,n){return $o.domain(t.map(Nu)).ticks(n).map(Au)},d3.time.scale=function(){return wu(d3.scale.linear(),Zo,Jo)};var Go=Zo.map(function(t){return[t[0].utc,t[1]]}),Ko=[[d3.time.format.utc("%Y"),o],[d3.time.format.utc("%B"),function(t){return t.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(t){return 1!=t.getUTCDate()}],[d3.time.format.utc("%a %d"),function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[d3.time.format.utc("%I %p"),function(t){return t.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(t){return t.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(t){return t.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(t){return t.getUTCMilliseconds()}]],Wo=Eu(Ko);Go.year=function(t,n){return $o.domain(t.map(qu)).ticks(n).map(Tu)},d3.time.scale.utc=function(){return wu(d3.scale.linear(),Go,Wo)}})();;// i18next, v1.8.1 -// Copyright (c)2015 Jan Mühlemann (jamuhl). -// Distributed under MIT license -// http://i18next.com -!function(a){function b(a,b){if(!b||"function"==typeof b)return a;for(var c in b)a[c]=b[c];return a}function c(a,b){for(var d in b)d in a?c(a[d],b[d]):a[d]=b[d];return a}function d(a,b,c){var d,e=0,f=a.length,g=void 0===f||"[object Array]"!==Object.prototype.toString.apply(a)||"function"==typeof a;if(c)if(g){for(d in a)if(b.apply(a[d],c)===!1)break}else for(;f>e&&b.apply(a[e++],c)!==!1;);else if(g){for(d in a)if(b.call(a[d],d,a[d])===!1)break}else for(;f>e&&b.call(a[e],e,a[e++])!==!1;);return a}function e(a){return"string"==typeof a?a.replace(/[&<>"'\/]/g,function(a){return Q[a]}):a}function f(a){var b=function(a){if(window.XMLHttpRequest)return a(null,new XMLHttpRequest);if(window.ActiveXObject)try{return a(null,new ActiveXObject("Msxml2.XMLHTTP"))}catch(b){return a(null,new ActiveXObject("Microsoft.XMLHTTP"))}return a(new Error)},c=function(a){if("string"==typeof a)return a;var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")},d=function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},e=function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a=d(a);var c,e,f,g,h,i,j,k="",l=0;do c=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=c>>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k+=b.charAt(g)+b.charAt(h)+b.charAt(i)+b.charAt(j),c=e=f="",g=h=i=j="";while(l<a.length);return k},f=function(){for(var a=arguments[0],b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}return a},g=function(a,d,e,h){"function"==typeof e&&(h=e,e={}),e.cache=e.cache||!1,e.data=e.data||{},e.headers=e.headers||{},e.jsonp=e.jsonp||!1,e.async=void 0===e.async?!0:e.async;var i,j=f({accept:"*/*","content-type":"application/x-www-form-urlencoded;charset=UTF-8"},g.headers,e.headers);if(i="application/json"===j["content-type"]?JSON.stringify(e.data):c(e.data),"GET"===a){var k=[];if(i&&(k.push(i),i=null),e.cache||k.push("_="+(new Date).getTime()),e.jsonp&&(k.push("callback="+e.jsonp),k.push("jsonp="+e.jsonp)),k=k.join("&"),k.length>1&&(d+=d.indexOf("?")>-1?"&"+k:"?"+k),e.jsonp){var l=document.getElementsByTagName("head")[0],m=document.createElement("script");return m.type="text/javascript",m.src=d,void l.appendChild(m)}}b(function(b,c){if(b)return h(b);c.open(a,d,e.async);for(var f in j)j.hasOwnProperty(f)&&c.setRequestHeader(f,j[f]);c.onreadystatechange=function(){if(4===c.readyState){var a=c.responseText||"";if(!h)return;h(c.status,{text:function(){return a},json:function(){try{return JSON.parse(a)}catch(b){return T.error("Can not parse JSON. URL: "+d),{}}}})}},c.send(i)})},h={authBasic:function(a,b){g.headers.Authorization="Basic "+e(a+":"+b)},connect:function(a,b,c){return g("CONNECT",a,b,c)},del:function(a,b,c){return g("DELETE",a,b,c)},get:function(a,b,c){return g("GET",a,b,c)},head:function(a,b,c){return g("HEAD",a,b,c)},headers:function(a){g.headers=a||{}},isAllowed:function(a,b,c){this.options(a,function(a,d){c(-1!==d.text().indexOf(b))})},options:function(a,b,c){return g("OPTIONS",a,b,c)},patch:function(a,b,c){return g("PATCH",a,b,c)},post:function(a,b,c){return g("POST",a,b,c)},put:function(a,b,c){return g("PUT",a,b,c)},trace:function(a,b,c){return g("TRACE",a,b,c)}},i=a.type?a.type.toLowerCase():"get";h[i](a.url,a,function(b,c){200===b||0===b&&c.text()?a.success(c.json(),b,null):a.error(c.text(),b,null)})}function g(a,b){"function"==typeof a&&(b=a,a={}),a=a||{},T.extend(P,a),delete P.fixLng,P.functions&&(delete P.functions,T.extend(T,a.functions)),"string"==typeof P.ns&&(P.ns={namespaces:[P.ns],defaultNs:P.ns}),"string"==typeof P.fallbackNS&&(P.fallbackNS=[P.fallbackNS]),("string"==typeof P.fallbackLng||"boolean"==typeof P.fallbackLng)&&(P.fallbackLng=[P.fallbackLng]),P.interpolationPrefixEscaped=T.regexEscape(P.interpolationPrefix),P.interpolationSuffixEscaped=T.regexEscape(P.interpolationSuffix),P.lng||(P.lng=T.detectLanguage()),M=T.toLanguages(P.lng),H=M[0],T.log("currentLng set to: "+H),P.useCookie&&T.cookie.read(P.cookieName)!==H&&T.cookie.create(P.cookieName,H,P.cookieExpirationTime,P.cookieDomain),P.detectLngFromLocalStorage&&"undefined"!=typeof document&&window.localStorage&&T.localStorage.setItem("i18next_lng",H);var c=B;a.fixLng&&(c=function(a,b){return b=b||{},b.lng=b.lng||c.lng,B(a,b)},c.lng=H),W.setCurrentLng(H),I&&P.setJqueryExt&&u();var d;if(I&&I.Deferred&&(d=I.Deferred()),!P.resStore){var e=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var f=0,g=P.preload.length;g>f;f++)for(var h=T.toLanguages(P.preload[f]),i=0,j=h.length;j>i;i++)e.indexOf(h[i])<0&&e.push(h[i]);return J.sync.load(e,P,function(a,e){K=e,N=!0,b&&b(c),d&&d.resolve(c)}),d?d.promise():void 0}return K=P.resStore,N=!0,b&&b(c),d&&d.resolve(c),d?d.promise():void 0}function h(a,b){"string"==typeof a&&(a=[a]);for(var c=0,d=a.length;d>c;c++)P.preload.indexOf(a[c])<0&&P.preload.push(a[c]);return g(b)}function i(a,b,c,d){"string"!=typeof b?(c=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),K[a]=K[a]||{},K[a][b]=K[a][b]||{},d?T.deepExtend(K[a][b],c):T.extend(K[a][b],c),P.useLocalStorage&&O._storeLocal(K)}function j(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),K[a]=K[a]||{};var c=K[a][b]||{},d=!1;for(var e in c)c.hasOwnProperty(e)&&(d=!0);return d}function k(a,b){return"string"!=typeof b&&(b=P.ns.defaultNs),K[a]=K[a]||{},T.extend({},K[a][b])}function l(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),K[a]=K[a]||{},K[a][b]={},P.useLocalStorage&&O._storeLocal(K)}function m(a,b,c,d){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),K[a]=K[a]||{},K[a][b]=K[a][b]||{};for(var e=c.split(P.keyseparator),f=0,g=K[a][b];e[f];)f==e.length-1?g[e[f]]=d:(null==g[e[f]]&&(g[e[f]]={}),g=g[e[f]]),f++;P.useLocalStorage&&O._storeLocal(K)}function n(a,b,c){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b);for(var d in c)"string"==typeof c[d]&&m(a,b,d,c[d])}function o(a){P.ns.defaultNs=a}function p(a,b){q([a],b)}function q(a,b){var c={dynamicLoad:P.dynamicLoad,resGetPath:P.resGetPath,getAsync:P.getAsync,customLoad:P.customLoad,ns:{namespaces:a,defaultNs:""}},d=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var e=0,f=P.preload.length;f>e;e++)for(var g=T.toLanguages(P.preload[e]),h=0,i=g.length;i>h;h++)d.indexOf(g[h])<0&&d.push(g[h]);for(var j=[],k=0,l=d.length;l>k;k++){var m=!1,n=K[d[k]];if(n)for(var o=0,p=a.length;p>o;o++)n[a[o]]||(m=!0);else m=!0;m&&j.push(d[k])}j.length?J.sync._fetch(j,c,function(c,d){var e=a.length*j.length;T.each(a,function(a,c){P.ns.namespaces.indexOf(c)<0&&P.ns.namespaces.push(c),T.each(j,function(a,f){K[f]=K[f]||{},K[f][c]=d[f][c],e--,0===e&&b&&(P.useLocalStorage&&J.sync._storeLocal(K),b())})})}):b&&b()}function r(a,b,c){return"function"==typeof b?(c=b,b={}):b||(b={}),b.lng=a,g(b,c)}function s(){return H}function t(a){K={},r(H,a)}function u(){function a(a,b,c){if(0!==b.length){var d="text";if(0===b.indexOf("[")){var e=b.split("]");b=e[1],d=e[0].substr(1,e[0].length-1)}b.indexOf(";")===b.length-1&&(b=b.substr(0,b.length-2));var f;if("html"===d)f=P.defaultValueFromContent?I.extend({defaultValue:a.html()},c):c,a.html(I.t(b,f));else if("text"===d)f=P.defaultValueFromContent?I.extend({defaultValue:a.text()},c):c,a.text(I.t(b,f));else if("prepend"===d)f=P.defaultValueFromContent?I.extend({defaultValue:a.html()},c):c,a.prepend(I.t(b,f));else if("append"===d)f=P.defaultValueFromContent?I.extend({defaultValue:a.html()},c):c,a.append(I.t(b,f));else if(0===d.indexOf("data-")){var g=d.substr("data-".length);f=P.defaultValueFromContent?I.extend({defaultValue:a.data(g)},c):c;var h=I.t(b,f);a.data(g,h),a.attr(d,h)}else f=P.defaultValueFromContent?I.extend({defaultValue:a.attr(d)},c):c,a.attr(d,I.t(b,f))}}function b(b,c){var d=b.attr(P.selectorAttr);if(d||"undefined"==typeof d||d===!1||(d=b.text()||b.val()),d){var e=b,f=b.data("i18n-target");if(f&&(e=b.find(f)||b),c||P.useDataAttrOptions!==!0||(c=b.data("i18n-options")),c=c||{},d.indexOf(";")>=0){var g=d.split(";");I.each(g,function(b,d){""!==d&&a(e,d,c)})}else a(e,d,c);P.useDataAttrOptions===!0&&b.data("i18n-options",c)}}I.t=I.t||B,I.fn.i18n=function(a){return this.each(function(){b(I(this),a);var c=I(this).find("["+P.selectorAttr+"]");c.each(function(){b(I(this),a)})})}}function v(a,b,c,d){if(!a)return a;if(d=d||b,a.indexOf(d.interpolationPrefix||P.interpolationPrefix)<0)return a;var e=d.interpolationPrefix?T.regexEscape(d.interpolationPrefix):P.interpolationPrefixEscaped,f=d.interpolationSuffix?T.regexEscape(d.interpolationSuffix):P.interpolationSuffixEscaped,g="HTML"+f,h=b.replace&&"object"==typeof b.replace?b.replace:b;return T.each(h,function(b,h){var i=c?c+P.keyseparator+b:b;"object"==typeof h&&null!==h?a=v(a,h,i,d):d.escapeInterpolation||P.escapeInterpolation?(a=a.replace(new RegExp([e,i,g].join(""),"g"),T.regexReplacementEscape(h)),a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(T.escape(h)))):a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(h))}),a}function w(a,b){var c=",",d="{",e="}",f=T.extend({},b);for(delete f.postProcess;-1!=a.indexOf(P.reusePrefix)&&(L++,!(L>P.maxRecursion));){var g=a.lastIndexOf(P.reusePrefix),h=a.indexOf(P.reuseSuffix,g)+P.reuseSuffix.length,i=a.substring(g,h),j=i.replace(P.reusePrefix,"").replace(P.reuseSuffix,"");if(g>=h)return T.error("there is an missing closing in following translation value",a),"";if(-1!=j.indexOf(c)){var k=j.indexOf(c);if(-1!=j.indexOf(d,k)&&-1!=j.indexOf(e,k)){var l=j.indexOf(d,k),m=j.indexOf(e,l)+e.length;try{f=T.extend(f,JSON.parse(j.substring(l,m))),j=j.substring(0,k)}catch(n){}}}var o=E(j,f);a=a.replace(i,T.regexReplacementEscape(o))}return a}function x(a){return a.context&&("string"==typeof a.context||"number"==typeof a.context)}function y(a){return void 0!==a.count&&"string"!=typeof a.count}function z(a){return void 0!==a.indefinite_article&&"string"!=typeof a.indefinite_article&&a.indefinite_article}function A(a,b){b=b||{};var c=C(a,b),d=F(a,b);return void 0!==d||d===c}function B(a,b){return b=b||{},N?(L=0,E.apply(null,arguments)):(T.log("i18next not finished initialization. you might have called t function before loading resources finished."),b.defaultValue||"")}function C(a,b){return void 0!==b.defaultValue?b.defaultValue:a}function D(){for(var a=[],b=1;b<arguments.length;b++)a.push(arguments[b]);return{postProcess:"sprintf",sprintf:a}}function E(a,b){if(b&&"object"!=typeof b?"sprintf"===P.shortcutFunction?b=D.apply(null,arguments):"defaultValue"===P.shortcutFunction&&(b={defaultValue:b}):b=b||{},"object"==typeof P.defaultVariables&&(b=T.extend({},P.defaultVariables,b)),void 0===a||null===a||""===a)return"";"number"==typeof a&&(a=String(a)),"string"==typeof a&&(a=[a]);var c=a[0];if(a.length>1)for(var d=0;d<a.length&&(c=a[d],!A(c,b));d++);var e,f=C(c,b),g=F(c,b),h=b.lng?T.toLanguages(b.lng,b.fallbackLng):M,i=b.ns||P.ns.defaultNs;c.indexOf(P.nsseparator)>-1&&(e=c.split(P.nsseparator),i=e[0],c=e[1]),void 0===g&&P.sendMissing&&"function"==typeof P.missingKeyHandler&&(b.lng?P.missingKeyHandler(h[0],i,c,f,h):P.missingKeyHandler(P.lng,i,c,f,h));var j;j="string"==typeof P.postProcess&&""!==P.postProcess?[P.postProcess]:"array"==typeof P.postProcess||"object"==typeof P.postProcess?P.postProcess:[],"string"==typeof b.postProcess&&""!==b.postProcess?j=j.concat([b.postProcess]):("array"==typeof b.postProcess||"object"==typeof b.postProcess)&&(j=j.concat(b.postProcess)),void 0!==g&&j.length&&j.forEach(function(a){X[a]&&(g=X[a](g,c,b))});var k=f;if(f.indexOf(P.nsseparator)>-1&&(e=f.split(P.nsseparator),k=e[1]),k===c&&P.parseMissingKey&&(f=P.parseMissingKey(f)),void 0===g&&(f=v(f,b),f=w(f,b),j.length)){var l=C(c,b);j.forEach(function(a){X[a]&&(g=X[a](l,c,b))})}return void 0!==g?g:f}function F(a,b){b=b||{};var c,d,e=C(a,b),f=M;if(!K)return e;if("cimode"===f[0].toLowerCase())return e;if(b.lngs&&(f=b.lngs),b.lng&&(f=T.toLanguages(b.lng,b.fallbackLng),!K[f[0]])){var g=P.getAsync;P.getAsync=!1,J.sync.load(f,P,function(a,b){T.extend(K,b),P.getAsync=g})}var h=b.ns||P.ns.defaultNs;if(a.indexOf(P.nsseparator)>-1){var i=a.split(P.nsseparator);h=i[0],a=i[1]}if(x(b)){c=T.extend({},b),delete c.context,c.defaultValue=P.contextNotFound;var j=h+P.nsseparator+a+"_"+b.context;if(d=B(j,c),d!=P.contextNotFound)return v(d,{context:b.context})}if(y(b,f[0])){c=T.extend({lngs:[f[0]]},b),delete c.count,c._origLng=c._origLng||c.lng||f[0],delete c.lng,c.defaultValue=P.pluralNotFound;var k;if(W.needsPlural(f[0],b.count)){k=h+P.nsseparator+a+P.pluralSuffix;var l=W.get(f[0],b.count);l>=0?k=k+"_"+l:1===l&&(k=h+P.nsseparator+a)}else k=h+P.nsseparator+a;if(d=B(k,c),d!=P.pluralNotFound)return v(d,{count:b.count,interpolationPrefix:b.interpolationPrefix,interpolationSuffix:b.interpolationSuffix});if(!(f.length>1))return c.lng=c._origLng,delete c._origLng,d=B(h+P.nsseparator+a,c),v(d,{count:b.count,interpolationPrefix:b.interpolationPrefix,interpolationSuffix:b.interpolationSuffix});var m=f.slice();if(m.shift(),b=T.extend(b,{lngs:m}),b._origLng=c._origLng,delete b.lng,d=B(h+P.nsseparator+a,b),d!=P.pluralNotFound)return d}if(z(b)){var n=T.extend({},b);delete n.indefinite_article,n.defaultValue=P.indefiniteNotFound;var o=h+P.nsseparator+a+(b.count&&!y(b,f[0])||!b.count?P.indefiniteSuffix:"");if(d=B(o,n),d!=P.indefiniteNotFound)return d}for(var p,q=a.split(P.keyseparator),r=0,s=f.length;s>r&&void 0===p;r++){for(var t=f[r],u=0,A=K[t]&&K[t][h];q[u];)A=A&&A[q[u]],u++;if(void 0!==A){var D=Object.prototype.toString.apply(A);if("string"==typeof A)A=v(A,b),A=w(A,b);else if("[object Array]"!==D||P.returnObjectTrees||b.returnObjectTrees){if(null===A&&P.fallbackOnNull===!0)A=void 0;else if(null!==A)if(P.returnObjectTrees||b.returnObjectTrees){if("[object Number]"!==D&&"[object Function]"!==D&&"[object RegExp]"!==D){var G="[object Array]"===D?[]:{};T.each(A,function(c){G[c]=E(h+P.nsseparator+a+P.keyseparator+c,b)}),A=G}}else P.objectTreeKeyHandler&&"function"==typeof P.objectTreeKeyHandler?A=P.objectTreeKeyHandler(a,A,t,h,b):(A="key '"+h+":"+a+" ("+t+")' returned an object instead of string.",T.log(A))}else A=A.join("\n"),A=v(A,b),A=w(A,b);"string"==typeof A&&""===A.trim()&&P.fallbackOnEmpty===!0&&(A=void 0),p=A}}if(void 0===p&&!b.isFallbackLookup&&(P.fallbackToDefaultNS===!0||P.fallbackNS&&P.fallbackNS.length>0)){if(b.isFallbackLookup=!0,P.fallbackNS.length){for(var H=0,I=P.fallbackNS.length;I>H;H++)if(p=F(P.fallbackNS[H]+P.nsseparator+a,b),p||""===p&&P.fallbackOnEmpty===!1){var L=p.indexOf(P.nsseparator)>-1?p.split(P.nsseparator)[1]:p,N=e.indexOf(P.nsseparator)>-1?e.split(P.nsseparator)[1]:e;if(L!==N)break}}else p=F(a,b);b.isFallbackLookup=!1}return p}function G(){var a,b=P.lngWhitelist||[],c=[];if("undefined"!=typeof window&&!function(){for(var a=window.location.search.substring(1),b=a.split("&"),d=0;d<b.length;d++){var e=b[d].indexOf("=");if(e>0){var f=b[d].substring(0,e);f==P.detectLngQS&&c.push(b[d].substring(e+1))}}}(),P.useCookie&&"undefined"!=typeof document){var d=T.cookie.read(P.cookieName);d&&c.push(d)}if(P.detectLngFromLocalStorage&&"undefined"!=typeof window&&window.localStorage&&c.push(T.localStorage.getItem("i18next_lng")),"undefined"!=typeof navigator){if(navigator.languages)for(var e=0;e<navigator.languages.length;e++)c.push(navigator.languages[e]);navigator.userLanguage&&c.push(navigator.userLanguage),navigator.language&&c.push(navigator.language)}return function(){for(var d=0;d<c.length;d++){var e=c[d];if(e.indexOf("-")>-1){var f=e.split("-");e=P.lowerCaseLng?f[0].toLowerCase()+"-"+f[1].toLowerCase():f[0].toLowerCase()+"-"+f[1].toUpperCase()}if(0===b.length||b.indexOf(e)>-1){a=e;break}}}(),a||(a=P.fallbackLng[0]),a}Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>0&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=c;arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d))));for(var e=d>=0?Math.min(d,c-1):c-Math.abs(d);e>=0;e--)if(e in b&&b[e]===a)return e;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var H,I=a.jQuery||a.Zepto,J={},K={},L=0,M=[],N=!1,O={};"undefined"!=typeof module&&module.exports?module.exports=J:(I&&(I.i18n=I.i18n||J),a.i18n=a.i18n||J),O={load:function(a,b,c){b.useLocalStorage?O._loadLocal(a,b,function(d,e){for(var f=[],g=0,h=a.length;h>g;g++)e[a[g]]||f.push(a[g]);f.length>0?O._fetch(f,b,function(a,b){T.extend(e,b),O._storeLocal(b),c(null,e)}):c(null,e)}):O._fetch(a,b,function(a,b){c(null,b)})},_loadLocal:function(a,b,c){var d={},e=(new Date).getTime();if(window.localStorage){var f=a.length;T.each(a,function(a,g){var h=T.localStorage.getItem("res_"+g);h&&(h=JSON.parse(h),h.i18nStamp&&h.i18nStamp+b.localStorageExpirationTime>e&&(d[g]=h)),f--,0===f&&c(null,d)})}},_storeLocal:function(a){if(window.localStorage)for(var b in a)a[b].i18nStamp=(new Date).getTime(),T.localStorage.setItem("res_"+b,JSON.stringify(a[b]))},_fetch:function(a,b,c){var d=b.ns,e={};if(b.dynamicLoad){var f=function(a,b){c(null,b)};if("function"==typeof b.customLoad)b.customLoad(a,d.namespaces,b,f);else{var g=v(b.resGetPath,{lng:a.join("+"),ns:d.namespaces.join("+")});T.ajax({url:g,success:function(a){T.log("loaded: "+g),f(null,a)},error:function(a,b,c){T.log("failed loading: "+g),f("failed loading resource.json error: "+c)},dataType:"json",async:b.getAsync})}}else{var h,i=d.namespaces.length*a.length;T.each(d.namespaces,function(d,f){T.each(a,function(a,d){var g=function(a,b){a&&(h=h||[],h.push(a)),e[d]=e[d]||{},e[d][f]=b,i--,0===i&&c(h,e)};"function"==typeof b.customLoad?b.customLoad(d,f,b,g):O._fetchOne(d,f,b,g)})})}},_fetchOne:function(a,b,c,d){var e=v(c.resGetPath,{lng:a,ns:b});T.ajax({url:e,success:function(a){T.log("loaded: "+e),d(null,a)},error:function(a,b,c){if(b&&200==b||a&&a.status&&200==a.status)T.error("There is a typo in: "+e);else if(b&&404==b||a&&a.status&&404==a.status)T.log("Does not exist: "+e);else{var f=b?b:a&&a.status?a.status:null;T.log(f+" when loading "+e)}d(c,{})},dataType:"json",async:c.getAsync})},postMissing:function(a,b,c,d,e){var f={};f[c]=d;var g=[];if("fallback"===P.sendMissingTo&&P.fallbackLng[0]!==!1)for(var h=0;h<P.fallbackLng.length;h++)g.push({lng:P.fallbackLng[h],url:v(P.resPostPath,{lng:P.fallbackLng[h],ns:b})});else if("current"===P.sendMissingTo||"fallback"===P.sendMissingTo&&P.fallbackLng[0]===!1)g.push({lng:a,url:v(P.resPostPath,{lng:a,ns:b})});else if("all"===P.sendMissingTo)for(var h=0,i=e.length;i>h;h++)g.push({lng:e[h],url:v(P.resPostPath,{lng:e[h],ns:b})});for(var j=0,k=g.length;k>j;j++){var l=g[j];T.ajax({url:l.url,type:P.sendType,data:f,success:function(){T.log("posted missing key '"+c+"' to: "+l.url);for(var a=c.split("."),e=0,f=K[l.lng][b];a[e];)f=f[a[e]]=e===a.length-1?d:f[a[e]]||{},e++},error:function(){T.log("failed posting missing key '"+c+"' to: "+l.url)},dataType:"json",async:P.postAsync})}},reload:t};var P={lng:void 0,load:"all",preload:[],lowerCaseLng:!1,returnObjectTrees:!1,fallbackLng:["dev"],fallbackNS:[],detectLngQS:"setLng",detectLngFromLocalStorage:!1,ns:"translation",fallbackOnNull:!0,fallbackOnEmpty:!1,fallbackToDefaultNS:!1,nsseparator:":",keyseparator:".",selectorAttr:"data-i18n",debug:!1,resGetPath:"locales/__lng__/__ns__.json",resPostPath:"locales/add/__lng__/__ns__",getAsync:!0,postAsync:!0,resStore:void 0,useLocalStorage:!1,localStorageExpirationTime:6048e5,dynamicLoad:!1,sendMissing:!1,sendMissingTo:"fallback",sendType:"POST",interpolationPrefix:"__",interpolationSuffix:"__",defaultVariables:!1,reusePrefix:"$t(",reuseSuffix:")",pluralSuffix:"_plural",pluralNotFound:["plural_not_found",Math.random()].join(""),contextNotFound:["context_not_found",Math.random()].join(""),escapeInterpolation:!1,indefiniteSuffix:"_indefinite",indefiniteNotFound:["indefinite_not_found",Math.random()].join(""),setJqueryExt:!0,defaultValueFromContent:!0,useDataAttrOptions:!1,cookieExpirationTime:void 0,useCookie:!0,cookieName:"i18next",cookieDomain:void 0,objectTreeKeyHandler:void 0,postProcess:void 0,parseMissingKey:void 0,missingKeyHandler:O.postMissing,shortcutFunction:"sprintf"},Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},R={create:function(a,b,c,d){var e;if(c){var f=new Date;f.setTime(f.getTime()+60*c*1e3),e="; expires="+f.toGMTString()}else e="";d=d?"domain="+d+";":"",document.cookie=a+"="+b+e+";"+d+"path=/"},read:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return null},remove:function(a){this.create(a,"",-1)}},S={create:function(){},read:function(){return null},remove:function(){}},T={extend:I?I.extend:b,deepExtend:c,each:I?I.each:d,ajax:I?I.ajax:"undefined"!=typeof document?f:function(){},cookie:"undefined"!=typeof document?R:S,detectLanguage:G,escape:e,log:function(a){P.debug&&"undefined"!=typeof console&&console.log(a)},error:function(a){"undefined"!=typeof console&&console.error(a)},getCountyIndexOfLng:function(a){var b=0;return("nb-NO"===a||"nn-NO"===a||"nb-no"===a||"nn-no"===a)&&(b=1),b},toLanguages:function(a){function b(a){var b=a;if("string"==typeof a&&a.indexOf("-")>-1){var c=a.split("-");b=P.lowerCaseLng?c[0].toLowerCase()+"-"+c[1].toLowerCase():c[0].toLowerCase()+"-"+c[1].toUpperCase()}else b=P.lowerCaseLng?a.toLowerCase():a;return b}var c=this.log,d=[],e=P.lngWhitelist||!1,f=function(a){!e||e.indexOf(a)>-1?d.push(a):c("rejecting non-whitelisted language: "+a)};if("string"==typeof a&&a.indexOf("-")>-1){var g=a.split("-");"unspecific"!==P.load&&f(b(a)),"current"!==P.load&&f(b(g[this.getCountyIndexOfLng(a)]))}else f(b(a));for(var h=0;h<P.fallbackLng.length;h++)-1===d.indexOf(P.fallbackLng[h])&&P.fallbackLng[h]&&d.push(b(P.fallbackLng[h]));return d},regexEscape:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},regexReplacementEscape:function(a){return"string"==typeof a?a.replace(/\$/g,"$$$$"):a},localStorage:{setItem:function(a,b){if(window.localStorage)try{window.localStorage.setItem(a,b)}catch(c){T.log('failed to set value for key "'+a+'" to localStorage.')}},getItem:function(a,b){if(window.localStorage)try{return window.localStorage.getItem(a,b)}catch(c){return void T.log('failed to get value for key "'+a+'" from localStorage.')}}}};T.applyReplacement=v;var U=[["ach","Acholi",[1,2],1],["af","Afrikaans",[1,2],2],["ak","Akan",[1,2],1],["am","Amharic",[1,2],1],["an","Aragonese",[1,2],2],["ar","Arabic",[0,1,2,3,11,100],5],["arn","Mapudungun",[1,2],1],["ast","Asturian",[1,2],2],["ay","Aymará",[1],3],["az","Azerbaijani",[1,2],2],["be","Belarusian",[1,2,5],4],["bg","Bulgarian",[1,2],2],["bn","Bengali",[1,2],2],["bo","Tibetan",[1],3],["br","Breton",[1,2],1],["bs","Bosnian",[1,2,5],4],["ca","Catalan",[1,2],2],["cgg","Chiga",[1],3],["cs","Czech",[1,2,5],6],["csb","Kashubian",[1,2,5],7],["cy","Welsh",[1,2,3,8],8],["da","Danish",[1,2],2],["de","German",[1,2],2],["dev","Development Fallback",[1,2],2],["dz","Dzongkha",[1],3],["el","Greek",[1,2],2],["en","English",[1,2],2],["eo","Esperanto",[1,2],2],["es","Spanish",[1,2],2],["es_ar","Argentinean Spanish",[1,2],2],["et","Estonian",[1,2],2],["eu","Basque",[1,2],2],["fa","Persian",[1],3],["fi","Finnish",[1,2],2],["fil","Filipino",[1,2],1],["fo","Faroese",[1,2],2],["fr","French",[1,2],9],["fur","Friulian",[1,2],2],["fy","Frisian",[1,2],2],["ga","Irish",[1,2,3,7,11],10],["gd","Scottish Gaelic",[1,2,3,20],11],["gl","Galician",[1,2],2],["gu","Gujarati",[1,2],2],["gun","Gun",[1,2],1],["ha","Hausa",[1,2],2],["he","Hebrew",[1,2],2],["hi","Hindi",[1,2],2],["hr","Croatian",[1,2,5],4],["hu","Hungarian",[1,2],2],["hy","Armenian",[1,2],2],["ia","Interlingua",[1,2],2],["id","Indonesian",[1],3],["is","Icelandic",[1,2],12],["it","Italian",[1,2],2],["ja","Japanese",[1],3],["jbo","Lojban",[1],3],["jv","Javanese",[0,1],13],["ka","Georgian",[1],3],["kk","Kazakh",[1],3],["km","Khmer",[1],3],["kn","Kannada",[1,2],2],["ko","Korean",[1],3],["ku","Kurdish",[1,2],2],["kw","Cornish",[1,2,3,4],14],["ky","Kyrgyz",[1],3],["lb","Letzeburgesch",[1,2],2],["ln","Lingala",[1,2],1],["lo","Lao",[1],3],["lt","Lithuanian",[1,2,10],15],["lv","Latvian",[1,2,0],16],["mai","Maithili",[1,2],2],["mfe","Mauritian Creole",[1,2],1],["mg","Malagasy",[1,2],1],["mi","Maori",[1,2],1],["mk","Macedonian",[1,2],17],["ml","Malayalam",[1,2],2],["mn","Mongolian",[1,2],2],["mnk","Mandinka",[0,1,2],18],["mr","Marathi",[1,2],2],["ms","Malay",[1],3],["mt","Maltese",[1,2,11,20],19],["nah","Nahuatl",[1,2],2],["nap","Neapolitan",[1,2],2],["nb","Norwegian Bokmal",[1,2],2],["ne","Nepali",[1,2],2],["nl","Dutch",[1,2],2],["nn","Norwegian Nynorsk",[1,2],2],["no","Norwegian",[1,2],2],["nso","Northern Sotho",[1,2],2],["oc","Occitan",[1,2],1],["or","Oriya",[2,1],2],["pa","Punjabi",[1,2],2],["pap","Papiamento",[1,2],2],["pl","Polish",[1,2,5],7],["pms","Piemontese",[1,2],2],["ps","Pashto",[1,2],2],["pt","Portuguese",[1,2],2],["pt_br","Brazilian Portuguese",[1,2],2],["rm","Romansh",[1,2],2],["ro","Romanian",[1,2,20],20],["ru","Russian",[1,2,5],4],["sah","Yakut",[1],3],["sco","Scots",[1,2],2],["se","Northern Sami",[1,2],2],["si","Sinhala",[1,2],2],["sk","Slovak",[1,2,5],6],["sl","Slovenian",[5,1,2,3],21],["so","Somali",[1,2],2],["son","Songhay",[1,2],2],["sq","Albanian",[1,2],2],["sr","Serbian",[1,2,5],4],["su","Sundanese",[1],3],["sv","Swedish",[1,2],2],["sw","Swahili",[1,2],2],["ta","Tamil",[1,2],2],["te","Telugu",[1,2],2],["tg","Tajik",[1,2],1],["th","Thai",[1],3],["ti","Tigrinya",[1,2],1],["tk","Turkmen",[1,2],2],["tr","Turkish",[1,2],1],["tt","Tatar",[1],3],["ug","Uyghur",[1],3],["uk","Ukrainian",[1,2,5],4],["ur","Urdu",[1,2],2],["uz","Uzbek",[1,2],1],["vi","Vietnamese",[1],3],["wa","Walloon",[1,2],1],["wo","Wolof",[1],3],["yo","Yoruba",[1,2],2],["zh","Chinese",[1],3]],V={1:function(a){return Number(a>1)},2:function(a){return Number(1!=a)},3:function(){return 0},4:function(a){return Number(a%10==1&&a%100!=11?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},5:function(a){return Number(0===a?0:1==a?1:2==a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5)},6:function(a){return Number(1==a?0:a>=2&&4>=a?1:2)},7:function(a){return Number(1==a?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},8:function(a){return Number(1==a?0:2==a?1:8!=a&&11!=a?2:3)},9:function(a){return Number(a>=2)},10:function(a){return Number(1==a?0:2==a?1:7>a?2:11>a?3:4)},11:function(a){return Number(1==a||11==a?0:2==a||12==a?1:a>2&&20>a?2:3)},12:function(a){return Number(a%10!=1||a%100==11)},13:function(a){return Number(0!==a)},14:function(a){return Number(1==a?0:2==a?1:3==a?2:3)},15:function(a){return Number(a%10==1&&a%100!=11?0:a%10>=2&&(10>a%100||a%100>=20)?1:2)},16:function(a){return Number(a%10==1&&a%100!=11?0:0!==a?1:2)},17:function(a){return Number(1==a||a%10==1?0:1)},18:function(a){return Number(1==a?1:2)},19:function(a){return Number(1==a?0:0===a||a%100>1&&11>a%100?1:a%100>10&&20>a%100?2:3)},20:function(a){return Number(1==a?0:0===a||a%100>0&&20>a%100?1:2)},21:function(a){return Number(a%100==1?1:a%100==2?2:a%100==3||a%100==4?3:0)}},W={rules:function(){var a,b={};for(a=U.length;a--;)b[U[a][0]]={name:U[a][1],numbers:U[a][2],plurals:V[U[a][3]]};return b}(),addRule:function(a,b){W.rules[a]=b},setCurrentLng:function(a){if(!W.currentRule||W.currentRule.lng!==a){var b=a.split("-");W.currentRule={lng:a,rule:W.rules[b[0]]}}},needsPlural:function(a,b){var c,d=a.split("-");return c=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[d[T.getCountyIndexOfLng(a)]],c&&c.numbers.length<=1?!1:1!==this.get(a,b)},get:function(a,b){function c(b,c){var d;if(d=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[b]){var e;e=d.plurals(d.noAbs?c:Math.abs(c));var f=d.numbers[e];return 2===d.numbers.length&&1===d.numbers[0]&&(2===f?f=-1:1===f&&(f=1)),f}return 1===c?"1":"-1"}var d=a.split("-");return c(d[T.getCountyIndexOfLng(a)],b)}},X={},Y=function(a,b){X[a]=b},Z=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,m=c.length,n="",o=[];for(f=0;m>f;f++)if(n=a(c[f]),"string"===n)o.push(c[f]);else if("array"===n){if(h=c[f],h[2])for(e=d[l],g=0;g<h[2].length;g++){if(!e.hasOwnProperty(h[2][g]))throw Z('[sprintf] property "%s" does not exist',h[2][g]);e=e[h[2][g]]}else e=h[1]?d[h[1]]:d[l++];if(/[^s]/.test(h[8])&&"number"!=a(e))throw Z("[sprintf] expecting number but found %s",a(e));switch(h[8]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e,10);break;case"e":e=h[7]?e.toExponential(h[7]):e.toExponential();break;case"f":e=h[7]?parseFloat(e).toFixed(h[7]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&h[7]?e.substring(0,h[7]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(h[8])&&h[3]&&e>=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",o.push(h[5]?e+i:i+e)}return o.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),$=function(a,b){return b.unshift(a),Z.apply(null,b)};Y("sprintf",function(a,b,c){return c.sprintf?"[object Array]"===Object.prototype.toString.apply(c.sprintf)?$(a,c.sprintf):"object"==typeof c.sprintf?Z(a,c.sprintf):a:a}),J.init=g,J.setLng=r,J.preload=h,J.addResourceBundle=i,J.hasResourceBundle=j,J.getResourceBundle=k,J.addResource=m,J.addResources=n,J.removeResourceBundle=l,J.loadNamespace=p,J.loadNamespaces=q,J.setDefaultNamespace=o,J.t=B,J.translate=B,J.exists=A,J.detectLanguage=T.detectLanguage,J.pluralExtensions=W,J.sync=O,J.functions=T,J.lng=s,J.addPostProcessor=Y,J.applyReplacement=T.applyReplacement,J.options=P}("undefined"==typeof exports?window:exports); \ No newline at end of file