diff --git a/desktop.js b/desktop.js new file mode 100644 index 0000000..0596ef3 --- /dev/null +++ b/desktop.js @@ -0,0 +1,23 @@ +const menubar = require('menubar'); +const path = require('path'); + +// enable ES6 (transpiling behind the scene) +require('babel-register'); + +// start frontend server +require('./src/server.js'); + +// start api server +require('./api/api.js'); + +menubar({ + icon: path.join(__dirname, '/desktop/icons/UberLogo.png'), + // transparent: true, + movable: false, + resizable: false, + useContentSize: true, + height: 525, + width: 340, + index: `file://${__dirname}/desktop/app.html`, + y: 30, +}); diff --git a/desktop/app.html b/desktop/app.html index 6a50a80..801653e 100644 --- a/desktop/app.html +++ b/desktop/app.html @@ -4,15 +4,56 @@ and surge also need the callback id to confirme the rate limit. This is not optimal but it works for now... --> + + + diff --git a/desktop/app.js b/desktop/app.js deleted file mode 100644 index 9ea2096..0000000 --- a/desktop/app.js +++ /dev/null @@ -1,21 +0,0 @@ -const menubar = require('menubar'); -const path = require('path'); - -// enable ES6 (transpiling behind the scene) -require('babel-register'); - -// start frontend server -require('../src/server.js'); - -// start api server -require('../api/api.js'); - -menubar({ - icon: path.join(__dirname, '/icons/UberLogo.png'), - // preloadWindow: true, - transparent: true, - height: 525, - width: 340, - index: `file://${__dirname}/app.html`, - y: 30, -}); diff --git a/desktop/webview.css b/desktop/webview.css deleted file mode 100644 index 7f393df..0000000 --- a/desktop/webview.css +++ /dev/null @@ -1,22 +0,0 @@ -body { - width: 340px; - height: 495px; - padding: 0; - margin: 14px 0 0; - position: relative; -} - -body:after { - bottom: 100%; - left: 50%; - border: solid transparent; - content: ''; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - border-color: rgba(255, 255, 255, 0); - border-bottom-color: #fff; - border-width: 14px; - margin-left: -14px; -} diff --git a/desktop/webview.js b/desktop/webview.js deleted file mode 100644 index 8aa54df..0000000 --- a/desktop/webview.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint prefer-template: 0 */ -const webview = document.getElementById('uber'); - -// This is needed to remove facebook login and hide links to browse uber.com -webview.addEventListener('dom-ready', () => { - webview.insertCSS([ - '.btn--link', - '.text-uber-white', - 'p.text--center', - '.btn--facebook', - ].join() + '{display:none!important;}'); - - webview.insertCSS( - 'header.contextual {position:fixed !important;} .wrapper {padding-top: 80px !important;}' - ); - - webview.addEventListener('console-message', (e) => { - console.log('Guest page logged a message:', e.message); - }); - - webview.openDevTools(); -}); diff --git a/index.html b/index.html index d4aba55..174d91f 100755 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ @@ -10,6 +10,6 @@
- + diff --git a/package.json b/package.json index 8517dc6..7480d8d 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { - "name": "FastLane", + "name": "Fastlane", "author": "Pontus Abrahamsson", "homepage": "http://fastlaneapp.co", "version": "1.0.0", - "main": "index.js", + "main": "desktop.js", "private": true, "scripts": { "dev": "webpack -w & node index.js", - "desktop": "webpack -p & electron desktop/app.js", + "desktop": "webpack -p & electron desktop.js", "lint": "./node_modules/eslint/bin/eslint.js \"src/**/?(*.js|*.jsx)\" index.js" }, "dependencies": { @@ -17,8 +17,8 @@ "classnames": "^2.2.3", "express": "^4.13.4", "history": "^2.0.1", - "lodash": "^4.6.1", - "menubar": "4.0.2", + "lodash": "^4.7.0", + "menubar": "4.1.0", "node-fetch": "^1.4.1", "query-string": "^4.1.0", "react": "^0.14.8", @@ -33,7 +33,7 @@ }, "devDependencies": { "babel-core": "^6.7.4", - "babel-eslint": "^6.0.0", + "babel-eslint": "^6.0.2", "babel-loader": "^6.2.4", "babel-plugin-react-transform": "^2.0.2", "babel-plugin-transform-runtime": "^6.6.0", @@ -41,7 +41,7 @@ "babel-preset-react": "^6.5.0", "babel-preset-stage-0": "^6.5.0", "css-loader": "^0.23.1", - "eslint": "^2.5.3", + "eslint": "^2.6.0", "eslint-config-airbnb": "^6.2.0", "eslint-plugin-react": "^4.2.3", "json-loader": "^0.5.4", diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Electron Framework b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Electron Framework new file mode 120000 index 0000000..b0f7c45 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Electron Framework @@ -0,0 +1 @@ +Versions/Current/Electron Framework \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Libraries b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Libraries new file mode 120000 index 0000000..bc941ee --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Libraries @@ -0,0 +1 @@ +Versions/Current/Libraries \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Resources b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework new file mode 100755 index 0000000..26acf8e Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib new file mode 100644 index 0000000..16060d5 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib new file mode 100755 index 0000000..f0d41bc Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..1869803 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + BuildMachineOSBuild + 14B25 + CFBundleExecutable + Electron Framework + CFBundleIdentifier + com.github.electron.framework + CFBundleName + Electron Framework + CFBundlePackageType + FMWK + DTSDKBuild + 14D125 + DTSDKName + macosx10.10 + DTXcode + 0640 + DTXcodeBuild + 6E35b + NSSupportsAutomaticGraphicsSwitching + + + diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib new file mode 100644 index 0000000..31f3a56 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak new file mode 100644 index 0000000..7cc36ab Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/am.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/locale.pak new file mode 100644 index 0000000..da05d69 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ar.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/bg.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/bg.lproj/locale.pak new file mode 100644 index 0000000..ef1a0f8 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/bg.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/bn.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/bn.lproj/locale.pak new file mode 100644 index 0000000..6eb0a2e Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/bn.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ca.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ca.lproj/locale.pak new file mode 100644 index 0000000..040b6c2 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ca.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/content_shell.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/content_shell.pak new file mode 100644 index 0000000..b4fa346 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/content_shell.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler new file mode 100755 index 0000000..8cc4977 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/cs.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/cs.lproj/locale.pak new file mode 100644 index 0000000..cbe9e1b Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/cs.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/da.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/da.lproj/locale.pak new file mode 100644 index 0000000..81bba9c Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/da.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/de.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/de.lproj/locale.pak new file mode 100644 index 0000000..bd0639c Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/de.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/el.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/el.lproj/locale.pak new file mode 100644 index 0000000..50489d0 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/el.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/en.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/en.lproj/locale.pak new file mode 100644 index 0000000..a3cc746 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/en.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/en_GB.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/en_GB.lproj/locale.pak new file mode 100644 index 0000000..f49c4b6 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/en_GB.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/es.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/es.lproj/locale.pak new file mode 100644 index 0000000..06b3759 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/es.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/es_419.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/es_419.lproj/locale.pak new file mode 100644 index 0000000..8af412f Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/es_419.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/et.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/et.lproj/locale.pak new file mode 100644 index 0000000..68b7579 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/et.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fa.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fa.lproj/locale.pak new file mode 100644 index 0000000..7551fec Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fa.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fi.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fi.lproj/locale.pak new file mode 100644 index 0000000..8da6d34 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fi.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fil.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fil.lproj/locale.pak new file mode 100644 index 0000000..29dcf5b Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fil.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fr.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fr.lproj/locale.pak new file mode 100644 index 0000000..332471c Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/fr.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/gu.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/gu.lproj/locale.pak new file mode 100644 index 0000000..0091f23 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/gu.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/he.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/he.lproj/locale.pak new file mode 100644 index 0000000..67b8d6f Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/he.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hi.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hi.lproj/locale.pak new file mode 100644 index 0000000..e358bc3 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hi.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hr.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hr.lproj/locale.pak new file mode 100644 index 0000000..5c808bb Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hr.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hu.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hu.lproj/locale.pak new file mode 100644 index 0000000..ed05dd1 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/hu.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/icudtl.dat b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/icudtl.dat new file mode 100644 index 0000000..065463a Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/icudtl.dat differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/id.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/id.lproj/locale.pak new file mode 100644 index 0000000..1a81310 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/id.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/it.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/it.lproj/locale.pak new file mode 100644 index 0000000..5fdc2ab Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/it.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ja.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ja.lproj/locale.pak new file mode 100644 index 0000000..974178f Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ja.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/kn.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/kn.lproj/locale.pak new file mode 100644 index 0000000..f8a7466 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/kn.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ko.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ko.lproj/locale.pak new file mode 100644 index 0000000..2715fff Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ko.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/lt.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/lt.lproj/locale.pak new file mode 100644 index 0000000..6144b57 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/lt.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/lv.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/lv.lproj/locale.pak new file mode 100644 index 0000000..ed0db36 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/lv.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ml.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ml.lproj/locale.pak new file mode 100644 index 0000000..318d0de Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ml.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/mr.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/mr.lproj/locale.pak new file mode 100644 index 0000000..c3e3911 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/mr.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ms.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ms.lproj/locale.pak new file mode 100644 index 0000000..0c33e8b Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ms.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin new file mode 100644 index 0000000..ccaa95d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin @@ -0,0 +1,19123 @@ + mirrorst +(function(a,b){ +"use strict"; +var c; +var d=a.Array; +var e=a.isNaN; +var f=a.JSON.stringify; +var g; +var h; +var i; +var j=a.Math.min; +var k=b.ImportNow("promise_status_symbol"); +var l=b.ImportNow("promise_value_symbol"); +var m; +var n; +var o; +b.Import(function(p){ +c=p.ErrorToString; +g=p.MakeError; +h=p.MapEntries; +i=p.MapIteratorNext; +m=p.SetIteratorNext; +n=p.SetValues; +o=p.SymbolToString; +}); +var q={ +UNDEFINED_TYPE:'undefined', +NULL_TYPE:'null', +BOOLEAN_TYPE:'boolean', +NUMBER_TYPE:'number', +STRING_TYPE:'string', +SYMBOL_TYPE:'symbol', +OBJECT_TYPE:'object', +FUNCTION_TYPE:'function', +REGEXP_TYPE:'regexp', +ERROR_TYPE:'error', +PROPERTY_TYPE:'property', +INTERNAL_PROPERTY_TYPE:'internalProperty', +FRAME_TYPE:'frame', +SCRIPT_TYPE:'script', +CONTEXT_TYPE:'context', +SCOPE_TYPE:'scope', +PROMISE_TYPE:'promise', +MAP_TYPE:'map', +SET_TYPE:'set', +ITERATOR_TYPE:'iterator', +GENERATOR_TYPE:'generator', +} +var r=0; +var s=-1; +var t=[]; +var u=true; +function MirrorCacheIsEmpty(){ +return r==0&&t.length==0; +} +function ToggleMirrorCache(v){ +u=v; +ClearMirrorCache(); +} +function ClearMirrorCache(v){ +r=0; +t=[]; +} +function ObjectIsPromise(v){ +return(%_IsJSReceiver(v))&& +!(%DebugGetProperty(v,k)===(void 0)); +} +function MakeMirror(v,w){ +var x; +if(!w&&u){ +for(var y in t){ +x=t[y]; +if(x.value()===v){ +return x; +} +if(x.isNumber()&&e(x.value())&& +typeof v=='number'&&e(v)){ +return x; +} +} +} +if((v===(void 0))){ +x=new UndefinedMirror(); +}else if((v===null)){ +x=new NullMirror(); +}else if((typeof(v)==='boolean')){ +x=new BooleanMirror(v); +}else if((typeof(v)==='number')){ +x=new NumberMirror(v); +}else if((typeof(v)==='string')){ +x=new StringMirror(v); +}else if((typeof(v)==='symbol')){ +x=new SymbolMirror(v); +}else if((%_IsArray(v))){ +x=new ArrayMirror(v); +}else if((%_IsDate(v))){ +x=new DateMirror(v); +}else if((%_IsFunction(v))){ +x=new FunctionMirror(v); +}else if((%_IsRegExp(v))){ +x=new RegExpMirror(v); +}else if((%_ClassOf(v)==='Error')){ +x=new ErrorMirror(v); +}else if((%_ClassOf(v)==='Script')){ +x=new ScriptMirror(v); +}else if((%_ClassOf(v)==='Map')||(%_ClassOf(v)==='WeakMap')){ +x=new MapMirror(v); +}else if((%_ClassOf(v)==='Set')||(%_ClassOf(v)==='WeakSet')){ +x=new SetMirror(v); +}else if((%_ClassOf(v)==='Map Iterator')||(%_ClassOf(v)==='Set Iterator')){ +x=new IteratorMirror(v); +}else if(ObjectIsPromise(v)){ +x=new PromiseMirror(v); +}else if((%_ClassOf(v)==='Generator')){ +x=new GeneratorMirror(v); +}else{ +x=new ObjectMirror(v,q.OBJECT_TYPE,w); +} +if(u)t[x.handle()]=x; +return x; +} +function LookupMirror(z){ +if(!u){ +throw g(2,"Mirror cache is disabled"); +} +return t[z]; +} +function GetUndefinedMirror(){ +return MakeMirror((void 0)); +} +function inherits(A,B){ +var C=function(){}; +C.prototype=B.prototype; +A.super_=B.prototype; +A.prototype=new C(); +A.prototype.constructor=A; +} +var D=80; +var E={}; +E.Data=0; +E.DataConstant=2; +E.AccessorConstant=3; +var F={}; +F.None=0; +F.ReadOnly=1; +F.DontEnum=2; +F.DontDelete=4; +var G={Global:0, +Local:1, +With:2, +Closure:3, +Catch:4, +Block:5, +Script:6}; +function Mirror(H){ +this.type_=H; +} +Mirror.prototype.type=function(){ +return this.type_; +}; +Mirror.prototype.isValue=function(){ +return this instanceof ValueMirror; +}; +Mirror.prototype.isUndefined=function(){ +return this instanceof UndefinedMirror; +}; +Mirror.prototype.isNull=function(){ +return this instanceof NullMirror; +}; +Mirror.prototype.isBoolean=function(){ +return this instanceof BooleanMirror; +}; +Mirror.prototype.isNumber=function(){ +return this instanceof NumberMirror; +}; +Mirror.prototype.isString=function(){ +return this instanceof StringMirror; +}; +Mirror.prototype.isSymbol=function(){ +return this instanceof SymbolMirror; +}; +Mirror.prototype.isObject=function(){ +return this instanceof ObjectMirror; +}; +Mirror.prototype.isFunction=function(){ +return this instanceof FunctionMirror; +}; +Mirror.prototype.isUnresolvedFunction=function(){ +return this instanceof UnresolvedFunctionMirror; +}; +Mirror.prototype.isArray=function(){ +return this instanceof ArrayMirror; +}; +Mirror.prototype.isDate=function(){ +return this instanceof DateMirror; +}; +Mirror.prototype.isRegExp=function(){ +return this instanceof RegExpMirror; +}; +Mirror.prototype.isError=function(){ +return this instanceof ErrorMirror; +}; +Mirror.prototype.isPromise=function(){ +return this instanceof PromiseMirror; +}; +Mirror.prototype.isGenerator=function(){ +return this instanceof GeneratorMirror; +}; +Mirror.prototype.isProperty=function(){ +return this instanceof PropertyMirror; +}; +Mirror.prototype.isInternalProperty=function(){ +return this instanceof InternalPropertyMirror; +}; +Mirror.prototype.isFrame=function(){ +return this instanceof FrameMirror; +}; +Mirror.prototype.isScript=function(){ +return this instanceof ScriptMirror; +}; +Mirror.prototype.isContext=function(){ +return this instanceof ContextMirror; +}; +Mirror.prototype.isScope=function(){ +return this instanceof ScopeMirror; +}; +Mirror.prototype.isMap=function(){ +return this instanceof MapMirror; +}; +Mirror.prototype.isSet=function(){ +return this instanceof SetMirror; +}; +Mirror.prototype.isIterator=function(){ +return this instanceof IteratorMirror; +}; +Mirror.prototype.allocateHandle_=function(){ +if(u)this.handle_=r++; +}; +Mirror.prototype.allocateTransientHandle_=function(){ +this.handle_=s--; +}; +Mirror.prototype.toText=function(){ +return"#<"+this.constructor.name+">"; +}; +function ValueMirror(H,v,I){ +%_Call(Mirror,this,H); +this.value_=v; +if(!I){ +this.allocateHandle_(); +}else{ +this.allocateTransientHandle_(); +} +} +inherits(ValueMirror,Mirror); +Mirror.prototype.handle=function(){ +return this.handle_; +}; +ValueMirror.prototype.isPrimitive=function(){ +var H=this.type(); +return H==='undefined'|| +H==='null'|| +H==='boolean'|| +H==='number'|| +H==='string'|| +H==='symbol'; +}; +ValueMirror.prototype.value=function(){ +return this.value_; +}; +function UndefinedMirror(){ +%_Call(ValueMirror,this,q.UNDEFINED_TYPE,(void 0)); +} +inherits(UndefinedMirror,ValueMirror); +UndefinedMirror.prototype.toText=function(){ +return'undefined'; +}; +function NullMirror(){ +%_Call(ValueMirror,this,q.NULL_TYPE,null); +} +inherits(NullMirror,ValueMirror); +NullMirror.prototype.toText=function(){ +return'null'; +}; +function BooleanMirror(v){ +%_Call(ValueMirror,this,q.BOOLEAN_TYPE,v); +} +inherits(BooleanMirror,ValueMirror); +BooleanMirror.prototype.toText=function(){ +return this.value_?'true':'false'; +}; +function NumberMirror(v){ +%_Call(ValueMirror,this,q.NUMBER_TYPE,v); +} +inherits(NumberMirror,ValueMirror); +NumberMirror.prototype.toText=function(){ +return %_NumberToString(this.value_); +}; +function StringMirror(v){ +%_Call(ValueMirror,this,q.STRING_TYPE,v); +} +inherits(StringMirror,ValueMirror); +StringMirror.prototype.length=function(){ +return this.value_.length; +}; +StringMirror.prototype.getTruncatedValue=function(J){ +if(J!=-1&&this.length()>J){ +return this.value_.substring(0,J)+ +'... (length: '+this.length()+')'; +} +return this.value_; +}; +StringMirror.prototype.toText=function(){ +return this.getTruncatedValue(D); +}; +function SymbolMirror(v){ +%_Call(ValueMirror,this,q.SYMBOL_TYPE,v); +} +inherits(SymbolMirror,ValueMirror); +SymbolMirror.prototype.description=function(){ +return %SymbolDescription(%_ValueOf(this.value_)); +} +SymbolMirror.prototype.toText=function(){ +return %_Call(o,this.value_); +} +function ObjectMirror(v,H,I){ +H=H||q.OBJECT_TYPE; +%_Call(ValueMirror,this,H,v,I); +} +inherits(ObjectMirror,ValueMirror); +ObjectMirror.prototype.className=function(){ +return %_ClassOf(this.value_); +}; +ObjectMirror.prototype.constructorFunction=function(){ +return MakeMirror(%DebugGetProperty(this.value_,'constructor')); +}; +ObjectMirror.prototype.prototypeObject=function(){ +return MakeMirror(%DebugGetProperty(this.value_,'prototype')); +}; +ObjectMirror.prototype.protoObject=function(){ +return MakeMirror(%DebugGetPrototype(this.value_)); +}; +ObjectMirror.prototype.hasNamedInterceptor=function(){ +var K=%GetInterceptorInfo(this.value_); +return(K&2)!=0; +}; +ObjectMirror.prototype.hasIndexedInterceptor=function(){ +var K=%GetInterceptorInfo(this.value_); +return(K&1)!=0; +}; +ObjectMirror.prototype.propertyNames=function(){ +return %GetOwnPropertyKeys(this.value_,0); +}; +ObjectMirror.prototype.properties=function(){ +var L=this.propertyNames(); +var M=new d(L.length); +for(var N=0;N'; +}; +ObjectMirror.GetInternalProperties=function(v){ +var M=%DebugGetInternalProperties(v); +var S=[]; +for(var N=0;NZ)return new d(); +var aa=new d(Z-Y+1); +for(var N=Y;N<=Z;N++){ +var P=%DebugGetPropertyDetails(this.value_,(%_ToString(N))); +var v; +if(P){ +v=new PropertyMirror(this,N,P); +}else{ +v=GetUndefinedMirror(); +} +aa[N-Y]=v; +} +return aa; +}; +function DateMirror(v){ +%_Call(ObjectMirror,this,v); +} +inherits(DateMirror,ObjectMirror); +DateMirror.prototype.toText=function(){ +var ab=f(this.value_); +return ab.substring(1,ab.length-1); +}; +function RegExpMirror(v){ +%_Call(ObjectMirror,this,v,q.REGEXP_TYPE); +} +inherits(RegExpMirror,ObjectMirror); +RegExpMirror.prototype.source=function(){ +return this.value_.source; +}; +RegExpMirror.prototype.global=function(){ +return this.value_.global; +}; +RegExpMirror.prototype.ignoreCase=function(){ +return this.value_.ignoreCase; +}; +RegExpMirror.prototype.multiline=function(){ +return this.value_.multiline; +}; +RegExpMirror.prototype.sticky=function(){ +return this.value_.sticky; +}; +RegExpMirror.prototype.unicode=function(){ +return this.value_.unicode; +}; +RegExpMirror.prototype.toText=function(){ +return"/"+this.source()+"/"; +}; +function ErrorMirror(v){ +%_Call(ObjectMirror,this,v,q.ERROR_TYPE); +} +inherits(ErrorMirror,ObjectMirror); +ErrorMirror.prototype.message=function(){ +return this.value_.message; +}; +ErrorMirror.prototype.toText=function(){ +var ac; +try{ +ac=%_Call(c,this.value_); +}catch(e){ +ac='#'; +} +return ac; +}; +function PromiseMirror(v){ +%_Call(ObjectMirror,this,v,q.PROMISE_TYPE); +} +inherits(PromiseMirror,ObjectMirror); +function PromiseGetStatus_(v){ +var ad=%DebugGetProperty(v,k); +if(ad==0)return"pending"; +if(ad==1)return"resolved"; +return"rejected"; +} +function PromiseGetValue_(v){ +return %DebugGetProperty(v,l); +} +PromiseMirror.prototype.status=function(){ +return PromiseGetStatus_(this.value_); +}; +PromiseMirror.prototype.promiseValue=function(){ +return MakeMirror(PromiseGetValue_(this.value_)); +}; +function MapMirror(v){ +%_Call(ObjectMirror,this,v,q.MAP_TYPE); +} +inherits(MapMirror,ObjectMirror); +MapMirror.prototype.entries=function(ae){ +var S=[]; +if((%_ClassOf(this.value_)==='WeakMap')){ +var af=%GetWeakMapEntries(this.value_,ae||0); +for(var N=0;N3){ +this.exception_=P[3]; +this.getter_=P[4]; +this.setter_=P[5]; +} +} +inherits(PropertyMirror,Mirror); +PropertyMirror.prototype.isReadOnly=function(){ +return(this.attributes()&F.ReadOnly)!=0; +}; +PropertyMirror.prototype.isEnum=function(){ +return(this.attributes()&F.DontEnum)==0; +}; +PropertyMirror.prototype.canDelete=function(){ +return(this.attributes()&F.DontDelete)==0; +}; +PropertyMirror.prototype.name=function(){ +return this.name_; +}; +PropertyMirror.prototype.isIndexed=function(){ +for(var N=0;N0; +}; +FrameDetails.prototype.inlinedFrameIndex=function(){ +%CheckExecutionState(this.break_id_); +var aC=aA; +return(this.details_[at]&aC)>>2; +}; +FrameDetails.prototype.argumentCount=function(){ +%CheckExecutionState(this.break_id_); +return this.details_[ao]; +}; +FrameDetails.prototype.argumentName=function(V){ +%CheckExecutionState(this.break_id_); +if(V>=0&&V=0&&V=0&&V=0&&V0){ +for(var N=0;N0){ +S+=this.lineOffset(); +S+='-'; +S+=this.lineOffset()+this.lineCount()-1; +}else{ +S+=this.lineCount(); +} +S+=')'; +return S; +}; +function ContextMirror(bg){ +%_Call(Mirror,this,q.CONTEXT_TYPE); +this.data_=bg; +this.allocateHandle_(); +} +inherits(ContextMirror,Mirror); +ContextMirror.prototype.data=function(){ +return this.data_; +}; +function MakeMirrorSerializer(P,bh){ +return new JSONProtocolSerializer(P,bh); +} +function JSONProtocolSerializer(P,bh){ +this.details_=P; +this.options_=bh; +this.mirrors_=[]; +} +JSONProtocolSerializer.prototype.serializeReference=function(x){ +return this.serialize_(x,true,true); +}; +JSONProtocolSerializer.prototype.serializeValue=function(x){ +var bi=this.serialize_(x,false,true); +return bi; +}; +JSONProtocolSerializer.prototype.serializeReferencedObjects=function(){ +var bj=[]; +var bk=this.mirrors_.length; +for(var N=0;Nthis.maxStringLength_()){ +var bm=x.getTruncatedValue(this.maxStringLength_()); +bj.value=bm; +bj.fromIndex=0; +bj.toIndex=this.maxStringLength_(); +}else{ +bj.value=x.value(); +} +bj.length=x.length(); +break; +case q.SYMBOL_TYPE: +bj.description=x.description(); +break; +case q.OBJECT_TYPE: +case q.FUNCTION_TYPE: +case q.ERROR_TYPE: +case q.REGEXP_TYPE: +case q.PROMISE_TYPE: +case q.GENERATOR_TYPE: +this.serializeObject_(x,bj,P); +break; +case q.PROPERTY_TYPE: +case q.INTERNAL_PROPERTY_TYPE: +throw g(2, +'PropertyMirror cannot be serialized independently'); +break; +case q.FRAME_TYPE: +this.serializeFrame_(x,bj); +break; +case q.SCOPE_TYPE: +this.serializeScope_(x,bj); +break; +case q.SCRIPT_TYPE: +if(x.name()){ +bj.name=x.name(); +} +bj.id=x.id(); +bj.lineOffset=x.lineOffset(); +bj.columnOffset=x.columnOffset(); +bj.lineCount=x.lineCount(); +if(x.data()){ +bj.data=x.data(); +} +if(this.includeSource_()){ +bj.source=x.source(); +}else{ +var bn=x.source().substring(0,80); +bj.sourceStart=bn; +} +bj.sourceLength=x.source().length; +bj.scriptType=x.scriptType(); +bj.compilationType=x.compilationType(); +if(x.compilationType()==1&& +x.evalFromScript()){ +bj.evalFromScript= +this.serializeReference(x.evalFromScript()); +var bo=x.evalFromLocation(); +if(bo){ +bj.evalFromLocation={line:bo.line, +column:bo.column}; +} +if(x.evalFromFunctionName()){ +bj.evalFromFunctionName=x.evalFromFunctionName(); +} +} +if(x.context()){ +bj.context=this.serializeReference(x.context()); +} +break; +case q.CONTEXT_TYPE: +bj.data=x.data(); +break; +} +bj.text=x.toText(); +return bj; +}; +JSONProtocolSerializer.prototype.serializeObject_=function(x,bj, +P){ +bj.className=x.className(); +bj.constructorFunction= +this.serializeReference(x.constructorFunction()); +bj.protoObject=this.serializeReference(x.protoObject()); +bj.prototypeObject=this.serializeReference(x.prototypeObject()); +if(x.hasNamedInterceptor()){ +bj.namedInterceptor=true; +} +if(x.hasIndexedInterceptor()){ +bj.indexedInterceptor=true; +} +if(x.isFunction()){ +bj.name=x.name(); +if(!(x.inferredName()===(void 0))){ +bj.inferredName=x.inferredName(); +} +bj.resolved=x.resolved(); +if(x.resolved()){ +bj.source=x.source(); +} +if(x.script()){ +bj.script=this.serializeReference(x.script()); +bj.scriptId=x.script().id(); +serializeLocationFields(x.sourceLocation(),bj); +} +bj.scopes=[]; +for(var N=0;N0){ +var bs=[]; +for(var N=0;N0){ +return'Infinity'; +}else{ +return'-Infinity'; +} +} +return v; +} +b.InstallFunctions(a,2,[ +"MakeMirror",MakeMirror, +"MakeMirrorSerializer",MakeMirrorSerializer, +"LookupMirror",LookupMirror, +"ToggleMirrorCache",ToggleMirrorCache, +"MirrorCacheIsEmpty",MirrorCacheIsEmpty, +]); +b.InstallConstants(a,[ +"ScopeType",G, +"PropertyType",E, +"PropertyAttribute",F, +"Mirror",Mirror, +"ValueMirror",ValueMirror, +"UndefinedMirror",UndefinedMirror, +"NullMirror",NullMirror, +"BooleanMirror",BooleanMirror, +"NumberMirror",NumberMirror, +"StringMirror",StringMirror, +"SymbolMirror",SymbolMirror, +"ObjectMirror",ObjectMirror, +"FunctionMirror",FunctionMirror, +"UnresolvedFunctionMirror",UnresolvedFunctionMirror, +"ArrayMirror",ArrayMirror, +"DateMirror",DateMirror, +"RegExpMirror",RegExpMirror, +"ErrorMirror",ErrorMirror, +"PromiseMirror",PromiseMirror, +"MapMirror",MapMirror, +"SetMirror",SetMirror, +"IteratorMirror",IteratorMirror, +"GeneratorMirror",GeneratorMirror, +"PropertyMirror",PropertyMirror, +"InternalPropertyMirror",InternalPropertyMirror, +"FrameMirror",FrameMirror, +"ScriptMirror",ScriptMirror, +"ScopeMirror",ScopeMirror, +"FrameDetails",FrameDetails, +]); +b.InstallFunctions(b,2,[ +"ClearMirrorCache",ClearMirrorCache +]); +b.Export(function(bA){ +bA.MirrorType=q; +}); +}) + +debugN +(function(a,b){ +"use strict"; +var c=a.FrameMirror; +var d=a.Array; +var e=a.RegExp; +var f=a.isNaN; +var g=a.JSON.parse; +var h=a.JSON.stringify; +var i=a.LookupMirror; +var j; +var k; +var l=a.MakeMirror; +var m=a.MakeMirrorSerializer; +var n=a.Math.min; +var o=a.Mirror; +var p; +var q=a.parseInt; +var r=a.ValueMirror; +b.Import(function(s){ +j=s.MakeError; +k=s.MakeTypeError; +p=s.MirrorType; +}); +var t=10; +var u={}; +var v=/^(?:\s*(?:\/\*.*?\*\/)*)*/; +u.DebugEvent={Break:1, +Exception:2, +NewFunction:3, +BeforeCompile:4, +AfterCompile:5, +CompileError:6, +PromiseEvent:7, +AsyncTaskEvent:8}; +u.ExceptionBreak={Caught:0, +Uncaught:1}; +u.StepAction={StepOut:0, +StepNext:1, +StepIn:2, +StepFrame:3}; +u.ScriptType={Native:0, +Extension:1, +Normal:2}; +u.ScriptCompilationType={Host:0, +Eval:1, +JSON:2}; +u.ScriptBreakPointType={ScriptId:0, +ScriptName:1, +ScriptRegExp:2}; +u.BreakPositionAlignment={ +Statement:0, +BreakPosition:1 +}; +function ScriptTypeFlag(w){ +return(1<0){ +this.ignoreCount_--; +return false; +} +return true; +}; +function IsBreakPointTriggered(K,F){ +return F.isTriggered(MakeExecutionState(K)); +} +function ScriptBreakPoint(w,script_id_or_name,opt_line,opt_column, +opt_groupId,opt_position_alignment){ +this.type_=w; +if(w==u.ScriptBreakPointType.ScriptId){ +this.script_id_=script_id_or_name; +}else if(w==u.ScriptBreakPointType.ScriptName){ +this.script_name_=script_id_or_name; +}else if(w==u.ScriptBreakPointType.ScriptRegExp){ +this.script_regexp_object_=new e(script_id_or_name); +}else{ +throw j(2,"Unexpected breakpoint type "+w); +} +this.line_=opt_line||0; +this.column_=opt_column; +this.groupId_=opt_groupId; +this.position_alignment_=(opt_position_alignment===(void 0)) +?u.BreakPositionAlignment.Statement:opt_position_alignment; +this.hit_count_=0; +this.active_=true; +this.condition_=null; +this.ignoreCount_=0; +this.break_points_=[]; +} +ScriptBreakPoint.prototype.cloneForOtherScript=function(L){ +var M=new ScriptBreakPoint(u.ScriptBreakPointType.ScriptId, +L.id,this.line_,this.column_,this.groupId_, +this.position_alignment_); +M.number_=y++; +A.push(M); +M.hit_count_=this.hit_count_; +M.active_=this.active_; +M.condition_=this.condition_; +M.ignoreCount_=this.ignoreCount_; +return M; +}; +ScriptBreakPoint.prototype.number=function(){ +return this.number_; +}; +ScriptBreakPoint.prototype.groupId=function(){ +return this.groupId_; +}; +ScriptBreakPoint.prototype.type=function(){ +return this.type_; +}; +ScriptBreakPoint.prototype.script_id=function(){ +return this.script_id_; +}; +ScriptBreakPoint.prototype.script_name=function(){ +return this.script_name_; +}; +ScriptBreakPoint.prototype.script_regexp_object=function(){ +return this.script_regexp_object_; +}; +ScriptBreakPoint.prototype.line=function(){ +return this.line_; +}; +ScriptBreakPoint.prototype.column=function(){ +return this.column_; +}; +ScriptBreakPoint.prototype.actual_locations=function(){ +var N=[]; +for(var O=0;O=this.frameCount()){ +throw k(31); +} +return new c(this.break_id,aB); +}; +ExecutionState.prototype.setSelectedFrame=function(aC){ +var O=(%_ToNumber(aC)); +if(O<0||O>=this.frameCount()){ +throw k(31); +} +this.selected_frame=O; +}; +ExecutionState.prototype.selectedFrame=function(){ +return this.selected_frame; +}; +ExecutionState.prototype.debugCommandProcessor=function(aD){ +return new DebugCommandProcessor(this,aD); +}; +function MakeBreakEvent(K,aE){ +return new BreakEvent(K,aE); +} +function BreakEvent(K,aE){ +this.frame_=new c(K,0); +this.break_points_hit_=aE; +} +BreakEvent.prototype.eventType=function(){ +return u.DebugEvent.Break; +}; +BreakEvent.prototype.func=function(){ +return this.frame_.func(); +}; +BreakEvent.prototype.sourceLine=function(){ +return this.frame_.sourceLine(); +}; +BreakEvent.prototype.sourceColumn=function(){ +return this.frame_.sourceColumn(); +}; +BreakEvent.prototype.sourceLineText=function(){ +return this.frame_.sourceLineText(); +}; +BreakEvent.prototype.breakPointsHit=function(){ +return this.break_points_hit_; +}; +BreakEvent.prototype.toJSONProtocol=function(){ +var aF={seq:x++, +type:"event", +event:"break", +body:{invocationText:this.frame_.invocationText()} +}; +var R=this.func().script(); +if(R){ +aF.body.sourceLine=this.sourceLine(), +aF.body.sourceColumn=this.sourceColumn(), +aF.body.sourceLineText=this.sourceLineText(), +aF.body.script=MakeScriptObject_(R,false); +} +if(this.breakPointsHit()){ +aF.body.breakpoints=[]; +for(var O=0;O0){ +aF.body.sourceLine=this.sourceLine(); +aF.body.sourceColumn=this.sourceColumn(); +aF.body.sourceLineText=this.sourceLineText(); +var R=this.func().script(); +if(R){ +aF.body.script=MakeScriptObject_(R,false); +} +}else{ +aF.body.sourceLine=-1; +} +return aF.toJSONProtocol(); +}; +function MakeCompileEvent(R,w){ +return new CompileEvent(R,w); +} +function CompileEvent(R,w){ +this.script_=l(R); +this.type_=w; +} +CompileEvent.prototype.eventType=function(){ +return this.type_; +}; +CompileEvent.prototype.script=function(){ +return this.script_; +}; +CompileEvent.prototype.toJSONProtocol=function(){ +var aF=new ProtocolMessage(); +aF.running=true; +switch(this.type_){ +case u.DebugEvent.BeforeCompile: +aF.event="beforeCompile"; +break; +case u.DebugEvent.AfterCompile: +aF.event="afterCompile"; +break; +case u.DebugEvent.CompileError: +aF.event="compileError"; +break; +} +aF.body={}; +aF.body.script=this.script_; +return aF.toJSONProtocol(); +}; +function MakeScriptObject_(R,aL){ +var aF={id:R.id(), +name:R.name(), +lineOffset:R.lineOffset(), +columnOffset:R.columnOffset(), +lineCount:R.lineCount(), +}; +if(!(R.data()===(void 0))){ +aF.data=R.data(); +} +if(aL){ +aF.source=R.source(); +} +return aF; +} +function MakePromiseEvent(aM){ +return new PromiseEvent(aM); +} +function PromiseEvent(aM){ +this.promise_=aM.promise; +this.parentPromise_=aM.parentPromise; +this.status_=aM.status; +this.value_=aM.value; +} +PromiseEvent.prototype.promise=function(){ +return l(this.promise_); +} +PromiseEvent.prototype.parentPromise=function(){ +return l(this.parentPromise_); +} +PromiseEvent.prototype.status=function(){ +return this.status_; +} +PromiseEvent.prototype.value=function(){ +return l(this.value_); +} +function MakeAsyncTaskEvent(aM){ +return new AsyncTaskEvent(aM); +} +function AsyncTaskEvent(aM){ +this.type_=aM.type; +this.name_=aM.name; +this.id_=aM.id; +} +AsyncTaskEvent.prototype.type=function(){ +return this.type_; +} +AsyncTaskEvent.prototype.name=function(){ +return this.name_; +} +AsyncTaskEvent.prototype.id=function(){ +return this.id_; +} +function DebugCommandProcessor(I,aD){ +this.exec_state_=I; +this.running_=aD||false; +} +DebugCommandProcessor.prototype.processDebugRequest=function(aN){ +return this.processDebugJSONRequest(aN); +}; +function ProtocolMessage(aN){ +this.seq=x++; +if(aN){ +this.type='response'; +this.request_seq=aN.seq; +this.command=aN.command; +}else{ +this.type='event'; +} +this.success=true; +this.running=(void 0); +} +ProtocolMessage.prototype.setOption=function(aO,C){ +if(!this.options_){ +this.options_={}; +} +this.options_[aO]=C; +}; +ProtocolMessage.prototype.failed=function(aP,aQ){ +this.success=false; +this.message=aP; +if((typeof(aQ)==='object')){ +this.error_details=aQ; +} +}; +ProtocolMessage.prototype.toJSONProtocol=function(){ +var aR={}; +aR.seq=this.seq; +if(this.request_seq){ +aR.request_seq=this.request_seq; +} +aR.type=this.type; +if(this.event){ +aR.event=this.event; +} +if(this.command){ +aR.command=this.command; +} +if(this.success){ +aR.success=this.success; +}else{ +aR.success=false; +} +if(this.body){ +var aS; +var aT=m(true,this.options_); +if(this.body instanceof o){ +aS=aT.serializeValue(this.body); +}else if(this.body instanceof d){ +aS=[]; +for(var O=0;O=this.exec_state_.frameCount()){ +return aU.failed('Invalid frame "'+bs+'"'); +} +aU.body=this.exec_state_.frame(bJ).evaluate( +bD,(!!(bE)),bG); +return; +}else{ +aU.body=this.exec_state_.frame().evaluate( +bD,(!!(bE)),bG); +return; +} +}; +DebugCommandProcessor.prototype.lookupRequest_=function(aN,aU){ +if(!aN.arguments){ +return aU.failed('Missing arguments'); +} +var bK=aN.arguments.handles; +if((bK===(void 0))){ +return aU.failed('Argument "handles" missing'); +} +if(!(aN.arguments.includeSource===(void 0))){ +var bL=(!!(aN.arguments.includeSource)); +aU.setOption('includeSource',bL); +} +var bM={}; +for(var O=0;O=this.exec_state_.frameCount()){ +return aU.failed('Invalid frame "'+bs+'"'); +} +bs=this.exec_state_.frame(bJ); +} +} +var R=bs.func().script(); +if(!R){ +return aU.failed('No source'); +} +var bP=R.sourceSlice(bN,bO); +if(!bP){ +return aU.failed('Invalid line interval'); +} +aU.body={}; +aU.body.source=bP.sourceText(); +aU.body.fromLine=bP.from_line; +aU.body.toLine=bP.to_line; +aU.body.fromPosition=bP.from_position; +aU.body.toPosition=bP.to_position; +aU.body.totalLines=R.lineCount(); +}; +DebugCommandProcessor.prototype.scriptsRequest_=function(aN,aU){ +var bQ=ScriptTypeFlag(u.ScriptType.Normal); +var bL=false; +var bR=null; +if(aN.arguments){ +if(!(aN.arguments.types===(void 0))){ +bQ=(%_ToNumber(aN.arguments.types)); +if(f(bQ)||bQ<0){ +return aU.failed('Invalid types "'+ +aN.arguments.types+'"'); +} +} +if(!(aN.arguments.includeSource===(void 0))){ +bL=(!!(aN.arguments.includeSource)); +aU.setOption('includeSource',bL); +} +if((%_IsArray(aN.arguments.ids))){ +bR={}; +var bS=aN.arguments.ids; +for(var O=0;O=0){ +bW=true; +} +} +if(!bW)continue; +} +if(bQ&ScriptTypeFlag(ae[O].type)){ +aU.body.push(l(ae[O])); +} +} +}; +DebugCommandProcessor.prototype.threadsRequest_=function(aN,aU){ +var bX=this.exec_state_.threadCount(); +var bY=[]; +for(var O=0;O=this.exec_state_.frameCount()){ +return aU.failed('Invalid frame "'+bs+'"'); +} +ch=this.exec_state_.frame(bJ); +}else{ +ch=this.exec_state_.frame(); +} +var cg=u.LiveEdit.RestartFrame(ch); +aU.body={result:cg}; +}; +DebugCommandProcessor.prototype.debuggerFlagsRequest_=function(aN, +aU){ +if(!aN.arguments){ +aU.failed('Missing arguments'); +return; +} +var ci=aN.arguments.flags; +aU.body={flags:[]}; +if(!(ci===(void 0))){ +for(var O=0;OP[E].start_position){ +R=E; +} +} +if(R!=x){ +var S=P[R]; +var T=Q[R]; +P[R]=P[x]; +Q[R]=Q[x]; +P[x]=S; +Q[x]=T; +} +} +var U=0; +function ResetIndexes(V,W){ +var X=-1; +while(U=aK.pos1+aK.len1){ +return aE+aK.pos2+aK.len2-aK.pos1-aK.len1; +} +if(!aF){ +aF=PosTranslator.DefaultInsideChunkHandler; +} +return aF(aE,aK); +}; +PosTranslator.DefaultInsideChunkHandler=function(aE,aL){ +Assert(false,"Cannot translate position in changed area"); +}; +PosTranslator.ShiftWithTopInsideChunkHandler= +function(aE,aL){ +return aE-aL.pos1+aL.pos2; +}; +var i={ +UNCHANGED:"unchanged", +SOURCE_CHANGED:"source changed", +CHANGED:"changed", +DAMAGED:"damaged" +}; +function CodeInfoTreeNode(aM,aN,aO){ +this.info=aM; +this.children=aN; +this.array_index=aO; +this.parent=(void 0); +this.status=i.UNCHANGED; +this.status_explanation=(void 0); +this.new_start_pos=(void 0); +this.new_end_pos=(void 0); +this.corresponding_node=(void 0); +this.unmatched_new_nodes=(void 0); +this.textual_corresponding_node=(void 0); +this.textually_unmatched_new_nodes=(void 0); +this.live_shared_function_infos=(void 0); +} +function BuildCodeInfoTree(aP){ +var aQ=0; +function BuildNode(){ +var aR=aQ; +aQ++; +var aS=new e(); +while(aQ=ay.length;}; +this.TranslatePos=function(aE){return aE+aX;}; +}; +function ProcessInternals(aY){ +aY.new_start_pos=aV.TranslatePos( +aY.info.start_position); +var aZ=0; +var ba=false; +var bb=false; +while(!aV.done()&& +aV.current().pos1= +aV.current().pos1+aV.current().len1){ +ba=true; +aV.next(); +continue; +}else if(bc.info.start_position<=aV.current().pos1&& +bc.info.end_position>=aV.current().pos1+ +aV.current().len1){ +ProcessInternals(bc); +bb=bb|| +(bc.status!=i.UNCHANGED); +ba=ba|| +(bc.status==i.DAMAGED); +aZ++; +continue; +}else{ +ba=true; +bc.status=i.DAMAGED; +bc.status_explanation= +"Text diff overlaps with function boundary"; +aZ++; +continue; +} +}else{ +if(aV.current().pos1+aV.current().len1<= +aY.info.end_position){ +aY.status=i.CHANGED; +aV.next(); +continue; +}else{ +aY.status=i.DAMAGED; +aY.status_explanation= +"Text diff overlaps with function boundary"; +return; +} +} +Assert("Unreachable",false); +} +while(aZ0){ +return bp; +} +} +function TraverseTree(w){ +w.live_shared_function_infos=FindFunctionInfos(w.info); +for(var x=0;x ["+bx+"]"; +} +return; +} +var by; +function CheckStackActivations(old_shared_wrapper_list, +new_shared_list, +Z){ +var bz=new e(); +for(var x=0;x0){ +Z.push({dropped_from_stack:bC}); +} +if(bB.length>0){ +Z.push({functions_on_stack:bB}); +throw new Failure("Blocked by functions on stack"); +} +return bC.length; +} +var by={ +AVAILABLE_FOR_PATCH:1, +BLOCKED_ON_ACTIVE_STACK:2, +BLOCKED_ON_OTHER_STACK:3, +BLOCKED_UNDER_NATIVE_CODE:4, +REPLACED_ON_ACTIVE_STACK:5, +BLOCKED_UNDER_GENERATOR:6, +BLOCKED_ACTIVE_GENERATOR:7, +BLOCKED_NO_NEW_TARGET_ON_RESTART:8 +}; +by.SymbolName=function(bF){ +var bG=by; +for(var bH in bG){ +if(bG[bH]==bF){ +return bH; +} +} +}; +function Failure(as){ +this.message=as; +} +Failure.prototype.toString=function(){ +return"LiveEdit Failure: "+this.message; +}; +function CopyErrorPositionToDetails(bI,p){ +function createPositionStruct(N,bJ){ +if(bJ==-1)return; +var bK=N.locationFromPosition(bJ,true); +if(bK==null)return; +return{ +line:bK.line+1, +column:bK.column+1, +position:bJ +}; +} +if(!("scriptObject"in bI)||!("startPosition"in bI)){ +return; +} +var N=bI.scriptObject; +var bL={ +start:createPositionStruct(N,bI.startPosition), +end:createPositionStruct(N,bI.endPosition) +}; +p.position=bL; +} +function GetPcFromSourcePos(bM,bN){ +return %GetFunctionCodePositionFromSource(bM,bN); +} +function SetScriptSource(N,bO,bP,Z){ +var j=N.source; +var bQ=CompareStrings(j,bO); +return ApplyPatchMultiChunk(N,bQ,bO,bP, +Z); +} +function CompareStrings(bR,bS){ +return %LiveEditCompareStrings(bR,bS); +} +function ApplySingleChunkPatch(N,change_pos,change_len,new_str, +Z){ +var j=N.source; +var bO=j.substring(0,change_pos)+ +new_str+j.substring(change_pos+change_len); +return ApplyPatchMultiChunk(N, +[change_pos,change_pos+change_len,change_pos+new_str.length], +bO,false,Z); +} +function DescribeChangeTree(bd){ +function ProcessOldNode(w){ +var bT=[]; +for(var x=0;x>1); +var m=2|4|1; +for(var n=0;n>1); +for(var n=0;n>1)+(fields?fields.length:0); +if(u>=4){ +%OptimizeObjectForAddingMultipleProperties(t,u); +} +if(fields){ +for(var n=0;n>>0)&&o!==4294967295){ +%AddElement(q,o,r); +}else{ +%AddNamedProperty(q,(%_ToString(o)),r,0); +} +} +%SetForceInlineFlag(AddIndexedProperty); +function ToPositiveInteger(l,s){ +var t=(%_IsSmi(%IS_VAR(l))?l:%NumberToIntegerMapMinusZero(l)); +if(t<0)throw g(s); +return t; +} +function MaxSimple(u,v){ +return u>v?u:v; +} +function MinSimple(u,v){ +return u>v?v:u; +} +%SetForceInlineFlag(MaxSimple); +%SetForceInlineFlag(MinSimple); +function SpeciesConstructor(w,x,y){ +if(c){ +var z=w.constructor; +if((z===(void 0))){ +return x; +} +if(!(%_IsJSReceiver(z))){ +throw h(27); +} +var A=z[i]; +if((A==null)){ +return x; +} +if(%IsConstructor(A)){ +return A; +} +throw h(235); +}else{ +return y?x:w.constructor; +} +} +%FunctionSetPrototype(d,new d(0)); +b.Export(function(B){ +B.AddIndexedProperty=AddIndexedProperty; +B.MaxSimple=MaxSimple; +B.MinSimple=MinSimple; +B.SameValue=SameValue; +B.SameValueZero=SameValueZero; +B.ToPositiveInteger=ToPositiveInteger; +B.SpeciesConstructor=SpeciesConstructor; +}); +%InstallToContext([ +"concat_iterable_to_array_builtin",CONCAT_ITERABLE_TO_ARRAY, +]); +%InstallToContext([ +"concat_iterable_to_array",ConcatIterableToArray, +]); +}) + +$v8natives# +(function(a,b){ +%CheckIsBootstrapping(); +var c=a.Array; +var d=a.Boolean; +var e=a.Number; +var f=a.Object; +var g=b.InternalArray; +var h=b.ImportNow("iterator_symbol"); +var i; +var j; +var k; +var l; +var m=%GetRootNaN(); +var n=b.ImportNow("object_to_string"); +var o; +var p; +var q; +var r=b.ImportNow("SameValue"); +var s=b.ImportNow("to_string_tag_symbol"); +b.Import(function(t){ +i=t.MakeRangeError; +j=t.MakeSyntaxError; +k=t.MakeTypeError; +l=t.MathAbs; +o=t.ObserveBeginPerformSplice; +p=t.ObserveEndPerformSplice; +q=t.ObserveEnqueueSpliceRecord; +}); +function GlobalIsNaN(u){ +u=(%_ToNumber(u)); +return(!%_IsSmi(%IS_VAR(u))&&!(u==u)); +} +function GlobalIsFinite(u){ +u=(%_ToNumber(u)); +return(%_IsSmi(%IS_VAR(u))||((u==u)&&(u!=1/0)&&(u!=-1/0))); +} +function GlobalParseInt(v,w){ +if((w===(void 0))||w===10||w===0){ +if(%_IsSmi(v))return v; +if((typeof(v)==='number')&& +((0.01>>0); +var ai=false; +if((%_ToString(ah))==U&&ah!=4294967295){ +var aj=H.length; +if(ah>=aj&&%IsObserved(H)){ +ai=true; +o(H); +} +var ak=GetOwnPropertyJS(H,"length"); +if((ah>=aj&&!ak.isWritable())|| +!DefineObjectProperty(H,U,G,true)){ +if(ai) +p(H); +if(Y){ +throw k(34,U); +}else{ +return false; +} +} +if(ah>=aj){ +H.length=ah+1; +} +if(ai){ +p(H); +q(H,aj,[],ah+1-aj); +} +return true; +} +} +return DefineObjectProperty(H,U,G,Y); +} +function DefineOwnProperty(H,U,G,Y){ +if((%_IsJSProxy(H))){ +if((typeof(U)==='symbol'))return false; +var x=FromGenericPropertyDescriptor(G); +return DefineProxyProperty(H,U,x,Y); +}else if((%_IsArray(H))){ +return DefineArrayProperty(H,U,G,Y); +}else{ +return DefineObjectProperty(H,U,G,Y); +} +} +function ObjectGetPrototypeOf(H){ +return %_GetPrototype((%_ToObject(H))); +} +function ObjectSetPrototypeOf(H,al){ +if((%IS_VAR(H)===null)||(H===(void 0)))throw k(17,"Object.setPrototypeOf"); +if(al!==null&&!(%_IsJSReceiver(al))){ +throw k(92,al); +} +if((%_IsJSReceiver(H))){ +%SetPrototype(H,al); +} +return H; +} +function ObjectGetOwnPropertyDescriptor(H,U){ +return %GetOwnProperty(H,U); +} +function ObjectGetOwnPropertyNames(H){ +H=(%_ToObject(H)); +return %GetOwnPropertyKeys(H,16); +} +function ObjectDefineProperty(H,U,x){ +if(%IsObserved(H)){ +if(!(%_IsJSReceiver(H))){ +throw k(16,"Object.defineProperty"); +} +var z=(%_ToName(U)); +var G=ToPropertyDescriptor(x); +DefineOwnProperty(H,z,G,true); +return H; +} +return %ObjectDefineProperty(H,U,x); +} +function GetOwnEnumerablePropertyNames(A){ +return %GetOwnPropertyKeys(A,2); +} +function ObjectDefineProperties(H,am){ +if(%IsObserved(H)){ +if(!(%_IsJSReceiver(H))){ +throw k(16,"Object.defineProperties"); +} +var W=(%_ToObject(am)); +var an=GetOwnEnumerablePropertyNames(W); +var ao=new g(); +for(var ap=0;ap36)throw i(189); +return %NumberToRadixString(u,w); +} +function NumberToLocaleString(){ +return %_Call(NumberToStringJS,this); +} +function NumberValueOf(){ +if(!(typeof(this)==='number')&&!(%_ClassOf(this)==='Number')){ +throw k(65,'Number.prototype.valueOf'); +} +return %_ValueOf(this); +} +function NumberToFixedJS(ar){ +var R=this; +if(!(typeof(this)==='number')){ +if(!(%_ClassOf(this)==='Number')){ +throw k(42, +"Number.prototype.toFixed",this); +} +R=%_ValueOf(this); +} +var as=(%_ToInteger(ar)); +if(as<0||as>20){ +throw i(185,"toFixed() digits"); +} +if((!%_IsSmi(%IS_VAR(R))&&!(R==R)))return"NaN"; +if(R==(1/0))return"Infinity"; +if(R==-(1/0))return"-Infinity"; +return %NumberToFixed(R,as); +} +function NumberToExponentialJS(ar){ +var R=this; +if(!(typeof(this)==='number')){ +if(!(%_ClassOf(this)==='Number')){ +throw k(42, +"Number.prototype.toExponential",this); +} +R=%_ValueOf(this); +} +var as=(ar===(void 0))?(void 0):(%_ToInteger(ar)); +if((!%_IsSmi(%IS_VAR(R))&&!(R==R)))return"NaN"; +if(R==(1/0))return"Infinity"; +if(R==-(1/0))return"-Infinity"; +if((as===(void 0))){ +as=-1; +}else if(as<0||as>20){ +throw i(185,"toExponential()"); +} +return %NumberToExponential(R,as); +} +function NumberToPrecisionJS(at){ +var R=this; +if(!(typeof(this)==='number')){ +if(!(%_ClassOf(this)==='Number')){ +throw k(42, +"Number.prototype.toPrecision",this); +} +R=%_ValueOf(this); +} +if((at===(void 0)))return(%_ToString(R)); +var U=(%_ToInteger(at)); +if((!%_IsSmi(%IS_VAR(R))&&!(R==R)))return"NaN"; +if(R==(1/0))return"Infinity"; +if(R==-(1/0))return"-Infinity"; +if(U<1||U>21){ +throw i(188); +} +return %NumberToPrecision(R,U); +} +function NumberIsFinite(u){ +return(typeof(u)==='number')&&(%_IsSmi(%IS_VAR(u))||((u==u)&&(u!=1/0)&&(u!=-1/0))); +} +function NumberIsInteger(u){ +return NumberIsFinite(u)&&(%_ToInteger(u))==u; +} +function NumberIsNaN(u){ +return(typeof(u)==='number')&&(!%_IsSmi(%IS_VAR(u))&&!(u==u)); +} +function NumberIsSafeInteger(u){ +if(NumberIsFinite(u)){ +var au=(%_ToInteger(u)); +if(au==u){ +return l(au)<=9007199254740991; +} +} +return false; +} +%FunctionSetPrototype(e,new e(0)); +%OptimizeObjectForAddingMultipleProperties(e.prototype,8); +%AddNamedProperty(e.prototype,"constructor",e, +2); +b.InstallConstants(e,[ +"MAX_VALUE",1.7976931348623157e+308, +"MIN_VALUE",5e-324, +"NaN",m, +"NEGATIVE_INFINITY",-(1/0), +"POSITIVE_INFINITY",(1/0), +"MAX_SAFE_INTEGER",%_MathPow(2,53)-1, +"MIN_SAFE_INTEGER",-%_MathPow(2,53)+1, +"EPSILON",%_MathPow(2,-52) +]); +b.InstallFunctions(e.prototype,2,[ +"toString",NumberToStringJS, +"toLocaleString",NumberToLocaleString, +"valueOf",NumberValueOf, +"toFixed",NumberToFixedJS, +"toExponential",NumberToExponentialJS, +"toPrecision",NumberToPrecisionJS +]); +b.InstallFunctions(e,2,[ +"isFinite",NumberIsFinite, +"isInteger",NumberIsInteger, +"isNaN",NumberIsNaN, +"isSafeInteger",NumberIsSafeInteger, +"parseInt",GlobalParseInt, +"parseFloat",GlobalParseFloat +]); +%SetForceInlineFlag(NumberIsNaN); +function GetIterator(H,av){ +if((av===(void 0))){ +av=H[h]; +} +if(!(typeof(av)==='function')){ +throw k(66,H); +} +var aw=%_Call(av,H); +if(!(%_IsJSReceiver(aw))){ +throw k(60,aw); +} +return aw; +} +b.Export(function(ax){ +ax.GetIterator=GetIterator; +ax.GetMethod=GetMethod; +ax.IsFinite=GlobalIsFinite; +ax.IsNaN=GlobalIsNaN; +ax.NumberIsNaN=NumberIsNaN; +ax.ObjectDefineProperties=ObjectDefineProperties; +ax.ObjectDefineProperty=ObjectDefineProperty; +ax.ObjectHasOwnProperty=ObjectHasOwnProperty; +}); +%InstallToContext([ +"object_value_of",ObjectValueOf, +]); +}) + +symbol9 +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Object; +var d=a.Symbol; +var e=b.ImportNow("has_instance_symbol"); +var f= +b.ImportNow("is_concat_spreadable_symbol"); +var g=b.ImportNow("iterator_symbol"); +var h; +var i=b.ImportNow("to_primitive_symbol"); +var j=b.ImportNow("to_string_tag_symbol"); +var k=b.ImportNow("unscopables_symbol"); +b.Import(function(l){ +h=l.MakeTypeError; +}); +function SymbolToPrimitive(m){ +if(!((typeof(this)==='symbol')||(%_ClassOf(this)==='Symbol'))){ +throw h(42, +"Symbol.prototype [ @@toPrimitive ]",this); +} +return %_ValueOf(this); +} +function SymbolToString(){ +if(!((typeof(this)==='symbol')||(%_ClassOf(this)==='Symbol'))){ +throw h(42, +"Symbol.prototype.toString",this); +} +return %SymbolDescriptiveString(%_ValueOf(this)); +} +function SymbolValueOf(){ +if(!((typeof(this)==='symbol')||(%_ClassOf(this)==='Symbol'))){ +throw h(42, +"Symbol.prototype.valueOf",this); +} +return %_ValueOf(this); +} +function SymbolFor(n){ +n=(%_ToString(n)); +var o=%SymbolRegistry(); +if((o.for[n]===(void 0))){ +var p=%CreateSymbol(n); +o.for[n]=p; +o.keyFor[p]=n; +} +return o.for[n]; +} +function SymbolKeyFor(p){ +if(!(typeof(p)==='symbol'))throw h(148,p); +return %SymbolRegistry().keyFor[p]; +} +function ObjectGetOwnPropertySymbols(q){ +q=(%_ToObject(q)); +return %GetOwnPropertyKeys(q,8); +} +%FunctionSetPrototype(d,new c()); +b.InstallConstants(d,[ +"iterator",g, +"toPrimitive",i, +"unscopables",k, +]); +b.InstallFunctions(d,2,[ +"for",SymbolFor, +"keyFor",SymbolKeyFor +]); +%AddNamedProperty( +d.prototype,"constructor",d,2); +%AddNamedProperty( +d.prototype,j,"Symbol",2|1); +b.InstallFunctions(d.prototype,2|1,[ +i,SymbolToPrimitive +]); +b.InstallFunctions(d.prototype,2,[ +"toString",SymbolToString, +"valueOf",SymbolValueOf +]); +b.InstallFunctions(c,2,[ +"getOwnPropertySymbols",ObjectGetOwnPropertySymbols +]); +b.Export(function(r){ +r.SymbolToString=SymbolToString; +}) +}) + +array +(function(a,b,c){ +"use strict"; +%CheckIsBootstrapping(); +var d; +var e; +var f; +var g; +var h; +var i=a.Array; +var j=b.InternalArray; +var k=b.InternalPackedArray; +var l; +var m; +var n; +var o; +var p; +var q=b.ImportNow("object_to_string"); +var r; +var s; +var t; +var u; +var v=b.ImportNow("iterator_symbol"); +var w=b.ImportNow("unscopables_symbol"); +b.Import(function(x){ +d=x.AddIndexedProperty; +g=x.GetIterator; +h=x.GetMethod; +l=x.MakeTypeError; +m=x.MaxSimple; +n=x.MinSimple; +o=x.ObjectDefineProperty; +p=x.ObjectHasOwnProperty; +r=x.ObserveBeginPerformSplice; +s=x.ObserveEndPerformSplice; +t=x.ObserveEnqueueSpliceRecord; +u=x.SameValueZero; +}); +b.ImportFromExperimental(function(x){ +e=x.FLAG_harmony_tolength; +f=x.FLAG_harmony_species; +}); +function ArraySpeciesCreate(y,z){ +var A; +if(f){ +A=%ArraySpeciesConstructor(y); +}else{ +A=i; +} +return new A(z); +} +function DefineIndexedProperty(y,B,C){ +if(f){ +var D=o(y,B,{ +value:C,writable:true,configurable:true,enumerable:true +}); +if(!D)throw l(137,B); +}else{ +d(y,B,C); +} +} +var E=new j(); +function GetSortedArrayKeys(y,F){ +var G=new j(); +if((typeof(F)==='number')){ +var H=F; +for(var B=0;B>2; +var Z=%EstimateNumberOfElements(y); +return(ZZ*4); +} +function Join(y,z,P,O){ +if(z==0)return''; +var W=(%_IsArray(y)); +if(W){ +if(!%PushIfAbsent(E,y))return''; +} +try{ +if(UseSparseVariant(y,z,W,z)){ +%NormalizeElements(y); +if(P.length==0){ +return SparseJoin(y,z,O); +}else{ +return SparseJoinWithSeparatorJS(y,z,O,P); +} +} +if(z==1){ +var I=y[0]; +if((typeof(I)==='string'))return I; +return O(I); +} +var R=new j(z); +if(P.length==0){ +var V=0; +for(var B=0;B=ab){ +var ae=y[K]; +if(!(ae===(void 0))||K in y){ +DefineIndexedProperty(ad,K-ab,ae); +} +} +} +} +} +} +function SparseMove(y,ab,ac,N,af){ +if(af===ac)return; +var ag=new j( +n(N-ac+af,0xffffffff)); +var ah; +var F=%GetArrayKeys(y,N); +if((typeof(F)==='number')){ +var H=F; +for(var B=0;B=ab+ac){ +var ae=y[K]; +if(!(ae===(void 0))||K in y){ +var ai=K-ac+af; +ag[ai]=ae; +if(ai>0xfffffffe){ +ah=ah||new j(); +ah.push(ai); +} +} +} +} +} +} +%MoveArrayContents(ag,y); +if(!(ah===(void 0))){ +var z=ah.length; +for(var B=0;Bac){ +for(var B=N-ac;B>ab;B--){ +var ak=B+ac-1; +var al=B+af-1; +if(((W&&%_HasFastPackedElements(%IS_VAR(y)))?(akN-ac+af;B--){ +delete y[B-1]; +} +} +} +} +function ArrayToString(){ +var y; +var am; +if((%_IsArray(this))){ +am=this.join; +if(am===ArrayJoin){ +return Join(this,this.length,',',ConvertToString); +} +y=this; +}else{ +y=(%_ToObject(this)); +am=y.join; +} +if(!(typeof(am)==='function')){ +return %_Call(q,y); +} +return %_Call(am,y); +} +function InnerArrayToLocaleString(y,z){ +var N=(e?(%_ToLength(z)):((z)>>>0)); +if(N===0)return""; +return Join(y,N,',',ConvertToLocaleString); +} +function ArrayToLocaleString(){ +var y=(%_ToObject(this)); +var an=y.length; +return InnerArrayToLocaleString(y,an); +} +function InnerArrayJoin(P,y,z){ +if((P===(void 0))){ +P=','; +}else{ +P=(%_ToString(P)); +} +var D=%_FastOneByteArrayJoin(y,P); +if(!(D===(void 0)))return D; +if(z===1){ +var I=y[0]; +if((I==null))return''; +return(%_ToString(I)); +} +return Join(y,z,P,ConvertToString); +} +function ArrayJoin(P){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw l(17,"Array.prototype.join"); +var y=(%_ToObject(this)); +var z=(e?(%_ToLength(y.length)):((y.length)>>>0)); +return InnerArrayJoin(P,y,z); +} +function ObservedArrayPop(ao){ +ao--; +var C=this[ao]; +try{ +r(this); +delete this[ao]; +this.length=ao; +}finally{ +s(this); +t(this,ao,[C],0); +} +return C; +} +function ArrayPop(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw l(17,"Array.prototype.pop"); +var y=(%_ToObject(this)); +var ao=(e?(%_ToLength(y.length)):((y.length)>>>0)); +if(ao==0){ +y.length=ao; +return; +} +if(%IsObserved(y)) +return ObservedArrayPop.call(y,ao); +ao--; +var C=y[ao]; +%DeleteProperty_Strict(y,ao); +y.length=ao; +return C; +} +function ObservedArrayPush(){ +var ao=(e?(%_ToLength(this.length)):((this.length)>>>0)); +var ap=%_ArgumentsLength(); +try{ +r(this); +for(var B=0;B>>0)); +var ap=%_ArgumentsLength(); +if(ap>(1<<30)||(ao-(1<<30))+ap>9007199254740991-(1<<30)){ +throw l(228,ap,ao); +} +for(var B=0;B=B){ +av=B; +while(G[++as]==B){} +aw=N-B-1; +} +var ax=y[av]; +if(!(ax===(void 0))||av in y){ +var ay=y[aw]; +if(!(ay===(void 0))||aw in y){ +y[av]=ay; +y[aw]=ax; +}else{ +y[aw]=ax; +delete y[av]; +} +}else{ +var ay=y[aw]; +if(!(ay===(void 0))||aw in y){ +y[av]=ay; +delete y[aw]; +} +} +} +} +function PackedArrayReverse(y,N){ +var at=N-1; +for(var B=0;B>>0)); +var az=(%_IsArray(y)); +if(UseSparseVariant(y,N,az,N)){ +%NormalizeElements(y); +SparseReverse(y,N); +return y; +}else if(az&&%_HasFastPackedElements(y)){ +return PackedArrayReverse(y,N); +}else{ +return GenericArrayReverse(y,N); +} +} +function ObservedArrayShift(N){ +var aA=this[0]; +try{ +r(this); +SimpleMove(this,0,1,N,0); +this.length=N-1; +}finally{ +s(this); +t(this,0,[aA],0); +} +return aA; +} +function ArrayShift(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw l(17,"Array.prototype.shift"); +var y=(%_ToObject(this)); +var N=(e?(%_ToLength(y.length)):((y.length)>>>0)); +if(N===0){ +y.length=0; +return; +} +if(%object_is_sealed(y))throw l(13); +if(%IsObserved(y)) +return ObservedArrayShift.call(y,N); +var aA=y[0]; +if(UseSparseVariant(y,N,(%_IsArray(y)),N)){ +SparseMove(y,0,1,N,0); +}else{ +SimpleMove(y,0,1,N,0); +} +y.length=N-1; +return aA; +} +function ObservedArrayUnshift(){ +var N=(e?(%_ToLength(this.length)):((this.length)>>>0)); +var aB=%_ArgumentsLength(); +try{ +r(this); +SimpleMove(this,0,0,N,aB); +for(var B=0;B>>0)); +var aB=%_ArgumentsLength(); +if(N>0&&UseSparseVariant(y,N,(%_IsArray(y)),N)&& +!%object_is_sealed(y)){ +SparseMove(y,0,0,N,aB); +}else{ +SimpleMove(y,0,0,N,aB); +} +for(var B=0;B>>0)); +var ab=(%_ToInteger(aD)); +var aF=N; +if(!(aE===(void 0)))aF=(%_ToInteger(aE)); +if(ab<0){ +ab+=N; +if(ab<0)ab=0; +}else{ +if(ab>N)ab=N; +} +if(aF<0){ +aF+=N; +if(aF<0)aF=0; +}else{ +if(aF>N)aF=N; +} +var D=ArraySpeciesCreate(y,m(aF-ab,0)); +if(aFN?N:ab; +} +function ComputeSpliceDeleteCount(aG,aB,N,ab){ +var ac=0; +if(aB==1) +return N-ab; +ac=(%_ToInteger(aG)); +if(ac<0) +return 0; +if(ac>N-ab) +return N-ab; +return ac; +} +function ObservedArraySplice(aD,aG){ +var aB=%_ArgumentsLength(); +var N=(e?(%_ToLength(this.length)):((this.length)>>>0)); +var ab=ComputeSpliceStartIndex((%_ToInteger(aD)),N); +var ac=ComputeSpliceDeleteCount(aG,aB,N, +ab); +var ad=[]; +ad.length=ac; +var aH=aB>2?aB-2:0; +try{ +r(this); +SimpleSlice(this,ab,ac,N,ad); +SimpleMove(this,ab,ac,N,aH); +var B=ab; +var aI=2; +var aJ=%_ArgumentsLength(); +while(aI>>0)); +var ab=ComputeSpliceStartIndex((%_ToInteger(aD)),N); +var ac=ComputeSpliceDeleteCount(aG,aB,N, +ab); +var ad=ArraySpeciesCreate(y,ac); +ad.length=ac; +var aH=aB>2?aB-2:0; +if(ac!=aH&&%object_is_sealed(y)){ +throw l(13); +}else if(ac>0&&%object_is_frozen(y)){ +throw l(12); +} +var aK=ac; +if(aH!=ac){ +aK+=N-ab-ac; +} +if(UseSparseVariant(y,N,(%_IsArray(y)),aK)){ +%NormalizeElements(y); +%NormalizeElements(ad); +SparseSlice(y,ab,ac,N,ad); +SparseMove(y,ab,ac,N,aH); +}else{ +SimpleSlice(y,ab,ac,N,ad); +SimpleMove(y,ab,ac,N,aH); +} +var B=ab; +var aI=2; +var aJ=%_ArgumentsLength(); +while(aI=x;at--){ +var aQ=L[at]; +var aR=aL(aQ,aP); +if(aR>0){ +L[at+1]=aQ; +}else{ +break; +} +} +L[at+1]=aP; +} +}; +var aS=function(L,x,aO){ +var aT=new j(); +var aU=200+((aO-x)&15); +var at=0; +x+=1; +aO-=1; +for(var B=x;B>1][0]; +return aV; +} +var aW=function QuickSort(L,x,aO){ +var aV=0; +while(true){ +if(aO-x<=10){ +aN(L,x,aO); +return; +} +if(aO-x>1000){ +aV=aS(L,x,aO); +}else{ +aV=x+((aO-x)>>1); +} +var aX=L[x]; +var aY=L[aO-1]; +var aZ=L[aV]; +var ba=aL(aX,aY); +if(ba>0){ +var aQ=aX; +aX=aY; +aY=aQ; +} +var bb=aL(aX,aZ); +if(bb>=0){ +var aQ=aX; +aX=aZ; +aZ=aY; +aY=aQ; +}else{ +var bc=aL(aY,aZ); +if(bc>0){ +var aQ=aY; +aY=aZ; +aZ=aQ; +} +} +L[x]=aX; +L[aO-1]=aZ; +var bd=aY; +var be=x+1; +var bf=aO-1; +L[aV]=L[be]; +L[be]=bd; +partition:for(var B=be+1;B0){ +do{ +bf--; +if(bf==B)break partition; +var bg=L[bf]; +aR=aL(bg,bd); +}while(aR>0); +L[B]=L[bf]; +L[bf]=aP; +if(aR<0){ +aP=L[B]; +L[B]=L[be]; +L[be]=aP; +be++; +} +} +} +if(aO-bf=bj){bj=B+1;} +} +} +}else{ +for(var B=0;B=bj){bj=aj+1;} +} +} +} +} +return bj; +}; +var bm=function(bi,x,aO){ +for(var bk=%_GetPrototype(bi);bk;bk=%_GetPrototype(bk)){ +var F=%GetArrayKeys(bk,aO); +if((typeof(F)==='number')){ +var bl=F; +for(var B=x;B>>0)); +return InnerArraySort(y,z,aL); +} +function InnerArrayFilter(bt,bu,y,z,D){ +var bv=0; +var W=(%_IsArray(y)); +for(var B=0;B>>0)); +if(!(typeof(bt)==='function'))throw l(15,bt); +var D=ArraySpeciesCreate(y,0); +return InnerArrayFilter(bt,bu,y,z,D); +} +function InnerArrayForEach(bt,bu,y,z){ +if(!(typeof(bt)==='function'))throw l(15,bt); +var W=(%_IsArray(y)); +for(var B=0;B>>0)); +InnerArrayForEach(bt,bu,y,z); +} +function InnerArraySome(bt,bu,y,z){ +if(!(typeof(bt)==='function'))throw l(15,bt); +var W=(%_IsArray(y)); +for(var B=0;B>>0)); +return InnerArraySome(bt,bu,y,z); +} +function InnerArrayEvery(bt,bu,y,z){ +if(!(typeof(bt)==='function'))throw l(15,bt); +var W=(%_IsArray(y)); +for(var B=0;B>>0)); +return InnerArrayEvery(bt,bu,y,z); +} +function ArrayMap(bt,bu){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw l(17,"Array.prototype.map"); +var y=(%_ToObject(this)); +var z=(e?(%_ToLength(y.length)):((y.length)>>>0)); +if(!(typeof(bt)==='function'))throw l(15,bt); +var D=ArraySpeciesCreate(y,z); +var W=(%_IsArray(y)); +for(var B=0;B>>0)); +return InnerArrayIndexOf(this,aP,aj,z); +} +function InnerArrayLastIndexOf(y,aP,aj,z,by){ +if(z==0)return-1; +if(by<2){ +aj=z-1; +}else{ +aj=(%_ToInteger(aj)); +if(aj<0)aj+=z; +if(aj<0)return-1; +else if(aj>=z)aj=z-1; +} +var bw=0; +var bj=aj; +if(UseSparseVariant(y,z,(%_IsArray(y)),aj)){ +%NormalizeElements(y); +var F=%GetArrayKeys(y,aj+1); +if((typeof(F)==='number')){ +bj=F; +}else{ +if(F.length==0)return-1; +var bx=GetSortedArrayKeys(y,F); +var B=bx.length-1; +while(B>=0){ +var K=bx[B]; +if(!(K===(void 0))&&y[K]===aP)return K; +B--; +} +return-1; +} +} +if(!(aP===(void 0))){ +for(var B=bj;B>=bw;B--){ +if(y[B]===aP)return B; +} +return-1; +} +for(var B=bj;B>=bw;B--){ +if((y[B]===(void 0))&&B in y){ +return B; +} +} +return-1; +} +function ArrayLastIndexOf(aP,aj){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw l(17,"Array.prototype.lastIndexOf"); +var z=(e?(%_ToLength(this.length)):((this.length)>>>0)); +return InnerArrayLastIndexOf(this,aP,aj,z, +%_ArgumentsLength()); +} +function InnerArrayReduce(bz,ae,y,z,by){ +if(!(typeof(bz)==='function')){ +throw l(15,bz); +} +var W=(%_IsArray(y)); +var B=0; +find_initial:if(by<2){ +for(;B>>0)); +return InnerArrayReduce(bz,ae,y,z, +%_ArgumentsLength()); +} +function InnerArrayReduceRight(bz,ae,y,z, +by){ +if(!(typeof(bz)==='function')){ +throw l(15,bz); +} +var W=(%_IsArray(y)); +var B=z-1; +find_initial:if(by<2){ +for(;B>=0;B--){ +if(((W&&%_HasFastPackedElements(%IS_VAR(y)))?(B=0;B--){ +if(((W&&%_HasFastPackedElements(%IS_VAR(y)))?(B>>0)); +return InnerArrayReduceRight(bz,ae,y,z, +%_ArgumentsLength()); +} +function InnerArrayCopyWithin(bA,aD,aE,y,z){ +bA=(%_ToInteger(bA)); +var aO; +if(bA<0){ +aO=m(z+bA,0); +}else{ +aO=n(bA,z); +} +aD=(%_ToInteger(aD)); +var x; +if(aD<0){ +x=m(z+aD,0); +}else{ +x=n(aD,z); +} +aE=(aE===(void 0))?z:(%_ToInteger(aE)); +var bB; +if(aE<0){ +bB=m(z+aE,0); +}else{ +bB=n(aE,z); +} +var bC=n(bB-x,z-aO); +var bD=1; +if(x0){ +if(x in y){ +y[aO]=y[x]; +}else{ +delete y[aO]; +} +x=x+bD; +aO=aO+bD; +bC--; +} +return y; +} +function ArrayCopyWithin(bA,aD,aE){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw l(17,"Array.prototype.copyWithin"); +var y=(%_ToObject(this)); +var z=(%_ToLength(y.length)); +return InnerArrayCopyWithin(bA,aD,aE,y,z); +} +function InnerArrayFind(bE,bF,y,z){ +if(!(typeof(bE)==='function')){ +throw l(15,bE); +} +for(var B=0;Bz)B=z; +} +if(aE<0){ +aE+=z; +if(aE<0)aE=0; +}else{ +if(aE>z)aE=z; +} +if((aE-B)>0&&%object_is_frozen(y)){ +throw l(12); +} +for(;B>>0)); +return InnerArrayFill(C,aD,aE,y,z); +} +function InnerArrayIncludes(bG,bH,y,z){ +if(z===0){ +return false; +} +var ao=(%_ToInteger(bH)); +var J; +if(ao>=0){ +J=ao; +}else{ +J=z+ao; +if(J<0){ +J=0; +} +} +while(J1){ +D=%_Arguments(1); +D=(%_ToInteger(D)); +if(D<0)D=0; +if(D>C.length)D=C.length; +} +return %StringIndexOf(C,B,D); +} +function StringLastIndexOfJS(E){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.lastIndexOf"); +var F=(%_ToString(this)); +var G=F.length; +var E=(%_ToString(E)); +var H=E.length; +var D=G-H; +if(%_ArgumentsLength()>1){ +var I=(%_ToNumber(%_Arguments(1))); +if(!(!%_IsSmi(%IS_VAR(I))&&!(I==I))){ +I=(%_ToInteger(I)); +if(I<0){ +I=0; +} +if(I+H0xFF&& +(typeof(S)==='string')&& +%StringIndexOf(S,'$',0)<0){ +return %StringReplaceOneCharWithString(C,R,S); +} +var U=%StringIndexOf(C,R,0); +if(U<0)return C; +var V=U+R.length; +var u=%_SubString(C,0,U); +if((typeof(S)==='function')){ +u+=S(R,U,C); +}else{ +Q[3]=U; +Q[4]=V; +u=ExpandReplacement((%_ToString(S)), +C, +Q, +u); +} +return u+%_SubString(C,V,C.length); +} +function ExpandReplacement(W,C,X,u){ +var Y=W.length; +var Z=%StringIndexOf(W,'$',0); +if(Z<0){ +if(Y>0)u+=W; +return u; +} +if(Z>0)u+=%_SubString(W,0,Z); +while(true){ +var aa='$'; +var I=Z+1; +if(I=48&&ab<=57){ +var ac=(ab-48)<<1; +var ad=1; +var ae=((X)[0]); +if(I+1=48&&Z<=57){ +var af=ac*10+((Z-48)<<1); +if(af=0){ +u+= +%_SubString(C,U,X[(3+(ac+1))]); +} +I+=ad; +}else{ +u+='$'; +} +}else{ +u+='$'; +} +}else{ +u+='$'; +} +Z=%StringIndexOf(W,'$',I); +if(Z<0){ +if(II){ +u+=%_SubString(W,I,Z); +} +} +return u; +} +function CaptureString(W,ag,D){ +var ah=D<<1; +var U=ag[(3+(ah))]; +if(U<0)return; +var V=ag[(3+(ah+1))]; +return %_SubString(W,U,V); +} +var ai=new g(4); +function StringReplaceGlobalRegExpWithFunction(C,K,S){ +var aj=ai; +if(aj){ +ai=null; +}else{ +aj=new g(16); +} +var ak=%RegExpExecMultiple(K, +C, +p, +aj); +K.lastIndex=0; +if((ak===null)){ +ai=aj; +return C; +} +var w=ak.length; +if(((p)[0])==2){ +var al=0; +for(var z=0;z0){ +al=(am>>11)+(am&0x7ff); +}else{ +al=ak[++z]-am; +} +}else{ +var an=S(am,al,C); +ak[z]=(%_ToString(an)); +al+=am.length; +} +} +}else{ +for(var z=0;z>1; +var aq; +if(ap==1){ +var L=%_SubString(C,D,ao); +aq=S(L,D,C); +}else{ +var ar=new g(ap+2); +for(var as=0;asau){ +return''; +} +} +if(aw<0){ +aw+=au; +if(aw<0){ +return''; +} +}else{ +if(aw>au){ +aw=au; +} +} +if(aw<=av){ +return''; +} +return %_SubString(L,av,aw); +} +function StringSplitJS(ax,ay){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.split"); +if(!(ax==null)){ +var az=ax[r]; +if(!(az===(void 0))){ +return %_Call(az,ax,this,ay); +} +} +var C=(%_ToString(this)); +ay=((ay===(void 0)))?4294967295:((ay)>>>0); +var Y=C.length; +var aA=(%_ToString(ax)); +if(ay===0)return[]; +if((ax===(void 0)))return[C]; +var aB=aA.length; +if(aB===0)return %StringToArray(C,ay); +return %StringSplit(C,aA,ay); +} +function StringSubstring(U,V){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.subString"); +var L=(%_ToString(this)); +var au=L.length; +var av=(%_ToInteger(U)); +if(av<0){ +av=0; +}else if(av>au){ +av=au; +} +var aw=au; +if(!(V===(void 0))){ +aw=(%_ToInteger(V)); +if(aw>au){ +aw=au; +}else{ +if(aw<0)aw=0; +if(av>aw){ +var aC=aw; +aw=av; +av=aC; +} +} +} +return %_SubString(L,av,aw); +} +function StringSubstr(U,aD){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.substr"); +var L=(%_ToString(this)); +var w; +if((aD===(void 0))){ +w=L.length; +}else{ +w=(%_ToInteger(aD)); +if(w<=0)return''; +} +if((U===(void 0))){ +U=0; +}else{ +U=(%_ToInteger(U)); +if(U>=L.length)return''; +if(U<0){ +U+=L.length; +if(U<0)U=0; +} +} +var V=U+w; +if(V>L.length)V=L.length; +return %_SubString(L,U,V); +} +function StringToLowerCaseJS(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.toLowerCase"); +return %StringToLowerCase((%_ToString(this))); +} +function StringToLocaleLowerCase(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.toLocaleLowerCase"); +return %StringToLowerCase((%_ToString(this))); +} +function StringToUpperCaseJS(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.toUpperCase"); +return %StringToUpperCase((%_ToString(this))); +} +function StringToLocaleUpperCase(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.toLocaleUpperCase"); +return %StringToUpperCase((%_ToString(this))); +} +function StringTrimJS(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.trim"); +return %StringTrim((%_ToString(this)),true,true); +} +function StringTrimLeft(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.trimLeft"); +return %StringTrim((%_ToString(this)),true,false); +} +function StringTrimRight(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.trimRight"); +return %StringTrim((%_ToString(this)),false,true); +} +function StringFromCharCode(aE){ +var aD=%_ArgumentsLength(); +if(aD==1)return %_StringCharFromCode(aE&0xffff); +var aF=%NewString(aD,true); +var z; +for(z=0;z0xff)break; +%_OneByteSeqStringSetChar(z,aE,aF); +} +if(z==aD)return aF; +aF=%TruncateString(aF,z); +var aG=%NewString(aD-z,false); +%_TwoByteSeqStringSetChar(0,aE,aG); +z++; +for(var as=1;z"+(%_ToString(this))+ +""; +} +function StringBig(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.big"); +return""+(%_ToString(this))+""; +} +function StringBlink(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.blink"); +return""+(%_ToString(this))+""; +} +function StringBold(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.bold"); +return""+(%_ToString(this))+""; +} +function StringFixed(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.fixed"); +return""+(%_ToString(this))+""; +} +function StringFontcolor(aJ){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.fontcolor"); +return""+(%_ToString(this))+ +""; +} +function StringFontsize(aK){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.fontsize"); +return""+(%_ToString(this))+ +""; +} +function StringItalics(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.italics"); +return""+(%_ToString(this))+""; +} +function StringLink(L){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.link"); +return""+(%_ToString(this))+""; +} +function StringSmall(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.small"); +return""+(%_ToString(this))+""; +} +function StringStrike(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.strike"); +return""+(%_ToString(this))+""; +} +function StringSub(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.sub"); +return""+(%_ToString(this))+""; +} +function StringSup(){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.sup"); +return""+(%_ToString(this))+""; +} +function StringRepeat(aL){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.repeat"); +var L=(%_ToString(this)); +var aD=(%_ToInteger(aL)); +if(aD<0||aD===(1/0))throw i(168); +if(L.length===0)return""; +if(aD>%_MaxSmi())throw i(168); +var aM=""; +while(true){ +if(aD&1)aM+=L; +aD>>=1; +if(aD===0)return aM; +L+=L; +} +} +function StringStartsWith(aN){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.startsWith"); +var L=(%_ToString(this)); +if((%_IsRegExp(aN))){ +throw j(38,"String.prototype.startsWith"); +} +var aO=(%_ToString(aN)); +var t=0; +if(%_ArgumentsLength()>1){ +var aP=%_Arguments(1); +if(!(aP===(void 0))){ +t=(%_ToInteger(aP)); +} +} +var au=L.length; +var U=l(k(t,0),au); +var aQ=aO.length; +if(aQ+U>au){ +return false; +} +return %_SubString(L,U,U+aQ)===aO; +} +function StringEndsWith(aN){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.endsWith"); +var L=(%_ToString(this)); +if((%_IsRegExp(aN))){ +throw j(38,"String.prototype.endsWith"); +} +var aO=(%_ToString(aN)); +var au=L.length; +var t=au; +if(%_ArgumentsLength()>1){ +var aP=%_Arguments(1); +if(!(aP===(void 0))){ +t=(%_ToInteger(aP)); +} +} +var V=l(k(t,0),au); +var aQ=aO.length; +var U=V-aQ; +if(U<0){ +return false; +} +return %_SubString(L,U,U+aQ)===aO; +} +function StringIncludes(aN){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.includes"); +var W=(%_ToString(this)); +if((%_IsRegExp(aN))){ +throw j(38,"String.prototype.includes"); +} +aN=(%_ToString(aN)); +var t=0; +if(%_ArgumentsLength()>1){ +t=%_Arguments(1); +t=(%_ToInteger(t)); +} +var aR=W.length; +if(t<0)t=0; +if(t>aR)t=aR; +var aS=aN.length; +if(aS+t>aR){ +return false; +} +return %StringIndexOf(W,aN,t)!==-1; +} +function StringCodePointAt(t){ +if((%IS_VAR(this)===null)||(this===(void 0)))throw j(17,"String.prototype.codePointAt"); +var W=(%_ToString(this)); +var aK=W.length; +t=(%_ToInteger(t)); +if(t<0||t>=aK){ +return(void 0); +} +var aT=%_StringCharCodeAt(W,t); +if(aT<0xD800||aT>0xDBFF||t+1==aK){ +return aT; +} +var aU=%_StringCharCodeAt(W,t+1); +if(aU<0xDC00||aU>0xDFFF){ +return aT; +} +return(aT-0xD800)*0x400+aU+0x2400; +} +function StringFromCodePoint(aV){ +var aE; +var Y=%_ArgumentsLength(); +var D; +var u=""; +for(D=0;D0x10FFFF||aE!==(%_ToInteger(aE))){ +throw i(167,aE); +} +if(aE<=0xFFFF){ +u+=%_StringCharFromCode(aE); +}else{ +aE-=0x10000; +u+=%_StringCharFromCode((aE>>>10)&0x3FF|0xD800); +u+=%_StringCharFromCode(aE&0x3FF|0xDC00); +} +} +return u; +} +function StringRaw(aW){ +var aX=%_ArgumentsLength(); +var aY=(%_ToObject(aW)); +var aZ=(%_ToObject(aY.raw)); +var ba=(%_ToLength(aZ.length)); +if(ba<=0)return""; +var u=(%_ToString(aZ[0])); +for(var z=1;z=48&&h<=57)return h-48; +if(h>=65&&h<=70)return h-55; +if(h>=97&&h<=102)return h-87; +return-1; +} +function isAlphaNumeric(i){ +if(97<=i&&i<=122)return true; +if(65<=i&&i<=90)return true; +if(48<=i&&i<=57)return true; +return false; +} +var j=0; +function URIAddEncodedOctetToBuffer(k,l,m){ +l[m++]=37; +l[m++]=j[k>>4]; +l[m++]=j[k&0x0F]; +return m; +} +function URIEncodeOctets(n,l,m){ +if(j===0){ +j=[48,49,50,51,52,53,54,55,56,57, +65,66,67,68,69,70]; +} +m=URIAddEncodedOctetToBuffer(n[0],l,m); +if(n[1])m=URIAddEncodedOctetToBuffer(n[1],l,m); +if(n[2])m=URIAddEncodedOctetToBuffer(n[2],l,m); +if(n[3])m=URIAddEncodedOctetToBuffer(n[3],l,m); +return m; +} +function URIEncodeSingle(i,l,m){ +var o=(i>>12)&0xF; +var p=(i>>6)&63; +var q=i&63; +var n=new d(3); +if(i<=0x007F){ +n[0]=i; +}else if(i<=0x07FF){ +n[0]=p+192; +n[1]=q+128; +}else{ +n[0]=o+224; +n[1]=p+128; +n[2]=q+128; +} +return URIEncodeOctets(n,l,m); +} +function URIEncodePair(r,s,l,m){ +var t=((r>>6)&0xF)+1; +var u=(r>>2)&0xF; +var o=r&3; +var p=(s>>6)&0xF; +var q=s&63; +var n=new d(4); +n[0]=(t>>2)+240; +n[1]=(((t&3)<<4)|u)+128; +n[2]=((o<<4)|p)+128; +n[3]=q+128; +return URIEncodeOctets(n,l,m); +} +function URIHexCharsToCharCode(v,w){ +var x=HexValueOf(v); +var y=HexValueOf(w); +if(x==-1||y==-1)throw f(); +return(x<<4)|y; +} +function URIDecodeOctets(n,l,m){ +var z; +var A=n[0]; +if(A<0x80){ +z=A; +}else if(A<0xc2){ +throw f(); +}else{ +var B=n[1]; +if(A<0xe0){ +var C=A&0x1f; +if((B<0x80)||(B>0xbf))throw f(); +var D=B&0x3f; +z=(C<<6)+D; +if(z<0x80||z>0x7ff)throw f(); +}else{ +var E=n[2]; +if(A<0xf0){ +var C=A&0x0f; +if((B<0x80)||(B>0xbf))throw f(); +var D=B&0x3f; +if((E<0x80)||(E>0xbf))throw f(); +var F=E&0x3f; +z=(C<<12)+(D<<6)+F; +if((z<0x800)||(z>0xffff))throw f(); +}else{ +var G=n[3]; +if(A<0xf8){ +var C=(A&0x07); +if((B<0x80)||(B>0xbf))throw f(); +var D=(B&0x3f); +if((E<0x80)||(E>0xbf)){ +throw f(); +} +var F=(E&0x3f); +if((G<0x80)||(G>0xbf))throw f(); +var H=(G&0x3f); +z=(C<<18)+(D<<12)+(F<<6)+H; +if((z<0x10000)||(z>0x10ffff))throw f(); +}else{ +throw f(); +} +} +} +} +if(0xD800<=z&&z<=0xDFFF)throw f(); +if(z<0x10000){ +%_TwoByteSeqStringSetChar(m++,z,l); +}else{ +%_TwoByteSeqStringSetChar(m++,(z>>10)+0xd7c0,l); +%_TwoByteSeqStringSetChar(m++,(z&0x3ff)+0xdc00,l); +} +return m; +} +function Encode(I,J){ +I=(%_ToString(I)); +var K=I.length; +var L=new e(K); +var m=0; +for(var M=0;M=0xDC00&&r<=0xDFFF)throw f(); +if(r<0xD800||r>0xDBFF){ +m=URIEncodeSingle(r,L,m); +}else{ +M++; +if(M==K)throw f(); +var s=%_StringCharCodeAt(I,M); +if(s<0xDC00||s>0xDFFF)throw f(); +m=URIEncodePair(r,s,L,m); +} +} +} +var l=%NewString(L.length,true); +for(var N=0;N=K)throw f(); +var i=URIHexCharsToCharCode(%_StringCharCodeAt(I,M+1), +%_StringCharCodeAt(I,M+2)); +if(i>>7)break; +if(O(i)){ +%_OneByteSeqStringSetChar(m++,37,P); +%_OneByteSeqStringSetChar(m++,%_StringCharCodeAt(I,M+1), +P); +%_OneByteSeqStringSetChar(m++,%_StringCharCodeAt(I,M+2), +P); +}else{ +%_OneByteSeqStringSetChar(m++,i,P); +} +M+=2; +}else{ +if(h>0x7f)break; +%_OneByteSeqStringSetChar(m++,h,P); +} +} +P=%TruncateString(P,m); +if(M==K)return P; +var Q=%NewString(K-M,false); +m=0; +for(;M=K)throw f(); +var i=URIHexCharsToCharCode(%_StringCharCodeAt(I,++M), +%_StringCharCodeAt(I,++M)); +if(i>>7){ +var R=0; +while(((i<<++R)&0x80)!=0){} +if(R==1||R>4)throw f(); +var n=new d(R); +n[0]=i; +if(M+3*(R-1)>=K)throw f(); +for(var N=1;N0)?k:0-k; +} +function MathAcosJS(k){ +return %_MathAcos(+k); +} +function MathAsinJS(k){ +return %_MathAsin(+k); +} +function MathAtanJS(k){ +return %_MathAtan(+k); +} +function MathAtan2JS(l,k){ +l=+l; +k=+k; +return %_MathAtan2(l,k); +} +function MathCeil(k){ +return-%_MathFloor(-k); +} +function MathExp(k){ +return %MathExpRT((%_ToNumber(k))); +} +function MathFloorJS(k){ +return %_MathFloor(+k); +} +function MathLog(k){ +return %_MathLogRT((%_ToNumber(k))); +} +function MathMax(m,n){ +var o=%_ArgumentsLength(); +if(o==2){ +m=(%_ToNumber(m)); +n=(%_ToNumber(n)); +if(n>m)return n; +if(m>n)return m; +if(m==n){ +return(m===0&&%_IsMinusZero(m))?n:m; +} +return g; +} +var p=-(1/0); +for(var q=0;qp||(p===0&&r===0&&%_IsMinusZero(p))){ +p=r; +} +} +return p; +} +function MathMin(m,n){ +var o=%_ArgumentsLength(); +if(o==2){ +m=(%_ToNumber(m)); +n=(%_ToNumber(n)); +if(n>m)return m; +if(m>n)return n; +if(m==n){ +return(m===0&&%_IsMinusZero(m))?m:n; +} +return g; +} +var p=(1/0); +for(var q=0;q=64){ +i=%GenerateRandomNumbers(i); +h=2; +} +return i[h++]; +} +function MathRandomRaw(){ +if(h>=64){ +i=%GenerateRandomNumbers(i); +h=2; +} +return %_DoubleLo(i[h++])&0x3FFFFFFF; +} +function MathRound(k){ +return %RoundNumber((%_ToNumber(k))); +} +function MathSqrtJS(k){ +return %_MathSqrt(+k); +} +function MathImul(k,l){ +return %NumberImul((%_ToNumber(k)),(%_ToNumber(l))); +} +function MathSign(k){ +k=+k; +if(k>0)return 1; +if(k<0)return-1; +return k; +} +function MathTrunc(k){ +k=+k; +if(k>0)return %_MathFloor(k); +if(k<0)return-%_MathFloor(-k); +return k; +} +function MathAsinh(k){ +k=(%_ToNumber(k)); +if(k===0||!(%_IsSmi(%IS_VAR(k))||((k==k)&&(k!=1/0)&&(k!=-1/0))))return k; +if(k>0)return MathLog(k+%_MathSqrt(k*k+1)); +return-MathLog(-k+%_MathSqrt(k*k+1)); +} +function MathAcosh(k){ +k=(%_ToNumber(k)); +if(k<1)return g; +if(!(%_IsSmi(%IS_VAR(k))||((k==k)&&(k!=1/0)&&(k!=-1/0))))return k; +return MathLog(k+%_MathSqrt(k+1)*%_MathSqrt(k-1)); +} +function MathAtanh(k){ +k=(%_ToNumber(k)); +if(k===0)return k; +if(!(%_IsSmi(%IS_VAR(k))||((k==k)&&(k!=1/0)&&(k!=-1/0))))return g; +return 0.5*MathLog((1+k)/(1-k)); +} +function MathHypot(k,l){ +var o=%_ArgumentsLength(); +var s=new f(o); +var t=0; +for(var q=0;qt)t=r; +s[q]=r; +} +if(t===0)t=1; +var u=0; +var v=0; +for(var q=0;q>>0); +} +function MathCbrt(k){ +k=(%_ToNumber(k)); +if(k==0||!(%_IsSmi(%IS_VAR(k))||((k==k)&&(k!=1/0)&&(k!=-1/0))))return k; +return k>=0?CubeRoot(k):-CubeRoot(-k); +} +function CubeRoot(k){ +var y=MathFloorJS(%_DoubleHi(k)/3)+0x2A9F7893; +var z=%_ConstructDouble(y|0,0); +z=(1.0/3.0)*(k/(z*z)+2*z); +; +z=(1.0/3.0)*(k/(z*z)+2*z); +; +z=(1.0/3.0)*(k/(z*z)+2*z); +; +return(1.0/3.0)*(k/(z*z)+2*z); +; +} +%AddNamedProperty(d,j,"Math",1|2); +b.InstallConstants(d,[ +"E",2.7182818284590452354, +"LN10",2.302585092994046, +"LN2",0.6931471805599453, +"LOG2E",1.4426950408889634, +"LOG10E",0.4342944819032518, +"PI",3.1415926535897932, +"SQRT1_2",0.7071067811865476, +"SQRT2",1.4142135623730951 +]); +b.InstallFunctions(d,2,[ +"random",MathRandom, +"abs",MathAbs, +"acos",MathAcosJS, +"asin",MathAsinJS, +"atan",MathAtanJS, +"ceil",MathCeil, +"exp",MathExp, +"floor",MathFloorJS, +"log",MathLog, +"round",MathRound, +"sqrt",MathSqrtJS, +"atan2",MathAtan2JS, +"pow",MathPowJS, +"max",MathMax, +"min",MathMin, +"imul",MathImul, +"sign",MathSign, +"trunc",MathTrunc, +"asinh",MathAsinh, +"acosh",MathAcosh, +"atanh",MathAtanh, +"hypot",MathHypot, +"fround",MathFroundJS, +"clz32",MathClz32JS, +"cbrt",MathCbrt +]); +%SetForceInlineFlag(MathAbs); +%SetForceInlineFlag(MathAcosJS); +%SetForceInlineFlag(MathAsinJS); +%SetForceInlineFlag(MathAtanJS); +%SetForceInlineFlag(MathAtan2JS); +%SetForceInlineFlag(MathCeil); +%SetForceInlineFlag(MathClz32JS); +%SetForceInlineFlag(MathFloorJS); +%SetForceInlineFlag(MathRandom); +%SetForceInlineFlag(MathSign); +%SetForceInlineFlag(MathSqrtJS); +%SetForceInlineFlag(MathTrunc); +b.Export(function(A){ +A.MathAbs=MathAbs; +A.MathExp=MathExp; +A.MathFloor=MathFloorJS; +A.IntRandom=MathRandomRaw; +A.MathMax=MathMax; +A.MathMin=MathMin; +}); +}) + +fdlibm +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Float64Array; +var d=a.Math; +var e; +var f; +var g=%GetRootNaN(); +var h; +b.Import(function(i){ +e=i.MathAbs; +f=i.MathExp; +}); +b.CreateDoubleResultArray=function(a){ +h=new c(2); +}; +function KernelTan(j,k,l){ +var m; +var n; +var o=%_DoubleHi(j); +var p=o&0x7fffffff; +if(p<0x3e300000){ +if(((p|%_DoubleLo(j))|(l+1))==0){ +return 1/e(j); +}else{ +if(l==1){ +return j; +}else{ +var n=j+k; +var m=%_ConstructDouble(%_DoubleHi(n),0); +var q=k-(m-j); +var r=-1/n; +var s=%_ConstructDouble(%_DoubleHi(r),0); +var t=1+s*m; +return s+r*(t+s*q); +} +} +} +if(p>=0x3fe59428){ +if(j<0){ +j=-j; +k=-k; +} +m=7.85398163397448278999e-01-j; +n=3.06161699786838301793e-17-k; +j=m+n; +k=0; +} +m=j*j; +n=m*m; +var u=1.33333333333201242699e-01+n*(2.18694882948595424599e-02+n*(3.59207910759131235356e-03+ +n*(5.88041240820264096874e-04+n*(7.81794442939557092300e-05+n*-1.85586374855275456654e-05)))); +var q=m*(5.39682539762260521377e-02+n*(8.86323982359930005737e-03+n*(1.45620945432529025516e-03+ +n*(2.46463134818469906812e-04+n*(7.14072491382608190305e-05+n*2.59073051863633712884e-05))))); +var t=m*j; +u=k+m*(t*(u+q)+k); +u=u+3.33333333333334091986e-01*t; +n=j+u; +if(p>=0x3fe59428){ +return(1-((o>>30)&2))* +(l-2.0*(j-(n*n/(n+l)-u))); +} +if(l==1){ +return n; +}else{ +m=%_ConstructDouble(%_DoubleHi(n),0); +q=u-(m-j); +var r=-1/n; +var s=%_ConstructDouble(%_DoubleHi(r),0); +t=1+s*m; +return s+r*(t+s*q); +} +} +function MathSinSlow(j){ +var v,w,x; +var o=%_DoubleHi(j); +var p=o&0x7fffffff; +if(p<0x4002d97c){ +if(o>0){ +var m=j-1.57079632673412561417; +if(p!=0x3ff921fb){ +w=m-6.07710050650619224932e-11; +x=(m-w)-6.07710050650619224932e-11; +}else{ +m-=6.07710050630396597660e-11; +w=m-2.02226624879595063154e-21; +x=(m-w)-2.02226624879595063154e-21; +} +v=1; +}else{ +var m=j+1.57079632673412561417; +if(p!=0x3ff921fb){ +w=m+6.07710050650619224932e-11; +x=(m-w)+6.07710050650619224932e-11; +}else{ +m+=6.07710050630396597660e-11; +w=m+2.02226624879595063154e-21; +x=(m-w)+2.02226624879595063154e-21; +} +v=-1; +} +}else if(p<=0x413921fb){ +var s=e(j); +v=(s*6.36619772367581382433e-01+0.5)|0; +var u=s-v*1.57079632673412561417; +var n=v*6.07710050650619224932e-11; +w=u-n; +if(p-(%_DoubleHi(w)&0x7ff00000)>0x1000000){ +s=u; +n=v*6.07710050630396597660e-11; +u=s-n; +n=v*2.02226624879595063154e-21-((s-u)-n); +w=u-n; +if(p-(%_DoubleHi(w)&0x7ff00000)>0x3100000){ +s=u; +n=v*2.02226624871116645580e-21; +u=s-n; +n=v*8.47842766036889956997e-32-((s-u)-n); +w=u-n; +} +} +x=(u-w)-n; +if(o<0){ +v=-v; +w=-w; +x=-x; +} +}else{ +v=%RemPiO2(j,h); +w=h[0]; +x=h[1]; +} +; +var y=1-(v&2); +if(v&1){ +var p=%_DoubleHi(w)&0x7fffffff; +var m=w*w; +var u=m*(4.16666666666666019037e-02+m*(-1.38888888888741095749e-03+m*(2.48015872894767294178e-05+m*(-2.75573143513906633035e-07+m*(2.08757232129817482790e-09+m*-1.13596475577881948265e-11))))); +if(p<0x3fd33333){ +return(1-(0.5*m-(m*u-w*x)))*y; +}else{ +var z; +if(p>0x3fe90000){ +z=0.28125; +}else{ +z=%_ConstructDouble(%_DoubleHi(0.25*w),0); +} +var A=0.5*m-z; +return(1-z-(A-(m*u-w*x)))*y; +} +; +}else{ +var m=w*w; +var q=m*w; +var u=8.33333333332248946124e-03+m*(-1.98412698298579493134e-04+m*(2.75573137070700676789e-06+m*(-2.50507602534068634195e-08+m*1.58969099521155010221e-10))); +return(w-((m*(0.5*x-q*u)-x)-q*-1.66666666666666324348e-01))*y; +; +} +} +function MathCosSlow(j){ +var v,w,x; +var o=%_DoubleHi(j); +var p=o&0x7fffffff; +if(p<0x4002d97c){ +if(o>0){ +var m=j-1.57079632673412561417; +if(p!=0x3ff921fb){ +w=m-6.07710050650619224932e-11; +x=(m-w)-6.07710050650619224932e-11; +}else{ +m-=6.07710050630396597660e-11; +w=m-2.02226624879595063154e-21; +x=(m-w)-2.02226624879595063154e-21; +} +v=1; +}else{ +var m=j+1.57079632673412561417; +if(p!=0x3ff921fb){ +w=m+6.07710050650619224932e-11; +x=(m-w)+6.07710050650619224932e-11; +}else{ +m+=6.07710050630396597660e-11; +w=m+2.02226624879595063154e-21; +x=(m-w)+2.02226624879595063154e-21; +} +v=-1; +} +}else if(p<=0x413921fb){ +var s=e(j); +v=(s*6.36619772367581382433e-01+0.5)|0; +var u=s-v*1.57079632673412561417; +var n=v*6.07710050650619224932e-11; +w=u-n; +if(p-(%_DoubleHi(w)&0x7ff00000)>0x1000000){ +s=u; +n=v*6.07710050630396597660e-11; +u=s-n; +n=v*2.02226624879595063154e-21-((s-u)-n); +w=u-n; +if(p-(%_DoubleHi(w)&0x7ff00000)>0x3100000){ +s=u; +n=v*2.02226624871116645580e-21; +u=s-n; +n=v*8.47842766036889956997e-32-((s-u)-n); +w=u-n; +} +} +x=(u-w)-n; +if(o<0){ +v=-v; +w=-w; +x=-x; +} +}else{ +v=%RemPiO2(j,h); +w=h[0]; +x=h[1]; +} +; +if(v&1){ +var y=(v&2)-1; +var m=w*w; +var q=m*w; +var u=8.33333333332248946124e-03+m*(-1.98412698298579493134e-04+m*(2.75573137070700676789e-06+m*(-2.50507602534068634195e-08+m*1.58969099521155010221e-10))); +return(w-((m*(0.5*x-q*u)-x)-q*-1.66666666666666324348e-01))*y; +; +}else{ +var y=1-(v&2); +var p=%_DoubleHi(w)&0x7fffffff; +var m=w*w; +var u=m*(4.16666666666666019037e-02+m*(-1.38888888888741095749e-03+m*(2.48015872894767294178e-05+m*(-2.75573143513906633035e-07+m*(2.08757232129817482790e-09+m*-1.13596475577881948265e-11))))); +if(p<0x3fd33333){ +return(1-(0.5*m-(m*u-w*x)))*y; +}else{ +var z; +if(p>0x3fe90000){ +z=0.28125; +}else{ +z=%_ConstructDouble(%_DoubleHi(0.25*w),0); +} +var A=0.5*m-z; +return(1-z-(A-(m*u-w*x)))*y; +} +; +} +} +function MathSin(j){ +j=+j; +if((%_DoubleHi(j)&0x7fffffff)<=0x3fe921fb){ +var m=j*j; +var q=m*j; +var u=8.33333333332248946124e-03+m*(-1.98412698298579493134e-04+m*(2.75573137070700676789e-06+m*(-2.50507602534068634195e-08+m*1.58969099521155010221e-10))); +return(j-((m*(0.5*0-q*u)-0)-q*-1.66666666666666324348e-01)); +; +} +return+MathSinSlow(j); +} +function MathCos(j){ +j=+j; +if((%_DoubleHi(j)&0x7fffffff)<=0x3fe921fb){ +var p=%_DoubleHi(j)&0x7fffffff; +var m=j*j; +var u=m*(4.16666666666666019037e-02+m*(-1.38888888888741095749e-03+m*(2.48015872894767294178e-05+m*(-2.75573143513906633035e-07+m*(2.08757232129817482790e-09+m*-1.13596475577881948265e-11))))); +if(p<0x3fd33333){ +return(1-(0.5*m-(m*u-j*0))); +}else{ +var z; +if(p>0x3fe90000){ +z=0.28125; +}else{ +z=%_ConstructDouble(%_DoubleHi(0.25*j),0); +} +var A=0.5*m-z; +return(1-z-(A-(m*u-j*0))); +} +; +} +return+MathCosSlow(j); +} +function MathTan(j){ +j=j*1; +if((%_DoubleHi(j)&0x7fffffff)<=0x3fe921fb){ +return KernelTan(j,0,1); +} +var v,w,x; +var o=%_DoubleHi(j); +var p=o&0x7fffffff; +if(p<0x4002d97c){ +if(o>0){ +var m=j-1.57079632673412561417; +if(p!=0x3ff921fb){ +w=m-6.07710050650619224932e-11; +x=(m-w)-6.07710050650619224932e-11; +}else{ +m-=6.07710050630396597660e-11; +w=m-2.02226624879595063154e-21; +x=(m-w)-2.02226624879595063154e-21; +} +v=1; +}else{ +var m=j+1.57079632673412561417; +if(p!=0x3ff921fb){ +w=m+6.07710050650619224932e-11; +x=(m-w)+6.07710050650619224932e-11; +}else{ +m+=6.07710050630396597660e-11; +w=m+2.02226624879595063154e-21; +x=(m-w)+2.02226624879595063154e-21; +} +v=-1; +} +}else if(p<=0x413921fb){ +var s=e(j); +v=(s*6.36619772367581382433e-01+0.5)|0; +var u=s-v*1.57079632673412561417; +var n=v*6.07710050650619224932e-11; +w=u-n; +if(p-(%_DoubleHi(w)&0x7ff00000)>0x1000000){ +s=u; +n=v*6.07710050630396597660e-11; +u=s-n; +n=v*2.02226624879595063154e-21-((s-u)-n); +w=u-n; +if(p-(%_DoubleHi(w)&0x7ff00000)>0x3100000){ +s=u; +n=v*2.02226624871116645580e-21; +u=s-n; +n=v*8.47842766036889956997e-32-((s-u)-n); +w=u-n; +} +} +x=(u-w)-n; +if(o<0){ +v=-v; +w=-w; +x=-x; +} +}else{ +v=%RemPiO2(j,h); +w=h[0]; +x=h[1]; +} +; +return KernelTan(w,x,(v&1)?-1:1); +} +function MathLog1p(j){ +j=j*1; +var o=%_DoubleHi(j); +var B=o&0x7fffffff; +var C=1; +var D=j; +var E=1; +var F=0; +var G=j; +if(o<0x3fda827a){ +if(B>=0x3ff00000){ +if(j===-1){ +return-(1/0); +}else{ +return g; +} +}else if(B<0x3c900000){ +return j; +}else if(B<0x3e200000){ +return j-j*j*0.5; +} +if((o>0)||(o<=-0x402D413D)){ +C=0; +} +} +if(o>=0x7ff00000)return j; +if(C!==0){ +if(o<0x43400000){ +G=1+j; +E=%_DoubleHi(G); +C=(E>>20)-1023; +F=(C>0)?1-(G-j):j-(G-1); +F=F/G; +}else{ +E=%_DoubleHi(G); +C=(E>>20)-1023; +} +E=E&0xfffff; +if(E<0x6a09e){ +G=%_ConstructDouble(E|0x3ff00000,%_DoubleLo(G)); +}else{ +++C; +G=%_ConstructDouble(E|0x3fe00000,%_DoubleLo(G)); +E=(0x00100000-E)>>2; +} +D=G-1; +} +var H=0.5*D*D; +if(E===0){ +if(D===0){ +if(C===0){ +return 0.0; +}else{ +return C*6.93147180369123816490e-01+(F+C*1.90821492927058770002e-10); +} +} +var I=H*(1-6.666666666666666666e-01*D); +if(C===0){ +return D-I; +}else{ +return C*6.93147180369123816490e-01-((I-(C*1.90821492927058770002e-10+F))-D); +} +} +var t=D/(2+D); +var m=t*t; +var I=m*(6.666666666666735130e-01+m*(3.999999999940941908e-01+m*(2.857142874366239149e-01+m*(2.222219843214978396e-01+ +m*(1.818357216161805012e-01+m*(1.531383769920937332e-01+m*1.479819860511658591e-01)))))); +if(C===0){ +return D-(H-t*(H+I)); +}else{ +return C*6.93147180369123816490e-01-((H-(t*(H+I)+(C*1.90821492927058770002e-10+F)))-D); +} +} +function MathExpm1(j){ +j=j*1; +var k; +var J; +var K; +var C; +var s; +var F; +var o=%_DoubleHi(j); +var L=o&0x80000000; +var k=(L===0)?j:-j; +o&=0x7fffffff; +if(o>=0x4043687a){ +if(o>=0x40862e42){ +if(o>=0x7ff00000){ +return(j===-(1/0))?-1:j; +} +if(j>7.09782712893383973096e+02)return(1/0); +} +if(L!=0)return-1; +} +if(o>0x3fd62e42){ +if(o<0x3ff0a2b2){ +if(L===0){ +J=j-6.93147180369123816490e-01; +K=1.90821492927058770002e-10; +C=1; +}else{ +J=j+6.93147180369123816490e-01; +K=-1.90821492927058770002e-10; +C=-1; +} +}else{ +C=(1.44269504088896338700*j+((L===0)?0.5:-0.5))|0; +s=C; +J=j-s*6.93147180369123816490e-01; +K=s*1.90821492927058770002e-10; +} +j=J-K; +F=(J-j)-K; +}else if(o<0x3c900000){ +return j; +}else{ +C=0; +} +var M=0.5*j; +var N=j*M; +var O=1+N*(-3.33333333333331316428e-02+N*(1.58730158725481460165e-03+N* +(-7.93650757867487942473e-05+N*(4.00821782732936239552e-06+N*-2.01099218183624371326e-07)))); +s=3-O*M; +var P=N*((O-s)/(6-j*s)); +if(C===0){ +return j-(j*P-N); +}else{ +P=(j*(P-F)-F); +P-=N; +if(C===-1)return 0.5*(j-P)-0.5; +if(C===1){ +if(j<-0.25)return-2*(P-(j+0.5)); +return 1+2*(j-P); +} +if(C<=-2||C>56){ +k=1-(P-j); +k=%_ConstructDouble(%_DoubleHi(k)+(C<<20),%_DoubleLo(k)); +return k-1; +} +if(C<20){ +s=%_ConstructDouble(0x3ff00000-(0x200000>>C),0); +k=s-(P-j); +k=%_ConstructDouble(%_DoubleHi(k)+(C<<20),%_DoubleLo(k)); +}else{ +s=%_ConstructDouble((0x3ff-C)<<20,0); +k=j-(P+s); +k+=1; +k=%_ConstructDouble(%_DoubleHi(k)+(C<<20),%_DoubleLo(k)); +} +} +return k; +} +function MathSinh(j){ +j=j*1; +var Q=(j<0)?-0.5:0.5; +var B=e(j); +if(B<22){ +if(B<3.725290298461914e-9)return j; +var s=MathExpm1(B); +if(B<1)return Q*(2*s-s*s/(s+1)); +return Q*(s+s/(s+1)); +} +if(B<709.7822265625)return Q*f(B); +if(B<=710.4758600739439){ +var n=f(0.5*B); +var s=Q*n; +return s*n; +} +return j*(1/0); +} +function MathCosh(j){ +j=j*1; +var p=%_DoubleHi(j)&0x7fffffff; +if(p<0x3fd62e43){ +var s=MathExpm1(e(j)); +var n=1+s; +if(p<0x3c800000)return n; +return 1+(s*s)/(n+n); +} +if(p<0x40360000){ +var s=f(e(j)); +return 0.5*s+0.5/s; +} +if(p<0x40862e42)return 0.5*f(e(j)); +if(e(j)<=710.4758600739439){ +var n=f(0.5*e(j)); +var s=0.5*n; +return s*n; +} +if((!%_IsSmi(%IS_VAR(j))&&!(j==j)))return j; +return(1/0); +} +function MathTanh(j){ +j=j*1; +if(!(%_IsSmi(%IS_VAR(j))||((j==j)&&(j!=1/0)&&(j!=-1/0)))){ +if(j>0)return 1; +if(j<0)return-1; +return j; +} +var B=e(j); +var m; +if(B<22){ +if(B<2.77555756156289135105e-17){ +return j; +} +if(B>=1){ +var s=MathExpm1(2*B); +m=1-2/(s+2); +}else{ +var s=MathExpm1(-2*B); +m=-s/(s+2); +} +}else{ +m=1; +} +return(j>=0)?m:-m; +} +function MathLog10(j){ +j=j*1; +var o=%_DoubleHi(j); +var R=%_DoubleLo(j); +var C=0; +if(o<0x00100000){ +if(((o&0x7fffffff)|R)===0)return-(1/0); +if(o<0)return g; +C-=54; +j*=18014398509481984; +o=%_DoubleHi(j); +R=%_DoubleLo(j); +} +if(o>=0x7ff00000)return j; +C+=(o>>20)-1023; +var S=(C&0x80000000)>>>31; +o=(o&0x000fffff)|((0x3ff-S)<<20); +var k=C+S; +j=%_ConstructDouble(o,R); +var m=k*3.69423907715893078616e-13+4.34294481903251816668e-01*%_MathLogRT(j); +return m+k*3.01029995663611771306e-01; +} +function MathLog2(j){ +j=j*1; +var B=e(j); +var o=%_DoubleHi(j); +var R=%_DoubleLo(j); +var p=o&0x7fffffff; +if((p|R)==0)return-(1/0); +if(o<0)return g; +if(p>=0x7ff00000)return j; +var v=0; +if(p<0x00100000){ +B*=9007199254740992; +v-=53; +p=%_DoubleHi(B); +} +v+=(p>>20)-0x3ff; +var T=p&0x000fffff; +p=T|0x3ff00000; +var U=1; +var V=0; +var W=0; +if(T>0x3988e){ +if(T<0xbb67a){ +U=1.5; +V=5.84962487220764160156e-01; +W=1.35003920212974897128e-08; +}else{ +v+=1; +p-=0x00100000; +} +} +B=%_ConstructDouble(p,%_DoubleLo(B)); +var G=B-U; +var q=1/(B+U); +var X=G*q; +var Y=%_ConstructDouble(%_DoubleHi(X),0); +var Z=%_ConstructDouble(%_DoubleHi(B+U),0) +var aa=B-(Z-U); +var ab=q*((G-Y*Z)-Y*aa); +var ac=X*X; +var u=ac*ac*(5.99999999999994648725e-01+ac*(4.28571428578550184252e-01+ac*(3.33333329818377432918e-01+ac*( +2.72728123808534006489e-01+ac*(2.30660745775561754067e-01+ac*2.06975017800338417784e-01))))); +u+=ab*(Y+X); +ac=Y*Y; +Z=%_ConstructDouble(%_DoubleHi(3.0+ac+u),0); +aa=u-((Z-3.0)-ac); +G=Y*Z; +q=ab*Z+aa*X; +var ad=%_ConstructDouble(%_DoubleHi(G+q),0); +var ae=q-(ad-G); +var af=9.61796700954437255859e-01*ad; +var ag=-7.02846165095275826516e-09*ad+ae*9.61796693925975554329e-01+W; +var s=v; +var ah=%_ConstructDouble(%_DoubleHi(((af+ag)+V)+s),0); +var ai=ag-(((ah-s)-V)-af); +return ah+ai; +} +b.InstallFunctions(d,2,[ +"cos",MathCos, +"sin",MathSin, +"tan",MathTan, +"sinh",MathSinh, +"cosh",MathCosh, +"tanh",MathTanh, +"log10",MathLog10, +"log2",MathLog2, +"log1p",MathLog1p, +"expm1",MathExpm1 +]); +%SetForceInlineFlag(MathSin); +%SetForceInlineFlag(MathCos); +}) + +regexp +(function(a,b){ +%CheckIsBootstrapping(); +var c; +var d=a.Object; +var e=a.RegExp; +var f; +var g=b.InternalArray; +var h=b.InternalPackedArray; +var i; +var j=b.ImportNow("match_symbol"); +var k=b.ImportNow("search_symbol"); +var l=b.ImportNow("split_symbol"); +b.ImportFromExperimental(function(m){ +c=m.FLAG_harmony_tolength; +}); +b.Import(function(m){ +i=m.MakeTypeError; +}); +var n=new h( +2, +"", +(void 0), +0, +0 +); +function IsRegExp(o){ +if(!(%_IsJSReceiver(o)))return false; +var p=o[j]; +if(!(p===(void 0)))return(!!(p)); +return(%_IsRegExp(o)); +} +function RegExpInitialize(q,r,s){ +r=(r===(void 0))?'':(%_ToString(r)); +s=(s===(void 0))?'':(%_ToString(s)); +%RegExpInitializeAndCompile(q,r,s); +return q; +} +function PatternFlags(r){ +return((%_RegExpFlags(r)&1)?'g':'')+ +((%_RegExpFlags(r)&2)?'i':'')+ +((%_RegExpFlags(r)&4)?'m':'')+ +((%_RegExpFlags(r)&16)?'u':'')+ +((%_RegExpFlags(r)&8)?'y':''); +} +function RegExpConstructor(r,s){ +var t=new.target; +var u=IsRegExp(r); +if((t===(void 0))){ +t=e; +if(u&&(s===(void 0))&& +r.constructor===t){ +return r; +} +} +if((%_IsRegExp(r))){ +if((s===(void 0)))s=PatternFlags(r); +r=(%_RegExpSource(r)); +}else if(u){ +var v=r; +r=r.source; +if((s===(void 0)))s=v.flags; +} +var q=%NewObject(e,t); +return RegExpInitialize(q,r,s); +} +function RegExpCompileJS(r,s){ +if(!(%_IsRegExp(this))){ +throw i(42, +"RegExp.prototype.compile",this); +} +if((%_IsRegExp(r))){ +if(!(s===(void 0)))throw i(129); +s=PatternFlags(r); +r=(%_RegExpSource(r)); +} +RegExpInitialize(this,r,s); +} +function DoRegExpExec(w,x,y){ +return %_RegExpExec(w,x,y,n); +} +function RegExpExecNoTests(w,x,z){ +var A=%_RegExpExec(w,x,z,n); +if(A!==null){ +if((%_RegExpFlags(w)&8))w.lastIndex=A[4]; +var B=((A)[0])>>1; +var z=A[3]; +var C=A[4]; +var D=%_SubString(x,z,C); +var E=%_RegExpConstructResult(B,z,x); +E[0]=D; +if(B==1)return E; +var F=3+2; +for(var G=1;Gx.length){ +this.lastIndex=0; +return null; +} +}else{ +G=0; +} +var J=%_RegExpExec(this,x,G,n); +if((J===null)){ +this.lastIndex=0; +return null; +} +if(I){ +this.lastIndex=n[4]; +} +var B=((J)[0])>>1; +var z=J[3]; +var C=J[4]; +var D=%_SubString(x,z,C); +var E=%_RegExpConstructResult(B,z,x); +E[0]=D; +if(B==1)return E; +var F=3+2; +for(var G=1;Gx.length){ +this.lastIndex=0; +return false; +} +var J=%_RegExpExec(this,x,G,n); +if((J===null)){ +this.lastIndex=0; +return false; +} +this.lastIndex=n[4]; +return true; +}else{ +var w=this; +var M=(%_RegExpSource(w)); +if(w.length>=3&& +%_StringCharCodeAt(w,0)==46&& +%_StringCharCodeAt(w,1)==42&& +%_StringCharCodeAt(w,2)!=63){ +w=TrimRegExp(w); +} +var J=%_RegExpExec(w,x,0,n); +if((J===null)){ +this.lastIndex=0; +return false; +} +return true; +} +} +function TrimRegExp(w){ +if(!%_ObjectEquals(K,w)){ +K=w; +L= +new e( +%_SubString((%_RegExpSource(w)),2,(%_RegExpSource(w)).length), +((%_RegExpFlags(w)&2)?(%_RegExpFlags(w)&4)?"im":"i" +:(%_RegExpFlags(w)&4)?"m":"")); +} +return L; +} +function RegExpToString(){ +if(!(%_IsRegExp(this))){ +if(this===f){ +%IncrementUseCounter(12); +return'/(?:)/'; +} +throw i(42, +'RegExp.prototype.toString',this); +} +var E='/'+(%_RegExpSource(this))+'/'; +if((%_RegExpFlags(this)&1))E+='g'; +if((%_RegExpFlags(this)&2))E+='i'; +if((%_RegExpFlags(this)&4))E+='m'; +if((%_RegExpFlags(this)&16))E+='u'; +if((%_RegExpFlags(this)&8))E+='y'; +return E; +} +function RegExpSplit(x,N){ +if(!(%_IsRegExp(this))){ +throw i(42, +"RegExp.prototype.@@split",this); +} +var O=this; +var P=(%_ToString(x)); +N=((N===(void 0)))?4294967295:((N)>>>0); +var Q=P.length; +if(N===0)return[]; +if(Q===0){ +if(DoRegExpExec(O,P,0,0)!==null)return[]; +return[P]; +} +var R=0; +var S=0; +var T=0; +var E=new g(); +outer_loop: +while(true){ +if(S===Q){ +E[E.length]=%_SubString(P,R,Q); +break; +} +var A=DoRegExpExec(O,P,S); +if(A===null||Q===(T=A[3])){ +E[E.length]=%_SubString(P,R,Q); +break; +} +var U=A[4]; +if(S===U&&U===R){ +S++; +continue; +} +E[E.length]=%_SubString(P,R,T); +if(E.length===N)break; +var V=((A)[0])+3; +for(var G=3+2;G=((n)[0]))return''; +var ab=n[(3+(y))]; +var ac=n[(3+(y+1))]; +if(ab==-1||ac==-1)return''; +return %_SubString(((n)[1]),ab,ac); +}; +} +function RegExpGetGlobal(){ +if(!(%_IsRegExp(this))){ +if(this===f){ +return(void 0); +} +throw i(131,"RegExp.prototype.global"); +} +return!!(%_RegExpFlags(this)&1); +} +%FunctionSetName(RegExpGetGlobal,"RegExp.prototype.global"); +%SetNativeFlag(RegExpGetGlobal); +function RegExpGetIgnoreCase(){ +if(!(%_IsRegExp(this))){ +if(this===f){ +return(void 0); +} +throw i(131,"RegExp.prototype.ignoreCase"); +} +return!!(%_RegExpFlags(this)&2); +} +%FunctionSetName(RegExpGetIgnoreCase,"RegExp.prototype.ignoreCase"); +%SetNativeFlag(RegExpGetIgnoreCase); +function RegExpGetMultiline(){ +if(!(%_IsRegExp(this))){ +if(this===f){ +return(void 0); +} +throw i(131,"RegExp.prototype.multiline"); +} +return!!(%_RegExpFlags(this)&4); +} +%FunctionSetName(RegExpGetMultiline,"RegExp.prototype.multiline"); +%SetNativeFlag(RegExpGetMultiline); +function RegExpGetSource(){ +if(!(%_IsRegExp(this))){ +if(this===f){ +return(void 0); +} +throw i(131,"RegExp.prototype.source"); +} +return(%_RegExpSource(this)); +} +%FunctionSetName(RegExpGetSource,"RegExp.prototype.source"); +%SetNativeFlag(RegExpGetSource); +%FunctionSetInstanceClassName(e,'RegExp'); +f=new d(); +%FunctionSetPrototype(e,f); +%AddNamedProperty( +e.prototype,'constructor',e,2); +%SetCode(e,RegExpConstructor); +b.InstallFunctions(e.prototype,2,[ +"exec",RegExpExecJS, +"test",RegExpTest, +"toString",RegExpToString, +"compile",RegExpCompileJS, +j,RegExpMatch, +k,RegExpSearch, +l,RegExpSplit, +]); +b.InstallGetter(e.prototype,'global',RegExpGetGlobal); +b.InstallGetter(e.prototype,'ignoreCase',RegExpGetIgnoreCase); +b.InstallGetter(e.prototype,'multiline',RegExpGetMultiline); +b.InstallGetter(e.prototype,'source',RegExpGetSource); +%FunctionSetLength(e.prototype.compile,1); +var ad=function(){ +var ae=((n)[2]); +return(ae===(void 0))?"":ae; +}; +var af=function(x){ +((n)[2])=(%_ToString(x)); +}; +%OptimizeObjectForAddingMultipleProperties(e,22); +b.InstallGetterSetter(e,'input',ad,af, +4); +b.InstallGetterSetter(e,'$_',ad,af, +2|4); +var ag=function(ah){}; +b.InstallGetterSetter(e,'lastMatch',RegExpGetLastMatch, +ag,4); +b.InstallGetterSetter(e,'$&',RegExpGetLastMatch,ag, +2|4); +b.InstallGetterSetter(e,'lastParen',RegExpGetLastParen, +ag,4); +b.InstallGetterSetter(e,'$+',RegExpGetLastParen,ag, +2|4); +b.InstallGetterSetter(e,'leftContext',RegExpGetLeftContext, +ag,4); +b.InstallGetterSetter(e,'$`',RegExpGetLeftContext,ag, +2|4); +b.InstallGetterSetter(e,'rightContext',RegExpGetRightContext, +ag,4); +b.InstallGetterSetter(e,"$'",RegExpGetRightContext,ag, +2|4); +for(var G=1;G<10;++G){ +b.InstallGetterSetter(e,'$'+G,RegExpMakeCaptureGetter(G), +ag,4); +} +%ToFastProperties(e); +b.Export(function(ai){ +ai.RegExpExec=DoRegExpExec; +ai.RegExpExecNoTests=RegExpExecNoTests; +ai.RegExpLastMatchInfo=n; +ai.RegExpTest=RegExpTest; +}); +}) + +,arraybuffer +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.ArrayBuffer; +var d; +var e; +var f; +var g; +b.Import(function(h){ +d=h.MakeTypeError; +e=h.MaxSimple; +f=h.MinSimple; +g=h.SpeciesConstructor; +}); +function ArrayBufferGetByteLen(){ +if(!(%_ClassOf(this)==='ArrayBuffer')){ +throw d(42, +'ArrayBuffer.prototype.byteLength',this); +} +return %_ArrayBufferGetByteLength(this); +} +function ArrayBufferSlice(i,j){ +if(!(%_ClassOf(this)==='ArrayBuffer')){ +throw d(42, +'ArrayBuffer.prototype.slice',this); +} +var k=(%_ToInteger(i)); +if(!(j===(void 0))){ +j=(%_ToInteger(j)); +} +var l; +var m=%_ArrayBufferGetByteLength(this); +if(k<0){ +l=e(m+k,0); +}else{ +l=f(k,m); +} +var n=(j===(void 0))?m:j; +var o; +if(n<0){ +o=e(m+n,0); +}else{ +o=f(n,m); +} +if(oah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 1!==0){ +throw B(179, +"byte length","Uint8Array",1); +} +aj=ah-ai; +ak=aj/1; +}else{ +var ak=ag; +aj=ak*1; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,1,ae,ai,aj,true); +} +function Uint8ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*1; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,1,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,1,null,0,am,true); +} +} +function Uint8ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*1; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,1,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,1,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 1!==0){ +throw B(179, +"byte length","Int8Array",1); +} +aj=ah-ai; +ak=aj/1; +}else{ +var ak=ag; +aj=ak*1; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,2,ae,ai,aj,true); +} +function Int8ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*1; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,2,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,2,null,0,am,true); +} +} +function Int8ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*1; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,2,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,2,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 2!==0){ +throw B(179, +"byte length","Uint16Array",2); +} +aj=ah-ai; +ak=aj/2; +}else{ +var ak=ag; +aj=ak*2; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,3,ae,ai,aj,true); +} +function Uint16ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*2; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,3,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,3,null,0,am,true); +} +} +function Uint16ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*2; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,3,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,3,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 2!==0){ +throw B(179, +"byte length","Int16Array",2); +} +aj=ah-ai; +ak=aj/2; +}else{ +var ak=ag; +aj=ak*2; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,4,ae,ai,aj,true); +} +function Int16ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*2; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,4,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,4,null,0,am,true); +} +} +function Int16ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*2; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,4,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,4,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 4!==0){ +throw B(179, +"byte length","Uint32Array",4); +} +aj=ah-ai; +ak=aj/4; +}else{ +var ak=ag; +aj=ak*4; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,5,ae,ai,aj,true); +} +function Uint32ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*4; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,5,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,5,null,0,am,true); +} +} +function Uint32ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*4; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,5,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,5,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 4!==0){ +throw B(179, +"byte length","Int32Array",4); +} +aj=ah-ai; +ak=aj/4; +}else{ +var ak=ag; +aj=ak*4; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,6,ae,ai,aj,true); +} +function Int32ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*4; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,6,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,6,null,0,am,true); +} +} +function Int32ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*4; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,6,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,6,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 4!==0){ +throw B(179, +"byte length","Float32Array",4); +} +aj=ah-ai; +ak=aj/4; +}else{ +var ak=ag; +aj=ak*4; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,7,ae,ai,aj,true); +} +function Float32ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*4; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,7,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,7,null,0,am,true); +} +} +function Float32ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*4; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,7,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,7,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 8!==0){ +throw B(179, +"byte length","Float64Array",8); +} +aj=ah-ai; +ak=aj/8; +}else{ +var ak=ag; +aj=ak*8; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,8,ae,ai,aj,true); +} +function Float64ArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*8; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,8,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,8,null,0,am,true); +} +} +function Float64ArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*8; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,8,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,8,an,al); +} +if(!ao){ +for(var ap=0;apah){ +throw B(181); +} +} +var aj; +var ak; +if((ag===(void 0))){ +if(ah % 1!==0){ +throw B(179, +"byte length","Uint8ClampedArray",1); +} +aj=ah-ai; +ak=aj/1; +}else{ +var ak=ag; +aj=ak*1; +} +if((ai+aj>ah) +||(ak>%_MaxSmi())){ +throw B(180); +} +%_TypedArrayInitialize(ad,9,ae,ai,aj,true); +} +function Uint8ClampedArrayConstructByLength(ad,ag){ +var al=(ag===(void 0))? +0:H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var am=al*1; +if(am>%_TypedArrayMaxSizeInHeap()){ +var ae=new g(am); +%_TypedArrayInitialize(ad,9,ae,0,am,true); +}else{ +%_TypedArrayInitialize(ad,9,null,0,am,true); +} +} +function Uint8ClampedArrayConstructByArrayLike(ad,an){ +var ag=an.length; +var al=H(ag,180); +if(al>%_MaxSmi()){ +throw B(180); +} +var ao=false; +var am=al*1; +if(am<=%_TypedArrayMaxSizeInHeap()){ +%_TypedArrayInitialize(ad,9,null,0,am,false); +}else{ +ao= +%TypedArrayInitializeFromArrayLike(ad,9,an,al); +} +if(!ao){ +for(var ap=0;ap0){ +for(var ap=0;ap=aK&&aI>=aJ; +aL--){ +aD[ai+aL]=aE[aL]; +aI-=aH; +aJ-=aG; +} +return aL; +} +var aL=CopyRightPart(); +var aM=new f(aL+1-aK); +for(var ap=aK;ap<=aL;ap++){ +aM[ap-aK]=aE[ap]; +} +for(ap=aK;ap<=aL;ap++){ +aD[ai+ap]=aM[ap-aK]; +} +} +function TypedArraySet(ad,ai){ +var aN=(ai===(void 0))?0:(%_ToInteger(ai)); +if(aN<0)throw C(190); +if(aN>%_MaxSmi()){ +throw B(191); +} +switch(%TypedArraySetFastCases(this,ad,aN)){ +case 0: +return; +case 1: +TypedArraySetFromOverlappingTypedArray(this,ad,aN); +return; +case 2: +TypedArraySetFromArrayLike(this,ad,ad.length,aN); +return; +case 3: +var al=ad.length; +if((al===(void 0))){ +if((typeof(ad)==='number')){ +throw C(45); +} +return; +} +al=(%_ToLength(al)); +if(aN+al>this.length){ +throw B(191); +} +TypedArraySetFromArrayLike(this,ad,al,aN); +return; +} +} +function TypedArrayGetToStringTag(){ +if(!%_IsTypedArray(this))return; +var aO=%_ClassOf(this); +if((aO===(void 0)))return; +return aO; +} +function TypedArrayCopyWithin(aD,aP,ay){ +if(!%_IsTypedArray(this))throw C(68); +var ag=%_TypedArrayGetLength(this); +return k(aD,aP,ay,this,ag); +} +%FunctionSetLength(TypedArrayCopyWithin,2); +function TypedArrayEvery(aQ,aR){ +if(!%_IsTypedArray(this))throw C(68); +var ag=%_TypedArrayGetLength(this); +return l(aQ,aR,this,ag); +} +%FunctionSetLength(TypedArrayEvery,1); +function TypedArrayForEach(aQ,aR){ +if(!%_IsTypedArray(this))throw C(68); +var ag=%_TypedArrayGetLength(this); +q(aQ,aR,this,ag); +} +%FunctionSetLength(TypedArrayForEach,1); +function TypedArrayFill(av,aP,ay){ +if(!%_IsTypedArray(this))throw C(68); +var ag=%_TypedArrayGetLength(this); +return m(av,aP,ay,this,ag); +} +%FunctionSetLength(TypedArrayFill,1); +function TypedArrayFilter(aQ,aS){ +if(!%_IsTypedArray(this))throw C(68); +var ag=%_TypedArrayGetLength(this); +if(!(typeof(aQ)==='function'))throw C(15,aQ); +var aT=new j(); +n(aQ,aS,this,ag,aT); +var aU=aT.length; +var aV=TypedArraySpeciesCreate(this,aU); +for(var ap=0;apah)throw B(172); +var ag=(am===(void 0)) +?ah-ai +:am; +if(ag<0||ai+ag>ah){ +throw new B(171); +} +var aT=%NewObject(h,new.target); +%_DataViewInitialize(aT,ae,ai,ag); +return aT; +} +function DataViewGetBufferJS(){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42,'DataView.buffer',this); +} +return %DataViewGetBuffer(this); +} +function DataViewGetByteOffset(){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.byteOffset',this); +} +return %_ArrayBufferViewGetByteOffset(this); +} +function DataViewGetByteLength(){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.byteLength',this); +} +return %_ArrayBufferViewGetByteLength(this); +} +function DataViewGetInt8JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getInt8',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetInt8(this,ai,!!br); +} +function DataViewSetInt8JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setInt8',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetInt8(this,ai,(%_ToNumber(av)),!!br); +} + +function DataViewGetUint8JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getUint8',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetUint8(this,ai,!!br); +} +function DataViewSetUint8JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setUint8',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetUint8(this,ai,(%_ToNumber(av)),!!br); +} + +function DataViewGetInt16JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getInt16',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetInt16(this,ai,!!br); +} +function DataViewSetInt16JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setInt16',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetInt16(this,ai,(%_ToNumber(av)),!!br); +} + +function DataViewGetUint16JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getUint16',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetUint16(this,ai,!!br); +} +function DataViewSetUint16JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setUint16',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetUint16(this,ai,(%_ToNumber(av)),!!br); +} + +function DataViewGetInt32JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getInt32',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetInt32(this,ai,!!br); +} +function DataViewSetInt32JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setInt32',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetInt32(this,ai,(%_ToNumber(av)),!!br); +} + +function DataViewGetUint32JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getUint32',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetUint32(this,ai,!!br); +} +function DataViewSetUint32JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setUint32',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetUint32(this,ai,(%_ToNumber(av)),!!br); +} + +function DataViewGetFloat32JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getFloat32',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetFloat32(this,ai,!!br); +} +function DataViewSetFloat32JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setFloat32',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetFloat32(this,ai,(%_ToNumber(av)),!!br); +} + +function DataViewGetFloat64JS(ai,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.getFloat64',this); +} +if(%_ArgumentsLength()<1)throw C(45); +ai=H(ai,170); +return %DataViewGetFloat64(this,ai,!!br); +} +function DataViewSetFloat64JS(ai,av,br){ +if(!(%_ClassOf(this)==='DataView')){ +throw C(42, +'DataView.setFloat64',this); +} +if(%_ArgumentsLength()<2)throw C(45); +ai=H(ai,170); +%DataViewSetFloat64(this,ai,(%_ToNumber(av)),!!br); +} + + +%SetCode(h,DataViewConstructor); +%FunctionSetPrototype(h,new i); +%AddNamedProperty(h.prototype,"constructor",h, +2); +%AddNamedProperty(h.prototype,J,"DataView", +1|2); +b.InstallGetter(h.prototype,"buffer",DataViewGetBufferJS); +b.InstallGetter(h.prototype,"byteOffset", +DataViewGetByteOffset); +b.InstallGetter(h.prototype,"byteLength", +DataViewGetByteLength); +b.InstallFunctions(h.prototype,2,[ +"getInt8",DataViewGetInt8JS, +"setInt8",DataViewSetInt8JS, +"getUint8",DataViewGetUint8JS, +"setUint8",DataViewSetUint8JS, +"getInt16",DataViewGetInt16JS, +"setInt16",DataViewSetInt16JS, +"getUint16",DataViewGetUint16JS, +"setUint16",DataViewSetUint16JS, +"getInt32",DataViewGetInt32JS, +"setInt32",DataViewSetInt32JS, +"getUint32",DataViewGetUint32JS, +"setUint32",DataViewSetUint32JS, +"getFloat32",DataViewGetFloat32JS, +"setFloat32",DataViewSetFloat32JS, +"getFloat64",DataViewGetFloat64JS, +"setFloat64",DataViewSetFloat64JS +]); +}) + +Hiterator-prototype +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Object; +var d=b.ImportNow("IteratorPrototype"); +var e=b.ImportNow("iterator_symbol"); +function IteratorPrototypeIterator(){ +return this; +} +b.SetFunctionName(IteratorPrototypeIterator,e); +%AddNamedProperty(d,e, +IteratorPrototypeIterator,2); +}) + +$generator +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=b.ImportNow("GeneratorFunctionPrototype"); +var d=b.ImportNow("GeneratorFunction"); +var e=a.Function; +var f; +var g=b.ImportNow("to_string_tag_symbol"); +b.Import(function(h){ +f=h.MakeTypeError; +}); +function GeneratorObjectNext(i){ +if(!(%_ClassOf(this)==='Generator')){ +throw f(42, +'[Generator].prototype.next',this); +} +var j=%GeneratorGetContinuation(this); +if(j>0){ +if(%_DebugIsActive()!=0)%DebugPrepareStepInIfStepping(this); +try{ +return %_GeneratorNext(this,i); +}catch(e){ +%GeneratorClose(this); +throw e; +} +}else if(j==0){ +return{value:void 0,done:true}; +}else{ +throw f(40); +} +} +function GeneratorObjectThrow(k){ +if(!(%_ClassOf(this)==='Generator')){ +throw f(42, +'[Generator].prototype.throw',this); +} +var j=%GeneratorGetContinuation(this); +if(j>0){ +try{ +return %_GeneratorThrow(this,k); +}catch(e){ +%GeneratorClose(this); +throw e; +} +}else if(j==0){ +throw k; +}else{ +throw f(40); +} +} +%NeverOptimizeFunction(GeneratorObjectNext); +%NeverOptimizeFunction(GeneratorObjectThrow); +var l=c.prototype; +b.InstallFunctions(l, +2, +["next",GeneratorObjectNext, +"throw",GeneratorObjectThrow]); +%AddNamedProperty(l,"constructor", +c,2|1); +%AddNamedProperty(l, +g,"Generator",2|1); +%InternalSetPrototype(c,e.prototype); +%AddNamedProperty(c, +g,"GeneratorFunction",2|1); +%AddNamedProperty(c,"constructor", +d,2|1); +%InternalSetPrototype(d,e); +}) + +8object-observeѭ +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c; +var d=a.Array; +var e=a.Object; +var f=b.InternalArray; +var g; +b.Import(function(h){ +c=h.GetHash; +g=h.MakeTypeError; +}); +var i; +var j={}; +function GetObservationStateJS(){ +if((i===(void 0))){ +i=%GetObservationState(); +} +if((i.callbackInfoMap===(void 0))){ +i.callbackInfoMap=%ObservationWeakMapCreate(); +i.objectInfoMap=%ObservationWeakMapCreate(); +i.notifierObjectInfoMap=%ObservationWeakMapCreate(); +i.pendingObservers=null; +i.nextCallbackPriority=0; +i.lastMicrotaskId=0; +} +return i; +} +function GetPendingObservers(){ +return GetObservationStateJS().pendingObservers; +} +function SetPendingObservers(k){ +GetObservationStateJS().pendingObservers=k; +} +function GetNextCallbackPriority(){ +return GetObservationStateJS().nextCallbackPriority++; +} +function nullProtoObject(){ +return{__proto__:null}; +} +function TypeMapCreate(){ +return nullProtoObject(); +} +function TypeMapAddType(l,m,n){ +l[m]=n?1:(l[m]||0)+1; +} +function TypeMapRemoveType(l,m){ +l[m]--; +} +function TypeMapCreateFromList(o,p){ +var l=TypeMapCreate(); +for(var q=0;q0?y.performing:null; +} +function ConvertAcceptListToTypeMap(E){ +if((E===(void 0))) +return E; +if(!(%_IsJSReceiver(E)))throw g(80); +var F=(%_ToInteger(E.length)); +if(F<0)F=0; +return TypeMapCreateFromList(E,F); +} +function CallbackInfoGet(v){ +return %WeakCollectionGet(GetObservationStateJS().callbackInfoMap,v, +c(v)); +} +function CallbackInfoSet(v,C){ +%WeakCollectionSet(GetObservationStateJS().callbackInfoMap, +v,C,c(v)); +} +function CallbackInfoGetOrCreate(v){ +var C=CallbackInfoGet(v); +if(!(C===(void 0))) +return C; +var D=GetNextCallbackPriority(); +CallbackInfoSet(v,D); +return D; +} +function CallbackInfoGetPriority(C){ +if((typeof(C)==='number')) +return C; +else +return C.priority; +} +function CallbackInfoNormalize(v){ +var C=CallbackInfoGet(v); +if((typeof(C)==='number')){ +var D=C; +C=new f; +C.priority=D; +CallbackInfoSet(v,C); +} +return C; +} +function ObjectObserve(z,v,w){ +if(!(%_IsJSReceiver(z))) +throw g(82,"observe","observe"); +if(%IsJSGlobalProxy(z)) +throw g(78,"observe"); +if(%IsAccessCheckNeeded(z)) +throw g(79,"observe"); +if(!(typeof(v)==='function')) +throw g(81,"observe"); +if(%object_is_frozen(v)) +throw g(77); +var G=%GetObjectContextObjectObserve(z); +return G(z,v,w); +} +function NativeObjectObserve(z,v,w){ +var y=ObjectInfoGetOrCreate(z); +var o=ConvertAcceptListToTypeMap(w); +ObjectInfoAddObserver(y,v,o); +return z; +} +function ObjectUnobserve(z,v){ +if(!(%_IsJSReceiver(z))) +throw g(82,"unobserve","unobserve"); +if(%IsJSGlobalProxy(z)) +throw g(78,"unobserve"); +if(!(typeof(v)==='function')) +throw g(81,"unobserve"); +var y=ObjectInfoGet(z); +if((y===(void 0))) +return z; +ObjectInfoRemoveObserver(y,v); +return z; +} +function ArrayObserve(z,v){ +return ObjectObserve(z,v,['add', +'update', +'delete', +'splice']); +} +function ArrayUnobserve(z,v){ +return ObjectUnobserve(z,v); +} +function ObserverEnqueueIfActive(x,y,H){ +if(!ObserverIsActive(x,y)|| +!TypeMapHasType(ObserverGetAcceptTypes(x),H.type)){ +return; +} +var v=ObserverGetCallback(x); +if(!%ObserverObjectAndRecordHaveSameOrigin(v,H.object, +H)){ +return; +} +var C=CallbackInfoNormalize(v); +if((GetPendingObservers()===null)){ +SetPendingObservers(nullProtoObject()); +if((%_DebugIsActive()!=0)){ +var I=++GetObservationStateJS().lastMicrotaskId; +var J="Object.observe"; +%EnqueueMicrotask(function(){ +%DebugAsyncTaskEvent({type:"willHandle",id:I,name:J}); +ObserveMicrotaskRunner(); +%DebugAsyncTaskEvent({type:"didHandle",id:I,name:J}); +}); +%DebugAsyncTaskEvent({type:"enqueue",id:I,name:J}); +}else{ +%EnqueueMicrotask(ObserveMicrotaskRunner); +} +} +GetPendingObservers()[C.priority]=v; +C.push(H); +} +function ObjectInfoEnqueueExternalChangeRecord(y,H,m){ +if(!ObjectInfoHasActiveObservers(y)) +return; +var K=!(m===(void 0)); +var L=K? +{object:y.object,type:m}: +{object:y.object}; +for(var M in H){ +if(M==='object'||(K&&M==='type'))continue; +%DefineDataPropertyUnchecked( +L,M,H[M],1+4); +} +%object_freeze(L); +ObjectInfoEnqueueInternalChangeRecord(y,L); +} +function ObjectInfoEnqueueInternalChangeRecord(y,H){ +if((typeof(H.name)==='symbol'))return; +if(ChangeObserversIsOptimized(y.changeObservers)){ +var x=y.changeObservers; +ObserverEnqueueIfActive(x,y,H); +return; +} +for(var D in y.changeObservers){ +var x=y.changeObservers[D]; +if((x===null)) +continue; +ObserverEnqueueIfActive(x,y,H); +} +} +function BeginPerformSplice(N){ +var y=ObjectInfoGet(N); +if(!(y===(void 0))) +ObjectInfoAddPerformingType(y,'splice'); +} +function EndPerformSplice(N){ +var y=ObjectInfoGet(N); +if(!(y===(void 0))) +ObjectInfoRemovePerformingType(y,'splice'); +} +function EnqueueSpliceRecord(N,O,P,Q){ +var y=ObjectInfoGet(N); +if(!ObjectInfoHasActiveObservers(y)) +return; +var H={ +type:'splice', +object:N, +index:O, +removed:P, +addedCount:Q +}; +%object_freeze(H); +%object_freeze(H.removed); +ObjectInfoEnqueueInternalChangeRecord(y,H); +} +function NotifyChange(m,z,J,R){ +var y=ObjectInfoGet(z); +if(!ObjectInfoHasActiveObservers(y)) +return; +var H; +if(arguments.length==2){ +H={type:m,object:z}; +}else if(arguments.length==3){ +H={type:m,object:z,name:J}; +}else{ +H={ +type:m, +object:z, +name:J, +oldValue:R +}; +} +%object_freeze(H); +ObjectInfoEnqueueInternalChangeRecord(y,H); +} +function ObjectNotifierNotify(H){ +if(!(%_IsJSReceiver(this))) +throw g(16,"notify"); +var y=ObjectInfoGetFromNotifier(this); +if((y===(void 0))) +throw g(83); +if(!(typeof(H.type)==='string')) +throw g(86); +ObjectInfoEnqueueExternalChangeRecord(y,H); +} +function ObjectNotifierPerformChange(S,T){ +if(!(%_IsJSReceiver(this))) +throw g(16,"performChange"); +var y=ObjectInfoGetFromNotifier(this); +if((y===(void 0))) +throw g(83); +if(!(typeof(S)==='string')) +throw g(85); +if(!(typeof(T)==='function')) +throw g(84); +var U=%GetObjectContextNotifierPerformChange(y); +U(y,S,T); +} +function NativeObjectNotifierPerformChange(y,S,T){ +ObjectInfoAddPerformingType(y,S); +var H; +try{ +H=T(); +}finally{ +ObjectInfoRemovePerformingType(y,S); +} +if((%_IsJSReceiver(H))) +ObjectInfoEnqueueExternalChangeRecord(y,H,S); +} +function ObjectGetNotifier(z){ +if(!(%_IsJSReceiver(z))) +throw g(82,"getNotifier","getNotifier"); +if(%IsJSGlobalProxy(z)) +throw g(78,"getNotifier"); +if(%IsAccessCheckNeeded(z)) +throw g(79,"getNotifier"); +if(%object_is_frozen(z))return null; +if(!%ObjectWasCreatedInCurrentOrigin(z))return null; +var V=%GetObjectContextObjectGetNotifier(z); +return V(z); +} +function NativeObjectGetNotifier(z){ +var y=ObjectInfoGetOrCreate(z); +return ObjectInfoGetNotifier(y); +} +function CallbackDeliverPending(v){ +var C=CallbackInfoGet(v); +if((C===(void 0))||(typeof(C)==='number')) +return false; +var D=C.priority; +CallbackInfoSet(v,D); +var k=GetPendingObservers(); +if(!(k===null)) +delete k[D]; +var W=[]; +%MoveArrayContents(C,W); +%DeliverObservationChangeRecords(v,W); +return true; +} +function ObjectDeliverChangeRecords(v){ +if(!(typeof(v)==='function')) +throw g(81,"deliverChangeRecords"); +while(CallbackDeliverPending(v)){} +} +function ObserveMicrotaskRunner(){ +var k=GetPendingObservers(); +if(!(k===null)){ +SetPendingObservers(null); +for(var q in k){ +CallbackDeliverPending(k[q]); +} +} +} +b.InstallFunctions(j,2,[ +"notify",ObjectNotifierNotify, +"performChange",ObjectNotifierPerformChange +]); +var X=[ +"deliverChangeRecords",ObjectDeliverChangeRecords, +"getNotifier",ObjectGetNotifier, +"observe",ObjectObserve, +"unobserve",ObjectUnobserve +]; +var Y=[ +"observe",ArrayObserve, +"unobserve",ArrayUnobserve +]; +var Z=function(aa,q){ +if(q % 2===1)%FunctionRemovePrototype(aa); +}; +X.forEach(Z); +Y.forEach(Z); +%InstallToContext([ +"native_object_get_notifier",NativeObjectGetNotifier, +"native_object_notifier_perform_change",NativeObjectNotifierPerformChange, +"native_object_observe",NativeObjectObserve, +"observers_begin_perform_splice",BeginPerformSplice, +"observers_end_perform_splice",EndPerformSplice, +"observers_enqueue_splice",EnqueueSpliceRecord, +"observers_notify_change",NotifyChange, +]); +b.Export(function(ab){ +ab.ObserveArrayMethods=Y; +ab.ObserveBeginPerformSplice=BeginPerformSplice; +ab.ObserveEndPerformSplice=EndPerformSplice; +ab.ObserveEnqueueSpliceRecord=EnqueueSpliceRecord; +ab.ObserveObjectMethods=X; +}); +}) + +(collectionE} +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Map; +var d=a.Object; +var e=a.Set; +var f=b.ImportNow("hash_code_symbol"); +var g; +var h; +var i; +var j; +var k; +var l=b.ImportNow("to_string_tag_symbol"); +b.Import(function(m){ +g=m.IntRandom; +h=m.MakeTypeError; +i=m.MapIterator; +j=m.NumberIsNaN; +k=m.SetIterator; +}); +function HashToEntry(n,o,p){ +var q=(o&((p)-1)); +return((%_FixedArrayGet(n,(3+(q))|0))); +} +%SetForceInlineFlag(HashToEntry); +function SetFindEntry(n,p,r,o){ +var s=HashToEntry(n,o,p); +if(s===-1)return s; +var t=((%_FixedArrayGet(n,((3+(p)+((s)<<1)))|0))); +if(r===t)return s; +var u=j(r); +while(true){ +if(u&&j(t)){ +return s; +} +s=((%_FixedArrayGet(n,((3+(p)+((s)<<1))+1)|0))); +if(s===-1)return s; +t=((%_FixedArrayGet(n,((3+(p)+((s)<<1)))|0))); +if(r===t)return s; +} +return-1; +} +%SetForceInlineFlag(SetFindEntry); +function MapFindEntry(n,p,r,o){ +var s=HashToEntry(n,o,p); +if(s===-1)return s; +var t=((%_FixedArrayGet(n,((3+(p)+((s)*3)))|0))); +if(r===t)return s; +var u=j(r); +while(true){ +if(u&&j(t)){ +return s; +} +s=((%_FixedArrayGet(n,((3+(p)+((s)*3))+2)|0))); +if(s===-1)return s; +t=((%_FixedArrayGet(n,((3+(p)+((s)*3)))|0))); +if(r===t)return s; +} +return-1; +} +%SetForceInlineFlag(MapFindEntry); +function ComputeIntegerHash(r,v){ +var o=r; +o=o^v; +o=~o+(o<<15); +o=o^(o>>>12); +o=o+(o<<2); +o=o^(o>>>4); +o=(o*2057)|0; +o=o^(o>>>16); +return o&0x3fffffff; +} +%SetForceInlineFlag(ComputeIntegerHash); +function GetExistingHash(r){ +if(%_IsSmi(r)){ +return ComputeIntegerHash(r,0); +} +if((typeof(r)==='string')){ +var w=%_StringGetRawHashField(r); +if((w&1)===0){ +return w>>>2; +} +}else if((%_IsJSReceiver(r))&&!(%_IsJSProxy(r))&&!(%_ClassOf(r)==='global')){ +var o=(r[f]); +return o; +} +return %GenericHash(r); +} +%SetForceInlineFlag(GetExistingHash); +function GetHash(r){ +var o=GetExistingHash(r); +if((o===(void 0))){ +o=g()|0; +if(o===0)o=1; +(r[f]=o); +} +return o; +} +%SetForceInlineFlag(GetHash); +function SetConstructor(x){ +if((new.target===(void 0))){ +throw h(26,"Set"); +} +%_SetInitialize(this); +if(!(x==null)){ +var y=this.add; +if(!(typeof(y)==='function')){ +throw h(91,y,'add',this); +} +for(var z of x){ +%_Call(y,this,z); +} +} +} +function SetAdd(r){ +if(!(%_ClassOf(this)==='Set')){ +throw h(42,'Set.prototype.add',this); +} +if(r===0){ +r=0; +} +var n=%_JSCollectionGetTable(this); +var p=((%_FixedArrayGet(n,(0)|0))); +var o=GetHash(r); +if(SetFindEntry(n,p,r,o)!==-1)return this; +var A=((%_FixedArrayGet(n,(1)|0))); +var B=((%_FixedArrayGet(n,(2)|0))); +var C=p<<1; +if((A+B)>=C){ +%SetGrow(this); +n=%_JSCollectionGetTable(this); +p=((%_FixedArrayGet(n,(0)|0))); +A=((%_FixedArrayGet(n,(1)|0))); +B=((%_FixedArrayGet(n,(2)|0))); +} +var s=A+B; +var D=(3+(p)+((s)<<1)); +var q=(o&((p)-1)); +var E=((%_FixedArrayGet(n,(3+(q))|0))); +((%_FixedArraySet(n,(3+(q))|0,s))); +(((%_FixedArraySet(n,(1)|0,(A+1)|0)))); +(%_FixedArraySet(n,(D)|0,r)); +((%_FixedArraySet(n,(D+1)|0,(E)|0))); +return this; +} +function SetHas(r){ +if(!(%_ClassOf(this)==='Set')){ +throw h(42,'Set.prototype.has',this); +} +var n=%_JSCollectionGetTable(this); +var p=((%_FixedArrayGet(n,(0)|0))); +var o=GetExistingHash(r); +if((o===(void 0)))return false; +return SetFindEntry(n,p,r,o)!==-1; +} +function SetDelete(r){ +if(!(%_ClassOf(this)==='Set')){ +throw h(42, +'Set.prototype.delete',this); +} +var n=%_JSCollectionGetTable(this); +var p=((%_FixedArrayGet(n,(0)|0))); +var o=GetExistingHash(r); +if((o===(void 0)))return false; +var s=SetFindEntry(n,p,r,o); +if(s===-1)return false; +var A=((%_FixedArrayGet(n,(1)|0)))-1; +var B=((%_FixedArrayGet(n,(2)|0)))+1; +var D=(3+(p)+((s)<<1)); +(%_FixedArraySet(n,(D)|0,%_TheHole())); +(((%_FixedArraySet(n,(1)|0,(A)|0)))); +(((%_FixedArraySet(n,(2)|0,(B)|0)))); +if(A<(p>>>1))%SetShrink(this); +return true; +} +function SetGetSize(){ +if(!(%_ClassOf(this)==='Set')){ +throw h(42, +'Set.prototype.size',this); +} +var n=%_JSCollectionGetTable(this); +return((%_FixedArrayGet(n,(1)|0))); +} +function SetClearJS(){ +if(!(%_ClassOf(this)==='Set')){ +throw h(42, +'Set.prototype.clear',this); +} +%_SetClear(this); +} +function SetForEach(F,G){ +if(!(%_ClassOf(this)==='Set')){ +throw h(42, +'Set.prototype.forEach',this); +} +if(!(typeof(F)==='function'))throw h(15,F); +var H=new k(this,2); +var r; +var I=[(void 0)]; +while(%SetIteratorNext(H,I)){ +r=I[0]; +%_Call(F,G,r,r,this); +} +} +%SetCode(e,SetConstructor); +%FunctionSetLength(e,0); +%FunctionSetPrototype(e,new d()); +%AddNamedProperty(e.prototype,"constructor",e,2); +%AddNamedProperty(e.prototype,l,"Set", +2|1); +%FunctionSetLength(SetForEach,1); +b.InstallGetter(e.prototype,"size",SetGetSize); +b.InstallFunctions(e.prototype,2,[ +"add",SetAdd, +"has",SetHas, +"delete",SetDelete, +"clear",SetClearJS, +"forEach",SetForEach +]); +function MapConstructor(x){ +if((new.target===(void 0))){ +throw h(26,"Map"); +} +%_MapInitialize(this); +if(!(x==null)){ +var y=this.set; +if(!(typeof(y)==='function')){ +throw h(91,y,'set',this); +} +for(var J of x){ +if(!(%_IsJSReceiver(J))){ +throw h(49,J); +} +%_Call(y,this,J[0],J[1]); +} +} +} +function MapGet(r){ +if(!(%_ClassOf(this)==='Map')){ +throw h(42, +'Map.prototype.get',this); +} +var n=%_JSCollectionGetTable(this); +var p=((%_FixedArrayGet(n,(0)|0))); +var o=GetExistingHash(r); +if((o===(void 0)))return(void 0); +var s=MapFindEntry(n,p,r,o); +if(s===-1)return(void 0); +return((%_FixedArrayGet(n,((3+(p)+((s)*3))+1)|0))); +} +function MapSet(r,z){ +if(!(%_ClassOf(this)==='Map')){ +throw h(42, +'Map.prototype.set',this); +} +if(r===0){ +r=0; +} +var n=%_JSCollectionGetTable(this); +var p=((%_FixedArrayGet(n,(0)|0))); +var o=GetHash(r); +var s=MapFindEntry(n,p,r,o); +if(s!==-1){ +var K=(3+(p)+((s)*3)); +(%_FixedArraySet(n,(K+1)|0,z)); +return this; +} +var A=((%_FixedArrayGet(n,(1)|0))); +var B=((%_FixedArrayGet(n,(2)|0))); +var C=p<<1; +if((A+B)>=C){ +%MapGrow(this); +n=%_JSCollectionGetTable(this); +p=((%_FixedArrayGet(n,(0)|0))); +A=((%_FixedArrayGet(n,(1)|0))); +B=((%_FixedArrayGet(n,(2)|0))); +} +s=A+B; +var D=(3+(p)+((s)*3)); +var q=(o&((p)-1)); +var E=((%_FixedArrayGet(n,(3+(q))|0))); +((%_FixedArraySet(n,(3+(q))|0,s))); +(((%_FixedArraySet(n,(1)|0,(A+1)|0)))); +(%_FixedArraySet(n,(D)|0,r)); +(%_FixedArraySet(n,(D+1)|0,z)); +(%_FixedArraySet(n,(D+2)|0,E)); +return this; +} +function MapHas(r){ +if(!(%_ClassOf(this)==='Map')){ +throw h(42, +'Map.prototype.has',this); +} +var n=%_JSCollectionGetTable(this); +var p=((%_FixedArrayGet(n,(0)|0))); +var o=GetHash(r); +return MapFindEntry(n,p,r,o)!==-1; +} +function MapDelete(r){ +if(!(%_ClassOf(this)==='Map')){ +throw h(42, +'Map.prototype.delete',this); +} +var n=%_JSCollectionGetTable(this); +var p=((%_FixedArrayGet(n,(0)|0))); +var o=GetHash(r); +var s=MapFindEntry(n,p,r,o); +if(s===-1)return false; +var A=((%_FixedArrayGet(n,(1)|0)))-1; +var B=((%_FixedArrayGet(n,(2)|0)))+1; +var D=(3+(p)+((s)*3)); +(%_FixedArraySet(n,(D)|0,%_TheHole())); +(%_FixedArraySet(n,(D+1)|0,%_TheHole())); +(((%_FixedArraySet(n,(1)|0,(A)|0)))); +(((%_FixedArraySet(n,(2)|0,(B)|0)))); +if(A<(p>>>1))%MapShrink(this); +return true; +} +function MapGetSize(){ +if(!(%_ClassOf(this)==='Map')){ +throw h(42, +'Map.prototype.size',this); +} +var n=%_JSCollectionGetTable(this); +return((%_FixedArrayGet(n,(1)|0))); +} +function MapClearJS(){ +if(!(%_ClassOf(this)==='Map')){ +throw h(42, +'Map.prototype.clear',this); +} +%_MapClear(this); +} +function MapForEach(F,G){ +if(!(%_ClassOf(this)==='Map')){ +throw h(42, +'Map.prototype.forEach',this); +} +if(!(typeof(F)==='function'))throw h(15,F); +var H=new i(this,3); +var I=[(void 0),(void 0)]; +while(%MapIteratorNext(H,I)){ +%_Call(F,G,I[1],I[0],this); +} +} +%SetCode(c,MapConstructor); +%FunctionSetLength(c,0); +%FunctionSetPrototype(c,new d()); +%AddNamedProperty(c.prototype,"constructor",c,2); +%AddNamedProperty( +c.prototype,l,"Map",2|1); +%FunctionSetLength(MapForEach,1); +b.InstallGetter(c.prototype,"size",MapGetSize); +b.InstallFunctions(c.prototype,2,[ +"get",MapGet, +"set",MapSet, +"has",MapHas, +"delete",MapDelete, +"clear",MapClearJS, +"forEach",MapForEach +]); +%InstallToContext([ +"map_get",MapGet, +"map_set",MapSet, +"map_has",MapHas, +"map_delete",MapDelete, +"set_add",SetAdd, +"set_has",SetHas, +"set_delete",SetDelete, +]); +b.Export(function(L){ +L.GetExistingHash=GetExistingHash; +L.GetHash=GetHash; +}); +}) + +{ +if(r===true)return; +r=true; +PromiseResolve(q,value); +}; +var t=reason=>{ +if(r===true)return; +r=true; +PromiseReject(q,reason); +}; +return{ +__proto__:null, +resolve:s, +reject:t +}; +} +var u=function Promise(v){ +if(v===j){ +return %NewObject(u,new.target); +} +if((new.target===(void 0)))throw e(61,this); +if(!(typeof(v)==='function')) +throw e(134,v); +var q=PromiseInit(%NewObject(u,new.target)); +var w=CreateResolvingFunctions(q); +try{ +%DebugPushPromise(q,Promise); +v(w.resolve,w.reject); +}catch(e){ +%_Call(w.reject,(void 0),e); +}finally{ +%DebugPopPromise(); +} +return q; +} +function PromiseSet(q,x,y,z,A){ +(q[k]=x); +(q[l]=y); +(q[i]=z); +(q[h]=A); +if((%_DebugIsActive()!=0)){ +%DebugPromiseEvent({promise:q,status:x,value:y}); +} +return q; +} +function PromiseCreateAndSet(x,y){ +var q=new u(j); +if((%_DebugIsActive()!=0))PromiseSet(q,0,(void 0)); +return PromiseSet(q,x,y); +} +function PromiseInit(q){ +return PromiseSet( +q,0,(void 0),new d,new d) +} +function PromiseDone(q,x,y,B){ +if((q[k])===0){ +var C=(q[B]); +if(C.length)PromiseEnqueue(y,C,x); +PromiseSet(q,x,y); +} +} +function PromiseHandle(y,D,E){ +try{ +%DebugPushPromise(E.promise,PromiseHandle); +var F=D(y); +E.resolve(F); +}catch(exception){ +try{E.reject(exception);}catch(e){} +}finally{ +%DebugPopPromise(); +} +} +function PromiseEnqueue(y,C,x){ +var G,H,I=(%_DebugIsActive()!=0); +%EnqueueMicrotask(function(){ +if(I){ +%DebugAsyncTaskEvent({type:"willHandle",id:G,name:H}); +} +for(var J=0;J0?"Promise.resolve":"Promise.reject"; +%DebugAsyncTaskEvent({type:"enqueue",id:G,name:H}); +} +} +function PromiseIdResolveHandler(K){return K} +function PromiseIdRejectHandler(L){throw L} +function PromiseNopResolver(){} +function IsPromise(K){ +return(%_IsJSReceiver(K))&&(!(K[k]===(void 0))); +} +function PromiseCreate(){ +return new u(PromiseNopResolver) +} +function PromiseResolve(q,K){ +if(K===q){ +return PromiseReject(q,e(88,K)); +} +if((%_IsJSReceiver(K))){ +try{ +var M=K.then; +}catch(e){ +return PromiseReject(q,e); +} +if((typeof(M)==='function')){ +var G,H,I=(%_DebugIsActive()!=0); +%EnqueueMicrotask(function(){ +if(I){ +%DebugAsyncTaskEvent({type:"willHandle",id:G,name:H}); +} +var w=CreateResolvingFunctions(q); +try{ +%_Call(M,K,w.resolve,w.reject); +}catch(e){ +%_Call(w.reject,(void 0),e); +} +if(I){ +%DebugAsyncTaskEvent({type:"didHandle",id:G,name:H}); +} +}); +if(I){ +G=++p; +H="PromseResolveThenableJob"; +%DebugAsyncTaskEvent({type:"enqueue",id:G,name:H}); +} +return; +} +} +PromiseDone(q,+1,K,i); +} +function PromiseReject(q,L){ +if((q[k])==0){ +var N=(%_DebugIsActive()!=0); +if(N|| +!(!(q[g]===(void 0)))){ +%PromiseRejectEvent(q,L,N); +} +} +PromiseDone(q,-1,L,h) +} +function NewPromiseCapability(O){ +if(O===u){ +var q=PromiseInit(new u(j)); +var w=CreateResolvingFunctions(q); +return{ +promise:q, +resolve:w.resolve, +reject:w.reject +}; +} +var F={promise:(void 0),resolve:(void 0),reject:(void 0)}; +F.promise=new O((s,t)=>{ +if(!(F.resolve===(void 0))||!(F.reject===(void 0))) +throw e(89); +F.resolve=s; +F.reject=t; +}); +return F; +} +function PromiseDeferred(){ +%IncrementUseCounter(19); +return NewPromiseCapability(this); +} +function PromiseResolved(K){ +%IncrementUseCounter(18); +return %_Call(PromiseCast,this,K); +} +function PromiseRejected(L){ +if(!(%_IsJSReceiver(this))){ +throw e(16,PromiseRejected); +} +if(this===u){ +var q=PromiseCreateAndSet(-1,L); +%PromiseRejectEvent(q,L,false); +return q; +}else{ +var P=NewPromiseCapability(this); +%_Call(P.reject,(void 0),L); +return P.promise; +} +} +function PromiseThen(z,A){ +var x=(this[k]); +if((x===(void 0))){ +throw e(61,this); +} +var Q=m(this,u); +z=(typeof(z)==='function')?z:PromiseIdResolveHandler; +A=(typeof(A)==='function')?A:PromiseIdRejectHandler; +var E=NewPromiseCapability(Q); +switch(x){ +case 0: +(this[i]).push(z,E); +(this[h]).push(A,E); +break; +case+1: +PromiseEnqueue((this[l]), +[z,E], ++1); +break; +case-1: +if(!(!(this[g]===(void 0)))){ +%PromiseRevokeReject(this); +} +PromiseEnqueue((this[l]), +[A,E], +-1); +break; +} +(this[g]=true); +if((%_DebugIsActive()!=0)){ +%DebugPromiseEvent({promise:E.promise,parentPromise:this}); +} +return E.promise; +} +function PromiseChain(z,A){ +%IncrementUseCounter(17); +return %_Call(PromiseThen,this,z,A); +} +function PromiseCatch(A){ +return this.then((void 0),A); +} +function PromiseCast(K){ +if(!(%_IsJSReceiver(this))){ +throw e(16,PromiseCast); +} +if(IsPromise(K)&&K.constructor===this)return K; +var P=NewPromiseCapability(this); +var R=%_Call(P.resolve,(void 0),K); +return P.promise; +} +function PromiseAll(S){ +if(!(%_IsJSReceiver(this))){ +throw e(16,"Promise.all"); +} +var E=NewPromiseCapability(this); +var T=new d(); +var U; +function CreateResolveElementFunction(V,W,P){ +var X=false; +return(K)=>{ +if(X===true)return; +X=true; +W[V]=K; +if(--U===0){ +var Y=[]; +%MoveArrayContents(W,Y); +%_Call(P.resolve,(void 0),Y); +} +}; +} +try{ +var J=0; +U=1; +for(var y of S){ +var Z=this.resolve(y); +++U; +Z.then( +CreateResolveElementFunction(J,T,E), +E.reject); +(E.reject[f]=E); +++J; +} +if(--U===0){ +var Y=[]; +%MoveArrayContents(T,Y); +%_Call(E.resolve,(void 0),Y); +} +}catch(e){ +%_Call(E.reject,(void 0),e); +} +return E.promise; +} +function PromiseRace(S){ +if(!(%_IsJSReceiver(this))){ +throw e(16,PromiseRace); +} +var E=NewPromiseCapability(this); +try{ +for(var y of S){ +this.resolve(y).then(E.resolve,E.reject); +(E.reject[f]=E); +} +}catch(e){ +E.reject(e) +} +return E.promise; +} +function PromiseHasUserDefinedRejectHandlerRecursive(q){ +var aa=(q[h]); +if((aa===(void 0)))return false; +for(var J=0;J%FunctionRemovePrototype(fn)); +b.Export(function(ab){ +ab.PromiseChain=PromiseChain; +ab.PromiseDeferred=PromiseDeferred; +ab.PromiseResolved=PromiseResolved; +}); +}) + + messages +(function(a,b){ +%CheckIsBootstrapping(); +var c; +var d; +var e; +var f; +var g= +b.ImportNow("call_site_receiver_symbol"); +var h= +b.ImportNow("call_site_function_symbol"); +var i= +b.ImportNow("call_site_position_symbol"); +var j= +b.ImportNow("call_site_strict_symbol"); +var k; +var l; +var m= +b.ImportNow("formatted_stack_trace_symbol"); +var n=a.Object; +var o; +var p; +var q; +var r=b.InternalArray; +var s=b.ImportNow("internal_error_symbol"); +var t; +var u=b.ImportNow("object_to_string"); +var v=b.ImportNow("Script"); +var w=b.ImportNow("stack_trace_symbol"); +var x; +var y; +var z; +var A; +var B=b.ImportNow("to_string_tag_symbol"); +var C; +var D; +var E; +b.Import(function(F){ +c=F.ArrayJoin; +d=F.Bool16x8ToString; +e=F.Bool32x4ToString; +f=F.Bool8x16ToString; +l=F.Float32x4ToString; +o=F.Int16x8ToString; +p=F.Int32x4ToString; +q=F.Int8x16ToString; +t=F.ObjectDefineProperty; +x=F.StringCharAt; +y=F.StringIndexOf; +z=F.StringSubstring; +A=F.SymbolToString; +C=F.Uint16x8ToString; +D=F.Uint32x4ToString; +E=F.Uint8x16ToString; +}); +b.ImportFromExperimental(function(F){ +k=F.FLAG_harmony_tostring; +}); +var G; +var H; +var I; +var J; +var K; +var L; +var M; +function NoSideEffectsObjectToString(){ +if((this===(void 0)))return"[object Undefined]"; +if((this===null))return"[object Null]"; +var N=(%_ToObject(this)); +var O=%_ClassOf(N); +var P; +if(k){ +P=%GetDataProperty(N,B); +if(!(typeof(P)==='string')){ +P=O; +} +}else{ +P=O; +} +return`[object ${P}]`; +} +function IsErrorObject(Q){ +return(%HasOwnProperty(Q,w)); +} +function NoSideEffectsErrorToString(){ +var R=%GetDataProperty(this,"name"); +var S=%GetDataProperty(this,"message"); +R=(R===(void 0))?"Error":NoSideEffectsToString(R); +S=(S===(void 0))?"":NoSideEffectsToString(S); +if(R=="")return S; +if(S=="")return R; +return`${R}: ${S}`; +} +function NoSideEffectsToString(Q){ +if((typeof(Q)==='string'))return Q; +if((typeof(Q)==='number'))return %_NumberToString(Q); +if((typeof(Q)==='boolean'))return Q?'true':'false'; +if((Q===(void 0)))return'undefined'; +if((Q===null))return'null'; +if((%_IsFunction(Q))){ +var T=%FunctionToString(Q); +if(T.length>128){ +T=%_SubString(T,0,111)+"......"+ +%_SubString(T,T.length-2,T.length); +} +return T; +} +if((typeof(Q)==='symbol'))return %_Call(A,Q); +if((%_IsSimdValue(Q))){ +switch(typeof(Q)){ +case'float32x4':return %_Call(l,Q); +case'int32x4':return %_Call(p,Q); +case'int16x8':return %_Call(o,Q); +case'int8x16':return %_Call(q,Q); +case'uint32x4':return %_Call(D,Q); +case'uint16x8':return %_Call(C,Q); +case'uint8x16':return %_Call(E,Q); +case'bool32x4':return %_Call(e,Q); +case'bool16x8':return %_Call(d,Q); +case'bool8x16':return %_Call(f,Q); +} +} +if((%_IsJSReceiver(Q))){ +if(IsErrorObject(Q)|| +%GetDataProperty(Q,"toString")===ErrorToString){ +return %_Call(NoSideEffectsErrorToString,Q); +} +if(%GetDataProperty(Q,"toString")===u){ +var U=%GetDataProperty(Q,"constructor"); +if((%_IsFunction(U))){ +var V=%FunctionGetName(U); +if(V!="")return`#<${V}>`; +} +} +} +return %_Call(NoSideEffectsObjectToString,Q); +} +function MakeGenericError(U,W,X,Y,Z){ +var aa=new U(FormatMessage(W,X,Y,Z)); +aa[s]=true; +return aa; +} +%FunctionSetInstanceClassName(v,'Script'); +%AddNamedProperty(v.prototype,'constructor',v, +2|4|1); +%SetCode(v,function(ab){ +throw MakeError(6); +}); +function FormatMessage(W,X,Y,Z){ +var X=NoSideEffectsToString(X); +var Y=NoSideEffectsToString(Y); +var Z=NoSideEffectsToString(Z); +try{ +return %FormatMessageString(W,X,Y,Z); +}catch(e){ +return""; +} +} +function GetLineNumber(S){ +var ac=%MessageGetStartPosition(S); +if(ac==-1)return 0; +var ad=%MessageGetScript(S); +var ae=ad.locationFromPosition(ac,true); +if(ae==null)return 0; +return ae.line+1; +} +function GetColumnNumber(S){ +var ad=%MessageGetScript(S); +var ac=%MessageGetStartPosition(S); +var ae=ad.locationFromPosition(ac,true); +if(ae==null)return-1; +return ae.column; +} +function GetSourceLine(S){ +var ad=%MessageGetScript(S); +var ac=%MessageGetStartPosition(S); +var ae=ad.locationFromPosition(ac,true); +if(ae==null)return""; +return ae.sourceText(); +} +function ScriptLineFromPosition(af){ +var ag=0; +var ah=this.lineCount()-1; +var ai=this.line_ends; +if(af>ai[ah]){ +return-1; +} +if(af<=ai[0]){ +return 0; +} +while(ah>=1){ +var aj=(ag+ah)>>1; +if(af>ai[aj]){ +ag=aj+1; +}else if(af<=ai[aj-1]){ +ah=aj-1; +}else{ +return aj; +} +} +return-1; +} +function ScriptLocationFromPosition(af, +include_resource_offset){ +var ak=this.lineFromPosition(af); +if(ak==-1)return null; +var ai=this.line_ends; +var al=ak==0?0:ai[ak-1]+1; +var am=ai[ak]; +if(am>0&&%_Call(x,this.source,am-1)=='\r'){ +am--; +} +var an=af-al; +if(include_resource_offset){ +ak+=this.line_offset; +if(ak==this.line_offset){ +an+=this.column_offset; +} +} +return new SourceLocation(this,af,ak,an,al,am); +} +function ScriptLocationFromLine(ao,ap,aq){ +var ak=0; +if(!(ao===(void 0))){ +ak=ao-this.line_offset; +} +var an=ap||0; +if(ak==0){ +an-=this.column_offset; +} +var ar=aq||0; +if(ak<0||an<0||ar<0)return null; +if(ak==0){ +return this.locationFromPosition(ar+an,false); +}else{ +var as=this.lineFromPosition(ar); +if(as==-1||as+ak>=this.lineCount()){ +return null; +} +return this.locationFromPosition( +this.line_ends[as+ak-1]+1+an); +} +} +function ScriptSourceSlice(at,au){ +var av=(at===(void 0))?this.line_offset +:at; +var aw=(au===(void 0))?this.line_offset+this.lineCount() +:au; +av-=this.line_offset; +aw-=this.line_offset; +if(av<0)av=0; +if(aw>this.lineCount())aw=this.lineCount(); +if(av>=this.lineCount()|| +aw<0|| +av>aw){ +return null; +} +var ai=this.line_ends; +var ax=av==0?0:ai[av-1]+1; +var ay=aw==0?0:ai[aw-1]+1; +return new SourceSlice(this, +av+this.line_offset, +aw+this.line_offset, +ax,ay); +} +function ScriptSourceLine(ao){ +var ak=0; +if(!(ao===(void 0))){ +ak=ao-this.line_offset; +} +if(ak<0||this.lineCount()<=ak){ +return null; +} +var ai=this.line_ends; +var al=ak==0?0:ai[ak-1]+1; +var am=ai[ak]; +return %_Call(z,this.source,al,am); +} +function ScriptLineCount(){ +return this.line_ends.length; +} +function ScriptLineEnd(az){ +return this.line_ends[az]; +} +function ScriptNameOrSourceURL(){ +if(this.source_url)return this.source_url; +return this.name; +} +b.SetUpLockedPrototype(v,[ +"source", +"name", +"source_url", +"source_mapping_url", +"line_ends", +"line_offset", +"column_offset" +],[ +"lineFromPosition",ScriptLineFromPosition, +"locationFromPosition",ScriptLocationFromPosition, +"locationFromLine",ScriptLocationFromLine, +"sourceSlice",ScriptSourceSlice, +"sourceLine",ScriptSourceLine, +"lineCount",ScriptLineCount, +"nameOrSourceURL",ScriptNameOrSourceURL, +"lineEnd",ScriptLineEnd +] +); +function SourceLocation(ad,af,ak,an,al,am){ +this.script=ad; +this.position=af; +this.line=ak; +this.column=an; +this.start=al; +this.end=am; +} +function SourceLocationSourceText(){ +return %_Call(z,this.script.source,this.start,this.end); +} +b.SetUpLockedPrototype(SourceLocation, +["script","position","line","column","start","end"], +["sourceText",SourceLocationSourceText] +); +function SourceSlice(ad,av,aw,ax,ay){ +this.script=ad; +this.from_line=av; +this.to_line=aw; +this.from_position=ax; +this.to_position=ay; +} +function SourceSliceSourceText(){ +return %_Call(z, +this.script.source, +this.from_position, +this.to_position); +} +b.SetUpLockedPrototype(SourceSlice, +["script","from_line","to_line","from_position","to_position"], +["sourceText",SourceSliceSourceText] +); +function GetStackTraceLine(aA,aB,aC,aD){ +return new CallSite(aA,aB,aC,false).toString(); +} +function CallSite(aE,aB,aC,aF){ +if(!(%_IsFunction(aB))){ +throw MakeTypeError(18,typeof aB); +} +if((new.target===(void 0))){ +return new CallSite(aE,aB,aC,aF); +} +(this[g]=aE); +(this[h]=aB); +(this[i]=((aC)|0)); +(this[j]=(!!(aF))); +} +function CallSiteGetThis(){ +return(this[j]) +?(void 0):(this[g]); +} +function CallSiteGetFunction(){ +return(this[j]) +?(void 0):(this[h]); +} +function CallSiteGetPosition(){ +return(this[i]); +} +function CallSiteGetTypeName(){ +return GetTypeName((this[g]),false); +} +function CallSiteIsToplevel(){ +return %CallSiteIsToplevelRT(this); +} +function CallSiteIsEval(){ +return %CallSiteIsEvalRT(this); +} +function CallSiteGetEvalOrigin(){ +var ad=%FunctionGetScript((this[h])); +return FormatEvalOrigin(ad); +} +function CallSiteGetScriptNameOrSourceURL(){ +return %CallSiteGetScriptNameOrSourceUrlRT(this); +} +function CallSiteGetFunctionName(){ +return %CallSiteGetFunctionNameRT(this); +} +function CallSiteGetMethodName(){ +return %CallSiteGetMethodNameRT(this); +} +function CallSiteGetFileName(){ +return %CallSiteGetFileNameRT(this); +} +function CallSiteGetLineNumber(){ +return %CallSiteGetLineNumberRT(this); +} +function CallSiteGetColumnNumber(){ +return %CallSiteGetColumnNumberRT(this); +} +function CallSiteIsNative(){ +return %CallSiteIsNativeRT(this); +} +function CallSiteIsConstructor(){ +return %CallSiteIsConstructorRT(this); +} +function CallSiteToString(){ +var aG; +var aH=""; +if(this.isNative()){ +aH="native"; +}else{ +aG=this.getScriptNameOrSourceURL(); +if(!aG&&this.isEval()){ +aH=this.getEvalOrigin(); +aH+=", "; +} +if(aG){ +aH+=aG; +}else{ +aH+=""; +} +var aI=this.getLineNumber(); +if(aI!=null){ +aH+=":"+aI; +var aJ=this.getColumnNumber(); +if(aJ){ +aH+=":"+aJ; +} +} +} +var ak=""; +var aK=this.getFunctionName(); +var aL=true; +var aM=this.isConstructor(); +var aN=!(this.isToplevel()||aM); +if(aN){ +var aO=GetTypeName((this[g]),true); +var aP=this.getMethodName(); +if(aK){ +if(aO&&%_Call(y,aK,aO)!=0){ +ak+=aO+"."; +} +ak+=aK; +if(aP&& +(%_Call(y,aK,"."+aP)!= +aK.length-aP.length-1)){ +ak+=" [as "+aP+"]"; +} +}else{ +ak+=aO+"."+(aP||""); +} +}else if(aM){ +ak+="new "+(aK||""); +}else if(aK){ +ak+=aK; +}else{ +ak+=aH; +aL=false; +} +if(aL){ +ak+=" ("+aH+")"; +} +return ak; +} +b.SetUpLockedPrototype(CallSite,["receiver","fun","pos"],[ +"getThis",CallSiteGetThis, +"getTypeName",CallSiteGetTypeName, +"isToplevel",CallSiteIsToplevel, +"isEval",CallSiteIsEval, +"getEvalOrigin",CallSiteGetEvalOrigin, +"getScriptNameOrSourceURL",CallSiteGetScriptNameOrSourceURL, +"getFunction",CallSiteGetFunction, +"getFunctionName",CallSiteGetFunctionName, +"getMethodName",CallSiteGetMethodName, +"getFileName",CallSiteGetFileName, +"getLineNumber",CallSiteGetLineNumber, +"getColumnNumber",CallSiteGetColumnNumber, +"isNative",CallSiteIsNative, +"getPosition",CallSiteGetPosition, +"isConstructor",CallSiteIsConstructor, +"toString",CallSiteToString +]); +function FormatEvalOrigin(ad){ +var aQ=ad.nameOrSourceURL(); +if(aQ){ +return aQ; +} +var aR="eval at "; +if(ad.eval_from_function_name){ +aR+=ad.eval_from_function_name; +}else{ +aR+=""; +} +var aS=ad.eval_from_script; +if(aS){ +if(aS.compilation_type==1){ +aR+=" ("+FormatEvalOrigin(aS)+")"; +}else{ +if(aS.name){ +aR+=" ("+aS.name; +var ae=aS.locationFromPosition( +ad.eval_from_script_position,true); +if(ae){ +aR+=":"+(ae.line+1); +aR+=":"+(ae.column+1); +} +aR+=")"; +}else{ +aR+=" (unknown source)"; +} +} +} +return aR; +} +function FormatErrorString(aa){ +try{ +return %_Call(ErrorToString,aa); +}catch(e){ +try{ +return""; +}catch(ee){ +return""; +} +} +} +function GetStackFrames(aT){ +var aU=new r(); +var aV=aT[0]; +for(var aj=1;aj"; +}catch(ee){ +ak=""; +} +} +bb.push(" at "+ak); +} +return %_Call(c,bb,"\n"); +} +function GetTypeName(aE,bd){ +if((aE==null))return null; +if((%_IsJSProxy(aE)))return"Proxy"; +var U=%GetDataProperty((%_ToObject(aE)),"constructor"); +if(!(%_IsFunction(U))){ +return bd?null:%_Call(NoSideEffectsToString,aE); +} +return %FunctionGetName(U); +} +var be=function(){ +var bf=(void 0); +var bg=this; +while(bg){ +var bf= +(bg[m]); +if((bf===(void 0))){ +var ba=(bg[w]); +if((ba===(void 0))){ +bg=%_GetPrototype(bg); +continue; +} +bf=FormatStackTrace(bg,ba); +(bg[w]=(void 0)); +(bg[m]=bf); +} +return bf; +} +return(void 0); +}; +var bh=function(bi){ +if(IsErrorObject(this)){ +(this[w]=(void 0)); +(this[m]=bi); +} +}; +var bj=function(){}; +function SetUpError(bk){ +%FunctionSetInstanceClassName(bk,'Error'); +var R=bk.name; +var bl=new n(); +if(R!=='Error'){ +%InternalSetPrototype(bk,G); +%InternalSetPrototype(bl,G.prototype); +} +%FunctionSetPrototype(bk,bl); +%AddNamedProperty(bk.prototype,'name',R,2); +%AddNamedProperty(bk.prototype,'message','',2); +%AddNamedProperty( +bk.prototype,'constructor',bk,2); +%SetCode(bk,function(bm){ +if((new.target===(void 0)))return new bk(bm); +try{bj(this,bk);}catch(e){} +if(!(bm===(void 0))){ +%AddNamedProperty(this,'message',(%_ToString(bm)),2); +} +}); +%SetNativeFlag(bk); +return bk; +}; +G=SetUpError(a.Error); +M=SetUpError(a.EvalError); +I=SetUpError(a.RangeError); +L=SetUpError(a.ReferenceError); +K=SetUpError(a.SyntaxError); +H=SetUpError(a.TypeError); +J=SetUpError(a.URIError); +b.InstallFunctions(G.prototype,2, +['toString',ErrorToString]); +function ErrorToString(){ +if(!(%_IsJSReceiver(this))){ +throw MakeTypeError(16,"Error.prototype.toString"); +} +var R=this.name; +R=(R===(void 0))?"Error":(%_ToString(R)); +var S=this.message; +S=(S===(void 0))?"":(%_ToString(S)); +if(R=="")return S; +if(S=="")return R; +return`${R}: ${S}` +} +function MakeError(W,X,Y,Z){ +return MakeGenericError(G,W,X,Y,Z); +} +function MakeRangeError(W,X,Y,Z){ +return MakeGenericError(I,W,X,Y,Z); +} +function MakeSyntaxError(W,X,Y,Z){ +return MakeGenericError(K,W,X,Y,Z); +} +function MakeTypeError(W,X,Y,Z){ +return MakeGenericError(H,W,X,Y,Z); +} +function MakeURIError(){ +return MakeGenericError(J,283); +} +var bn=MakeRangeError(187); +b.InstallGetterSetter(bn,'stack', +be,bh) +bj=function captureStackTrace(Q,bo){ +t(Q,'stack',{get:be, +set:bh, +configurable:true}); +%CollectStackTrace(Q,bo?bo:bj); +}; +G.captureStackTrace=bj; +%InstallToContext([ +"get_stack_trace_line_fun",GetStackTraceLine, +"make_error_function",MakeGenericError, +"make_range_error",MakeRangeError, +"make_type_error",MakeTypeError, +"message_get_column_number",GetColumnNumber, +"message_get_line_number",GetLineNumber, +"message_get_source_line",GetSourceLine, +"no_side_effects_to_string_fun",NoSideEffectsToString, +"stack_overflow_boilerplate",bn, +]); +b.Export(function(bp){ +bp.ErrorToString=ErrorToString; +bp.MakeError=MakeError; +bp.MakeRangeError=MakeRangeError; +bp.MakeSyntaxError=MakeSyntaxError; +bp.MakeTypeError=MakeTypeError; +bp.MakeURIError=MakeURIError; +}); +}); + +jsonE +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Date; +var d=a.JSON; +var e=a.Set; +var f=b.InternalArray; +var g; +var h; +var i; +var j; +var k=b.ImportNow("to_string_tag_symbol"); +b.Import(function(l){ +g=l.MakeTypeError; +h=l.MaxSimple; +i=l.MinSimple; +j=l.ObjectHasOwnProperty; +}); +function CreateDataProperty(m,n,o){ +var p={value:o,enumerable:true,writable:true,configurable:true}; +return %reflect_define_property(m,n,p); +} +function InternalizeJSONProperty(q,r,s){ +var t=q[r]; +if((%_IsJSReceiver(t))){ +if(%is_arraylike(t)){ +var u=(%_ToLength(t.length)); +for(var v=0;v0){ +var J=",\n"+C; +I="[\n"+C+F.join(J)+"\n"+ +E+"]"; +}else{ +I="[]"; +} +B.pop(); +return I; +} +function SerializeObject(z,A,B,C,D){ +if(!%PushIfAbsent(B,z))throw g(22); +var E=C; +C+=D; +var F=new f(); +if((%_IsArray(A))){ +var u=A.length; +for(var v=0;v0){ +var J=",\n"+C; +I="{\n"+C+F.join(J)+"\n"+ +E+"}"; +}else{ +I="{}"; +} +B.pop(); +return I; +} +function JSONSerialize(L,q,A,B,C,D){ +var z=q[L]; +if((%_IsJSReceiver(z))){ +var M=z.toJSON; +if((typeof(M)==='function')){ +z=%_Call(M,z,L); +} +} +if((typeof(A)==='function')){ +z=%_Call(A,q,L,z); +} +if((typeof(z)==='string')){ +return %QuoteJSONString(z); +}else if((typeof(z)==='number')){ +return((%_IsSmi(%IS_VAR(z))||z-z==0)?%_NumberToString(z):"null"); +}else if((typeof(z)==='boolean')){ +return z?"true":"false"; +}else if((z===null)){ +return"null"; +}else if((%_IsJSReceiver(z))&&!(typeof(z)==='function')){ +if(%is_arraylike(z)){ +return SerializeArray(z,A,B,C,D); +}else if((%_ClassOf(z)==='Number')){ +z=(%_ToNumber(z)); +return((%_IsSmi(%IS_VAR(z))||z-z==0)?%_NumberToString(z):"null"); +}else if((%_ClassOf(z)==='String')){ +return %QuoteJSONString((%_ToString(z))); +}else if((%_ClassOf(z)==='Boolean')){ +return %_ValueOf(z)?"true":"false"; +}else{ +return SerializeObject(z,A,B,C,D); +} +} +return(void 0); +} +function JSONStringify(z,A,N){ +if(%_ArgumentsLength()==1&&!(%_IsJSProxy(z))){ +return %BasicJSONStringify(z); +} +if(!(typeof(A)==='function')&&%is_arraylike(A)){ +var O=new f(); +var P=new e(); +var u=(%_ToLength(A.length)); +for(var v=0;v10){ +D=%_SubString(N,0,10); +}else{ +D=N; +} +}else{ +D=""; +} +return JSONSerialize('',{'':z},A,new f(),"",D); +} +%AddNamedProperty(d,k,"JSON",1|2); +b.InstallFunctions(d,2,[ +"parse",JSONParse, +"stringify",JSONStringify +]); +function DateToJSON(L){ +var m=(%_ToObject(this)); +var R=(%_ToPrimitive_Number(m)); +if((typeof(R)==='number')&&!(%_IsSmi(%IS_VAR(R))||((R==R)&&(R!=1/0)&&(R!=-1/0)))){ +return null; +} +return m.toISOString(); +} +b.InstallFunctions(c.prototype,2,[ +"toJSON",DateToJSON +]); +function JsonSerializeAdapter(L,S){ +var q={}; +q[L]=S; +return JSONSerialize(L,q,(void 0),new f(),"",""); +} +%InstallToContext(["json_serialize_adapter",JsonSerializeAdapter]); +}) + +8array-iterator +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c= +b.ImportNow("array_iteration_kind_symbol"); +var d= +b.ImportNow("array_iterator_next_symbol"); +var e= +b.ImportNow("array_iterator_object_symbol"); +var f=a.Array; +var g=b.ImportNow("IteratorPrototype"); +var h=b.ImportNow("iterator_symbol"); +var i; +var j=b.ImportNow("to_string_tag_symbol"); +var k=a.Uint8Array.__proto__; +b.Import(function(l){ +i=l.MakeTypeError; +}) +function ArrayIterator(){} +function CreateArrayIterator(m,n){ +var o=(%_ToObject(m)); +var p=new ArrayIterator; +(p[e]=o); +(p[d]=0); +(p[c]=n); +return p; +} +function ArrayIteratorIterator(){ +return this; +} +function ArrayIteratorNext(){ +var p=this; +var q=(void 0); +var r=true; +if(!(%_IsJSReceiver(p))|| +!(!(p[d]===(void 0)))){ +throw i(42, +'Array Iterator.prototype.next',this); +} +var m=(p[e]); +if(!(m===(void 0))){ +var s=(p[d]); +var t=(p[c]); +var u=((m.length)>>>0); +if(s>=u){ +(p[e]=(void 0)); +}else{ +(p[d]=s+1); +if(t==2){ +q=m[s]; +}else if(t==3){ +q=[s,m[s]]; +}else{ +q=s; +} +r=false; +} +} +return %_CreateIterResultObject(q,r); +} +function ArrayEntries(){ +return CreateArrayIterator(this,3); +} +function ArrayValues(){ +return CreateArrayIterator(this,2); +} +function ArrayKeys(){ +return CreateArrayIterator(this,1); +} +%FunctionSetPrototype(ArrayIterator,{__proto__:g}); +%FunctionSetInstanceClassName(ArrayIterator,'Array Iterator'); +b.InstallFunctions(ArrayIterator.prototype,2,[ +'next',ArrayIteratorNext +]); +b.SetFunctionName(ArrayIteratorIterator,h); +%AddNamedProperty(ArrayIterator.prototype,h, +ArrayIteratorIterator,2); +%AddNamedProperty(ArrayIterator.prototype,j, +"Array Iterator",1|2); +b.InstallFunctions(f.prototype,2,[ +'entries',ArrayEntries, +'keys',ArrayKeys +]); +b.SetFunctionName(ArrayValues,'values'); +%AddNamedProperty(f.prototype,h,ArrayValues, +2); +%AddNamedProperty(k.prototype, +'entries',ArrayEntries,2); +%AddNamedProperty(k.prototype,'values',ArrayValues,2); +%AddNamedProperty(k.prototype,'keys',ArrayKeys,2); +%AddNamedProperty(k.prototype, +h,ArrayValues,2); +b.Export(function(v){ +v.ArrayValues=ArrayValues; +}); +%InstallToContext(["array_values_iterator",ArrayValues]); +}) + +>>0); +if(p>=q){ +(m[g]=(void 0)); +}else{ +var r=%_StringCharCodeAt(l,p); +n=%_StringCharFromCode(r); +o=false; +p++; +if(r>=0xD800&&r<=0xDBFF&&p=0xDC00&&s<=0xDFFF){ +n+=%_StringCharFromCode(s); +p++; +} +} +(m[h]=p); +} +} +return %_CreateIterResultObject(n,o); +} +function StringPrototypeIterator(){ +return CreateStringIterator(this); +} +%FunctionSetPrototype(StringIterator,{__proto__:d}); +%FunctionSetInstanceClassName(StringIterator,'String Iterator'); +b.InstallFunctions(StringIterator.prototype,2,[ +'next',StringIteratorNext +]); +%AddNamedProperty(StringIterator.prototype,i, +"String Iterator",1|2); +b.SetFunctionName(StringPrototypeIterator,e); +%AddNamedProperty(c.prototype,e, +StringPrototypeIterator,2); +}) + +$templates +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=a.Map; +var d=b.InternalArray; +var e=new c; +var f=c.prototype.get; +var g=c.prototype.set; +function SameCallSiteElements(h,i){ +var j=h.length; +var i=i.raw; +if(j!==i.length)return false; +for(var k=0;k0){ +return R(U,%_Arguments(0)); +}else{ +return R(U); +} +} +} +%FunctionSetName(V,T); +%FunctionRemovePrototype(V); +%SetNativeFlag(V); +this[T]=V; +} +return this[T]; +} +%FunctionSetName(getter,Q); +%FunctionRemovePrototype(getter); +%SetNativeFlag(getter); +r(P.prototype,Q,{ +get:getter, +enumerable:false, +configurable:true +}); +} +function supportedLocalesOf(Y,Z,aa){ +if((%_Call(x,Y,GetServiceRE())===null)){ +throw m(7,Y); +} +if((aa===(void 0))){ +aa={}; +}else{ +aa=(%_ToObject(aa)); +} +var ab=aa.localeMatcher; +if(!(ab===(void 0))){ +ab=l(ab); +if(ab!=='lookup'&&ab!=='best fit'){ +throw n(183,ab); +} +}else{ +ab='best fit'; +} +var ac=initializeLocaleList(Z); +if((E[Y]===(void 0))){ +E[Y]=getAvailableLocalesOf(Y); +} +if(ab==='best fit'){ +return initializeLocaleList(bestFitSupportedLocalesOf( +ac,E[Y])); +} +return initializeLocaleList(lookupSupportedLocalesOf( +ac,E[Y])); +} +function lookupSupportedLocalesOf(ac,ad){ +var ae=[]; +for(var af=0;af=3&&S<=8&&!(au===(void 0))){ +at[au]=av; +au=(void 0); +}else{ +return{}; +} +} +return at; +} +function setOptions(aw,at,ax,aj,ay){ +var ar=''; +var az=function updateExtension(aA,ao){ +return'-'+aA+'-'+l(ao); +} +var aB=function updateProperty(ak,al,ao){ +if(al==='boolean'&&(typeof ao==='string')){ +ao=(ao==='true')?true:false; +} +if(!(ak===(void 0))){ +defineWEProperty(ay,ak,ao); +} +} +for(var aA in ax){ +if(%HasOwnProperty(ax,aA)){ +var ao=(void 0); +var aC=ax[aA]; +if(!(aC.property===(void 0))){ +ao=aj(aC.property,aC.type,aC.values); +} +if(!(ao===(void 0))){ +aB(aC.property,aC.type,ao); +ar+=az(aA,ao); +continue; +} +if(%HasOwnProperty(at,aA)){ +ao=at[aA]; +if(!(ao===(void 0))){ +aB(aC.property,aC.type,ao); +ar+=az(aA,ao); +}else if(aC.type==='boolean'){ +aB(aC.property,aC.type,true); +ar+=az(aA,true); +} +} +} +} +return ar===''?'':'-u'+ar; +} +function freezeArray(aD){ +var aE=aD.length; +for(var af=0;af>>0); +for(var aX=0;aXbB){ +throw n(186,ak); +} +return p(ao); +} +return bC; +} +var bD={ +get(){ +%IncrementUseCounter(15); +return this[s]; +}, +set(ao){ +this[s]=ao; +} +}; +function initializeNumberFormat(bE,Z,aa){ +if(%IsInitializedIntlObject(bE)){ +throw o(132,"NumberFormat"); +} +if((aa===(void 0))){ +aa={}; +} +var aj=getGetOption(aa,'numberformat'); +var ag=resolveLocale('numberformat',Z,aa); +var br={}; +defineWEProperty(br,'style',aj( +'style','string',['decimal','percent','currency'],'decimal')); +var bz=aj('currency','string'); +if(!(bz===(void 0))&&!isWellFormedCurrencyCode(bz)){ +throw n(169,bz); +} +if(br.style==='currency'&&(bz===(void 0))){ +throw o(28); +} +var bF=aj( +'currencyDisplay','string',['code','symbol','name'],'symbol'); +if(br.style==='currency'){ +defineWEProperty(br,'currency',%StringToUpperCase(bz)); +defineWEProperty(br,'currencyDisplay',bF); +} +var bG=getNumberOption(aa,'minimumIntegerDigits',1,21,1); +defineWEProperty(br,'minimumIntegerDigits',bG); +var bH=aa['minimumFractionDigits']; +var bI=aa['maximumFractionDigits']; +if(!(bH===(void 0))||br.style!=='currency'){ +bH=getNumberOption(aa,'minimumFractionDigits',0,20,0); +defineWEProperty(br,'minimumFractionDigits',bH); +} +if(!(bI===(void 0))||br.style!=='currency'){ +var bJ=br.style==='percent'?0:3; +bH=(bH===(void 0))?0:bH; +var bK=(bH>bJ)?bH:bJ; +bI=getNumberOption(aa,'maximumFractionDigits',bH,20,bK); +defineWEProperty(br,'maximumFractionDigits',bI); +} +var bL=aa['minimumSignificantDigits']; +var bM=aa['maximumSignificantDigits']; +if(!(bL===(void 0))||!(bM===(void 0))){ +bL=getNumberOption(aa,'minimumSignificantDigits',1,21,0); +defineWEProperty(br,'minimumSignificantDigits',bL); +bM=getNumberOption(aa,'maximumSignificantDigits',bL,21,21); +defineWEProperty(br,'maximumSignificantDigits',bM); +} +defineWEProperty(br,'useGrouping',aj( +'useGrouping','boolean',(void 0),true)); +var at=parseExtension(ag.extension); +var bN={ +'nu':{'property':(void 0),'type':'string'} +}; +var ar=setOptions(aa,at,bN, +aj,br); +var bw=ag.locale+ar; +var ap=q({},{ +currency:{writable:true}, +currencyDisplay:{writable:true}, +locale:{writable:true}, +maximumFractionDigits:{writable:true}, +minimumFractionDigits:{writable:true}, +minimumIntegerDigits:{writable:true}, +numberingSystem:{writable:true}, +pattern:bD, +requestedLocale:{value:bw,writable:true}, +style:{value:br.style,writable:true}, +useGrouping:{writable:true} +}); +if(%HasOwnProperty(br,'minimumSignificantDigits')){ +defineWEProperty(ap,'minimumSignificantDigits',(void 0)); +} +if(%HasOwnProperty(br,'maximumSignificantDigits')){ +defineWEProperty(ap,'maximumSignificantDigits',(void 0)); +} +var bO=%CreateNumberFormat(bw, +br, +ap); +if(br.style==='currency'){ +r(ap,'currencyDisplay',{value:bF, +writable:true}); +} +%MarkAsInitializedIntlObjectOfType(bE,'numberformat',bO); +bE[u]=ap; +r(bE,'resolved',bp); +return bE; +} +%AddNamedProperty(D,'NumberFormat',function(){ +var Z=%_Arguments(0); +var aa=%_Arguments(1); +if(!this||this===D){ +return new D.NumberFormat(Z,aa); +} +return initializeNumberFormat((%_ToObject(this)),Z,aa); +}, +2 +); +%AddNamedProperty(D.NumberFormat.prototype,'resolvedOptions',function(){ +if(!(new.target===(void 0))){ +throw o(87); +} +if(!%IsInitializedIntlObjectOfType(this,'numberformat')){ +throw o(133,"NumberFormat"); +} +var bP=this; +var ag=getOptimalLanguageTag(bP[u].requestedLocale, +bP[u].locale); +var aN={ +locale:ag, +numberingSystem:bP[u].numberingSystem, +style:bP[u].style, +useGrouping:bP[u].useGrouping, +minimumIntegerDigits:bP[u].minimumIntegerDigits, +minimumFractionDigits:bP[u].minimumFractionDigits, +maximumFractionDigits:bP[u].maximumFractionDigits, +}; +if(aN.style==='currency'){ +defineWECProperty(aN,'currency',bP[u].currency); +defineWECProperty(aN,'currencyDisplay', +bP[u].currencyDisplay); +} +if(%HasOwnProperty(bP[u],'minimumSignificantDigits')){ +defineWECProperty(aN,'minimumSignificantDigits', +bP[u].minimumSignificantDigits); +} +if(%HasOwnProperty(bP[u],'maximumSignificantDigits')){ +defineWECProperty(aN,'maximumSignificantDigits', +bP[u].maximumSignificantDigits); +} +return aN; +}, +2 +); +%FunctionSetName(D.NumberFormat.prototype.resolvedOptions, +'resolvedOptions'); +%FunctionRemovePrototype(D.NumberFormat.prototype.resolvedOptions); +%SetNativeFlag(D.NumberFormat.prototype.resolvedOptions); +%AddNamedProperty(D.NumberFormat,'supportedLocalesOf',function(Z){ +if(!(new.target===(void 0))){ +throw o(87); +} +return supportedLocalesOf('numberformat',Z,%_Arguments(1)); +}, +2 +); +%FunctionSetName(D.NumberFormat.supportedLocalesOf,'supportedLocalesOf'); +%FunctionRemovePrototype(D.NumberFormat.supportedLocalesOf); +%SetNativeFlag(D.NumberFormat.supportedLocalesOf); +function formatNumber(bO,ao){ +var bQ=(%_ToNumber(ao))+0; +return %InternalNumberFormat(%GetImplFromInitializedIntlObject(bO), +bQ); +} +function parseNumber(bO,ao){ +return %InternalNumberParse(%GetImplFromInitializedIntlObject(bO), +l(ao)); +} +addBoundMethod(D.NumberFormat,'format',formatNumber,1); +addBoundMethod(D.NumberFormat,'v8Parse',parseNumber,1); +function toLDMLString(aa){ +var aj=getGetOption(aa,'dateformat'); +var bR=''; +var bS=aj('weekday','string',['narrow','short','long']); +bR+=appendToLDMLString( +bS,{narrow:'EEEEE',short:'EEE',long:'EEEE'}); +bS=aj('era','string',['narrow','short','long']); +bR+=appendToLDMLString( +bS,{narrow:'GGGGG',short:'GGG',long:'GGGG'}); +bS=aj('year','string',['2-digit','numeric']); +bR+=appendToLDMLString(bS,{'2-digit':'yy','numeric':'y'}); +bS=aj('month','string', +['2-digit','numeric','narrow','short','long']); +bR+=appendToLDMLString(bS,{'2-digit':'MM','numeric':'M', +'narrow':'MMMMM','short':'MMM','long':'MMMM'}); +bS=aj('day','string',['2-digit','numeric']); +bR+=appendToLDMLString( +bS,{'2-digit':'dd','numeric':'d'}); +var bT=aj('hour12','boolean'); +bS=aj('hour','string',['2-digit','numeric']); +if((bT===(void 0))){ +bR+=appendToLDMLString(bS,{'2-digit':'jj','numeric':'j'}); +}else if(bT===true){ +bR+=appendToLDMLString(bS,{'2-digit':'hh','numeric':'h'}); +}else{ +bR+=appendToLDMLString(bS,{'2-digit':'HH','numeric':'H'}); +} +bS=aj('minute','string',['2-digit','numeric']); +bR+=appendToLDMLString(bS,{'2-digit':'mm','numeric':'m'}); +bS=aj('second','string',['2-digit','numeric']); +bR+=appendToLDMLString(bS,{'2-digit':'ss','numeric':'s'}); +bS=aj('timeZoneName','string',['short','long']); +bR+=appendToLDMLString(bS,{short:'z',long:'zzzz'}); +return bR; +} +function appendToLDMLString(bS,bU){ +if(!(bS===(void 0))){ +return bU[bS]; +}else{ +return''; +} +} +function fromLDMLString(bR){ +bR=%_Call(y,bR,GetQuotedStringRE(),''); +var aa={}; +var aM=%_Call(x,bR,/E{3,5}/g); +aa=appendToDateTimeObject( +aa,'weekday',aM,{EEEEE:'narrow',EEE:'short',EEEE:'long'}); +aM=%_Call(x,bR,/G{3,5}/g); +aa=appendToDateTimeObject( +aa,'era',aM,{GGGGG:'narrow',GGG:'short',GGGG:'long'}); +aM=%_Call(x,bR,/y{1,2}/g); +aa=appendToDateTimeObject( +aa,'year',aM,{y:'numeric',yy:'2-digit'}); +aM=%_Call(x,bR,/M{1,5}/g); +aa=appendToDateTimeObject(aa,'month',aM,{MM:'2-digit', +M:'numeric',MMMMM:'narrow',MMM:'short',MMMM:'long'}); +aM=%_Call(x,bR,/L{1,5}/g); +aa=appendToDateTimeObject(aa,'month',aM,{LL:'2-digit', +L:'numeric',LLLLL:'narrow',LLL:'short',LLLL:'long'}); +aM=%_Call(x,bR,/d{1,2}/g); +aa=appendToDateTimeObject( +aa,'day',aM,{d:'numeric',dd:'2-digit'}); +aM=%_Call(x,bR,/h{1,2}/g); +if(aM!==null){ +aa['hour12']=true; +} +aa=appendToDateTimeObject( +aa,'hour',aM,{h:'numeric',hh:'2-digit'}); +aM=%_Call(x,bR,/H{1,2}/g); +if(aM!==null){ +aa['hour12']=false; +} +aa=appendToDateTimeObject( +aa,'hour',aM,{H:'numeric',HH:'2-digit'}); +aM=%_Call(x,bR,/m{1,2}/g); +aa=appendToDateTimeObject( +aa,'minute',aM,{m:'numeric',mm:'2-digit'}); +aM=%_Call(x,bR,/s{1,2}/g); +aa=appendToDateTimeObject( +aa,'second',aM,{s:'numeric',ss:'2-digit'}); +aM=%_Call(x,bR,/z|zzzz/g); +aa=appendToDateTimeObject( +aa,'timeZoneName',aM,{z:'short',zzzz:'long'}); +return aa; +} +function appendToDateTimeObject(aa,bS,aM,bU){ +if((aM===null)){ +if(!%HasOwnProperty(aa,bS)){ +defineWEProperty(aa,bS,(void 0)); +} +return aa; +} +var ak=aM[0]; +defineWEProperty(aa,bS,bU[ak]); +return aa; +} +function toDateTimeOptions(aa,bV,bW){ +if((aa===(void 0))){ +aa={}; +}else{ +aa=(%_ToObject(aa)); +} +var bX=true; +if((bV==='date'||bV==='any')&& +(!(aa.weekday===(void 0))||!(aa.year===(void 0))|| +!(aa.month===(void 0))||!(aa.day===(void 0)))){ +bX=false; +} +if((bV==='time'||bV==='any')&& +(!(aa.hour===(void 0))||!(aa.minute===(void 0))|| +!(aa.second===(void 0)))){ +bX=false; +} +if(bX&&(bW==='date'||bW==='all')){ +r(aa,'year',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +r(aa,'month',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +r(aa,'day',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +} +if(bX&&(bW==='time'||bW==='all')){ +r(aa,'hour',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +r(aa,'minute',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +r(aa,'second',{value:'numeric', +writable:true, +enumerable:true, +configurable:true}); +} +return aa; +} +function initializeDateTimeFormat(bY,Z,aa){ +if(%IsInitializedIntlObject(bY)){ +throw o(132,"DateTimeFormat"); +} +if((aa===(void 0))){ +aa={}; +} +var ag=resolveLocale('dateformat',Z,aa); +aa=toDateTimeOptions(aa,'any','date'); +var aj=getGetOption(aa,'dateformat'); +var ab=aj('formatMatcher','string', +['basic','best fit'],'best fit'); +var bR=toLDMLString(aa); +var bZ=canonicalizeTimeZoneID(aa.timeZone); +var br={}; +var at=parseExtension(ag.extension); +var ca={ +'ca':{'property':(void 0),'type':'string'}, +'nu':{'property':(void 0),'type':'string'} +}; +var ar=setOptions(aa,at,ca, +aj,br); +var bw=ag.locale+ar; +var ap=q({},{ +calendar:{writable:true}, +day:{writable:true}, +era:{writable:true}, +hour12:{writable:true}, +hour:{writable:true}, +locale:{writable:true}, +minute:{writable:true}, +month:{writable:true}, +numberingSystem:{writable:true}, +[s]:{writable:true}, +pattern:bD, +requestedLocale:{value:bw,writable:true}, +second:{writable:true}, +timeZone:{writable:true}, +timeZoneName:{writable:true}, +tz:{value:bZ,writable:true}, +weekday:{writable:true}, +year:{writable:true} +}); +var bO=%CreateDateTimeFormat( +bw,{skeleton:bR,timeZone:bZ},ap); +if(ap.timeZone==="Etc/Unknown"){ +throw n(192,bZ); +} +%MarkAsInitializedIntlObjectOfType(bY,'dateformat',bO); +bY[u]=ap; +r(bY,'resolved',bp); +return bY; +} +%AddNamedProperty(D,'DateTimeFormat',function(){ +var Z=%_Arguments(0); +var aa=%_Arguments(1); +if(!this||this===D){ +return new D.DateTimeFormat(Z,aa); +} +return initializeDateTimeFormat((%_ToObject(this)),Z,aa); +}, +2 +); +%AddNamedProperty(D.DateTimeFormat.prototype,'resolvedOptions',function(){ +if(!(new.target===(void 0))){ +throw o(87); +} +if(!%IsInitializedIntlObjectOfType(this,'dateformat')){ +throw o(133,"DateTimeFormat"); +} +var cb={ +'gregorian':'gregory', +'japanese':'japanese', +'buddhist':'buddhist', +'roc':'roc', +'persian':'persian', +'islamic-civil':'islamicc', +'islamic':'islamic', +'hebrew':'hebrew', +'chinese':'chinese', +'indian':'indian', +'coptic':'coptic', +'ethiopic':'ethiopic', +'ethiopic-amete-alem':'ethioaa' +}; +var bP=this; +var cc=fromLDMLString(bP[u][s]); +var cd=cb[bP[u].calendar]; +if((cd===(void 0))){ +cd=bP[u].calendar; +} +var ag=getOptimalLanguageTag(bP[u].requestedLocale, +bP[u].locale); +var aN={ +locale:ag, +numberingSystem:bP[u].numberingSystem, +calendar:cd, +timeZone:bP[u].timeZone +}; +addWECPropertyIfDefined(aN,'timeZoneName',cc.timeZoneName); +addWECPropertyIfDefined(aN,'era',cc.era); +addWECPropertyIfDefined(aN,'year',cc.year); +addWECPropertyIfDefined(aN,'month',cc.month); +addWECPropertyIfDefined(aN,'day',cc.day); +addWECPropertyIfDefined(aN,'weekday',cc.weekday); +addWECPropertyIfDefined(aN,'hour12',cc.hour12); +addWECPropertyIfDefined(aN,'hour',cc.hour); +addWECPropertyIfDefined(aN,'minute',cc.minute); +addWECPropertyIfDefined(aN,'second',cc.second); +return aN; +}, +2 +); +%FunctionSetName(D.DateTimeFormat.prototype.resolvedOptions, +'resolvedOptions'); +%FunctionRemovePrototype(D.DateTimeFormat.prototype.resolvedOptions); +%SetNativeFlag(D.DateTimeFormat.prototype.resolvedOptions); +%AddNamedProperty(D.DateTimeFormat,'supportedLocalesOf',function(Z){ +if(!(new.target===(void 0))){ +throw o(87); +} +return supportedLocalesOf('dateformat',Z,%_Arguments(1)); +}, +2 +); +%FunctionSetName(D.DateTimeFormat.supportedLocalesOf,'supportedLocalesOf'); +%FunctionRemovePrototype(D.DateTimeFormat.supportedLocalesOf); +%SetNativeFlag(D.DateTimeFormat.supportedLocalesOf); +function formatDate(bO,ce){ +var cf; +if((ce===(void 0))){ +cf=%DateCurrentTime(); +}else{ +cf=(%_ToNumber(ce)); +} +if(!f(cf))throw n(161); +return %InternalDateFormat(%GetImplFromInitializedIntlObject(bO), +new i(cf)); +} +function parseDate(bO,ao){ +return %InternalDateParse(%GetImplFromInitializedIntlObject(bO), +l(ao)); +} +addBoundMethod(D.DateTimeFormat,'format',formatDate,0); +addBoundMethod(D.DateTimeFormat,'v8Parse',parseDate,1); +function canonicalizeTimeZoneID(cg){ +if((cg===(void 0))){ +return cg; +} +var ch=%StringToUpperCase(cg); +if(ch==='UTC'||ch==='GMT'|| +ch==='ETC/UTC'||ch==='ETC/GMT'){ +return'UTC'; +} +var aM=%_Call(x,cg,GetTimezoneNameCheckRE()); +if((aM===null))throw n(162,cg); +var aN=toTitleCaseTimezoneLocation(aM[1])+'/'+ +toTitleCaseTimezoneLocation(aM[2]); +if(!(aM[3]===(void 0))&&3%JSProxyRevoke(h)}; +} +function ProxyEnumerate(i,g,f){ +var j=%_Call(i,g,f); +if(!(%_IsJSReceiver(j))){ +throw d(99); +} +var k=[]; +for(var l=j.next();!l.done;l=j.next()){ +var m=l.value; +if(!(typeof(m)==='string')){ +throw d(100); +} +k.push(m); +} +return k; +} +b.InstallFunctions(c,2,[ +"revocable",ProxyCreateRevocable +]); +%InstallToContext([ +"proxy_enumerate",ProxyEnumerate, +]); +}) + +$generator +(function(a,b){ +"use strict"; +%CheckIsBootstrapping(); +var c=b.ImportNow("GeneratorFunctionPrototype"); +var d=b.ImportNow("GeneratorFunction"); +var e=a.Function; +var f; +var g=b.ImportNow("to_string_tag_symbol"); +b.Import(function(h){ +f=h.MakeTypeError; +}); +function GeneratorObjectNext(i){ +if(!(%_ClassOf(this)==='Generator')){ +throw f(42, +'[Generator].prototype.next',this); +} +var j=%GeneratorGetContinuation(this); +if(j>0){ +if(%_DebugIsActive()!=0)%DebugPrepareStepInIfStepping(this); +try{ +return %_GeneratorNext(this,i); +}catch(e){ +%GeneratorClose(this); +throw e; +} +}else if(j==0){ +return{value:void 0,done:true}; +}else{ +throw f(40); +} +} +function GeneratorObjectThrow(k){ +if(!(%_ClassOf(this)==='Generator')){ +throw f(42, +'[Generator].prototype.throw',this); +} +var j=%GeneratorGetContinuation(this); +if(j>0){ +try{ +return %_GeneratorThrow(this,k); +}catch(e){ +%GeneratorClose(this); +throw e; +} +}else if(j==0){ +throw k; +}else{ +throw f(40); +} +} +%NeverOptimizeFunction(GeneratorObjectNext); +%NeverOptimizeFunction(GeneratorObjectThrow); +var l=c.prototype; +b.InstallFunctions(l, +2, +["next",GeneratorObjectNext, +"throw",GeneratorObjectThrow]); +%AddNamedProperty(l,"constructor", +c,2|1); +%AddNamedProperty(l, +g,"Generator",2|1); +%InternalSetPrototype(c,e.prototype); +%AddNamedProperty(c, +g,"GeneratorFunction",2|1); +%AddNamedProperty(c,"constructor", +d,2|1); +%InternalSetPrototype(d,e); +}) + +=%_TypedArrayGetLength(i)){ +return(void 0); +} +k=(%_ToNumber(k)); +l=(%_ToNumber(l)); +return %_AtomicsCompareExchange(i,j,k,l); +} +function AtomicsLoadJS(i,j){ +CheckSharedIntegerTypedArray(i); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(i)){ +return(void 0); +} +return %_AtomicsLoad(i,j); +} +function AtomicsStoreJS(i,j,m){ +CheckSharedIntegerTypedArray(i); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(i)){ +return(void 0); +} +m=(%_ToNumber(m)); +return %_AtomicsStore(i,j,m); +} +function AtomicsAddJS(h,j,m){ +CheckSharedIntegerTypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +m=(%_ToNumber(m)); +return %_AtomicsAdd(h,j,m); +} +function AtomicsSubJS(h,j,m){ +CheckSharedIntegerTypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +m=(%_ToNumber(m)); +return %_AtomicsSub(h,j,m); +} +function AtomicsAndJS(h,j,m){ +CheckSharedIntegerTypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +m=(%_ToNumber(m)); +return %_AtomicsAnd(h,j,m); +} +function AtomicsOrJS(h,j,m){ +CheckSharedIntegerTypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +m=(%_ToNumber(m)); +return %_AtomicsOr(h,j,m); +} +function AtomicsXorJS(h,j,m){ +CheckSharedIntegerTypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +m=(%_ToNumber(m)); +return %_AtomicsXor(h,j,m); +} +function AtomicsExchangeJS(h,j,m){ +CheckSharedIntegerTypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +m=(%_ToNumber(m)); +return %_AtomicsExchange(h,j,m); +} +function AtomicsIsLockFreeJS(n){ +return %_AtomicsIsLockFree(n); +} +function AtomicsFutexWaitJS(h,j,m,o){ +CheckSharedInteger32TypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +if((o===(void 0))){ +o=(1/0); +}else{ +o=(%_ToNumber(o)); +if((!%_IsSmi(%IS_VAR(o))&&!(o==o))){ +o=(1/0); +}else{ +o=e(0,o); +} +} +return %AtomicsFutexWait(h,j,m,o); +} +function AtomicsFutexWakeJS(h,j,p){ +CheckSharedInteger32TypedArray(h); +j=(%_ToInteger(j)); +if(j<0||j>=%_TypedArrayGetLength(h)){ +return(void 0); +} +p=e(0,(%_ToInteger(p))); +return %AtomicsFutexWake(h,j,p); +} +function AtomicsFutexWakeOrRequeueJS(h,q,p,m,r){ +CheckSharedInteger32TypedArray(h); +q=(%_ToInteger(q)); +p=e(0,(%_ToInteger(p))); +m=((m)|0); +r=(%_ToInteger(r)); +if(q<0||q>=%_TypedArrayGetLength(h)|| +r<0||r>=%_TypedArrayGetLength(h)){ +return(void 0); +} +return %AtomicsFutexWakeOrRequeue(h,q,p,m,r); +} +function AtomicsConstructor(){} +var s=new AtomicsConstructor(); +%InternalSetPrototype(s,c.prototype); +%AddNamedProperty(a,"Atomics",s,2); +%FunctionSetInstanceClassName(AtomicsConstructor,'Atomics'); +%AddNamedProperty(s,f,"Atomics",1|2); +b.InstallConstants(s,[ +"OK",0, +"NOTEQUAL",-1, +"TIMEDOUT",-2, +]); +b.InstallFunctions(s,2,[ +"compareExchange",AtomicsCompareExchangeJS, +"load",AtomicsLoadJS, +"store",AtomicsStoreJS, +"add",AtomicsAddJS, +"sub",AtomicsSubJS, +"and",AtomicsAndJS, +"or",AtomicsOrJS, +"xor",AtomicsXorJS, +"exchange",AtomicsExchangeJS, +"isLockFree",AtomicsIsLockFreeJS, +"futexWait",AtomicsFutexWaitJS, +"futexWake",AtomicsFutexWakeJS, +"futexWakeOrRequeue",AtomicsFutexWakeOrRequeueJS, +]); +}) + +8harmony-regexp% +(function(a,b){ +'use strict'; +%CheckIsBootstrapping(); +var c=a.RegExp; +var d=c.prototype; +var e; +var f=b.ImportNow("regexp_flags_symbol"); +b.Import(function(g){ +e=g.MakeTypeError; +}); +function RegExpGetFlags(){ +if(!(%_IsJSReceiver(this))){ +throw e( +130,"RegExp.prototype.flags",(%_ToString(this))); +} +var h=''; +if(this.global)h+='g'; +if(this.ignoreCase)h+='i'; +if(this.multiline)h+='m'; +if(this.unicode)h+='u'; +if(this.sticky)h+='y'; +return h; +} +function RegExpGetSticky(){ +if(!(%_IsRegExp(this))){ +if(this===d){ +%IncrementUseCounter(11); +return(void 0); +} +throw e(131,"RegExp.prototype.sticky"); +} +return!!(%_RegExpFlags(this)&8); +} +%FunctionSetName(RegExpGetSticky,"RegExp.prototype.sticky"); +%SetNativeFlag(RegExpGetSticky); +b.InstallGetter(c.prototype,'flags',RegExpGetFlags); +b.InstallGetter(c.prototype,'sticky',RegExpGetSticky); +}) + + + `${name} must be a function or undefined`; + class ReadableStream { + constructor() { + const underlyingSource = arguments[0] === undefined ? {} : arguments[0]; + const strategy = arguments[1] === undefined ? {} : arguments[1]; + const size = strategy.size; + let highWaterMark = strategy.highWaterMark; + if (highWaterMark === undefined) { + highWaterMark = 1; + } + const normalizedStrategy = + ValidateAndNormalizeQueuingStrategy(size, highWaterMark); + this[readableStreamUnderlyingSource] = underlyingSource; + this[readableStreamQueue] = new v8.InternalPackedArray(); + this[readableStreamQueueSize] = 0; + this[readableStreamState] = STATE_READABLE; + this[readableStreamBits] = 0b0; + this[readableStreamReader] = undefined; + this[readableStreamStoredError] = undefined; + this[readableStreamStrategySize] = normalizedStrategy.size; + this[readableStreamStrategyHWM] = normalizedStrategy.highWaterMark; + const controller = new ReadableStreamController(this); + this[readableStreamController] = controller; + const startResult = CallOrNoop( + underlyingSource, 'start', controller, 'underlyingSource.start'); + thenPromise(Promise_resolve(startResult), + () => { + this[readableStreamBits] |= STARTED; + RequestReadableStreamPull(this); + }, + r => { + if (this[readableStreamState] === STATE_READABLE) { + return ErrorReadableStream(this, r); + } + }); + } + get locked() { + if (IsReadableStream(this) === false) { + throw new TypeError(errIllegalInvocation); + } + return IsReadableStreamLocked(this); + } + cancel(reason) { + if (IsReadableStream(this) === false) { + return Promise_reject(new TypeError(errIllegalInvocation)); + } + if (IsReadableStreamLocked(this) === true) { + return Promise_reject(new TypeError(errCancelLockedStream)); + } + return CancelReadableStream(this, reason); + } + getReader() { + if (IsReadableStream(this) === false) { + throw new TypeError(errIllegalInvocation); + } + return AcquireReadableStreamReader(this); + } + tee() { + if (IsReadableStream(this) === false) { + throw new TypeError(errIllegalInvocation); + } + return TeeReadableStream(this); + } + } + class ReadableStreamController { + constructor(stream) { + if (IsReadableStream(stream) === false) { + throw new TypeError(errIllegalConstructor); + } + if (stream[readableStreamController] !== undefined) { + throw new TypeError(errIllegalConstructor); + } + this[readableStreamControllerControlledReadableStream] = stream; + } + get desiredSize() { + if (IsReadableStreamController(this) === false) { + throw new TypeError(errIllegalInvocation); + } + return GetReadableStreamDesiredSize( + this[readableStreamControllerControlledReadableStream]); + } + close() { + if (IsReadableStreamController(this) === false) { + throw new TypeError(errIllegalInvocation); + } + const stream = this[readableStreamControllerControlledReadableStream]; + if (stream[readableStreamBits] & CLOSE_REQUESTED) { + throw new TypeError(errCloseCloseRequestedStream); + } + if (stream[readableStreamState] === STATE_ERRORED) { + throw new TypeError(errCloseErroredStream); + } + return CloseReadableStream(stream); + } + enqueue(chunk) { + if (IsReadableStreamController(this) === false) { + throw new TypeError(errIllegalInvocation); + } + const stream = this[readableStreamControllerControlledReadableStream]; + if (stream[readableStreamState] === STATE_ERRORED) { + throw stream[readableStreamStoredError]; + } + if (stream[readableStreamBits] & CLOSE_REQUESTED) { + throw new TypeError(errEnqueueInCloseRequestedStream); + } + return EnqueueInReadableStream(stream, chunk); + } + error(e) { + if (IsReadableStreamController(this) === false) { + throw new TypeError(errIllegalInvocation); + } + const stream = this[readableStreamControllerControlledReadableStream]; + const state = stream[readableStreamState]; + if (state !== STATE_READABLE) { + if (state === STATE_ERRORED) { + throw new TypeError(errErrorErroredStream); + } + if (state === STATE_CLOSED) { + throw new TypeError(errErrorClosedStream); + } + } + return ErrorReadableStream(stream, e); + } + } + class ReadableStreamReader { + constructor(stream) { + if (IsReadableStream(stream) === false) { + throw new TypeError(errReaderConstructorBadArgument); + } + if (IsReadableStreamLocked(stream) === true) { + throw new TypeError(errReaderConstructorStreamAlreadyLocked); + } + this[readableStreamReaderOwnerReadableStream] = stream; + stream[readableStreamReader] = this; + this[readableStreamReaderReadRequests] = new v8.InternalPackedArray(); + switch (stream[readableStreamState]) { + case STATE_READABLE: + this[readableStreamReaderClosedPromise] = v8.createPromise(); + break; + case STATE_CLOSED: + this[readableStreamReaderClosedPromise] = Promise_resolve(undefined); + break; + case STATE_ERRORED: + this[readableStreamReaderClosedPromise] = + Promise_reject(stream[readableStreamStoredError]); + break; + } + } + get closed() { + if (IsReadableStreamReader(this) === false) { + return Promise_reject(new TypeError(errIllegalInvocation)); + } + return this[readableStreamReaderClosedPromise]; + } + cancel(reason) { + if (IsReadableStreamReader(this) === false) { + return Promise_reject(new TypeError(errIllegalInvocation)); + } + const stream = this[readableStreamReaderOwnerReadableStream]; + if (stream === undefined) { + return Promise_reject(new TypeError(errCancelReleasedReader)); + } + return CancelReadableStream(stream, reason); + } + read() { + if (IsReadableStreamReader(this) === false) { + return Promise_reject(new TypeError(errIllegalInvocation)); + } + if (this[readableStreamReaderOwnerReadableStream] === undefined) { + return Promise_reject(new TypeError(errReadReleasedReader)); + } + return ReadFromReadableStreamReader(this); + } + releaseLock() { + if (IsReadableStreamReader(this) === false) { + throw new TypeError(errIllegalInvocation); + } + const stream = this[readableStreamReaderOwnerReadableStream]; + if (stream === undefined) { + return undefined; + } + if (this[readableStreamReaderReadRequests].length > 0) { + throw new TypeError(errReleaseReaderWithPendingRead); + } + if (stream[readableStreamState] === STATE_READABLE) { + v8.rejectPromise(this[readableStreamReaderClosedPromise], + new TypeError(errReleasedReaderClosedPromise)); + } else { + this[readableStreamReaderClosedPromise] = Promise_reject(new TypeError( + errReleasedReaderClosedPromise)); + } + this[readableStreamReaderOwnerReadableStream][readableStreamReader] = + undefined; + this[readableStreamReaderOwnerReadableStream] = undefined; + } + } + function AcquireReadableStreamReader(stream) { + return new ReadableStreamReader(stream); + } + function CancelReadableStream(stream, reason) { + stream[readableStreamBits] |= DISTURBED; + const state = stream[readableStreamState]; + if (state === STATE_CLOSED) { + return Promise_resolve(undefined); + } + if (state === STATE_ERRORED) { + return Promise_reject(stream[readableStreamStoredError]); + } + stream[readableStreamQueue] = new v8.InternalPackedArray(); + FinishClosingReadableStream(stream); + const underlyingSource = stream[readableStreamUnderlyingSource]; + const sourceCancelPromise = PromiseCallOrNoop( + underlyingSource, 'cancel', reason, 'underlyingSource.cancel'); + return thenPromise(sourceCancelPromise, () => undefined); + } + function CloseReadableStream(stream) { + if (stream[readableStreamState] === STATE_CLOSED) { + return undefined; + } + stream[readableStreamBits] |= CLOSE_REQUESTED; + if (stream[readableStreamQueue].length === 0) { + return FinishClosingReadableStream(stream); + } + } + function EnqueueInReadableStream(stream, chunk) { + if (stream[readableStreamState] === STATE_CLOSED) { + return undefined; + } + if (IsReadableStreamLocked(stream) === true && + stream[readableStreamReader][readableStreamReaderReadRequests].length > + 0) { + const readRequest = + stream[readableStreamReader][readableStreamReaderReadRequests] + .shift(); + v8.resolvePromise(readRequest, CreateIterResultObject(chunk, false)); + } else { + let chunkSize = 1; + const strategySize = stream[readableStreamStrategySize]; + if (strategySize !== undefined) { + try { + chunkSize = strategySize(chunk); + } catch (chunkSizeE) { + if (stream[readableStreamState] === STATE_READABLE) { + ErrorReadableStream(stream, chunkSizeE); + } + throw chunkSizeE; + } + } + try { + EnqueueValueWithSize(stream, chunk, chunkSize); + } catch (enqueueE) { + if (stream[readableStreamState] === STATE_READABLE) { + ErrorReadableStream(stream, enqueueE); + } + throw enqueueE; + } + } + RequestReadableStreamPull(stream); + } + function ErrorReadableStream(stream, e) { + stream[readableStreamQueue] = new v8.InternalPackedArray(); + stream[readableStreamStoredError] = e; + stream[readableStreamState] = STATE_ERRORED; + const reader = stream[readableStreamReader]; + if (reader === undefined) { + return undefined; + } + const readRequests = reader[readableStreamReaderReadRequests]; + for (let i = 0; i < readRequests.length; ++i) { + v8.rejectPromise(readRequests[i], e); + } + reader[readableStreamReaderReadRequests] = new v8.InternalPackedArray(); + v8.rejectPromise(reader[readableStreamReaderClosedPromise], e); + } + function FinishClosingReadableStream(stream) { + stream[readableStreamState] = STATE_CLOSED; + const reader = stream[readableStreamReader]; + if (reader === undefined) { + return undefined; + } + const readRequests = reader[readableStreamReaderReadRequests]; + for (let i = 0; i < readRequests.length; ++i) { + v8.resolvePromise( + readRequests[i], CreateIterResultObject(undefined, true)); + } + reader[readableStreamReaderReadRequests] = new v8.InternalPackedArray(); + v8.resolvePromise(reader[readableStreamReaderClosedPromise], undefined); + } + function GetReadableStreamDesiredSize(stream) { + const queueSize = GetTotalQueueSize(stream); + return stream[readableStreamStrategyHWM] - queueSize; + } + function IsReadableStream(x) { + return hasOwnProperty(x, readableStreamUnderlyingSource); + } + function IsReadableStreamDisturbed(stream) { + return stream[readableStreamBits] & DISTURBED; + } + function IsReadableStreamLocked(stream) { + return stream[readableStreamReader] !== undefined; + } + function IsReadableStreamController(x) { + return hasOwnProperty(x, readableStreamControllerControlledReadableStream); + } + function IsReadableStreamReader(x) { + return hasOwnProperty(x, readableStreamReaderOwnerReadableStream); + } + function ReadFromReadableStreamReader(reader) { + const stream = reader[readableStreamReaderOwnerReadableStream]; + stream[readableStreamBits] |= DISTURBED; + if (stream[readableStreamState] === STATE_CLOSED) { + return Promise_resolve(CreateIterResultObject(undefined, true)); + } + if (stream[readableStreamState] === STATE_ERRORED) { + return Promise_reject(stream[readableStreamStoredError]); + } + const queue = stream[readableStreamQueue]; + if (queue.length > 0) { + const chunk = DequeueValue(stream); + if (stream[readableStreamBits] & CLOSE_REQUESTED && queue.length === 0) { + FinishClosingReadableStream(stream); + } else { + RequestReadableStreamPull(stream); + } + return Promise_resolve(CreateIterResultObject(chunk, false)); + } else { + const readRequest = v8.createPromise(); + reader[readableStreamReaderReadRequests].push(readRequest); + RequestReadableStreamPull(stream); + return readRequest; + } + } + function RequestReadableStreamPull(stream) { + const shouldPull = ShouldReadableStreamPull(stream); + if (shouldPull === false) { + return undefined; + } + if (stream[readableStreamBits] & PULLING) { + stream[readableStreamBits] |= PULL_AGAIN; + return undefined; + } + stream[readableStreamBits] |= PULLING; + const underlyingSource = stream[readableStreamUnderlyingSource]; + const controller = stream[readableStreamController]; + const pullPromise = PromiseCallOrNoop( + underlyingSource, 'pull', controller, 'underlyingSource.pull'); + thenPromise(pullPromise, + () => { + stream[readableStreamBits] &= ~PULLING; + if (stream[readableStreamBits] & PULL_AGAIN) { + stream[readableStreamBits] &= ~PULL_AGAIN; + return RequestReadableStreamPull(stream); + } + }, + e => { + if (stream[readableStreamState] === STATE_READABLE) { + return ErrorReadableStream(stream, e); + } + }); + } + function ShouldReadableStreamPull(stream) { + const state = stream[readableStreamState]; + if (state === STATE_CLOSED || state === STATE_ERRORED) { + return false; + } + if (stream[readableStreamBits] & CLOSE_REQUESTED) { + return false; + } + if (!(stream[readableStreamBits] & STARTED)) { + return false; + } + if (IsReadableStreamLocked(stream) === true) { + const reader = stream[readableStreamReader]; + const readRequests = reader[readableStreamReaderReadRequests]; + if (readRequests.length > 0) { + return true; + } + } + const desiredSize = GetReadableStreamDesiredSize(stream); + if (desiredSize > 0) { + return true; + } + return false; + } + function TeeReadableStream(stream) { + const reader = AcquireReadableStreamReader(stream); + let closedOrErrored = false; + let canceled1 = false; + let canceled2 = false; + let reason1; + let reason2; + let promise = v8.createPromise(); + const branch1 = new ReadableStream({pull, cancel: cancel1}); + const branch2 = new ReadableStream({pull, cancel: cancel2}); + thenPromise( + reader[readableStreamReaderClosedPromise], undefined, function(r) { + if (closedOrErrored === true) { + return; + } + ErrorReadableStream(branch1, r); + ErrorReadableStream(branch2, r); + closedOrErrored = true; + }); + return [branch1, branch2]; + function pull() { + return thenPromise( + ReadFromReadableStreamReader(reader), function(result) { + const value = result.value; + const done = result.done; + if (done === true && closedOrErrored === false) { + CloseReadableStream(branch1); + CloseReadableStream(branch2); + closedOrErrored = true; + } + if (closedOrErrored === true) { + return; + } + if (canceled1 === false) { + EnqueueInReadableStream(branch1, value); + } + if (canceled2 === false) { + EnqueueInReadableStream(branch2, value); + } + }); + } + function cancel1(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2 === true) { + const compositeReason = [reason1, reason2]; + const cancelResult = CancelReadableStream(stream, compositeReason); + v8.resolvePromise(promise, cancelResult); + } + return promise; + } + function cancel2(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1 === true) { + const compositeReason = [reason1, reason2]; + const cancelResult = CancelReadableStream(stream, compositeReason); + v8.resolvePromise(promise, cancelResult); + } + return promise; + } + } + function DequeueValue(stream) { + const result = stream[readableStreamQueue].shift(); + stream[readableStreamQueueSize] -= result.size; + return result.value; + } + function EnqueueValueWithSize(stream, value, size) { + size = Number(size); + if (Number_isNaN(size) || size === +Infinity || size < 0) { + throw new RangeError(errInvalidSize); + } + stream[readableStreamQueueSize] += size; + stream[readableStreamQueue].push({value, size}); + } + function GetTotalQueueSize(stream) { return stream[readableStreamQueueSize]; } + function ValidateAndNormalizeQueuingStrategy(size, highWaterMark) { + if (size !== undefined && typeof size !== 'function') { + throw new TypeError(errSizeNotAFunction); + } + highWaterMark = Number(highWaterMark); + if (Number_isNaN(highWaterMark)) { + throw new TypeError(errInvalidHWM); + } + if (highWaterMark < 0) { + throw new RangeError(errInvalidHWM); + } + return {size, highWaterMark}; + } + function CallOrNoop(O, P, arg, nameForError) { + const method = O[P]; + if (method === undefined) { + return undefined; + } + if (typeof method !== 'function') { + throw new TypeError(errTmplMustBeFunctionOrUndefined(nameForError)); + } + return callFunction(method, O, arg); + } + function PromiseCallOrNoop(O, P, arg, nameForError) { + let method; + try { + method = O[P]; + } catch (methodE) { + return Promise_reject(methodE); + } + if (method === undefined) { + return Promise_resolve(undefined); + } + if (typeof method !== 'function') { + return Promise_reject(errTmplMustBeFunctionOrUndefined(nameForError)); + } + try { + return Promise_resolve(callFunction(method, O, arg)); + } catch (e) { + return Promise_reject(e); + } + } + function CreateIterResultObject(value, done) { return {value, done}; } + defineProperty(global, 'ReadableStream', { + value: ReadableStream, + enumerable: false, + configurable: true, + writable: true + }); + binding.AcquireReadableStreamReader = AcquireReadableStreamReader; + binding.IsReadableStream = IsReadableStream; + binding.IsReadableStreamDisturbed = IsReadableStreamDisturbed; + binding.IsReadableStreamLocked = IsReadableStreamLocked; + binding.IsReadableStreamReader = IsReadableStreamReader; + binding.ReadFromReadableStreamReader = ReadFromReadableStreamReader; +}); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/nb.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/nb.lproj/locale.pak new file mode 100644 index 0000000..cc15267 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/nb.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/nl.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/nl.lproj/locale.pak new file mode 100644 index 0000000..9251327 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/nl.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pl.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pl.lproj/locale.pak new file mode 100644 index 0000000..32c7e27 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pl.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pt_BR.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pt_BR.lproj/locale.pak new file mode 100644 index 0000000..473cfe6 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pt_BR.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pt_PT.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pt_PT.lproj/locale.pak new file mode 100644 index 0000000..69e0119 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pt_PT.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ro.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ro.lproj/locale.pak new file mode 100644 index 0000000..b941701 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ro.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ru.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ru.lproj/locale.pak new file mode 100644 index 0000000..aa2b0d8 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ru.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sk.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sk.lproj/locale.pak new file mode 100644 index 0000000..a02d302 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sk.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sl.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sl.lproj/locale.pak new file mode 100644 index 0000000..d3b9dfa Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sl.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin new file mode 100644 index 0000000..b8b5ea0 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sr.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sr.lproj/locale.pak new file mode 100644 index 0000000..43e561f Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sr.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sv.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sv.lproj/locale.pak new file mode 100644 index 0000000..fff63da Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sv.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sw.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sw.lproj/locale.pak new file mode 100644 index 0000000..968fe5a Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/sw.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ta.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ta.lproj/locale.pak new file mode 100644 index 0000000..040dac7 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/ta.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/te.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/te.lproj/locale.pak new file mode 100644 index 0000000..7403eca Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/te.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/th.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/th.lproj/locale.pak new file mode 100644 index 0000000..0702c6b Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/th.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak new file mode 100644 index 0000000..914599f Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/tr.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak new file mode 100644 index 0000000..56fa2a5 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/uk.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak new file mode 100644 index 0000000..8d046af Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/vi.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/zh_CN.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/zh_CN.lproj/locale.pak new file mode 100644 index 0000000..eccd47f Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/zh_CN.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/zh_TW.lproj/locale.pak b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/zh_TW.lproj/locale.pak new file mode 100644 index 0000000..9bbd961 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/zh_TW.lproj/locale.pak differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/Current b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Electron Framework.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/Info.plist new file mode 100644 index 0000000..b103677 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/Info.plist @@ -0,0 +1,30 @@ + + + + + BuildMachineOSBuild + 14B25 + CFBundleDisplayName + Fastlane Helper EH + CFBundleExecutable + Fastlane Helper EH + CFBundleIdentifier + com.electron.fastlane.helper.EH + CFBundleName + Fastlane Helper EH + CFBundlePackageType + APPL + DTSDKBuild + 14D125 + DTSDKName + macosx10.10 + DTXcode + 0640 + DTXcodeBuild + 6E35b + LSUIElement + + NSSupportsAutomaticGraphicsSwitching + + + \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/MacOS/Fastlane Helper EH b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/MacOS/Fastlane Helper EH new file mode 100755 index 0000000..cbe94f9 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/MacOS/Fastlane Helper EH differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/PkgInfo b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper EH.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/Info.plist new file mode 100644 index 0000000..eb35c17 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/Info.plist @@ -0,0 +1,30 @@ + + + + + BuildMachineOSBuild + 14B25 + CFBundleDisplayName + Fastlane Helper NP + CFBundleExecutable + Fastlane Helper NP + CFBundleIdentifier + com.electron.fastlane.helper.NP + CFBundleName + Fastlane Helper NP + CFBundlePackageType + APPL + DTSDKBuild + 14D125 + DTSDKName + macosx10.10 + DTXcode + 0640 + DTXcodeBuild + 6E35b + LSUIElement + + NSSupportsAutomaticGraphicsSwitching + + + \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/MacOS/Fastlane Helper NP b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/MacOS/Fastlane Helper NP new file mode 100755 index 0000000..4aec5d0 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/MacOS/Fastlane Helper NP differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/PkgInfo b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper NP.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/Info.plist new file mode 100644 index 0000000..1b47a8e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/Info.plist @@ -0,0 +1,30 @@ + + + + + BuildMachineOSBuild + 14B25 + CFBundleIdentifier + com.electron.fastlane.helper + CFBundleName + Fastlane + CFBundlePackageType + APPL + DTSDKBuild + 14D125 + DTSDKName + macosx10.10 + DTXcode + 0640 + DTXcodeBuild + 6E35b + LSUIElement + + NSSupportsAutomaticGraphicsSwitching + + CFBundleDisplayName + Fastlane Helper + CFBundleExecutable + Fastlane Helper + + \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/MacOS/Fastlane Helper b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/MacOS/Fastlane Helper new file mode 100755 index 0000000..cbe94f9 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/MacOS/Fastlane Helper differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/PkgInfo b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Fastlane Helper.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Headers b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Mantle b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Mantle new file mode 120000 index 0000000..b3583be --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Mantle @@ -0,0 +1 @@ +Versions/Current/Mantle \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Modules b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Resources b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLJSONAdapter.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLJSONAdapter.h new file mode 100644 index 0000000..368c5ab --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLJSONAdapter.h @@ -0,0 +1,172 @@ +// +// MTLJSONAdapter.h +// Mantle +// +// Created by Justin Spahr-Summers on 2013-02-12. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +@class MTLModel; + +// A MTLModel object that supports being parsed from and serialized to JSON. +@protocol MTLJSONSerializing +@required + +// Specifies how to map property keys to different key paths in JSON. +// +// Subclasses overriding this method should combine their values with those of +// `super`. +// +// Any property keys not present in the dictionary are assumed to match the JSON +// key that should be used. Any keys associated with NSNull will not participate +// in JSON serialization. +// +// Returns a dictionary mapping property keys to JSON key paths (as strings) or +// NSNull values. ++ (NSDictionary *)JSONKeyPathsByPropertyKey; + +@optional + +// Specifies how to convert a JSON value to the given property key. If +// reversible, the transformer will also be used to convert the property value +// back to JSON. +// +// If the receiver implements a `+JSONTransformer` method, MTLJSONAdapter +// will use the result of that method instead. +// +// Returns a value transformer, or nil if no transformation should be performed. ++ (NSValueTransformer *)JSONTransformerForKey:(NSString *)key; + +// Overridden to parse the receiver as a different class, based on information +// in the provided dictionary. +// +// This is mostly useful for class clusters, where the abstract base class would +// be passed into -[MTLJSONAdapter initWithJSONDictionary:modelClass:], but +// a subclass should be instantiated instead. +// +// JSONDictionary - The JSON dictionary that will be parsed. +// +// Returns the class that should be parsed (which may be the receiver), or nil +// to abort parsing (e.g., if the data is invalid). ++ (Class)classForParsingJSONDictionary:(NSDictionary *)JSONDictionary; + +@end + +// The domain for errors originating from MTLJSONAdapter. +extern NSString * const MTLJSONAdapterErrorDomain; + +// +classForParsingJSONDictionary: returned nil for the given dictionary. +extern const NSInteger MTLJSONAdapterErrorNoClassFound; + +// The provided JSONDictionary is not valid. +extern const NSInteger MTLJSONAdapterErrorInvalidJSONDictionary; + +// The model's implementation of +JSONKeyPathsByPropertyKey included a key which +// does not actually exist in +propertyKeys. +extern const NSInteger MTLJSONAdapterErrorInvalidJSONMapping; + +// Converts a MTLModel object to and from a JSON dictionary. +@interface MTLJSONAdapter : NSObject + +// The model object that the receiver was initialized with, or that the receiver +// parsed from a JSON dictionary. +@property (nonatomic, strong, readonly) MTLModel *model; + +// Attempts to parse a JSON dictionary into a model object. +// +// modelClass - The MTLModel subclass to attempt to parse from the JSON. +// This class must conform to . This +// argument must not be nil. +// JSONDictionary - A dictionary representing JSON data. This should match the +// format returned by NSJSONSerialization. If this argument is +// nil, the method returns nil. +// error - If not NULL, this may be set to an error that occurs during +// parsing or initializing an instance of `modelClass`. +// +// Returns an instance of `modelClass` upon success, or nil if a parsing error +// occurred. ++ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)error; + +// Attempts to parse an array of JSON dictionary objects into a model objects +// of a specific class. +// +// modelClass - The MTLModel subclass to attempt to parse from the JSON. This +// class must conform to . This argument must +// not be nil. +// JSONArray - A array of dictionaries representing JSON data. This should +// match the format returned by NSJSONSerialization. If this +// argument is nil, the method returns nil. +// error - If not NULL, this may be set to an error that occurs during +// parsing or initializing an any of the instances of +// `modelClass`. +// +// Returns an array of `modelClass` instances upon success, or nil if a parsing +// error occurred. ++ (NSArray *)modelsOfClass:(Class)modelClass fromJSONArray:(NSArray *)JSONArray error:(NSError **)error; + +// Converts a model into a JSON representation. +// +// model - The model to use for JSON serialization. This argument must not be +// nil. +// +// Returns a JSON dictionary, or nil if a serialization error occurred. ++ (NSDictionary *)JSONDictionaryFromModel:(MTLModel *)model; + +// Converts a array of models into a JSON representation. +// +// models - The array of models to use for JSON serialization. This argument +// must not be nil. +// +// Returns a JSON array, or nil if a serialization error occurred for any +// model. ++ (NSArray *)JSONArrayFromModels:(NSArray *)models; + +// Initializes the receiver by attempting to parse a JSON dictionary into +// a model object. +// +// JSONDictionary - A dictionary representing JSON data. This should match the +// format returned by NSJSONSerialization. If this argument is +// nil, the method returns nil and an error with code +// MTLJSONAdapterErrorInvalidJSONDictionary. +// modelClass - The MTLModel subclass to attempt to parse from the JSON. +// This class must conform to . This +// argument must not be nil. +// error - If not NULL, this may be set to an error that occurs during +// parsing or initializing an instance of `modelClass`. +// +// Returns an initialized adapter upon success, or nil if a parsing error +// occurred. +- (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)modelClass error:(NSError **)error; + +// Initializes the receiver with an existing model. +// +// model - The model to use for JSON serialization. This argument must not be +// nil. +- (id)initWithModel:(MTLModel *)model; + +// Serializes the receiver's `model` into JSON. +// +// Returns a JSON dictionary, or nil if a serialization error occurred. +- (NSDictionary *)JSONDictionary; + +// Looks up the JSON key path in the model's +propertyKeys. +// +// Subclasses may override this method to customize the adapter's seralizing +// behavior. You should not call this method directly. +// +// key - The property key to retrieve the corresponding JSON key path for. This +// argument must not be nil. +// +// Returns a key path to use, or nil to omit the property from JSON. +- (NSString *)JSONKeyPathForPropertyKey:(NSString *)key; + +@end + +@interface MTLJSONAdapter (Deprecated) + ++ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary __attribute__((deprecated("Replaced by +modelOfClass:fromJSONDictionary:error:"))); +- (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)modelClass __attribute__((deprecated("Replaced by -initWithJSONDictionary:modelClass:error:"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLManagedObjectAdapter.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLManagedObjectAdapter.h new file mode 100644 index 0000000..11b2bcf --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLManagedObjectAdapter.h @@ -0,0 +1,215 @@ +// +// MTLManagedObjectAdapter.h +// Mantle +// +// Created by Justin Spahr-Summers on 2013-03-29. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +@class MTLModel; + +// A MTLModel object that supports being serialized to and from Core Data as an +// NSManagedObject. +@protocol MTLManagedObjectSerializing +@required + +// The name of the Core Data entity that the receiver serializes to and +// deserializes from. +// +// This method must not return nil. ++ (NSString *)managedObjectEntityName; + +// Specifies how to map property keys to different keys on the receiver's +// +managedObjectEntity. +// +// Entity attributes will be mapped to and from the receiver's properties using +// +entityAttributeTransformerForKey:. Entity relationships will be mapped to +// and from MTLModel objects using +relationshipModelClassesByPropertyKey. +// Fetched properties are not supported. +// +// Subclasses overriding this method should combine their values with those of +// `super`. +// +// Any property keys not present in the dictionary are assumed to match the +// entity key that should be used. Any keys associated with NSNull will not +// participate in managed object serialization. +// +// Returns a dictionary mapping property keys to entity keys (as strings) or +// NSNull values. ++ (NSDictionary *)managedObjectKeysByPropertyKey; + +@optional + +// Specifies a set of property keys used by the adapter to check for an already +// existing managed object when converting the MTLModel to its related +// NSManagedObject. +// +// The adapter will first map any keys provided by this method to the correct +// keys in managedObjectKeysByPropertyKey. +// +// The adapter will then perform a fetch request in the provided context for a +// managed object that matches the MTLModel's managedObjectEntityName and has +// equal values set for the property keys on the MTLModel. +// +// The managed object returned by the fetch request will then be set with all +// values from the MTLModel that the managed object is being converted from. +// +// If a property value of our MTLModel is yet another MTLModel which needs to be +// converted to a managed object, the class for that MTLModel can also implement +// this method to perform its own uniqing. +// +// For example: +// 1. An MTLModel subclass has id_number = 10. +// 2. An NSManagedObject accessible to the adapter's context has idnumber = 10. +// 3. managedObjectKeysByPropertyKey returns @{@"id_number" : @"idnumber"} +// 4. propertyKeysForManagedObjectUniquing returns +// [NSSet setWithObject:@"id_number"]; +// 5. Then our fetch request may return this managed object (or another managed +// object with idnumber = 10). +// +// NOTE: If multiple managed objects follow the same uniquing criteria only one +// of them will be set with our MTLModel's values. ++ (NSSet *)propertyKeysForManagedObjectUniquing; + +// Specifies how to convert the given property key to a managed object +// attribute. If reversible, the transformer will also be used to convert the +// managed object attribute back to the property. +// +// If the receiver implements a `+EntityAttributeTransformer` method, +// MTLManagedObjectAdapter will use the result of that method instead. +// +// Returns a value transformer, or nil if no transformation should be performed. ++ (NSValueTransformer *)entityAttributeTransformerForKey:(NSString *)key; + +// Specifies the MTLModel subclasses that should be deserialized to the +// receiver's property keys when a property key corresponds to an entity +// relationship. +// +// In other words, the dictionary returned by this method is used to decode +// managed object relationships into MTLModels (or NSArrays or NSSets thereof) +// set on the receiver. +// +// If a property key is omitted from the returned dictionary, but present in +// +managedObjectKeysByPropertyKey, and the receiver's +managedObjectEntity has +// a relationship at the corresponding key, an exception will be thrown during +// deserialization. +// +// Subclasses overriding this method should combine their values with those of +// `super`. +// +// Returns a dictionary mapping property keys to the Class objects that should +// be used. ++ (NSDictionary *)relationshipModelClassesByPropertyKey; + +// Overridden to deserialize a different class instead of the receiver, based on +// information in the provided object. +// +// This is mostly useful for class clusters, where the abstract base class would +// be passed into +[MTLManagedObjectAdapter +// modelOfClass:fromManagedObject:error:], but a subclass should be instantiated +// instead. +// +// managedObject - The object that will be deserialized. +// +// Returns the class that should be instantiated (which may be the receiver), or +// nil to abort parsing (e.g., if the data is invalid). ++ (Class)classForDeserializingManagedObject:(NSManagedObject *)managedObject; + +// Overriden when merging the value of the given key on the receiver with the +// value of the same key from the given `NSManagedObject` requires custom +// handling. +// +// By default, this method is not implemented, and precedence will be given to +// the value of the receiving model implicitly. +// +// When implemented, this method is called when an existing `NSManagedObject` +// is found for the receiving model, before updating the `NSManagedObject`'s +// properties. +// +// When implementing, you should use `+managedObjectKeysByPropertyKey` to map +// the given `key` to the appropriate `NSManagedObject` property. +- (void)mergeValueForKey:(NSString *)key fromManagedObject:(NSManagedObject *)managedObject; + +// Overriden when merging values on the receiver with the given +// `NSManagedObject` requires custom handling. +// +// By default, this method is not implemented, and precedence will be given to +// the values of the receiving model implicitly. +// +// When implemented, this method is called when an existing `NSManagedObject` +// is found for the receiving model, before updating the `NSManagedObject`'s +// properties. +// +// When implementing, you should use `+managedObjectKeysByPropertyKey` to map +// the given `key` to the appropriate `NSManagedObject` property. +// +// If you have also implemented `mergeValueForKey:fromManagedObject:` you have +// to make sure to call `mergeValueForKey:fromManagedObject:` from this method +// when appropriate. +- (void)mergeValuesForKeysFromManagedObject:(NSManagedObject *)managedObject; + +@end + +// The domain for errors originating from MTLManagedObjectAdapter. +extern NSString * const MTLManagedObjectAdapterErrorDomain; + +// +classForDeserializingManagedObject: returned nil for the given object. +extern const NSInteger MTLManagedObjectAdapterErrorNoClassFound; + +// An NSManagedObject failed to initialize. +extern const NSInteger MTLManagedObjectAdapterErrorInitializationFailed; + +// The managed object key specified by +managedObjectKeysByPropertyKey does not +// exist in the NSEntityDescription. +extern const NSInteger MTLManagedObjectAdapterErrorInvalidManagedObjectKey; + +// The managed object property specified has a type that isn't supported by +// MTLManagedObjectAdapter. +extern const NSInteger MTLManagedObjectAdapterErrorUnsupportedManagedObjectPropertyType; + +// The fetch request to find an existing managed object based on +// `+propertyKeysForManagedObjectUniquing` failed. +extern const NSInteger MTLManagedObjectAdapterErrorUniqueFetchRequestFailed; + +// A MTLModel property cannot be serialized to or deserialized from an +// NSManagedObject relationship. +// +// For a to-one relationship, this means that the property does not contain +// a MTLModel, or the MTLModel does not conform to . +// +// For a to-many relationship, this means that the property does not contain an +// NSArray or NSSet of MTLModel instances. +extern const NSInteger MTLManagedObjectAdapterErrorUnsupportedRelationshipClass; + +// The model's implementation of +managedObjectKeysByPropertyKey included a key +// which does not actually exist in +propertyKeys. +extern const NSInteger MTLManagedObjectAdapterErrorInvalidManagedObjectMapping; + +// Converts a MTLModel object to and from an NSManagedObject. +@interface MTLManagedObjectAdapter : NSObject + +// Attempts to deserialize an NSManagedObject into a MTLModel object. +// +// modelClass - The MTLModel subclass to return. This class must conform to +// . This argument must not be nil. +// managedObject - The managed object to deserialize. If this argument is nil, +// the method returns nil. +// error - If not NULL, this may be set to an error that occurs during +// deserialization or initializing an instance of `modelClass`. +// +// Returns an instance of `modelClass` upon success, or nil if an error +// occurred. ++ (id)modelOfClass:(Class)modelClass fromManagedObject:(NSManagedObject *)managedObject error:(NSError **)error; + +// Serializes a MTLModel into an NSManagedObject. +// +// model - The model object to serialize. This argument must not be nil. +// context - The context into which to insert the created managed object. This +// argument must not be nil. +// error - If not NULL, this may be set to an error that occurs during +// serialization or insertion. ++ (id)managedObjectFromModel:(MTLModel *)model insertingIntoContext:(NSManagedObjectContext *)context error:(NSError **)error; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLModel+NSCoding.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLModel+NSCoding.h new file mode 100644 index 0000000..94b8f7b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLModel+NSCoding.h @@ -0,0 +1,128 @@ +// +// MTLModel+NSCoding.h +// Mantle +// +// Created by Justin Spahr-Summers on 2013-02-12. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import "MTLModel.h" + +// Defines how a MTLModel property key should be encoded into an archive. +// +// MTLModelEncodingBehaviorExcluded - The property should never be encoded. +// MTLModelEncodingBehaviorUnconditional - The property should always be +// encoded. +// MTLModelEncodingBehaviorConditional - The object should be encoded only +// if unconditionally encoded elsewhere. +// This should only be used for object +// properties. +typedef enum : NSUInteger { + MTLModelEncodingBehaviorExcluded = 0, + MTLModelEncodingBehaviorUnconditional, + MTLModelEncodingBehaviorConditional, +} MTLModelEncodingBehavior; + +// Implements default archiving and unarchiving behaviors for MTLModel. +@interface MTLModel (NSCoding) + +// Initializes the receiver from an archive. +// +// This will decode the original +modelVersion of the archived object, then +// invoke -decodeValueForKey:withCoder:modelVersion: for each of the receiver's +// +propertyKeys. +// +// Returns an initialized model object, or nil if a decoding error occurred. +- (id)initWithCoder:(NSCoder *)coder; + +// Archives the receiver using the given coder. +// +// This will encode the receiver's +modelVersion, then the receiver's properties +// according to the behaviors specified in +encodingBehaviorsByPropertyKey. +- (void)encodeWithCoder:(NSCoder *)coder; + +// Determines how the +propertyKeys of the class are encoded into an archive. +// The values of this dictionary should be boxed MTLModelEncodingBehavior +// values. +// +// Any keys not present in the dictionary will be excluded from the archive. +// +// Subclasses overriding this method should combine their values with those of +// `super`. +// +// Returns a dictionary mapping the receiver's +propertyKeys to default encoding +// behaviors. If a property is an object with `weak` semantics, the default +// behavior is MTLModelEncodingBehaviorConditional; otherwise, the default is +// MTLModelEncodingBehaviorUnconditional. ++ (NSDictionary *)encodingBehaviorsByPropertyKey; + +// Determines the classes that are allowed to be decoded for each of the +// receiver's properties when using . The values of this +// dictionary should be NSArrays of Class objects. +// +// If any encodable keys (as determined by +encodingBehaviorsByPropertyKey) are +// not present in the dictionary, an exception will be thrown during secure +// encoding or decoding. +// +// Subclasses overriding this method should combine their values with those of +// `super`. +// +// Returns a dictionary mapping the receiver's encodable keys (as determined by +// +encodingBehaviorsByPropertyKey) to default allowed classes, based on the +// type that each property is declared as. If type of an encodable property +// cannot be determined (e.g., it is declared as `id`), it will be omitted from +// the dictionary, and subclasses must provide a valid value to prevent an +// exception being thrown during encoding/decoding. ++ (NSDictionary *)allowedSecureCodingClassesByPropertyKey; + +// Decodes the value of the given property key from an archive. +// +// By default, this method looks for a `-decodeWithCoder:modelVersion:` +// method on the receiver, and invokes it if found. +// +// If the custom method is not implemented and `coder` does not require secure +// coding, `-[NSCoder decodeObjectForKey:]` will be invoked with the given +// `key`. +// +// If the custom method is not implemented and `coder` requires secure coding, +// `-[NSCoder decodeObjectOfClasses:forKey:]` will be invoked with the +// information from +allowedSecureCodingClassesByPropertyKey and the given `key`. The +// receiver must conform to for this to work correctly. +// +// key - The property key to decode the value for. This argument cannot +// be nil. +// coder - The NSCoder representing the archive being decoded. This +// argument cannot be nil. +// modelVersion - The version of the original model object that was encoded. +// +// Returns the decoded and boxed value, or nil if the key was not present. +- (id)decodeValueForKey:(NSString *)key withCoder:(NSCoder *)coder modelVersion:(NSUInteger)modelVersion; + +// The version of this MTLModel subclass. +// +// This version number is saved in archives so that later model changes can be +// made backwards-compatible with old versions. +// +// Subclasses should override this method to return a higher version number +// whenever a breaking change is made to the model. +// +// Returns 0. ++ (NSUInteger)modelVersion; + +@end + +// This method must be overridden to support archives created by older versions +// of Mantle (before the `MTLModel+NSCoding` interface existed). +@interface MTLModel (OldArchiveSupport) + +// Converts an archived external representation to a dictionary suitable for +// passing to -initWithDictionary:. +// +// externalRepresentation - The decoded external representation of the receiver. +// fromVersion - The model version at the time the external +// representation was encoded. +// +// Returns nil by default, indicating that conversion failed. ++ (NSDictionary *)dictionaryValueFromArchivedExternalRepresentation:(NSDictionary *)externalRepresentation version:(NSUInteger)fromVersion; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLModel.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLModel.h new file mode 100644 index 0000000..65da40d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLModel.h @@ -0,0 +1,125 @@ +// +// MTLModel.h +// Mantle +// +// Created by Justin Spahr-Summers on 2012-09-11. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +// An abstract base class for model objects, using reflection to provide +// sensible default behaviors. +// +// The default implementations of , -hash, and -isEqual: make use of +// the +propertyKeys method. +@interface MTLModel : NSObject + +// Returns a new instance of the receiver initialized using +// -initWithDictionary:error:. ++ (instancetype)modelWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error; + +// Initializes the receiver with default values. +// +// This is the designated initializer for this class. +- (instancetype)init; + +// Initializes the receiver using key-value coding, setting the keys and values +// in the given dictionary. +// +// Subclass implementations may override this method, calling the super +// implementation, in order to perform further processing and initialization +// after deserialization. +// +// dictionaryValue - Property keys and values to set on the receiver. Any NSNull +// values will be converted to nil before being used. KVC +// validation methods will automatically be invoked for all of +// the properties given. If nil, this method is equivalent to +// -init. +// error - If not NULL, this may be set to any error that occurs +// (like a KVC validation error). +// +// Returns an initialized model object, or nil if validation failed. +- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error; + +// Returns the keys for all @property declarations, except for `readonly` +// properties without ivars, or properties on MTLModel itself. ++ (NSSet *)propertyKeys; + +// A dictionary representing the properties of the receiver. +// +// The default implementation combines the values corresponding to all +// +propertyKeys into a dictionary, with any nil values represented by NSNull. +// +// This property must never be nil. +@property (nonatomic, copy, readonly) NSDictionary *dictionaryValue; + +// Merges the value of the given key on the receiver with the value of the same +// key from the given model object, giving precedence to the other model object. +// +// By default, this method looks for a `-mergeFromModel:` method on the +// receiver, and invokes it if found. If not found, and `model` is not nil, the +// value for the given key is taken from `model`. +- (void)mergeValueForKey:(NSString *)key fromModel:(MTLModel *)model; + +// Merges the values of the given model object into the receiver, using +// -mergeValueForKey:fromModel: for each key in +propertyKeys. +// +// `model` must be an instance of the receiver's class or a subclass thereof. +- (void)mergeValuesForKeysFromModel:(MTLModel *)model; + +// Compares the receiver with another object for equality. +// +// The default implementation is equivalent to comparing both models' +// -dictionaryValue. +// +// Note that this may lead to infinite loops if the receiver holds a circular +// reference to another MTLModel and both use the default behavior. +// It is recommended to override -isEqual: in this scenario. +- (BOOL)isEqual:(id)object; + +// A string that describes the contents of the receiver. +// +// The default implementation is based on the receiver's class and its +// -dictionaryValue. +// +// Note that this may lead to infinite loops if the receiver holds a circular +// reference to another MTLModel and both use the default behavior. +// It is recommended to override -description in this scenario. +- (NSString *)description; + +@end + +// Implements validation logic for MTLModel. +@interface MTLModel (Validation) + +// Validates the model. +// +// The default implementation simply invokes -validateValue:forKey:error: with +// all +propertyKeys and their current value. If -validateValue:forKey:error: +// returns a new value, the property is set to that new value. +// +// error - If not NULL, this may be set to any error that occurs during +// validation +// +// Returns YES if the model is valid, or NO if the validation failed. +- (BOOL)validate:(NSError **)error; + +@end + +@interface MTLModel (Unavailable) + ++ (instancetype)modelWithDictionary:(NSDictionary *)dictionaryValue __attribute__((deprecated("Replaced by +modelWithDictionary:error:"))); +- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue __attribute__((deprecated("Replaced by -initWithDictionary:error:"))); + ++ (instancetype)modelWithExternalRepresentation:(NSDictionary *)externalRepresentation __attribute__((deprecated("Replaced by -[MTLJSONAdapter initWithJSONDictionary:modelClass:]"))); +- (instancetype)initWithExternalRepresentation:(NSDictionary *)externalRepresentation __attribute__((deprecated("Replaced by -[MTLJSONAdapter initWithJSONDictionary:modelClass:]"))); + +@property (nonatomic, copy, readonly) NSDictionary *externalRepresentation __attribute__((deprecated("Replaced by MTLJSONAdapter.JSONDictionary"))); + ++ (NSDictionary *)externalRepresentationKeyPathsByPropertyKey __attribute__((deprecated("Replaced by +JSONKeyPathsByPropertyKey in "))); ++ (NSValueTransformer *)transformerForKey:(NSString *)key __attribute__((deprecated("Replaced by +JSONTransformerForKey: in "))); + ++ (NSDictionary *)migrateExternalRepresentation:(NSDictionary *)externalRepresentation fromVersion:(NSUInteger)fromVersion __attribute__((deprecated("Replaced by -decodeValueForKey:withCoder:modelVersion:"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLValueTransformer.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLValueTransformer.h new file mode 100644 index 0000000..231b59f --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/MTLValueTransformer.h @@ -0,0 +1,29 @@ +// +// MTLValueTransformer.h +// Mantle +// +// Created by Justin Spahr-Summers on 2012-09-11. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +typedef id (^MTLValueTransformerBlock)(id); + +// +// A value transformer supporting block-based transformation. +// +@interface MTLValueTransformer : NSValueTransformer + +// Returns a transformer which transforms values using the given block. Reverse +// transformations will not be allowed. ++ (instancetype)transformerWithBlock:(MTLValueTransformerBlock)transformationBlock; + +// Returns a transformer which transforms values using the given block, for +// forward or reverse transformations. ++ (instancetype)reversibleTransformerWithBlock:(MTLValueTransformerBlock)transformationBlock; + +// Returns a transformer which transforms values using the given blocks. ++ (instancetype)reversibleTransformerWithForwardBlock:(MTLValueTransformerBlock)forwardBlock reverseBlock:(MTLValueTransformerBlock)reverseBlock; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/Mantle.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/Mantle.h new file mode 100644 index 0000000..ebd74e7 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/Mantle.h @@ -0,0 +1,26 @@ +// +// Mantle.h +// Mantle +// +// Created by Justin Spahr-Summers on 2012-09-04. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +//! Project version number for Mantle. +FOUNDATION_EXPORT double MantleVersionNumber; + +//! Project version string for Mantle. +FOUNDATION_EXPORT const unsigned char MantleVersionString[]; + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSArray+MTLManipulationAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSArray+MTLManipulationAdditions.h new file mode 100644 index 0000000..fd7347c --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSArray+MTLManipulationAdditions.h @@ -0,0 +1,28 @@ +// +// NSArray+MTLManipulationAdditions.h +// Mantle +// +// Created by Josh Abernathy on 9/19/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@interface NSArray (MTLManipulationAdditions) + +// The first object in the array or nil if the array is empty. +// Forwards to `firstObject` which has been first declared in iOS7, but works with iOS4/10.6. +@property (nonatomic, readonly, strong) id mtl_firstObject; + +// Returns a new array without all instances of the given object. +- (NSArray *)mtl_arrayByRemovingObject:(id)object; + +// Returns a new array without the first object. If the array is empty, it +// returns the empty array. +- (NSArray *)mtl_arrayByRemovingFirstObject; + +// Returns a new array without the last object. If the array is empty, it +// returns the empty array. +- (NSArray *)mtl_arrayByRemovingLastObject; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSDictionary+MTLManipulationAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSDictionary+MTLManipulationAdditions.h new file mode 100644 index 0000000..83254d3 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSDictionary+MTLManipulationAdditions.h @@ -0,0 +1,25 @@ +// +// NSDictionary+MTLManipulationAdditions.h +// Mantle +// +// Created by Justin Spahr-Summers on 2012-09-24. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@interface NSDictionary (MTLManipulationAdditions) + +// Merges the keys and values from the given dictionary into the receiver. If +// both the receiver and `dictionary` have a given key, the value from +// `dictionary` is used. +// +// Returns a new dictionary containing the entries of the receiver combined with +// those of `dictionary`. +- (NSDictionary *)mtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary; + +// Creates a new dictionary with all the entries for the given keys removed from +// the receiver. +- (NSDictionary *)mtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSObject+MTLComparisonAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSObject+MTLComparisonAdditions.h new file mode 100644 index 0000000..4f7c03e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSObject+MTLComparisonAdditions.h @@ -0,0 +1,15 @@ +// +// NSObject+MTLComparisonAdditions.h +// Mantle +// +// Created by Josh Vera on 10/26/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// +// Portions copyright (c) 2011 Bitswift. All rights reserved. +// See the LICENSE file for more information. +// + +#import + +// Returns whether both objects are identical or equal via -isEqual: +BOOL MTLEqualObjects(id obj1, id obj2); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSValueTransformer+MTLInversionAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSValueTransformer+MTLInversionAdditions.h new file mode 100644 index 0000000..eefceec --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSValueTransformer+MTLInversionAdditions.h @@ -0,0 +1,21 @@ +// +// NSValueTransformer+MTLInversionAdditions.h +// Mantle +// +// Created by Justin Spahr-Summers on 2013-05-18. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +@interface NSValueTransformer (MTLInversionAdditions) + +// Flips the direction of the receiver's transformation, such that +// -transformedValue: will become -reverseTransformedValue:, and vice-versa. +// +// The receiver must allow reverse transformation. +// +// Returns an inverted transformer. +- (NSValueTransformer *)mtl_invertedTransformer; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSValueTransformer+MTLPredefinedTransformerAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSValueTransformer+MTLPredefinedTransformerAdditions.h new file mode 100644 index 0000000..78a6b19 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Headers/NSValueTransformer+MTLPredefinedTransformerAdditions.h @@ -0,0 +1,84 @@ +// +// NSValueTransformer+MTLPredefinedTransformerAdditions.h +// Mantle +// +// Created by Justin Spahr-Summers on 2012-09-27. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +// The name for a value transformer that converts strings into URLs and back. +extern NSString * const MTLURLValueTransformerName; + +// Ensure an NSNumber is backed by __NSCFBoolean/CFBooleanRef +// +// NSJSONSerialization, and likely other serialization libraries, ordinarily +// serialize NSNumbers as numbers, and thus booleans would be serialized as +// 0/1. The exception is when the NSNumber is backed by __NSCFBoolean, which, +// though very much an implementation detail, is detected and serialized as a +// proper boolean. +extern NSString * const MTLBooleanValueTransformerName; + +@interface NSValueTransformer (MTLPredefinedTransformerAdditions) + +// Creates a reversible transformer to convert a JSON dictionary into a MTLModel +// object, and vice-versa. +// +// modelClass - The MTLModel subclass to attempt to parse from the JSON. This +// class must conform to . This argument must +// not be nil. +// +// Returns a reversible transformer which uses MTLJSONAdapter for transforming +// values back and forth. ++ (NSValueTransformer *)mtl_JSONDictionaryTransformerWithModelClass:(Class)modelClass; + +// Creates a reversible transformer to convert an array of JSON dictionaries +// into an array of MTLModel objects, and vice-versa. +// +// modelClass - The MTLModel subclass to attempt to parse from each JSON +// dictionary. This class must conform to . +// This argument must not be nil. +// +// Returns a reversible transformer which uses MTLJSONAdapter for transforming +// array elements back and forth. ++ (NSValueTransformer *)mtl_JSONArrayTransformerWithModelClass:(Class)modelClass; + +// A reversible value transformer to transform between the keys and objects of a +// dictionary. +// +// dictionary - The dictionary whose keys and values should be +// transformed between. This argument must not be nil. +// defaultValue - The result to fall back to, in case no key matching the +// input value was found during a forward transformation. +// reverseDefaultValue - The result to fall back to, in case no value matching +// the input value was found during a reverse +// transformation. +// +// Can for example be used for transforming between enum values and their string +// representation. +// +// NSValueTransformer *valueTransformer = [NSValueTransformer mtl_valueMappingTransformerWithDictionary:@{ +// @"foo": @(EnumDataTypeFoo), +// @"bar": @(EnumDataTypeBar), +// } defaultValue: @(EnumDataTypeUndefined) reverseDefaultValue: @"undefined"]; +// +// Returns a transformer that will map from keys to values in dictionary +// for forward transformation, and from values to keys for reverse +// transformations. If no matching key or value can be found, the respective +// default value is returned. ++ (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary defaultValue:(id)defaultValue reverseDefaultValue:(id)reverseDefaultValue; + +// Returns a value transformer created by calling +// `+mtl_valueMappingTransformerWithDictionary:defaultValue:reverseDefaultValue:` +// with a default value of `nil` and a reverse default value of `nil`. ++ (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary; + +@end + +@interface NSValueTransformer (UnavailableMTLPredefinedTransformerAdditions) + ++ (NSValueTransformer *)mtl_externalRepresentationTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +mtl_JSONDictionaryTransformerWithModelClass:"))); ++ (NSValueTransformer *)mtl_externalRepresentationArrayTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +mtl_JSONArrayTransformerWithModelClass:"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle new file mode 100755 index 0000000..06ee2b4 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Modules/module.modulemap b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..958298b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module Mantle { + umbrella header "Mantle.h" + + export * + module * { export * } +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Resources/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..f8ffa47 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,45 @@ + + + + + BuildMachineOSBuild + 14C1514 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Mantle + CFBundleIdentifier + org.mantle.Mantle + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Mantle + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 6C131e + DTPlatformVersion + GM + DTSDKBuild + 14A383 + DTSDKName + macosx10.10 + DTXcode + 0620 + DTXcodeBuild + 6C131e + UIDeviceFamily + + 1 + 2 + + + diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/Current b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Mantle.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Headers b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Modules b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/ReactiveCocoa b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/ReactiveCocoa new file mode 120000 index 0000000..5dd82ab --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/ReactiveCocoa @@ -0,0 +1 @@ +Versions/Current/ReactiveCocoa \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Resources b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/EXTKeyPathCoding.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/EXTKeyPathCoding.h new file mode 100644 index 0000000..f34dc4a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/EXTKeyPathCoding.h @@ -0,0 +1,68 @@ +// +// EXTKeyPathCoding.h +// extobjc +// +// Created by Justin Spahr-Summers on 19.06.12. +// Copyright (C) 2012 Justin Spahr-Summers. +// Released under the MIT license. +// + +#import +#import "metamacros.h" + +/** + * \@keypath allows compile-time verification of key paths. Given a real object + * receiver and key path: + * + * @code + +NSString *UTF8StringPath = @keypath(str.lowercaseString.UTF8String); +// => @"lowercaseString.UTF8String" + +NSString *versionPath = @keypath(NSObject, version); +// => @"version" + +NSString *lowercaseStringPath = @keypath(NSString.new, lowercaseString); +// => @"lowercaseString" + + * @endcode + * + * ... the macro returns an \c NSString containing all but the first path + * component or argument (e.g., @"lowercaseString.UTF8String", @"version"). + * + * In addition to simply creating a key path, this macro ensures that the key + * path is valid at compile-time (causing a syntax error if not), and supports + * refactoring, such that changing the name of the property will also update any + * uses of \@keypath. + */ +#define keypath(...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__))(keypath1(__VA_ARGS__))(keypath2(__VA_ARGS__)) + +#define keypath1(PATH) \ + (((void)(NO && ((void)PATH, NO)), strchr(# PATH, '.') + 1)) + +#define keypath2(OBJ, PATH) \ + (((void)(NO && ((void)OBJ.PATH, NO)), # PATH)) + +/** + * \@collectionKeypath allows compile-time verification of key paths across collections NSArray/NSSet etc. Given a real object + * receiver, collection object receiver and related keypaths: + * + * @code + + NSString *employessFirstNamePath = @collectionKeypath(department.employees, Employee.new, firstName) + // => @"employees.firstName" + + NSString *employessFirstNamePath = @collectionKeypath(Department.new, employees, Employee.new, firstName) + // => @"employees.firstName" + + * @endcode + * + */ +#define collectionKeypath(...) \ + metamacro_if_eq(3, metamacro_argcount(__VA_ARGS__))(collectionKeypath3(__VA_ARGS__))(collectionKeypath4(__VA_ARGS__)) + +#define collectionKeypath3(PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) + +#define collectionKeypath4(OBJ, PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(OBJ, PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) + diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/EXTScope.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/EXTScope.h new file mode 100644 index 0000000..4a16f4a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/EXTScope.h @@ -0,0 +1,118 @@ +// +// EXTScope.h +// extobjc +// +// Created by Justin Spahr-Summers on 2011-05-04. +// Copyright (C) 2012 Justin Spahr-Summers. +// Released under the MIT license. +// + +#import "metamacros.h" + +/** + * \@onExit defines some code to be executed when the current scope exits. The + * code must be enclosed in braces and terminated with a semicolon, and will be + * executed regardless of how the scope is exited, including from exceptions, + * \c goto, \c return, \c break, and \c continue. + * + * Provided code will go into a block to be executed later. Keep this in mind as + * it pertains to memory management, restrictions on assignment, etc. Because + * the code is used within a block, \c return is a legal (though perhaps + * confusing) way to exit the cleanup block early. + * + * Multiple \@onExit statements in the same scope are executed in reverse + * lexical order. This helps when pairing resource acquisition with \@onExit + * statements, as it guarantees teardown in the opposite order of acquisition. + * + * @note This statement cannot be used within scopes defined without braces + * (like a one line \c if). In practice, this is not an issue, since \@onExit is + * a useless construct in such a case anyways. + */ +#define onExit \ + rac_keywordify \ + __strong rac_cleanupBlock_t metamacro_concat(rac_exitBlock_, __LINE__) __attribute__((cleanup(rac_executeCleanupBlock), unused)) = ^ + +/** + * Creates \c __weak shadow variables for each of the variables provided as + * arguments, which can later be made strong again with #strongify. + * + * This is typically used to weakly reference variables in a block, but then + * ensure that the variables stay alive during the actual execution of the block + * (if they were live upon entry). + * + * See #strongify for an example of usage. + */ +#define weakify(...) \ + rac_keywordify \ + metamacro_foreach_cxt(rac_weakify_,, __weak, __VA_ARGS__) + +/** + * Like #weakify, but uses \c __unsafe_unretained instead, for targets or + * classes that do not support weak references. + */ +#define unsafeify(...) \ + rac_keywordify \ + metamacro_foreach_cxt(rac_weakify_,, __unsafe_unretained, __VA_ARGS__) + +/** + * Strongly references each of the variables provided as arguments, which must + * have previously been passed to #weakify. + * + * The strong references created will shadow the original variable names, such + * that the original names can be used without issue (and a significantly + * reduced risk of retain cycles) in the current scope. + * + * @code + + id foo = [[NSObject alloc] init]; + id bar = [[NSObject alloc] init]; + + @weakify(foo, bar); + + // this block will not keep 'foo' or 'bar' alive + BOOL (^matchesFooOrBar)(id) = ^ BOOL (id obj){ + // but now, upon entry, 'foo' and 'bar' will stay alive until the block has + // finished executing + @strongify(foo, bar); + + return [foo isEqual:obj] || [bar isEqual:obj]; + }; + + * @endcode + */ +#define strongify(...) \ + rac_keywordify \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wshadow\"") \ + metamacro_foreach(rac_strongify_,, __VA_ARGS__) \ + _Pragma("clang diagnostic pop") + +/*** implementation details follow ***/ +typedef void (^rac_cleanupBlock_t)(); + +static inline void rac_executeCleanupBlock (__strong rac_cleanupBlock_t *block) { + (*block)(); +} + +#define rac_weakify_(INDEX, CONTEXT, VAR) \ + CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR); + +#define rac_strongify_(INDEX, VAR) \ + __strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_); + +// Details about the choice of backing keyword: +// +// The use of @try/@catch/@finally can cause the compiler to suppress +// return-type warnings. +// The use of @autoreleasepool {} is not optimized away by the compiler, +// resulting in superfluous creation of autorelease pools. +// +// Since neither option is perfect, and with no other alternatives, the +// compromise is to use @autorelease in DEBUG builds to maintain compiler +// analysis, and to use @try/@catch otherwise to avoid insertion of unnecessary +// autorelease pools. +#if DEBUG +#define rac_keywordify autoreleasepool {} +#else +#define rac_keywordify try {} @catch (...) {} +#endif diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSArray+RACSequenceAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSArray+RACSequenceAdditions.h new file mode 100644 index 0000000..d2d0b3f --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSArray+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSArray+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSArray (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSControl+RACCommandSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSControl+RACCommandSupport.h new file mode 100644 index 0000000..4e51577 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSControl+RACCommandSupport.h @@ -0,0 +1,22 @@ +// +// NSControl+RACCommandSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/3/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACCommand; + +@interface NSControl (RACCommandSupport) + +/// Sets the control's command. When the control is clicked, the command is +/// executed with the sender of the event. The control's enabledness is bound +/// to the command's `canExecute`. +/// +/// Note: this will reset the control's target and action. +@property (nonatomic, strong) RACCommand *rac_command; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSControl+RACTextSignalSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSControl+RACTextSignalSupport.h new file mode 100644 index 0000000..3d3618d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSControl+RACTextSignalSupport.h @@ -0,0 +1,24 @@ +// +// NSControl+RACTextSignalSupport.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-03-08. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSControl (RACTextSignalSupport) + +/// Observes a text-based control for changes. +/// +/// Using this method on a control without editable text is considered undefined +/// behavior. +/// +/// Returns a signal which sends the current string value of the receiver, then +/// the new value any time it changes. +- (RACSignal *)rac_textSignal; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSData+RACSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSData+RACSupport.h new file mode 100644 index 0000000..0e47f8a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSData+RACSupport.h @@ -0,0 +1,22 @@ +// +// NSData+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACScheduler; +@class RACSignal; + +@interface NSData (RACSupport) + +// Read the data at the URL using -[NSData initWithContentsOfURL:options:error:]. +// Sends the data or the error. +// +// scheduler - cannot be nil. ++ (RACSignal *)rac_readContentsOfURL:(NSURL *)URL options:(NSDataReadingOptions)options scheduler:(RACScheduler *)scheduler; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSDictionary+RACSequenceAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSDictionary+RACSequenceAdditions.h new file mode 100644 index 0000000..4871fe7 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSDictionary+RACSequenceAdditions.h @@ -0,0 +1,31 @@ +// +// NSDictionary+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSDictionary (RACSequenceAdditions) + +/// Creates and returns a sequence of RACTuple key/value pairs. The key will be +/// the first element in the tuple, and the value will be the second. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +/// Creates and returns a sequence corresponding to the keys in the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_keySequence; + +/// Creates and returns a sequence corresponding to the values in the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_valueSequence; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSEnumerator+RACSequenceAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSEnumerator+RACSequenceAdditions.h new file mode 100644 index 0000000..1d8fc84 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSEnumerator+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSEnumerator+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Uri Baghin on 07/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSEnumerator (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// The receiver is exhausted lazily as the sequence is enumerated. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSFileHandle+RACSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSFileHandle+RACSupport.h new file mode 100644 index 0000000..985398d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSFileHandle+RACSupport.h @@ -0,0 +1,19 @@ +// +// NSFileHandle+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/10/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSFileHandle (RACSupport) + +// Read any available data in the background and send it. Completes when data +// length is <= 0. +- (RACSignal *)rac_readInBackground; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSIndexSet+RACSequenceAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSIndexSet+RACSequenceAdditions.h new file mode 100644 index 0000000..4fe3820 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSIndexSet+RACSequenceAdditions.h @@ -0,0 +1,21 @@ +// +// NSIndexSet+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Sergey Gavrilyuk on 12/17/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSIndexSet (RACSequenceAdditions) + +/// Creates and returns a sequence of indexes (as `NSNumber`s) corresponding to +/// the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSNotificationCenter+RACSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSNotificationCenter+RACSupport.h new file mode 100644 index 0000000..ddb3954 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSNotificationCenter+RACSupport.h @@ -0,0 +1,18 @@ +// +// NSNotificationCenter+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/10/12. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSNotificationCenter (RACSupport) + +// Sends the NSNotification every time the notification is posted. +- (RACSignal *)rac_addObserverForName:(NSString *)notificationName object:(id)object; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACAppKitBindings.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACAppKitBindings.h new file mode 100644 index 0000000..eaec439 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACAppKitBindings.h @@ -0,0 +1,40 @@ +// +// NSObject+RACAppKitBindings.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/17/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface NSObject (RACAppKitBindings) + +/// Invokes -rac_channelToBinding:options: without any options. +- (RACChannelTerminal *)rac_channelToBinding:(NSString *)binding; + +/// Applies a Cocoa binding to the receiver, then exposes a RACChannel-based +/// interface for manipulating it. +/// +/// Creating two of the same bindings on the same object will result in undefined +/// behavior. +/// +/// binding - The name of the binding. This must not be nil. +/// options - Any options to pass to Cocoa Bindings. This may be nil. +/// +/// Returns a RACChannelTerminal which will send future values from the receiver, +/// and update the receiver when values are sent to the terminal. +- (RACChannelTerminal *)rac_channelToBinding:(NSString *)binding options:(NSDictionary *)options; + +@end + +@interface NSObject (RACAppKitBindingsDeprecated) + +- (void)rac_bind:(NSString *)binding toObject:(id)object withKeyPath:(NSString *)keyPath __attribute__((deprecated("Use -rac_bind:options: instead"))); +- (void)rac_bind:(NSString *)binding toObject:(id)object withKeyPath:(NSString *)keyPath nilValue:(id)nilValue __attribute__((deprecated("Use -rac_bind:options: instead"))); +- (void)rac_bind:(NSString *)binding toObject:(id)object withKeyPath:(NSString *)keyPath transform:(id (^)(id value))transformBlock __attribute__((deprecated("Use -rac_bind:options: instead"))); +- (void)rac_bind:(NSString *)binding toObject:(id)object withNegatedKeyPath:(NSString *)keyPath __attribute__((deprecated("Use -rac_bind:options: instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACDeallocating.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACDeallocating.h new file mode 100644 index 0000000..1530eb4 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACDeallocating.h @@ -0,0 +1,34 @@ +// +// NSObject+RACDeallocating.h +// ReactiveCocoa +// +// Created by Kazuo Koga on 2013/03/15. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACCompoundDisposable; +@class RACDisposable; +@class RACSignal; + +@interface NSObject (RACDeallocating) + +/// The compound disposable which will be disposed of when the receiver is +/// deallocated. +@property (atomic, readonly, strong) RACCompoundDisposable *rac_deallocDisposable; + +/// Returns a signal that will complete immediately before the receiver is fully +/// deallocated. If already deallocated when the signal is subscribed to, +/// a `completed` event will be sent immediately. +- (RACSignal *)rac_willDeallocSignal; + +@end + +@interface NSObject (RACDeallocatingDeprecated) + +- (RACSignal *)rac_didDeallocSignal __attribute__((deprecated("Use -rac_willDeallocSignal"))); + +- (void)rac_addDeallocDisposable:(RACDisposable *)disposable __attribute__((deprecated("Add disposables to -rac_deallocDisposable instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACLifting.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACLifting.h new file mode 100644 index 0000000..bc4bca2 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACLifting.h @@ -0,0 +1,61 @@ +// +// NSObject+RACLifting.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 10/13/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSObject (RACLifting) + +/// Lifts the selector on the receiver into the reactive world. The selector will +/// be invoked whenever any signal argument sends a value, but only after each +/// signal has sent an initial value. +/// +/// It will replay the most recently sent value to new subscribers. +/// +/// This does not support C arrays or unions. +/// +/// selector - The selector on self to invoke. +/// firstSignal - The signal corresponding to the first method argument. This +/// must not be nil. +/// ... - A list of RACSignals corresponding to the remaining arguments. +/// There must be a non-nil signal for each method argument. +/// +/// Examples +/// +/// [button rac_liftSelector:@selector(setTitleColor:forState:) withSignals:textColorSignal, [RACSignal return:@(UIControlStateNormal)], nil]; +/// +/// Returns a signal which sends the return value from each invocation of the +/// selector. If the selector returns void, it instead sends RACUnit.defaultUnit. +/// It completes only after all the signal arguments complete. +- (RACSignal *)rac_liftSelector:(SEL)selector withSignals:(RACSignal *)firstSignal, ... NS_REQUIRES_NIL_TERMINATION; + +/// Like -rac_liftSelector:withSignals:, but accepts an array instead of +/// a variadic list of arguments. +- (RACSignal *)rac_liftSelector:(SEL)selector withSignalsFromArray:(NSArray *)signals; + +/// Like -rac_liftSelector:withSignals:, but accepts a signal sending tuples of +/// arguments instead of a variadic list of arguments. +- (RACSignal *)rac_liftSelector:(SEL)selector withSignalOfArguments:(RACSignal *)arguments; + +@end + +@interface NSObject (RACLiftingDeprecated) + +- (RACSignal *)rac_liftSelector:(SEL)selector withObjects:(id)arg, ... __attribute__((deprecated("Use -rac_liftSelector:withSignals: instead"))); +- (RACSignal *)rac_liftSelector:(SEL)selector withObjectsFromArray:(NSArray *)args __attribute__((deprecated("Use -rac_liftSelector:withSignalsFromArray: instead"))); +- (RACSignal *)rac_liftBlock:(id)block withArguments:(id)arg, ... NS_REQUIRES_NIL_TERMINATION __attribute__((deprecated("Use +combineLatest:reduce: instead"))); +- (RACSignal *)rac_liftBlock:(id)block withArgumentsFromArray:(NSArray *)args __attribute__((deprecated("Use +combineLatest:reduce: instead"))); + +@end + +@interface NSObject (RACLiftingUnavailable) + +- (instancetype)rac_lift __attribute__((unavailable("Use -rac_liftSelector:withSignals: instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACPropertySubscribing.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACPropertySubscribing.h new file mode 100644 index 0000000..2c14d5d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACPropertySubscribing.h @@ -0,0 +1,105 @@ +// +// NSObject+RACPropertySubscribing.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/2/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "EXTKeyPathCoding.h" +#import "metamacros.h" + +/// Creates a signal which observes `KEYPATH` on `TARGET` for changes. +/// +/// In either case, the observation continues until `TARGET` _or self_ is +/// deallocated. If any intermediate object is deallocated instead, it will be +/// assumed to have been set to nil. +/// +/// Make sure to `@strongify(self)` when using this macro within a block! The +/// macro will _always_ reference `self`, which can silently introduce a retain +/// cycle within a block. As a result, you should make sure that `self` is a weak +/// reference (e.g., created by `@weakify` and `@strongify`) before the +/// expression that uses `RACObserve`. +/// +/// Examples +/// +/// // Observes self, and doesn't stop until self is deallocated. +/// RACSignal *selfSignal = RACObserve(self, arrayController.items); +/// +/// // Observes the array controller, and stops when self _or_ the array +/// // controller is deallocated. +/// RACSignal *arrayControllerSignal = RACObserve(self.arrayController, items); +/// +/// // Observes obj.arrayController, and stops when self _or_ the array +/// // controller is deallocated. +/// RACSignal *signal2 = RACObserve(obj.arrayController, items); +/// +/// @weakify(self); +/// RACSignal *signal3 = [anotherSignal flattenMap:^(NSArrayController *arrayController) { +/// // Avoids a retain cycle because of RACObserve implicitly referencing +/// // self. +/// @strongify(self); +/// return RACObserve(arrayController, items); +/// }]; +/// +/// Returns a signal which sends the current value of the key path on +/// subscription, then sends the new value every time it changes, and sends +/// completed if self or observer is deallocated. +#define RACObserve(TARGET, KEYPATH) \ + ({ \ + __weak id target_ = (TARGET); \ + [target_ rac_valuesForKeyPath:@keypath(TARGET, KEYPATH) observer:self]; \ + }) + +@class RACDisposable; +@class RACSignal; + +@interface NSObject (RACPropertySubscribing) + +/// Creates a signal to observe the value at the given key path. +/// +/// The initial value is sent on subscription, the subsequent values are sent +/// from whichever thread the change occured on, even if it doesn't have a valid +/// scheduler. +/// +/// Returns a signal that immediately sends the receiver's current value at the +/// given keypath, then any changes thereafter. +- (RACSignal *)rac_valuesForKeyPath:(NSString *)keyPath observer:(__weak NSObject *)observer; + +/// Creates a signal to observe the changes of the given key path. +/// +/// The initial value is sent on subscription, the subsequent values are sent +/// from whichever thread the change occured on, even if it doesn't have a valid +/// scheduler. +/// +/// Returns a signal that sends tuples containing the current value at the key +/// path and the change dictionary for each KVO callback. +- (RACSignal *)rac_valuesAndChangesForKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(__weak NSObject *)observer; + +@end + +#define RACAble(...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (_RACAbleObject(self, __VA_ARGS__)) \ + (_RACAbleObject(__VA_ARGS__)) + +#define _RACAbleObject(object, property) [object rac_signalForKeyPath:@keypath(object, property) observer:self] + +#define RACAbleWithStart(...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (_RACAbleWithStartObject(self, __VA_ARGS__)) \ + (_RACAbleWithStartObject(__VA_ARGS__)) + +#define _RACAbleWithStartObject(object, property) [object rac_signalWithStartingValueForKeyPath:@keypath(object, property) observer:self] + +@interface NSObject (RACPropertySubscribingDeprecated) + ++ (RACSignal *)rac_signalFor:(NSObject *)object keyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); ++ (RACSignal *)rac_signalWithStartingValueFor:(NSObject *)object keyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); ++ (RACSignal *)rac_signalWithChangesFor:(NSObject *)object keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesAndChangesForKeyPath:options:observer: instead."))); +- (RACSignal *)rac_signalForKeyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); +- (RACSignal *)rac_signalWithStartingValueForKeyPath:(NSString *)keyPath observer:(NSObject *)observer __attribute__((deprecated("Use -rac_valuesForKeyPath:observer: or RACObserve() instead."))); +- (RACDisposable *)rac_deriveProperty:(NSString *)keyPath from:(RACSignal *)signal __attribute__((deprecated("Use -[RACSignal setKeyPath:onObject:] instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACSelectorSignal.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACSelectorSignal.h new file mode 100644 index 0000000..c6f3de5 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSObject+RACSelectorSignal.h @@ -0,0 +1,79 @@ +// +// NSObject+RACSelectorSignal.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/18/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +/// The domain for any errors originating from -rac_signalForSelector:. +extern NSString * const RACSelectorSignalErrorDomain; + +/// -rac_signalForSelector: was going to add a new method implementation for +/// `selector`, but another thread added an implementation before it was able to. +/// +/// This will _not_ occur for cases where a method implementation exists before +/// -rac_signalForSelector: is invoked. +extern const NSInteger RACSelectorSignalErrorMethodSwizzlingRace; + +@interface NSObject (RACSelectorSignal) + +/// Creates a signal associated with the receiver, which will send a tuple of the +/// method's arguments each time the given selector is invoked. +/// +/// If the selector is already implemented on the receiver, the existing +/// implementation will be invoked _before_ the signal fires. +/// +/// If the selector is not yet implemented on the receiver, the injected +/// implementation will have a `void` return type and accept only object +/// arguments. Invoking the added implementation with non-object values, or +/// expecting a return value, will result in undefined behavior. +/// +/// This is useful for changing an event or delegate callback into a signal. For +/// example, on an NSView: +/// +/// [[view rac_signalForSelector:@selector(mouseDown:)] subscribeNext:^(RACTuple *args) { +/// NSEvent *event = args.first; +/// NSLog(@"mouse button pressed: %@", event); +/// }]; +/// +/// selector - The selector for whose invocations are to be observed. If it +/// doesn't exist, it will be implemented to accept object arguments +/// and return void. This cannot have C arrays or unions as arguments +/// or C arrays, unions, structs, complex or vector types as return +/// type. +/// +/// Returns a signal which will send a tuple of arguments upon each invocation of +/// the selector, then completes when the receiver is deallocated. `next` events +/// will be sent synchronously from the thread that invoked the method. If +/// a runtime call fails, the signal will send an error in the +/// RACSelectorSignalErrorDomain. +- (RACSignal *)rac_signalForSelector:(SEL)selector; + +/// Behaves like -rac_signalForSelector:, but if the selector is not yet +/// implemented on the receiver, its method signature is looked up within +/// `protocol`, and may accept non-object arguments. +/// +/// If the selector is not yet implemented and has a return value, the injected +/// method will return all zero bits (equal to `nil`, `NULL`, 0, 0.0f, etc.). +/// +/// selector - The selector for whose invocations are to be observed. If it +/// doesn't exist, it will be implemented using information from +/// `protocol`, and may accept non-object arguments and return +/// a value. This cannot have C arrays or unions as arguments or +/// return type. +/// protocol - The protocol in which `selector` is declared. This will be used +/// for type information if the selector is not already implemented on +/// the receiver. This must not be `NULL`, and `selector` must exist +/// in this protocol. +/// +/// Returns a signal which will send a tuple of arguments on each invocation of +/// the selector, or an error in RACSelectorSignalErrorDomain if a runtime +/// call fails. +- (RACSignal *)rac_signalForSelector:(SEL)selector fromProtocol:(Protocol *)protocol; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSOrderedSet+RACSequenceAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSOrderedSet+RACSequenceAdditions.h new file mode 100644 index 0000000..8bea2db --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSOrderedSet+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSOrderedSet+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSOrderedSet (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSSet+RACSequenceAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSSet+RACSequenceAdditions.h new file mode 100644 index 0000000..6665501 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSSet+RACSequenceAdditions.h @@ -0,0 +1,20 @@ +// +// NSSet+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSSet (RACSequenceAdditions) + +/// Creates and returns a sequence corresponding to the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSString+RACSequenceAdditions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSString+RACSequenceAdditions.h new file mode 100644 index 0000000..0116231 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSString+RACSequenceAdditions.h @@ -0,0 +1,21 @@ +// +// NSString+RACSequenceAdditions.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import + +@class RACSequence; + +@interface NSString (RACSequenceAdditions) + +/// Creates and returns a sequence containing strings corresponding to each +/// composed character sequence in the receiver. +/// +/// Mutating the receiver will not affect the sequence after it's been created. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSString+RACSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSString+RACSupport.h new file mode 100644 index 0000000..4c7fc72 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSString+RACSupport.h @@ -0,0 +1,22 @@ +// +// NSString+RACSupport.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACScheduler; +@class RACSignal; + +@interface NSString (RACSupport) + +// Reads in the contents of the file using +[NSString stringWithContentsOfURL:usedEncoding:error:]. +// Note that encoding won't be valid until the signal completes successfully. +// +// scheduler - cannot be nil. ++ (RACSignal *)rac_readContentsOfURL:(NSURL *)URL usedEncoding:(NSStringEncoding *)encoding scheduler:(RACScheduler *)scheduler; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSText+RACSignalSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSText+RACSignalSupport.h new file mode 100644 index 0000000..e3fc8ed --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSText+RACSignalSupport.h @@ -0,0 +1,19 @@ +// +// NSText+RACSignalSupport.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-03-08. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSText (RACSignalSupport) + +/// Returns a signal which sends the current `string` of the receiver, then the +/// new value any time it changes. +- (RACSignal *)rac_textSignal; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSURLConnection+RACSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSURLConnection+RACSupport.h new file mode 100644 index 0000000..e9bf04f --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSURLConnection+RACSupport.h @@ -0,0 +1,25 @@ +// +// NSURLConnection+RACSupport.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-10-01. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +@interface NSURLConnection (RACSupport) + +// Lazily loads data for the given request in the background. +// +// request - The URL request to load. This must not be nil. +// +// Returns a signal which will begin loading the request upon each subscription, +// then send a `RACTuple` of the received `NSURLResponse` and downloaded +// `NSData`, and complete on a background thread. If any errors occur, the +// returned signal will error out. ++ (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSUserDefaults+RACSupport.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSUserDefaults+RACSupport.h new file mode 100644 index 0000000..8482fb3 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/NSUserDefaults+RACSupport.h @@ -0,0 +1,27 @@ +// +// NSUserDefaults+RACSupport.h +// ReactiveCocoa +// +// Created by Matt Diephouse on 12/19/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +@class RACChannelTerminal; + +@interface NSUserDefaults (RACSupport) + +/// Creates and returns a terminal for binding the user defaults key. +/// +/// **Note:** The value in the user defaults is *asynchronously* updated with +/// values sent to the channel. +/// +/// key - The user defaults key to create the channel terminal for. +/// +/// Returns a channel terminal that sends the value of the user defaults key +/// upon subscription, sends an updated value whenever the default changes, and +/// updates the default asynchronously with values it receives. +- (RACChannelTerminal *)rac_channelTerminalForKey:(NSString *)key; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACBacktrace.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACBacktrace.h new file mode 100644 index 0000000..6037f87 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACBacktrace.h @@ -0,0 +1,70 @@ +// +// RACBacktrace.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-08-20. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#ifdef RAC_DEBUG_BACKTRACE + +extern void rac_dispatch_async(dispatch_queue_t queue, dispatch_block_t block); +extern void rac_dispatch_barrier_async(dispatch_queue_t queue, dispatch_block_t block); +extern void rac_dispatch_after(dispatch_time_t time, dispatch_queue_t queue, dispatch_block_t block); +extern void rac_dispatch_async_f(dispatch_queue_t queue, void *context, dispatch_function_t function); +extern void rac_dispatch_barrier_async_f(dispatch_queue_t queue, void *context, dispatch_function_t function); +extern void rac_dispatch_after_f(dispatch_time_t time, dispatch_queue_t queue, void *context, dispatch_function_t function); + +#define dispatch_async rac_dispatch_async +#define dispatch_barrier_async rac_dispatch_barrier_async +#define dispatch_after rac_dispatch_after +#define dispatch_async_f rac_dispatch_async_f +#define dispatch_barrier_async_f rac_dispatch_barrier_async_f +#define dispatch_after_f rac_dispatch_after_f + +/// Preserves backtraces across asynchronous calls. +/// +/// On OS X, you can enable the automatic capturing of asynchronous backtraces +/// (in Debug builds) by setting the `DYLD_INSERT_LIBRARIES` environment variable +/// to `@executable_path/../Frameworks/ReactiveCocoa.framework/ReactiveCocoa` in +/// your scheme's Run action settings. +/// +/// On iOS, your project and RAC will automatically use the `rac_` GCD functions +/// (declared above) for asynchronous work. Unfortunately, unlike OS X, it's +/// impossible to capture backtraces inside NSOperationQueue or other code +/// outside of your project. +/// +/// Once backtraces are being captured, you can `po [RACBacktrace backtrace]` in +/// the debugger to print them out at any time. You can even set up an alias in +/// ~/.lldbinit to do so: +/// +/// command alias racbt po [RACBacktrace backtrace] +/// +@interface RACBacktrace : NSObject + +/// The backtrace from any previous thread. +@property (nonatomic, strong, readonly) RACBacktrace *previousThreadBacktrace; + +/// The call stack of this backtrace's thread. +@property (nonatomic, copy, readonly) NSArray *callStackSymbols; + +/// Captures the current thread's backtrace, appending it to any backtrace from +/// a previous thread. ++ (instancetype)backtrace; + +/// Same as +backtrace, but omits the specified number of frames at the +/// top of the stack (in addition to this method itself). ++ (instancetype)backtraceIgnoringFrames:(NSUInteger)ignoreCount; + +@end + +#else + +#define rac_dispatch_async dispatch_async +#define rac_dispatch_barrier_async dispatch_barrier_async +#define rac_dispatch_after dispatch_after +#define rac_dispatch_async_f dispatch_async_f +#define rac_dispatch_barrier_async_f dispatch_barrier_async_f +#define rac_dispatch_after_f dispatch_after_f + +#endif diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACBehaviorSubject.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACBehaviorSubject.h new file mode 100644 index 0000000..e95fe6d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACBehaviorSubject.h @@ -0,0 +1,18 @@ +// +// RACBehaviorSubject.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubject.h" + +/// A behavior subject sends the last value it received when it is subscribed to. +@interface RACBehaviorSubject : RACSubject + +/// Creates a new behavior subject with a default value. If it hasn't received +/// any values when it gets subscribed to, it sends the default value. ++ (instancetype)behaviorSubjectWithDefaultValue:(id)value; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACChannel.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACChannel.h new file mode 100644 index 0000000..ef1d6f1 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACChannel.h @@ -0,0 +1,70 @@ +// +// RACChannel.h +// ReactiveCocoa +// +// Created by Uri Baghin on 01/01/2013. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" +#import "RACSubscriber.h" + +@class RACChannelTerminal; + +/// A two-way channel. +/// +/// Conceptually, RACChannel can be thought of as a bidirectional connection, +/// composed of two controllable signals that work in parallel. +/// +/// For example, when connecting between a view and a model: +/// +/// Model View +/// `leadingTerminal` ------> `followingTerminal` +/// `leadingTerminal` <------ `followingTerminal` +/// +/// The initial value of the model and all future changes to it are _sent on_ the +/// `leadingTerminal`, and _received by_ subscribers of the `followingTerminal`. +/// +/// Likewise, whenever the user changes the value of the view, that value is sent +/// on the `followingTerminal`, and received in the model from the +/// `leadingTerminal`. However, the initial value of the view is not received +/// from the `leadingTerminal` (only future changes). +@interface RACChannel : NSObject + +/// The terminal which "leads" the channel, by sending its latest value +/// immediately to new subscribers of the `followingTerminal`. +/// +/// New subscribers to this terminal will not receive a starting value, but will +/// receive all future values that are sent to the `followingTerminal`. +@property (nonatomic, strong, readonly) RACChannelTerminal *leadingTerminal; + +/// The terminal which "follows" the lead of the other terminal, only sending +/// _future_ values to the subscribers of the `leadingTerminal`. +/// +/// The latest value sent to the `leadingTerminal` (if any) will be sent +/// immediately to new subscribers of this terminal, and then all future values +/// as well. +@property (nonatomic, strong, readonly) RACChannelTerminal *followingTerminal; + +@end + +/// Represents one end of a RACChannel. +/// +/// An terminal is similar to a socket or pipe -- it represents one end of +/// a connection (the RACChannel, in this case). Values sent to this terminal +/// will _not_ be received by its subscribers. Instead, the values will be sent +/// to the subscribers of the RACChannel's _other_ terminal. +/// +/// For example, when using the `followingTerminal`, _sent_ values can only be +/// _received_ from the `leadingTerminal`, and vice versa. +/// +/// To make it easy to terminate a RACChannel, `error` and `completed` events +/// sent to either terminal will be received by the subscribers of _both_ +/// terminals. +/// +/// Do not instantiate this class directly. Create a RACChannel instead. +@interface RACChannelTerminal : RACSignal + +- (id)init __attribute__((unavailable("Instantiate a RACChannel instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACCommand.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACCommand.h new file mode 100644 index 0000000..653d46b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACCommand.h @@ -0,0 +1,123 @@ +// +// RACCommand.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/3/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACSignal; + +/// The domain for errors originating within `RACCommand`. +extern NSString * const RACCommandErrorDomain; + +/// -execute: was invoked while the command was disabled. +extern const NSInteger RACCommandErrorNotEnabled; + +/// A `userInfo` key for an error, associated with the `RACCommand` that the +/// error originated from. +/// +/// This is included only when the error code is `RACCommandErrorNotEnabled`. +extern NSString * const RACUnderlyingCommandErrorKey; + +/// A command is a signal triggered in response to some action, typically +/// UI-related. +@interface RACCommand : NSObject + +/// A signal of the signals returned by successful invocations of -execute: +/// (i.e., while the receiver is `enabled`). +/// +/// Errors will be automatically caught upon the inner signals, and sent upon +/// `errors` instead. If you _want_ to receive inner errors, use -execute: or +/// -[RACSignal materialize]. +/// +/// Only executions that begin _after_ subscription will be sent upon this +/// signal. All inner signals will arrive upon the main thread. +@property (nonatomic, strong, readonly) RACSignal *executionSignals; + +/// A signal of whether this command is currently executing. +/// +/// This will send YES whenever -execute: is invoked and the created signal has +/// not yet terminated. Once all executions have terminated, `executing` will +/// send NO. +/// +/// This signal will send its current value upon subscription, and then all +/// future values on the main thread. +@property (nonatomic, strong, readonly) RACSignal *executing; + +/// A signal of whether this command is able to execute. +/// +/// This will send NO if: +/// +/// - The command was created with an `enabledSignal`, and NO is sent upon that +/// signal, or +/// - `allowsConcurrentExecution` is NO and the command has started executing. +/// +/// Once the above conditions are no longer met, the signal will send YES. +/// +/// This signal will send its current value upon subscription, and then all +/// future values on the main thread. +@property (nonatomic, strong, readonly) RACSignal *enabled; + +/// Forwards any errors that occur within signals returned by -execute:. +/// +/// When an error occurs on a signal returned from -execute:, this signal will +/// send the associated NSError value as a `next` event (since an `error` event +/// would terminate the stream). +/// +/// After subscription, this signal will send all future errors on the main +/// thread. +@property (nonatomic, strong, readonly) RACSignal *errors; + +/// Whether the command allows multiple executions to proceed concurrently. +/// +/// The default value for this property is NO. +@property (atomic, assign) BOOL allowsConcurrentExecution; + +/// Invokes -initWithEnabled:signalBlock: with a nil `enabledSignal`. +- (id)initWithSignalBlock:(RACSignal * (^)(id input))signalBlock; + +/// Initializes a command that is conditionally enabled. +/// +/// This is the designated initializer for this class. +/// +/// enabledSignal - A signal of BOOLs which indicate whether the command should +/// be enabled. `enabled` will be based on the latest value sent +/// from this signal. Before any values are sent, `enabled` will +/// default to YES. This argument may be nil. +/// signalBlock - A block which will map each input value (passed to -execute:) +/// to a signal of work. The returned signal will be multicasted +/// to a replay subject, sent on `executionSignals`, then +/// subscribed to synchronously. Neither the block nor the +/// returned signal may be nil. +- (id)initWithEnabled:(RACSignal *)enabledSignal signalBlock:(RACSignal * (^)(id input))signalBlock; + +/// If the receiver is enabled, this method will: +/// +/// 1. Invoke the `signalBlock` given at the time of initialization. +/// 2. Multicast the returned signal to a RACReplaySubject. +/// 3. Send the multicasted signal on `executionSignals`. +/// 4. Subscribe (connect) to the original signal on the main thread. +/// +/// input - The input value to pass to the receiver's `signalBlock`. This may be +/// nil. +/// +/// Returns the multicasted signal, after subscription. If the receiver is not +/// enabled, returns a signal that will send an error with code +/// RACCommandErrorNotEnabled. +- (RACSignal *)execute:(id)input; + +@end + +@interface RACCommand (Unavailable) + +@property (atomic, readonly) BOOL canExecute __attribute__((unavailable("Use the 'enabled' signal instead"))); + ++ (instancetype)command __attribute__((unavailable("Use -initWithSignalBlock: instead"))); ++ (instancetype)commandWithCanExecuteSignal:(RACSignal *)canExecuteSignal __attribute__((unavailable("Use -initWithEnabled:signalBlock: instead"))); +- (id)initWithCanExecuteSignal:(RACSignal *)canExecuteSignal __attribute__((unavailable("Use -initWithEnabled:signalBlock: instead"))); +- (RACSignal *)addSignalBlock:(RACSignal * (^)(id value))signalBlock __attribute__((unavailable("Pass the signalBlock to -initWithSignalBlock: instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACCompoundDisposable.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACCompoundDisposable.h new file mode 100644 index 0000000..bb25f7d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACCompoundDisposable.h @@ -0,0 +1,48 @@ +// +// RACCompoundDisposable.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACDisposable.h" + +/// A disposable of disposables. When it is disposed, it disposes of all its +/// contained disposables. +/// +/// If -addDisposable: is called after the compound disposable has been disposed +/// of, the given disposable is immediately disposed. This allows a compound +/// disposable to act as a stand-in for a disposable that will be delivered +/// asynchronously. +@interface RACCompoundDisposable : RACDisposable + +/// Creates and returns a new compound disposable. ++ (instancetype)compoundDisposable; + +/// Creates and returns a new compound disposable containing the given +/// disposables. ++ (instancetype)compoundDisposableWithDisposables:(NSArray *)disposables; + +/// Adds the given disposable. If the receiving disposable has already been +/// disposed of, the given disposable is disposed immediately. +/// +/// This method is thread-safe. +/// +/// disposable - The disposable to add. This may be nil, in which case nothing +/// happens. +- (void)addDisposable:(RACDisposable *)disposable; + +/// Removes the specified disposable from the compound disposable (regardless of +/// its disposed status), or does nothing if it's not in the compound disposable. +/// +/// This is mainly useful for limiting the memory usage of the compound +/// disposable for long-running operations. +/// +/// This method is thread-safe. +/// +/// disposable - The disposable to remove. This argument may be nil (to make the +/// use of weak references easier). +- (void)removeDisposable:(RACDisposable *)disposable; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACDisposable.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACDisposable.h new file mode 100644 index 0000000..5b4cf0b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACDisposable.h @@ -0,0 +1,35 @@ +// +// RACDisposable.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACScopedDisposable; + +/// A disposable encapsulates the work necessary to tear down and cleanup a +/// subscription. +@interface RACDisposable : NSObject + +/// Whether the receiver has been disposed. +/// +/// Use of this property is discouraged, since it may be set to `YES` +/// concurrently at any time. +/// +/// This property is not KVO-compliant. +@property (atomic, assign, getter = isDisposed, readonly) BOOL disposed; + ++ (instancetype)disposableWithBlock:(void (^)(void))block; + +/// Performs the disposal work. Can be called multiple times, though subsequent +/// calls won't do anything. +- (void)dispose; + +/// Returns a new disposable which will dispose of this disposable when it gets +/// dealloc'd. +- (RACScopedDisposable *)asScopedDisposable; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACEvent.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACEvent.h new file mode 100644 index 0000000..9e64e5a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACEvent.h @@ -0,0 +1,51 @@ +// +// RACEvent.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-01-07. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import + +/// Describes the type of a RACEvent. +/// +/// RACEventTypeCompleted - A `completed` event. +/// RACEventTypeError - An `error` event. +/// RACEventTypeNext - A `next` event. +typedef enum : NSUInteger { + RACEventTypeCompleted, + RACEventTypeError, + RACEventTypeNext +} RACEventType; + +/// Represents an event sent by a RACSignal. +/// +/// This corresponds to the `Notification` class in Rx. +@interface RACEvent : NSObject + +/// Returns a singleton RACEvent representing the `completed` event. ++ (instancetype)completedEvent; + +/// Returns a new event of type RACEventTypeError, containing the given error. ++ (instancetype)eventWithError:(NSError *)error; + +/// Returns a new event of type RACEventTypeNext, containing the given value. ++ (instancetype)eventWithValue:(id)value; + +/// The type of event represented by the receiver. +@property (nonatomic, assign, readonly) RACEventType eventType; + +/// Returns whether the receiver is of type RACEventTypeCompleted or +/// RACEventTypeError. +@property (nonatomic, getter = isFinished, assign, readonly) BOOL finished; + +/// The error associated with an event of type RACEventTypeError. This will be +/// nil for all other event types. +@property (nonatomic, strong, readonly) NSError *error; + +/// The value associated with an event of type RACEventTypeNext. This will be +/// nil for all other event types. +@property (nonatomic, strong, readonly) id value; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACGroupedSignal.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACGroupedSignal.h new file mode 100644 index 0000000..04c151b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACGroupedSignal.h @@ -0,0 +1,19 @@ +// +// RACGroupedSignal.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 5/2/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubject.h" + +/// A grouped signal is used by -[RACSignal groupBy:transform:]. +@interface RACGroupedSignal : RACSubject + +/// The key shared by the group. +@property (nonatomic, readonly, copy) id key; + ++ (instancetype)signalWithKey:(id)key; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACKVOChannel.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACKVOChannel.h new file mode 100644 index 0000000..ead15a4 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACKVOChannel.h @@ -0,0 +1,97 @@ +// +// RACKVOChannel.h +// ReactiveCocoa +// +// Created by Uri Baghin on 27/12/2012. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACChannel.h" +#import "EXTKeyPathCoding.h" +#import "metamacros.h" + +/// Creates a RACKVOChannel to the given key path. When the targeted object +/// deallocates, the channel will complete. +/// +/// If RACChannelTo() is used as an expression, it returns a RACChannelTerminal that +/// can be used to watch the specified property for changes, and set new values +/// for it. The terminal will start with the property's current value upon +/// subscription. +/// +/// If RACChannelTo() is used on the left-hand side of an assignment, there must a +/// RACChannelTerminal on the right-hand side of the assignment. The two will be +/// subscribed to one another: the property's value is immediately set to the +/// value of the channel terminal on the right-hand side, and subsequent changes +/// to either terminal will be reflected on the other. +/// +/// There are two different versions of this macro: +/// +/// - RACChannelTo(TARGET, KEYPATH, NILVALUE) will create a channel to the `KEYPATH` +/// of `TARGET`. If the terminal is ever sent a `nil` value, the property will +/// be set to `NILVALUE` instead. `NILVALUE` may itself be `nil` for object +/// properties, but an NSValue should be used for primitive properties, to +/// avoid an exception if `nil` is sent (which might occur if an intermediate +/// object is set to `nil`). +/// - RACChannelTo(TARGET, KEYPATH) is the same as the above, but `NILVALUE` defaults to +/// `nil`. +/// +/// Examples +/// +/// RACChannelTerminal *integerChannel = RACChannelTo(self, integerProperty, @42); +/// +/// // Sets self.integerProperty to 5. +/// [integerChannel sendNext:@5]; +/// +/// // Logs the current value of self.integerProperty, and all future changes. +/// [integerChannel subscribeNext:^(id value) { +/// NSLog(@"value: %@", value); +/// }]; +/// +/// // Binds properties to each other, taking the initial value from the right +/// side. +/// RACChannelTo(view, objectProperty) = RACChannelTo(model, objectProperty); +/// RACChannelTo(view, integerProperty, @2) = RACChannelTo(model, integerProperty, @10); +#define RACChannelTo(TARGET, ...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (RACChannelTo_(TARGET, __VA_ARGS__, nil)) \ + (RACChannelTo_(TARGET, __VA_ARGS__)) + +/// Do not use this directly. Use the RACChannelTo macro above. +#define RACChannelTo_(TARGET, KEYPATH, NILVALUE) \ + [[RACKVOChannel alloc] initWithTarget:(TARGET) keyPath:@keypath(TARGET, KEYPATH) nilValue:(NILVALUE)][@keypath(RACKVOChannel.new, followingTerminal)] + +/// A RACChannel that observes a KVO-compliant key path for changes. +@interface RACKVOChannel : RACChannel + +/// Initializes a channel that will observe the given object and key path. +/// +/// The current value of the key path, and future KVO notifications for the given +/// key path, will be sent to subscribers of the channel's `followingTerminal`. +/// Values sent to the `followingTerminal` will be set at the given key path using +/// key-value coding. +/// +/// When the target object deallocates, the channel will complete. Signal errors +/// are considered undefined behavior. +/// +/// This is the designated initializer for this class. +/// +/// target - The object to bind to. +/// keyPath - The key path to observe and set the value of. +/// nilValue - The value to set at the key path whenever a `nil` value is +/// received. This may be nil when connecting to object properties, but +/// an NSValue should be used for primitive properties, to avoid an +/// exception if `nil` is received (which might occur if an intermediate +/// object is set to `nil`). +- (id)initWithTarget:(__weak NSObject *)target keyPath:(NSString *)keyPath nilValue:(id)nilValue; + +- (id)init __attribute__((unavailable("Use -initWithTarget:keyPath:nilValue: instead"))); + +@end + +/// Methods needed for the convenience macro. Do not call explicitly. +@interface RACKVOChannel (RACChannelTo) + +- (RACChannelTerminal *)objectForKeyedSubscript:(NSString *)key; +- (void)setObject:(RACChannelTerminal *)otherTerminal forKeyedSubscript:(NSString *)key; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACMulticastConnection.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACMulticastConnection.h new file mode 100644 index 0000000..67beff6 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACMulticastConnection.h @@ -0,0 +1,48 @@ +// +// RACMulticastConnection.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/11/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACDisposable; +@class RACSignal; + +/// A multicast connection encapsulates the idea of sharing one subscription to a +/// signal to many subscribers. This is most often needed if the subscription to +/// the underlying signal involves side-effects or shouldn't be called more than +/// once. +/// +/// The multicasted signal is only subscribed to when +/// -[RACMulticastConnection connect] is called. Until that happens, no values +/// will be sent on `signal`. See -[RACMulticastConnection autoconnect] for how +/// -[RACMulticastConnection connect] can be called automatically. +/// +/// Note that you shouldn't create RACMulticastConnection manually. Instead use +/// -[RACSignal publish] or -[RACSignal multicast:]. +@interface RACMulticastConnection : NSObject + +/// The multicasted signal. +@property (nonatomic, strong, readonly) RACSignal *signal; + +/// Connect to the underlying signal by subscribing to it. Calling this multiple +/// times does nothing but return the existing connection's disposable. +/// +/// Returns the disposable for the subscription to the multicasted signal. +- (RACDisposable *)connect; + +/// Connects to the underlying signal when the returned signal is first +/// subscribed to, and disposes of the subscription to the multicasted signal +/// when the returned signal has no subscribers. +/// +/// If new subscribers show up after being disposed, they'll subscribe and then +/// be immediately disposed of. The returned signal will never re-connect to the +/// multicasted signal. +/// +/// Returns the autoconnecting signal. +- (RACSignal *)autoconnect; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACQueueScheduler+Subclass.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACQueueScheduler+Subclass.h new file mode 100644 index 0000000..b40f984 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACQueueScheduler+Subclass.h @@ -0,0 +1,35 @@ +// +// RACQueueScheduler+Subclass.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 6/6/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACQueueScheduler.h" +#import "RACScheduler+Subclass.h" + +/// An interface for use by GCD queue-based subclasses. +/// +/// See RACScheduler+Subclass.h for subclassing notes. +@interface RACQueueScheduler () + +/// The queue on which blocks are enqueued. +@property (nonatomic, strong, readonly) dispatch_queue_t queue; + +/// Initializes the receiver with the name of the scheduler and the queue which +/// the scheduler should use. +/// +/// name - The name of the scheduler. If nil, a default name will be used. +/// queue - The queue upon which the receiver should enqueue scheduled blocks. +/// This argument must not be NULL. +/// +/// Returns the initialized object. +- (id)initWithName:(NSString *)name queue:(dispatch_queue_t)queue; + +/// Converts a date into a GCD time using dispatch_walltime(). +/// +/// date - The date to convert. This must not be nil. ++ (dispatch_time_t)wallTimeWithDate:(NSDate *)date; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACQueueScheduler.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACQueueScheduler.h new file mode 100644 index 0000000..ef42512 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACQueueScheduler.h @@ -0,0 +1,18 @@ +// +// RACQueueScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 11/30/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" + +/// An abstract scheduler which asynchronously enqueues all its work to a Grand +/// Central Dispatch queue. +/// +/// Because RACQueueScheduler is abstract, it should not be instantiated +/// directly. Create a subclass using the `RACQueueScheduler+Subclass.h` +/// interface and use that instead. +@interface RACQueueScheduler : RACScheduler +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACReplaySubject.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACReplaySubject.h new file mode 100644 index 0000000..3d429ea --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACReplaySubject.h @@ -0,0 +1,22 @@ +// +// RACReplaySubject.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/14/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSubject.h" + +extern const NSUInteger RACReplaySubjectUnlimitedCapacity; + +/// A replay subject saves the values it is sent (up to its defined capacity) +/// and resends those to new subscribers. It will also replay an error or +/// completion. +@interface RACReplaySubject : RACSubject + +/// Creates a new replay subject with the given capacity. A capacity of +/// RACReplaySubjectUnlimitedCapacity means values are never trimmed. ++ (instancetype)replaySubjectWithCapacity:(NSUInteger)capacity; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScheduler+Subclass.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScheduler+Subclass.h new file mode 100644 index 0000000..b6e8a9e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScheduler+Subclass.h @@ -0,0 +1,29 @@ +// +// RACScheduler.m +// ReactiveCocoa +// +// Created by Miķelis Vindavs on 5/27/14. +// Copyright (c) 2014 GitHub, Inc. All rights reserved. +// + +#import +#import "RACScheduler.h" + +/// An interface for use by subclasses. +/// +/// Subclasses should use `-performAsCurrentScheduler:` to do the actual block +/// invocation so that +[RACScheduler currentScheduler] behaves as expected. +/// +/// **Note that RACSchedulers are expected to be serial**. Subclasses must honor +/// that contract. See `RACTargetQueueScheduler` for a queue-based scheduler +/// which will enforce the serialization guarantee. +@interface RACScheduler () + +/// Performs the given block with the receiver as the current scheduler for +/// its thread. This should only be called by subclasses to perform their +/// scheduled blocks. +/// +/// block - The block to execute. Cannot be NULL. +- (void)performAsCurrentScheduler:(void (^)(void))block; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScheduler.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScheduler.h new file mode 100644 index 0000000..bd1b536 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScheduler.h @@ -0,0 +1,148 @@ +// +// RACScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/16/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +/// The priority for the scheduler. +/// +/// RACSchedulerPriorityHigh - High priority. +/// RACSchedulerPriorityDefault - Default priority. +/// RACSchedulerPriorityLow - Low priority. +/// RACSchedulerPriorityBackground - Background priority. +typedef enum : long { + RACSchedulerPriorityHigh = DISPATCH_QUEUE_PRIORITY_HIGH, + RACSchedulerPriorityDefault = DISPATCH_QUEUE_PRIORITY_DEFAULT, + RACSchedulerPriorityLow = DISPATCH_QUEUE_PRIORITY_LOW, + RACSchedulerPriorityBackground = DISPATCH_QUEUE_PRIORITY_BACKGROUND, +} RACSchedulerPriority; + +/// Scheduled with -scheduleRecursiveBlock:, this type of block is passed a block +/// with which it can call itself recursively. +typedef void (^RACSchedulerRecursiveBlock)(void (^reschedule)(void)); + +@class RACDisposable; + +/// Schedulers are used to control when and where work is performed. +@interface RACScheduler : NSObject + +/// A singleton scheduler that immediately executes the blocks it is given. +/// +/// **Note:** Unlike most other schedulers, this does not set the current +/// scheduler. There may still be a valid +currentScheduler if this is used +/// within a block scheduled on a different scheduler. ++ (RACScheduler *)immediateScheduler; + +/// A singleton scheduler that executes blocks in the main thread. ++ (RACScheduler *)mainThreadScheduler; + +/// Creates and returns a new background scheduler with the given priority and +/// name. The name is for debug and instrumentation purposes only. +/// +/// Scheduler creation is cheap. It's unnecessary to save the result of this +/// method call unless you want to serialize some actions on the same background +/// scheduler. ++ (RACScheduler *)schedulerWithPriority:(RACSchedulerPriority)priority name:(NSString *)name; + +/// Invokes +schedulerWithPriority:name: with a default name. ++ (RACScheduler *)schedulerWithPriority:(RACSchedulerPriority)priority; + +/// Invokes +schedulerWithPriority: with RACSchedulerPriorityDefault. ++ (RACScheduler *)scheduler; + +/// The current scheduler. This will only be valid when used from within a +/// -[RACScheduler schedule:] block or when on the main thread. ++ (RACScheduler *)currentScheduler; + +/// Schedule the given block for execution on the scheduler. +/// +/// Scheduled blocks will be executed in the order in which they were scheduled. +/// +/// block - The block to schedule for execution. Cannot be nil. +/// +/// Returns a disposable which can be used to cancel the scheduled block before +/// it begins executing, or nil if cancellation is not supported. +- (RACDisposable *)schedule:(void (^)(void))block; + +/// Schedule the given block for execution on the scheduler at or after +/// a specific time. +/// +/// Note that blocks scheduled for a certain time will not preempt any other +/// scheduled work that is executing at the time. +/// +/// When invoked on the +immediateScheduler, the calling thread **will block** +/// until the specified time. +/// +/// date - The earliest time at which `block` should begin executing. The block +/// may not execute immediately at this time, whether due to system load +/// or another block on the scheduler currently being run. Cannot be nil. +/// block - The block to schedule for execution. Cannot be nil. +/// +/// Returns a disposable which can be used to cancel the scheduled block before +/// it begins executing, or nil if cancellation is not supported. +- (RACDisposable *)after:(NSDate *)date schedule:(void (^)(void))block; + +/// Schedule the given block for execution on the scheduler after the delay. +/// +/// Converts the delay into an NSDate, then invokes `-after:schedule:`. +- (RACDisposable *)afterDelay:(NSTimeInterval)delay schedule:(void (^)(void))block; + +/// Reschedule the given block at a particular interval, starting at a specific +/// time, and with a given leeway for deferral. +/// +/// Note that blocks scheduled for a certain time will not preempt any other +/// scheduled work that is executing at the time. +/// +/// Regardless of the value of `leeway`, the given block may not execute exactly +/// at `when` or exactly on successive intervals, whether due to system load or +/// because another block is currently being run on the scheduler. +/// +/// It is considered undefined behavior to invoke this method on the +/// +immediateScheduler. +/// +/// date - The earliest time at which `block` should begin executing. The +/// block may not execute immediately at this time, whether due to +/// system load or another block on the scheduler currently being +/// run. Cannot be nil. +/// interval - The interval at which the block should be rescheduled, starting +/// from `date`. This will use the system wall clock, to avoid +/// skew when the computer goes to sleep. +/// leeway - A hint to the system indicating the number of seconds that each +/// scheduling can be deferred. Note that this is just a hint, and +/// there may be some additional latency no matter what. +/// block - The block to repeatedly schedule for execution. Cannot be nil. +/// +/// Returns a disposable which can be used to cancel the automatic scheduling and +/// rescheduling, or nil if cancellation is not supported. +- (RACDisposable *)after:(NSDate *)date repeatingEvery:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway schedule:(void (^)(void))block; + +/// Schedule the given recursive block for execution on the scheduler. The +/// scheduler will automatically flatten any recursive scheduling into iteration +/// instead, so this can be used without issue for blocks that may keep invoking +/// themselves forever. +/// +/// Scheduled blocks will be executed in the order in which they were scheduled. +/// +/// recursiveBlock - The block to schedule for execution. When invoked, the +/// recursive block will be passed a `void (^)(void)` block +/// which will reschedule the recursive block at the end of the +/// receiver's queue. This passed-in block will automatically +/// skip scheduling if the scheduling of the `recursiveBlock` +/// was disposed in the meantime. +/// +/// Returns a disposable which can be used to cancel the scheduled block before +/// it begins executing, or to stop it from rescheduling if it's already begun +/// execution. +- (RACDisposable *)scheduleRecursiveBlock:(RACSchedulerRecursiveBlock)recursiveBlock; + +@end + +@interface RACScheduler (Deprecated) + ++ (RACScheduler *)schedulerWithQueue:(dispatch_queue_t)queue name:(NSString *)name __attribute__((deprecated("Use -[RACTargetQueueScheduler initWithName:targetQueue:] instead."))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScopedDisposable.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScopedDisposable.h new file mode 100644 index 0000000..69c4a12 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACScopedDisposable.h @@ -0,0 +1,18 @@ +// +// RACScopedDisposable.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/28/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACDisposable.h" + +/// A disposable that calls its own -dispose when it is dealloc'd. +@interface RACScopedDisposable : RACDisposable + +/// Creates a new scoped disposable that will also dispose of the given +/// disposable when it is dealloc'd. ++ (instancetype)scopedDisposableWithDisposable:(RACDisposable *)disposable; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSequence.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSequence.h new file mode 100644 index 0000000..a39f840 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSequence.h @@ -0,0 +1,154 @@ +// +// RACSequence.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-29. +// Copyright (c) 2012 GitHub. All rights reserved. +// + +#import +#import "RACStream.h" + +@class RACScheduler; +@class RACSignal; + +/// Represents an immutable sequence of values. Unless otherwise specified, the +/// sequences' values are evaluated lazily on demand. Like Cocoa collections, +/// sequences cannot contain nil. +/// +/// Most inherited RACStream methods that accept a block will execute the block +/// _at most_ once for each value that is evaluated in the returned sequence. +/// Side effects are subject to the behavior described in +/// +sequenceWithHeadBlock:tailBlock:. +/// +/// Implemented as a class cluster. A minimal implementation for a subclass +/// consists simply of -head and -tail. +@interface RACSequence : RACStream + +/// The first object in the sequence, or nil if the sequence is empty. +/// +/// Subclasses must provide an implementation of this method. +@property (nonatomic, strong, readonly) id head; + +/// All but the first object in the sequence, or nil if the sequence is empty. +/// +/// Subclasses must provide an implementation of this method. +@property (nonatomic, strong, readonly) RACSequence *tail; + +/// Evaluates the full sequence to produce an equivalently-sized array. +@property (nonatomic, copy, readonly) NSArray *array; + +/// Returns an enumerator of all objects in the sequence. +@property (nonatomic, copy, readonly) NSEnumerator *objectEnumerator; + +/// Converts a sequence into an eager sequence. +/// +/// An eager sequence fully evaluates all of its values immediately. Sequences +/// derived from an eager sequence will also be eager. +/// +/// Returns a new eager sequence, or the receiver if the sequence is already +/// eager. +@property (nonatomic, copy, readonly) RACSequence *eagerSequence; + +/// Converts a sequence into a lazy sequence. +/// +/// A lazy sequence evaluates its values on demand, as they are accessed. +/// Sequences derived from a lazy sequence will also be lazy. +/// +/// Returns a new lazy sequence, or the receiver if the sequence is already lazy. +@property (nonatomic, copy, readonly) RACSequence *lazySequence; + +/// Invokes -signalWithScheduler: with a new RACScheduler. +- (RACSignal *)signal; + +/// Evaluates the full sequence on the given scheduler. +/// +/// Each item is evaluated in its own scheduled block, such that control of the +/// scheduler is yielded between each value. +/// +/// Returns a signal which sends the receiver's values on the given scheduler as +/// they're evaluated. +- (RACSignal *)signalWithScheduler:(RACScheduler *)scheduler; + +/// Applies a left fold to the sequence. +/// +/// This is the same as iterating the sequence along with a provided start value. +/// This uses a constant amount of memory. A left fold is left-associative so in +/// the sequence [1,2,3] the block would applied in the following order: +/// reduce(reduce(reduce(start, 1), 2), 3) +/// +/// start - The starting value for the fold. Used as `accumulator` for the +/// first fold. +/// reduce - The block used to combine the accumulated value and the next value. +/// Cannot be nil. +/// +/// Returns a reduced value. +- (id)foldLeftWithStart:(id)start reduce:(id (^)(id accumulator, id value))reduce; + +/// Applies a right fold to the sequence. +/// +/// A right fold is equivalent to recursion on the list. The block is evaluated +/// from the right to the left in list. It is right associative so it's applied +/// to the rightmost elements first. For example, in the sequence [1,2,3] the +/// block is applied in the order: +/// reduce(1, reduce(2, reduce(3, start))) +/// +/// start - The starting value for the fold. +/// reduce - The block used to combine the accumulated value and the next head. +/// The block is given the accumulated value and the value of the rest +/// of the computation (result of the recursion). This is computed when +/// you retrieve its value using `rest.head`. This allows you to +/// prevent unnecessary computation by not accessing `rest.head` if you +/// don't need to. +/// +/// Returns a reduced value. +- (id)foldRightWithStart:(id)start reduce:(id (^)(id first, RACSequence *rest))reduce; + +/// Check if any value in sequence passes the block. +/// +/// block - The block predicate used to check each item. Cannot be nil. +/// +/// Returns a boolean indiciating if any value in the sequence passed. +- (BOOL)any:(BOOL (^)(id value))block; + +/// Check if all values in the sequence pass the block. +/// +/// block - The block predicate used to check each item. Cannot be nil. +/// +/// Returns a boolean indicating if all values in the sequence passed. +- (BOOL)all:(BOOL (^)(id value))block; + +/// Returns the first object that passes the block. +/// +/// block - The block predicate used to check each item. Cannot be nil. +/// +/// Returns an object that passes the block or nil if no objects passed. +- (id)objectPassingTest:(BOOL (^)(id value))block; + +/// Creates a sequence that dynamically generates its values. +/// +/// headBlock - Invoked the first time -head is accessed. +/// tailBlock - Invoked the first time -tail is accessed. +/// +/// The results from each block are memoized, so each block will be invoked at +/// most once, no matter how many times the head and tail properties of the +/// sequence are accessed. +/// +/// Any side effects in `headBlock` or `tailBlock` should be thread-safe, since +/// the sequence may be evaluated at any time from any thread. Not only that, but +/// -tail may be accessed before -head, or both may be accessed simultaneously. +/// As noted above, side effects will only be triggered the _first_ time -head or +/// -tail is invoked. +/// +/// Returns a sequence that lazily invokes the given blocks to provide head and +/// tail. `headBlock` must not be nil. ++ (RACSequence *)sequenceWithHeadBlock:(id (^)(void))headBlock tailBlock:(RACSequence *(^)(void))tailBlock; + +@end + +@interface RACSequence (Deprecated) + +- (id)foldLeftWithStart:(id)start combine:(id (^)(id accumulator, id value))combine __attribute__((deprecated("Renamed to -foldLeftWithStart:reduce:"))); +- (id)foldRightWithStart:(id)start combine:(id (^)(id first, RACSequence *rest))combine __attribute__((deprecated("Renamed to -foldRightWithStart:reduce:"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSerialDisposable.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSerialDisposable.h new file mode 100644 index 0000000..a3fc1d4 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSerialDisposable.h @@ -0,0 +1,43 @@ +// +// RACSerialDisposable.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-22. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACDisposable.h" + +/// A disposable that contains exactly one other disposable and allows it to be +/// swapped out atomically. +@interface RACSerialDisposable : RACDisposable + +/// The inner disposable managed by the serial disposable. +/// +/// This property is thread-safe for reading and writing. However, if you want to +/// read the current value _and_ write a new one atomically, use +/// -swapInDisposable: instead. +/// +/// Disposing of the receiver will also dispose of the current disposable set for +/// this property, then set the property to nil. If any new disposable is set +/// after the receiver is disposed, it will be disposed immediately and this +/// property will remain set to nil. +@property (atomic, strong) RACDisposable *disposable; + +/// Creates a serial disposable which will wrap the given disposable. +/// +/// disposable - The value to set for `disposable`. This may be nil. +/// +/// Returns a RACSerialDisposable, or nil if an error occurs. ++ (instancetype)serialDisposableWithDisposable:(RACDisposable *)disposable; + +/// Atomically swaps the receiver's `disposable` for `newDisposable`. +/// +/// newDisposable - The new value for `disposable`. If the receiver has already +/// been disposed, this disposable will be too, and `disposable` +/// will remain set to nil. This argument may be nil. +/// +/// Returns the previous value for the `disposable` property. +- (RACDisposable *)swapInDisposable:(RACDisposable *)newDisposable; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSignal+Operations.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSignal+Operations.h new file mode 100644 index 0000000..07d395e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSignal+Operations.h @@ -0,0 +1,709 @@ +// +// RACSignal+Operations.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-09-06. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "RACSignal.h" + +/// The domain for errors originating in RACSignal operations. +extern NSString * const RACSignalErrorDomain; + +/// The error code used with -timeout:. +extern const NSInteger RACSignalErrorTimedOut; + +/// The error code used when a value passed into +switch:cases:default: does not +/// match any of the cases, and no default was given. +extern const NSInteger RACSignalErrorNoMatchingCase; + +@class RACCommand; +@class RACDisposable; +@class RACMulticastConnection; +@class RACScheduler; +@class RACSequence; +@class RACSubject; +@class RACTuple; +@protocol RACSubscriber; + +@interface RACSignal (Operations) + +/// Do the given block on `next`. This should be used to inject side effects into +/// the signal. +- (RACSignal *)doNext:(void (^)(id x))block; + +/// Do the given block on `error`. This should be used to inject side effects +/// into the signal. +- (RACSignal *)doError:(void (^)(NSError *error))block; + +/// Do the given block on `completed`. This should be used to inject side effects +/// into the signal. +- (RACSignal *)doCompleted:(void (^)(void))block; + +/// Sends `next`s only if we don't receive another `next` in `interval` seconds. +/// +/// If a `next` is received, and then another `next` is received before +/// `interval` seconds have passed, the first value is discarded. +/// +/// After `interval` seconds have passed since the most recent `next` was sent, +/// the most recent `next` is forwarded on the scheduler that the value was +/// originally received on. If +[RACScheduler currentScheduler] was nil at the +/// time, a private background scheduler is used. +/// +/// Returns a signal which sends throttled and delayed `next` events. Completion +/// and errors are always forwarded immediately. +- (RACSignal *)throttle:(NSTimeInterval)interval; + +/// Throttles `next`s for which `predicate` returns YES. +/// +/// When `predicate` returns YES for a `next`: +/// +/// 1. If another `next` is received before `interval` seconds have passed, the +/// prior value is discarded. This happens regardless of whether the new +/// value will be throttled. +/// 2. After `interval` seconds have passed since the value was originally +/// received, it will be forwarded on the scheduler that it was received +/// upon. If +[RACScheduler currentScheduler] was nil at the time, a private +/// background scheduler is used. +/// +/// When `predicate` returns NO for a `next`, it is forwarded immediately, +/// without any throttling. +/// +/// interval - The number of seconds for which to buffer the latest value that +/// passes `predicate`. +/// predicate - Passed each `next` from the receiver, this block returns +/// whether the given value should be throttled. This argument must +/// not be nil. +/// +/// Returns a signal which sends `next` events, throttled when `predicate` +/// returns YES. Completion and errors are always forwarded immediately. +- (RACSignal *)throttle:(NSTimeInterval)interval valuesPassingTest:(BOOL (^)(id next))predicate; + +/// Forwards `next` and `completed` events after delaying for `interval` seconds +/// on the current scheduler (on which the events were delivered). +/// +/// If +[RACScheduler currentScheduler] is nil when `next` or `completed` is +/// received, a private background scheduler is used. +/// +/// Returns a signal which sends delayed `next` and `completed` events. Errors +/// are always forwarded immediately. +- (RACSignal *)delay:(NSTimeInterval)interval; + +/// Resubscribes when the signal completes. +- (RACSignal *)repeat; + +/// Executes the given block each time a subscription is created. +/// +/// block - A block which defines the subscription side effects. Cannot be `nil`. +/// +/// Example: +/// +/// // Write new file, with backup. +/// [[[[fileManager +/// rac_createFileAtPath:path contents:data] +/// initially:^{ +/// // 2. Second, backup current file +/// [fileManager moveItemAtPath:path toPath:backupPath error:nil]; +/// }] +/// initially:^{ +/// // 1. First, acquire write lock. +/// [writeLock lock]; +/// }] +/// finally:^{ +/// [writeLock unlock]; +/// }]; +/// +/// Returns a signal that passes through all events of the receiver, plus +/// introduces side effects which occur prior to any subscription side effects +/// of the receiver. +- (RACSignal *)initially:(void (^)(void))block; + +/// Executes the given block when the signal completes or errors. +- (RACSignal *)finally:(void (^)(void))block; + +/// Divides the receiver's `next`s into buffers which deliver every `interval` +/// seconds. +/// +/// interval - The interval in which values are grouped into one buffer. +/// scheduler - The scheduler upon which the returned signal will deliver its +/// values. This must not be nil or +[RACScheduler +/// immediateScheduler]. +/// +/// Returns a signal which sends RACTuples of the buffered values at each +/// interval on `scheduler`. When the receiver completes, any currently-buffered +/// values will be sent immediately. +- (RACSignal *)bufferWithTime:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler; + +/// Collects all receiver's `next`s into a NSArray. Nil values will be converted +/// to NSNull. +/// +/// This corresponds to the `ToArray` method in Rx. +/// +/// Returns a signal which sends a single NSArray when the receiver completes +/// successfully. +- (RACSignal *)collect; + +/// Takes the last `count` `next`s after the receiving signal completes. +- (RACSignal *)takeLast:(NSUInteger)count; + +/// Combines the latest values from the receiver and the given signal into +/// RACTuples, once both have sent at least one `next`. +/// +/// Any additional `next`s will result in a new RACTuple with the latest values +/// from both signals. +/// +/// signal - The signal to combine with. This argument must not be nil. +/// +/// Returns a signal which sends RACTuples of the combined values, forwards any +/// `error` events, and completes when both input signals complete. +- (RACSignal *)combineLatestWith:(RACSignal *)signal; + +/// Combines the latest values from the given signals into RACTuples, once all +/// the signals have sent at least one `next`. +/// +/// Any additional `next`s will result in a new RACTuple with the latest values +/// from all signals. +/// +/// signals - The signals to combine. If this collection is empty, the returned +/// signal will immediately complete upon subscription. +/// +/// Returns a signal which sends RACTuples of the combined values, forwards any +/// `error` events, and completes when all input signals complete. ++ (RACSignal *)combineLatest:(id)signals; + +/// Combines signals using +combineLatest:, then reduces the resulting tuples +/// into a single value using -reduceEach:. +/// +/// signals - The signals to combine. If this collection is empty, the +/// returned signal will immediately complete upon subscription. +/// reduceBlock - The block which reduces the latest values from all the +/// signals into one value. It must take as many arguments as the +/// number of signals given. Each argument will be an object +/// argument. The return value must be an object. This argument +/// must not be nil. +/// +/// Example: +/// +/// [RACSignal combineLatest:@[ stringSignal, intSignal ] reduce:^(NSString *string, NSNumber *number) { +/// return [NSString stringWithFormat:@"%@: %@", string, number]; +/// }]; +/// +/// Returns a signal which sends the results from each invocation of +/// `reduceBlock`. ++ (RACSignal *)combineLatest:(id)signals reduce:(id (^)())reduceBlock; + +/// Merges the receiver and the given signal with `+merge:` and returns the +/// resulting signal. +- (RACSignal *)merge:(RACSignal *)signal; + +/// Sends the latest `next` from any of the signals. +/// +/// Returns a signal that passes through values from each of the given signals, +/// and sends `completed` when all of them complete. If any signal sends an error, +/// the returned signal sends `error` immediately. ++ (RACSignal *)merge:(id)signals; + +/// Merges the signals sent by the receiver into a flattened signal, but only +/// subscribes to `maxConcurrent` number of signals at a time. New signals are +/// queued and subscribed to as other signals complete. +/// +/// If an error occurs on any of the signals, it is sent on the returned signal. +/// It completes only after the receiver and all sent signals have completed. +/// +/// This corresponds to `Merge(IObservable>, Int32)` +/// in Rx. +/// +/// maxConcurrent - the maximum number of signals to subscribe to at a +/// time. If 0, it subscribes to an unlimited number of +/// signals. +- (RACSignal *)flatten:(NSUInteger)maxConcurrent; + +/// Ignores all `next`s from the receiver, waits for the receiver to complete, +/// then subscribes to a new signal. +/// +/// block - A block which will create or obtain a new signal to subscribe to, +/// executed only after the receiver completes. This block must not be +/// nil, and it must not return a nil signal. +/// +/// Returns a signal which will pass through the events of the signal created in +/// `block`. If the receiver errors out, the returned signal will error as well. +- (RACSignal *)then:(RACSignal * (^)(void))block; + +/// Concats the inner signals of a signal of signals. +- (RACSignal *)concat; + +/// Aggregates the `next` values of the receiver into a single combined value. +/// +/// The algorithm proceeds as follows: +/// +/// 1. `start` is passed into the block as the `running` value, and the first +/// element of the receiver is passed into the block as the `next` value. +/// 2. The result of the invocation (`running`) and the next element of the +/// receiver (`next`) is passed into `reduceBlock`. +/// 3. Steps 2 and 3 are repeated until all values have been processed. +/// 4. The last result of `reduceBlock` is sent on the returned signal. +/// +/// This method is similar to -scanWithStart:reduce:, except that only the +/// final result is sent on the returned signal. +/// +/// start - The value to be combined with the first element of the +/// receiver. This value may be `nil`. +/// reduceBlock - The block that describes how to combine values of the +/// receiver. If the receiver is empty, this block will never be +/// invoked. Cannot be nil. +/// +/// Returns a signal that will send the aggregated value when the receiver +/// completes, then itself complete. If the receiver never sends any values, +/// `start` will be sent instead. +- (RACSignal *)aggregateWithStart:(id)start reduce:(id (^)(id running, id next))reduceBlock; + +/// Aggregates the `next` values of the receiver into a single combined value. +/// This is indexed version of -aggregateWithStart:reduce:. +/// +/// start - The value to be combined with the first element of the +/// receiver. This value may be `nil`. +/// reduceBlock - The block that describes how to combine values of the +/// receiver. This block takes zero-based index value as the last +/// parameter. If the receiver is empty, this block will never be +/// invoked. Cannot be nil. +/// +/// Returns a signal that will send the aggregated value when the receiver +/// completes, then itself complete. If the receiver never sends any values, +/// `start` will be sent instead. +- (RACSignal *)aggregateWithStart:(id)start reduceWithIndex:(id (^)(id running, id next, NSUInteger index))reduceBlock; + +/// Aggregates the `next` values of the receiver into a single combined value. +/// +/// This invokes `startFactory` block on each subscription, then calls +/// -aggregateWithStart:reduce: with the return value of the block as start value. +/// +/// startFactory - The block that returns start value which will be combined +/// with the first element of the receiver. Cannot be nil. +/// reduceBlock - The block that describes how to combine values of the +/// receiver. If the receiver is empty, this block will never be +/// invoked. Cannot be nil. +/// +/// Returns a signal that will send the aggregated value when the receiver +/// completes, then itself complete. If the receiver never sends any values, +/// the return value of `startFactory` will be sent instead. +- (RACSignal *)aggregateWithStartFactory:(id (^)(void))startFactory reduce:(id (^)(id running, id next))reduceBlock; + +/// Invokes -setKeyPath:onObject:nilValue: with `nil` for the nil value. +/// +/// WARNING: Under certain conditions, this method is known to be thread-unsafe. +/// See the description in -setKeyPath:onObject:nilValue:. +- (RACDisposable *)setKeyPath:(NSString *)keyPath onObject:(NSObject *)object; + +/// Binds the receiver to an object, automatically setting the given key path on +/// every `next`. When the signal completes, the binding is automatically +/// disposed of. +/// +/// WARNING: Under certain conditions, this method is known to be thread-unsafe. +/// A crash can result if `object` is deallocated concurrently on +/// another thread within a window of time between a value being sent +/// on this signal and immediately prior to the invocation of +/// -setValue:forKeyPath:, which sets the property. To prevent this, +/// ensure `object` is deallocated on the same thread the receiver +/// sends on, or ensure that the returned disposable is disposed of +/// before `object` deallocates. +/// See https://github.com/ReactiveCocoa/ReactiveCocoa/pull/1184 +/// +/// Sending an error on the signal is considered undefined behavior, and will +/// generate an assertion failure in Debug builds. +/// +/// A given key on an object should only have one active signal bound to it at any +/// given time. Binding more than one signal to the same property is considered +/// undefined behavior. +/// +/// keyPath - The key path to update with `next`s from the receiver. +/// object - The object that `keyPath` is relative to. +/// nilValue - The value to set at the key path whenever `nil` is sent by the +/// receiver. This may be nil when binding to object properties, but +/// an NSValue should be used for primitive properties, to avoid an +/// exception if `nil` is sent (which might occur if an intermediate +/// object is set to `nil`). +/// +/// Returns a disposable which can be used to terminate the binding. +- (RACDisposable *)setKeyPath:(NSString *)keyPath onObject:(NSObject *)object nilValue:(id)nilValue; + +/// Sends NSDate.date every `interval` seconds. +/// +/// interval - The time interval in seconds at which the current time is sent. +/// scheduler - The scheduler upon which the current NSDate should be sent. This +/// must not be nil or +[RACScheduler immediateScheduler]. +/// +/// Returns a signal that sends the current date/time every `interval` on +/// `scheduler`. ++ (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler; + +/// Sends NSDate.date at intervals of at least `interval` seconds, up to +/// approximately `interval` + `leeway` seconds. +/// +/// The created signal will defer sending each `next` for at least `interval` +/// seconds, and for an additional amount of time up to `leeway` seconds in the +/// interest of performance or power consumption. Note that some additional +/// latency is to be expected, even when specifying a `leeway` of 0. +/// +/// interval - The base interval between `next`s. +/// scheduler - The scheduler upon which the current NSDate should be sent. This +/// must not be nil or +[RACScheduler immediateScheduler]. +/// leeway - The maximum amount of additional time the `next` can be deferred. +/// +/// Returns a signal that sends the current date/time at intervals of at least +/// `interval seconds` up to approximately `interval` + `leeway` seconds on +/// `scheduler`. ++ (RACSignal *)interval:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler withLeeway:(NSTimeInterval)leeway; + +/// Takes `next`s until the `signalTrigger` sends `next` or `completed`. +/// +/// Returns a signal which passes through all events from the receiver until +/// `signalTrigger` sends `next` or `completed`, at which point the returned signal +/// will send `completed`. +- (RACSignal *)takeUntil:(RACSignal *)signalTrigger; + +/// Takes `next`s until the `replacement` sends an event. +/// +/// replacement - The signal which replaces the receiver as soon as it sends an +/// event. +/// +/// Returns a signal which passes through `next`s and `error` from the receiver +/// until `replacement` sends an event, at which point the returned signal will +/// send that event and switch to passing through events from `replacement` +/// instead, regardless of whether the receiver has sent events already. +- (RACSignal *)takeUntilReplacement:(RACSignal *)replacement; + +/// Subscribes to the returned signal when an error occurs. +- (RACSignal *)catch:(RACSignal * (^)(NSError *error))catchBlock; + +/// Subscribes to the given signal when an error occurs. +- (RACSignal *)catchTo:(RACSignal *)signal; + +/// Runs `tryBlock` against each of the receiver's values, passing values +/// until `tryBlock` returns NO, or the receiver completes. +/// +/// tryBlock - An action to run against each of the receiver's values. +/// The block should return YES to indicate that the action was +/// successful. This block must not be nil. +/// +/// Example: +/// +/// // The returned signal will send an error if data values cannot be +/// // written to `someFileURL`. +/// [signal try:^(NSData *data, NSError **errorPtr) { +/// return [data writeToURL:someFileURL options:NSDataWritingAtomic error:errorPtr]; +/// }]; +/// +/// Returns a signal which passes through all the values of the receiver. If +/// `tryBlock` fails for any value, the returned signal will error using the +/// `NSError` passed out from the block. +- (RACSignal *)try:(BOOL (^)(id value, NSError **errorPtr))tryBlock; + +/// Runs `mapBlock` against each of the receiver's values, mapping values until +/// `mapBlock` returns nil, or the receiver completes. +/// +/// mapBlock - An action to map each of the receiver's values. The block should +/// return a non-nil value to indicate that the action was successful. +/// This block must not be nil. +/// +/// Example: +/// +/// // The returned signal will send an error if data cannot be read from +/// // `fileURL`. +/// [signal tryMap:^(NSURL *fileURL, NSError **errorPtr) { +/// return [NSData dataWithContentsOfURL:fileURL options:0 error:errorPtr]; +/// }]; +/// +/// Returns a signal which transforms all the values of the receiver. If +/// `mapBlock` returns nil for any value, the returned signal will error using +/// the `NSError` passed out from the block. +- (RACSignal *)tryMap:(id (^)(id value, NSError **errorPtr))mapBlock; + +/// Returns the first `next`. Note that this is a blocking call. +- (id)first; + +/// Returns the first `next` or `defaultValue` if the signal completes or errors +/// without sending a `next`. Note that this is a blocking call. +- (id)firstOrDefault:(id)defaultValue; + +/// Returns the first `next` or `defaultValue` if the signal completes or errors +/// without sending a `next`. If an error occurs success will be NO and error +/// will be populated. Note that this is a blocking call. +/// +/// Both success and error may be NULL. +- (id)firstOrDefault:(id)defaultValue success:(BOOL *)success error:(NSError **)error; + +/// Blocks the caller and waits for the signal to complete. +/// +/// error - If not NULL, set to any error that occurs. +/// +/// Returns whether the signal completed successfully. If NO, `error` will be set +/// to the error that occurred. +- (BOOL)waitUntilCompleted:(NSError **)error; + +/// Defers creation of a signal until the signal's actually subscribed to. +/// +/// This can be used to effectively turn a hot signal into a cold signal. ++ (RACSignal *)defer:(RACSignal * (^)(void))block; + +/// Every time the receiver sends a new RACSignal, subscribes and sends `next`s and +/// `error`s only for that signal. +/// +/// The receiver must be a signal of signals. +/// +/// Returns a signal which passes through `next`s and `error`s from the latest +/// signal sent by the receiver, and sends `completed` when both the receiver and +/// the last sent signal complete. +- (RACSignal *)switchToLatest; + +/// Switches between the signals in `cases` as well as `defaultSignal` based on +/// the latest value sent by `signal`. +/// +/// signal - A signal of objects used as keys in the `cases` dictionary. +/// This argument must not be nil. +/// cases - A dictionary that has signals as values. This argument must +/// not be nil. A RACTupleNil key in this dictionary will match +/// nil `next` events that are received on `signal`. +/// defaultSignal - The signal to pass through after `signal` sends a value for +/// which `cases` does not contain a signal. If nil, any +/// unmatched values will result in +/// a RACSignalErrorNoMatchingCase error. +/// +/// Returns a signal which passes through `next`s and `error`s from one of the +/// the signals in `cases` or `defaultSignal`, and sends `completed` when both +/// `signal` and the last used signal complete. If no `defaultSignal` is given, +/// an unmatched `next` will result in an error on the returned signal. ++ (RACSignal *)switch:(RACSignal *)signal cases:(NSDictionary *)cases default:(RACSignal *)defaultSignal; + +/// Switches between `trueSignal` and `falseSignal` based on the latest value +/// sent by `boolSignal`. +/// +/// boolSignal - A signal of BOOLs determining whether `trueSignal` or +/// `falseSignal` should be active. This argument must not be nil. +/// trueSignal - The signal to pass through after `boolSignal` has sent YES. +/// This argument must not be nil. +/// falseSignal - The signal to pass through after `boolSignal` has sent NO. This +/// argument must not be nil. +/// +/// Returns a signal which passes through `next`s and `error`s from `trueSignal` +/// and/or `falseSignal`, and sends `completed` when both `boolSignal` and the +/// last switched signal complete. ++ (RACSignal *)if:(RACSignal *)boolSignal then:(RACSignal *)trueSignal else:(RACSignal *)falseSignal; + +/// Adds every `next` to an array. Nils are represented by NSNulls. Note that +/// this is a blocking call. +/// +/// **This is not the same as the `ToArray` method in Rx.** See -collect for +/// that behavior instead. +/// +/// Returns the array of `next` values, or nil if an error occurs. +- (NSArray *)toArray; + +/// Adds every `next` to a sequence. Nils are represented by NSNulls. +/// +/// This corresponds to the `ToEnumerable` method in Rx. +/// +/// Returns a sequence which provides values from the signal as they're sent. +/// Trying to retrieve a value from the sequence which has not yet been sent will +/// block. +@property (nonatomic, strong, readonly) RACSequence *sequence; + +/// Creates and returns a multicast connection. This allows you to share a single +/// subscription to the underlying signal. +- (RACMulticastConnection *)publish; + +/// Creates and returns a multicast connection that pushes values into the given +/// subject. This allows you to share a single subscription to the underlying +/// signal. +- (RACMulticastConnection *)multicast:(RACSubject *)subject; + +/// Multicasts the signal to a RACReplaySubject of unlimited capacity, and +/// immediately connects to the resulting RACMulticastConnection. +/// +/// Returns the connected, multicasted signal. +- (RACSignal *)replay; + +/// Multicasts the signal to a RACReplaySubject of capacity 1, and immediately +/// connects to the resulting RACMulticastConnection. +/// +/// Returns the connected, multicasted signal. +- (RACSignal *)replayLast; + +/// Multicasts the signal to a RACReplaySubject of unlimited capacity, and +/// lazily connects to the resulting RACMulticastConnection. +/// +/// This means the returned signal will subscribe to the multicasted signal only +/// when the former receives its first subscription. +/// +/// Returns the lazily connected, multicasted signal. +- (RACSignal *)replayLazily; + +/// Sends an error after `interval` seconds if the source doesn't complete +/// before then. +/// +/// The error will be in the RACSignalErrorDomain and have a code of +/// RACSignalErrorTimedOut. +/// +/// interval - The number of seconds after which the signal should error out. +/// scheduler - The scheduler upon which any timeout error should be sent. This +/// must not be nil or +[RACScheduler immediateScheduler]. +/// +/// Returns a signal that passes through the receiver's events, until the stream +/// finishes or times out, at which point an error will be sent on `scheduler`. +- (RACSignal *)timeout:(NSTimeInterval)interval onScheduler:(RACScheduler *)scheduler; + +/// Creates and returns a signal that delivers its events on the given scheduler. +/// Any side effects of the receiver will still be performed on the original +/// thread. +/// +/// This is ideal when the signal already performs its work on the desired +/// thread, but you want to handle its events elsewhere. +/// +/// This corresponds to the `ObserveOn` method in Rx. +- (RACSignal *)deliverOn:(RACScheduler *)scheduler; + +/// Creates and returns a signal that executes its side effects and delivers its +/// events on the given scheduler. +/// +/// Use of this operator should be avoided whenever possible, because the +/// receiver's side effects may not be safe to run on another thread. If you just +/// want to receive the signal's events on `scheduler`, use -deliverOn: instead. +- (RACSignal *)subscribeOn:(RACScheduler *)scheduler; + +/// Creates and returns a signal that delivers its events on the main thread. +/// If events are already being sent on the main thread, they may be passed on +/// without delay. An event will instead be queued for later delivery on the main +/// thread if sent on another thread, or if a previous event is already being +/// processed, or has been queued. +/// +/// Any side effects of the receiver will still be performed on the original +/// thread. +/// +/// This can be used when a signal will cause UI updates, to avoid potential +/// flicker caused by delayed delivery of events, such as the first event from +/// a RACObserve at view instantiation. +- (RACSignal *)deliverOnMainThread; + +/// Groups each received object into a group, as determined by calling `keyBlock` +/// with that object. The object sent is transformed by calling `transformBlock` +/// with the object. If `transformBlock` is nil, it sends the original object. +/// +/// The returned signal is a signal of RACGroupedSignal. +- (RACSignal *)groupBy:(id (^)(id object))keyBlock transform:(id (^)(id object))transformBlock; + +/// Calls -[RACSignal groupBy:keyBlock transform:nil]. +- (RACSignal *)groupBy:(id (^)(id object))keyBlock; + +/// Sends an [NSNumber numberWithBool:YES] if the receiving signal sends any +/// objects. +- (RACSignal *)any; + +/// Sends an [NSNumber numberWithBool:YES] if the receiving signal sends any +/// objects that pass `predicateBlock`. +/// +/// predicateBlock - cannot be nil. +- (RACSignal *)any:(BOOL (^)(id object))predicateBlock; + +/// Sends an [NSNumber numberWithBool:YES] if all the objects the receiving +/// signal sends pass `predicateBlock`. +/// +/// predicateBlock - cannot be nil. +- (RACSignal *)all:(BOOL (^)(id object))predicateBlock; + +/// Resubscribes to the receiving signal if an error occurs, up until it has +/// retried the given number of times. +/// +/// retryCount - if 0, it keeps retrying until it completes. +- (RACSignal *)retry:(NSInteger)retryCount; + +/// Resubscribes to the receiving signal if an error occurs. +- (RACSignal *)retry; + +/// Sends the latest value from the receiver only when `sampler` sends a value. +/// The returned signal could repeat values if `sampler` fires more often than +/// the receiver. Values from `sampler` are ignored before the receiver sends +/// its first value. +/// +/// sampler - The signal that controls when the latest value from the receiver +/// is sent. Cannot be nil. +- (RACSignal *)sample:(RACSignal *)sampler; + +/// Ignores all `next`s from the receiver. +/// +/// Returns a signal which only passes through `error` or `completed` events from +/// the receiver. +- (RACSignal *)ignoreValues; + +/// Converts each of the receiver's events into a RACEvent object. +/// +/// Returns a signal which sends the receiver's events as RACEvents, and +/// completes after the receiver sends `completed` or `error`. +- (RACSignal *)materialize; + +/// Converts each RACEvent in the receiver back into "real" RACSignal events. +/// +/// Returns a signal which sends `next` for each value RACEvent, `error` for each +/// error RACEvent, and `completed` for each completed RACEvent. +- (RACSignal *)dematerialize; + +/// Inverts each NSNumber-wrapped BOOL sent by the receiver. It will assert if +/// the receiver sends anything other than NSNumbers. +/// +/// Returns a signal of inverted NSNumber-wrapped BOOLs. +- (RACSignal *)not; + +/// Performs a boolean AND on all of the RACTuple of NSNumbers in sent by the receiver. +/// +/// Asserts if the receiver sends anything other than a RACTuple of one or more NSNumbers. +/// +/// Returns a signal that applies AND to each NSNumber in the tuple. +- (RACSignal *)and; + +/// Performs a boolean OR on all of the RACTuple of NSNumbers in sent by the receiver. +/// +/// Asserts if the receiver sends anything other than a RACTuple of one or more NSNumbers. +/// +/// Returns a signal that applies OR to each NSNumber in the tuple. +- (RACSignal *)or; + +/// Sends the result of calling the block with arguments as packed in each RACTuple +/// sent by the receiver. +/// +/// The receiver must send tuple values, where the first element of the tuple is +/// a block, taking a number of parameters equal to the count of the remaining +/// elements of the tuple, and returning an object. Each block must take at least +/// one argument, so each tuple must contain at least 2 elements. +/// +/// Example: +/// +/// RACSignal *adder = [RACSignal return:^(NSNumber *a, NSNumber *b) { +/// return @(a.intValue + b.intValue); +/// }]; +/// RACSignal *sums = [[RACSignal +/// combineLatest:@[ adder, as, bs ]] +/// reduceApply]; +/// +/// Returns a signal of the result of applying the first element of each tuple +/// to the remaining elements. +- (RACSignal *)reduceApply; + +@end + +@interface RACSignal (OperationsDeprecated) + +- (RACSignal *)windowWithStart:(RACSignal *)openSignal close:(RACSignal * (^)(RACSignal *start))closeBlock __attribute__((deprecated("See https://github.com/ReactiveCocoa/ReactiveCocoa/issues/587"))); +- (RACSignal *)buffer:(NSUInteger)bufferCount __attribute__((deprecated("See https://github.com/ReactiveCocoa/ReactiveCocoa/issues/587"))); +- (RACSignal *)let:(RACSignal * (^)(RACSignal *sharedSignal))letBlock __attribute__((deprecated("Use -publish instead"))); ++ (RACSignal *)interval:(NSTimeInterval)interval __attribute__((deprecated("Use +interval:onScheduler: instead"))); ++ (RACSignal *)interval:(NSTimeInterval)interval withLeeway:(NSTimeInterval)leeway __attribute__((deprecated("Use +interval:onScheduler:withLeeway: instead"))); +- (RACSignal *)bufferWithTime:(NSTimeInterval)interval __attribute__((deprecated("Use -bufferWithTime:onScheduler: instead"))); +- (RACSignal *)timeout:(NSTimeInterval)interval __attribute__((deprecated("Use -timeout:onScheduler: instead"))); +- (RACDisposable *)toProperty:(NSString *)keyPath onObject:(NSObject *)object __attribute__((deprecated("Renamed to -setKeyPath:onObject:"))); +- (RACSignal *)ignoreElements __attribute__((deprecated("Renamed to -ignoreValues"))); +- (RACSignal *)sequenceNext:(RACSignal * (^)(void))block __attribute__((deprecated("Renamed to -then:"))); +- (RACSignal *)aggregateWithStart:(id)start combine:(id (^)(id running, id next))combineBlock __attribute__((deprecated("Renamed to -aggregateWithStart:reduce:"))); +- (RACSignal *)aggregateWithStartFactory:(id (^)(void))startFactory combine:(id (^)(id running, id next))combineBlock __attribute__((deprecated("Renamed to -aggregateWithStartFactory:reduce:"))); +- (RACDisposable *)executeCommand:(RACCommand *)command __attribute__((deprecated("Use -flattenMap: or -subscribeNext: instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSignal.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSignal.h new file mode 100644 index 0000000..ed644cf --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSignal.h @@ -0,0 +1,219 @@ +// +// RACSignal.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/1/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "RACStream.h" + +@class RACDisposable; +@class RACScheduler; +@class RACSubject; +@protocol RACSubscriber; + +@interface RACSignal : RACStream + +/// Creates a new signal. This is the preferred way to create a new signal +/// operation or behavior. +/// +/// Events can be sent to new subscribers immediately in the `didSubscribe` +/// block, but the subscriber will not be able to dispose of the signal until +/// a RACDisposable is returned from `didSubscribe`. In the case of infinite +/// signals, this won't _ever_ happen if events are sent immediately. +/// +/// To ensure that the signal is disposable, events can be scheduled on the +/// +[RACScheduler currentScheduler] (so that they're deferred, not sent +/// immediately), or they can be sent in the background. The RACDisposable +/// returned by the `didSubscribe` block should cancel any such scheduling or +/// asynchronous work. +/// +/// didSubscribe - Called when the signal is subscribed to. The new subscriber is +/// passed in. You can then manually control the by +/// sending it -sendNext:, -sendError:, and -sendCompleted, +/// as defined by the operation you're implementing. This block +/// should return a RACDisposable which cancels any ongoing work +/// triggered by the subscription, and cleans up any resources or +/// disposables created as part of it. When the disposable is +/// disposed of, the signal must not send any more events to the +/// `subscriber`. If no cleanup is necessary, return nil. +/// +/// **Note:** The `didSubscribe` block is called every time a new subscriber +/// subscribes. Any side effects within the block will thus execute once for each +/// subscription, not necessarily on one thread, and possibly even +/// simultaneously! ++ (RACSignal *)createSignal:(RACDisposable * (^)(id subscriber))didSubscribe; + +/// Returns a signal that immediately sends the given error. ++ (RACSignal *)error:(NSError *)error; + +/// Returns a signal that never completes. ++ (RACSignal *)never; + +/// Immediately schedules the given block on the given scheduler. The block is +/// given a subscriber to which it can send events. +/// +/// scheduler - The scheduler on which `block` will be scheduled and results +/// delivered. Cannot be nil. +/// block - The block to invoke. Cannot be NULL. +/// +/// Returns a signal which will send all events sent on the subscriber given to +/// `block`. All events will be sent on `scheduler` and it will replay any missed +/// events to new subscribers. ++ (RACSignal *)startEagerlyWithScheduler:(RACScheduler *)scheduler block:(void (^)(id subscriber))block; + +/// Invokes the given block only on the first subscription. The block is given a +/// subscriber to which it can send events. +/// +/// Note that disposing of the subscription to the returned signal will *not* +/// dispose of the underlying subscription. If you need that behavior, see +/// -[RACMulticastConnection autoconnect]. The underlying subscription will never +/// be disposed of. Because of this, `block` should never return an infinite +/// signal since there would be no way of ending it. +/// +/// scheduler - The scheduler on which the block should be scheduled. Note that +/// if given +[RACScheduler immediateScheduler], the block will be +/// invoked synchronously on the first subscription. Cannot be nil. +/// block - The block to invoke on the first subscription. Cannot be NULL. +/// +/// Returns a signal which will pass through the events sent to the subscriber +/// given to `block` and replay any missed events to new subscribers. ++ (RACSignal *)startLazilyWithScheduler:(RACScheduler *)scheduler block:(void (^)(id subscriber))block; + +@end + +@interface RACSignal (RACStream) + +/// Returns a signal that immediately sends the given value and then completes. ++ (RACSignal *)return:(id)value; + +/// Returns a signal that immediately completes. ++ (RACSignal *)empty; + +/// Subscribes to `signal` when the source signal completes. +- (RACSignal *)concat:(RACSignal *)signal; + +/// Zips the values in the receiver with those of the given signal to create +/// RACTuples. +/// +/// The first `next` of each stream will be combined, then the second `next`, and +/// so forth, until either signal completes or errors. +/// +/// signal - The signal to zip with. This must not be `nil`. +/// +/// Returns a new signal of RACTuples, representing the combined values of the +/// two signals. Any error from one of the original signals will be forwarded on +/// the returned signal. +- (RACSignal *)zipWith:(RACSignal *)signal; + +@end + +@interface RACSignal (Subscription) + +/// Subscribes `subscriber` to changes on the receiver. The receiver defines which +/// events it actually sends and in what situations the events are sent. +/// +/// Subscription will always happen on a valid RACScheduler. If the +/// +[RACScheduler currentScheduler] cannot be determined at the time of +/// subscription (e.g., because the calling code is running on a GCD queue or +/// NSOperationQueue), subscription will occur on a private background scheduler. +/// On the main thread, subscriptions will always occur immediately, with a +/// +[RACScheduler currentScheduler] of +[RACScheduler mainThreadScheduler]. +/// +/// This method must be overridden by any subclasses. +/// +/// Returns nil or a disposable. You can call -[RACDisposable dispose] if you +/// need to end your subscription before it would "naturally" end, either by +/// completing or erroring. Once the disposable has been disposed, the subscriber +/// won't receive any more events from the subscription. +- (RACDisposable *)subscribe:(id)subscriber; + +/// Convenience method to subscribe to the `next` event. +/// +/// This corresponds to `IObserver.OnNext` in Rx. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock; + +/// Convenience method to subscribe to the `next` and `completed` events. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock completed:(void (^)(void))completedBlock; + +/// Convenience method to subscribe to the `next`, `completed`, and `error` events. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock error:(void (^)(NSError *error))errorBlock completed:(void (^)(void))completedBlock; + +/// Convenience method to subscribe to `error` events. +/// +/// This corresponds to the `IObserver.OnError` in Rx. +- (RACDisposable *)subscribeError:(void (^)(NSError *error))errorBlock; + +/// Convenience method to subscribe to `completed` events. +/// +/// This corresponds to the `IObserver.OnCompleted` in Rx. +- (RACDisposable *)subscribeCompleted:(void (^)(void))completedBlock; + +/// Convenience method to subscribe to `next` and `error` events. +- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock error:(void (^)(NSError *error))errorBlock; + +/// Convenience method to subscribe to `error` and `completed` events. +- (RACDisposable *)subscribeError:(void (^)(NSError *error))errorBlock completed:(void (^)(void))completedBlock; + +@end + +/// Additional methods to assist with debugging. +@interface RACSignal (Debugging) + +/// Logs all events that the receiver sends. +- (RACSignal *)logAll; + +/// Logs each `next` that the receiver sends. +- (RACSignal *)logNext; + +/// Logs any error that the receiver sends. +- (RACSignal *)logError; + +/// Logs any `completed` event that the receiver sends. +- (RACSignal *)logCompleted; + +@end + +/// Additional methods to assist with unit testing. +/// +/// **These methods should never ship in production code.** +@interface RACSignal (Testing) + +/// Spins the main run loop for a short while, waiting for the receiver to send a `next`. +/// +/// **Because this method executes the run loop recursively, it should only be used +/// on the main thread, and only from a unit test.** +/// +/// defaultValue - Returned if the receiver completes or errors before sending +/// a `next`, or if the method times out. This argument may be +/// nil. +/// success - If not NULL, set to whether the receiver completed +/// successfully. +/// error - If not NULL, set to any error that occurred. +/// +/// Returns the first value received, or `defaultValue` if no value is received +/// before the signal finishes or the method times out. +- (id)asynchronousFirstOrDefault:(id)defaultValue success:(BOOL *)success error:(NSError **)error; + +/// Spins the main run loop for a short while, waiting for the receiver to complete. +/// +/// **Because this method executes the run loop recursively, it should only be used +/// on the main thread, and only from a unit test.** +/// +/// error - If not NULL, set to any error that occurs. +/// +/// Returns whether the signal completed successfully before timing out. If NO, +/// `error` will be set to any error that occurred. +- (BOOL)asynchronouslyWaitUntilCompleted:(NSError **)error; + +@end + +@interface RACSignal (Deprecated) + ++ (RACSignal *)start:(id (^)(BOOL *success, NSError **error))block __attribute__((deprecated("Use +startEagerlyWithScheduler:block: instead"))); ++ (RACSignal *)startWithScheduler:(RACScheduler *)scheduler subjectBlock:(void (^)(RACSubject *subject))block __attribute__((deprecated("Use +startEagerlyWithScheduler:block: instead"))); ++ (RACSignal *)startWithScheduler:(RACScheduler *)scheduler block:(id (^)(BOOL *success, NSError **error))block __attribute__((deprecated("Use +startEagerlyWithScheduler:block: instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACStream.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACStream.h new file mode 100644 index 0000000..ab0060f --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACStream.h @@ -0,0 +1,335 @@ +// +// RACStream.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2012-10-31. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACStream; + +/// A block which accepts a value from a RACStream and returns a new instance +/// of the same stream class. +/// +/// Setting `stop` to `YES` will cause the bind to terminate after the returned +/// value. Returning `nil` will result in immediate termination. +typedef RACStream * (^RACStreamBindBlock)(id value, BOOL *stop); + +/// An abstract class representing any stream of values. +/// +/// This class represents a monad, upon which many stream-based operations can +/// be built. +/// +/// When subclassing RACStream, only the methods in the main @interface body need +/// to be overridden. +@interface RACStream : NSObject + +/// Returns an empty stream. ++ (instancetype)empty; + +/// Lifts `value` into the stream monad. +/// +/// Returns a stream containing only the given value. ++ (instancetype)return:(id)value; + +/// Lazily binds a block to the values in the receiver. +/// +/// This should only be used if you need to terminate the bind early, or close +/// over some state. -flattenMap: is more appropriate for all other cases. +/// +/// block - A block returning a RACStreamBindBlock. This block will be invoked +/// each time the bound stream is re-evaluated. This block must not be +/// nil or return nil. +/// +/// Returns a new stream which represents the combined result of all lazy +/// applications of `block`. +- (instancetype)bind:(RACStreamBindBlock (^)(void))block; + +/// Appends the values of `stream` to the values in the receiver. +/// +/// stream - A stream to concatenate. This must be an instance of the same +/// concrete class as the receiver, and should not be `nil`. +/// +/// Returns a new stream representing the receiver followed by `stream`. +- (instancetype)concat:(RACStream *)stream; + +/// Zips the values in the receiver with those of the given stream to create +/// RACTuples. +/// +/// The first value of each stream will be combined, then the second value, and +/// so forth, until at least one of the streams is exhausted. +/// +/// stream - The stream to zip with. This must be an instance of the same +/// concrete class as the receiver, and should not be `nil`. +/// +/// Returns a new stream of RACTuples, representing the zipped values of the +/// two streams. +- (instancetype)zipWith:(RACStream *)stream; + +@end + +/// This extension contains functionality to support naming streams for +/// debugging. +/// +/// Subclasses do not need to override the methods here. +@interface RACStream () + +/// The name of the stream. This is for debugging/human purposes only. +@property (copy) NSString *name; + +/// Sets the name of the receiver to the given format string. +/// +/// This is for debugging purposes only, and won't do anything unless the +/// RAC_DEBUG_SIGNAL_NAMES environment variable is set. +/// +/// Returns the receiver, for easy method chaining. +- (instancetype)setNameWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); + +@end + +/// Operations built on the RACStream primitives. +/// +/// These methods do not need to be overridden, although subclasses may +/// occasionally gain better performance from doing so. +@interface RACStream (Operations) + +/// Maps `block` across the values in the receiver and flattens the result. +/// +/// Note that operators applied _after_ -flattenMap: behave differently from +/// operators _within_ -flattenMap:. See the Examples section below. +/// +/// This corresponds to the `SelectMany` method in Rx. +/// +/// block - A block which accepts the values in the receiver and returns a new +/// instance of the receiver's class. Returning `nil` from this block is +/// equivalent to returning an empty signal. +/// +/// Examples +/// +/// [signal flattenMap:^(id x) { +/// // Logs each time a returned signal completes. +/// return [[RACSignal return:x] logCompleted]; +/// }]; +/// +/// [[signal +/// flattenMap:^(id x) { +/// return [RACSignal return:x]; +/// }] +/// // Logs only once, when all of the signals complete. +/// logCompleted]; +/// +/// Returns a new stream which represents the combined streams resulting from +/// mapping `block`. +- (instancetype)flattenMap:(RACStream * (^)(id value))block; + +/// Flattens a stream of streams. +/// +/// This corresponds to the `Merge` method in Rx. +/// +/// Returns a stream consisting of the combined streams obtained from the +/// receiver. +- (instancetype)flatten; + +/// Maps `block` across the values in the receiver. +/// +/// This corresponds to the `Select` method in Rx. +/// +/// Returns a new stream with the mapped values. +- (instancetype)map:(id (^)(id value))block; + +/// Replaces each value in the receiver with the given object. +/// +/// Returns a new stream which includes the given object once for each value in +/// the receiver. +- (instancetype)mapReplace:(id)object; + +/// Filters out values in the receiver that don't pass the given test. +/// +/// This corresponds to the `Where` method in Rx. +/// +/// Returns a new stream with only those values that passed. +- (instancetype)filter:(BOOL (^)(id value))block; + +/// Filters out values in the receiver that equal (via -isEqual:) the provided value. +/// +/// value - The value can be `nil`, in which case it ignores `nil` values. +/// +/// Returns a new stream containing only the values which did not compare equal +/// to `value`. +- (instancetype)ignore:(id)value; + +/// Unpacks each RACTuple in the receiver and maps the values to a new value. +/// +/// reduceBlock - The block which reduces each RACTuple's values into one value. +/// It must take as many arguments as the number of tuple elements +/// to process. Each argument will be an object argument. The +/// return value must be an object. This argument cannot be nil. +/// +/// Returns a new stream of reduced tuple values. +- (instancetype)reduceEach:(id (^)())reduceBlock; + +/// Returns a stream consisting of `value`, followed by the values in the +/// receiver. +- (instancetype)startWith:(id)value; + +/// Skips the first `skipCount` values in the receiver. +/// +/// Returns the receiver after skipping the first `skipCount` values. If +/// `skipCount` is greater than the number of values in the stream, an empty +/// stream is returned. +- (instancetype)skip:(NSUInteger)skipCount; + +/// Returns a stream of the first `count` values in the receiver. If `count` is +/// greater than or equal to the number of values in the stream, a stream +/// equivalent to the receiver is returned. +- (instancetype)take:(NSUInteger)count; + +/// Zips the values in the given streams to create RACTuples. +/// +/// The first value of each stream will be combined, then the second value, and +/// so forth, until at least one of the streams is exhausted. +/// +/// streams - The streams to combine. These must all be instances of the same +/// concrete class implementing the protocol. If this collection is +/// empty, the returned stream will be empty. +/// +/// Returns a new stream containing RACTuples of the zipped values from the +/// streams. ++ (instancetype)zip:(id)streams; + +/// Zips streams using +zip:, then reduces the resulting tuples into a single +/// value using -reduceEach: +/// +/// streams - The streams to combine. These must all be instances of the +/// same concrete class implementing the protocol. If this +/// collection is empty, the returned stream will be empty. +/// reduceBlock - The block which reduces the values from all the streams +/// into one value. It must take as many arguments as the +/// number of streams given. Each argument will be an object +/// argument. The return value must be an object. This argument +/// must not be nil. +/// +/// Example: +/// +/// [RACStream zip:@[ stringSignal, intSignal ] reduce:^(NSString *string, NSNumber *number) { +/// return [NSString stringWithFormat:@"%@: %@", string, number]; +/// }]; +/// +/// Returns a new stream containing the results from each invocation of +/// `reduceBlock`. ++ (instancetype)zip:(id)streams reduce:(id (^)())reduceBlock; + +/// Returns a stream obtained by concatenating `streams` in order. ++ (instancetype)concat:(id)streams; + +/// Combines values in the receiver from left to right using the given block. +/// +/// The algorithm proceeds as follows: +/// +/// 1. `startingValue` is passed into the block as the `running` value, and the +/// first element of the receiver is passed into the block as the `next` value. +/// 2. The result of the invocation is added to the returned stream. +/// 3. The result of the invocation (`running`) and the next element of the +/// receiver (`next`) is passed into `block`. +/// 4. Steps 2 and 3 are repeated until all values have been processed. +/// +/// startingValue - The value to be combined with the first element of the +/// receiver. This value may be `nil`. +/// reduceBlock - The block that describes how to combine values of the +/// receiver. If the receiver is empty, this block will never be +/// invoked. Cannot be nil. +/// +/// Examples +/// +/// RACSequence *numbers = @[ @1, @2, @3, @4 ].rac_sequence; +/// +/// // Contains 1, 3, 6, 10 +/// RACSequence *sums = [numbers scanWithStart:@0 reduce:^(NSNumber *sum, NSNumber *next) { +/// return @(sum.integerValue + next.integerValue); +/// }]; +/// +/// Returns a new stream that consists of each application of `reduceBlock`. If the +/// receiver is empty, an empty stream is returned. +- (instancetype)scanWithStart:(id)startingValue reduce:(id (^)(id running, id next))reduceBlock; + +/// Combines values in the receiver from left to right using the given block +/// which also takes zero-based index of the values. +/// +/// startingValue - The value to be combined with the first element of the +/// receiver. This value may be `nil`. +/// reduceBlock - The block that describes how to combine values of the +/// receiver. This block takes zero-based index value as the last +/// parameter. If the receiver is empty, this block will never +/// be invoked. Cannot be nil. +/// +/// Returns a new stream that consists of each application of `reduceBlock`. If the +/// receiver is empty, an empty stream is returned. +- (instancetype)scanWithStart:(id)startingValue reduceWithIndex:(id (^)(id running, id next, NSUInteger index))reduceBlock; + +/// Combines each previous and current value into one object. +/// +/// This method is similar to -scanWithStart:reduce:, but only ever operates on +/// the previous and current values (instead of the whole stream), and does not +/// pass the return value of `reduceBlock` into the next invocation of it. +/// +/// start - The value passed into `reduceBlock` as `previous` for the +/// first value. +/// reduceBlock - The block that combines the previous value and the current +/// value to create the reduced value. Cannot be nil. +/// +/// Examples +/// +/// RACSequence *numbers = @[ @1, @2, @3, @4 ].rac_sequence; +/// +/// // Contains 1, 3, 5, 7 +/// RACSequence *sums = [numbers combinePreviousWithStart:@0 reduce:^(NSNumber *previous, NSNumber *next) { +/// return @(previous.integerValue + next.integerValue); +/// }]; +/// +/// Returns a new stream consisting of the return values from each application of +/// `reduceBlock`. +- (instancetype)combinePreviousWithStart:(id)start reduce:(id (^)(id previous, id current))reduceBlock; + +/// Takes values until the given block returns `YES`. +/// +/// Returns a stream of the initial values in the receiver that fail `predicate`. +/// If `predicate` never returns `YES`, a stream equivalent to the receiver is +/// returned. +- (instancetype)takeUntilBlock:(BOOL (^)(id x))predicate; + +/// Takes values until the given block returns `NO`. +/// +/// Returns a stream of the initial values in the receiver that pass `predicate`. +/// If `predicate` never returns `NO`, a stream equivalent to the receiver is +/// returned. +- (instancetype)takeWhileBlock:(BOOL (^)(id x))predicate; + +/// Skips values until the given block returns `YES`. +/// +/// Returns a stream containing the values of the receiver that follow any +/// initial values failing `predicate`. If `predicate` never returns `YES`, +/// an empty stream is returned. +- (instancetype)skipUntilBlock:(BOOL (^)(id x))predicate; + +/// Skips values until the given block returns `NO`. +/// +/// Returns a stream containing the values of the receiver that follow any +/// initial values passing `predicate`. If `predicate` never returns `NO`, an +/// empty stream is returned. +- (instancetype)skipWhileBlock:(BOOL (^)(id x))predicate; + +/// Returns a stream of values for which -isEqual: returns NO when compared to the +/// previous value. +- (instancetype)distinctUntilChanged; + +@end + +@interface RACStream (Deprecated) + +- (instancetype)sequenceMany:(RACStream * (^)(void))block __attribute__((deprecated("Use -flattenMap: instead"))); +- (instancetype)scanWithStart:(id)startingValue combine:(id (^)(id running, id next))block __attribute__((deprecated("Renamed to -scanWithStart:reduce:"))); +- (instancetype)mapPreviousWithStart:(id)start reduce:(id (^)(id previous, id current))combineBlock __attribute__((deprecated("Renamed to -combinePreviousWithStart:reduce:"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubject.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubject.h new file mode 100644 index 0000000..30c100b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubject.h @@ -0,0 +1,22 @@ +// +// RACSubject.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/9/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import "RACSignal.h" +#import "RACSubscriber.h" + +/// A subject can be thought of as a signal that you can manually control by +/// sending next, completed, and error. +/// +/// They're most helpful in bridging the non-RAC world to RAC, since they let you +/// manually control the sending of events. +@interface RACSubject : RACSignal + +/// Returns a new subject. ++ (instancetype)subject; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubscriber.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubscriber.h new file mode 100644 index 0000000..b62ea35 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubscriber.h @@ -0,0 +1,51 @@ +// +// RACSubscriber.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/1/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +@class RACCompoundDisposable; + +/// Represents any object which can directly receive values from a RACSignal. +/// +/// You generally shouldn't need to implement this protocol. +[RACSignal +/// createSignal:], RACSignal's subscription methods, or RACSubject should work +/// for most uses. +/// +/// Implementors of this protocol may receive messages and values from multiple +/// threads simultaneously, and so should be thread-safe. Subscribers will also +/// be weakly referenced so implementations must allow that. +@protocol RACSubscriber +@required + +/// Sends the next value to subscribers. +/// +/// value - The value to send. This can be `nil`. +- (void)sendNext:(id)value; + +/// Sends the error to subscribers. +/// +/// error - The error to send. This can be `nil`. +/// +/// This terminates the subscription, and invalidates the subscriber (such that +/// it cannot subscribe to anything else in the future). +- (void)sendError:(NSError *)error; + +/// Sends completed to subscribers. +/// +/// This terminates the subscription, and invalidates the subscriber (such that +/// it cannot subscribe to anything else in the future). +- (void)sendCompleted; + +/// Sends the subscriber a disposable that represents one of its subscriptions. +/// +/// A subscriber may receive multiple disposables if it gets subscribed to +/// multiple signals; however, any error or completed events must terminate _all_ +/// subscriptions. +- (void)didSubscribeWithDisposable:(RACCompoundDisposable *)disposable; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubscriptingAssignmentTrampoline.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubscriptingAssignmentTrampoline.h new file mode 100644 index 0000000..07ec9e7 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACSubscriptingAssignmentTrampoline.h @@ -0,0 +1,54 @@ +// +// RACSubscriptingAssignmentTrampoline.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 9/24/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "EXTKeyPathCoding.h" + +@class RACSignal; + +/// Assigns a signal to an object property, automatically setting the given key +/// path on every `next`. When the signal completes, the binding is automatically +/// disposed of. +/// +/// There are two different versions of this macro: +/// +/// - RAC(TARGET, KEYPATH, NILVALUE) will bind the `KEYPATH` of `TARGET` to the +/// given signal. If the signal ever sends a `nil` value, the property will be +/// set to `NILVALUE` instead. `NILVALUE` may itself be `nil` for object +/// properties, but an NSValue should be used for primitive properties, to +/// avoid an exception if `nil` is sent (which might occur if an intermediate +/// object is set to `nil`). +/// - RAC(TARGET, KEYPATH) is the same as the above, but `NILVALUE` defaults to +/// `nil`. +/// +/// See -[RACSignal setKeyPath:onObject:nilValue:] for more information about the +/// binding's semantics. +/// +/// Examples +/// +/// RAC(self, objectProperty) = objectSignal; +/// RAC(self, stringProperty, @"foobar") = stringSignal; +/// RAC(self, integerProperty, @42) = integerSignal; +/// +/// WARNING: Under certain conditions, use of this macro can be thread-unsafe. +/// See the documentation of -setKeyPath:onObject:nilValue:. +#define RAC(TARGET, ...) \ + metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__)) \ + (RAC_(TARGET, __VA_ARGS__, nil)) \ + (RAC_(TARGET, __VA_ARGS__)) + +/// Do not use this directly. Use the RAC macro above. +#define RAC_(TARGET, KEYPATH, NILVALUE) \ + [[RACSubscriptingAssignmentTrampoline alloc] initWithTarget:(TARGET) nilValue:(NILVALUE)][@keypath(TARGET, KEYPATH)] + +@interface RACSubscriptingAssignmentTrampoline : NSObject + +- (id)initWithTarget:(id)target nilValue:(id)nilValue; +- (void)setObject:(RACSignal *)signal forKeyedSubscript:(NSString *)keyPath; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTargetQueueScheduler.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTargetQueueScheduler.h new file mode 100644 index 0000000..429e595 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTargetQueueScheduler.h @@ -0,0 +1,24 @@ +// +// RACTargetQueueScheduler.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 6/6/13. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACQueueScheduler.h" + +/// A scheduler that enqueues blocks on a private serial queue, targeting an +/// arbitrary GCD queue. +@interface RACTargetQueueScheduler : RACQueueScheduler + +/// Initializes the receiver with a serial queue that will target the given +/// `targetQueue`. +/// +/// name - The name of the scheduler. If nil, a default name will be used. +/// targetQueue - The queue to target. Cannot be NULL. +/// +/// Returns the initialized object. +- (id)initWithName:(NSString *)name targetQueue:(dispatch_queue_t)targetQueue; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTestScheduler.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTestScheduler.h new file mode 100644 index 0000000..a790f5b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTestScheduler.h @@ -0,0 +1,42 @@ +// +// RACTestScheduler.h +// ReactiveCocoa +// +// Created by Justin Spahr-Summers on 2013-07-06. +// Copyright (c) 2013 GitHub, Inc. All rights reserved. +// + +#import "RACScheduler.h" + +/// A special kind of scheduler that steps through virtualized time. +/// +/// This scheduler class can be used in unit tests to verify asynchronous +/// behaviors without spending significant time waiting. +/// +/// This class can be used from multiple threads, but only one thread can `step` +/// through the enqueued actions at a time. Other threads will wait while the +/// scheduled blocks are being executed. +@interface RACTestScheduler : RACScheduler + +/// Initializes a new test scheduler. +- (instancetype)init; + +/// Executes the next scheduled block, if any. +/// +/// This method will block until the scheduled action has completed. +- (void)step; + +/// Executes up to the next `ticks` scheduled blocks. +/// +/// This method will block until the scheduled actions have completed. +/// +/// ticks - The number of scheduled blocks to execute. If there aren't this many +/// blocks enqueued, all scheduled blocks are executed. +- (void)step:(NSUInteger)ticks; + +/// Executes all of the scheduled blocks on the receiver. +/// +/// This method will block until the scheduled actions have completed. +- (void)stepAll; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTuple.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTuple.h new file mode 100644 index 0000000..647b42c --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACTuple.h @@ -0,0 +1,159 @@ +// +// RACTuple.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 4/12/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import +#import "metamacros.h" + +@class RACSequence; + +/// Creates a new tuple with the given values. At least one value must be given. +/// Values can be nil. +#define RACTuplePack(...) \ + RACTuplePack_(__VA_ARGS__) + +/// Declares new object variables and unpacks a RACTuple into them. +/// +/// This macro should be used on the left side of an assignment, with the +/// tuple on the right side. Nothing else should appear on the same line, and the +/// macro should not be the only statement in a conditional or loop body. +/// +/// If the tuple has more values than there are variables listed, the excess +/// values are ignored. +/// +/// If the tuple has fewer values than there are variables listed, the excess +/// variables are initialized to nil. +/// +/// Examples +/// +/// RACTupleUnpack(NSString *string, NSNumber *num) = [RACTuple tupleWithObjects:@"foo", @5, nil]; +/// NSLog(@"string: %@", string); +/// NSLog(@"num: %@", num); +/// +/// /* The above is equivalent to: */ +/// RACTuple *t = [RACTuple tupleWithObjects:@"foo", @5, nil]; +/// NSString *string = t[0]; +/// NSNumber *num = t[1]; +/// NSLog(@"string: %@", string); +/// NSLog(@"num: %@", num); +#define RACTupleUnpack(...) \ + RACTupleUnpack_(__VA_ARGS__) + +/// A sentinel object that represents nils in the tuple. +/// +/// It should never be necessary to create a tuple nil yourself. Just use +/// +tupleNil. +@interface RACTupleNil : NSObject +/// A singleton instance. ++ (RACTupleNil *)tupleNil; +@end + + +/// A tuple is an ordered collection of objects. It may contain nils, represented +/// by RACTupleNil. +@interface RACTuple : NSObject + +@property (nonatomic, readonly) NSUInteger count; + +/// These properties all return the object at that index or nil if the number of +/// objects is less than the index. +@property (nonatomic, readonly) id first; +@property (nonatomic, readonly) id second; +@property (nonatomic, readonly) id third; +@property (nonatomic, readonly) id fourth; +@property (nonatomic, readonly) id fifth; +@property (nonatomic, readonly) id last; + +/// Creates a new tuple out of the array. Does not convert nulls to nils. ++ (instancetype)tupleWithObjectsFromArray:(NSArray *)array; + +/// Creates a new tuple out of the array. If `convert` is YES, it also converts +/// every NSNull to RACTupleNil. ++ (instancetype)tupleWithObjectsFromArray:(NSArray *)array convertNullsToNils:(BOOL)convert; + +/// Creates a new tuple with the given objects. Use RACTupleNil to represent +/// nils. ++ (instancetype)tupleWithObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION; + +/// Returns the object at `index` or nil if the object is a RACTupleNil. Unlike +/// NSArray and friends, it's perfectly fine to ask for the object at an index +/// past the tuple's count - 1. It will simply return nil. +- (id)objectAtIndex:(NSUInteger)index; + +/// Returns an array of all the objects. RACTupleNils are converted to NSNulls. +- (NSArray *)allObjects; + +/// Appends `obj` to the receiver. +/// +/// obj - The object to add to the tuple. This argument may be nil. +/// +/// Returns a new tuple. +- (instancetype)tupleByAddingObject:(id)obj; + +@end + +@interface RACTuple (RACSequenceAdditions) + +/// Returns a sequence of all the objects. RACTupleNils are converted to NSNulls. +@property (nonatomic, copy, readonly) RACSequence *rac_sequence; + +@end + +@interface RACTuple (ObjectSubscripting) +/// Returns the object at that index or nil if the number of objects is less +/// than the index. +- (id)objectAtIndexedSubscript:(NSUInteger)idx; +@end + +/// This and everything below is for internal use only. +/// +/// See RACTuplePack() and RACTupleUnpack() instead. +#define RACTuplePack_(...) \ + ([RACTuple tupleWithObjectsFromArray:@[ metamacro_foreach(RACTuplePack_object_or_ractuplenil,, __VA_ARGS__) ]]) + +#define RACTuplePack_object_or_ractuplenil(INDEX, ARG) \ + (ARG) ?: RACTupleNil.tupleNil, + +#define RACTupleUnpack_(...) \ + metamacro_foreach(RACTupleUnpack_decl,, __VA_ARGS__) \ + \ + int RACTupleUnpack_state = 0; \ + \ + RACTupleUnpack_after: \ + ; \ + metamacro_foreach(RACTupleUnpack_assign,, __VA_ARGS__) \ + if (RACTupleUnpack_state != 0) RACTupleUnpack_state = 2; \ + \ + while (RACTupleUnpack_state != 2) \ + if (RACTupleUnpack_state == 1) { \ + goto RACTupleUnpack_after; \ + } else \ + for (; RACTupleUnpack_state != 1; RACTupleUnpack_state = 1) \ + [RACTupleUnpackingTrampoline trampoline][ @[ metamacro_foreach(RACTupleUnpack_value,, __VA_ARGS__) ] ] + +#define RACTupleUnpack_state metamacro_concat(RACTupleUnpack_state, __LINE__) +#define RACTupleUnpack_after metamacro_concat(RACTupleUnpack_after, __LINE__) +#define RACTupleUnpack_loop metamacro_concat(RACTupleUnpack_loop, __LINE__) + +#define RACTupleUnpack_decl_name(INDEX) \ + metamacro_concat(metamacro_concat(RACTupleUnpack, __LINE__), metamacro_concat(_var, INDEX)) + +#define RACTupleUnpack_decl(INDEX, ARG) \ + __strong id RACTupleUnpack_decl_name(INDEX); + +#define RACTupleUnpack_assign(INDEX, ARG) \ + __strong ARG = RACTupleUnpack_decl_name(INDEX); + +#define RACTupleUnpack_value(INDEX, ARG) \ + [NSValue valueWithPointer:&RACTupleUnpack_decl_name(INDEX)], + +@interface RACTupleUnpackingTrampoline : NSObject + ++ (instancetype)trampoline; +- (void)setObject:(RACTuple *)tuple forKeyedSubscript:(NSArray *)variables; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACUnit.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACUnit.h new file mode 100644 index 0000000..a04e2b1 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/RACUnit.h @@ -0,0 +1,19 @@ +// +// RACUnit.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/27/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +/// A unit represents an empty value. +/// +/// It should never be necessary to create a unit yourself. Just use +defaultUnit. +@interface RACUnit : NSObject + +/// A singleton instance. ++ (RACUnit *)defaultUnit; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/ReactiveCocoa.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/ReactiveCocoa.h new file mode 100644 index 0000000..164b4a9 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/ReactiveCocoa.h @@ -0,0 +1,89 @@ +// +// ReactiveCocoa.h +// ReactiveCocoa +// +// Created by Josh Abernathy on 3/5/12. +// Copyright (c) 2012 GitHub, Inc. All rights reserved. +// + +#import + +//! Project version number for ReactiveCocoa. +FOUNDATION_EXPORT double ReactiveCocoaVersionNumber; + +//! Project version string for ReactiveCocoa. +FOUNDATION_EXPORT const unsigned char ReactiveCocoaVersionString[]; + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import + #import +#elif TARGET_OS_MAC + #import + #import + #import + #import +#endif diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/metamacros.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/metamacros.h new file mode 100644 index 0000000..77a77b5 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Headers/metamacros.h @@ -0,0 +1,666 @@ +/** + * Macros for metaprogramming + * ExtendedC + * + * Copyright (C) 2012 Justin Spahr-Summers + * Released under the MIT license + */ + +#ifndef EXTC_METAMACROS_H +#define EXTC_METAMACROS_H + +/** + * Executes one or more expressions (which may have a void type, such as a call + * to a function that returns no value) and always returns true. + */ +#define metamacro_exprify(...) \ + ((__VA_ARGS__), true) + +/** + * Returns a string representation of VALUE after full macro expansion. + */ +#define metamacro_stringify(VALUE) \ + metamacro_stringify_(VALUE) + +/** + * Returns A and B concatenated after full macro expansion. + */ +#define metamacro_concat(A, B) \ + metamacro_concat_(A, B) + +/** + * Returns the Nth variadic argument (starting from zero). At least + * N + 1 variadic arguments must be given. N must be between zero and twenty, + * inclusive. + */ +#define metamacro_at(N, ...) \ + metamacro_concat(metamacro_at, N)(__VA_ARGS__) + +/** + * Returns the number of arguments (up to twenty) provided to the macro. At + * least one argument must be provided. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_argcount(...) \ + metamacro_at(20, __VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) + +/** + * Identical to #metamacro_foreach_cxt, except that no CONTEXT argument is + * given. Only the index and current argument will thus be passed to MACRO. + */ +#define metamacro_foreach(MACRO, SEP, ...) \ + metamacro_foreach_cxt(metamacro_foreach_iter, SEP, MACRO, __VA_ARGS__) + +/** + * For each consecutive variadic argument (up to twenty), MACRO is passed the + * zero-based index of the current argument, CONTEXT, and then the argument + * itself. The results of adjoining invocations of MACRO are then separated by + * SEP. + * + * Inspired by P99: http://p99.gforge.inria.fr + */ +#define metamacro_foreach_cxt(MACRO, SEP, CONTEXT, ...) \ + metamacro_concat(metamacro_foreach_cxt, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * Identical to #metamacro_foreach_cxt. This can be used when the former would + * fail due to recursive macro expansion. + */ +#define metamacro_foreach_cxt_recursive(MACRO, SEP, CONTEXT, ...) \ + metamacro_concat(metamacro_foreach_cxt_recursive, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) + +/** + * In consecutive order, appends each variadic argument (up to twenty) onto + * BASE. The resulting concatenations are then separated by SEP. + * + * This is primarily useful to manipulate a list of macro invocations into instead + * invoking a different, possibly related macro. + */ +#define metamacro_foreach_concat(BASE, SEP, ...) \ + metamacro_foreach_cxt(metamacro_foreach_concat_iter, SEP, BASE, __VA_ARGS__) + +/** + * Iterates COUNT times, each time invoking MACRO with the current index + * (starting at zero) and CONTEXT. The results of adjoining invocations of MACRO + * are then separated by SEP. + * + * COUNT must be an integer between zero and twenty, inclusive. + */ +#define metamacro_for_cxt(COUNT, MACRO, SEP, CONTEXT) \ + metamacro_concat(metamacro_for_cxt, COUNT)(MACRO, SEP, CONTEXT) + +/** + * Returns the first argument given. At least one argument must be provided. + * + * This is useful when implementing a variadic macro, where you may have only + * one variadic argument, but no way to retrieve it (for example, because \c ... + * always needs to match at least one argument). + * + * @code + +#define varmacro(...) \ + metamacro_head(__VA_ARGS__) + + * @endcode + */ +#define metamacro_head(...) \ + metamacro_head_(__VA_ARGS__, 0) + +/** + * Returns every argument except the first. At least two arguments must be + * provided. + */ +#define metamacro_tail(...) \ + metamacro_tail_(__VA_ARGS__) + +/** + * Returns the first N (up to twenty) variadic arguments as a new argument list. + * At least N variadic arguments must be provided. + */ +#define metamacro_take(N, ...) \ + metamacro_concat(metamacro_take, N)(__VA_ARGS__) + +/** + * Removes the first N (up to twenty) variadic arguments from the given argument + * list. At least N variadic arguments must be provided. + */ +#define metamacro_drop(N, ...) \ + metamacro_concat(metamacro_drop, N)(__VA_ARGS__) + +/** + * Decrements VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_dec(VAL) \ + metamacro_at(VAL, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) + +/** + * Increments VAL, which must be a number between zero and twenty, inclusive. + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_inc(VAL) \ + metamacro_at(VAL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) + +/** + * If A is equal to B, the next argument list is expanded; otherwise, the + * argument list after that is expanded. A and B must be numbers between zero + * and twenty, inclusive. Additionally, B must be greater than or equal to A. + * + * @code + +// expands to true +metamacro_if_eq(0, 0)(true)(false) + +// expands to false +metamacro_if_eq(0, 1)(true)(false) + + * @endcode + * + * This is primarily useful when dealing with indexes and counts in + * metaprogramming. + */ +#define metamacro_if_eq(A, B) \ + metamacro_concat(metamacro_if_eq, A)(B) + +/** + * Identical to #metamacro_if_eq. This can be used when the former would fail + * due to recursive macro expansion. + */ +#define metamacro_if_eq_recursive(A, B) \ + metamacro_concat(metamacro_if_eq_recursive, A)(B) + +/** + * Returns 1 if N is an even number, or 0 otherwise. N must be between zero and + * twenty, inclusive. + * + * For the purposes of this test, zero is considered even. + */ +#define metamacro_is_even(N) \ + metamacro_at(N, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1) + +/** + * Returns the logical NOT of B, which must be the number zero or one. + */ +#define metamacro_not(B) \ + metamacro_at(B, 1, 0) + +// IMPLEMENTATION DETAILS FOLLOW! +// Do not write code that depends on anything below this line. +#define metamacro_stringify_(VALUE) # VALUE +#define metamacro_concat_(A, B) A ## B +#define metamacro_foreach_iter(INDEX, MACRO, ARG) MACRO(INDEX, ARG) +#define metamacro_head_(FIRST, ...) FIRST +#define metamacro_tail_(FIRST, ...) __VA_ARGS__ +#define metamacro_consume_(...) +#define metamacro_expand_(...) __VA_ARGS__ + +// implemented from scratch so that metamacro_concat() doesn't end up nesting +#define metamacro_foreach_concat_iter(INDEX, BASE, ARG) metamacro_foreach_concat_iter_(BASE, ARG) +#define metamacro_foreach_concat_iter_(BASE, ARG) BASE ## ARG + +// metamacro_at expansions +#define metamacro_at0(...) metamacro_head(__VA_ARGS__) +#define metamacro_at1(_0, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at2(_0, _1, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at3(_0, _1, _2, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at4(_0, _1, _2, _3, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at5(_0, _1, _2, _3, _4, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at6(_0, _1, _2, _3, _4, _5, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at7(_0, _1, _2, _3, _4, _5, _6, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at8(_0, _1, _2, _3, _4, _5, _6, _7, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at9(_0, _1, _2, _3, _4, _5, _6, _7, _8, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at10(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at11(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at12(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at13(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at14(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at15(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at17(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at18(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at19(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, ...) metamacro_head(__VA_ARGS__) +#define metamacro_at20(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, ...) metamacro_head(__VA_ARGS__) + +// metamacro_foreach_cxt expansions +#define metamacro_foreach_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ + metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) \ + SEP \ + MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ + SEP \ + MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + SEP \ + MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + SEP \ + MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + SEP \ + MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + SEP \ + MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + SEP \ + MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + SEP \ + MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + SEP \ + MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + SEP \ + MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + SEP \ + MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + SEP \ + MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + SEP \ + MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + SEP \ + MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + SEP \ + MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + SEP \ + MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + SEP \ + MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + SEP \ + MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ + metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + SEP \ + MACRO(19, CONTEXT, _19) + +// metamacro_foreach_cxt_recursive expansions +#define metamacro_foreach_cxt_recursive0(MACRO, SEP, CONTEXT) +#define metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) + +#define metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ + metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) \ + SEP \ + MACRO(1, CONTEXT, _1) + +#define metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ + SEP \ + MACRO(2, CONTEXT, _2) + +#define metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ + SEP \ + MACRO(3, CONTEXT, _3) + +#define metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ + SEP \ + MACRO(4, CONTEXT, _4) + +#define metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ + SEP \ + MACRO(5, CONTEXT, _5) + +#define metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ + SEP \ + MACRO(6, CONTEXT, _6) + +#define metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ + SEP \ + MACRO(7, CONTEXT, _7) + +#define metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ + SEP \ + MACRO(8, CONTEXT, _8) + +#define metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ + SEP \ + MACRO(9, CONTEXT, _9) + +#define metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ + SEP \ + MACRO(10, CONTEXT, _10) + +#define metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ + SEP \ + MACRO(11, CONTEXT, _11) + +#define metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ + SEP \ + MACRO(12, CONTEXT, _12) + +#define metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ + SEP \ + MACRO(13, CONTEXT, _13) + +#define metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ + SEP \ + MACRO(14, CONTEXT, _14) + +#define metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ + SEP \ + MACRO(15, CONTEXT, _15) + +#define metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ + SEP \ + MACRO(16, CONTEXT, _16) + +#define metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ + SEP \ + MACRO(17, CONTEXT, _17) + +#define metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ + SEP \ + MACRO(18, CONTEXT, _18) + +#define metamacro_foreach_cxt_recursive20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ + metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ + SEP \ + MACRO(19, CONTEXT, _19) + +// metamacro_for_cxt expansions +#define metamacro_for_cxt0(MACRO, SEP, CONTEXT) +#define metamacro_for_cxt1(MACRO, SEP, CONTEXT) MACRO(0, CONTEXT) + +#define metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt1(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(1, CONTEXT) + +#define metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(2, CONTEXT) + +#define metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(3, CONTEXT) + +#define metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(4, CONTEXT) + +#define metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(5, CONTEXT) + +#define metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(6, CONTEXT) + +#define metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(7, CONTEXT) + +#define metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(8, CONTEXT) + +#define metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(9, CONTEXT) + +#define metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(10, CONTEXT) + +#define metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(11, CONTEXT) + +#define metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(12, CONTEXT) + +#define metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(13, CONTEXT) + +#define metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(14, CONTEXT) + +#define metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(15, CONTEXT) + +#define metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(16, CONTEXT) + +#define metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(17, CONTEXT) + +#define metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(18, CONTEXT) + +#define metamacro_for_cxt20(MACRO, SEP, CONTEXT) \ + metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ + SEP \ + MACRO(19, CONTEXT) + +// metamacro_if_eq expansions +#define metamacro_if_eq0(VALUE) \ + metamacro_concat(metamacro_if_eq0_, VALUE) + +#define metamacro_if_eq0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq0_1(...) metamacro_expand_ +#define metamacro_if_eq0_2(...) metamacro_expand_ +#define metamacro_if_eq0_3(...) metamacro_expand_ +#define metamacro_if_eq0_4(...) metamacro_expand_ +#define metamacro_if_eq0_5(...) metamacro_expand_ +#define metamacro_if_eq0_6(...) metamacro_expand_ +#define metamacro_if_eq0_7(...) metamacro_expand_ +#define metamacro_if_eq0_8(...) metamacro_expand_ +#define metamacro_if_eq0_9(...) metamacro_expand_ +#define metamacro_if_eq0_10(...) metamacro_expand_ +#define metamacro_if_eq0_11(...) metamacro_expand_ +#define metamacro_if_eq0_12(...) metamacro_expand_ +#define metamacro_if_eq0_13(...) metamacro_expand_ +#define metamacro_if_eq0_14(...) metamacro_expand_ +#define metamacro_if_eq0_15(...) metamacro_expand_ +#define metamacro_if_eq0_16(...) metamacro_expand_ +#define metamacro_if_eq0_17(...) metamacro_expand_ +#define metamacro_if_eq0_18(...) metamacro_expand_ +#define metamacro_if_eq0_19(...) metamacro_expand_ +#define metamacro_if_eq0_20(...) metamacro_expand_ + +#define metamacro_if_eq1(VALUE) metamacro_if_eq0(metamacro_dec(VALUE)) +#define metamacro_if_eq2(VALUE) metamacro_if_eq1(metamacro_dec(VALUE)) +#define metamacro_if_eq3(VALUE) metamacro_if_eq2(metamacro_dec(VALUE)) +#define metamacro_if_eq4(VALUE) metamacro_if_eq3(metamacro_dec(VALUE)) +#define metamacro_if_eq5(VALUE) metamacro_if_eq4(metamacro_dec(VALUE)) +#define metamacro_if_eq6(VALUE) metamacro_if_eq5(metamacro_dec(VALUE)) +#define metamacro_if_eq7(VALUE) metamacro_if_eq6(metamacro_dec(VALUE)) +#define metamacro_if_eq8(VALUE) metamacro_if_eq7(metamacro_dec(VALUE)) +#define metamacro_if_eq9(VALUE) metamacro_if_eq8(metamacro_dec(VALUE)) +#define metamacro_if_eq10(VALUE) metamacro_if_eq9(metamacro_dec(VALUE)) +#define metamacro_if_eq11(VALUE) metamacro_if_eq10(metamacro_dec(VALUE)) +#define metamacro_if_eq12(VALUE) metamacro_if_eq11(metamacro_dec(VALUE)) +#define metamacro_if_eq13(VALUE) metamacro_if_eq12(metamacro_dec(VALUE)) +#define metamacro_if_eq14(VALUE) metamacro_if_eq13(metamacro_dec(VALUE)) +#define metamacro_if_eq15(VALUE) metamacro_if_eq14(metamacro_dec(VALUE)) +#define metamacro_if_eq16(VALUE) metamacro_if_eq15(metamacro_dec(VALUE)) +#define metamacro_if_eq17(VALUE) metamacro_if_eq16(metamacro_dec(VALUE)) +#define metamacro_if_eq18(VALUE) metamacro_if_eq17(metamacro_dec(VALUE)) +#define metamacro_if_eq19(VALUE) metamacro_if_eq18(metamacro_dec(VALUE)) +#define metamacro_if_eq20(VALUE) metamacro_if_eq19(metamacro_dec(VALUE)) + +// metamacro_if_eq_recursive expansions +#define metamacro_if_eq_recursive0(VALUE) \ + metamacro_concat(metamacro_if_eq_recursive0_, VALUE) + +#define metamacro_if_eq_recursive0_0(...) __VA_ARGS__ metamacro_consume_ +#define metamacro_if_eq_recursive0_1(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_2(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_3(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_4(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_5(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_6(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_7(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_8(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_9(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_10(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_11(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_12(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_13(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_14(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_15(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_16(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_17(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_18(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_19(...) metamacro_expand_ +#define metamacro_if_eq_recursive0_20(...) metamacro_expand_ + +#define metamacro_if_eq_recursive1(VALUE) metamacro_if_eq_recursive0(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive2(VALUE) metamacro_if_eq_recursive1(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive3(VALUE) metamacro_if_eq_recursive2(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive4(VALUE) metamacro_if_eq_recursive3(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive5(VALUE) metamacro_if_eq_recursive4(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive6(VALUE) metamacro_if_eq_recursive5(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive7(VALUE) metamacro_if_eq_recursive6(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive8(VALUE) metamacro_if_eq_recursive7(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive9(VALUE) metamacro_if_eq_recursive8(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive10(VALUE) metamacro_if_eq_recursive9(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive11(VALUE) metamacro_if_eq_recursive10(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive12(VALUE) metamacro_if_eq_recursive11(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive13(VALUE) metamacro_if_eq_recursive12(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive14(VALUE) metamacro_if_eq_recursive13(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive15(VALUE) metamacro_if_eq_recursive14(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive16(VALUE) metamacro_if_eq_recursive15(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive17(VALUE) metamacro_if_eq_recursive16(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive18(VALUE) metamacro_if_eq_recursive17(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive19(VALUE) metamacro_if_eq_recursive18(metamacro_dec(VALUE)) +#define metamacro_if_eq_recursive20(VALUE) metamacro_if_eq_recursive19(metamacro_dec(VALUE)) + +// metamacro_take expansions +#define metamacro_take0(...) +#define metamacro_take1(...) metamacro_head(__VA_ARGS__) +#define metamacro_take2(...) metamacro_head(__VA_ARGS__), metamacro_take1(metamacro_tail(__VA_ARGS__)) +#define metamacro_take3(...) metamacro_head(__VA_ARGS__), metamacro_take2(metamacro_tail(__VA_ARGS__)) +#define metamacro_take4(...) metamacro_head(__VA_ARGS__), metamacro_take3(metamacro_tail(__VA_ARGS__)) +#define metamacro_take5(...) metamacro_head(__VA_ARGS__), metamacro_take4(metamacro_tail(__VA_ARGS__)) +#define metamacro_take6(...) metamacro_head(__VA_ARGS__), metamacro_take5(metamacro_tail(__VA_ARGS__)) +#define metamacro_take7(...) metamacro_head(__VA_ARGS__), metamacro_take6(metamacro_tail(__VA_ARGS__)) +#define metamacro_take8(...) metamacro_head(__VA_ARGS__), metamacro_take7(metamacro_tail(__VA_ARGS__)) +#define metamacro_take9(...) metamacro_head(__VA_ARGS__), metamacro_take8(metamacro_tail(__VA_ARGS__)) +#define metamacro_take10(...) metamacro_head(__VA_ARGS__), metamacro_take9(metamacro_tail(__VA_ARGS__)) +#define metamacro_take11(...) metamacro_head(__VA_ARGS__), metamacro_take10(metamacro_tail(__VA_ARGS__)) +#define metamacro_take12(...) metamacro_head(__VA_ARGS__), metamacro_take11(metamacro_tail(__VA_ARGS__)) +#define metamacro_take13(...) metamacro_head(__VA_ARGS__), metamacro_take12(metamacro_tail(__VA_ARGS__)) +#define metamacro_take14(...) metamacro_head(__VA_ARGS__), metamacro_take13(metamacro_tail(__VA_ARGS__)) +#define metamacro_take15(...) metamacro_head(__VA_ARGS__), metamacro_take14(metamacro_tail(__VA_ARGS__)) +#define metamacro_take16(...) metamacro_head(__VA_ARGS__), metamacro_take15(metamacro_tail(__VA_ARGS__)) +#define metamacro_take17(...) metamacro_head(__VA_ARGS__), metamacro_take16(metamacro_tail(__VA_ARGS__)) +#define metamacro_take18(...) metamacro_head(__VA_ARGS__), metamacro_take17(metamacro_tail(__VA_ARGS__)) +#define metamacro_take19(...) metamacro_head(__VA_ARGS__), metamacro_take18(metamacro_tail(__VA_ARGS__)) +#define metamacro_take20(...) metamacro_head(__VA_ARGS__), metamacro_take19(metamacro_tail(__VA_ARGS__)) + +// metamacro_drop expansions +#define metamacro_drop0(...) __VA_ARGS__ +#define metamacro_drop1(...) metamacro_tail(__VA_ARGS__) +#define metamacro_drop2(...) metamacro_drop1(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop3(...) metamacro_drop2(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop4(...) metamacro_drop3(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop5(...) metamacro_drop4(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop6(...) metamacro_drop5(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop7(...) metamacro_drop6(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop8(...) metamacro_drop7(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop9(...) metamacro_drop8(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop10(...) metamacro_drop9(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop11(...) metamacro_drop10(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop12(...) metamacro_drop11(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop13(...) metamacro_drop12(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop14(...) metamacro_drop13(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop15(...) metamacro_drop14(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop16(...) metamacro_drop15(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop17(...) metamacro_drop16(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop18(...) metamacro_drop17(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop19(...) metamacro_drop18(metamacro_tail(__VA_ARGS__)) +#define metamacro_drop20(...) metamacro_drop19(metamacro_tail(__VA_ARGS__)) + +#endif diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Modules/module.modulemap b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..9f957de --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module ReactiveCocoa { + umbrella header "ReactiveCocoa.h" + + export * + module * { export * } +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa new file mode 100755 index 0000000..d7c140d Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Resources/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..4060f0a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,47 @@ + + + + + BuildMachineOSBuild + 14C1514 + CFBundleDevelopmentRegion + en + CFBundleExecutable + ReactiveCocoa + CFBundleIdentifier + org.reactivecocoa.ReactiveCocoa + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ReactiveCocoa + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 6C131e + DTPlatformVersion + GM + DTSDKBuild + 14A383 + DTSDKName + macosx10.10 + DTXcode + 0620 + DTXcodeBuild + 6C131e + NSHumanReadableCopyright + Copyright © 2014 GitHub. All rights reserved. + UIDeviceFamily + + 1 + 2 + + + diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Headers b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Modules b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Resources b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Squirrel b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Squirrel new file mode 120000 index 0000000..af91e72 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Squirrel @@ -0,0 +1 @@ +Versions/Current/Squirrel \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/NSBundle+SQRLVersionExtensions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/NSBundle+SQRLVersionExtensions.h new file mode 100644 index 0000000..be7e466 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/NSBundle+SQRLVersionExtensions.h @@ -0,0 +1,20 @@ +// +// NSBundle+SQRLVersionExtensions.h +// Squirrel +// +// Created by Justin Spahr-Summers on 2013-09-25. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +@interface NSBundle (SQRLVersionExtensions) + +// The value associated with the `CFBundleVersion` key in the receiver's +// Info.plist, or nil if the key is not present. +@property (nonatomic, copy, readonly) NSString *sqrl_bundleVersion; + +/// The value of the `kCFBundleExecutableKey` key. +@property (nonatomic, copy, readonly) NSString *sqrl_executableName; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/NSProcessInfo+SQRLVersionExtensions.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/NSProcessInfo+SQRLVersionExtensions.h new file mode 100644 index 0000000..7c419c3 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/NSProcessInfo+SQRLVersionExtensions.h @@ -0,0 +1,16 @@ +// +// NSProcessInfo+SQRLVersionExtensions.h +// Squirrel +// +// Created by Justin Spahr-Summers on 2013-09-16. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +@interface NSProcessInfo (SQRLVersionExtensions) + +// The short version string (e.g. `10.8.5`) for the running version of OS X. +@property (nonatomic, copy, readonly) NSString *sqrl_operatingSystemShortVersionString; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLDownloadedUpdate.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLDownloadedUpdate.h new file mode 100644 index 0000000..22f86a1 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLDownloadedUpdate.h @@ -0,0 +1,31 @@ +// +// SQRLDownloadedUpdate.h +// Squirrel +// +// Created by Justin Spahr-Summers on 2013-09-25. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +@class SQRLUpdate; + +// A SQRLUpdate that has been successfully downloaded to disk. +@interface SQRLDownloadedUpdate : MTLModel + +// The application bundle representing the downloaded and unarchived update. +@property (nonatomic, strong, readonly) NSBundle *bundle; + +// The update information sent by the server. +// +// This may be a `SQRLUpdate` subclass if `SQRLUpdater.updateClass` was changed. +@property (nonatomic, copy, readonly) SQRLUpdate *update; + +// Initializes the receiver with update metadata and the downloaded and +// unarchived bundle. +// +// update - The update information sent by the server. This must not be nil. +// bundle - The application bundle representing the update. This must not be nil. +- (id)initWithUpdate:(SQRLUpdate *)update bundle:(NSBundle *)bundle; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLUpdate.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLUpdate.h new file mode 100644 index 0000000..9e98f0e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLUpdate.h @@ -0,0 +1,31 @@ +// +// SQRLUpdate.h +// Squirrel +// +// Created by Keith Duncan on 18/09/2013. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import +#import + +// An update parsed from a response to the `SQRLUpdater.updateRequest`. +// +// This can be subclassed, and `SQRLUpdater.updateClass` set, to preserve +// additional JSON data. Any subclasses must be immutable, and should inherit +// their superclass' property key and transformer behaviors. +@interface SQRLUpdate : MTLModel + +// The release notes for the update. +@property (readonly, copy, nonatomic) NSString *releaseNotes; + +// The release name for the update. +@property (readonly, copy, nonatomic) NSString *releaseName; + +// The release date for the update. +@property (readonly, copy, nonatomic) NSDate *releaseDate; + +// The URL to the update package that should be downloaded for installation. +@property (readonly, copy, nonatomic) NSURL *updateURL; + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLUpdater.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLUpdater.h new file mode 100644 index 0000000..4917f41 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/SQRLUpdater.h @@ -0,0 +1,145 @@ +// +// SQRLUpdater.h +// Squirrel +// +// Created by Justin Spahr-Summers on 2013-07-21. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import +#import + +// Represents the current state of the updater. +// +// SQRLUpdaterStateIdle - Doing absolutely diddly squat. +// SQRLUpdaterStateCheckingForUpdate - Checking for any updates from the server. +// SQRLUpdaterStateDownloadingUpdate - Update found, downloading the archive. +// SQRLUpdaterStateAwaitingRelaunch - Awaiting a relaunch to install +// the update. +typedef enum : NSUInteger { + SQRLUpdaterStateIdle, + SQRLUpdaterStateCheckingForUpdate, + SQRLUpdaterStateDownloadingUpdate, + SQRLUpdaterStateAwaitingRelaunch, +} SQRLUpdaterState; + +// The domain for errors originating within SQRLUpdater. +extern NSString * const SQRLUpdaterErrorDomain; + +// The downloaded update does not contain an app bundle, or it was deleted on +// disk before we could get to it. +extern const NSInteger SQRLUpdaterErrorMissingUpdateBundle; + +// An error occurred in the out-of-process updater while it was setting up. +extern const NSInteger SQRLUpdaterErrorPreparingUpdateJob; + +// The code signing requirement for the running application could not be +// retrieved. +extern const NSInteger SQRLUpdaterErrorRetrievingCodeSigningRequirement; + +// The server sent a response that we didn't understand. +// +// Includes `SQRLUpdaterServerDataErrorKey` in the error's `userInfo`. +extern const NSInteger SQRLUpdaterErrorInvalidServerResponse; + +// The server sent a response body that we didn't understand. +// +// Includes `SQRLUpdaterServerDataErrorKey` in the error's `userInfo`. +extern const NSInteger SQRLUpdaterErrorInvalidServerBody; + +// The server sent update JSON that we didn't understand. +// +// Includes `SQRLUpdaterJSONObjectErrorKey` in the error's `userInfo`. +extern const NSInteger SQRLUpdaterErrorInvalidJSON; + +// Associated with the `NSData` received from the server when an error with code +// `SQRLUpdaterErrorInvalidServerResponse` is generated. +extern NSString * const SQRLUpdaterServerDataErrorKey; + +// Associated with the JSON object that was received from the server when an +// error with code `SQRLUpdaterErrorInvalidJSON` is generated. +extern NSString * const SQRLUpdaterJSONObjectErrorKey; + +@class RACCommand; +@class RACDisposable; +@class RACSignal; + +// Checks for, downloads, and installs updates. +@interface SQRLUpdater : NSObject + +// Kicks off a check for updates. +// +// If an update is available, it will be sent on `updates` once downloaded. +@property (nonatomic, strong, readonly) RACCommand *checkForUpdatesCommand; + +// The current state of the manager. +// +// This property is KVO-compliant. +@property (atomic, readonly) SQRLUpdaterState state; + +// Sends an `SQRLDownloadedUpdate` object on the main thread whenever a new +// update is available. +// +// This signal is actually just `checkForUpdatesCommand.executionSignals`, +// flattened for convenience. +@property (nonatomic, strong, readonly) RACSignal *updates; + +// The request that will be sent to check for updates. +// +// The default value is the argument that was originally passed to +// -initWithUpdateRequest:. +// +// This property must never be set to nil. +@property (atomic, copy) NSURLRequest *updateRequest; + +// The `SQRLUpdate` subclass to instantiate with the server's response. +// +// By default, this is `SQRLUpdate` itself, but it can be set to a custom +// subclass in order to preserve additional JSON data. See the `SQRLUpdate` +// documentation for more information. +@property (atomic, strong) Class updateClass; + +// Initializes an updater that will send the given request to check for updates. +// +// This is the designated initializer for this class. +// +// updateRequest - A request to send to check for updates. This request can be +// customized as desired, like by including an `Authorization` +// header to authenticate with a private update server, or +// pointing to a local URL for testing. This must not be nil. +// +// Returns the initialized `SQRLUpdater`. +- (id)initWithUpdateRequest:(NSURLRequest *)updateRequest; + +// Executes `checkForUpdatesCommand` (if enabled) every `interval` seconds. +// +// The first check will not occur until `interval` seconds have passed. +// +// interval - The interval, in seconds, between each check. +// +// Returns a disposable which can be used to cancel the automatic update +// checking. +- (RACDisposable *)startAutomaticChecksWithInterval:(NSTimeInterval)interval; + +// Terminates the running application to install any available update, then +// automatically relaunches the app after updating. +// +// This method is only useful if you want the application to automatically +// relaunch. Otherwise, you can simply use `-[NSApplication terminate:]` or any +// other exit mechanism. +// +// After invoking this method, the receiver is responsible for terminating the +// application upon success. The app must not be terminated in any other way +// unless an error occurs. +// +// Returns a signal that will error on the main scheduler if anything goes +// wrong before termination. The signal will never complete. +- (RACSignal *)relaunchToInstallUpdate; + +@end + +@interface SQRLUpdater (Unavailable) + +- (id)init __attribute__((unavailable("Use -initWithUpdateRequest: instead"))); + +@end diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/Squirrel.h b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/Squirrel.h new file mode 100644 index 0000000..23dc330 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Headers/Squirrel.h @@ -0,0 +1,21 @@ +// +// Squirrel.h +// Squirrel +// +// Created by Justin Spahr-Summers on 2013-07-21. +// Copyright (c) 2013 GitHub. All rights reserved. +// + +#import + +//! Project version number for Squirrel. +FOUNDATION_EXPORT double SquirrelVersionNumber; + +//! Project version string for Squirrel. +FOUNDATION_EXPORT const unsigned char SquirrelVersionString[]; + +#import +#import +#import +#import +#import diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Modules/module.modulemap b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..b31af5f --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module Squirrel { + umbrella header "Squirrel.h" + + export * + module * { export * } +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..e102637 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 14F27 + CFBundleDevelopmentRegion + English + CFBundleExecutable + Squirrel + CFBundleIdentifier + com.github.Squirrel + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Squirrel + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 6E35b + DTPlatformVersion + GM + DTSDKBuild + 14D125 + DTSDKName + macosx10.10 + DTXcode + 0640 + DTXcodeBuild + 6E35b + NSHumanReadableCopyright + Copyright © 2013 GitHub. All rights reserved. + + diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt new file mode 100755 index 0000000..b74f760 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel new file mode 100755 index 0000000..957242d Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/Current b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Frameworks/Squirrel.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Info.plist b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Info.plist new file mode 100644 index 0000000..c32f540 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 14B25 + CFBundleDisplayName + Fastlane + CFBundleExecutable + Fastlane + CFBundleIconFile + atom.icns + CFBundleIdentifier + com.electron.fastlane + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Fastlane + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.37.3 + CFBundleVersion + 0.37.3 + DTSDKBuild + 14D125 + DTSDKName + macosx10.10 + DTXcode + 0640 + DTXcodeBuild + 6E35b + LSApplicationCategoryType + public.app-category.developer-tools + LSMinimumSystemVersion + 10.9.0 + NSHighResolutionCapable + + NSMainNibFile + MainMenu + NSPrincipalClass + AtomApplication + NSSupportsAutomaticGraphicsSwitching + + + \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/MacOS/Fastlane b/release/Fastlane-darwin-x64/Fastlane.app/Contents/MacOS/Fastlane new file mode 100755 index 0000000..dda96a4 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/MacOS/Fastlane differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/PkgInfo b/release/Fastlane-darwin-x64/Fastlane.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.babelrc b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.babelrc new file mode 100755 index 0000000..da73fd8 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.babelrc @@ -0,0 +1,14 @@ +{ + "presets": ["es2015", "stage-0", "react"], + "plugins": [ + "transform-runtime", + "babel-plugin-transform-decorators-legacy", + ["react-transform", { + "transforms": [{ + "transform" : "react-transform-hmr", + "imports" : ["react"], + "locals" : ["module"] + }] + }] + ] +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.eslintrc b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.eslintrc new file mode 100644 index 0000000..ecfa907 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.eslintrc @@ -0,0 +1,40 @@ +{ + "parser": "babel-eslint", + "extends": "airbnb", + "rules": { + "space-before-keywords": 0, + "no-empty-label": 0, + "no-nested-ternary": 0, + "react/jsx-quotes": 0, + "react/jsx-no-bind": 0, + "jsx-quotes": [2, "prefer-double"], + "id-length": 0, + "consistent-return": 0, + "no-console": 0, + "indent": [ + 2, + 2 + ], + "quotes": [ + 2, + "single" + ], + "linebreak-style": [ + 2, + "unix" + ], + "semi": [ + 2, + "always" + ], + "comma-dangle": [ + 2, + "always-multiline" + ], + }, + "env": { + "es6": true, + "node": true, + "browser": true + }, +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.gitignore b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.gitignore new file mode 100755 index 0000000..f2791f0 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.gitignore @@ -0,0 +1,6 @@ +npm-debug.log +node_modules +public +*.iml +config.json +build diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.nvmrc b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.nvmrc new file mode 100644 index 0000000..91ff572 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.nvmrc @@ -0,0 +1 @@ +5.2.0 diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.travis.yml b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.travis.yml new file mode 100644 index 0000000..587bd3e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/.travis.yml @@ -0,0 +1 @@ +language: node_js diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/README.md b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/README.md new file mode 100644 index 0000000..1fdcaa7 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/README.md @@ -0,0 +1,40 @@ +## Fastlane - Uber from your menubar + +![Build](https://travis-ci.org/pontusab/Fastlane.svg?branch=master) + +![ScreenShot](https://raw.githubusercontent.com/pontusab/Fastlane/master/design/Fastlane-fullscreen.png) + +## Why? +I wanted to build something with React and Electron so I started thinking during Christmas what I wanted to build and I realized when I sat at the computer and did not know where my cell phone was to be able to book an Uber then it hit me that an Mac App for Uber would be fun to build and Uber pretty recently released their API endpoint for requests. Success! + +I started of using Sketch and moked everything up in Html, Css and then React. I have noticed that the code and structure could easily be rewritten to be more easy to understand and use. + +## Installation +Run npm-install to install all dependencies and rename config-template.json to config.json and add your API-keys from (https://developer.uber.com). + +Start the app by running `npm run start` and to build the packade `npm run build`. + +## TODO +- [ ] Remove React router +- [ ] Rewrite the code and cleanup +- [ ] Add support for no cars available +- [ ] Remove Api-server and use client only (CORS support) +- [ ] Implement Philips Hue to flash when car is arriving +- [x] Implement Map + + +## How to contribute +My contact information is located on my [Github profile](https://github.com/pontusab) + +[Got questions or suggestions?](https://github.com/pontusab/Fastlane/issues) + +## Author + +[![Pontus Abrahamsson](https://avatars2.githubusercontent.com/u/655158?v=3&u=60ff29b56ebe0343294ea2b55f9c0fd43a0d9341&s=140)](https://sindresorhus.com) + +[Pontus Abrahamsson](https://twitter.com/pontusab) + +* [Twitter](https://twitter.com/pontusab) +* [LinkedIn](https://www.linkedin.com/in/pontusabrahamsson) +* [Mail](mailto:info@wdlinkoping.se) +* [Blog](https://medium.com/@pontusab) diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/api.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/api.js new file mode 100644 index 0000000..21f9a64 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/api.js @@ -0,0 +1,106 @@ +import express from 'express'; +import config from '../config'; +import uber from './service/uber'; +import geolocation from './service/geolocation'; + +const { API_PORT, DOMAIN } = config; + +const api = express(); + +api.use((req, res, next) => { + res.header('Access-Control-Allow-Origin', DOMAIN); + res.header('Access-Control-Allow-Methods', 'DELETE'); + res.header('Access-Control-Allow-Credentials', true); + next(); +}); + +/** + * Geolocation + * GET /geolocation + */ +api.get('/geolocation', async (req, res) => res.json(await geolocation.lookup())); + +/** + * Authenticate + * GET /oauth/v2/authorize + * @param {code} + */ +api.post('/auth', async (req, res) => + res.json(await uber.authenticate(req.query.code))); + +/** + * Product types + * GET /v1/products + * @param {latitude} + * @param {longitude} + */ +api.get('/products', async (req, res) => + res.json(await uber.request('v1/products', req.query))); + +/** + * Time estimates + * GET /v1/estimates/time + * @param {start_latitude} + * @param {start_longitude} + * @param {customer_uuid?} + * @param {product_id?} + */ +api.get('/estimates/time', async (req, res) => + res.json(await uber.request('v1/estimates/time', req.query))); + +/** + * Price estimates + * GET /v1/estimates/price + * @param {start_latitude} + * @param {start_longitude} + * @param {end_latitude} + * @param {end_longitude} + */ +api.get('/estimates/price', async (req, res) => + res.json(await uber.request('v1/estimates/price', req.query))); + +/** + * Ride request - Map + * GET /v1/request + * @param {request_id} + */ +api.get('/request/:request_id/map', async (req, res) => + res.json(await uber.request(`v1/requests/${req.params.request_id}/map`, req.query))); + +/** + * Ride request + * POST /v1/request + * @param {start_latitude} + * @param {start_longitude} + * @param {product_id?} + * @param {start_nickname?} + * @param {start_address?} + * @param {end_latitude?} + * @param {end_longitude?} + * @param {end_nickname?} + * @param {end_address?} + * @param {surge_confirmation_id?} + */ +api.post('/request', async (req, res) => + res.json(await uber.request('v1/requests', req.query, 'POST'))); + +/** + * Ride request - Details + * GET /v1/request + * @param {request_id} + */ +api.get('/request/:request_id', async (req, res) => + res.json(await uber.request(`v1/requests/${req.params.request_id}`, req.query))); + +/** + * Ride request - Delete + * DELETE /v1/request + * @param {request_id} + */ +api.delete('/request/:request_id', async (req, res) => + res.json(await uber.delete(`v1/requests/${req.params.request_id}`, req.query))); + + +api.listen(API_PORT, () => { + console.log(`Api started on port ${API_PORT}`); +}); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/service/geolocation.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/service/geolocation.js new file mode 100644 index 0000000..fa47874 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/service/geolocation.js @@ -0,0 +1,15 @@ +import Promise from 'bluebird'; +import qs from 'query-string'; +import fetch from 'node-fetch'; + +export default { + lookup() { + const query = qs.stringify({ + browser: 'chromium', + sensor: true, + }); + + return Promise.resolve(fetch(`https://maps.googleapis.com/maps/api/browserlocation/json?${query}`) + .then((res) => res.json())); + }, +}; diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/service/uber.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/service/uber.js new file mode 100644 index 0000000..ffc4ba9 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/api/service/uber.js @@ -0,0 +1,53 @@ +import Promise from 'bluebird'; +import qs from 'query-string'; +import fetch from 'node-fetch'; +import config from '../../config.json'; + +const { + CLIENT_ID, + REDIRECT_URI, + CLIENT_SECRET, + UBER_AUTH_ENDPOINT, + UBER_API_ENDPOINT, +} = config; + +export default { + authenticate(code) { + const query = qs.stringify({ + client_secret: CLIENT_SECRET, + response_type: 'code', + grant_type: 'authorization_code', + redirect_uri: REDIRECT_URI, + client_id: CLIENT_ID, + code, + }); + + return Promise.resolve(fetch(`${UBER_AUTH_ENDPOINT}/v2/token?${query}`, { + method: 'POST', + }).then((res) => res.json())); + }, + + delete(request, params) { + const { token } = params; + + return Promise.resolve(fetch(`${UBER_API_ENDPOINT}/${request}`, { + headers: { + Authorization: `Bearer ${token}`, + }, + method: 'DELETE', + }).then((res) => res.json())); + }, + + request(request, params, method = 'GET') { + const { token } = params; + + return Promise.resolve(fetch(`${UBER_API_ENDPOINT}/${request}?${qs.stringify(params)}`, { + headers: { + Authorization: `Bearer ${token}`, + 'Content-Type': 'application/json', + }, + method, + body: JSON.stringify(params), + }).then((res) => res.json())); + }, +}; diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/fonts/light.woff b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/fonts/light.woff new file mode 100755 index 0000000..29c1e85 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/fonts/light.woff differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/fonts/ultra.woff b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/fonts/ultra.woff new file mode 100755 index 0000000..1b4786a Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/fonts/ultra.woff differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/bg.png b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/bg.png new file mode 100644 index 0000000..b5563b4 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/bg.png differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/logo.svg b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/logo.svg new file mode 100644 index 0000000..aa64914 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/logo.svg @@ -0,0 +1,13 @@ + + + + logo + Created with Sketch. + + + + + \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/star-light.svg b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/star-light.svg new file mode 100644 index 0000000..2d42c01 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/assets/img/star-light.svg @@ -0,0 +1,20 @@ + + + + star-light + Created with Sketch. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/config-template.json b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/config-template.json new file mode 100644 index 0000000..867f459 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/config-template.json @@ -0,0 +1,13 @@ +{ + "PORT": 5555, + "API_PORT": 5556, + "DOMAIN": "http://localhost:5555", + "API_ENDPOINT": "http://localhost:5556", + "REDIRECT_URI": "http://localhost:5555", + "UBER_AUTH_ENDPOINT": "https://login.uber.com/oauth", + "UBER_API_ENDPOINT": "https://sandbox-api.uber.com", + "CLIENT_ID": "", + "CLIENT_SECRET": "", + "SESSION_SECRET": "", + "GA_UA": "UA-XXXXXX-X" +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane-fullscreen.png b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane-fullscreen.png new file mode 100644 index 0000000..ca919ee Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane-fullscreen.png differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane.png b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane.png new file mode 100644 index 0000000..7eb8352 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane.png differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane.sketch b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane.sketch new file mode 100644 index 0000000..44ebcf9 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/design/Fastlane.sketch differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop.js new file mode 100644 index 0000000..0596ef3 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop.js @@ -0,0 +1,23 @@ +const menubar = require('menubar'); +const path = require('path'); + +// enable ES6 (transpiling behind the scene) +require('babel-register'); + +// start frontend server +require('./src/server.js'); + +// start api server +require('./api/api.js'); + +menubar({ + icon: path.join(__dirname, '/desktop/icons/UberLogo.png'), + // transparent: true, + movable: false, + resizable: false, + useContentSize: true, + height: 525, + width: 340, + index: `file://${__dirname}/desktop/app.html`, + y: 30, +}); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/app.html b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/app.html new file mode 100644 index 0000000..801653e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/app.html @@ -0,0 +1,59 @@ + + + + + + + diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo.png b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo.png new file mode 100644 index 0000000..565a699 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo.png differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@2x.png b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@2x.png new file mode 100644 index 0000000..bbbbc56 Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@2x.png differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@3x.png b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@3x.png new file mode 100644 index 0000000..75208fc Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@3x.png differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@4x.png b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@4x.png new file mode 100644 index 0000000..ecd538b Binary files /dev/null and b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/desktop/icons/UberLogo@4x.png differ diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/index.html b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/index.html new file mode 100755 index 0000000..174d91f --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/index.html @@ -0,0 +1,15 @@ + + + + + + +
+ + + + + diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/index.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/index.js new file mode 100644 index 0000000..eb45efd --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/index.js @@ -0,0 +1,8 @@ +// enable ES6 (transpiling behind the scene) +require('babel-register'); + +// start frontend server +require('./src/server.js'); + +// start api server +require('./api/api.js'); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/package.json b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/package.json new file mode 100644 index 0000000..7480d8d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/package.json @@ -0,0 +1,61 @@ +{ + "name": "Fastlane", + "author": "Pontus Abrahamsson", + "homepage": "http://fastlaneapp.co", + "version": "1.0.0", + "main": "desktop.js", + "private": true, + "scripts": { + "dev": "webpack -w & node index.js", + "desktop": "webpack -p & electron desktop.js", + "lint": "./node_modules/eslint/bin/eslint.js \"src/**/?(*.js|*.jsx)\" index.js" + }, + "dependencies": { + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-runtime": "^6.6.1", + "bluebird": "^3.3.4", + "classnames": "^2.2.3", + "express": "^4.13.4", + "history": "^2.0.1", + "lodash": "^4.7.0", + "menubar": "4.1.0", + "node-fetch": "^1.4.1", + "query-string": "^4.1.0", + "react": "^0.14.8", + "react-dom": "^0.14.8", + "react-ga": "^1.3.0", + "react-geosuggest": "1.19.0", + "react-redux": "^4.4.1", + "react-router": "^2.0.1", + "redux": "^3.3.1", + "redux-actions": "^0.9.1", + "redux-promise": "^0.5.3" + }, + "devDependencies": { + "babel-core": "^6.7.4", + "babel-eslint": "^6.0.2", + "babel-loader": "^6.2.4", + "babel-plugin-react-transform": "^2.0.2", + "babel-plugin-transform-runtime": "^6.6.0", + "babel-preset-es2015": "^6.6.0", + "babel-preset-react": "^6.5.0", + "babel-preset-stage-0": "^6.5.0", + "css-loader": "^0.23.1", + "eslint": "^2.6.0", + "eslint-config-airbnb": "^6.2.0", + "eslint-plugin-react": "^4.2.3", + "json-loader": "^0.5.4", + "node-sass": "^3.4.2", + "pre-commit": "^1.1.2", + "react-transform-hmr": "^1.0.4", + "sass-loader": "^3.2.0", + "style-loader": "^0.13.1", + "webpack": "^2.1.0-beta.2", + "webpack-dev-middleware": "^1.6.1", + "webpack-hot-middleware": "^2.10.0" + }, + "pre-commit": [ + "lint", + "test" + ] +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/authenticateAction.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/authenticateAction.js new file mode 100644 index 0000000..8f83e4d --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/authenticateAction.js @@ -0,0 +1,4 @@ +import { createAction } from 'redux-actions'; +import backend from '../service/backend'; + +export default createAction('AUTHENTICATE', async (code) => await backend.authenticate(code)); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/cancelRequestAction.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/cancelRequestAction.js new file mode 100644 index 0000000..865a16e --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/cancelRequestAction.js @@ -0,0 +1,4 @@ +import { createAction } from 'redux-actions'; +import backend from '../service/backend'; + +export default createAction('CANCEL_REQUEST', async (id) => await backend.cancel(id)); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/getEnRouteMap.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/getEnRouteMap.js new file mode 100644 index 0000000..57dc0b5 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/getEnRouteMap.js @@ -0,0 +1,4 @@ +import { createAction } from 'redux-actions'; +import backend from '../service/backend'; + +export default createAction('RIDEMAP', async (id) => await backend.requestMap(id)); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/getRequestAction.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/getRequestAction.js new file mode 100644 index 0000000..4ddbef7 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/getRequestAction.js @@ -0,0 +1,4 @@ +import { createAction } from 'redux-actions'; +import backend from '../service/backend'; + +export default createAction('REQUEST', async (id) => await backend.requestStatus(id)); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/orderAction.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/orderAction.js new file mode 100644 index 0000000..3faabda --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/orderAction.js @@ -0,0 +1,3 @@ +import { createAction } from 'redux-actions'; + +export default createAction('ORDER', async (order) => order); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/priceAction.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/priceAction.js new file mode 100644 index 0000000..0b87d52 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/priceAction.js @@ -0,0 +1,4 @@ +import { createAction } from 'redux-actions'; +import backend from '../service/backend'; + +export default createAction('GET_PRICES', async (start, end) => await backend.prices(start, end)); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/productAction.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/productAction.js new file mode 100644 index 0000000..9065ec0 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/productAction.js @@ -0,0 +1,9 @@ +import { createAction } from 'redux-actions'; +import backend from '../service/backend'; + +export default createAction('GET_PRODUCTS', async (selectedLocation) => { + const { location } = selectedLocation || await backend.lookup(); + const { times: products } = await backend.products(location); + + return products; +}); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/requestAction.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/requestAction.js new file mode 100644 index 0000000..e3b1a42 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/action/requestAction.js @@ -0,0 +1,4 @@ +import { createAction } from 'redux-actions'; +import backend from '../service/backend'; + +export default createAction('REQUEST', async (order) => await backend.request(order)); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/client.js b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/client.js new file mode 100755 index 0000000..c056aaa --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/client.js @@ -0,0 +1,19 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Router } from 'react-router'; +import { Provider } from 'react-redux'; +import { browserHistory } from 'react-router'; +import routes from './routes.jsx'; +import configureStore from './configureStore'; +import './sass/main.scss'; + +const store = configureStore(); + +ReactDOM.render( + + + {routes} + + , + document.getElementById('root') +); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/App.jsx b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/App.jsx new file mode 100644 index 0000000..0fc4ba6 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/App.jsx @@ -0,0 +1,8 @@ +/* eslint-disable */ +import React from 'react'; + +export default ({ children }) => ( +
+ {React.cloneElement(children)} +
+); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/Auth.jsx b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/Auth.jsx new file mode 100644 index 0000000..8030c84 --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/Auth.jsx @@ -0,0 +1,39 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import qs from 'query-string'; +import authenticate from '../action/authenticateAction'; +import Loading from './Loading.jsx'; + +function select(state) { + return { + user: state.user, + }; +} + +@connect(select) +export default class Auth extends React.Component { + static propTypes = { + dispatch: React.PropTypes.func.isRequired, + }; + + componentDidMount() { + const { code } = qs.parse(window.location.search); + if (code) this.props.dispatch(authenticate(code)); + } + + componentWillReceiveProps({ user }) { + if (user.error) return; + + localStorage.setItem('user', JSON.stringify(user)); + + setTimeout(() => window.location.replace('/'), 2000); + } + + render() { + return ( +
+ +
+ ); + } +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/AutoComplete.jsx b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/AutoComplete.jsx new file mode 100644 index 0000000..3ef9e8b --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/AutoComplete.jsx @@ -0,0 +1,68 @@ +/* eslint no-undef: 0 */ + +import React from 'react'; +import { connect } from 'react-redux'; +import { findDOMNode } from 'react-dom'; +import cx from 'classnames'; +import Geosuggest from 'react-geosuggest'; +import productAction from '../action/productAction'; +import priceAction from '../action/priceAction'; +import orderAction from '../action/orderAction'; + +function select(state) { + return { + order: state.order, + }; +} + +@connect(select) +export default class AutoComplete extends React.Component { + static propTypes = { + dispatch: React.PropTypes.func.isRequired, + order: React.PropTypes.object.isRequired, + }; + + componentDidMount() { + findDOMNode(document.querySelectorAll('.geosuggest__input')[0]).focus(); + } + + setStartLocation(location) { + this.props.dispatch(orderAction({ start: location })); + this.props.dispatch(productAction(location)); + + findDOMNode(document.querySelectorAll('.geosuggest__input')[1]).focus(); + } + + setEndLocation(location) { + const start = this.props.order.start; + this.props.dispatch(orderAction({ end: location })); + this.props.dispatch(priceAction(start, location)); + } + + render() { + const classes = cx('options-form', { + 'is-expanded': this.props.order.start, + }); + + return ( +
+
+ +
+ +
+ +
+
+ ); + } +} diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/CountDown.jsx b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/CountDown.jsx new file mode 100644 index 0000000..f36d7ac --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/CountDown.jsx @@ -0,0 +1,11 @@ +/* eslint-disable */ +import React from 'react'; +import cx from 'classnames'; + +export default ({ time, pulse }) => ( +
+ {Math.round(time / 60)} + min +
+
+); diff --git a/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/EnRoute.jsx b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/EnRoute.jsx new file mode 100644 index 0000000..d9add5a --- /dev/null +++ b/release/Fastlane-darwin-x64/Fastlane.app/Contents/Resources/app/src/component/EnRoute.jsx @@ -0,0 +1,71 @@ +import React from 'react'; +import getRequestAction from '../action/getRequestAction'; +import getEnRouteMap from '../action/getEnRouteMap'; + +export default class Confirm extends React.Component { + static propTypes = { + dispatch: React.PropTypes.func.isRequired, + order: React.PropTypes.object.isRequired, + ridemap: React.PropTypes.object.isRequired, + }; + + constructor() { + super(); + this.interval = setInterval(::this.poll, 5000); + } + + componentDidMount() { + if (!this.props.order.ridemap.href) { + this.props.dispatch(getEnRouteMap(this.props.order.request_id)); + } + } + + componentWillUnmount() { + clearInterval(this.interval); + } + + poll() { + this.props.dispatch(getRequestAction(this.props.order.request_id)); + } + + render() { + const { order } = this.props; + console.log(order.ridemap.href); + return ( +
+
+
+ + +
+ {order.driver.name} + + {order.driver.rating} + + +
+
+ +
+ + +
+ {`${order.vehicle.make} ${order.vehicle.model}`} + {order.vehicle.license_plate} +
+
+ +
+