diff --git a/app/templates/client/Gruntfile.js b/app/templates/client/Gruntfile.js deleted file mode 100644 index 1774351..0000000 --- a/app/templates/client/Gruntfile.js +++ /dev/null @@ -1,505 +0,0 @@ -// Generated on 2014-11-30 using generator-angular 0.10.0 -'use strict'; - -// # Globbing -// for performance reasons we're only matching one level down: -// 'test/spec/{,*/}*.js' -// use this if you want to recursively match all subfolders: -// 'test/spec/**/*.js' - -module.exports = function (grunt) { - - // Load grunt tasks automatically - require('load-grunt-tasks')(grunt); - - // Time how long tasks take. Can help when optimizing build times - require('time-grunt')(grunt); - - // Configurable paths for the application - var appConfig = { - app: require('./bower.json').appPath || 'app', - dist: 'dist' - }; - - // Define the configuration for all the tasks - grunt.initConfig({ - - // Project settings - yeoman: appConfig, - - // Watches files for changes and runs tasks based on the changed files - watch: { - bower: { - files: ['bower.json'], - tasks: ['wiredep'] - }, - js: { - files: ['<%= yeoman.app %>/scripts/{,*/}*.js'], - tasks: ['newer:jshint:all'], - options: { - livereload: '<%= connect.options.livereload %>' - } - }, - jsTest: { - files: ['test/spec/{,*/}*.js'], - tasks: ['newer:jshint:test', 'karma'] - }, - compass: { - files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'], - tasks: ['compass:server', 'autoprefixer'] - }, - gruntfile: { - files: ['Gruntfile.js'] - }, - livereload: { - options: { - livereload: '<%= connect.options.livereload %>' - }, - files: [ - '<%= yeoman.app %>/**/*.html', - '.tmp/styles/{,*/}*.css', - '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' - ] - } - }, - - // The actual grunt server settings - connect: { - options: { - port: 9000, - // Change this to '0.0.0.0' to access the server from outside. - hostname: 'localhost', - livereload: 35729 - }, - livereload: { - options: { - open: true, - middleware: function (connect) { - return [ - connect.static('.tmp'), - connect().use( - '/bower_components', - connect.static('./bower_components') - ), - connect.static(appConfig.app) - ]; - } - } - }, - test: { - options: { - port: 9000, - middleware: function (connect) { - return [ - connect.static('.tmp'), - connect.static('test'), - connect().use( - '/bower_components', - connect.static('./bower_components') - ), - connect.static(appConfig.app) - ]; - } - } - }, - dist: { - options: { - open: true, - base: '<%= yeoman.dist %>' - } - } - }, - - // Make sure code styles are up to par and there are no obvious mistakes - jshint: { - options: { - jshintrc: '.jshintrc', - reporter: require('jshint-stylish') - }, - all: { - src: [ - 'Gruntfile.js', - '<%= yeoman.app %>/scripts/{,*/}*.js' - ] - }, - test: { - options: { - jshintrc: 'test/.jshintrc' - }, - src: ['test/spec/{,*/}*.js'] - } - }, - - // Empties folders to start fresh - clean: { - dist: { - files: [{ - dot: true, - src: [ - '.tmp', - '<%= yeoman.dist %>/{,*/}*', - '!<%= yeoman.dist %>/.git{,*/}*' - ] - }] - }, - server: '.tmp' - }, - - // Add vendor prefixed styles - autoprefixer: { - options: { - browsers: ['last 1 version'] - }, - dist: { - files: [{ - expand: true, - cwd: '.tmp/styles/', - src: '{,*/}*.css', - dest: '.tmp/styles/' - }] - } - }, - - // Automatically inject Bower components into the app - wiredep: { - app: { - src: ['<%= yeoman.app %>/index.html'], - ignorePath: /\.\.\// - }, - sass: { - src: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'], - ignorePath: /(\.\.\/){1,2}bower_components\// - } - }, - - // Compiles Sass to CSS and generates necessary files if requested - compass: { - options: { - sassDir: '<%= yeoman.app %>/styles', - cssDir: '.tmp/styles', - generatedImagesDir: '.tmp/images/generated', - imagesDir: '<%= yeoman.app %>/images', - javascriptsDir: '<%= yeoman.app %>/scripts', - fontsDir: '<%= yeoman.app %>/styles/fonts', - importPath: './bower_components', - httpImagesPath: '/images', - httpGeneratedImagesPath: '/images/generated', - httpFontsPath: '/styles/fonts', - relativeAssets: false, - assetCacheBuster: false, - raw: 'Sass::Script::Number.precision = 10\n' - }, - dist: { - options: { - generatedImagesDir: '<%= yeoman.dist %>/images/generated' - } - }, - server: { - options: { - debugInfo: true - } - } - }, - - // Renames files for browser caching purposes - filerev: { - dist: { - src: [ - '<%= yeoman.dist %>/scripts/{,*/}*.js', - '<%= yeoman.dist %>/styles/{,*/}*.css', - '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}', - '<%= yeoman.dist %>/styles/fonts/*' - ] - } - }, - - // Reads HTML for usemin blocks to enable smart builds that automatically - // concat, minify and revision files. Creates configurations in memory so - // additional tasks can operate on them - useminPrepare: { - html: '<%= yeoman.app %>/index.html', - options: { - dest: '<%= yeoman.dist %>', - flow: { - html: { - steps: { - js: ['concat', 'uglifyjs'], - css: ['cssmin'] - }, - post: {} - } - } - } - }, - - // Performs rewrites based on filerev and the useminPrepare configuration - usemin: { - html: ['<%= yeoman.dist %>/{,*/}*.html'], - css: ['<%= yeoman.dist %>/styles/{,*/}*.css'], - options: { - assetsDirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/images'] - } - }, - - // The following *-min tasks will produce minified files in the dist folder - // By default, your `index.html`'s will take care of - // minification. These next options are pre-configured if you do not wish - // to use the Usemin blocks. - // cssmin: { - // dist: { - // files: { - // '<%= yeoman.dist %>/styles/main.css': [ - // '.tmp/styles/{,*/}*.css' - // ] - // } - // } - // }, - // uglify: { - // dist: { - // files: { - // '<%= yeoman.dist %>/scripts/scripts.js': [ - // '<%= yeoman.dist %>/scripts/scripts.js' - // ] - // } - // } - // }, - // concat: { - // dist: {} - // }, - - imagemin: { - dist: { - files: [{ - expand: true, - cwd: '<%= yeoman.app %>/images', - src: '{,*/}*.{png,jpg,jpeg,gif}', - dest: '<%= yeoman.dist %>/images' - }] - } - }, - - svgmin: { - dist: { - files: [{ - expand: true, - cwd: '<%= yeoman.app %>/images', - src: '{,*/}*.svg', - dest: '<%= yeoman.dist %>/images' - }] - } - }, - - htmlmin: { - dist: { - options: { - collapseWhitespace: true, - conservativeCollapse: true, - collapseBooleanAttributes: true, - removeCommentsFromCDATA: true, - removeOptionalTags: true - }, - files: [{ - expand: true, - cwd: '<%= yeoman.dist %>', - src: ['*.html', 'views/{,*/}*.html'], - dest: '<%= yeoman.dist %>' - }] - } - }, - - // ng-annotate tries to make the code safe for minification automatically - // by using the Angular long form for dependency injection. - ngAnnotate: { - dist: { - files: [{ - expand: true, - cwd: '.tmp/concat/scripts', - src: ['*.js', '!oldieshim.js'], - dest: '.tmp/concat/scripts' - }] - } - }, - - // Replace Google CDN references - cdnify: { - dist: { - html: ['<%= yeoman.dist %>/*.html'] - } - }, - - // Copies remaining files to places other tasks can use - copy: { - dist: { - files: [{ - expand: true, - dot: true, - cwd: '<%= yeoman.app %>', - dest: '<%= yeoman.dist %>', - src: [ - '*.{ico,png,txt}', - '.htaccess', - '*.html', - 'views/**/*.html', - 'images/{,*/}*.{webp}', - 'fonts/{,*/}*.*' - ] - }, { - expand: true, - cwd: '.tmp/images', - dest: '<%= yeoman.dist %>/images', - src: ['generated/*'] - }, { - // font-awesome - expand: true, - dot: true, - cwd: 'bower_components/font-awesome', - src: ['fonts/*.*'], - dest: '<%= yeoman.dist %>' - }, { - // bootstrap fonts - expand: true, - dot: true, - cwd: 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap', - src: ['*.*'], - dest: '<%= yeoman.dist %>/fonts' - }, { - expand: true, - cwd: '.', - src: 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/*', - dest: '<%= yeoman.dist %>' - }, { - expand: true, - cwd: '<%= yeoman.app %>', - src: 'CNAME', - dest: '<%= yeoman.dist %>' - }] - }, - styles: { - expand: true, - cwd: '<%= yeoman.app %>/styles', - dest: '.tmp/styles/', - src: '{,*/}*.css' - } - }, - - // Run some tasks in parallel to speed up the build process - concurrent: { - server: [ - 'compass:server' - ], - test: [ - 'compass' - ], - dist: [ - 'compass:dist', - 'imagemin', - 'svgmin' - ] - }, - - // Test settings - karma: { - unit: { - configFile: 'test/karma.conf.js', - singleRun: true - } - }, - - // Environment configuration. - ngconstant: { - options: { - name: 'config' - }, - server: { - constants: { - Config: grunt.file.readJSON('config.json').development - }, - values: { - debug: true - }, - options: { - dest: '<%= yeoman.app %>/scripts/config.js' - } - }, - build: { - constants: { - Config: grunt.file.readJSON('config.json').production - }, - options: { - dest: '<%= yeoman.dist %>/scripts/config.js' - } - } - }, - - // Publish to gh-pages. - buildcontrol: { - dist: { - options: { - remote: 'https://github.com/repoName.git', - branch: 'gh-pages', - commit: true, - push: true - } - } - } - }); - - - grunt.registerTask('serve', 'Compile then start a connect web server', function (target) { - if (target === 'dist') { - return grunt.task.run(['build', 'connect:dist:keepalive']); - } - - grunt.task.run([ - 'clean:server', - 'ngconstant:server', - 'wiredep', - 'concurrent:server', - 'autoprefixer', - 'connect:livereload', - 'watch' - ]); - }); - - grunt.registerTask('server', 'DEPRECATED TASK. Use the "serve" task instead', function (target) { - grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.'); - grunt.task.run(['serve:' + target]); - }); - - grunt.registerTask('test', [ - 'clean:server', - 'concurrent:test', - 'autoprefixer', - 'connect:test', - 'karma' - ]); - - grunt.registerTask('build', [ - 'clean:dist', - 'ngconstant:build', - 'wiredep', - 'useminPrepare', - 'concurrent:dist', - 'autoprefixer', - 'concat', - 'ngAnnotate', - 'copy:dist', - 'cdnify', - 'cssmin', - 'uglify', - // 'filerev', - 'usemin', - 'htmlmin' - ]); - - grunt.registerTask('deploy', [ - 'build', - 'buildcontrol' - ]); - - grunt.registerTask('default', [ - 'newer:jshint', - 'test', - 'build' - ]); -}; diff --git a/app/templates/client/README.md b/app/templates/client/README.md new file mode 100644 index 0000000..e3e56b3 --- /dev/null +++ b/app/templates/client/README.md @@ -0,0 +1,27 @@ +[![Build Status](https://travis-ci.org/Gizra/elm-spa-example.svg?branch=master)](https://travis-ci.org/Gizra/elm-spa-example) + +> elm v0.18 single page application (SPA) example + +Read about this app in the post [Faithful Elm and the Amazing Router](http://www.gizra.com/content/faithful-elm-amazing-router/) + +## Installation + +Make sure the following are installed: + +* NodeJs (and npm) +* Elm (e.g. `npm install -g elm@0.17.0`) +* Compass (for SASS) (`gem update --system && gem install compass`) + +## Usage + +1. Serve locally, and watch file changes: `gulp` +1. Prepare file for publishing (e.g. minify, and rev file names): `gulp publish` +1. Deploy to GitHub's pages (`gh-pages` branch of your repository): `gulp deploy` + +## Unit Tests + +In order to view the tests on the browser Start elm reactor (elm-reactor) and navigate to http://0.0.0.0:8000/src/elm/TestRunner.elm + +## License + +MIT diff --git a/app/templates/client/_bowerrc b/app/templates/client/_bowerrc deleted file mode 100644 index 69fad35..0000000 --- a/app/templates/client/_bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "bower_components" -} diff --git a/app/templates/client/_editorconfig b/app/templates/client/_editorconfig deleted file mode 100644 index c2cdfb8..0000000 --- a/app/templates/client/_editorconfig +++ /dev/null @@ -1,21 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] - -# Change these settings to your own preference -indent_style = space -indent_size = 2 - -# We recommend you to keep these unchanged -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/app/templates/client/_gitattributes b/app/templates/client/_gitattributes deleted file mode 100644 index 2125666..0000000 --- a/app/templates/client/_gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text=auto \ No newline at end of file diff --git a/app/templates/client/_gitignore b/app/templates/client/_gitignore index e5de5aa..9ffdce2 100644 --- a/app/templates/client/_gitignore +++ b/app/templates/client/_gitignore @@ -1,8 +1,4 @@ +elm-stuff node_modules +serve dist -.tmp -.sass-cache -bower_components -config.json -app/scripts/config.js -sync_hedley.sh diff --git a/app/templates/client/_jshintrc b/app/templates/client/_jshintrc deleted file mode 100644 index f750969..0000000 --- a/app/templates/client/_jshintrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - "node": true, - "browser": true, - "esnext": true, - "bitwise": true, - "camelcase": true, - "curly": true, - "eqeqeq": true, - "immed": true, - "indent": 2, - "latedef": true, - "newcap": true, - "noarg": true, - "quotmark": "single", - "undef": true, - "unused": true, - "strict": true, - "trailing": true, - "smarttabs": true, - "globals": { - "angular": false - } -} diff --git a/app/templates/client/_travis.yml b/app/templates/client/_travis.yml deleted file mode 100644 index a80b6e0..0000000 --- a/app/templates/client/_travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - '0.10' -before_script: - - 'npm install -g bower grunt-cli' - - 'bower install' diff --git a/app/templates/client/app/404.html b/app/templates/client/app/404.html deleted file mode 100644 index ec98e3c..0000000 --- a/app/templates/client/app/404.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - Page Not Found :( - - - -
-

Not found :(

-

Sorry, but the page you were trying to view does not exist.

-

It looks like this was the result of either:

- - - -
- - diff --git a/app/templates/client/app/CNAME b/app/templates/client/app/CNAME deleted file mode 100644 index f1921c0..0000000 --- a/app/templates/client/app/CNAME +++ /dev/null @@ -1 +0,0 @@ -# Enter your custom domain here diff --git a/app/templates/client/app/favicon.ico b/app/templates/client/app/favicon.ico deleted file mode 100644 index 8a163fb..0000000 Binary files a/app/templates/client/app/favicon.ico and /dev/null differ diff --git a/app/templates/client/app/images/marker-blue.png b/app/templates/client/app/images/marker-blue.png deleted file mode 100644 index cbf44ab..0000000 Binary files a/app/templates/client/app/images/marker-blue.png and /dev/null differ diff --git a/app/templates/client/app/images/marker-red.png b/app/templates/client/app/images/marker-red.png deleted file mode 100644 index b7cccf7..0000000 Binary files a/app/templates/client/app/images/marker-red.png and /dev/null differ diff --git a/app/templates/client/app/images/shadow.png b/app/templates/client/app/images/shadow.png deleted file mode 100644 index 3db6d1b..0000000 Binary files a/app/templates/client/app/images/shadow.png and /dev/null differ diff --git a/app/templates/client/app/images/yeoman.png b/app/templates/client/app/images/yeoman.png deleted file mode 100644 index 4ac5733..0000000 Binary files a/app/templates/client/app/images/yeoman.png and /dev/null differ diff --git a/app/templates/client/app/index.html b/app/templates/client/app/index.html deleted file mode 100644 index 0980f12..0000000 --- a/app/templates/client/app/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
- -
-

Login with demo / 1234

-
-        
-        $state = {{$state.current.name}}
-        $stateParams = {{$stateParams}}
-        $state full url = {{ $state.$current.url.source }}
-        
-      
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/templates/client/app/robots.txt b/app/templates/client/app/robots.txt deleted file mode 100644 index 9417495..0000000 --- a/app/templates/client/app/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# robotstxt.org - -User-agent: * diff --git a/app/templates/client/app/scripts/app.js b/app/templates/client/app/scripts/app.js deleted file mode 100644 index 4ff7176..0000000 --- a/app/templates/client/app/scripts/app.js +++ /dev/null @@ -1,226 +0,0 @@ -'use strict'; - -/** - * @ngdoc overview - * @name clientApp - * @description - * # clientApp - * - * Main module of the application. - */ -angular - .module('clientApp', [ - 'ngAnimate', - 'ngCookies', - 'ngSanitize', - 'config', - 'leaflet-directive', - 'LocalStorageModule', - 'ui.router', - 'angular-loading-bar' - ]) - .config(function($stateProvider, $urlRouterProvider, $httpProvider, cfpLoadingBarProvider) { - - /** - * Redirect a user to a 403 error page. - * - * @param $state - * The ui-router state. - * @param Auth - * The Auth service. - * @param $timeout - * The timeout service. - */ - var page403 = function($state, Auth,$timeout) { - if (!Auth.isAuthenticated()) { - // We need to use $timeout to make sure $state is ready to - // transition. - $timeout(function() { - $state.go('403'); - }); - } - }; - - // Now set up the states. - $stateProvider - .state('homepage', { - url: '', - controller: 'HomepageCtrl', - resolve: { - account: function(Account) { - return Account.get(); - } - } - }) - .state('login', { - url: '/login', - templateUrl: 'views/login.html', - controller: 'LoginCtrl' - }) - .state('dashboard', { - abstract: true, - url: '', - templateUrl: 'views/dashboard/main.html', - controller: 'DashboardCtrl', - onEnter: page403, - resolve: { - account: function(Account) { - return Account.get(); - }, - selectedCompany: function($stateParams) { - return $stateParams.companyId; - } - } - }) - .state('dashboard.byCompany', { - url: '/dashboard/{companyId:int}', - abstract: true, - // Since the state is abstract, we inline the tag. - template: '', - resolve: { - mapConfig: function(Map) { - return Map.getConfig(); - }, - authors: function($stateParams, Events) { - return Events.getAuthors($stateParams.companyId); - } - } - }) - .state('dashboard.byCompany.events', { - url: '/events', - templateUrl: 'views/dashboard/events/events.html', - controller: 'EventsCtrl', - onEnter: page403, - resolve: { - events: function($stateParams, Events) { - return Events.get($stateParams.companyId); - } - } - }) - .state('dashboard.byCompany.byUser', { - url: '/user/{userId:int}', - abstract: true, - // Since the state is abstract, we inline the tag. - template: '' - }) - .state('dashboard.byCompany.byUser.events', { - url: '/events', - templateUrl: 'views/dashboard/events/events.html', - controller: 'EventsCtrl', - onEnter: page403, - resolve: { - events: function($stateParams, Events) { - return Events.get($stateParams.companyId, $stateParams.userId); - } - } - }) - .state('dashboard.byCompany.byUser.events.event', { - url: '/event/{eventId:int}', - controller: 'EventsCtrl' - }) - .state('dashboard.byCompany.events.event', { - url: '/event/{eventId:int}', - controller: 'EventsCtrl' - }) - .state('dashboard.companies', { - url: '/companies', - templateUrl: 'views/dashboard/companies/companies.html', - controller: 'CompaniesCtrl', - onEnter: page403, - resolve: { - companies: function(Companies) { - return Companies.get(); - } - } - }) - .state('dashboard.companies.company', { - url: '/{id:int}', - templateUrl: 'views/dashboard/companies/companies.company.html', - controller: 'CompaniesCtrl', - onEnter: page403 - }) - .state('dashboard.account', { - url: '/my-account', - templateUrl: 'views/dashboard/account/account.html', - controller: 'AccountCtrl', - onEnter: page403, - resolve: { - account: function(Account) { - return Account.get(); - } - } - }) - .state('403', { - url: '/403', - templateUrl: 'views/403.html' - }); - - // For any unmatched url, redirect to '/'. - $urlRouterProvider.otherwise('/'); - - // Define interceptors. - $httpProvider.interceptors.push(function ($q, Auth, localStorageService) { - return { - 'request': function (config) { - if (!config.url.match(/login-token/)) { - config.headers = { - 'access-token': localStorageService.get('access_token') - }; - } - return config; - }, - - 'response': function(result) { - if (result.data.access_token) { - localStorageService.set('access_token', result.data.access_token); - } - return result; - }, - - 'responseError': function (response) { - if (response.status === 401) { - Auth.authFailed(); - } - - return $q.reject(response); - } - }; - }); - - // Configuration of the loading bar. - cfpLoadingBarProvider.includeSpinner = false; - cfpLoadingBarProvider.latencyThreshold = 1000; - }) - .run(function ($rootScope, $state, $stateParams, $log, Config) { - // It's very handy to add references to $state and $stateParams to the - // $rootScope so that you can access them from any scope within your - // applications.For example: - //
  • will set the
  • - // to active whenever 'contacts.list' or one of its decendents is active. - $rootScope.$state = $state; - $rootScope.$stateParams = $stateParams; - - if (!!Config.debugUiRouter) { - $rootScope.$on('$stateChangeStart',function(event, toState, toParams, fromState, fromParams){ - $log.log('$stateChangeStart to ' + toState.to + '- fired when the transition begins. toState,toParams : \n', toState, toParams); - }); - - $rootScope.$on('$stateChangeError',function(event, toState, toParams, fromState, fromParams){ - $log.log('$stateChangeError - fired when an error occurs during transition.'); - $log.log(arguments); - }); - - $rootScope.$on('$stateChangeSuccess',function(event, toState, toParams, fromState, fromParams){ - $log.log('$stateChangeSuccess to ' + toState.name + '- fired once the state transition is complete.'); - }); - - $rootScope.$on('$viewContentLoaded',function(event){ - $log.log('$viewContentLoaded - fired after dom rendered',event); - }); - - $rootScope.$on('$stateNotFound',function(event, unfoundState, fromState, fromParams){ - $log.log('$stateNotFound '+unfoundState.to+' - fired when a state cannot be found by its name.'); - $log.log(unfoundState, fromState, fromParams); - }); - } - }); diff --git a/app/templates/client/app/scripts/controllers/account.js b/app/templates/client/app/scripts/controllers/account.js deleted file mode 100644 index 00293bb..0000000 --- a/app/templates/client/app/scripts/controllers/account.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -/** - * @ngdoc function - * @name clientApp.controller:AccountCtrl - * @description - * # AccountCtrl - * Controller of the clientApp - */ -angular.module('clientApp') - .controller('AccountCtrl', function ($scope, account) { - $scope.account = account; - }); diff --git a/app/templates/client/app/scripts/controllers/companies.js b/app/templates/client/app/scripts/controllers/companies.js deleted file mode 100644 index be93fb0..0000000 --- a/app/templates/client/app/scripts/controllers/companies.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -/** - * @ngdoc function - * @name clientApp.controller:CompaniesCtrl - * @description - * # CompaniesCtrl - * Controller of the clientApp - */ -angular.module('clientApp') - .controller('CompaniesCtrl', function ($scope, companies, $stateParams, $log) { - - // Initialize values. - $scope.companies = companies; - $scope.selectedCompany = null; - - /** - * Set the selected Company. - * - * @param int id - * The company ID. - */ - var setSelectedCompany = function(id) { - $scope.selectedCompany = null; - - angular.forEach($scope.companies, function(value) { - if (value.id == id) { - $scope.selectedCompany = value; - } - }); - }; - - if ($stateParams.id) { - setSelectedCompany($stateParams.id); - } - }); diff --git a/app/templates/client/app/scripts/controllers/dashboard.js b/app/templates/client/app/scripts/controllers/dashboard.js deleted file mode 100644 index f5e4b18..0000000 --- a/app/templates/client/app/scripts/controllers/dashboard.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -/** - * @ngdoc function - * @name clientApp.controller:DashboardCtrl - * @description - * # DashboardCtrl - * Controller of the clientApp - */ -angular.module('clientApp') - .controller('DashboardCtrl', function ($scope, account, selectedCompany, Auth, $state, $log) { - - // Initialize values. - $scope.companies = account.companies; - $scope.selectedCompany = selectedCompany ? selectedCompany : parseInt(account.companies[0].id); - - - - /** - * Logout current user. - * - * Do whatever cleaning up is required and change state to 'login'. - */ - $scope.logout = function() { - Auth.logout(); - $state.go('login'); - }; - }); diff --git a/app/templates/client/app/scripts/controllers/events.js b/app/templates/client/app/scripts/controllers/events.js deleted file mode 100644 index ca5df47..0000000 --- a/app/templates/client/app/scripts/controllers/events.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/** - * @ngdoc function - * @name clientApp.controller:MainCtrl - * @description - * # MainCtrl - * Controller of the clientApp - */ -angular.module('clientApp') - .controller('EventsCtrl', function ($scope, events, authors, mapConfig, $state, $stateParams, $log) { - - // Initialize values. - $scope.events = events; - $scope.mapConfig = mapConfig; - $scope.authors = authors; - $scope.selectedAuthorId = null; - - /** - * Set the selected item. - * - * @param int id - * The event ID. - */ - var setSelectedEvent = function(id) { - $scope.events[id].select(); - }; - - /** - * Set the selected item. - * - * @param int id - * The event ID. - */ - var selectedAuthorId = function(id) { - $scope.selectedAuthorId = id; - }; - - if ($stateParams.eventId) { - setSelectedEvent($stateParams.eventId); - } - - if ($stateParams.userId) { - selectedAuthorId($stateParams.userId); - } - - // Select marker in the Map. - $scope.$on('leafletDirectiveMarker.click', function(event, args) { - var stateName = $stateParams.userId ? 'dashboard.byCompany.byUser.events.event' : 'dashboard.byCompany.events.event'; - $state.go(stateName, {eventId: parseInt(args.markerName)}); - }); - }); diff --git a/app/templates/client/app/scripts/controllers/homepage.js b/app/templates/client/app/scripts/controllers/homepage.js deleted file mode 100644 index 2fcaf11..0000000 --- a/app/templates/client/app/scripts/controllers/homepage.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -/** - * @ngdoc function - * @name clientApp.controller:HomepageCtrl - * @description - * # HomepageCtrl - * Controller of the clientApp - */ -angular.module('clientApp') - .controller('HomepageCtrl', function ($scope, $state, account, $log) { - if (account) { - // @todo: Remove parseInt()? - var defaultCompanyId = parseInt(account.companies[0].id); - $state.go('dashboard.byCompany.events', {companyId: defaultCompanyId}); - } - else { - // Redirect to login. - $state.go('login'); - } - }); diff --git a/app/templates/client/app/scripts/controllers/login.js b/app/templates/client/app/scripts/controllers/login.js deleted file mode 100644 index 02f286e..0000000 --- a/app/templates/client/app/scripts/controllers/login.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -/** - * @ngdoc function - * @name clientApp.controller:LoginCtrl - * @description - * # LoginCtrl - * Controller of the clientApp - */ -angular.module('clientApp') - .controller('LoginCtrl', function ($scope, Auth, $state) { - - // Will be FALSE during login GET period - will cause the login button to be - // disabled. - $scope.loginButtonEnabled = true; - - // Will be TRUE after failed login attempt. - $scope.loginFailed = false; - - /** - * Login a given user. - * - * If everything goes well, change state to 'main'. - * - * @param user - * Object with the properties "username" and "password". - */ - $scope.login = function(user) { - $scope.loginButtonEnabled = false; - Auth.login(user).then(function() { - $state.go('homepage'); - }, function() { - $scope.loginButtonEnabled = true; - $scope.loginFailed = true; - }); - }; - }); diff --git a/app/templates/client/app/scripts/directives/loadingbartext.js b/app/templates/client/app/scripts/directives/loadingbartext.js deleted file mode 100644 index 1894f13..0000000 --- a/app/templates/client/app/scripts/directives/loadingbartext.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/** - * @ngdoc directive - * @name clientApp.directive:loadingBarText - * @description - * # loadingBarText - */ -angular.module('clientApp') - .directive('loadingBarText', function () { - return { - restrict: 'EA', - template: '
    {{text}}
    ', - controller: function($scope) { - $scope.text = 'loading...'; - $scope.isLoading = false; - - /** - * Indicate a loading is in process. - * - * @param isLoading bool - * True to show the loader. - */ - function setLoading(isLoading) { - $scope.isLoading = isLoading; - } - - // Events to set the message when start the XHR request until is completed. - $scope.$on('cfpLoadingBar:started', function() { - // Set loading progress bar upon HTTP request. - setLoading(true); - }); - - $scope.$on('cfpLoadingBar:completed', function() { - setLoading(false); - }); - - }, - // Isolate scope the directive, and avoid read or modify data from the parent scope. - scope: {} - }; - }); diff --git a/app/templates/client/app/scripts/directives/spinner.js b/app/templates/client/app/scripts/directives/spinner.js deleted file mode 100644 index 27434c7..0000000 --- a/app/templates/client/app/scripts/directives/spinner.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -/** - * @ngdoc directive - * @name clientApp.directive:spinner - * @description - * # spinner - */ -angular.module('clientApp') - .directive('spinner', function () { - return { - template: '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ', - restrict: 'E' - }; - }); diff --git a/app/templates/client/app/scripts/services/account.js b/app/templates/client/app/scripts/services/account.js deleted file mode 100644 index 5e957d1..0000000 --- a/app/templates/client/app/scripts/services/account.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -/** - * @ngdoc service - * @name clientApp.account - * @description - * # account - * Service in the clientApp. - */ -angular.module('clientApp') - .service('Account', function ($q, $http, $timeout, Config, $rootScope, $log) { - - // A private cache key. - var cache = {}; - - /** - * Return the promise with the events list, from cache or the server. - * - * @returns {*} - */ - this.get = function() { - return $q.when(cache.data || getDataFromBackend()); - }; - - /** - * Return events array from the server. - * - * @returns {$q.promise} - */ - function getDataFromBackend() { - var deferred = $q.defer(); - var url = Config.backend + '/api/me/'; - - $http({ - method: 'GET', - url: url, - transformResponse: prepareResponse - }).success(function(response) { - setCache(response[0]); - deferred.resolve(response[0]); - }); - - return deferred.promise; - } - - /** - * Save meters in cache, and broadcast en event to inform that the meters data changed. - * - * @param itemId - * The item ID. - * @param data - * The data to cache. - */ - var setCache = function(data) { - // Cache data. - cache = { - data: data, - timestamp: new Date() - }; - - // Clear cache in 60 seconds. - $timeout(function() { - cache = {}; - }, 60000); - - // Broadcast a change event. - $rootScope.$broadcast('gb.account.changed'); - }; - - /** - * Prepare response; Convert ID to int. - * - * As we explicetly require ui-router to match an int, we must case the - * entity ID to integer. - * - * @param list - * - * @returns {*} - */ - function prepareResponse(data) { - // Convert response serialized to an object. - data = angular.fromJson(data).data; - - if (!data) { - // A 401 response was sent. - return; - } - - angular.forEach(data[0].companies, function(value, key) { - data[0].companies[key].id = parseInt(value.id); - }); - - return data; - }; - - $rootScope.$on('clearCache', function() { - cache = {}; - }); - - }); diff --git a/app/templates/client/app/scripts/services/auth.js b/app/templates/client/app/scripts/services/auth.js deleted file mode 100644 index 1defe8a..0000000 --- a/app/templates/client/app/scripts/services/auth.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -/** - * @ngdoc service - * @name clientApp.auth - * @description - * # auth - * Service in the clientApp. - */ -angular.module('clientApp') - .service('Auth', function ($injector, $rootScope, Utils, localStorageService, Config) { - - /** - * Login by calling the Drupal REST server. - * - * @param user - * Object with the properties "username" and "password". - * - * @returns {*} - */ - this.login = function(user) { - // Service 'Auth' can't depend on '$http', hence injecting it manually - return $injector.get('$http')({ - method: 'GET', - url: Config.backend + '/api/login-token', - headers: { - 'Authorization': 'Basic ' + Utils.Base64.encode(user.username + ':' + user.password) - } - }); - }; - - /** - * Logout current user. - * - * Do whatever cleaning up is required. - */ - this.logout = function() { - localStorageService.remove('access_token'); - - $rootScope.$broadcast('clearCache'); - // Something went wrong, change state back to login - // Service 'Auth' can't depend on '$state', hence injecting it manually - $injector.get('$state').go('login'); - - }; - - /** - * A user is logged in. - */ - this.isAuthenticated = function() { - return !!localStorageService.get('access_token'); - }; - - /** - * Authentication failed, set state to login. - */ - this.authFailed = function() { - this.logout(); - }; - }); diff --git a/app/templates/client/app/scripts/services/companies.js b/app/templates/client/app/scripts/services/companies.js deleted file mode 100644 index 56d3a63..0000000 --- a/app/templates/client/app/scripts/services/companies.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/** - * @ngdoc service - * @name clientApp.companies - * @description - * # companies - * Service in the clientApp. - */ -angular.module('clientApp') - .service('Companies', function ($q, $http, $timeout, Config, $rootScope) { - - // A private cache key. - var cache = {}; - - // Update event broadcast name. - var broadcastUpdateEventName = 'SkeletonCompaniesChange'; - - /** - * Return the promise with the events list, from cache or the server. - * - * @returns {*} - */ - this.get = function() { - return $q.when(cache.data || getDataFromBackend()); - }; - - /** - * Return events array from the server. - * - * @returns {$q.promise} - */ - var getDataFromBackend = function() { - var deferred = $q.defer(); - var url = Config.backend + '/api/companies'; - - $http({ - method: 'GET', - url: url - }).success(function(response) { - setCache(response.data); - deferred.resolve(response.data); - }); - - return deferred.promise; - }; - - /** - * Set the cache from the server. - * - * @param data - * The data to cache - */ - var setCache = function(data) { - // Cache data. - cache = { - data: data, - timestamp: new Date() - }; - - // Clear cache in 60 seconds. - $timeout(function() { - cache.data = undefined; - }, 60000); - - // Broadcast a change event. - $rootScope.$broadcast(broadcastUpdateEventName); - }; - - $rootScope.$on('clearCache', function() { - cache = {}; - }); - - }); diff --git a/app/templates/client/app/scripts/services/events.js b/app/templates/client/app/scripts/services/events.js deleted file mode 100644 index 68fe2a4..0000000 --- a/app/templates/client/app/scripts/services/events.js +++ /dev/null @@ -1,192 +0,0 @@ -'use strict'; - -/** - * @ngdoc service - * @name clientApp.events - * @description - * # events - * Service in the clientApp. - */ -angular.module('clientApp') - .service('Events', function ($q, $http, $timeout, Config, Marker, $rootScope, $log) { - - // A private cache key. - var cache = {}; - - // Update event broadcast name. - var broadcastUpdateEventName = 'SkeletonEventsChange'; - - - /** - * Return the promise with the events list, from cache or the server. - * - * @param int companyId - * The company ID. - * - * @returns {*} - */ - this.get = function(companyId, userId) { - var cacheId = companyId + ':' + userId; - if (cache && cache[cacheId]) { - return $q.when(cache[cacheId].data); - } - - return getDataFromBackend(companyId, userId); - }; - - /** - * Return a promise authors list. - * - * @param int companyId - * The company ID. - * - * @returns {*} - */ - this.getAuthors = function(companyId) { - var deferred = $q.defer(); - var authors = {}; - this.get(companyId).then(function(events) { - angular.forEach(events, function(event) { - authors[event.user.id] = { - id: parseInt(event.user.id), - name: event.user.label, - count: authors[event.user.id] ? ++authors[event.user.id].count : 1 - }; - }); - deferred.resolve(authors); - }); - return deferred.promise; - }; - - - /** - * Create a new item. - * - * @param data - * Object with data to be saved. - */ - this.create= function(data) { - var deferred = $q.defer(); - var url = Config.backend + '/api/events'; - var self = this; - - $http({ - method: 'POST', - url: url, - data: data - }).success(function(response) { - - // Add the new item to the cache. - var companyId = data.company; - self.get(companyId).then(function(cachedData) { - cachedData.unshift(response.data[0]); - setCache(companyId, cachedData); - }); - - deferred.resolve(response.data[0]); - }); - - return deferred.promise; - }; - - /** - * Return events array from the server. - * - * @param int companyId - * The company ID. - * - * @returns {$q.promise} - */ - function getDataFromBackend(companyId, userId) { - var cacheId = companyId + ':' + userId; - var deferred = $q.defer(); - var url = Config.backend + '/api/events'; - var params = { - sort: '-updated', - 'filter[company]': companyId - }; - - if (userId) { - params['filter[user]'] = userId; - } - - $http({ - method: 'GET', - url: url, - params: params, - transformResponse: prepareDataForLeafletMarkers - }).success(function(response) { - setCache(cacheId, response); - deferred.resolve(response); - }); - - return deferred.promise; - }; - - /** - * Save cache, and broadcast en event to inform that the data changed. - * - * @param int companyId - * The company ID. - * @param data - * Object with the data to cache. - */ - var setCache = function(cacheId, data) { - // Cache data by company ID. - cache[cacheId] = { - data: data, - timestamp: new Date() - }; - - // Clear cache in 60 seconds. - $timeout(function() { - if (cache.data && cache.data[cacheId]) { - cache.data[cacheId] = null; - } - }, 60000); - - // Broadcast a change event. - $rootScope.$broadcast(broadcastUpdateEventName); - }; - - /** - * Convert the array of list of meters to and object of meters. - * - * Also prepare the lang and lat values so Leaflet can pick them up. - * - * @param list [] - * List of meters in an array. - * - * @returns {*} - * List of events organized in an object, each meter it's a property keyed - * by the id. - */ - function prepareDataForLeafletMarkers(list) { - var events = {}; - - // Convert response serialized to an object. - list = angular.fromJson(list).data; - - angular.forEach(list, function(event) { - events[event.id] = event; - - // Convert the geo location properties as expected by leaflet map. - events[event.id].lat = parseFloat(event.location.lat); - events[event.id].lng = parseFloat(event.location.lng); - - delete event.location; - - // Extend meter with marker properties and methods. - angular.extend(events[event.id], Marker); - // Define default icon properties and methods, in order, to be changed later. - events[event.id].unselect(); - }); - - return events; - }; - - $rootScope.$on('clearCache', function() { - cache = {}; - }); - - }); diff --git a/app/templates/client/app/scripts/services/map.js b/app/templates/client/app/scripts/services/map.js deleted file mode 100644 index eca832a..0000000 --- a/app/templates/client/app/scripts/services/map.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -angular.module('clientApp') - .service('Map', function (leafletData) { - - // Initial center point. - var cache = {}; - - /** - * Return extra configuration for the maps. - * - * @returns {*} - * Maps Default configuration object. - */ - this.getConfig = function() { - return { - zoomControlPosition: 'bottomleft', - maxZoom: 16, - minZoom: 1, - center: this.getCenter() - }; - }; - - /** - * Set geolocation values of the center of the map. - * - * @param center - * Center object format for leaftlet map. - */ - this.setCenter = function(center) { - cache.center = center; - }; - - /** - * Return of the geolocation values of the center of the map. - * - * @return center - * Center object. - */ - this.getCenter = function() { - return cache.center || {lat: 60, lng: 60, zoom: 4}; - }; - - /** - * Center the map by the marker. - * - * @param marker - * Marker object. - */ - this.centerMapByMarker = function(marker) { - leafletData.getMap().then(function(map){ - map.setView(marker.getPosition()); - }); - }; - - }); diff --git a/app/templates/client/app/scripts/services/marker.js b/app/templates/client/app/scripts/services/marker.js deleted file mode 100644 index cbca3b3..0000000 --- a/app/templates/client/app/scripts/services/marker.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -angular.module('clientApp') - .factory('Marker', function ($state, Map) { - // Save last marker selected. - var selected; - // Definitions of the map icons. - var icons = { - default: { - iconUrl: '/images/marker-blue.png', - shadowUrl: '/images/shadow.png', - iconSize: [40, 40], // size of the icon - shadowSize: [26, 26], - iconAnchor: [32, 30], // point of the icon which will correspond to marker's location - shadowAnchor: [25, 7] // the same for the shadow - }, - selected: { - iconUrl: '/images/marker-red.png', - shadowUrl: '/images/shadow.png', - iconSize: [40, 40], // size of the icon - shadowSize: [26, 26], - iconAnchor: [32, 30], // point of the icon which will correspond to marker's location - shadowAnchor: [25, 7] // the same for the shadow - } - }; - - /** - * Get the icon properties of a marker. - * - * @param type - * Name of the existing icons. - * - * @returns {*} - * Properties of the icon. - */ - function getIcon(type) { - return icons[type]; - } - - return { - /** - * Return "default" icon to set icon marker is unselected. - */ - unselect: function() { - this.icon = getIcon('default'); - }, - /** - * Select a new marker. - * - * Unselect previous marker, and return the "selected" icon. - */ - select: function() { - if (angular.isDefined(selected)) { - selected.unselect(); - } - selected = this; - this.icon = getIcon('selected'); - - Map.centerMapByMarker(this); - }, - /** - * Return geoposition object {lag: 35.00, lng: 56.56}. Generally used to center the map by the marker. - */ - getPosition: function() { - return { - lat: this.lat, - lng: this.lng - }; - } - }; - }); diff --git a/app/templates/client/app/scripts/services/utils.js b/app/templates/client/app/scripts/services/utils.js deleted file mode 100644 index 9aaf9b8..0000000 --- a/app/templates/client/app/scripts/services/utils.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -/** - * @ngdoc service - * @name clientApp.utils - * @description - * # utils - * Service in the clientApp. - */ -angular.module('clientApp') - .service('Utils', function () { - var Utils = this; - /** - * Base64 encode / decode - * http://www.webtoolkit.info/ - * - */ - this.Base64 = { - // private property - _keyStr : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', - // public method for encoding - encode : function (input) { - var output = ''; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = Utils.Base64._utf8_encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + - this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); - } - return output; - }, - // private method for UTF-8 encoding - _utf8_encode : function (string) { - string = string.replace(/\r\n/g,'\n'); - var utftext = ''; - for (var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - } - return utftext; - } - }; - }); diff --git a/app/templates/client/app/styles/_loadingbar.scss b/app/templates/client/app/styles/_loadingbar.scss deleted file mode 100644 index d1d9e37..0000000 --- a/app/templates/client/app/styles/_loadingbar.scss +++ /dev/null @@ -1,34 +0,0 @@ -.splash-screen { - position: fixed; - z-index: 1000; - font-size: 40px; - color: #26858d; - top: 40%; - left: 45%; -} - -// Loading Bar -#loading-bar { - - .bar { - height: 5px; - background: #26858d; - } - - .peg { - box-shadow: #29d 1px 0 6px 1px; - } - -} - -#loading-bar-spinner { - top: 25px; - left: 12px; - - .spinner-icon { - width: 20px; - height: 20px; - border-top-color: #26858d; - border-left-color: #26858d; - } -} diff --git a/app/templates/client/app/styles/_spinner.scss b/app/templates/client/app/styles/_spinner.scss deleted file mode 100644 index df87d69..0000000 --- a/app/templates/client/app/styles/_spinner.scss +++ /dev/null @@ -1,44 +0,0 @@ -.spinner { - margin: 100px auto 0; - width: 70px; - text-align: center; -} - -.spinner > div { - width: 18px; - height: 18px; - background-color: #333; - - border-radius: 100%; - display: inline-block; - -webkit-animation: bouncedelay 1.4s infinite ease-in-out; - animation: bouncedelay 1.4s infinite ease-in-out; - /* Prevent first frame from flickering when animation starts */ - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -.spinner .bounce1 { - -webkit-animation-delay: -0.32s; - animation-delay: -0.32s; -} - -.spinner .bounce2 { - -webkit-animation-delay: -0.16s; - animation-delay: -0.16s; -} - -@-webkit-keyframes bouncedelay { - 0%, 80%, 100% { -webkit-transform: scale(0.0) } - 40% { -webkit-transform: scale(1.0) } -} - -@keyframes bouncedelay { - 0%, 80%, 100% { - transform: scale(0.0); - -webkit-transform: scale(0.0); - } 40% { - transform: scale(1.0); - -webkit-transform: scale(1.0); - } -} diff --git a/app/templates/client/app/styles/main.scss b/app/templates/client/app/styles/main.scss deleted file mode 100644 index d7dd24a..0000000 --- a/app/templates/client/app/styles/main.scss +++ /dev/null @@ -1,14 +0,0 @@ -// @todo: We can't import _bootstrap.scss, as for some reason it causes the -// PhantomCSS tests to fail on Travis. - -// $icon-font-path: "../bower_components/bootstrap-sass-official/assets/fonts/bootstrap/"; -// bower:scss -// @import "bootstrap-sass-official/assets/stylesheets/_bootstrap.scss"; - -@import 'loadingbar.scss'; -@import 'spinner.scss'; - -#map { - min-height: 500px; -} - diff --git a/app/templates/client/app/views/403.html b/app/templates/client/app/views/403.html deleted file mode 100644 index 0412705..0000000 --- a/app/templates/client/app/views/403.html +++ /dev/null @@ -1 +0,0 @@ -

    403 error

    diff --git a/app/templates/client/app/views/dashboard/account/account.html b/app/templates/client/app/views/dashboard/account/account.html deleted file mode 100644 index cae6d09..0000000 --- a/app/templates/client/app/views/dashboard/account/account.html +++ /dev/null @@ -1,11 +0,0 @@ -
    -
    -
    - Name: {{ account.label }} -
    - -
    - Mail: {{ account.mail }} -
    -
    -
    diff --git a/app/templates/client/app/views/dashboard/companies/companies.company.html b/app/templates/client/app/views/dashboard/companies/companies.company.html deleted file mode 100644 index ecfe580..0000000 --- a/app/templates/client/app/views/dashboard/companies/companies.company.html +++ /dev/null @@ -1,7 +0,0 @@ -
    - {{ selectedCompany.label }} -
    - -
    -
    - diff --git a/app/templates/client/app/views/dashboard/companies/companies.html b/app/templates/client/app/views/dashboard/companies/companies.html deleted file mode 100644 index 3230b88..0000000 --- a/app/templates/client/app/views/dashboard/companies/companies.html +++ /dev/null @@ -1,11 +0,0 @@ -
    -
    - -
    - -
    -
    diff --git a/app/templates/client/app/views/dashboard/events/events.html b/app/templates/client/app/views/dashboard/events/events.html deleted file mode 100644 index c432815..0000000 --- a/app/templates/client/app/views/dashboard/events/events.html +++ /dev/null @@ -1,18 +0,0 @@ -
    -
    -

    Authors list

    - -
    - -
    - -
    -
    - -
    - diff --git a/app/templates/client/app/views/dashboard/main.html b/app/templates/client/app/views/dashboard/main.html deleted file mode 100644 index b2e5df5..0000000 --- a/app/templates/client/app/views/dashboard/main.html +++ /dev/null @@ -1,44 +0,0 @@ - - -
    -
    -
    diff --git a/app/templates/client/app/views/login.html b/app/templates/client/app/views/login.html deleted file mode 100644 index 829b5c3..0000000 --- a/app/templates/client/app/views/login.html +++ /dev/null @@ -1,49 +0,0 @@ -
    - -
    diff --git a/app/templates/client/bower.json b/app/templates/client/bower.json deleted file mode 100644 index 44914b1..0000000 --- a/app/templates/client/bower.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "client", - "version": "0.0.1", - "dependencies": { - "angular": "^1.3.0", - "json3": "^3.3.0", - "es5-shim": "^4.0.0", - "bootstrap-sass-official": "^3.2.0", - "angular-animate": "^1.3.0", - "angular-cookies": "^1.3.0", - "angular-sanitize": "^1.3.0", - "angular-leaflet-directive": "~0.7.9", - "angular-ui-router": "~0.2.13", - "angular-local-storage": "~0.1.5", - "angular-loading-bar": "~0.6.0" - }, - "devDependencies": { - "angular-mocks": "~1.3.0", - "angular-scenario": "~1.3.0", - "angular": "~1.4.0", - "json3": "~3.3.2", - "es5-shim": "~4.1.6" - }, - "appPath": "app", - "resolutions": { - "angular": "~1.3.16" - } -} diff --git a/app/templates/client/config.example.json b/app/templates/client/config.example.json deleted file mode 100644 index 7d1f41e..0000000 --- a/app/templates/client/config.example.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "development": { - "backend": "BASE_DOMAIN_URL", - "debugUiRouter": true - }, - "production": { - "backend": "https://example.com", - "debugUiRouter": false - } -} diff --git a/app/templates/client/config.json b/app/templates/client/config.json deleted file mode 100644 index 7d1f41e..0000000 --- a/app/templates/client/config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "development": { - "backend": "BASE_DOMAIN_URL", - "debugUiRouter": true - }, - "production": { - "backend": "https://example.com", - "debugUiRouter": false - } -} diff --git a/app/templates/client/config.travis.json b/app/templates/client/config.travis.json deleted file mode 100644 index a480fd7..0000000 --- a/app/templates/client/config.travis.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "development": { - "backend": "http://127.0.0.1:8080", - "debugUiRouter": false - } -} diff --git a/app/templates/client/elm-package.json b/app/templates/client/elm-package.json new file mode 100644 index 0000000..a8a5778 --- /dev/null +++ b/app/templates/client/elm-package.json @@ -0,0 +1,25 @@ +{ + "version": "1.0.0", + "summary": "Single page application example in Elm v0.17", + "repository": "https://github.com/Gizra/elm-spa-exmple.git", + "license": "BSD3", + "source-directories": [ + "src/elm" + ], + "exposed-modules": [], + "dependencies": { + "NoRedInk/elm-decode-pipeline": "3.0.0 <= v < 4.0.0", + "elm-community/elm-test": "3.1.0 <= v < 4.0.0", + "elm-community/json-extra": "2.0.0 <= v < 3.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/html": "2.0.0 <= v < 3.0.0", + "elm-lang/http": "1.0.0 <= v < 2.0.0", + "elm-lang/navigation": "2.0.1 <= v < 3.0.0", + "krisajenkins/remotedata": "4.0.1 <= v < 5.0.0", + "lukewestby/elm-http-builder": "4.0.0 <= v < 5.0.0", + "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0", + "sporto/erl": "11.0.0 <= v < 12.0.0", + "truqu/elm-base64": "1.0.5 <= v < 2.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmi new file mode 100644 index 0000000..625e04b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmo new file mode 100644 index 0000000..7f2e6c8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmo @@ -0,0 +1,75 @@ +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$decode = _elm_lang$core$Json_Decode$succeed; +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$resolve = _elm_lang$core$Json_Decode$andThen(_elm_lang$core$Basics$identity); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom = _elm_lang$core$Json_Decode$map2( + F2( + function (x, y) { + return y(x); + })); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$hardcoded = function (_p0) { + return _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom( + _elm_lang$core$Json_Decode$succeed(_p0)); +}; +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalDecoder = F3( + function (pathDecoder, valDecoder, fallback) { + var nullOr = function (decoder) { + return _elm_lang$core$Json_Decode$oneOf( + _elm_lang$core$Native_List.fromArray( + [ + decoder, + _elm_lang$core$Json_Decode$null(fallback) + ])); + }; + var handleResult = function (input) { + var _p1 = A2(_elm_lang$core$Json_Decode$decodeValue, pathDecoder, input); + if (_p1.ctor === 'Ok') { + var _p2 = A2( + _elm_lang$core$Json_Decode$decodeValue, + nullOr(valDecoder), + _p1._0); + if (_p2.ctor === 'Ok') { + return _elm_lang$core$Json_Decode$succeed(_p2._0); + } else { + return _elm_lang$core$Json_Decode$fail(_p2._0); + } + } else { + return _elm_lang$core$Json_Decode$succeed(fallback); + } + }; + return A2(_elm_lang$core$Json_Decode$andThen, handleResult, _elm_lang$core$Json_Decode$value); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalAt = F4( + function (path, valDecoder, fallback, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A3( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalDecoder, + A2(_elm_lang$core$Json_Decode$at, path, _elm_lang$core$Json_Decode$value), + valDecoder, + fallback), + decoder); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optional = F4( + function (key, valDecoder, fallback, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A3( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalDecoder, + A2(_elm_lang$core$Json_Decode$field, key, _elm_lang$core$Json_Decode$value), + valDecoder, + fallback), + decoder); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$requiredAt = F3( + function (path, valDecoder, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A2(_elm_lang$core$Json_Decode$at, path, valDecoder), + decoder); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required = F3( + function (key, valDecoder, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A2(_elm_lang$core$Json_Decode$field, key, valDecoder), + decoder); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/graph.dat new file mode 100644 index 0000000..4ec5eeb Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/NoRedInk/elm-decode-pipeline/3.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Expect.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Expect.elmi new file mode 100644 index 0000000..0099ff4 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Expect.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Expect.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Expect.elmo new file mode 100644 index 0000000..1097cdf --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Expect.elmo @@ -0,0 +1,342 @@ +var _elm_community$elm_test$Expect$formatDiffs = F2( + function (diffType, diffs) { + if (_elm_lang$core$List$isEmpty(diffs)) { + return ''; + } else { + var modifier = function () { + var _p0 = diffType; + if (_p0.ctor === 'Extra') { + return '+'; + } else { + return '-'; + } + }(); + return function (d) { + return A2( + _elm_lang$core$Basics_ops['++'], + ' ', + A2( + _elm_lang$core$Basics_ops['++'], + modifier, + A2( + _elm_lang$core$Basics_ops['++'], + '[ ', + A2(_elm_lang$core$Basics_ops['++'], d, ' ]')))); + }( + A2( + _elm_lang$core$String$join, + ', ', + A2(_elm_lang$core$List$map, _elm_lang$core$Basics$toString, diffs))); + } + }); +var _elm_community$elm_test$Expect$reportFailure = F3( + function (comparison, expected, actual) { + return A2( + _elm_lang$core$String$join, + '\n', + _elm_lang$core$Native_List.fromArray( + [ + actual, + '╷', + A2(_elm_lang$core$Basics_ops['++'], '│ ', comparison), + '╵', + expected + ])); + }); +var _elm_community$elm_test$Expect$onFail = F2( + function (str, expectation) { + var _p1 = expectation; + if (_p1.ctor === 'Pass') { + return expectation; + } else { + return A2(_elm_community$elm_test$Test_Expectation$Fail, _p1._0, str); + } + }); +var _elm_community$elm_test$Expect$getFailure = function (expectation) { + var _p2 = expectation; + if (_p2.ctor === 'Pass') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just( + {given: _p2._0, message: _p2._1}); + } +}; +var _elm_community$elm_test$Expect$fail = _elm_community$elm_test$Test_Expectation$Fail(''); +var _elm_community$elm_test$Expect$pass = _elm_community$elm_test$Test_Expectation$Pass; +var _elm_community$elm_test$Expect$compareWith = F4( + function (label, compare, expected, actual) { + return A2(compare, actual, expected) ? _elm_community$elm_test$Expect$pass : _elm_community$elm_test$Expect$fail( + A3( + _elm_community$elm_test$Expect$reportFailure, + label, + _elm_lang$core$Basics$toString(expected), + _elm_lang$core$Basics$toString(actual))); + }); +var _elm_community$elm_test$Expect$allHelp = F2( + function (list, query) { + allHelp: + while (true) { + var _p3 = list; + if (_p3.ctor === '[]') { + return _elm_community$elm_test$Expect$pass; + } else { + var _p4 = _p3._0(query); + if (_p4.ctor === 'Pass') { + var _v5 = _p3._1, + _v6 = query; + list = _v5; + query = _v6; + continue allHelp; + } else { + return _p4; + } + } + } + }); +var _elm_community$elm_test$Expect$all = F2( + function (list, query) { + return _elm_lang$core$List$isEmpty(list) ? _elm_community$elm_test$Expect$fail('Expect.all received an empty list. I assume this was due to a mistake somewhere, so I\'m failing this test!') : A2(_elm_community$elm_test$Expect$allHelp, list, query); + }); +var _elm_community$elm_test$Expect$equalLists = F2( + function (expected, actual) { + if (_elm_lang$core$Native_Utils.eq(expected, actual)) { + return _elm_community$elm_test$Expect$pass; + } else { + var result = A2( + _elm_lang$core$Maybe$map, + function (_p5) { + var _p6 = _p5; + var _p9 = _p6._0; + var _p8 = _p6._2; + var _p7 = _p6._1; + return _elm_community$elm_test$Expect$fail( + A2( + _elm_lang$core$String$join, + '\n', + _elm_lang$core$Native_List.fromArray( + [ + _elm_lang$core$Basics$toString(actual), + A2( + _elm_lang$core$Basics_ops['++'], + 'first diff at index index ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p9), + A2( + _elm_lang$core$Basics_ops['++'], + ': +`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p7), + A2( + _elm_lang$core$Basics_ops['++'], + '`, -`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p8), + '`')))))), + '╷', + '│ Expect.equalLists', + '╵', + A2( + _elm_lang$core$Basics_ops['++'], + 'first diff at index index ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p9), + A2( + _elm_lang$core$Basics_ops['++'], + ': +`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p8), + A2( + _elm_lang$core$Basics_ops['++'], + '`, -`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p7), + '`')))))), + _elm_lang$core$Basics$toString(expected) + ]))); + }, + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$filterMap, + function (_p10) { + var _p11 = _p10; + var _p13 = _p11._1._1; + var _p12 = _p11._1._0; + return _elm_lang$core$Native_Utils.eq(_p13, _p12) ? _elm_lang$core$Maybe$Nothing : _elm_lang$core$Maybe$Just( + {ctor: '_Tuple3', _0: _p11._0, _1: _p12, _2: _p13}); + }, + A2( + _elm_lang$core$List$indexedMap, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A3( + _elm_lang$core$List$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + actual, + expected))))); + var _p14 = result; + if (_p14.ctor === 'Just') { + return _p14._0; + } else { + var _p15 = A2( + _elm_lang$core$Basics$compare, + _elm_lang$core$List$length(actual), + _elm_lang$core$List$length(expected)); + switch (_p15.ctor) { + case 'GT': + return _elm_community$elm_test$Expect$fail( + A3( + _elm_community$elm_test$Expect$reportFailure, + 'Expect.equalLists was longer than', + _elm_lang$core$Basics$toString(expected), + _elm_lang$core$Basics$toString(actual))); + case 'LT': + return _elm_community$elm_test$Expect$fail( + A3( + _elm_community$elm_test$Expect$reportFailure, + 'Expect.equalLists was shorter than', + _elm_lang$core$Basics$toString(expected), + _elm_lang$core$Basics$toString(actual))); + default: + return _elm_community$elm_test$Expect$pass; + } + } + } + }); +var _elm_community$elm_test$Expect$false = F2( + function (message, bool) { + return bool ? _elm_community$elm_test$Expect$fail(message) : _elm_community$elm_test$Expect$pass; + }); +var _elm_community$elm_test$Expect$true = F2( + function (message, bool) { + return bool ? _elm_community$elm_test$Expect$pass : _elm_community$elm_test$Expect$fail(message); + }); +var _elm_community$elm_test$Expect$atLeast = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.atLeast', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) > -1; + })); +var _elm_community$elm_test$Expect$greaterThan = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.greaterThan', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) > 0; + })); +var _elm_community$elm_test$Expect$atMost = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.atMost', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) < 1; + })); +var _elm_community$elm_test$Expect$lessThan = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.lessThan', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) < 0; + })); +var _elm_community$elm_test$Expect$notEqual = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.notEqual', + F2( + function (x, y) { + return !_elm_lang$core$Native_Utils.eq(x, y); + })); +var _elm_community$elm_test$Expect$equal = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.equal', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })); +var _elm_community$elm_test$Expect$Missing = {ctor: 'Missing'}; +var _elm_community$elm_test$Expect$Extra = {ctor: 'Extra'}; +var _elm_community$elm_test$Expect$reportCollectionFailure = F5( + function (comparison, expected, actual, missingKeys, extraKeys) { + return A2( + _elm_lang$core$String$join, + '\n', + _elm_lang$core$Native_List.fromArray( + [ + _elm_lang$core$Basics$toString(actual), + A2( + _elm_lang$core$Basics_ops['++'], + 'diff:', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Missing, missingKeys), + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Extra, extraKeys))), + '╷', + A2(_elm_lang$core$Basics_ops['++'], '│ ', comparison), + '╵', + A2( + _elm_lang$core$Basics_ops['++'], + 'diff:', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Extra, missingKeys), + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Missing, extraKeys))), + _elm_lang$core$Basics$toString(expected) + ])); + }); +var _elm_community$elm_test$Expect$equalDicts = F2( + function (expected, actual) { + if (_elm_lang$core$Native_Utils.eq( + _elm_lang$core$Dict$toList(expected), + _elm_lang$core$Dict$toList(actual))) { + return _elm_community$elm_test$Expect$pass; + } else { + var differ = F4( + function (dict, k, v, diffs) { + return _elm_lang$core$Native_Utils.eq( + A2(_elm_lang$core$Dict$get, k, dict), + _elm_lang$core$Maybe$Just(v)) ? diffs : A2( + _elm_lang$core$List_ops['::'], + {ctor: '_Tuple2', _0: k, _1: v}, + diffs); + }); + var missingKeys = A3( + _elm_lang$core$Dict$foldr, + differ(actual), + _elm_lang$core$Native_List.fromArray( + []), + expected); + var extraKeys = A3( + _elm_lang$core$Dict$foldr, + differ(expected), + _elm_lang$core$Native_List.fromArray( + []), + actual); + return _elm_community$elm_test$Expect$fail( + A5(_elm_community$elm_test$Expect$reportCollectionFailure, 'Expect.equalDicts', expected, actual, missingKeys, extraKeys)); + } + }); +var _elm_community$elm_test$Expect$equalSets = F2( + function (expected, actual) { + if (_elm_lang$core$Native_Utils.eq( + _elm_lang$core$Set$toList(expected), + _elm_lang$core$Set$toList(actual))) { + return _elm_community$elm_test$Expect$pass; + } else { + var extraKeys = _elm_lang$core$Set$toList( + A2(_elm_lang$core$Set$diff, actual, expected)); + var missingKeys = _elm_lang$core$Set$toList( + A2(_elm_lang$core$Set$diff, expected, actual)); + return _elm_community$elm_test$Expect$fail( + A5(_elm_community$elm_test$Expect$reportCollectionFailure, 'Expect.equalSets', expected, actual, missingKeys, extraKeys)); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Fuzz-Internal.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Fuzz-Internal.elmi new file mode 100644 index 0000000..16b5837 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Fuzz-Internal.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Fuzz-Internal.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Fuzz-Internal.elmo new file mode 100644 index 0000000..003bed5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Fuzz-Internal.elmo @@ -0,0 +1,43 @@ +var _elm_community$elm_test$Fuzz_Internal$unpackGenTree = function (_p0) { + var _p1 = _p0; + var _p2 = _p1._0(false); + if (_p2.ctor === 'Shrink') { + return _p2._0; + } else { + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz.Internal', + { + start: {line: 58, column: 13}, + end: {line: 58, column: 24} + }), + 'This shouldn\'t happen: Fuzz.Internal.unpackGenTree', + _p2); + } +}; +var _elm_community$elm_test$Fuzz_Internal$unpackGenVal = function (_p3) { + var _p4 = _p3; + var _p5 = _p4._0(true); + if (_p5.ctor === 'Gen') { + return _p5._0; + } else { + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz.Internal', + { + start: {line: 48, column: 13}, + end: {line: 48, column: 24} + }), + 'This shouldn\'t happen: Fuzz.Internal.unpackGenVal', + _p5); + } +}; +var _elm_community$elm_test$Fuzz_Internal$Fuzzer = function (a) { + return {ctor: 'Fuzzer', _0: a}; +}; +var _elm_community$elm_test$Fuzz_Internal$Shrink = function (a) { + return {ctor: 'Shrink', _0: a}; +}; +var _elm_community$elm_test$Fuzz_Internal$Gen = function (a) { + return {ctor: 'Gen', _0: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/RoseTree.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/RoseTree.elmi new file mode 100644 index 0000000..32fd38c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/RoseTree.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/RoseTree.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/RoseTree.elmo new file mode 100644 index 0000000..0198165 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/RoseTree.elmo @@ -0,0 +1,44 @@ +var _elm_community$elm_test$RoseTree$children = function (_p0) { + var _p1 = _p0; + return _p1._1; +}; +var _elm_community$elm_test$RoseTree$root = function (_p2) { + var _p3 = _p2; + return _p3._0; +}; +var _elm_community$elm_test$RoseTree$Rose = F2( + function (a, b) { + return {ctor: 'Rose', _0: a, _1: b}; + }); +var _elm_community$elm_test$RoseTree$singleton = function (a) { + return A2(_elm_community$elm_test$RoseTree$Rose, a, _elm_community$lazy_list$Lazy_List$empty); +}; +var _elm_community$elm_test$RoseTree$addChild = F2( + function (child, _p4) { + var _p5 = _p4; + return A2( + _elm_community$elm_test$RoseTree$Rose, + _p5._0, + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], child, _p5._1)); + }); +var _elm_community$elm_test$RoseTree$map = F2( + function (f, _p6) { + var _p7 = _p6; + return A2( + _elm_community$elm_test$RoseTree$Rose, + f(_p7._0), + A2( + _elm_community$lazy_list$Lazy_List$map, + _elm_community$elm_test$RoseTree$map(f), + _p7._1)); + }); +var _elm_community$elm_test$RoseTree$flatten = function (_p8) { + var _p9 = _p8; + return A2( + _elm_community$elm_test$RoseTree$Rose, + _p9._0._0, + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + _p9._0._1, + A2(_elm_community$lazy_list$Lazy_List$map, _elm_community$elm_test$RoseTree$flatten, _p9._1))); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Test-Expectation.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Test-Expectation.elmi new file mode 100644 index 0000000..822bc28 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Test-Expectation.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Test-Expectation.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Test-Expectation.elmo new file mode 100644 index 0000000..ed01560 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Test-Expectation.elmo @@ -0,0 +1,14 @@ +var _elm_community$elm_test$Test_Expectation$Fail = F2( + function (a, b) { + return {ctor: 'Fail', _0: a, _1: b}; + }); +var _elm_community$elm_test$Test_Expectation$withGiven = F2( + function (given, outcome) { + var _p0 = outcome; + if (_p0.ctor === 'Fail') { + return A2(_elm_community$elm_test$Test_Expectation$Fail, given, _p0._1); + } else { + return outcome; + } + }); +var _elm_community$elm_test$Test_Expectation$Pass = {ctor: 'Pass'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Util.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Util.elmi new file mode 100644 index 0000000..55bc18f Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Util.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Util.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Util.elmo new file mode 100644 index 0000000..54384c5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/Util.elmo @@ -0,0 +1,30 @@ +var _elm_community$elm_test$Util$lengthString = F2( + function (charGenerator, stringLength) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_lang$core$String$fromList, + A2(_mgold$elm_random_pcg$Random_Pcg$list, stringLength, charGenerator)); + }); +var _elm_community$elm_test$Util$rangeLengthString = F3( + function (minLength, maxLength, charGenerator) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + _elm_community$elm_test$Util$lengthString(charGenerator), + A2(_mgold$elm_random_pcg$Random_Pcg$int, minLength, maxLength)); + }); +var _elm_community$elm_test$Util$rangeLengthList = F3( + function (minLength, maxLength, generator) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (len) { + return A2(_mgold$elm_random_pcg$Random_Pcg$list, len, generator); + }, + A2(_mgold$elm_random_pcg$Random_Pcg$int, minLength, maxLength)); + }); +var _elm_community$elm_test$Util$rangeLengthArray = F3( + function (minLength, maxLength, generator) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_lang$core$Array$fromList, + A3(_elm_community$elm_test$Util$rangeLengthList, minLength, maxLength, generator)); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/graph.dat new file mode 100644 index 0000000..b4dc773 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/elm-test/3.1.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmi new file mode 100644 index 0000000..96f39be Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmo new file mode 100644 index 0000000..b6db107 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmo @@ -0,0 +1,96 @@ +var _elm_community$json_extra$Json_Decode_Extra$fromResult = function (result) { + var _p0 = result; + if (_p0.ctor === 'Ok') { + return _elm_lang$core$Json_Decode$succeed(_p0._0); + } else { + return _elm_lang$core$Json_Decode$fail(_p0._0); + } +}; +var _elm_community$json_extra$Json_Decode_Extra$sequenceHelp = F2( + function (decoders, jsonValues) { + return (!_elm_lang$core$Native_Utils.eq( + _elm_lang$core$List$length(jsonValues), + _elm_lang$core$List$length(decoders))) ? _elm_lang$core$Json_Decode$fail('Number of decoders does not match number of values') : _elm_community$json_extra$Json_Decode_Extra$fromResult( + A3( + _elm_lang$core$List$foldr, + _elm_lang$core$Result$map2( + F2( + function (x, y) { + return A2(_elm_lang$core$List_ops['::'], x, y); + })), + _elm_lang$core$Result$Ok( + _elm_lang$core$Native_List.fromArray( + [])), + A3(_elm_lang$core$List$map2, _elm_lang$core$Json_Decode$decodeValue, decoders, jsonValues))); + }); +var _elm_community$json_extra$Json_Decode_Extra$sequence = function (decoders) { + return A2( + _elm_lang$core$Json_Decode$andThen, + _elm_community$json_extra$Json_Decode_Extra$sequenceHelp(decoders), + _elm_lang$core$Json_Decode$list(_elm_lang$core$Json_Decode$value)); +}; +var _elm_community$json_extra$Json_Decode_Extra$withDefault = F2( + function (fallback, decoder) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p1) { + return _elm_lang$core$Json_Decode$succeed( + A2(_elm_lang$core$Maybe$withDefault, fallback, _p1)); + }, + _elm_lang$core$Json_Decode$maybe(decoder)); + }); +var _elm_community$json_extra$Json_Decode_Extra$decodeDictFromTuples = F2( + function (keyDecoder, tuples) { + var _p2 = tuples; + if (_p2.ctor === '[]') { + return _elm_lang$core$Json_Decode$succeed(_elm_lang$core$Dict$empty); + } else { + var _p3 = A2(_elm_lang$core$Json_Decode$decodeString, keyDecoder, _p2._0._0); + if (_p3.ctor === 'Ok') { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p4) { + return _elm_lang$core$Json_Decode$succeed( + A3(_elm_lang$core$Dict$insert, _p3._0, _p2._0._1, _p4)); + }, + A2(_elm_community$json_extra$Json_Decode_Extra$decodeDictFromTuples, keyDecoder, _p2._1)); + } else { + return _elm_lang$core$Json_Decode$fail(_p3._0); + } + } + }); +var _elm_community$json_extra$Json_Decode_Extra$dict2 = F2( + function (keyDecoder, valueDecoder) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p5) { + return A2( + _elm_community$json_extra$Json_Decode_Extra$decodeDictFromTuples, + keyDecoder, + _elm_lang$core$Dict$toList(_p5)); + }, + _elm_lang$core$Json_Decode$dict(valueDecoder)); + }); +var _elm_community$json_extra$Json_Decode_Extra$set = function (decoder) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p6) { + return _elm_lang$core$Json_Decode$succeed( + _elm_lang$core$Set$fromList(_p6)); + }, + _elm_lang$core$Json_Decode$list(decoder)); +}; +var _elm_community$json_extra$Json_Decode_Extra$date = A2( + _elm_lang$core$Json_Decode$andThen, + function (_p7) { + return _elm_community$json_extra$Json_Decode_Extra$fromResult( + _elm_lang$core$Date$fromString(_p7)); + }, + _elm_lang$core$Json_Decode$string); +var _elm_community$json_extra$Json_Decode_Extra$andMap = _elm_lang$core$Json_Decode$map2( + F2( + function (x, y) { + return y(x); + })); +var _elm_community$json_extra$Json_Decode_Extra_ops = _elm_community$json_extra$Json_Decode_Extra_ops || {}; +_elm_community$json_extra$Json_Decode_Extra_ops['|:'] = _elm_lang$core$Basics$flip(_elm_community$json_extra$Json_Decode_Extra$andMap); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmi new file mode 100644 index 0000000..1624fc7 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmo new file mode 100644 index 0000000..c8513c6 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmo @@ -0,0 +1,9 @@ +var _elm_community$json_extra$Json_Encode_Extra$maybe = F2( + function (encoder, value) { + var _p0 = value; + if (_p0.ctor === 'Nothing') { + return _elm_lang$core$Json_Encode$null; + } else { + return encoder(_p0._0); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/graph.dat new file mode 100644 index 0000000..c40a6ef Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/json-extra/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/Lazy-List.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/Lazy-List.elmi new file mode 100644 index 0000000..a37bf6f Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/Lazy-List.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/Lazy-List.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/Lazy-List.elmo new file mode 100644 index 0000000..2631ec0 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/Lazy-List.elmo @@ -0,0 +1,687 @@ +var _elm_community$lazy_list$Lazy_List$toArray = function (list) { + var _p0 = _elm_lang$lazy$Lazy$force(list); + if (_p0.ctor === 'Nil') { + return _elm_lang$core$Array$empty; + } else { + return A2( + _elm_lang$core$Array$append, + A2(_elm_lang$core$Array$push, _p0._0, _elm_lang$core$Array$empty), + _elm_community$lazy_list$Lazy_List$toArray(_p0._1)); + } +}; +var _elm_community$lazy_list$Lazy_List$toList = function (list) { + var _p1 = _elm_lang$lazy$Lazy$force(list); + if (_p1.ctor === 'Nil') { + return _elm_lang$core$Native_List.fromArray( + []); + } else { + return A2( + _elm_lang$core$List_ops['::'], + _p1._0, + _elm_community$lazy_list$Lazy_List$toList(_p1._1)); + } +}; +var _elm_community$lazy_list$Lazy_List$foldr = F3( + function (reducer, b, list) { + return A3( + _elm_lang$core$Array$foldr, + reducer, + b, + _elm_community$lazy_list$Lazy_List$toArray(list)); + }); +var _elm_community$lazy_list$Lazy_List$reduce = F3( + function (reducer, b, list) { + reduce: + while (true) { + var _p2 = _elm_lang$lazy$Lazy$force(list); + if (_p2.ctor === 'Nil') { + return b; + } else { + var _v3 = reducer, + _v4 = A2(reducer, _p2._0, b), + _v5 = _p2._1; + reducer = _v3; + b = _v4; + list = _v5; + continue reduce; + } + } + }); +var _elm_community$lazy_list$Lazy_List$foldl = _elm_community$lazy_list$Lazy_List$reduce; +var _elm_community$lazy_list$Lazy_List$sum = A2( + _elm_community$lazy_list$Lazy_List$reduce, + F2( + function (x, y) { + return x + y; + }), + 0); +var _elm_community$lazy_list$Lazy_List$product = A2( + _elm_community$lazy_list$Lazy_List$reduce, + F2( + function (x, y) { + return x * y; + }), + 1); +var _elm_community$lazy_list$Lazy_List$length = A2( + _elm_community$lazy_list$Lazy_List$reduce, + F2( + function (_p3, n) { + return n + 1; + }), + 0); +var _elm_community$lazy_list$Lazy_List$member = F2( + function (a, list) { + var _p4 = _elm_lang$lazy$Lazy$force(list); + if (_p4.ctor === 'Nil') { + return false; + } else { + return _elm_lang$core$Native_Utils.eq(_p4._0, a) || A2(_elm_community$lazy_list$Lazy_List$member, a, _p4._1); + } + }); +var _elm_community$lazy_list$Lazy_List$headAndTail = function (list) { + var _p5 = _elm_lang$lazy$Lazy$force(list); + if (_p5.ctor === 'Nil') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just( + {ctor: '_Tuple2', _0: _p5._0, _1: _p5._1}); + } +}; +var _elm_community$lazy_list$Lazy_List$tail = function (list) { + var _p6 = _elm_lang$lazy$Lazy$force(list); + if (_p6.ctor === 'Nil') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just(_p6._1); + } +}; +var _elm_community$lazy_list$Lazy_List$head = function (list) { + var _p7 = _elm_lang$lazy$Lazy$force(list); + if (_p7.ctor === 'Nil') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just(_p7._0); + } +}; +var _elm_community$lazy_list$Lazy_List$isEmpty = function (list) { + var _p8 = _elm_lang$lazy$Lazy$force(list); + if (_p8.ctor === 'Nil') { + return true; + } else { + return false; + } +}; +var _elm_community$lazy_list$Lazy_List$Cons = F2( + function (a, b) { + return {ctor: 'Cons', _0: a, _1: b}; + }); +var _elm_community$lazy_list$Lazy_List$cons = F2( + function (a, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p9) { + var _p10 = _p9; + return A2(_elm_community$lazy_list$Lazy_List$Cons, a, list); + }); + }); +var _elm_community$lazy_list$Lazy_List_ops = _elm_community$lazy_list$Lazy_List_ops || {}; +_elm_community$lazy_list$Lazy_List_ops[':::'] = _elm_community$lazy_list$Lazy_List$cons; +var _elm_community$lazy_list$Lazy_List$append = F2( + function (list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p11) { + var _p12 = _p11; + var _p13 = _elm_lang$lazy$Lazy$force(list1); + if (_p13.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force(list2); + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p13._0, + A2(_elm_community$lazy_list$Lazy_List_ops['+++'], _p13._1, list2))); + } + }); + }); +var _elm_community$lazy_list$Lazy_List_ops = _elm_community$lazy_list$Lazy_List_ops || {}; +_elm_community$lazy_list$Lazy_List_ops['+++'] = _elm_community$lazy_list$Lazy_List$append; +var _elm_community$lazy_list$Lazy_List$cycle = function (list) { + return A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + list, + _elm_lang$lazy$Lazy$lazy( + function (_p14) { + var _p15 = _p14; + return _elm_lang$lazy$Lazy$force( + _elm_community$lazy_list$Lazy_List$cycle(list)); + })); +}; +var _elm_community$lazy_list$Lazy_List$interleave = F2( + function (list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p16) { + var _p17 = _p16; + var _p18 = _elm_lang$lazy$Lazy$force(list1); + if (_p18.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force(list2); + } else { + var _p19 = _elm_lang$lazy$Lazy$force(list2); + if (_p19.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force(list1); + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p18._0, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p19._0, + A2(_elm_community$lazy_list$Lazy_List$interleave, _p18._1, _p19._1)))); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$repeat = function (a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p20) { + var _p21 = _p20; + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + a, + _elm_community$lazy_list$Lazy_List$repeat(a)); + }); +}; +var _elm_community$lazy_list$Lazy_List$iterate = F2( + function (f, a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p22) { + var _p23 = _p22; + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + a, + A2( + _elm_community$lazy_list$Lazy_List$iterate, + f, + f(a))); + }); + }); +var _elm_community$lazy_list$Lazy_List$numbers = A2( + _elm_community$lazy_list$Lazy_List$iterate, + F2( + function (x, y) { + return x + y; + })(1), + 1); +var _elm_community$lazy_list$Lazy_List$Nil = {ctor: 'Nil'}; +var _elm_community$lazy_list$Lazy_List$empty = _elm_lang$lazy$Lazy$lazy( + function (_p24) { + var _p25 = _p24; + return _elm_community$lazy_list$Lazy_List$Nil; + }); +var _elm_community$lazy_list$Lazy_List$singleton = function (a) { + return A2(_elm_community$lazy_list$Lazy_List$cons, a, _elm_community$lazy_list$Lazy_List$empty); +}; +var _elm_community$lazy_list$Lazy_List$reverse = A2(_elm_community$lazy_list$Lazy_List$reduce, _elm_community$lazy_list$Lazy_List$cons, _elm_community$lazy_list$Lazy_List$empty); +var _elm_community$lazy_list$Lazy_List$fromList = A2(_elm_lang$core$List$foldr, _elm_community$lazy_list$Lazy_List$cons, _elm_community$lazy_list$Lazy_List$empty); +var _elm_community$lazy_list$Lazy_List$fromArray = A2(_elm_lang$core$Array$foldr, _elm_community$lazy_list$Lazy_List$cons, _elm_community$lazy_list$Lazy_List$empty); +var _elm_community$lazy_list$Lazy_List$intersperse = F2( + function (a, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p26) { + var _p27 = _p26; + var _p28 = _elm_lang$lazy$Lazy$force(list); + if (_p28.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p33 = _p28._0; + var _p29 = _elm_lang$lazy$Lazy$force(_p28._1); + if (_p29.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], _p33, _elm_community$lazy_list$Lazy_List$empty)); + } else { + var _p32 = _p29._1; + var _p31 = _p29._0; + var _p30 = _elm_lang$lazy$Lazy$force(_p32); + if (_p30.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p33, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + a, + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], _p31, _elm_community$lazy_list$Lazy_List$empty)))); + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p33, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + a, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p31, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + a, + A2(_elm_community$lazy_list$Lazy_List$intersperse, a, _p32)))))); + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$take = F2( + function (n, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p34) { + var _p35 = _p34; + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p36 = _elm_lang$lazy$Lazy$force(list); + if (_p36.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p36._0, + A2(_elm_community$lazy_list$Lazy_List$take, n - 1, _p36._1)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$takeWhile = F2( + function (predicate, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p37) { + var _p38 = _p37; + var _p39 = _elm_lang$lazy$Lazy$force(list); + if (_p39.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p40 = _p39._0; + return predicate(_p40) ? A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p40, + A2(_elm_community$lazy_list$Lazy_List$takeWhile, predicate, _p39._1)) : _elm_community$lazy_list$Lazy_List$Nil; + } + }); + }); +var _elm_community$lazy_list$Lazy_List$drop = F2( + function (n, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p41) { + var _p42 = _p41; + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return _elm_lang$lazy$Lazy$force(list); + } else { + var _p43 = _elm_lang$lazy$Lazy$force(list); + if (_p43.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$drop, n - 1, _p43._1)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$dropWhile = F2( + function (predicate, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p44) { + var _p45 = _p44; + var _p46 = _elm_lang$lazy$Lazy$force(list); + if (_p46.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return predicate(_p46._0) ? _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$dropWhile, predicate, _p46._1)) : _elm_lang$lazy$Lazy$force(list); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$unique = function (list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p47) { + var _p48 = _p47; + var _p49 = _elm_lang$lazy$Lazy$force(list); + if (_p49.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p51 = _p49._1; + var _p50 = _p49._0; + return A2(_elm_community$lazy_list$Lazy_List$member, _p50, _p51) ? _elm_lang$lazy$Lazy$force( + _elm_community$lazy_list$Lazy_List$unique(_p51)) : A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p50, + _elm_community$lazy_list$Lazy_List$unique(_p51)); + } + }); +}; +var _elm_community$lazy_list$Lazy_List$keepIf = F2( + function (predicate, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p52) { + var _p53 = _p52; + var _p54 = _elm_lang$lazy$Lazy$force(list); + if (_p54.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p56 = _p54._1; + var _p55 = _p54._0; + return predicate(_p55) ? A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p55, + A2(_elm_community$lazy_list$Lazy_List$keepIf, predicate, _p56)) : _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$keepIf, predicate, _p56)); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$dropIf = function (predicate) { + return _elm_community$lazy_list$Lazy_List$keepIf( + function (n) { + return _elm_lang$core$Basics$not( + predicate(n)); + }); +}; +var _elm_community$lazy_list$Lazy_List$filterMap = F2( + function (transform, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p57) { + var _p58 = _p57; + var _p59 = _elm_lang$lazy$Lazy$force(list); + if (_p59.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p61 = _p59._1; + var _p60 = transform(_p59._0); + if (_p60.ctor === 'Just') { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p60._0, + A2(_elm_community$lazy_list$Lazy_List$filterMap, transform, _p61)); + } else { + return _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$filterMap, transform, _p61)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$flatten = function (list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p62) { + var _p63 = _p62; + var _p64 = _elm_lang$lazy$Lazy$force(list); + if (_p64.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + _p64._0, + _elm_community$lazy_list$Lazy_List$flatten(_p64._1))); + } + }); +}; +var _elm_community$lazy_list$Lazy_List$map = F2( + function (f, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p65) { + var _p66 = _p65; + var _p67 = _elm_lang$lazy$Lazy$force(list); + if (_p67.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + f(_p67._0), + A2(_elm_community$lazy_list$Lazy_List$map, f, _p67._1)); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$andThen = F2( + function (f, list) { + return _elm_community$lazy_list$Lazy_List$flatten( + A2(_elm_community$lazy_list$Lazy_List$map, f, list)); + }); +var _elm_community$lazy_list$Lazy_List$map2 = F3( + function (f, list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p68) { + var _p69 = _p68; + var _p70 = _elm_lang$lazy$Lazy$force(list1); + if (_p70.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p71 = _elm_lang$lazy$Lazy$force(list2); + if (_p71.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A2(f, _p70._0, _p71._0), + A3(_elm_community$lazy_list$Lazy_List$map2, f, _p70._1, _p71._1)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$andMap = F2( + function (listVal, listFuncs) { + return A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (x, y) { + return x(y); + }), + listFuncs, + listVal); + }); +var _elm_community$lazy_list$Lazy_List$zip = _elm_community$lazy_list$Lazy_List$map2( + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + })); +var _elm_community$lazy_list$Lazy_List$map3 = F4( + function (f, list1, list2, list3) { + return _elm_lang$lazy$Lazy$lazy( + function (_p72) { + var _p73 = _p72; + var _p74 = _elm_lang$lazy$Lazy$force(list1); + if (_p74.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p75 = _elm_lang$lazy$Lazy$force(list2); + if (_p75.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p76 = _elm_lang$lazy$Lazy$force(list3); + if (_p76.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A3(f, _p74._0, _p75._0, _p76._0), + A4(_elm_community$lazy_list$Lazy_List$map3, f, _p74._1, _p75._1, _p76._1)); + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$zip3 = _elm_community$lazy_list$Lazy_List$map3( + F3( + function (v0, v1, v2) { + return {ctor: '_Tuple3', _0: v0, _1: v1, _2: v2}; + })); +var _elm_community$lazy_list$Lazy_List$map4 = F5( + function (f, list1, list2, list3, list4) { + return _elm_lang$lazy$Lazy$lazy( + function (_p77) { + var _p78 = _p77; + var _p79 = _elm_lang$lazy$Lazy$force(list1); + if (_p79.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p80 = _elm_lang$lazy$Lazy$force(list2); + if (_p80.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p81 = _elm_lang$lazy$Lazy$force(list3); + if (_p81.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p82 = _elm_lang$lazy$Lazy$force(list4); + if (_p82.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A4(f, _p79._0, _p80._0, _p81._0, _p82._0), + A5(_elm_community$lazy_list$Lazy_List$map4, f, _p79._1, _p80._1, _p81._1, _p82._1)); + } + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$zip4 = _elm_community$lazy_list$Lazy_List$map4( + F4( + function (v0, v1, v2, v3) { + return {ctor: '_Tuple4', _0: v0, _1: v1, _2: v2, _3: v3}; + })); +var _elm_community$lazy_list$Lazy_List$map5 = F6( + function (f, list1, list2, list3, list4, list5) { + return _elm_lang$lazy$Lazy$lazy( + function (_p83) { + var _p84 = _p83; + var _p85 = _elm_lang$lazy$Lazy$force(list1); + if (_p85.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p86 = _elm_lang$lazy$Lazy$force(list2); + if (_p86.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p87 = _elm_lang$lazy$Lazy$force(list3); + if (_p87.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p88 = _elm_lang$lazy$Lazy$force(list4); + if (_p88.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p89 = _elm_lang$lazy$Lazy$force(list5); + if (_p89.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A5(f, _p85._0, _p86._0, _p87._0, _p88._0, _p89._0), + A6(_elm_community$lazy_list$Lazy_List$map5, f, _p85._1, _p86._1, _p87._1, _p88._1, _p89._1)); + } + } + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$zip5 = _elm_community$lazy_list$Lazy_List$map5( + F5( + function (v0, v1, v2, v3, v4) { + return {ctor: '_Tuple5', _0: v0, _1: v1, _2: v2, _3: v3, _4: v4}; + })); +var _elm_community$lazy_list$Lazy_List$product2 = F2( + function (list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p90) { + var _p91 = _p90; + var _p92 = _elm_lang$lazy$Lazy$force(list1); + if (_p92.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p93 = _elm_lang$lazy$Lazy$force(list2); + if (_p93.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + })(_p92._0), + list2), + A2(_elm_community$lazy_list$Lazy_List$product2, _p92._1, list2))); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$product3 = F3( + function (list1, list2, list3) { + return _elm_lang$lazy$Lazy$lazy( + function (_p94) { + var _p95 = _p94; + var _p96 = _elm_lang$lazy$Lazy$force(list1); + if (_p96.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (_p97) { + var _p98 = _p97; + return {ctor: '_Tuple3', _0: _p96._0, _1: _p98._0, _2: _p98._1}; + }, + A2(_elm_community$lazy_list$Lazy_List$product2, list2, list3)), + A3(_elm_community$lazy_list$Lazy_List$product3, _p96._1, list2, list3))); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$product4 = F4( + function (list1, list2, list3, list4) { + return _elm_lang$lazy$Lazy$lazy( + function (_p99) { + var _p100 = _p99; + var _p101 = _elm_lang$lazy$Lazy$force(list1); + if (_p101.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (_p102) { + var _p103 = _p102; + return {ctor: '_Tuple4', _0: _p101._0, _1: _p103._0, _2: _p103._1, _3: _p103._2}; + }, + A3(_elm_community$lazy_list$Lazy_List$product3, list2, list3, list4)), + A4(_elm_community$lazy_list$Lazy_List$product4, _p101._1, list2, list3, list4))); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$product5 = F5( + function (list1, list2, list3, list4, list5) { + return _elm_lang$lazy$Lazy$lazy( + function (_p104) { + var _p105 = _p104; + var _p106 = _elm_lang$lazy$Lazy$force(list1); + if (_p106.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (_p107) { + var _p108 = _p107; + return {ctor: '_Tuple5', _0: _p106._0, _1: _p108._0, _2: _p108._1, _3: _p108._2, _4: _p108._3}; + }, + A4(_elm_community$lazy_list$Lazy_List$product4, list2, list3, list4, list5)), + A5(_elm_community$lazy_list$Lazy_List$product5, _p106._1, list2, list3, list4, list5))); + } + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/graph.dat new file mode 100644 index 0000000..f1b4d1f Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/lazy-list/1.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/shrink/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/shrink/2.0.0/graph.dat new file mode 100644 index 0000000..bd52bd8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-community/shrink/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Array.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Array.elmi new file mode 100644 index 0000000..9f070a6 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Array.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Array.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Array.elmo new file mode 100644 index 0000000..958955b --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Array.elmo @@ -0,0 +1,54 @@ +var _elm_lang$core$Array$append = _elm_lang$core$Native_Array.append; +var _elm_lang$core$Array$length = _elm_lang$core$Native_Array.length; +var _elm_lang$core$Array$isEmpty = function (array) { + return _elm_lang$core$Native_Utils.eq( + _elm_lang$core$Array$length(array), + 0); +}; +var _elm_lang$core$Array$slice = _elm_lang$core$Native_Array.slice; +var _elm_lang$core$Array$set = _elm_lang$core$Native_Array.set; +var _elm_lang$core$Array$get = F2( + function (i, array) { + return ((_elm_lang$core$Native_Utils.cmp(0, i) < 1) && (_elm_lang$core$Native_Utils.cmp( + i, + _elm_lang$core$Native_Array.length(array)) < 0)) ? _elm_lang$core$Maybe$Just( + A2(_elm_lang$core$Native_Array.get, i, array)) : _elm_lang$core$Maybe$Nothing; + }); +var _elm_lang$core$Array$push = _elm_lang$core$Native_Array.push; +var _elm_lang$core$Array$empty = _elm_lang$core$Native_Array.empty; +var _elm_lang$core$Array$filter = F2( + function (isOkay, arr) { + var update = F2( + function (x, xs) { + return isOkay(x) ? A2(_elm_lang$core$Native_Array.push, x, xs) : xs; + }); + return A3(_elm_lang$core$Native_Array.foldl, update, _elm_lang$core$Native_Array.empty, arr); + }); +var _elm_lang$core$Array$foldr = _elm_lang$core$Native_Array.foldr; +var _elm_lang$core$Array$foldl = _elm_lang$core$Native_Array.foldl; +var _elm_lang$core$Array$indexedMap = _elm_lang$core$Native_Array.indexedMap; +var _elm_lang$core$Array$map = _elm_lang$core$Native_Array.map; +var _elm_lang$core$Array$toIndexedList = function (array) { + return A3( + _elm_lang$core$List$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A2( + _elm_lang$core$List$range, + 0, + _elm_lang$core$Native_Array.length(array) - 1), + _elm_lang$core$Native_Array.toList(array)); +}; +var _elm_lang$core$Array$toList = _elm_lang$core$Native_Array.toList; +var _elm_lang$core$Array$fromList = _elm_lang$core$Native_Array.fromList; +var _elm_lang$core$Array$initialize = _elm_lang$core$Native_Array.initialize; +var _elm_lang$core$Array$repeat = F2( + function (n, e) { + return A2( + _elm_lang$core$Array$initialize, + n, + _elm_lang$core$Basics$always(e)); + }); +var _elm_lang$core$Array$Array = {ctor: 'Array'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Basics.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Basics.elmi new file mode 100644 index 0000000..16452d9 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Basics.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Basics.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Basics.elmo new file mode 100644 index 0000000..64d8f36 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Basics.elmo @@ -0,0 +1,125 @@ +var _elm_lang$core$Basics$never = function (_p0) { + never: + while (true) { + var _p1 = _p0; + var _v1 = _p1._0; + _p0 = _v1; + continue never; + } +}; +var _elm_lang$core$Basics$uncurry = F2( + function (f, _p2) { + var _p3 = _p2; + return A2(f, _p3._0, _p3._1); + }); +var _elm_lang$core$Basics$curry = F3( + function (f, a, b) { + return f( + {ctor: '_Tuple2', _0: a, _1: b}); + }); +var _elm_lang$core$Basics$flip = F3( + function (f, b, a) { + return A2(f, a, b); + }); +var _elm_lang$core$Basics$always = F2( + function (a, _p4) { + return a; + }); +var _elm_lang$core$Basics$identity = function (x) { + return x; +}; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<|'] = F2( + function (f, x) { + return f(x); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['|>'] = F2( + function (x, f) { + return f(x); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['>>'] = F3( + function (f, g, x) { + return g( + f(x)); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<<'] = F3( + function (g, f, x) { + return g( + f(x)); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['++'] = _elm_lang$core$Native_Utils.append; +var _elm_lang$core$Basics$toString = _elm_lang$core$Native_Utils.toString; +var _elm_lang$core$Basics$isInfinite = _elm_lang$core$Native_Basics.isInfinite; +var _elm_lang$core$Basics$isNaN = _elm_lang$core$Native_Basics.isNaN; +var _elm_lang$core$Basics$toFloat = _elm_lang$core$Native_Basics.toFloat; +var _elm_lang$core$Basics$ceiling = _elm_lang$core$Native_Basics.ceiling; +var _elm_lang$core$Basics$floor = _elm_lang$core$Native_Basics.floor; +var _elm_lang$core$Basics$truncate = _elm_lang$core$Native_Basics.truncate; +var _elm_lang$core$Basics$round = _elm_lang$core$Native_Basics.round; +var _elm_lang$core$Basics$not = _elm_lang$core$Native_Basics.not; +var _elm_lang$core$Basics$xor = _elm_lang$core$Native_Basics.xor; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['||'] = _elm_lang$core$Native_Basics.or; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['&&'] = _elm_lang$core$Native_Basics.and; +var _elm_lang$core$Basics$max = _elm_lang$core$Native_Basics.max; +var _elm_lang$core$Basics$min = _elm_lang$core$Native_Basics.min; +var _elm_lang$core$Basics$compare = _elm_lang$core$Native_Basics.compare; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['>='] = _elm_lang$core$Native_Basics.ge; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<='] = _elm_lang$core$Native_Basics.le; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['>'] = _elm_lang$core$Native_Basics.gt; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<'] = _elm_lang$core$Native_Basics.lt; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['/='] = _elm_lang$core$Native_Basics.neq; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['=='] = _elm_lang$core$Native_Basics.eq; +var _elm_lang$core$Basics$e = _elm_lang$core$Native_Basics.e; +var _elm_lang$core$Basics$pi = _elm_lang$core$Native_Basics.pi; +var _elm_lang$core$Basics$clamp = _elm_lang$core$Native_Basics.clamp; +var _elm_lang$core$Basics$logBase = _elm_lang$core$Native_Basics.logBase; +var _elm_lang$core$Basics$abs = _elm_lang$core$Native_Basics.abs; +var _elm_lang$core$Basics$negate = _elm_lang$core$Native_Basics.negate; +var _elm_lang$core$Basics$sqrt = _elm_lang$core$Native_Basics.sqrt; +var _elm_lang$core$Basics$atan2 = _elm_lang$core$Native_Basics.atan2; +var _elm_lang$core$Basics$atan = _elm_lang$core$Native_Basics.atan; +var _elm_lang$core$Basics$asin = _elm_lang$core$Native_Basics.asin; +var _elm_lang$core$Basics$acos = _elm_lang$core$Native_Basics.acos; +var _elm_lang$core$Basics$tan = _elm_lang$core$Native_Basics.tan; +var _elm_lang$core$Basics$sin = _elm_lang$core$Native_Basics.sin; +var _elm_lang$core$Basics$cos = _elm_lang$core$Native_Basics.cos; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['^'] = _elm_lang$core$Native_Basics.exp; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['%'] = _elm_lang$core$Native_Basics.mod; +var _elm_lang$core$Basics$rem = _elm_lang$core$Native_Basics.rem; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['//'] = _elm_lang$core$Native_Basics.div; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['/'] = _elm_lang$core$Native_Basics.floatDiv; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['*'] = _elm_lang$core$Native_Basics.mul; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['-'] = _elm_lang$core$Native_Basics.sub; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['+'] = _elm_lang$core$Native_Basics.add; +var _elm_lang$core$Basics$toPolar = _elm_lang$core$Native_Basics.toPolar; +var _elm_lang$core$Basics$fromPolar = _elm_lang$core$Native_Basics.fromPolar; +var _elm_lang$core$Basics$turns = _elm_lang$core$Native_Basics.turns; +var _elm_lang$core$Basics$degrees = _elm_lang$core$Native_Basics.degrees; +var _elm_lang$core$Basics$radians = function (t) { + return t; +}; +var _elm_lang$core$Basics$GT = {ctor: 'GT'}; +var _elm_lang$core$Basics$EQ = {ctor: 'EQ'}; +var _elm_lang$core$Basics$LT = {ctor: 'LT'}; +var _elm_lang$core$Basics$JustOneMore = function (a) { + return {ctor: 'JustOneMore', _0: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Bitwise.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Bitwise.elmi new file mode 100644 index 0000000..d5a1789 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Bitwise.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Bitwise.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Bitwise.elmo new file mode 100644 index 0000000..91e7c15 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Bitwise.elmo @@ -0,0 +1,7 @@ +var _elm_lang$core$Bitwise$shiftRightZfBy = _elm_lang$core$Native_Bitwise.shiftRightZfBy; +var _elm_lang$core$Bitwise$shiftRightBy = _elm_lang$core$Native_Bitwise.shiftRightBy; +var _elm_lang$core$Bitwise$shiftLeftBy = _elm_lang$core$Native_Bitwise.shiftLeftBy; +var _elm_lang$core$Bitwise$complement = _elm_lang$core$Native_Bitwise.complement; +var _elm_lang$core$Bitwise$xor = _elm_lang$core$Native_Bitwise.xor; +var _elm_lang$core$Bitwise$or = _elm_lang$core$Native_Bitwise.or; +var _elm_lang$core$Bitwise$and = _elm_lang$core$Native_Bitwise.and; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Char.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Char.elmi new file mode 100644 index 0000000..d0447a6 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Char.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Char.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Char.elmo new file mode 100644 index 0000000..39837ec --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Char.elmo @@ -0,0 +1,42 @@ +var _elm_lang$core$Char$fromCode = _elm_lang$core$Native_Char.fromCode; +var _elm_lang$core$Char$toCode = _elm_lang$core$Native_Char.toCode; +var _elm_lang$core$Char$toLocaleLower = _elm_lang$core$Native_Char.toLocaleLower; +var _elm_lang$core$Char$toLocaleUpper = _elm_lang$core$Native_Char.toLocaleUpper; +var _elm_lang$core$Char$toLower = _elm_lang$core$Native_Char.toLower; +var _elm_lang$core$Char$toUpper = _elm_lang$core$Native_Char.toUpper; +var _elm_lang$core$Char$isBetween = F3( + function (low, high, $char) { + var code = _elm_lang$core$Char$toCode($char); + return (_elm_lang$core$Native_Utils.cmp( + code, + _elm_lang$core$Char$toCode(low)) > -1) && (_elm_lang$core$Native_Utils.cmp( + code, + _elm_lang$core$Char$toCode(high)) < 1); + }); +var _elm_lang$core$Char$isUpper = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('A'), + _elm_lang$core$Native_Utils.chr('Z')); +var _elm_lang$core$Char$isLower = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('a'), + _elm_lang$core$Native_Utils.chr('z')); +var _elm_lang$core$Char$isDigit = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Native_Utils.chr('9')); +var _elm_lang$core$Char$isOctDigit = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Native_Utils.chr('7')); +var _elm_lang$core$Char$isHexDigit = function ($char) { + return _elm_lang$core$Char$isDigit($char) || (A3( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('a'), + _elm_lang$core$Native_Utils.chr('f'), + $char) || A3( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('A'), + _elm_lang$core$Native_Utils.chr('F'), + $char)); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Color.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Color.elmi new file mode 100644 index 0000000..fee8c26 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Color.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Color.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Color.elmo new file mode 100644 index 0000000..077056a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Color.elmo @@ -0,0 +1,165 @@ +var _elm_lang$core$Color$fmod = F2( + function (f, n) { + var integer = _elm_lang$core$Basics$floor(f); + return (_elm_lang$core$Basics$toFloat( + A2(_elm_lang$core$Basics_ops['%'], integer, n)) + f) - _elm_lang$core$Basics$toFloat(integer); + }); +var _elm_lang$core$Color$rgbToHsl = F3( + function (red, green, blue) { + var b = _elm_lang$core$Basics$toFloat(blue) / 255; + var g = _elm_lang$core$Basics$toFloat(green) / 255; + var r = _elm_lang$core$Basics$toFloat(red) / 255; + var cMax = A2( + _elm_lang$core$Basics$max, + A2(_elm_lang$core$Basics$max, r, g), + b); + var cMin = A2( + _elm_lang$core$Basics$min, + A2(_elm_lang$core$Basics$min, r, g), + b); + var c = cMax - cMin; + var lightness = (cMax + cMin) / 2; + var saturation = _elm_lang$core$Native_Utils.eq(lightness, 0) ? 0 : (c / (1 - _elm_lang$core$Basics$abs((2 * lightness) - 1))); + var hue = _elm_lang$core$Basics$degrees(60) * (_elm_lang$core$Native_Utils.eq(cMax, r) ? A2(_elm_lang$core$Color$fmod, (g - b) / c, 6) : (_elm_lang$core$Native_Utils.eq(cMax, g) ? (((b - r) / c) + 2) : (((r - g) / c) + 4))); + return {ctor: '_Tuple3', _0: hue, _1: saturation, _2: lightness}; + }); +var _elm_lang$core$Color$hslToRgb = F3( + function (hue, saturation, lightness) { + var normHue = hue / _elm_lang$core$Basics$degrees(60); + var chroma = (1 - _elm_lang$core$Basics$abs((2 * lightness) - 1)) * saturation; + var x = chroma * (1 - _elm_lang$core$Basics$abs( + A2(_elm_lang$core$Color$fmod, normHue, 2) - 1)); + var _p0 = (_elm_lang$core$Native_Utils.cmp(normHue, 0) < 0) ? {ctor: '_Tuple3', _0: 0, _1: 0, _2: 0} : ((_elm_lang$core$Native_Utils.cmp(normHue, 1) < 0) ? {ctor: '_Tuple3', _0: chroma, _1: x, _2: 0} : ((_elm_lang$core$Native_Utils.cmp(normHue, 2) < 0) ? {ctor: '_Tuple3', _0: x, _1: chroma, _2: 0} : ((_elm_lang$core$Native_Utils.cmp(normHue, 3) < 0) ? {ctor: '_Tuple3', _0: 0, _1: chroma, _2: x} : ((_elm_lang$core$Native_Utils.cmp(normHue, 4) < 0) ? {ctor: '_Tuple3', _0: 0, _1: x, _2: chroma} : ((_elm_lang$core$Native_Utils.cmp(normHue, 5) < 0) ? {ctor: '_Tuple3', _0: x, _1: 0, _2: chroma} : ((_elm_lang$core$Native_Utils.cmp(normHue, 6) < 0) ? {ctor: '_Tuple3', _0: chroma, _1: 0, _2: x} : {ctor: '_Tuple3', _0: 0, _1: 0, _2: 0})))))); + var r = _p0._0; + var g = _p0._1; + var b = _p0._2; + var m = lightness - (chroma / 2); + return {ctor: '_Tuple3', _0: r + m, _1: g + m, _2: b + m}; + }); +var _elm_lang$core$Color$toRgb = function (color) { + var _p1 = color; + if (_p1.ctor === 'RGBA') { + return {red: _p1._0, green: _p1._1, blue: _p1._2, alpha: _p1._3}; + } else { + var _p2 = A3(_elm_lang$core$Color$hslToRgb, _p1._0, _p1._1, _p1._2); + var r = _p2._0; + var g = _p2._1; + var b = _p2._2; + return { + red: _elm_lang$core$Basics$round(255 * r), + green: _elm_lang$core$Basics$round(255 * g), + blue: _elm_lang$core$Basics$round(255 * b), + alpha: _p1._3 + }; + } +}; +var _elm_lang$core$Color$toHsl = function (color) { + var _p3 = color; + if (_p3.ctor === 'HSLA') { + return {hue: _p3._0, saturation: _p3._1, lightness: _p3._2, alpha: _p3._3}; + } else { + var _p4 = A3(_elm_lang$core$Color$rgbToHsl, _p3._0, _p3._1, _p3._2); + var h = _p4._0; + var s = _p4._1; + var l = _p4._2; + return {hue: h, saturation: s, lightness: l, alpha: _p3._3}; + } +}; +var _elm_lang$core$Color$HSLA = F4( + function (a, b, c, d) { + return {ctor: 'HSLA', _0: a, _1: b, _2: c, _3: d}; + }); +var _elm_lang$core$Color$hsla = F4( + function (hue, saturation, lightness, alpha) { + return A4( + _elm_lang$core$Color$HSLA, + hue - _elm_lang$core$Basics$turns( + _elm_lang$core$Basics$toFloat( + _elm_lang$core$Basics$floor(hue / (2 * _elm_lang$core$Basics$pi)))), + saturation, + lightness, + alpha); + }); +var _elm_lang$core$Color$hsl = F3( + function (hue, saturation, lightness) { + return A4(_elm_lang$core$Color$hsla, hue, saturation, lightness, 1); + }); +var _elm_lang$core$Color$complement = function (color) { + var _p5 = color; + if (_p5.ctor === 'HSLA') { + return A4( + _elm_lang$core$Color$hsla, + _p5._0 + _elm_lang$core$Basics$degrees(180), + _p5._1, + _p5._2, + _p5._3); + } else { + var _p6 = A3(_elm_lang$core$Color$rgbToHsl, _p5._0, _p5._1, _p5._2); + var h = _p6._0; + var s = _p6._1; + var l = _p6._2; + return A4( + _elm_lang$core$Color$hsla, + h + _elm_lang$core$Basics$degrees(180), + s, + l, + _p5._3); + } +}; +var _elm_lang$core$Color$grayscale = function (p) { + return A4(_elm_lang$core$Color$HSLA, 0, 0, 1 - p, 1); +}; +var _elm_lang$core$Color$greyscale = function (p) { + return A4(_elm_lang$core$Color$HSLA, 0, 0, 1 - p, 1); +}; +var _elm_lang$core$Color$RGBA = F4( + function (a, b, c, d) { + return {ctor: 'RGBA', _0: a, _1: b, _2: c, _3: d}; + }); +var _elm_lang$core$Color$rgba = _elm_lang$core$Color$RGBA; +var _elm_lang$core$Color$rgb = F3( + function (r, g, b) { + return A4(_elm_lang$core$Color$RGBA, r, g, b, 1); + }); +var _elm_lang$core$Color$lightRed = A4(_elm_lang$core$Color$RGBA, 239, 41, 41, 1); +var _elm_lang$core$Color$red = A4(_elm_lang$core$Color$RGBA, 204, 0, 0, 1); +var _elm_lang$core$Color$darkRed = A4(_elm_lang$core$Color$RGBA, 164, 0, 0, 1); +var _elm_lang$core$Color$lightOrange = A4(_elm_lang$core$Color$RGBA, 252, 175, 62, 1); +var _elm_lang$core$Color$orange = A4(_elm_lang$core$Color$RGBA, 245, 121, 0, 1); +var _elm_lang$core$Color$darkOrange = A4(_elm_lang$core$Color$RGBA, 206, 92, 0, 1); +var _elm_lang$core$Color$lightYellow = A4(_elm_lang$core$Color$RGBA, 255, 233, 79, 1); +var _elm_lang$core$Color$yellow = A4(_elm_lang$core$Color$RGBA, 237, 212, 0, 1); +var _elm_lang$core$Color$darkYellow = A4(_elm_lang$core$Color$RGBA, 196, 160, 0, 1); +var _elm_lang$core$Color$lightGreen = A4(_elm_lang$core$Color$RGBA, 138, 226, 52, 1); +var _elm_lang$core$Color$green = A4(_elm_lang$core$Color$RGBA, 115, 210, 22, 1); +var _elm_lang$core$Color$darkGreen = A4(_elm_lang$core$Color$RGBA, 78, 154, 6, 1); +var _elm_lang$core$Color$lightBlue = A4(_elm_lang$core$Color$RGBA, 114, 159, 207, 1); +var _elm_lang$core$Color$blue = A4(_elm_lang$core$Color$RGBA, 52, 101, 164, 1); +var _elm_lang$core$Color$darkBlue = A4(_elm_lang$core$Color$RGBA, 32, 74, 135, 1); +var _elm_lang$core$Color$lightPurple = A4(_elm_lang$core$Color$RGBA, 173, 127, 168, 1); +var _elm_lang$core$Color$purple = A4(_elm_lang$core$Color$RGBA, 117, 80, 123, 1); +var _elm_lang$core$Color$darkPurple = A4(_elm_lang$core$Color$RGBA, 92, 53, 102, 1); +var _elm_lang$core$Color$lightBrown = A4(_elm_lang$core$Color$RGBA, 233, 185, 110, 1); +var _elm_lang$core$Color$brown = A4(_elm_lang$core$Color$RGBA, 193, 125, 17, 1); +var _elm_lang$core$Color$darkBrown = A4(_elm_lang$core$Color$RGBA, 143, 89, 2, 1); +var _elm_lang$core$Color$black = A4(_elm_lang$core$Color$RGBA, 0, 0, 0, 1); +var _elm_lang$core$Color$white = A4(_elm_lang$core$Color$RGBA, 255, 255, 255, 1); +var _elm_lang$core$Color$lightGrey = A4(_elm_lang$core$Color$RGBA, 238, 238, 236, 1); +var _elm_lang$core$Color$grey = A4(_elm_lang$core$Color$RGBA, 211, 215, 207, 1); +var _elm_lang$core$Color$darkGrey = A4(_elm_lang$core$Color$RGBA, 186, 189, 182, 1); +var _elm_lang$core$Color$lightGray = A4(_elm_lang$core$Color$RGBA, 238, 238, 236, 1); +var _elm_lang$core$Color$gray = A4(_elm_lang$core$Color$RGBA, 211, 215, 207, 1); +var _elm_lang$core$Color$darkGray = A4(_elm_lang$core$Color$RGBA, 186, 189, 182, 1); +var _elm_lang$core$Color$lightCharcoal = A4(_elm_lang$core$Color$RGBA, 136, 138, 133, 1); +var _elm_lang$core$Color$charcoal = A4(_elm_lang$core$Color$RGBA, 85, 87, 83, 1); +var _elm_lang$core$Color$darkCharcoal = A4(_elm_lang$core$Color$RGBA, 46, 52, 54, 1); +var _elm_lang$core$Color$Radial = F5( + function (a, b, c, d, e) { + return {ctor: 'Radial', _0: a, _1: b, _2: c, _3: d, _4: e}; + }); +var _elm_lang$core$Color$radial = _elm_lang$core$Color$Radial; +var _elm_lang$core$Color$Linear = F3( + function (a, b, c) { + return {ctor: 'Linear', _0: a, _1: b, _2: c}; + }); +var _elm_lang$core$Color$linear = _elm_lang$core$Color$Linear; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Date.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Date.elmi new file mode 100644 index 0000000..de76ef8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Date.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Date.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Date.elmo new file mode 100644 index 0000000..94ac728 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Date.elmo @@ -0,0 +1,32 @@ +var _elm_lang$core$Date$millisecond = _elm_lang$core$Native_Date.millisecond; +var _elm_lang$core$Date$second = _elm_lang$core$Native_Date.second; +var _elm_lang$core$Date$minute = _elm_lang$core$Native_Date.minute; +var _elm_lang$core$Date$hour = _elm_lang$core$Native_Date.hour; +var _elm_lang$core$Date$dayOfWeek = _elm_lang$core$Native_Date.dayOfWeek; +var _elm_lang$core$Date$day = _elm_lang$core$Native_Date.day; +var _elm_lang$core$Date$month = _elm_lang$core$Native_Date.month; +var _elm_lang$core$Date$year = _elm_lang$core$Native_Date.year; +var _elm_lang$core$Date$fromTime = _elm_lang$core$Native_Date.fromTime; +var _elm_lang$core$Date$toTime = _elm_lang$core$Native_Date.toTime; +var _elm_lang$core$Date$fromString = _elm_lang$core$Native_Date.fromString; +var _elm_lang$core$Date$now = A2(_elm_lang$core$Task$map, _elm_lang$core$Date$fromTime, _elm_lang$core$Time$now); +var _elm_lang$core$Date$Date = {ctor: 'Date'}; +var _elm_lang$core$Date$Sun = {ctor: 'Sun'}; +var _elm_lang$core$Date$Sat = {ctor: 'Sat'}; +var _elm_lang$core$Date$Fri = {ctor: 'Fri'}; +var _elm_lang$core$Date$Thu = {ctor: 'Thu'}; +var _elm_lang$core$Date$Wed = {ctor: 'Wed'}; +var _elm_lang$core$Date$Tue = {ctor: 'Tue'}; +var _elm_lang$core$Date$Mon = {ctor: 'Mon'}; +var _elm_lang$core$Date$Dec = {ctor: 'Dec'}; +var _elm_lang$core$Date$Nov = {ctor: 'Nov'}; +var _elm_lang$core$Date$Oct = {ctor: 'Oct'}; +var _elm_lang$core$Date$Sep = {ctor: 'Sep'}; +var _elm_lang$core$Date$Aug = {ctor: 'Aug'}; +var _elm_lang$core$Date$Jul = {ctor: 'Jul'}; +var _elm_lang$core$Date$Jun = {ctor: 'Jun'}; +var _elm_lang$core$Date$May = {ctor: 'May'}; +var _elm_lang$core$Date$Apr = {ctor: 'Apr'}; +var _elm_lang$core$Date$Mar = {ctor: 'Mar'}; +var _elm_lang$core$Date$Feb = {ctor: 'Feb'}; +var _elm_lang$core$Date$Jan = {ctor: 'Jan'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Debug.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Debug.elmi new file mode 100644 index 0000000..72d040c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Debug.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Debug.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Debug.elmo new file mode 100644 index 0000000..ea00ee2 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Debug.elmo @@ -0,0 +1,2 @@ +var _elm_lang$core$Debug$crash = _elm_lang$core$Native_Debug.crash; +var _elm_lang$core$Debug$log = _elm_lang$core$Native_Debug.log; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Dict.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Dict.elmi new file mode 100644 index 0000000..c758192 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Dict.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Dict.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Dict.elmo new file mode 100644 index 0000000..e65b556 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Dict.elmo @@ -0,0 +1,893 @@ +var _elm_lang$core$Dict$foldr = F3( + function (f, acc, t) { + foldr: + while (true) { + var _p0 = t; + if (_p0.ctor === 'RBEmpty_elm_builtin') { + return acc; + } else { + var _v1 = f, + _v2 = A3( + f, + _p0._1, + _p0._2, + A3(_elm_lang$core$Dict$foldr, f, acc, _p0._4)), + _v3 = _p0._3; + f = _v1; + acc = _v2; + t = _v3; + continue foldr; + } + } + }); +var _elm_lang$core$Dict$keys = function (dict) { + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (key, value, keyList) { + return A2(_elm_lang$core$List_ops['::'], key, keyList); + }), + _elm_lang$core$Native_List.fromArray( + []), + dict); +}; +var _elm_lang$core$Dict$values = function (dict) { + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (key, value, valueList) { + return A2(_elm_lang$core$List_ops['::'], value, valueList); + }), + _elm_lang$core$Native_List.fromArray( + []), + dict); +}; +var _elm_lang$core$Dict$toList = function (dict) { + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (key, value, list) { + return A2( + _elm_lang$core$List_ops['::'], + {ctor: '_Tuple2', _0: key, _1: value}, + list); + }), + _elm_lang$core$Native_List.fromArray( + []), + dict); +}; +var _elm_lang$core$Dict$foldl = F3( + function (f, acc, dict) { + foldl: + while (true) { + var _p1 = dict; + if (_p1.ctor === 'RBEmpty_elm_builtin') { + return acc; + } else { + var _v5 = f, + _v6 = A3( + f, + _p1._1, + _p1._2, + A3(_elm_lang$core$Dict$foldl, f, acc, _p1._3)), + _v7 = _p1._4; + f = _v5; + acc = _v6; + dict = _v7; + continue foldl; + } + } + }); +var _elm_lang$core$Dict$merge = F6( + function (leftStep, bothStep, rightStep, leftDict, rightDict, initialResult) { + var stepState = F3( + function (rKey, rValue, _p2) { + stepState: + while (true) { + var _p3 = _p2; + var _p9 = _p3._1; + var _p8 = _p3._0; + var _p4 = _p8; + if (_p4.ctor === '[]') { + return { + ctor: '_Tuple2', + _0: _p8, + _1: A3(rightStep, rKey, rValue, _p9) + }; + } else { + var _p7 = _p4._1; + var _p6 = _p4._0._1; + var _p5 = _p4._0._0; + if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) < 0) { + var _v10 = rKey, + _v11 = rValue, + _v12 = { + ctor: '_Tuple2', + _0: _p7, + _1: A3(leftStep, _p5, _p6, _p9) + }; + rKey = _v10; + rValue = _v11; + _p2 = _v12; + continue stepState; + } else { + if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) > 0) { + return { + ctor: '_Tuple2', + _0: _p8, + _1: A3(rightStep, rKey, rValue, _p9) + }; + } else { + return { + ctor: '_Tuple2', + _0: _p7, + _1: A4(bothStep, _p5, _p6, rValue, _p9) + }; + } + } + } + } + }); + var _p10 = A3( + _elm_lang$core$Dict$foldl, + stepState, + { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$toList(leftDict), + _1: initialResult + }, + rightDict); + var leftovers = _p10._0; + var intermediateResult = _p10._1; + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p11, result) { + var _p12 = _p11; + return A3(leftStep, _p12._0, _p12._1, result); + }), + intermediateResult, + leftovers); + }); +var _elm_lang$core$Dict$reportRemBug = F4( + function (msg, c, lgot, rgot) { + return _elm_lang$core$Native_Debug.crash( + _elm_lang$core$String$concat( + _elm_lang$core$Native_List.fromArray( + [ + 'Internal red-black tree invariant violated, expected ', + msg, + ' and got ', + _elm_lang$core$Basics$toString(c), + '/', + lgot, + '/', + rgot, + '\nPlease report this bug to ' + ]))); + }); +var _elm_lang$core$Dict$isBBlack = function (dict) { + var _p13 = dict; + _v14_2: + do { + if (_p13.ctor === 'RBNode_elm_builtin') { + if (_p13._0.ctor === 'BBlack') { + return true; + } else { + break _v14_2; + } + } else { + if (_p13._0.ctor === 'LBBlack') { + return true; + } else { + break _v14_2; + } + } + } while(false); + return false; +}; +var _elm_lang$core$Dict$sizeHelp = F2( + function (n, dict) { + sizeHelp: + while (true) { + var _p14 = dict; + if (_p14.ctor === 'RBEmpty_elm_builtin') { + return n; + } else { + var _v16 = A2(_elm_lang$core$Dict$sizeHelp, n + 1, _p14._4), + _v17 = _p14._3; + n = _v16; + dict = _v17; + continue sizeHelp; + } + } + }); +var _elm_lang$core$Dict$size = function (dict) { + return A2(_elm_lang$core$Dict$sizeHelp, 0, dict); +}; +var _elm_lang$core$Dict$get = F2( + function (targetKey, dict) { + get: + while (true) { + var _p15 = dict; + if (_p15.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Maybe$Nothing; + } else { + var _p16 = A2(_elm_lang$core$Basics$compare, targetKey, _p15._1); + switch (_p16.ctor) { + case 'LT': + var _v20 = targetKey, + _v21 = _p15._3; + targetKey = _v20; + dict = _v21; + continue get; + case 'EQ': + return _elm_lang$core$Maybe$Just(_p15._2); + default: + var _v22 = targetKey, + _v23 = _p15._4; + targetKey = _v22; + dict = _v23; + continue get; + } + } + } + }); +var _elm_lang$core$Dict$member = F2( + function (key, dict) { + var _p17 = A2(_elm_lang$core$Dict$get, key, dict); + if (_p17.ctor === 'Just') { + return true; + } else { + return false; + } + }); +var _elm_lang$core$Dict$maxWithDefault = F3( + function (k, v, r) { + maxWithDefault: + while (true) { + var _p18 = r; + if (_p18.ctor === 'RBEmpty_elm_builtin') { + return {ctor: '_Tuple2', _0: k, _1: v}; + } else { + var _v26 = _p18._1, + _v27 = _p18._2, + _v28 = _p18._4; + k = _v26; + v = _v27; + r = _v28; + continue maxWithDefault; + } + } + }); +var _elm_lang$core$Dict$NBlack = {ctor: 'NBlack'}; +var _elm_lang$core$Dict$BBlack = {ctor: 'BBlack'}; +var _elm_lang$core$Dict$Black = {ctor: 'Black'}; +var _elm_lang$core$Dict$blackish = function (t) { + var _p19 = t; + if (_p19.ctor === 'RBNode_elm_builtin') { + var _p20 = _p19._0; + return _elm_lang$core$Native_Utils.eq(_p20, _elm_lang$core$Dict$Black) || _elm_lang$core$Native_Utils.eq(_p20, _elm_lang$core$Dict$BBlack); + } else { + return true; + } +}; +var _elm_lang$core$Dict$Red = {ctor: 'Red'}; +var _elm_lang$core$Dict$moreBlack = function (color) { + var _p21 = color; + switch (_p21.ctor) { + case 'Black': + return _elm_lang$core$Dict$BBlack; + case 'Red': + return _elm_lang$core$Dict$Black; + case 'NBlack': + return _elm_lang$core$Dict$Red; + default: + return _elm_lang$core$Native_Debug.crash('Can\'t make a double black node more black!'); + } +}; +var _elm_lang$core$Dict$lessBlack = function (color) { + var _p22 = color; + switch (_p22.ctor) { + case 'BBlack': + return _elm_lang$core$Dict$Black; + case 'Black': + return _elm_lang$core$Dict$Red; + case 'Red': + return _elm_lang$core$Dict$NBlack; + default: + return _elm_lang$core$Native_Debug.crash('Can\'t make a negative black node less black!'); + } +}; +var _elm_lang$core$Dict$LBBlack = {ctor: 'LBBlack'}; +var _elm_lang$core$Dict$LBlack = {ctor: 'LBlack'}; +var _elm_lang$core$Dict$RBEmpty_elm_builtin = function (a) { + return {ctor: 'RBEmpty_elm_builtin', _0: a}; +}; +var _elm_lang$core$Dict$empty = _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); +var _elm_lang$core$Dict$isEmpty = function (dict) { + return _elm_lang$core$Native_Utils.eq(dict, _elm_lang$core$Dict$empty); +}; +var _elm_lang$core$Dict$RBNode_elm_builtin = F5( + function (a, b, c, d, e) { + return {ctor: 'RBNode_elm_builtin', _0: a, _1: b, _2: c, _3: d, _4: e}; + }); +var _elm_lang$core$Dict$ensureBlackRoot = function (dict) { + var _p23 = dict; + if ((_p23.ctor === 'RBNode_elm_builtin') && (_p23._0.ctor === 'Red')) { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p23._1, _p23._2, _p23._3, _p23._4); + } else { + return dict; + } +}; +var _elm_lang$core$Dict$lessBlackTree = function (dict) { + var _p24 = dict; + if (_p24.ctor === 'RBNode_elm_builtin') { + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$lessBlack(_p24._0), + _p24._1, + _p24._2, + _p24._3, + _p24._4); + } else { + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + } +}; +var _elm_lang$core$Dict$balancedTree = function (col) { + return function (xk) { + return function (xv) { + return function (yk) { + return function (yv) { + return function (zk) { + return function (zv) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$lessBlack(col), + yk, + yv, + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, xk, xv, a, b), + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, zk, zv, c, d)); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; +var _elm_lang$core$Dict$blacken = function (t) { + var _p25 = t; + if (_p25.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + } else { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p25._1, _p25._2, _p25._3, _p25._4); + } +}; +var _elm_lang$core$Dict$redden = function (t) { + var _p26 = t; + if (_p26.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Native_Debug.crash('can\'t make a Leaf red'); + } else { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Red, _p26._1, _p26._2, _p26._3, _p26._4); + } +}; +var _elm_lang$core$Dict$balanceHelp = function (tree) { + var _p27 = tree; + _v36_6: + do { + _v36_5: + do { + _v36_4: + do { + _v36_3: + do { + _v36_2: + do { + _v36_1: + do { + _v36_0: + do { + if (_p27.ctor === 'RBNode_elm_builtin') { + if (_p27._3.ctor === 'RBNode_elm_builtin') { + if (_p27._4.ctor === 'RBNode_elm_builtin') { + switch (_p27._3._0.ctor) { + case 'Red': + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + break _v36_6; + } + } + } + } + case 'NBlack': + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + break _v36_6; + } + } + } + default: + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + break _v36_6; + } + } + } + case 'NBlack': + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + } + } + case 'NBlack': + if (_p27._0.ctor === 'BBlack') { + if ((((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + if ((((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + } + } else { + break _v36_6; + } + default: + if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + } + default: + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + break _v36_6; + } + } + case 'NBlack': + if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + break _v36_6; + } + default: + break _v36_6; + } + } + } else { + switch (_p27._3._0.ctor) { + case 'Red': + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + break _v36_6; + } + } + case 'NBlack': + if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + default: + break _v36_6; + } + } + } else { + if (_p27._4.ctor === 'RBNode_elm_builtin') { + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + break _v36_6; + } + } + case 'NBlack': + if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + break _v36_6; + } + default: + break _v36_6; + } + } else { + break _v36_6; + } + } + } else { + break _v36_6; + } + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._3._3._1)(_p27._3._3._2)(_p27._3._1)(_p27._3._2)(_p27._1)(_p27._2)(_p27._3._3._3)(_p27._3._3._4)(_p27._3._4)(_p27._4); + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._3._1)(_p27._3._2)(_p27._3._4._1)(_p27._3._4._2)(_p27._1)(_p27._2)(_p27._3._3)(_p27._3._4._3)(_p27._3._4._4)(_p27._4); + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._1)(_p27._2)(_p27._4._3._1)(_p27._4._3._2)(_p27._4._1)(_p27._4._2)(_p27._3)(_p27._4._3._3)(_p27._4._3._4)(_p27._4._4); + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._1)(_p27._2)(_p27._4._1)(_p27._4._2)(_p27._4._4._1)(_p27._4._4._2)(_p27._3)(_p27._4._3)(_p27._4._4._3)(_p27._4._4._4); + } while(false); + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$Black, + _p27._4._3._1, + _p27._4._3._2, + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._1, _p27._2, _p27._3, _p27._4._3._3), + A5( + _elm_lang$core$Dict$balance, + _elm_lang$core$Dict$Black, + _p27._4._1, + _p27._4._2, + _p27._4._3._4, + _elm_lang$core$Dict$redden(_p27._4._4))); + } while(false); + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$Black, + _p27._3._4._1, + _p27._3._4._2, + A5( + _elm_lang$core$Dict$balance, + _elm_lang$core$Dict$Black, + _p27._3._1, + _p27._3._2, + _elm_lang$core$Dict$redden(_p27._3._3), + _p27._3._4._3), + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._1, _p27._2, _p27._3._4._4, _p27._4)); + } while(false); + return tree; +}; +var _elm_lang$core$Dict$balance = F5( + function (c, k, v, l, r) { + var tree = A5(_elm_lang$core$Dict$RBNode_elm_builtin, c, k, v, l, r); + return _elm_lang$core$Dict$blackish(tree) ? _elm_lang$core$Dict$balanceHelp(tree) : tree; + }); +var _elm_lang$core$Dict$bubble = F5( + function (c, k, v, l, r) { + return (_elm_lang$core$Dict$isBBlack(l) || _elm_lang$core$Dict$isBBlack(r)) ? A5( + _elm_lang$core$Dict$balance, + _elm_lang$core$Dict$moreBlack(c), + k, + v, + _elm_lang$core$Dict$lessBlackTree(l), + _elm_lang$core$Dict$lessBlackTree(r)) : A5(_elm_lang$core$Dict$RBNode_elm_builtin, c, k, v, l, r); + }); +var _elm_lang$core$Dict$removeMax = F5( + function (c, k, v, l, r) { + var _p28 = r; + if (_p28.ctor === 'RBEmpty_elm_builtin') { + return A3(_elm_lang$core$Dict$rem, c, l, r); + } else { + return A5( + _elm_lang$core$Dict$bubble, + c, + k, + v, + l, + A5(_elm_lang$core$Dict$removeMax, _p28._0, _p28._1, _p28._2, _p28._3, _p28._4)); + } + }); +var _elm_lang$core$Dict$rem = F3( + function (color, left, right) { + var _p29 = {ctor: '_Tuple2', _0: left, _1: right}; + if (_p29._0.ctor === 'RBEmpty_elm_builtin') { + if (_p29._1.ctor === 'RBEmpty_elm_builtin') { + var _p30 = color; + switch (_p30.ctor) { + case 'Red': + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + case 'Black': + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBBlack); + default: + return _elm_lang$core$Native_Debug.crash('cannot have bblack or nblack nodes at this point'); + } + } else { + var _p33 = _p29._1._0; + var _p32 = _p29._0._0; + var _p31 = {ctor: '_Tuple3', _0: color, _1: _p32, _2: _p33}; + if ((((_p31.ctor === '_Tuple3') && (_p31._0.ctor === 'Black')) && (_p31._1.ctor === 'LBlack')) && (_p31._2.ctor === 'Red')) { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p29._1._1, _p29._1._2, _p29._1._3, _p29._1._4); + } else { + return A4( + _elm_lang$core$Dict$reportRemBug, + 'Black/LBlack/Red', + color, + _elm_lang$core$Basics$toString(_p32), + _elm_lang$core$Basics$toString(_p33)); + } + } + } else { + if (_p29._1.ctor === 'RBEmpty_elm_builtin') { + var _p36 = _p29._1._0; + var _p35 = _p29._0._0; + var _p34 = {ctor: '_Tuple3', _0: color, _1: _p35, _2: _p36}; + if ((((_p34.ctor === '_Tuple3') && (_p34._0.ctor === 'Black')) && (_p34._1.ctor === 'Red')) && (_p34._2.ctor === 'LBlack')) { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p29._0._1, _p29._0._2, _p29._0._3, _p29._0._4); + } else { + return A4( + _elm_lang$core$Dict$reportRemBug, + 'Black/Red/LBlack', + color, + _elm_lang$core$Basics$toString(_p35), + _elm_lang$core$Basics$toString(_p36)); + } + } else { + var _p40 = _p29._0._2; + var _p39 = _p29._0._4; + var _p38 = _p29._0._1; + var newLeft = A5(_elm_lang$core$Dict$removeMax, _p29._0._0, _p38, _p40, _p29._0._3, _p39); + var _p37 = A3(_elm_lang$core$Dict$maxWithDefault, _p38, _p40, _p39); + var k = _p37._0; + var v = _p37._1; + return A5(_elm_lang$core$Dict$bubble, color, k, v, newLeft, right); + } + } + }); +var _elm_lang$core$Dict$map = F2( + function (f, dict) { + var _p41 = dict; + if (_p41.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + } else { + var _p42 = _p41._1; + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _p41._0, + _p42, + A2(f, _p42, _p41._2), + A2(_elm_lang$core$Dict$map, f, _p41._3), + A2(_elm_lang$core$Dict$map, f, _p41._4)); + } + }); +var _elm_lang$core$Dict$Same = {ctor: 'Same'}; +var _elm_lang$core$Dict$Remove = {ctor: 'Remove'}; +var _elm_lang$core$Dict$Insert = {ctor: 'Insert'}; +var _elm_lang$core$Dict$update = F3( + function (k, alter, dict) { + var up = function (dict) { + var _p43 = dict; + if (_p43.ctor === 'RBEmpty_elm_builtin') { + var _p44 = alter(_elm_lang$core$Maybe$Nothing); + if (_p44.ctor === 'Nothing') { + return {ctor: '_Tuple2', _0: _elm_lang$core$Dict$Same, _1: _elm_lang$core$Dict$empty}; + } else { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Insert, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Red, k, _p44._0, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty) + }; + } + } else { + var _p55 = _p43._2; + var _p54 = _p43._4; + var _p53 = _p43._3; + var _p52 = _p43._1; + var _p51 = _p43._0; + var _p45 = A2(_elm_lang$core$Basics$compare, k, _p52); + switch (_p45.ctor) { + case 'EQ': + var _p46 = alter( + _elm_lang$core$Maybe$Just(_p55)); + if (_p46.ctor === 'Nothing') { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Remove, + _1: A3(_elm_lang$core$Dict$rem, _p51, _p53, _p54) + }; + } else { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Same, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p46._0, _p53, _p54) + }; + } + case 'LT': + var _p47 = up(_p53); + var flag = _p47._0; + var newLeft = _p47._1; + var _p48 = flag; + switch (_p48.ctor) { + case 'Same': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Same, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p55, newLeft, _p54) + }; + case 'Insert': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Insert, + _1: A5(_elm_lang$core$Dict$balance, _p51, _p52, _p55, newLeft, _p54) + }; + default: + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Remove, + _1: A5(_elm_lang$core$Dict$bubble, _p51, _p52, _p55, newLeft, _p54) + }; + } + default: + var _p49 = up(_p54); + var flag = _p49._0; + var newRight = _p49._1; + var _p50 = flag; + switch (_p50.ctor) { + case 'Same': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Same, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p55, _p53, newRight) + }; + case 'Insert': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Insert, + _1: A5(_elm_lang$core$Dict$balance, _p51, _p52, _p55, _p53, newRight) + }; + default: + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Remove, + _1: A5(_elm_lang$core$Dict$bubble, _p51, _p52, _p55, _p53, newRight) + }; + } + } + } + }; + var _p56 = up(dict); + var flag = _p56._0; + var updatedDict = _p56._1; + var _p57 = flag; + switch (_p57.ctor) { + case 'Same': + return updatedDict; + case 'Insert': + return _elm_lang$core$Dict$ensureBlackRoot(updatedDict); + default: + return _elm_lang$core$Dict$blacken(updatedDict); + } + }); +var _elm_lang$core$Dict$insert = F3( + function (key, value, dict) { + return A3( + _elm_lang$core$Dict$update, + key, + _elm_lang$core$Basics$always( + _elm_lang$core$Maybe$Just(value)), + dict); + }); +var _elm_lang$core$Dict$singleton = F2( + function (key, value) { + return A3(_elm_lang$core$Dict$insert, key, value, _elm_lang$core$Dict$empty); + }); +var _elm_lang$core$Dict$union = F2( + function (t1, t2) { + return A3(_elm_lang$core$Dict$foldl, _elm_lang$core$Dict$insert, t2, t1); + }); +var _elm_lang$core$Dict$filter = F2( + function (predicate, dictionary) { + var add = F3( + function (key, value, dict) { + return A2(predicate, key, value) ? A3(_elm_lang$core$Dict$insert, key, value, dict) : dict; + }); + return A3(_elm_lang$core$Dict$foldl, add, _elm_lang$core$Dict$empty, dictionary); + }); +var _elm_lang$core$Dict$intersect = F2( + function (t1, t2) { + return A2( + _elm_lang$core$Dict$filter, + F2( + function (k, _p58) { + return A2(_elm_lang$core$Dict$member, k, t2); + }), + t1); + }); +var _elm_lang$core$Dict$partition = F2( + function (predicate, dict) { + var add = F3( + function (key, value, _p59) { + var _p60 = _p59; + var _p62 = _p60._1; + var _p61 = _p60._0; + return A2(predicate, key, value) ? { + ctor: '_Tuple2', + _0: A3(_elm_lang$core$Dict$insert, key, value, _p61), + _1: _p62 + } : { + ctor: '_Tuple2', + _0: _p61, + _1: A3(_elm_lang$core$Dict$insert, key, value, _p62) + }; + }); + return A3( + _elm_lang$core$Dict$foldl, + add, + {ctor: '_Tuple2', _0: _elm_lang$core$Dict$empty, _1: _elm_lang$core$Dict$empty}, + dict); + }); +var _elm_lang$core$Dict$fromList = function (assocs) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p63, dict) { + var _p64 = _p63; + return A3(_elm_lang$core$Dict$insert, _p64._0, _p64._1, dict); + }), + _elm_lang$core$Dict$empty, + assocs); +}; +var _elm_lang$core$Dict$remove = F2( + function (key, dict) { + return A3( + _elm_lang$core$Dict$update, + key, + _elm_lang$core$Basics$always(_elm_lang$core$Maybe$Nothing), + dict); + }); +var _elm_lang$core$Dict$diff = F2( + function (t1, t2) { + return A3( + _elm_lang$core$Dict$foldl, + F3( + function (k, v, t) { + return A2(_elm_lang$core$Dict$remove, k, t); + }), + t1, + t2); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Decode.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Decode.elmi new file mode 100644 index 0000000..91fe709 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Decode.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Decode.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Decode.elmo new file mode 100644 index 0000000..5dcd82f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Decode.elmo @@ -0,0 +1,58 @@ +var _elm_lang$core$Json_Decode$null = _elm_lang$core$Native_Json.decodeNull; +var _elm_lang$core$Json_Decode$value = _elm_lang$core$Native_Json.decodePrimitive('value'); +var _elm_lang$core$Json_Decode$andThen = _elm_lang$core$Native_Json.andThen; +var _elm_lang$core$Json_Decode$fail = _elm_lang$core$Native_Json.fail; +var _elm_lang$core$Json_Decode$succeed = _elm_lang$core$Native_Json.succeed; +var _elm_lang$core$Json_Decode$lazy = function (thunk) { + return A2( + _elm_lang$core$Json_Decode$andThen, + thunk, + _elm_lang$core$Json_Decode$succeed( + {ctor: '_Tuple0'})); +}; +var _elm_lang$core$Json_Decode$decodeValue = _elm_lang$core$Native_Json.run; +var _elm_lang$core$Json_Decode$decodeString = _elm_lang$core$Native_Json.runOnString; +var _elm_lang$core$Json_Decode$map8 = _elm_lang$core$Native_Json.map8; +var _elm_lang$core$Json_Decode$map7 = _elm_lang$core$Native_Json.map7; +var _elm_lang$core$Json_Decode$map6 = _elm_lang$core$Native_Json.map6; +var _elm_lang$core$Json_Decode$map5 = _elm_lang$core$Native_Json.map5; +var _elm_lang$core$Json_Decode$map4 = _elm_lang$core$Native_Json.map4; +var _elm_lang$core$Json_Decode$map3 = _elm_lang$core$Native_Json.map3; +var _elm_lang$core$Json_Decode$map2 = _elm_lang$core$Native_Json.map2; +var _elm_lang$core$Json_Decode$map = _elm_lang$core$Native_Json.map1; +var _elm_lang$core$Json_Decode$oneOf = _elm_lang$core$Native_Json.oneOf; +var _elm_lang$core$Json_Decode$maybe = function (decoder) { + return A2(_elm_lang$core$Native_Json.decodeContainer, 'maybe', decoder); +}; +var _elm_lang$core$Json_Decode$index = _elm_lang$core$Native_Json.decodeIndex; +var _elm_lang$core$Json_Decode$field = _elm_lang$core$Native_Json.decodeField; +var _elm_lang$core$Json_Decode$at = F2( + function (fields, decoder) { + return A3(_elm_lang$core$List$foldr, _elm_lang$core$Json_Decode$field, decoder, fields); + }); +var _elm_lang$core$Json_Decode$keyValuePairs = _elm_lang$core$Native_Json.decodeKeyValuePairs; +var _elm_lang$core$Json_Decode$dict = function (decoder) { + return A2( + _elm_lang$core$Json_Decode$map, + _elm_lang$core$Dict$fromList, + _elm_lang$core$Json_Decode$keyValuePairs(decoder)); +}; +var _elm_lang$core$Json_Decode$array = function (decoder) { + return A2(_elm_lang$core$Native_Json.decodeContainer, 'array', decoder); +}; +var _elm_lang$core$Json_Decode$list = function (decoder) { + return A2(_elm_lang$core$Native_Json.decodeContainer, 'list', decoder); +}; +var _elm_lang$core$Json_Decode$nullable = function (decoder) { + return _elm_lang$core$Json_Decode$oneOf( + _elm_lang$core$Native_List.fromArray( + [ + _elm_lang$core$Json_Decode$null(_elm_lang$core$Maybe$Nothing), + A2(_elm_lang$core$Json_Decode$map, _elm_lang$core$Maybe$Just, decoder) + ])); +}; +var _elm_lang$core$Json_Decode$float = _elm_lang$core$Native_Json.decodePrimitive('float'); +var _elm_lang$core$Json_Decode$int = _elm_lang$core$Native_Json.decodePrimitive('int'); +var _elm_lang$core$Json_Decode$bool = _elm_lang$core$Native_Json.decodePrimitive('bool'); +var _elm_lang$core$Json_Decode$string = _elm_lang$core$Native_Json.decodePrimitive('string'); +var _elm_lang$core$Json_Decode$Decoder = {ctor: 'Decoder'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Encode.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Encode.elmi new file mode 100644 index 0000000..f213e67 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Encode.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Encode.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Encode.elmo new file mode 100644 index 0000000..3d24faa --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Json-Encode.elmo @@ -0,0 +1,10 @@ +var _elm_lang$core$Json_Encode$list = _elm_lang$core$Native_Json.encodeList; +var _elm_lang$core$Json_Encode$array = _elm_lang$core$Native_Json.encodeArray; +var _elm_lang$core$Json_Encode$object = _elm_lang$core$Native_Json.encodeObject; +var _elm_lang$core$Json_Encode$null = _elm_lang$core$Native_Json.encodeNull; +var _elm_lang$core$Json_Encode$bool = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$float = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$int = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$string = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$encode = _elm_lang$core$Native_Json.encode; +var _elm_lang$core$Json_Encode$Value = {ctor: 'Value'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/List.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/List.elmi new file mode 100644 index 0000000..9a968bd Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/List.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/List.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/List.elmo new file mode 100644 index 0000000..7fc57a6 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/List.elmo @@ -0,0 +1,528 @@ +var _elm_lang$core$List$sortWith = _elm_lang$core$Native_List.sortWith; +var _elm_lang$core$List$sortBy = _elm_lang$core$Native_List.sortBy; +var _elm_lang$core$List$sort = function (xs) { + return A2(_elm_lang$core$List$sortBy, _elm_lang$core$Basics$identity, xs); +}; +var _elm_lang$core$List$drop = F2( + function (n, list) { + drop: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return list; + } else { + var _p0 = list; + if (_p0.ctor === '[]') { + return list; + } else { + var _v1 = n - 1, + _v2 = _p0._1; + n = _v1; + list = _v2; + continue drop; + } + } + } + }); +var _elm_lang$core$List$map5 = _elm_lang$core$Native_List.map5; +var _elm_lang$core$List$map4 = _elm_lang$core$Native_List.map4; +var _elm_lang$core$List$map3 = _elm_lang$core$Native_List.map3; +var _elm_lang$core$List$map2 = _elm_lang$core$Native_List.map2; +var _elm_lang$core$List$any = F2( + function (isOkay, list) { + any: + while (true) { + var _p1 = list; + if (_p1.ctor === '[]') { + return false; + } else { + if (isOkay(_p1._0)) { + return true; + } else { + var _v4 = isOkay, + _v5 = _p1._1; + isOkay = _v4; + list = _v5; + continue any; + } + } + } + }); +var _elm_lang$core$List$all = F2( + function (isOkay, list) { + return _elm_lang$core$Basics$not( + A2( + _elm_lang$core$List$any, + function (_p2) { + return _elm_lang$core$Basics$not( + isOkay(_p2)); + }, + list)); + }); +var _elm_lang$core$List$foldr = _elm_lang$core$Native_List.foldr; +var _elm_lang$core$List$foldl = F3( + function (func, acc, list) { + foldl: + while (true) { + var _p3 = list; + if (_p3.ctor === '[]') { + return acc; + } else { + var _v7 = func, + _v8 = A2(func, _p3._0, acc), + _v9 = _p3._1; + func = _v7; + acc = _v8; + list = _v9; + continue foldl; + } + } + }); +var _elm_lang$core$List$length = function (xs) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p4, i) { + return i + 1; + }), + 0, + xs); +}; +var _elm_lang$core$List$sum = function (numbers) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (x, y) { + return x + y; + }), + 0, + numbers); +}; +var _elm_lang$core$List$product = function (numbers) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (x, y) { + return x * y; + }), + 1, + numbers); +}; +var _elm_lang$core$List$maximum = function (list) { + var _p5 = list; + if (_p5.ctor === '::') { + return _elm_lang$core$Maybe$Just( + A3(_elm_lang$core$List$foldl, _elm_lang$core$Basics$max, _p5._0, _p5._1)); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List$minimum = function (list) { + var _p6 = list; + if (_p6.ctor === '::') { + return _elm_lang$core$Maybe$Just( + A3(_elm_lang$core$List$foldl, _elm_lang$core$Basics$min, _p6._0, _p6._1)); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List$member = F2( + function (x, xs) { + return A2( + _elm_lang$core$List$any, + function (a) { + return _elm_lang$core$Native_Utils.eq(a, x); + }, + xs); + }); +var _elm_lang$core$List$isEmpty = function (xs) { + var _p7 = xs; + if (_p7.ctor === '[]') { + return true; + } else { + return false; + } +}; +var _elm_lang$core$List$tail = function (list) { + var _p8 = list; + if (_p8.ctor === '::') { + return _elm_lang$core$Maybe$Just(_p8._1); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List$head = function (list) { + var _p9 = list; + if (_p9.ctor === '::') { + return _elm_lang$core$Maybe$Just(_p9._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List_ops = _elm_lang$core$List_ops || {}; +_elm_lang$core$List_ops['::'] = _elm_lang$core$Native_List.cons; +var _elm_lang$core$List$map = F2( + function (f, xs) { + return A3( + _elm_lang$core$List$foldr, + F2( + function (x, acc) { + return A2( + _elm_lang$core$List_ops['::'], + f(x), + acc); + }), + _elm_lang$core$Native_List.fromArray( + []), + xs); + }); +var _elm_lang$core$List$filter = F2( + function (pred, xs) { + var conditionalCons = F2( + function (front, back) { + return pred(front) ? A2(_elm_lang$core$List_ops['::'], front, back) : back; + }); + return A3( + _elm_lang$core$List$foldr, + conditionalCons, + _elm_lang$core$Native_List.fromArray( + []), + xs); + }); +var _elm_lang$core$List$maybeCons = F3( + function (f, mx, xs) { + var _p10 = f(mx); + if (_p10.ctor === 'Just') { + return A2(_elm_lang$core$List_ops['::'], _p10._0, xs); + } else { + return xs; + } + }); +var _elm_lang$core$List$filterMap = F2( + function (f, xs) { + return A3( + _elm_lang$core$List$foldr, + _elm_lang$core$List$maybeCons(f), + _elm_lang$core$Native_List.fromArray( + []), + xs); + }); +var _elm_lang$core$List$reverse = function (list) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (x, y) { + return A2(_elm_lang$core$List_ops['::'], x, y); + }), + _elm_lang$core$Native_List.fromArray( + []), + list); +}; +var _elm_lang$core$List$scanl = F3( + function (f, b, xs) { + var scan1 = F2( + function (x, accAcc) { + var _p11 = accAcc; + if (_p11.ctor === '::') { + return A2( + _elm_lang$core$List_ops['::'], + A2(f, x, _p11._0), + accAcc); + } else { + return _elm_lang$core$Native_List.fromArray( + []); + } + }); + return _elm_lang$core$List$reverse( + A3( + _elm_lang$core$List$foldl, + scan1, + _elm_lang$core$Native_List.fromArray( + [b]), + xs)); + }); +var _elm_lang$core$List$append = F2( + function (xs, ys) { + var _p12 = ys; + if (_p12.ctor === '[]') { + return xs; + } else { + return A3( + _elm_lang$core$List$foldr, + F2( + function (x, y) { + return A2(_elm_lang$core$List_ops['::'], x, y); + }), + ys, + xs); + } + }); +var _elm_lang$core$List$concat = function (lists) { + return A3( + _elm_lang$core$List$foldr, + _elm_lang$core$List$append, + _elm_lang$core$Native_List.fromArray( + []), + lists); +}; +var _elm_lang$core$List$concatMap = F2( + function (f, list) { + return _elm_lang$core$List$concat( + A2(_elm_lang$core$List$map, f, list)); + }); +var _elm_lang$core$List$partition = F2( + function (pred, list) { + var step = F2( + function (x, _p13) { + var _p14 = _p13; + var _p16 = _p14._0; + var _p15 = _p14._1; + return pred(x) ? { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$List_ops['::'], x, _p16), + _1: _p15 + } : { + ctor: '_Tuple2', + _0: _p16, + _1: A2(_elm_lang$core$List_ops['::'], x, _p15) + }; + }); + return A3( + _elm_lang$core$List$foldr, + step, + { + ctor: '_Tuple2', + _0: _elm_lang$core$Native_List.fromArray( + []), + _1: _elm_lang$core$Native_List.fromArray( + []) + }, + list); + }); +var _elm_lang$core$List$unzip = function (pairs) { + var step = F2( + function (_p18, _p17) { + var _p19 = _p18; + var _p20 = _p17; + return { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$List_ops['::'], _p19._0, _p20._0), + _1: A2(_elm_lang$core$List_ops['::'], _p19._1, _p20._1) + }; + }); + return A3( + _elm_lang$core$List$foldr, + step, + { + ctor: '_Tuple2', + _0: _elm_lang$core$Native_List.fromArray( + []), + _1: _elm_lang$core$Native_List.fromArray( + []) + }, + pairs); +}; +var _elm_lang$core$List$intersperse = F2( + function (sep, xs) { + var _p21 = xs; + if (_p21.ctor === '[]') { + return _elm_lang$core$Native_List.fromArray( + []); + } else { + var step = F2( + function (x, rest) { + return A2( + _elm_lang$core$List_ops['::'], + sep, + A2(_elm_lang$core$List_ops['::'], x, rest)); + }); + var spersed = A3( + _elm_lang$core$List$foldr, + step, + _elm_lang$core$Native_List.fromArray( + []), + _p21._1); + return A2(_elm_lang$core$List_ops['::'], _p21._0, spersed); + } + }); +var _elm_lang$core$List$takeReverse = F3( + function (n, list, taken) { + takeReverse: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return taken; + } else { + var _p22 = list; + if (_p22.ctor === '[]') { + return taken; + } else { + var _v23 = n - 1, + _v24 = _p22._1, + _v25 = A2(_elm_lang$core$List_ops['::'], _p22._0, taken); + n = _v23; + list = _v24; + taken = _v25; + continue takeReverse; + } + } + } + }); +var _elm_lang$core$List$takeTailRec = F2( + function (n, list) { + return _elm_lang$core$List$reverse( + A3( + _elm_lang$core$List$takeReverse, + n, + list, + _elm_lang$core$Native_List.fromArray( + []))); + }); +var _elm_lang$core$List$takeFast = F3( + function (ctr, n, list) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return _elm_lang$core$Native_List.fromArray( + []); + } else { + var _p23 = {ctor: '_Tuple2', _0: n, _1: list}; + _v26_5: + do { + _v26_1: + do { + if (_p23.ctor === '_Tuple2') { + if (_p23._1.ctor === '[]') { + return list; + } else { + if (_p23._1._1.ctor === '::') { + switch (_p23._0) { + case 1: + break _v26_1; + case 2: + return _elm_lang$core$Native_List.fromArray( + [_p23._1._0, _p23._1._1._0]); + case 3: + if (_p23._1._1._1.ctor === '::') { + return _elm_lang$core$Native_List.fromArray( + [_p23._1._0, _p23._1._1._0, _p23._1._1._1._0]); + } else { + break _v26_5; + } + default: + if ((_p23._1._1._1.ctor === '::') && (_p23._1._1._1._1.ctor === '::')) { + var _p28 = _p23._1._1._1._0; + var _p27 = _p23._1._1._0; + var _p26 = _p23._1._0; + var _p25 = _p23._1._1._1._1._0; + var _p24 = _p23._1._1._1._1._1; + return (_elm_lang$core$Native_Utils.cmp(ctr, 1000) > 0) ? A2( + _elm_lang$core$List_ops['::'], + _p26, + A2( + _elm_lang$core$List_ops['::'], + _p27, + A2( + _elm_lang$core$List_ops['::'], + _p28, + A2( + _elm_lang$core$List_ops['::'], + _p25, + A2(_elm_lang$core$List$takeTailRec, n - 4, _p24))))) : A2( + _elm_lang$core$List_ops['::'], + _p26, + A2( + _elm_lang$core$List_ops['::'], + _p27, + A2( + _elm_lang$core$List_ops['::'], + _p28, + A2( + _elm_lang$core$List_ops['::'], + _p25, + A3(_elm_lang$core$List$takeFast, ctr + 1, n - 4, _p24))))); + } else { + break _v26_5; + } + } + } else { + if (_p23._0 === 1) { + break _v26_1; + } else { + break _v26_5; + } + } + } + } else { + break _v26_5; + } + } while(false); + return _elm_lang$core$Native_List.fromArray( + [_p23._1._0]); + } while(false); + return list; + } + }); +var _elm_lang$core$List$take = F2( + function (n, list) { + return A3(_elm_lang$core$List$takeFast, 0, n, list); + }); +var _elm_lang$core$List$repeatHelp = F3( + function (result, n, value) { + repeatHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return result; + } else { + var _v27 = A2(_elm_lang$core$List_ops['::'], value, result), + _v28 = n - 1, + _v29 = value; + result = _v27; + n = _v28; + value = _v29; + continue repeatHelp; + } + } + }); +var _elm_lang$core$List$repeat = F2( + function (n, value) { + return A3( + _elm_lang$core$List$repeatHelp, + _elm_lang$core$Native_List.fromArray( + []), + n, + value); + }); +var _elm_lang$core$List$rangeHelp = F3( + function (lo, hi, list) { + rangeHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(lo, hi) < 1) { + var _v30 = lo, + _v31 = hi - 1, + _v32 = A2(_elm_lang$core$List_ops['::'], hi, list); + lo = _v30; + hi = _v31; + list = _v32; + continue rangeHelp; + } else { + return list; + } + } + }); +var _elm_lang$core$List$range = F2( + function (lo, hi) { + return A3( + _elm_lang$core$List$rangeHelp, + lo, + hi, + _elm_lang$core$Native_List.fromArray( + [])); + }); +var _elm_lang$core$List$indexedMap = F2( + function (f, xs) { + return A3( + _elm_lang$core$List$map2, + f, + A2( + _elm_lang$core$List$range, + 0, + _elm_lang$core$List$length(xs) - 1), + xs); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Maybe.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Maybe.elmi new file mode 100644 index 0000000..37e0ec8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Maybe.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Maybe.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Maybe.elmo new file mode 100644 index 0000000..0a0a7e4 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Maybe.elmo @@ -0,0 +1,72 @@ +var _elm_lang$core$Maybe$withDefault = F2( + function ($default, maybe) { + var _p0 = maybe; + if (_p0.ctor === 'Just') { + return _p0._0; + } else { + return $default; + } + }); +var _elm_lang$core$Maybe$Nothing = {ctor: 'Nothing'}; +var _elm_lang$core$Maybe$andThen = F2( + function (callback, maybeValue) { + var _p1 = maybeValue; + if (_p1.ctor === 'Just') { + return callback(_p1._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$Just = function (a) { + return {ctor: 'Just', _0: a}; +}; +var _elm_lang$core$Maybe$map = F2( + function (f, maybe) { + var _p2 = maybe; + if (_p2.ctor === 'Just') { + return _elm_lang$core$Maybe$Just( + f(_p2._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map2 = F3( + function (func, ma, mb) { + var _p3 = {ctor: '_Tuple2', _0: ma, _1: mb}; + if (((_p3.ctor === '_Tuple2') && (_p3._0.ctor === 'Just')) && (_p3._1.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A2(func, _p3._0._0, _p3._1._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map3 = F4( + function (func, ma, mb, mc) { + var _p4 = {ctor: '_Tuple3', _0: ma, _1: mb, _2: mc}; + if ((((_p4.ctor === '_Tuple3') && (_p4._0.ctor === 'Just')) && (_p4._1.ctor === 'Just')) && (_p4._2.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A3(func, _p4._0._0, _p4._1._0, _p4._2._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map4 = F5( + function (func, ma, mb, mc, md) { + var _p5 = {ctor: '_Tuple4', _0: ma, _1: mb, _2: mc, _3: md}; + if (((((_p5.ctor === '_Tuple4') && (_p5._0.ctor === 'Just')) && (_p5._1.ctor === 'Just')) && (_p5._2.ctor === 'Just')) && (_p5._3.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A4(func, _p5._0._0, _p5._1._0, _p5._2._0, _p5._3._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map5 = F6( + function (func, ma, mb, mc, md, me) { + var _p6 = {ctor: '_Tuple5', _0: ma, _1: mb, _2: mc, _3: md, _4: me}; + if ((((((_p6.ctor === '_Tuple5') && (_p6._0.ctor === 'Just')) && (_p6._1.ctor === 'Just')) && (_p6._2.ctor === 'Just')) && (_p6._3.ctor === 'Just')) && (_p6._4.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A5(func, _p6._0._0, _p6._1._0, _p6._2._0, _p6._3._0, _p6._4._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Cmd.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Cmd.elmi new file mode 100644 index 0000000..3eca359 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Cmd.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Cmd.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Cmd.elmo new file mode 100644 index 0000000..fd79292 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Cmd.elmo @@ -0,0 +1,15 @@ +var _elm_lang$core$Platform_Cmd$batch = _elm_lang$core$Native_Platform.batch; +var _elm_lang$core$Platform_Cmd$none = _elm_lang$core$Platform_Cmd$batch( + _elm_lang$core$Native_List.fromArray( + [])); +var _elm_lang$core$Platform_Cmd_ops = _elm_lang$core$Platform_Cmd_ops || {}; +_elm_lang$core$Platform_Cmd_ops['!'] = F2( + function (model, commands) { + return { + ctor: '_Tuple2', + _0: model, + _1: _elm_lang$core$Platform_Cmd$batch(commands) + }; + }); +var _elm_lang$core$Platform_Cmd$map = _elm_lang$core$Native_Platform.map; +var _elm_lang$core$Platform_Cmd$Cmd = {ctor: 'Cmd'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Sub.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Sub.elmi new file mode 100644 index 0000000..591f3a0 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Sub.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Sub.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Sub.elmo new file mode 100644 index 0000000..461c1a8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform-Sub.elmo @@ -0,0 +1,6 @@ +var _elm_lang$core$Platform_Sub$batch = _elm_lang$core$Native_Platform.batch; +var _elm_lang$core$Platform_Sub$none = _elm_lang$core$Platform_Sub$batch( + _elm_lang$core$Native_List.fromArray( + [])); +var _elm_lang$core$Platform_Sub$map = _elm_lang$core$Native_Platform.map; +var _elm_lang$core$Platform_Sub$Sub = {ctor: 'Sub'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform.elmi new file mode 100644 index 0000000..84e8909 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform.elmo new file mode 100644 index 0000000..58b681a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Platform.elmo @@ -0,0 +1,9 @@ +var _elm_lang$core$Platform$hack = _elm_lang$core$Native_Scheduler.succeed; +var _elm_lang$core$Platform$sendToSelf = _elm_lang$core$Native_Platform.sendToSelf; +var _elm_lang$core$Platform$sendToApp = _elm_lang$core$Native_Platform.sendToApp; +var _elm_lang$core$Platform$programWithFlags = _elm_lang$core$Native_Platform.programWithFlags; +var _elm_lang$core$Platform$program = _elm_lang$core$Native_Platform.program; +var _elm_lang$core$Platform$Program = {ctor: 'Program'}; +var _elm_lang$core$Platform$Task = {ctor: 'Task'}; +var _elm_lang$core$Platform$ProcessId = {ctor: 'ProcessId'}; +var _elm_lang$core$Platform$Router = {ctor: 'Router'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Process.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Process.elmi new file mode 100644 index 0000000..14e1fcb Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Process.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Process.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Process.elmo new file mode 100644 index 0000000..be9f100 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Process.elmo @@ -0,0 +1,3 @@ +var _elm_lang$core$Process$kill = _elm_lang$core$Native_Scheduler.kill; +var _elm_lang$core$Process$sleep = _elm_lang$core$Native_Scheduler.sleep; +var _elm_lang$core$Process$spawn = _elm_lang$core$Native_Scheduler.spawn; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Random.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Random.elmi new file mode 100644 index 0000000..441b12d Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Random.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Random.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Random.elmo new file mode 100644 index 0000000..f445342 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Random.elmo @@ -0,0 +1,379 @@ +var _elm_lang$core$Random$onSelfMsg = F3( + function (_p1, _p0, seed) { + return _elm_lang$core$Task$succeed(seed); + }); +var _elm_lang$core$Random$magicNum8 = 2147483562; +var _elm_lang$core$Random$range = function (_p2) { + return {ctor: '_Tuple2', _0: 0, _1: _elm_lang$core$Random$magicNum8}; +}; +var _elm_lang$core$Random$magicNum7 = 2147483399; +var _elm_lang$core$Random$magicNum6 = 2147483563; +var _elm_lang$core$Random$magicNum5 = 3791; +var _elm_lang$core$Random$magicNum4 = 40692; +var _elm_lang$core$Random$magicNum3 = 52774; +var _elm_lang$core$Random$magicNum2 = 12211; +var _elm_lang$core$Random$magicNum1 = 53668; +var _elm_lang$core$Random$magicNum0 = 40014; +var _elm_lang$core$Random$step = F2( + function (_p3, seed) { + var _p4 = _p3; + return _p4._0(seed); + }); +var _elm_lang$core$Random$onEffects = F3( + function (router, commands, seed) { + var _p5 = commands; + if (_p5.ctor === '[]') { + return _elm_lang$core$Task$succeed(seed); + } else { + var _p6 = A2(_elm_lang$core$Random$step, _p5._0._0, seed); + var value = _p6._0; + var newSeed = _p6._1; + return A2( + _elm_lang$core$Task$andThen, + function (_p7) { + return A3(_elm_lang$core$Random$onEffects, router, _p5._1, newSeed); + }, + A2(_elm_lang$core$Platform$sendToApp, router, value)); + } + }); +var _elm_lang$core$Random$listHelp = F4( + function (list, n, generate, seed) { + listHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 1) < 0) { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$List$reverse(list), + _1: seed + }; + } else { + var _p8 = generate(seed); + var value = _p8._0; + var newSeed = _p8._1; + var _v2 = A2(_elm_lang$core$List_ops['::'], value, list), + _v3 = n - 1, + _v4 = generate, + _v5 = newSeed; + list = _v2; + n = _v3; + generate = _v4; + seed = _v5; + continue listHelp; + } + } + }); +var _elm_lang$core$Random$minInt = -2147483648; +var _elm_lang$core$Random$maxInt = 2147483647; +var _elm_lang$core$Random$iLogBase = F2( + function (b, i) { + return (_elm_lang$core$Native_Utils.cmp(i, b) < 0) ? 1 : (1 + A2(_elm_lang$core$Random$iLogBase, b, (i / b) | 0)); + }); +var _elm_lang$core$Random$command = _elm_lang$core$Native_Platform.leaf('Random'); +var _elm_lang$core$Random$Generator = function (a) { + return {ctor: 'Generator', _0: a}; +}; +var _elm_lang$core$Random$list = F2( + function (n, _p9) { + var _p10 = _p9; + return _elm_lang$core$Random$Generator( + function (seed) { + return A4( + _elm_lang$core$Random$listHelp, + _elm_lang$core$Native_List.fromArray( + []), + n, + _p10._0, + seed); + }); + }); +var _elm_lang$core$Random$map = F2( + function (func, _p11) { + var _p12 = _p11; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p13 = _p12._0(seed0); + var a = _p13._0; + var seed1 = _p13._1; + return { + ctor: '_Tuple2', + _0: func(a), + _1: seed1 + }; + }); + }); +var _elm_lang$core$Random$map2 = F3( + function (func, _p15, _p14) { + var _p16 = _p15; + var _p17 = _p14; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p18 = _p16._0(seed0); + var a = _p18._0; + var seed1 = _p18._1; + var _p19 = _p17._0(seed1); + var b = _p19._0; + var seed2 = _p19._1; + return { + ctor: '_Tuple2', + _0: A2(func, a, b), + _1: seed2 + }; + }); + }); +var _elm_lang$core$Random$pair = F2( + function (genA, genB) { + return A3( + _elm_lang$core$Random$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + genA, + genB); + }); +var _elm_lang$core$Random$map3 = F4( + function (func, _p22, _p21, _p20) { + var _p23 = _p22; + var _p24 = _p21; + var _p25 = _p20; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p26 = _p23._0(seed0); + var a = _p26._0; + var seed1 = _p26._1; + var _p27 = _p24._0(seed1); + var b = _p27._0; + var seed2 = _p27._1; + var _p28 = _p25._0(seed2); + var c = _p28._0; + var seed3 = _p28._1; + return { + ctor: '_Tuple2', + _0: A3(func, a, b, c), + _1: seed3 + }; + }); + }); +var _elm_lang$core$Random$map4 = F5( + function (func, _p32, _p31, _p30, _p29) { + var _p33 = _p32; + var _p34 = _p31; + var _p35 = _p30; + var _p36 = _p29; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p37 = _p33._0(seed0); + var a = _p37._0; + var seed1 = _p37._1; + var _p38 = _p34._0(seed1); + var b = _p38._0; + var seed2 = _p38._1; + var _p39 = _p35._0(seed2); + var c = _p39._0; + var seed3 = _p39._1; + var _p40 = _p36._0(seed3); + var d = _p40._0; + var seed4 = _p40._1; + return { + ctor: '_Tuple2', + _0: A4(func, a, b, c, d), + _1: seed4 + }; + }); + }); +var _elm_lang$core$Random$map5 = F6( + function (func, _p45, _p44, _p43, _p42, _p41) { + var _p46 = _p45; + var _p47 = _p44; + var _p48 = _p43; + var _p49 = _p42; + var _p50 = _p41; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p51 = _p46._0(seed0); + var a = _p51._0; + var seed1 = _p51._1; + var _p52 = _p47._0(seed1); + var b = _p52._0; + var seed2 = _p52._1; + var _p53 = _p48._0(seed2); + var c = _p53._0; + var seed3 = _p53._1; + var _p54 = _p49._0(seed3); + var d = _p54._0; + var seed4 = _p54._1; + var _p55 = _p50._0(seed4); + var e = _p55._0; + var seed5 = _p55._1; + return { + ctor: '_Tuple2', + _0: A5(func, a, b, c, d, e), + _1: seed5 + }; + }); + }); +var _elm_lang$core$Random$andThen = F2( + function (callback, _p56) { + var _p57 = _p56; + return _elm_lang$core$Random$Generator( + function (seed) { + var _p58 = _p57._0(seed); + var result = _p58._0; + var newSeed = _p58._1; + var _p59 = callback(result); + var genB = _p59._0; + return genB(newSeed); + }); + }); +var _elm_lang$core$Random$State = F2( + function (a, b) { + return {ctor: 'State', _0: a, _1: b}; + }); +var _elm_lang$core$Random$initState = function (seed) { + var s = A2(_elm_lang$core$Basics$max, seed, 0 - seed); + var q = (s / (_elm_lang$core$Random$magicNum6 - 1)) | 0; + var s2 = A2(_elm_lang$core$Basics_ops['%'], q, _elm_lang$core$Random$magicNum7 - 1); + var s1 = A2(_elm_lang$core$Basics_ops['%'], s, _elm_lang$core$Random$magicNum6 - 1); + return A2(_elm_lang$core$Random$State, s1 + 1, s2 + 1); +}; +var _elm_lang$core$Random$next = function (_p60) { + var _p61 = _p60; + var _p63 = _p61._1; + var _p62 = _p61._0; + var k2 = (_p63 / _elm_lang$core$Random$magicNum3) | 0; + var rawState2 = (_elm_lang$core$Random$magicNum4 * (_p63 - (k2 * _elm_lang$core$Random$magicNum3))) - (k2 * _elm_lang$core$Random$magicNum5); + var newState2 = (_elm_lang$core$Native_Utils.cmp(rawState2, 0) < 0) ? (rawState2 + _elm_lang$core$Random$magicNum7) : rawState2; + var k1 = (_p62 / _elm_lang$core$Random$magicNum1) | 0; + var rawState1 = (_elm_lang$core$Random$magicNum0 * (_p62 - (k1 * _elm_lang$core$Random$magicNum1))) - (k1 * _elm_lang$core$Random$magicNum2); + var newState1 = (_elm_lang$core$Native_Utils.cmp(rawState1, 0) < 0) ? (rawState1 + _elm_lang$core$Random$magicNum6) : rawState1; + var z = newState1 - newState2; + var newZ = (_elm_lang$core$Native_Utils.cmp(z, 1) < 0) ? (z + _elm_lang$core$Random$magicNum8) : z; + return { + ctor: '_Tuple2', + _0: newZ, + _1: A2(_elm_lang$core$Random$State, newState1, newState2) + }; +}; +var _elm_lang$core$Random$split = function (_p64) { + var _p65 = _p64; + var _p68 = _p65._1; + var _p67 = _p65._0; + var _p66 = _elm_lang$core$Tuple$second( + _elm_lang$core$Random$next(_p65)); + var t1 = _p66._0; + var t2 = _p66._1; + var new_s2 = _elm_lang$core$Native_Utils.eq(_p68, 1) ? (_elm_lang$core$Random$magicNum7 - 1) : (_p68 - 1); + var new_s1 = _elm_lang$core$Native_Utils.eq(_p67, _elm_lang$core$Random$magicNum6 - 1) ? 1 : (_p67 + 1); + return { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$Random$State, new_s1, t2), + _1: A2(_elm_lang$core$Random$State, t1, new_s2) + }; +}; +var _elm_lang$core$Random$Seed = function (a) { + return {ctor: 'Seed', _0: a}; +}; +var _elm_lang$core$Random$int = F2( + function (a, b) { + return _elm_lang$core$Random$Generator( + function (_p69) { + var _p70 = _p69; + var _p75 = _p70._0; + var base = 2147483561; + var f = F3( + function (n, acc, state) { + f: + while (true) { + var _p71 = n; + if (_p71 === 0) { + return {ctor: '_Tuple2', _0: acc, _1: state}; + } else { + var _p72 = _p75.next(state); + var x = _p72._0; + var nextState = _p72._1; + var _v27 = n - 1, + _v28 = x + (acc * base), + _v29 = nextState; + n = _v27; + acc = _v28; + state = _v29; + continue f; + } + } + }); + var _p73 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; + var lo = _p73._0; + var hi = _p73._1; + var k = (hi - lo) + 1; + var n = A2(_elm_lang$core$Random$iLogBase, base, k); + var _p74 = A3(f, n, 1, _p75.state); + var v = _p74._0; + var nextState = _p74._1; + return { + ctor: '_Tuple2', + _0: lo + A2(_elm_lang$core$Basics_ops['%'], v, k), + _1: _elm_lang$core$Random$Seed( + _elm_lang$core$Native_Utils.update( + _p75, + {state: nextState})) + }; + }); + }); +var _elm_lang$core$Random$bool = A2( + _elm_lang$core$Random$map, + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })(1), + A2(_elm_lang$core$Random$int, 0, 1)); +var _elm_lang$core$Random$float = F2( + function (a, b) { + return _elm_lang$core$Random$Generator( + function (seed) { + var _p76 = A2( + _elm_lang$core$Random$step, + A2(_elm_lang$core$Random$int, _elm_lang$core$Random$minInt, _elm_lang$core$Random$maxInt), + seed); + var number = _p76._0; + var newSeed = _p76._1; + var negativeOneToOne = _elm_lang$core$Basics$toFloat(number) / _elm_lang$core$Basics$toFloat(_elm_lang$core$Random$maxInt - _elm_lang$core$Random$minInt); + var _p77 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; + var lo = _p77._0; + var hi = _p77._1; + var scaled = ((lo + hi) / 2) + ((hi - lo) * negativeOneToOne); + return {ctor: '_Tuple2', _0: scaled, _1: newSeed}; + }); + }); +var _elm_lang$core$Random$initialSeed = function (n) { + return _elm_lang$core$Random$Seed( + { + state: _elm_lang$core$Random$initState(n), + next: _elm_lang$core$Random$next, + split: _elm_lang$core$Random$split, + range: _elm_lang$core$Random$range + }); +}; +var _elm_lang$core$Random$init = A2( + _elm_lang$core$Task$andThen, + function (t) { + return _elm_lang$core$Task$succeed( + _elm_lang$core$Random$initialSeed( + _elm_lang$core$Basics$round(t))); + }, + _elm_lang$core$Time$now); +var _elm_lang$core$Random$Generate = function (a) { + return {ctor: 'Generate', _0: a}; +}; +var _elm_lang$core$Random$generate = F2( + function (tagger, generator) { + return _elm_lang$core$Random$command( + _elm_lang$core$Random$Generate( + A2(_elm_lang$core$Random$map, tagger, generator))); + }); +var _elm_lang$core$Random$cmdMap = F2( + function (func, _p78) { + var _p79 = _p78; + return _elm_lang$core$Random$Generate( + A2(_elm_lang$core$Random$map, func, _p79._0)); + }); +_elm_lang$core$Native_Platform.effectManagers['Random'] = {pkg: 'elm-lang/core', init: _elm_lang$core$Random$init, onEffects: _elm_lang$core$Random$onEffects, onSelfMsg: _elm_lang$core$Random$onSelfMsg, tag: 'cmd', cmdMap: _elm_lang$core$Random$cmdMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Regex.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Regex.elmi new file mode 100644 index 0000000..0b97777 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Regex.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Regex.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Regex.elmo new file mode 100644 index 0000000..55577ec --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Regex.elmo @@ -0,0 +1,16 @@ +var _elm_lang$core$Regex$split = _elm_lang$core$Native_Regex.split; +var _elm_lang$core$Regex$replace = _elm_lang$core$Native_Regex.replace; +var _elm_lang$core$Regex$find = _elm_lang$core$Native_Regex.find; +var _elm_lang$core$Regex$contains = _elm_lang$core$Native_Regex.contains; +var _elm_lang$core$Regex$caseInsensitive = _elm_lang$core$Native_Regex.caseInsensitive; +var _elm_lang$core$Regex$regex = _elm_lang$core$Native_Regex.regex; +var _elm_lang$core$Regex$escape = _elm_lang$core$Native_Regex.escape; +var _elm_lang$core$Regex$Match = F4( + function (a, b, c, d) { + return {match: a, submatches: b, index: c, number: d}; + }); +var _elm_lang$core$Regex$Regex = {ctor: 'Regex'}; +var _elm_lang$core$Regex$AtMost = function (a) { + return {ctor: 'AtMost', _0: a}; +}; +var _elm_lang$core$Regex$All = {ctor: 'All'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Result.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Result.elmi new file mode 100644 index 0000000..4febb04 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Result.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Result.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Result.elmo new file mode 100644 index 0000000..a9b91ff --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Result.elmo @@ -0,0 +1,141 @@ +var _elm_lang$core$Result$toMaybe = function (result) { + var _p0 = result; + if (_p0.ctor === 'Ok') { + return _elm_lang$core$Maybe$Just(_p0._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$Result$withDefault = F2( + function (def, result) { + var _p1 = result; + if (_p1.ctor === 'Ok') { + return _p1._0; + } else { + return def; + } + }); +var _elm_lang$core$Result$Err = function (a) { + return {ctor: 'Err', _0: a}; +}; +var _elm_lang$core$Result$andThen = F2( + function (callback, result) { + var _p2 = result; + if (_p2.ctor === 'Ok') { + return callback(_p2._0); + } else { + return _elm_lang$core$Result$Err(_p2._0); + } + }); +var _elm_lang$core$Result$Ok = function (a) { + return {ctor: 'Ok', _0: a}; +}; +var _elm_lang$core$Result$map = F2( + function (func, ra) { + var _p3 = ra; + if (_p3.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + func(_p3._0)); + } else { + return _elm_lang$core$Result$Err(_p3._0); + } + }); +var _elm_lang$core$Result$map2 = F3( + function (func, ra, rb) { + var _p4 = {ctor: '_Tuple2', _0: ra, _1: rb}; + if (_p4._0.ctor === 'Ok') { + if (_p4._1.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A2(func, _p4._0._0, _p4._1._0)); + } else { + return _elm_lang$core$Result$Err(_p4._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p4._0._0); + } + }); +var _elm_lang$core$Result$map3 = F4( + function (func, ra, rb, rc) { + var _p5 = {ctor: '_Tuple3', _0: ra, _1: rb, _2: rc}; + if (_p5._0.ctor === 'Ok') { + if (_p5._1.ctor === 'Ok') { + if (_p5._2.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A3(func, _p5._0._0, _p5._1._0, _p5._2._0)); + } else { + return _elm_lang$core$Result$Err(_p5._2._0); + } + } else { + return _elm_lang$core$Result$Err(_p5._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p5._0._0); + } + }); +var _elm_lang$core$Result$map4 = F5( + function (func, ra, rb, rc, rd) { + var _p6 = {ctor: '_Tuple4', _0: ra, _1: rb, _2: rc, _3: rd}; + if (_p6._0.ctor === 'Ok') { + if (_p6._1.ctor === 'Ok') { + if (_p6._2.ctor === 'Ok') { + if (_p6._3.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A4(func, _p6._0._0, _p6._1._0, _p6._2._0, _p6._3._0)); + } else { + return _elm_lang$core$Result$Err(_p6._3._0); + } + } else { + return _elm_lang$core$Result$Err(_p6._2._0); + } + } else { + return _elm_lang$core$Result$Err(_p6._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p6._0._0); + } + }); +var _elm_lang$core$Result$map5 = F6( + function (func, ra, rb, rc, rd, re) { + var _p7 = {ctor: '_Tuple5', _0: ra, _1: rb, _2: rc, _3: rd, _4: re}; + if (_p7._0.ctor === 'Ok') { + if (_p7._1.ctor === 'Ok') { + if (_p7._2.ctor === 'Ok') { + if (_p7._3.ctor === 'Ok') { + if (_p7._4.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A5(func, _p7._0._0, _p7._1._0, _p7._2._0, _p7._3._0, _p7._4._0)); + } else { + return _elm_lang$core$Result$Err(_p7._4._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._3._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._2._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._0._0); + } + }); +var _elm_lang$core$Result$mapError = F2( + function (f, result) { + var _p8 = result; + if (_p8.ctor === 'Ok') { + return _elm_lang$core$Result$Ok(_p8._0); + } else { + return _elm_lang$core$Result$Err( + f(_p8._0)); + } + }); +var _elm_lang$core$Result$fromMaybe = F2( + function (err, maybe) { + var _p9 = maybe; + if (_p9.ctor === 'Just') { + return _elm_lang$core$Result$Ok(_p9._0); + } else { + return _elm_lang$core$Result$Err(err); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Set.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Set.elmi new file mode 100644 index 0000000..6630b98 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Set.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Set.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Set.elmo new file mode 100644 index 0000000..7fcd718 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Set.elmo @@ -0,0 +1,130 @@ +var _elm_lang$core$Set$foldr = F3( + function (f, b, _p0) { + var _p1 = _p0; + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (k, _p2, b) { + return A2(f, k, b); + }), + b, + _p1._0); + }); +var _elm_lang$core$Set$foldl = F3( + function (f, b, _p3) { + var _p4 = _p3; + return A3( + _elm_lang$core$Dict$foldl, + F3( + function (k, _p5, b) { + return A2(f, k, b); + }), + b, + _p4._0); + }); +var _elm_lang$core$Set$toList = function (_p6) { + var _p7 = _p6; + return _elm_lang$core$Dict$keys(_p7._0); +}; +var _elm_lang$core$Set$size = function (_p8) { + var _p9 = _p8; + return _elm_lang$core$Dict$size(_p9._0); +}; +var _elm_lang$core$Set$member = F2( + function (k, _p10) { + var _p11 = _p10; + return A2(_elm_lang$core$Dict$member, k, _p11._0); + }); +var _elm_lang$core$Set$isEmpty = function (_p12) { + var _p13 = _p12; + return _elm_lang$core$Dict$isEmpty(_p13._0); +}; +var _elm_lang$core$Set$Set_elm_builtin = function (a) { + return {ctor: 'Set_elm_builtin', _0: a}; +}; +var _elm_lang$core$Set$empty = _elm_lang$core$Set$Set_elm_builtin(_elm_lang$core$Dict$empty); +var _elm_lang$core$Set$singleton = function (k) { + return _elm_lang$core$Set$Set_elm_builtin( + A2( + _elm_lang$core$Dict$singleton, + k, + {ctor: '_Tuple0'})); +}; +var _elm_lang$core$Set$insert = F2( + function (k, _p14) { + var _p15 = _p14; + return _elm_lang$core$Set$Set_elm_builtin( + A3( + _elm_lang$core$Dict$insert, + k, + {ctor: '_Tuple0'}, + _p15._0)); + }); +var _elm_lang$core$Set$fromList = function (xs) { + return A3(_elm_lang$core$List$foldl, _elm_lang$core$Set$insert, _elm_lang$core$Set$empty, xs); +}; +var _elm_lang$core$Set$map = F2( + function (f, s) { + return _elm_lang$core$Set$fromList( + A2( + _elm_lang$core$List$map, + f, + _elm_lang$core$Set$toList(s))); + }); +var _elm_lang$core$Set$remove = F2( + function (k, _p16) { + var _p17 = _p16; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$remove, k, _p17._0)); + }); +var _elm_lang$core$Set$union = F2( + function (_p19, _p18) { + var _p20 = _p19; + var _p21 = _p18; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$union, _p20._0, _p21._0)); + }); +var _elm_lang$core$Set$intersect = F2( + function (_p23, _p22) { + var _p24 = _p23; + var _p25 = _p22; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$intersect, _p24._0, _p25._0)); + }); +var _elm_lang$core$Set$diff = F2( + function (_p27, _p26) { + var _p28 = _p27; + var _p29 = _p26; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$diff, _p28._0, _p29._0)); + }); +var _elm_lang$core$Set$filter = F2( + function (p, _p30) { + var _p31 = _p30; + return _elm_lang$core$Set$Set_elm_builtin( + A2( + _elm_lang$core$Dict$filter, + F2( + function (k, _p32) { + return p(k); + }), + _p31._0)); + }); +var _elm_lang$core$Set$partition = F2( + function (p, _p33) { + var _p34 = _p33; + var _p35 = A2( + _elm_lang$core$Dict$partition, + F2( + function (k, _p36) { + return p(k); + }), + _p34._0); + var p1 = _p35._0; + var p2 = _p35._1; + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Set$Set_elm_builtin(p1), + _1: _elm_lang$core$Set$Set_elm_builtin(p2) + }; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/String.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/String.elmi new file mode 100644 index 0000000..e8478c0 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/String.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/String.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/String.elmo new file mode 100644 index 0000000..07b139f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/String.elmo @@ -0,0 +1,43 @@ +var _elm_lang$core$String$fromList = _elm_lang$core$Native_String.fromList; +var _elm_lang$core$String$toList = _elm_lang$core$Native_String.toList; +var _elm_lang$core$String$toFloat = _elm_lang$core$Native_String.toFloat; +var _elm_lang$core$String$toInt = _elm_lang$core$Native_String.toInt; +var _elm_lang$core$String$indices = _elm_lang$core$Native_String.indexes; +var _elm_lang$core$String$indexes = _elm_lang$core$Native_String.indexes; +var _elm_lang$core$String$endsWith = _elm_lang$core$Native_String.endsWith; +var _elm_lang$core$String$startsWith = _elm_lang$core$Native_String.startsWith; +var _elm_lang$core$String$contains = _elm_lang$core$Native_String.contains; +var _elm_lang$core$String$all = _elm_lang$core$Native_String.all; +var _elm_lang$core$String$any = _elm_lang$core$Native_String.any; +var _elm_lang$core$String$toLower = _elm_lang$core$Native_String.toLower; +var _elm_lang$core$String$toUpper = _elm_lang$core$Native_String.toUpper; +var _elm_lang$core$String$lines = _elm_lang$core$Native_String.lines; +var _elm_lang$core$String$words = _elm_lang$core$Native_String.words; +var _elm_lang$core$String$trimRight = _elm_lang$core$Native_String.trimRight; +var _elm_lang$core$String$trimLeft = _elm_lang$core$Native_String.trimLeft; +var _elm_lang$core$String$trim = _elm_lang$core$Native_String.trim; +var _elm_lang$core$String$padRight = _elm_lang$core$Native_String.padRight; +var _elm_lang$core$String$padLeft = _elm_lang$core$Native_String.padLeft; +var _elm_lang$core$String$pad = _elm_lang$core$Native_String.pad; +var _elm_lang$core$String$dropRight = _elm_lang$core$Native_String.dropRight; +var _elm_lang$core$String$dropLeft = _elm_lang$core$Native_String.dropLeft; +var _elm_lang$core$String$right = _elm_lang$core$Native_String.right; +var _elm_lang$core$String$left = _elm_lang$core$Native_String.left; +var _elm_lang$core$String$slice = _elm_lang$core$Native_String.slice; +var _elm_lang$core$String$repeat = _elm_lang$core$Native_String.repeat; +var _elm_lang$core$String$join = _elm_lang$core$Native_String.join; +var _elm_lang$core$String$split = _elm_lang$core$Native_String.split; +var _elm_lang$core$String$foldr = _elm_lang$core$Native_String.foldr; +var _elm_lang$core$String$foldl = _elm_lang$core$Native_String.foldl; +var _elm_lang$core$String$reverse = _elm_lang$core$Native_String.reverse; +var _elm_lang$core$String$filter = _elm_lang$core$Native_String.filter; +var _elm_lang$core$String$map = _elm_lang$core$Native_String.map; +var _elm_lang$core$String$length = _elm_lang$core$Native_String.length; +var _elm_lang$core$String$concat = _elm_lang$core$Native_String.concat; +var _elm_lang$core$String$append = _elm_lang$core$Native_String.append; +var _elm_lang$core$String$uncons = _elm_lang$core$Native_String.uncons; +var _elm_lang$core$String$cons = _elm_lang$core$Native_String.cons; +var _elm_lang$core$String$fromChar = function ($char) { + return A2(_elm_lang$core$String$cons, $char, ''); +}; +var _elm_lang$core$String$isEmpty = _elm_lang$core$Native_String.isEmpty; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Task.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Task.elmi new file mode 100644 index 0000000..26a2d2e Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Task.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Task.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Task.elmo new file mode 100644 index 0000000..105296c --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Task.elmo @@ -0,0 +1,197 @@ +var _elm_lang$core$Task$onError = _elm_lang$core$Native_Scheduler.onError; +var _elm_lang$core$Task$andThen = _elm_lang$core$Native_Scheduler.andThen; +var _elm_lang$core$Task$spawnCmd = F2( + function (router, _p0) { + var _p1 = _p0; + return _elm_lang$core$Native_Scheduler.spawn( + A2( + _elm_lang$core$Task$andThen, + _elm_lang$core$Platform$sendToApp(router), + _p1._0)); + }); +var _elm_lang$core$Task$fail = _elm_lang$core$Native_Scheduler.fail; +var _elm_lang$core$Task$mapError = F2( + function (convert, task) { + return A2( + _elm_lang$core$Task$onError, + function (_p2) { + return _elm_lang$core$Task$fail( + convert(_p2)); + }, + task); + }); +var _elm_lang$core$Task$succeed = _elm_lang$core$Native_Scheduler.succeed; +var _elm_lang$core$Task$map = F2( + function (func, taskA) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return _elm_lang$core$Task$succeed( + func(a)); + }, + taskA); + }); +var _elm_lang$core$Task$map2 = F3( + function (func, taskA, taskB) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return _elm_lang$core$Task$succeed( + A2(func, a, b)); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$map3 = F4( + function (func, taskA, taskB, taskC) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return A2( + _elm_lang$core$Task$andThen, + function (c) { + return _elm_lang$core$Task$succeed( + A3(func, a, b, c)); + }, + taskC); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$map4 = F5( + function (func, taskA, taskB, taskC, taskD) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return A2( + _elm_lang$core$Task$andThen, + function (c) { + return A2( + _elm_lang$core$Task$andThen, + function (d) { + return _elm_lang$core$Task$succeed( + A4(func, a, b, c, d)); + }, + taskD); + }, + taskC); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$map5 = F6( + function (func, taskA, taskB, taskC, taskD, taskE) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return A2( + _elm_lang$core$Task$andThen, + function (c) { + return A2( + _elm_lang$core$Task$andThen, + function (d) { + return A2( + _elm_lang$core$Task$andThen, + function (e) { + return _elm_lang$core$Task$succeed( + A5(func, a, b, c, d, e)); + }, + taskE); + }, + taskD); + }, + taskC); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$sequence = function (tasks) { + var _p3 = tasks; + if (_p3.ctor === '[]') { + return _elm_lang$core$Task$succeed( + _elm_lang$core$Native_List.fromArray( + [])); + } else { + return A3( + _elm_lang$core$Task$map2, + F2( + function (x, y) { + return A2(_elm_lang$core$List_ops['::'], x, y); + }), + _p3._0, + _elm_lang$core$Task$sequence(_p3._1)); + } +}; +var _elm_lang$core$Task$onEffects = F3( + function (router, commands, state) { + return A2( + _elm_lang$core$Task$map, + function (_p4) { + return {ctor: '_Tuple0'}; + }, + _elm_lang$core$Task$sequence( + A2( + _elm_lang$core$List$map, + _elm_lang$core$Task$spawnCmd(router), + commands))); + }); +var _elm_lang$core$Task$init = _elm_lang$core$Task$succeed( + {ctor: '_Tuple0'}); +var _elm_lang$core$Task$onSelfMsg = F3( + function (_p7, _p6, _p5) { + return _elm_lang$core$Task$succeed( + {ctor: '_Tuple0'}); + }); +var _elm_lang$core$Task$command = _elm_lang$core$Native_Platform.leaf('Task'); +var _elm_lang$core$Task$Perform = function (a) { + return {ctor: 'Perform', _0: a}; +}; +var _elm_lang$core$Task$perform = F2( + function (toMessage, task) { + return _elm_lang$core$Task$command( + _elm_lang$core$Task$Perform( + A2(_elm_lang$core$Task$map, toMessage, task))); + }); +var _elm_lang$core$Task$attempt = F2( + function (resultToMessage, task) { + return _elm_lang$core$Task$command( + _elm_lang$core$Task$Perform( + A2( + _elm_lang$core$Task$onError, + function (_p8) { + return _elm_lang$core$Task$succeed( + resultToMessage( + _elm_lang$core$Result$Err(_p8))); + }, + A2( + _elm_lang$core$Task$andThen, + function (_p9) { + return _elm_lang$core$Task$succeed( + resultToMessage( + _elm_lang$core$Result$Ok(_p9))); + }, + task)))); + }); +var _elm_lang$core$Task$cmdMap = F2( + function (tagger, _p10) { + var _p11 = _p10; + return _elm_lang$core$Task$Perform( + A2(_elm_lang$core$Task$map, tagger, _p11._0)); + }); +_elm_lang$core$Native_Platform.effectManagers['Task'] = {pkg: 'elm-lang/core', init: _elm_lang$core$Task$init, onEffects: _elm_lang$core$Task$onEffects, onSelfMsg: _elm_lang$core$Task$onSelfMsg, tag: 'cmd', cmdMap: _elm_lang$core$Task$cmdMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Time.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Time.elmi new file mode 100644 index 0000000..7867a6a Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Time.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Time.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Time.elmo new file mode 100644 index 0000000..35ceb20 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Time.elmo @@ -0,0 +1,185 @@ +var _elm_lang$core$Time$setInterval = _elm_lang$core$Native_Time.setInterval_; +var _elm_lang$core$Time$spawnHelp = F3( + function (router, intervals, processes) { + var _p0 = intervals; + if (_p0.ctor === '[]') { + return _elm_lang$core$Task$succeed(processes); + } else { + var _p1 = _p0._0; + var spawnRest = function (id) { + return A3( + _elm_lang$core$Time$spawnHelp, + router, + _p0._1, + A3(_elm_lang$core$Dict$insert, _p1, id, processes)); + }; + var spawnTimer = _elm_lang$core$Native_Scheduler.spawn( + A2( + _elm_lang$core$Time$setInterval, + _p1, + A2(_elm_lang$core$Platform$sendToSelf, router, _p1))); + return A2(_elm_lang$core$Task$andThen, spawnRest, spawnTimer); + } + }); +var _elm_lang$core$Time$addMySub = F2( + function (_p2, state) { + var _p3 = _p2; + var _p6 = _p3._1; + var _p5 = _p3._0; + var _p4 = A2(_elm_lang$core$Dict$get, _p5, state); + if (_p4.ctor === 'Nothing') { + return A3( + _elm_lang$core$Dict$insert, + _p5, + _elm_lang$core$Native_List.fromArray( + [_p6]), + state); + } else { + return A3( + _elm_lang$core$Dict$insert, + _p5, + A2(_elm_lang$core$List_ops['::'], _p6, _p4._0), + state); + } + }); +var _elm_lang$core$Time$inMilliseconds = function (t) { + return t; +}; +var _elm_lang$core$Time$millisecond = 1; +var _elm_lang$core$Time$second = 1000 * _elm_lang$core$Time$millisecond; +var _elm_lang$core$Time$minute = 60 * _elm_lang$core$Time$second; +var _elm_lang$core$Time$hour = 60 * _elm_lang$core$Time$minute; +var _elm_lang$core$Time$inHours = function (t) { + return t / _elm_lang$core$Time$hour; +}; +var _elm_lang$core$Time$inMinutes = function (t) { + return t / _elm_lang$core$Time$minute; +}; +var _elm_lang$core$Time$inSeconds = function (t) { + return t / _elm_lang$core$Time$second; +}; +var _elm_lang$core$Time$now = _elm_lang$core$Native_Time.now; +var _elm_lang$core$Time$onSelfMsg = F3( + function (router, interval, state) { + var _p7 = A2(_elm_lang$core$Dict$get, interval, state.taggers); + if (_p7.ctor === 'Nothing') { + return _elm_lang$core$Task$succeed(state); + } else { + var tellTaggers = function (time) { + return _elm_lang$core$Task$sequence( + A2( + _elm_lang$core$List$map, + function (tagger) { + return A2( + _elm_lang$core$Platform$sendToApp, + router, + tagger(time)); + }, + _p7._0)); + }; + return A2( + _elm_lang$core$Task$andThen, + function (_p8) { + return _elm_lang$core$Task$succeed(state); + }, + A2(_elm_lang$core$Task$andThen, tellTaggers, _elm_lang$core$Time$now)); + } + }); +var _elm_lang$core$Time$subscription = _elm_lang$core$Native_Platform.leaf('Time'); +var _elm_lang$core$Time$State = F2( + function (a, b) { + return {taggers: a, processes: b}; + }); +var _elm_lang$core$Time$init = _elm_lang$core$Task$succeed( + A2(_elm_lang$core$Time$State, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty)); +var _elm_lang$core$Time$onEffects = F3( + function (router, subs, _p9) { + var _p10 = _p9; + var rightStep = F3( + function (_p12, id, _p11) { + var _p13 = _p11; + return { + ctor: '_Tuple3', + _0: _p13._0, + _1: _p13._1, + _2: A2( + _elm_lang$core$Task$andThen, + function (_p14) { + return _p13._2; + }, + _elm_lang$core$Native_Scheduler.kill(id)) + }; + }); + var bothStep = F4( + function (interval, taggers, id, _p15) { + var _p16 = _p15; + return { + ctor: '_Tuple3', + _0: _p16._0, + _1: A3(_elm_lang$core$Dict$insert, interval, id, _p16._1), + _2: _p16._2 + }; + }); + var leftStep = F3( + function (interval, taggers, _p17) { + var _p18 = _p17; + return { + ctor: '_Tuple3', + _0: A2(_elm_lang$core$List_ops['::'], interval, _p18._0), + _1: _p18._1, + _2: _p18._2 + }; + }); + var newTaggers = A3(_elm_lang$core$List$foldl, _elm_lang$core$Time$addMySub, _elm_lang$core$Dict$empty, subs); + var _p19 = A6( + _elm_lang$core$Dict$merge, + leftStep, + bothStep, + rightStep, + newTaggers, + _p10.processes, + { + ctor: '_Tuple3', + _0: _elm_lang$core$Native_List.fromArray( + []), + _1: _elm_lang$core$Dict$empty, + _2: _elm_lang$core$Task$succeed( + {ctor: '_Tuple0'}) + }); + var spawnList = _p19._0; + var existingDict = _p19._1; + var killTask = _p19._2; + return A2( + _elm_lang$core$Task$andThen, + function (newProcesses) { + return _elm_lang$core$Task$succeed( + A2(_elm_lang$core$Time$State, newTaggers, newProcesses)); + }, + A2( + _elm_lang$core$Task$andThen, + function (_p20) { + return A3(_elm_lang$core$Time$spawnHelp, router, spawnList, existingDict); + }, + killTask)); + }); +var _elm_lang$core$Time$Every = F2( + function (a, b) { + return {ctor: 'Every', _0: a, _1: b}; + }); +var _elm_lang$core$Time$every = F2( + function (interval, tagger) { + return _elm_lang$core$Time$subscription( + A2(_elm_lang$core$Time$Every, interval, tagger)); + }); +var _elm_lang$core$Time$subMap = F2( + function (f, _p21) { + var _p22 = _p21; + return A2( + _elm_lang$core$Time$Every, + _p22._0, + function (_p23) { + return f( + _p22._1(_p23)); + }); + }); +_elm_lang$core$Native_Platform.effectManagers['Time'] = {pkg: 'elm-lang/core', init: _elm_lang$core$Time$init, onEffects: _elm_lang$core$Time$onEffects, onSelfMsg: _elm_lang$core$Time$onSelfMsg, tag: 'sub', subMap: _elm_lang$core$Time$subMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Tuple.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Tuple.elmi new file mode 100644 index 0000000..ff1e89e Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Tuple.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Tuple.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Tuple.elmo new file mode 100644 index 0000000..0b5bc70 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/Tuple.elmo @@ -0,0 +1,26 @@ +var _elm_lang$core$Tuple$mapSecond = F2( + function (func, _p0) { + var _p1 = _p0; + return { + ctor: '_Tuple2', + _0: _p1._0, + _1: func(_p1._1) + }; + }); +var _elm_lang$core$Tuple$mapFirst = F2( + function (func, _p2) { + var _p3 = _p2; + return { + ctor: '_Tuple2', + _0: func(_p3._0), + _1: _p3._1 + }; + }); +var _elm_lang$core$Tuple$second = function (_p4) { + var _p5 = _p4; + return _p5._1; +}; +var _elm_lang$core$Tuple$first = function (_p6) { + var _p7 = _p6; + return _p7._0; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/graph.dat new file mode 100644 index 0000000..697f901 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/core/5.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-LowLevel.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-LowLevel.elmi new file mode 100644 index 0000000..589b9fd Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-LowLevel.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-LowLevel.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-LowLevel.elmo new file mode 100644 index 0000000..8d3b00f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-LowLevel.elmo @@ -0,0 +1,2 @@ +var _elm_lang$dom$Dom_LowLevel$onWindow = _elm_lang$dom$Native_Dom.onWindow; +var _elm_lang$dom$Dom_LowLevel$onDocument = _elm_lang$dom$Native_Dom.onDocument; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Scroll.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Scroll.elmi new file mode 100644 index 0000000..cc14b25 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Scroll.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Scroll.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Scroll.elmo new file mode 100644 index 0000000..fb0b404 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Scroll.elmo @@ -0,0 +1,12 @@ +var _elm_lang$dom$Dom_Scroll$toX = _elm_lang$dom$Native_Dom.setScrollLeft; +var _elm_lang$dom$Dom_Scroll$x = _elm_lang$dom$Native_Dom.getScrollLeft; +var _elm_lang$dom$Dom_Scroll$toRight = _elm_lang$dom$Native_Dom.toRight; +var _elm_lang$dom$Dom_Scroll$toLeft = function (id) { + return A2(_elm_lang$dom$Dom_Scroll$toX, id, 0); +}; +var _elm_lang$dom$Dom_Scroll$toY = _elm_lang$dom$Native_Dom.setScrollTop; +var _elm_lang$dom$Dom_Scroll$y = _elm_lang$dom$Native_Dom.getScrollTop; +var _elm_lang$dom$Dom_Scroll$toBottom = _elm_lang$dom$Native_Dom.toBottom; +var _elm_lang$dom$Dom_Scroll$toTop = function (id) { + return A2(_elm_lang$dom$Dom_Scroll$toY, id, 0); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Size.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Size.elmi new file mode 100644 index 0000000..b2e3001 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Size.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Size.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Size.elmo new file mode 100644 index 0000000..a11fa14 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom-Size.elmo @@ -0,0 +1,6 @@ +var _elm_lang$dom$Dom_Size$width = _elm_lang$dom$Native_Dom.width; +var _elm_lang$dom$Dom_Size$height = _elm_lang$dom$Native_Dom.height; +var _elm_lang$dom$Dom_Size$VisibleContentWithBordersAndMargins = {ctor: 'VisibleContentWithBordersAndMargins'}; +var _elm_lang$dom$Dom_Size$VisibleContentWithBorders = {ctor: 'VisibleContentWithBorders'}; +var _elm_lang$dom$Dom_Size$VisibleContent = {ctor: 'VisibleContent'}; +var _elm_lang$dom$Dom_Size$Content = {ctor: 'Content'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom.elmi new file mode 100644 index 0000000..666d41c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom.elmo new file mode 100644 index 0000000..00d6a73 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/Dom.elmo @@ -0,0 +1,5 @@ +var _elm_lang$dom$Dom$blur = _elm_lang$dom$Native_Dom.blur; +var _elm_lang$dom$Dom$focus = _elm_lang$dom$Native_Dom.focus; +var _elm_lang$dom$Dom$NotFound = function (a) { + return {ctor: 'NotFound', _0: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/graph.dat new file mode 100644 index 0000000..4638843 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/dom/1.1.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/html/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/html/2.0.0/graph.dat new file mode 100644 index 0000000..282d793 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/html/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Internal.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Internal.elmi new file mode 100644 index 0000000..3e42c85 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Internal.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Internal.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Internal.elmo new file mode 100644 index 0000000..73e3571 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Internal.elmo @@ -0,0 +1,26 @@ +var _elm_lang$http$Http_Internal$map = F2( + function (func, request) { + return _elm_lang$core$Native_Utils.update( + request, + { + expect: A2(_elm_lang$http$Native_Http.mapExpect, func, request.expect) + }); + }); +var _elm_lang$http$Http_Internal$RawRequest = F7( + function (a, b, c, d, e, f, g) { + return {method: a, headers: b, url: c, body: d, expect: e, timeout: f, withCredentials: g}; + }); +var _elm_lang$http$Http_Internal$Request = function (a) { + return {ctor: 'Request', _0: a}; +}; +var _elm_lang$http$Http_Internal$Expect = {ctor: 'Expect'}; +var _elm_lang$http$Http_Internal$FormDataBody = {ctor: 'FormDataBody'}; +var _elm_lang$http$Http_Internal$StringBody = F2( + function (a, b) { + return {ctor: 'StringBody', _0: a, _1: b}; + }); +var _elm_lang$http$Http_Internal$EmptyBody = {ctor: 'EmptyBody'}; +var _elm_lang$http$Http_Internal$Header = F2( + function (a, b) { + return {ctor: 'Header', _0: a, _1: b}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Progress.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Progress.elmi new file mode 100644 index 0000000..a4a819a Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Progress.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Progress.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Progress.elmo new file mode 100644 index 0000000..826e7e7 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http-Progress.elmo @@ -0,0 +1,195 @@ +var _elm_lang$http$Http_Progress$onSelfMsg = F3( + function (router, _p0, state) { + return _elm_lang$core$Task$succeed(state); + }); +var _elm_lang$http$Http_Progress$addSub = F2( + function (_p1, subDict) { + var _p2 = _p1; + var _p3 = _p2._1; + var request = _p3.request; + var uid = A2( + _elm_lang$core$Basics_ops['++'], + _p2._0, + A2(_elm_lang$core$Basics_ops['++'], request.method, request.url)); + return A3(_elm_lang$core$Dict$insert, uid, _p3, subDict); + }); +var _elm_lang$http$Http_Progress$collectSubs = function (subs) { + return A3(_elm_lang$core$List$foldl, _elm_lang$http$Http_Progress$addSub, _elm_lang$core$Dict$empty, subs); +}; +var _elm_lang$http$Http_Progress$toTask = F2( + function (router, _p4) { + var _p5 = _p4; + return A2( + _elm_lang$core$Task$onError, + function (_p6) { + return A2( + _elm_lang$core$Platform$sendToApp, + router, + _p5.toError(_p6)); + }, + A2( + _elm_lang$core$Task$andThen, + _elm_lang$core$Platform$sendToApp(router), + A2( + _elm_lang$http$Native_Http.toTask, + _p5.request, + _elm_lang$core$Maybe$Just( + function (_p7) { + return A2( + _elm_lang$core$Platform$sendToApp, + router, + _p5.toProgress(_p7)); + })))); + }); +var _elm_lang$http$Http_Progress$spawnRequests = F3( + function (router, trackedRequests, state) { + var _p8 = trackedRequests; + if (_p8.ctor === '[]') { + return _elm_lang$core$Task$succeed(state); + } else { + return A2( + _elm_lang$core$Task$andThen, + function (process) { + return A3( + _elm_lang$http$Http_Progress$spawnRequests, + router, + _p8._1, + A3(_elm_lang$core$Dict$insert, _p8._0._0, process, state)); + }, + _elm_lang$core$Process$spawn( + A2(_elm_lang$http$Http_Progress$toTask, router, _p8._0._1))); + } + }); +var _elm_lang$http$Http_Progress$onEffects = F3( + function (router, subs, state) { + var rightStep = F3( + function (id, trackedRequest, _p9) { + var _p10 = _p9; + return { + ctor: '_Tuple3', + _0: _p10._0, + _1: _p10._1, + _2: A2( + _elm_lang$core$List_ops['::'], + {ctor: '_Tuple2', _0: id, _1: trackedRequest}, + _p10._2) + }; + }); + var bothStep = F4( + function (id, process, _p12, _p11) { + var _p13 = _p11; + return { + ctor: '_Tuple3', + _0: _p13._0, + _1: A3(_elm_lang$core$Dict$insert, id, process, _p13._1), + _2: _p13._2 + }; + }); + var leftStep = F3( + function (id, process, _p14) { + var _p15 = _p14; + return { + ctor: '_Tuple3', + _0: A2( + _elm_lang$core$List_ops['::'], + _elm_lang$core$Process$kill(process), + _p15._0), + _1: _p15._1, + _2: _p15._2 + }; + }); + var subDict = _elm_lang$http$Http_Progress$collectSubs(subs); + var _p16 = A6( + _elm_lang$core$Dict$merge, + leftStep, + bothStep, + rightStep, + state, + subDict, + { + ctor: '_Tuple3', + _0: _elm_lang$core$Native_List.fromArray( + []), + _1: _elm_lang$core$Dict$empty, + _2: _elm_lang$core$Native_List.fromArray( + []) + }); + var dead = _p16._0; + var ongoing = _p16._1; + var $new = _p16._2; + return A2( + _elm_lang$core$Task$andThen, + function (_p17) { + return A3(_elm_lang$http$Http_Progress$spawnRequests, router, $new, ongoing); + }, + _elm_lang$core$Task$sequence(dead)); + }); +var _elm_lang$http$Http_Progress$init = _elm_lang$core$Task$succeed(_elm_lang$core$Dict$empty); +var _elm_lang$http$Http_Progress$map = F2( + function (func, _p18) { + var _p19 = _p18; + return { + request: A2(_elm_lang$http$Http_Internal$map, func, _p19.request), + toProgress: function (_p20) { + return func( + _p19.toProgress(_p20)); + }, + toError: function (_p21) { + return func( + _p19.toError(_p21)); + } + }; + }); +var _elm_lang$http$Http_Progress$subscription = _elm_lang$core$Native_Platform.leaf('Http.Progress'); +var _elm_lang$http$Http_Progress$TrackedRequest = F3( + function (a, b, c) { + return {request: a, toProgress: b, toError: c}; + }); +var _elm_lang$http$Http_Progress$Done = function (a) { + return {ctor: 'Done', _0: a}; +}; +var _elm_lang$http$Http_Progress$Fail = function (a) { + return {ctor: 'Fail', _0: a}; +}; +var _elm_lang$http$Http_Progress$Some = function (a) { + return {ctor: 'Some', _0: a}; +}; +var _elm_lang$http$Http_Progress$None = {ctor: 'None'}; +var _elm_lang$http$Http_Progress$Track = F2( + function (a, b) { + return {ctor: 'Track', _0: a, _1: b}; + }); +var _elm_lang$http$Http_Progress$track = F3( + function (id, toMessage, _p22) { + var _p23 = _p22; + return _elm_lang$http$Http_Progress$subscription( + A2( + _elm_lang$http$Http_Progress$Track, + id, + { + request: A2( + _elm_lang$http$Http_Internal$map, + function (_p24) { + return toMessage( + _elm_lang$http$Http_Progress$Done(_p24)); + }, + _p23._0), + toProgress: function (_p25) { + return toMessage( + _elm_lang$http$Http_Progress$Some(_p25)); + }, + toError: function (_p26) { + return toMessage( + _elm_lang$http$Http_Progress$Fail(_p26)); + } + })); + }); +var _elm_lang$http$Http_Progress$subMap = F2( + function (func, _p27) { + var _p28 = _p27; + return A2( + _elm_lang$http$Http_Progress$Track, + _p28._0, + A2(_elm_lang$http$Http_Progress$map, func, _p28._1)); + }); +_elm_lang$core$Native_Platform.effectManagers['Http.Progress'] = {pkg: 'elm-lang/http', init: _elm_lang$http$Http_Progress$init, onEffects: _elm_lang$http$Http_Progress$onEffects, onSelfMsg: _elm_lang$http$Http_Progress$onSelfMsg, tag: 'sub', subMap: _elm_lang$http$Http_Progress$subMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http.elmi new file mode 100644 index 0000000..422f5ea Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http.elmo new file mode 100644 index 0000000..8c0c558 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/Http.elmo @@ -0,0 +1,97 @@ +var _elm_lang$http$Http$decodeUri = _elm_lang$http$Native_Http.decodeUri; +var _elm_lang$http$Http$encodeUri = _elm_lang$http$Native_Http.encodeUri; +var _elm_lang$http$Http$expectStringResponse = _elm_lang$http$Native_Http.expectStringResponse; +var _elm_lang$http$Http$expectJson = function (decoder) { + return _elm_lang$http$Http$expectStringResponse( + function (response) { + return A2(_elm_lang$core$Json_Decode$decodeString, decoder, response.body); + }); +}; +var _elm_lang$http$Http$expectString = _elm_lang$http$Http$expectStringResponse( + function (response) { + return _elm_lang$core$Result$Ok(response.body); + }); +var _elm_lang$http$Http$multipartBody = _elm_lang$http$Native_Http.multipart; +var _elm_lang$http$Http$stringBody = _elm_lang$http$Http_Internal$StringBody; +var _elm_lang$http$Http$jsonBody = function (value) { + return A2( + _elm_lang$http$Http_Internal$StringBody, + 'application/json', + A2(_elm_lang$core$Json_Encode$encode, 0, value)); +}; +var _elm_lang$http$Http$emptyBody = _elm_lang$http$Http_Internal$EmptyBody; +var _elm_lang$http$Http$header = _elm_lang$http$Http_Internal$Header; +var _elm_lang$http$Http$request = _elm_lang$http$Http_Internal$Request; +var _elm_lang$http$Http$post = F3( + function (url, body, decoder) { + return _elm_lang$http$Http$request( + { + method: 'POST', + headers: _elm_lang$core$Native_List.fromArray( + []), + url: url, + body: body, + expect: _elm_lang$http$Http$expectJson(decoder), + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false + }); + }); +var _elm_lang$http$Http$get = F2( + function (url, decoder) { + return _elm_lang$http$Http$request( + { + method: 'GET', + headers: _elm_lang$core$Native_List.fromArray( + []), + url: url, + body: _elm_lang$http$Http$emptyBody, + expect: _elm_lang$http$Http$expectJson(decoder), + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false + }); + }); +var _elm_lang$http$Http$getString = function (url) { + return _elm_lang$http$Http$request( + { + method: 'GET', + headers: _elm_lang$core$Native_List.fromArray( + []), + url: url, + body: _elm_lang$http$Http$emptyBody, + expect: _elm_lang$http$Http$expectString, + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false + }); +}; +var _elm_lang$http$Http$toTask = function (_p0) { + var _p1 = _p0; + return A2(_elm_lang$http$Native_Http.toTask, _p1._0, _elm_lang$core$Maybe$Nothing); +}; +var _elm_lang$http$Http$send = F2( + function (resultToMessage, request) { + return A2( + _elm_lang$core$Task$attempt, + resultToMessage, + _elm_lang$http$Http$toTask(request)); + }); +var _elm_lang$http$Http$Response = F4( + function (a, b, c, d) { + return {url: a, status: b, headers: c, body: d}; + }); +var _elm_lang$http$Http$BadPayload = F2( + function (a, b) { + return {ctor: 'BadPayload', _0: a, _1: b}; + }); +var _elm_lang$http$Http$BadStatus = function (a) { + return {ctor: 'BadStatus', _0: a}; +}; +var _elm_lang$http$Http$NetworkError = {ctor: 'NetworkError'}; +var _elm_lang$http$Http$Timeout = {ctor: 'Timeout'}; +var _elm_lang$http$Http$BadUrl = function (a) { + return {ctor: 'BadUrl', _0: a}; +}; +var _elm_lang$http$Http$StringPart = F2( + function (a, b) { + return {ctor: 'StringPart', _0: a, _1: b}; + }); +var _elm_lang$http$Http$stringPart = _elm_lang$http$Http$StringPart; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/graph.dat new file mode 100644 index 0000000..7b3f9dc Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/http/1.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/Lazy.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/Lazy.elmi new file mode 100644 index 0000000..de039b6 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/Lazy.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/Lazy.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/Lazy.elmo new file mode 100644 index 0000000..0f9c52a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/Lazy.elmo @@ -0,0 +1,92 @@ +var _elm_lang$lazy$Lazy$force = function (_p0) { + var _p1 = _p0; + return _p1._0( + {ctor: '_Tuple0'}); +}; +var _elm_lang$lazy$Lazy$Lazy = function (a) { + return {ctor: 'Lazy', _0: a}; +}; +var _elm_lang$lazy$Lazy$lazy = function (thunk) { + return _elm_lang$lazy$Lazy$Lazy( + _elm_lang$lazy$Native_Lazy.memoize(thunk)); +}; +var _elm_lang$lazy$Lazy$map = F2( + function (f, a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p2) { + var _p3 = _p2; + return f( + _elm_lang$lazy$Lazy$force(a)); + }); + }); +var _elm_lang$lazy$Lazy$map2 = F3( + function (f, a, b) { + return _elm_lang$lazy$Lazy$lazy( + function (_p4) { + var _p5 = _p4; + return A2( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b)); + }); + }); +var _elm_lang$lazy$Lazy$map3 = F4( + function (f, a, b, c) { + return _elm_lang$lazy$Lazy$lazy( + function (_p6) { + var _p7 = _p6; + return A3( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b), + _elm_lang$lazy$Lazy$force(c)); + }); + }); +var _elm_lang$lazy$Lazy$map4 = F5( + function (f, a, b, c, d) { + return _elm_lang$lazy$Lazy$lazy( + function (_p8) { + var _p9 = _p8; + return A4( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b), + _elm_lang$lazy$Lazy$force(c), + _elm_lang$lazy$Lazy$force(d)); + }); + }); +var _elm_lang$lazy$Lazy$map5 = F6( + function (f, a, b, c, d, e) { + return _elm_lang$lazy$Lazy$lazy( + function (_p10) { + var _p11 = _p10; + return A5( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b), + _elm_lang$lazy$Lazy$force(c), + _elm_lang$lazy$Lazy$force(d), + _elm_lang$lazy$Lazy$force(e)); + }); + }); +var _elm_lang$lazy$Lazy$apply = F2( + function (f, x) { + return _elm_lang$lazy$Lazy$lazy( + function (_p12) { + var _p13 = _p12; + return A2( + _elm_lang$lazy$Lazy$force, + f, + _elm_lang$lazy$Lazy$force(x)); + }); + }); +var _elm_lang$lazy$Lazy$andThen = F2( + function (callback, a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p14) { + var _p15 = _p14; + return _elm_lang$lazy$Lazy$force( + callback( + _elm_lang$lazy$Lazy$force(a))); + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/graph.dat new file mode 100644 index 0000000..fe4e0c4 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/lazy/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/navigation/2.0.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/navigation/2.0.1/graph.dat new file mode 100644 index 0000000..0a0f640 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/navigation/2.0.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmi new file mode 100644 index 0000000..1384884 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmo new file mode 100644 index 0000000..b9d718e --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmo @@ -0,0 +1,45 @@ +var _elm_lang$virtual_dom$VirtualDom_Helpers$keyedNode = _elm_lang$virtual_dom$Native_VirtualDom.keyedNode; +var _elm_lang$virtual_dom$VirtualDom_Helpers$lazy3 = _elm_lang$virtual_dom$Native_VirtualDom.lazy3; +var _elm_lang$virtual_dom$VirtualDom_Helpers$lazy2 = _elm_lang$virtual_dom$Native_VirtualDom.lazy2; +var _elm_lang$virtual_dom$VirtualDom_Helpers$lazy = _elm_lang$virtual_dom$Native_VirtualDom.lazy; +var _elm_lang$virtual_dom$VirtualDom_Helpers$defaultOptions = {stopPropagation: false, preventDefault: false}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$onWithOptions = _elm_lang$virtual_dom$Native_VirtualDom.on; +var _elm_lang$virtual_dom$VirtualDom_Helpers$on = F2( + function (eventName, decoder) { + return A3(_elm_lang$virtual_dom$VirtualDom_Helpers$onWithOptions, eventName, _elm_lang$virtual_dom$VirtualDom_Helpers$defaultOptions, decoder); + }); +var _elm_lang$virtual_dom$VirtualDom_Helpers$onClick = function (msg) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$on, + 'click', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$style = _elm_lang$virtual_dom$Native_VirtualDom.style; +var _elm_lang$virtual_dom$VirtualDom_Helpers$attribute = _elm_lang$virtual_dom$Native_VirtualDom.attribute; +var _elm_lang$virtual_dom$VirtualDom_Helpers$id = _elm_lang$virtual_dom$VirtualDom_Helpers$attribute('id'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$property = _elm_lang$virtual_dom$Native_VirtualDom.property; +var _elm_lang$virtual_dom$VirtualDom_Helpers$class = function (name) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$property, + 'className', + _elm_lang$core$Json_Encode$string(name)); +}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$href = function (name) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$property, + 'href', + _elm_lang$core$Json_Encode$string(name)); +}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$map = _elm_lang$virtual_dom$Native_VirtualDom.map; +var _elm_lang$virtual_dom$VirtualDom_Helpers$text = _elm_lang$virtual_dom$Native_VirtualDom.text; +var _elm_lang$virtual_dom$VirtualDom_Helpers$node = _elm_lang$virtual_dom$Native_VirtualDom.node; +var _elm_lang$virtual_dom$VirtualDom_Helpers$div = _elm_lang$virtual_dom$VirtualDom_Helpers$node('div'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$span = _elm_lang$virtual_dom$VirtualDom_Helpers$node('span'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$a = _elm_lang$virtual_dom$VirtualDom_Helpers$node('a'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$h1 = _elm_lang$virtual_dom$VirtualDom_Helpers$node('h1'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$Options = F2( + function (a, b) { + return {stopPropagation: a, preventDefault: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Helpers$Node = {ctor: 'Node'}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$Property = {ctor: 'Property'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmi new file mode 100644 index 0000000..0c681b8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmo new file mode 100644 index 0000000..5552d94 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmo @@ -0,0 +1,105 @@ +var _elm_lang$virtual_dom$VirtualDom_Report$some = function (list) { + return _elm_lang$core$Basics$not( + _elm_lang$core$List$isEmpty(list)); +}; +var _elm_lang$virtual_dom$VirtualDom_Report$TagChanges = F4( + function (a, b, c, d) { + return {removed: a, changed: b, added: c, argsMatch: d}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$emptyTagChanges = function (argsMatch) { + return A4( + _elm_lang$virtual_dom$VirtualDom_Report$TagChanges, + _elm_lang$core$Native_List.fromArray( + []), + _elm_lang$core$Native_List.fromArray( + []), + _elm_lang$core$Native_List.fromArray( + []), + argsMatch); +}; +var _elm_lang$virtual_dom$VirtualDom_Report$hasTagChanges = function (tagChanges) { + return _elm_lang$core$Native_Utils.eq( + tagChanges, + A4( + _elm_lang$virtual_dom$VirtualDom_Report$TagChanges, + _elm_lang$core$Native_List.fromArray( + []), + _elm_lang$core$Native_List.fromArray( + []), + _elm_lang$core$Native_List.fromArray( + []), + true)); +}; +var _elm_lang$virtual_dom$VirtualDom_Report$SomethingChanged = function (a) { + return {ctor: 'SomethingChanged', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Report$MessageChanged = F2( + function (a, b) { + return {ctor: 'MessageChanged', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$VersionChanged = F2( + function (a, b) { + return {ctor: 'VersionChanged', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$CorruptHistory = {ctor: 'CorruptHistory'}; +var _elm_lang$virtual_dom$VirtualDom_Report$UnionChange = F2( + function (a, b) { + return {ctor: 'UnionChange', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$AliasChange = function (a) { + return {ctor: 'AliasChange', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Report$Fine = {ctor: 'Fine'}; +var _elm_lang$virtual_dom$VirtualDom_Report$Risky = {ctor: 'Risky'}; +var _elm_lang$virtual_dom$VirtualDom_Report$Impossible = {ctor: 'Impossible'}; +var _elm_lang$virtual_dom$VirtualDom_Report$worstCase = F2( + function (status, statusList) { + worstCase: + while (true) { + var _p0 = statusList; + if (_p0.ctor === '[]') { + return status; + } else { + switch (_p0._0.ctor) { + case 'Impossible': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + case 'Risky': + var _v1 = _elm_lang$virtual_dom$VirtualDom_Report$Risky, + _v2 = _p0._1; + status = _v1; + statusList = _v2; + continue worstCase; + default: + var _v3 = status, + _v4 = _p0._1; + status = _v3; + statusList = _v4; + continue worstCase; + } + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Report$evaluateChange = function (change) { + var _p1 = change; + if (_p1.ctor === 'AliasChange') { + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + } else { + return (_elm_lang$core$Basics$not(_p1._1.argsMatch) || (_elm_lang$virtual_dom$VirtualDom_Report$some(_p1._1.changed) || _elm_lang$virtual_dom$VirtualDom_Report$some(_p1._1.removed))) ? _elm_lang$virtual_dom$VirtualDom_Report$Impossible : (_elm_lang$virtual_dom$VirtualDom_Report$some(_p1._1.added) ? _elm_lang$virtual_dom$VirtualDom_Report$Risky : _elm_lang$virtual_dom$VirtualDom_Report$Fine); + } +}; +var _elm_lang$virtual_dom$VirtualDom_Report$evaluate = function (report) { + var _p2 = report; + switch (_p2.ctor) { + case 'CorruptHistory': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + case 'VersionChanged': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + case 'MessageChanged': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + default: + return A2( + _elm_lang$virtual_dom$VirtualDom_Report$worstCase, + _elm_lang$virtual_dom$VirtualDom_Report$Fine, + A2(_elm_lang$core$List$map, _elm_lang$virtual_dom$VirtualDom_Report$evaluateChange, _p2._0)); + } +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/graph.dat new file mode 100644 index 0000000..f38bf86 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/elm-lang/virtual-dom/2.0.2/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmi new file mode 100644 index 0000000..3fe662d Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmo new file mode 100644 index 0000000..f1769d8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmo @@ -0,0 +1,4 @@ +var _krisajenkins$remotedata$RemoteData_Infix_ops = _krisajenkins$remotedata$RemoteData_Infix_ops || {}; +_krisajenkins$remotedata$RemoteData_Infix_ops['<*>'] = _elm_lang$core$Basics$flip(_krisajenkins$remotedata$RemoteData$andMap); +var _krisajenkins$remotedata$RemoteData_Infix_ops = _krisajenkins$remotedata$RemoteData_Infix_ops || {}; +_krisajenkins$remotedata$RemoteData_Infix_ops['<$>'] = _krisajenkins$remotedata$RemoteData$map; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData.elmi new file mode 100644 index 0000000..23160e3 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData.elmo new file mode 100644 index 0000000..798af99 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/RemoteData.elmo @@ -0,0 +1,232 @@ +var _krisajenkins$remotedata$RemoteData$isNotAsked = function (data) { + var _p0 = data; + if (_p0.ctor === 'NotAsked') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$isLoading = function (data) { + var _p1 = data; + if (_p1.ctor === 'Loading') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$isFailure = function (data) { + var _p2 = data; + if (_p2.ctor === 'Failure') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$isSuccess = function (data) { + var _p3 = data; + if (_p3.ctor === 'Success') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$withDefault = F2( + function ($default, data) { + var _p4 = data; + if (_p4.ctor === 'Success') { + return _p4._0; + } else { + return $default; + } + }); +var _krisajenkins$remotedata$RemoteData$Success = function (a) { + return {ctor: 'Success', _0: a}; +}; +var _krisajenkins$remotedata$RemoteData$succeed = _krisajenkins$remotedata$RemoteData$Success; +var _krisajenkins$remotedata$RemoteData$prism = { + reverseGet: _krisajenkins$remotedata$RemoteData$Success, + getOption: function (data) { + var _p5 = data; + if (_p5.ctor === 'Success') { + return _elm_lang$core$Maybe$Just(_p5._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } + } +}; +var _krisajenkins$remotedata$RemoteData$Failure = function (a) { + return {ctor: 'Failure', _0: a}; +}; +var _krisajenkins$remotedata$RemoteData$fromResult = function (result) { + var _p6 = result; + if (_p6.ctor === 'Err') { + return _krisajenkins$remotedata$RemoteData$Failure(_p6._0); + } else { + return _krisajenkins$remotedata$RemoteData$Success(_p6._0); + } +}; +var _krisajenkins$remotedata$RemoteData$asCmd = _elm_lang$core$Task$attempt(_krisajenkins$remotedata$RemoteData$fromResult); +var _krisajenkins$remotedata$RemoteData$Loading = {ctor: 'Loading'}; +var _krisajenkins$remotedata$RemoteData$NotAsked = {ctor: 'NotAsked'}; +var _krisajenkins$remotedata$RemoteData$map = F2( + function (f, data) { + var _p7 = data; + switch (_p7.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success( + f(_p7._0)); + case 'Loading': + return _krisajenkins$remotedata$RemoteData$Loading; + case 'NotAsked': + return _krisajenkins$remotedata$RemoteData$NotAsked; + default: + return _krisajenkins$remotedata$RemoteData$Failure(_p7._0); + } + }); +var _krisajenkins$remotedata$RemoteData$toMaybe = function (_p8) { + return A2( + _krisajenkins$remotedata$RemoteData$withDefault, + _elm_lang$core$Maybe$Nothing, + A2(_krisajenkins$remotedata$RemoteData$map, _elm_lang$core$Maybe$Just, _p8)); +}; +var _krisajenkins$remotedata$RemoteData$mapError = F2( + function (f, data) { + var _p9 = data; + switch (_p9.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success(_p9._0); + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure( + f(_p9._0)); + case 'Loading': + return _krisajenkins$remotedata$RemoteData$Loading; + default: + return _krisajenkins$remotedata$RemoteData$NotAsked; + } + }); +var _krisajenkins$remotedata$RemoteData$mapBoth = F3( + function (successFn, errorFn, data) { + var _p10 = data; + switch (_p10.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success( + successFn(_p10._0)); + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure( + errorFn(_p10._0)); + case 'Loading': + return _krisajenkins$remotedata$RemoteData$Loading; + default: + return _krisajenkins$remotedata$RemoteData$NotAsked; + } + }); +var _krisajenkins$remotedata$RemoteData$andThen = F2( + function (f, data) { + var _p11 = data; + switch (_p11.ctor) { + case 'Success': + return f(_p11._0); + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure(_p11._0); + case 'NotAsked': + return _krisajenkins$remotedata$RemoteData$NotAsked; + default: + return _krisajenkins$remotedata$RemoteData$Loading; + } + }); +var _krisajenkins$remotedata$RemoteData$andMap = F2( + function (wrappedValue, wrappedFunction) { + var _p12 = {ctor: '_Tuple2', _0: wrappedFunction, _1: wrappedValue}; + _v11_5: + do { + _v11_4: + do { + _v11_3: + do { + _v11_2: + do { + switch (_p12._0.ctor) { + case 'Success': + switch (_p12._1.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success( + _p12._0._0(_p12._1._0)); + case 'Failure': + break _v11_2; + case 'Loading': + break _v11_4; + default: + return _krisajenkins$remotedata$RemoteData$NotAsked; + } + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure(_p12._0._0); + case 'Loading': + switch (_p12._1.ctor) { + case 'Failure': + break _v11_2; + case 'Loading': + break _v11_3; + case 'NotAsked': + break _v11_3; + default: + break _v11_3; + } + default: + switch (_p12._1.ctor) { + case 'Failure': + break _v11_2; + case 'Loading': + break _v11_4; + case 'NotAsked': + break _v11_5; + default: + break _v11_5; + } + } + } while(false); + return _krisajenkins$remotedata$RemoteData$Failure(_p12._1._0); + } while(false); + return _krisajenkins$remotedata$RemoteData$Loading; + } while(false); + return _krisajenkins$remotedata$RemoteData$Loading; + } while(false); + return _krisajenkins$remotedata$RemoteData$NotAsked; + }); +var _krisajenkins$remotedata$RemoteData$append = F2( + function (a, b) { + return A2( + _krisajenkins$remotedata$RemoteData$andMap, + b, + A2( + _krisajenkins$remotedata$RemoteData$map, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + a)); + }); +var _krisajenkins$remotedata$RemoteData$update = F2( + function (f, remoteData) { + var _p13 = remoteData; + switch (_p13.ctor) { + case 'Success': + var _p14 = f(_p13._0); + var first = _p14._0; + var second = _p14._1; + return { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Success(first), + _1: second + }; + case 'NotAsked': + return {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$NotAsked, _1: _elm_lang$core$Platform_Cmd$none}; + case 'Loading': + return {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$Loading, _1: _elm_lang$core$Platform_Cmd$none}; + default: + return { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Failure(_p13._0), + _1: _elm_lang$core$Platform_Cmd$none + }; + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/graph.dat new file mode 100644 index 0000000..fe9af79 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/krisajenkins/remotedata/4.0.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmi new file mode 100644 index 0000000..8f9fb95 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmo new file mode 100644 index 0000000..2f1187a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmo @@ -0,0 +1,192 @@ +var _lukewestby$elm_http_builder$HttpBuilder$replace = F2( + function (old, $new) { + return function (_p0) { + return A2( + _elm_lang$core$String$join, + $new, + A2(_elm_lang$core$String$split, old, _p0)); + }; + }); +var _lukewestby$elm_http_builder$HttpBuilder$queryEscape = function (_p1) { + return A3( + _lukewestby$elm_http_builder$HttpBuilder$replace, + '%20', + '+', + _elm_lang$http$Http$encodeUri(_p1)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$queryPair = function (_p2) { + var _p3 = _p2; + return A2( + _elm_lang$core$Basics_ops['++'], + _lukewestby$elm_http_builder$HttpBuilder$queryEscape(_p3._0), + A2( + _elm_lang$core$Basics_ops['++'], + '=', + _lukewestby$elm_http_builder$HttpBuilder$queryEscape(_p3._1))); +}; +var _lukewestby$elm_http_builder$HttpBuilder$joinUrlEncoded = function (args) { + return A2( + _elm_lang$core$String$join, + '&', + A2(_elm_lang$core$List$map, _lukewestby$elm_http_builder$HttpBuilder$queryPair, args)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$toRequest = function (_p4) { + var _p5 = _p4; + var _p6 = _p5._0; + var encodedParams = _lukewestby$elm_http_builder$HttpBuilder$joinUrlEncoded(_p6.queryParams); + var fullUrl = _elm_lang$core$String$isEmpty(encodedParams) ? _p6.url : A2( + _elm_lang$core$Basics_ops['++'], + _p6.url, + A2(_elm_lang$core$Basics_ops['++'], '?', encodedParams)); + return _elm_lang$http$Http$request( + {method: _p6.method, url: fullUrl, headers: _p6.headers, body: _p6.body, expect: _p6.expect, timeout: _p6.timeout, withCredentials: _p6.withCredentials}); +}; +var _lukewestby$elm_http_builder$HttpBuilder$send = F2( + function (tagger, builder) { + return A2( + _elm_lang$http$Http$send, + tagger, + _lukewestby$elm_http_builder$HttpBuilder$toRequest(builder)); + }); +var _lukewestby$elm_http_builder$HttpBuilder$RequestDetails = F8( + function (a, b, c, d, e, f, g, h) { + return {method: a, headers: b, url: c, body: d, expect: e, timeout: f, withCredentials: g, queryParams: h}; + }); +var _lukewestby$elm_http_builder$HttpBuilder$RequestBuilder = function (a) { + return {ctor: 'RequestBuilder', _0: a}; +}; +var _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl = F2( + function (method, url) { + return _lukewestby$elm_http_builder$HttpBuilder$RequestBuilder( + { + method: method, + url: url, + headers: _elm_lang$core$Native_List.fromArray( + []), + body: _elm_lang$http$Http$emptyBody, + expect: _elm_lang$http$Http$expectStringResponse( + function (_p7) { + return _elm_lang$core$Result$Ok( + {ctor: '_Tuple0'}); + }), + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false, + queryParams: _elm_lang$core$Native_List.fromArray( + []) + }); + }); +var _lukewestby$elm_http_builder$HttpBuilder$get = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('GET'); +var _lukewestby$elm_http_builder$HttpBuilder$post = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('POST'); +var _lukewestby$elm_http_builder$HttpBuilder$put = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('PUT'); +var _lukewestby$elm_http_builder$HttpBuilder$patch = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('PATCH'); +var _lukewestby$elm_http_builder$HttpBuilder$delete = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('DELETE'); +var _lukewestby$elm_http_builder$HttpBuilder$options = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('OPTIONS'); +var _lukewestby$elm_http_builder$HttpBuilder$trace = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('TRACE'); +var _lukewestby$elm_http_builder$HttpBuilder$head = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('HEAD'); +var _lukewestby$elm_http_builder$HttpBuilder$map = F2( + function (fn, _p8) { + var _p9 = _p8; + return _lukewestby$elm_http_builder$HttpBuilder$RequestBuilder( + fn(_p9._0)); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withHeader = F2( + function (key, value) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + headers: A2( + _elm_lang$core$List_ops['::'], + A2(_elm_lang$http$Http$header, key, value), + details.headers) + }); + }); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withHeaders = function (headerPairs) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + headers: A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$List$map, + _elm_lang$core$Basics$uncurry(_elm_lang$http$Http$header), + headerPairs), + details.headers) + }); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withBody = function (body) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + {body: body}); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withStringBody = F2( + function (contentType, value) { + return _lukewestby$elm_http_builder$HttpBuilder$withBody( + A2(_elm_lang$http$Http$stringBody, contentType, value)); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withUrlEncodedBody = function (_p10) { + return A2( + _lukewestby$elm_http_builder$HttpBuilder$withStringBody, + 'application/x-www-form-urlencoded', + _lukewestby$elm_http_builder$HttpBuilder$joinUrlEncoded(_p10)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withJsonBody = function (value) { + return _lukewestby$elm_http_builder$HttpBuilder$withBody( + _elm_lang$http$Http$jsonBody(value)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withMultipartStringBody = function (partPairs) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + body: _elm_lang$http$Http$multipartBody( + A2( + _elm_lang$core$List$map, + _elm_lang$core$Basics$uncurry(_elm_lang$http$Http$stringPart), + partPairs)) + }); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withTimeout = function (timeout) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + timeout: _elm_lang$core$Maybe$Just(timeout) + }); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withCredentials = _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + {withCredentials: true}); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withExpect = function (expect) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + {expect: expect}); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withQueryParams = function (queryParams) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + queryParams: A2(_elm_lang$core$Basics_ops['++'], details.queryParams, queryParams) + }); + }); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/graph.dat new file mode 100644 index 0000000..e81ceef Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/lukewestby/elm-http-builder/4.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmi new file mode 100644 index 0000000..173bfd0 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmo new file mode 100644 index 0000000..e7d2f61 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmo @@ -0,0 +1,4 @@ +var _mgold$elm_random_pcg$Random_Pcg_Interop$fission = A2( + _elm_lang$core$Random$map, + _mgold$elm_random_pcg$Random_Pcg$initialSeed, + A2(_elm_lang$core$Random$int, 0, 4294967295)); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmi new file mode 100644 index 0000000..00b474c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmo new file mode 100644 index 0000000..0e66c71 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmo @@ -0,0 +1,607 @@ +var _mgold$elm_random_pcg$Random_Pcg$toJson = function (_p0) { + var _p1 = _p0; + return _elm_lang$core$Json_Encode$list( + _elm_lang$core$Native_List.fromArray( + [ + _elm_lang$core$Json_Encode$int(_p1._0), + _elm_lang$core$Json_Encode$int(_p1._1) + ])); +}; +var _mgold$elm_random_pcg$Random_Pcg$mul32 = F2( + function (a, b) { + var bl = A2(_elm_lang$core$Bitwise$and, b, 65535); + var bh = A2( + _elm_lang$core$Bitwise$and, + 65535, + A2(_elm_lang$core$Bitwise$shiftRightZfBy, 16, b)); + var al = A2(_elm_lang$core$Bitwise$and, a, 65535); + var ah = A2( + _elm_lang$core$Bitwise$and, + 65535, + A2(_elm_lang$core$Bitwise$shiftRightZfBy, 16, a)); + return A2( + _elm_lang$core$Bitwise$or, + 0, + (al * bl) + A2( + _elm_lang$core$Bitwise$shiftRightZfBy, + 0, + A2(_elm_lang$core$Bitwise$shiftLeftBy, 16, (ah * bl) + (al * bh)))); + }); +var _mgold$elm_random_pcg$Random_Pcg$listHelp = F4( + function (list, n, generate, seed) { + listHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 1) < 0) { + return {ctor: '_Tuple2', _0: list, _1: seed}; + } else { + var _p2 = generate(seed); + var value = _p2._0; + var newSeed = _p2._1; + var _v1 = A2(_elm_lang$core$List_ops['::'], value, list), + _v2 = n - 1, + _v3 = generate, + _v4 = newSeed; + list = _v1; + n = _v2; + generate = _v3; + seed = _v4; + continue listHelp; + } + } + }); +var _mgold$elm_random_pcg$Random_Pcg$minInt = -2147483648; +var _mgold$elm_random_pcg$Random_Pcg$maxInt = 2147483647; +var _mgold$elm_random_pcg$Random_Pcg$bit27 = 1.34217728e8; +var _mgold$elm_random_pcg$Random_Pcg$bit53 = 9.007199254740992e15; +var _mgold$elm_random_pcg$Random_Pcg$peel = function (_p3) { + var _p4 = _p3; + var _p5 = _p4._0; + var word = A2( + _elm_lang$core$Bitwise$xor, + _p5, + A2( + _elm_lang$core$Bitwise$shiftRightZfBy, + A2(_elm_lang$core$Bitwise$shiftRightZfBy, 28, _p5) + 4, + _p5)) * 277803737; + return A2( + _elm_lang$core$Bitwise$shiftRightZfBy, + 0, + A2( + _elm_lang$core$Bitwise$xor, + A2(_elm_lang$core$Bitwise$shiftRightZfBy, 22, word), + word)); +}; +var _mgold$elm_random_pcg$Random_Pcg$step = F2( + function (_p6, seed) { + var _p7 = _p6; + return _p7._0(seed); + }); +var _mgold$elm_random_pcg$Random_Pcg$retry = F3( + function (generator, predicate, seed) { + retry: + while (true) { + var _p8 = A2(_mgold$elm_random_pcg$Random_Pcg$step, generator, seed); + var candidate = _p8._0; + var newSeed = _p8._1; + if (predicate(candidate)) { + return {ctor: '_Tuple2', _0: candidate, _1: newSeed}; + } else { + var _v7 = generator, + _v8 = predicate, + _v9 = newSeed; + generator = _v7; + predicate = _v8; + seed = _v9; + continue retry; + } + } + }); +var _mgold$elm_random_pcg$Random_Pcg$Generator = function (a) { + return {ctor: 'Generator', _0: a}; +}; +var _mgold$elm_random_pcg$Random_Pcg$list = F2( + function (n, _p9) { + var _p10 = _p9; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed) { + return A4( + _mgold$elm_random_pcg$Random_Pcg$listHelp, + _elm_lang$core$Native_List.fromArray( + []), + n, + _p10._0, + seed); + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$constant = function (value) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed) { + return {ctor: '_Tuple2', _0: value, _1: seed}; + }); +}; +var _mgold$elm_random_pcg$Random_Pcg$map = F2( + function (func, _p11) { + var _p12 = _p11; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p13 = _p12._0(seed0); + var a = _p13._0; + var seed1 = _p13._1; + return { + ctor: '_Tuple2', + _0: func(a), + _1: seed1 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$map2 = F3( + function (func, _p15, _p14) { + var _p16 = _p15; + var _p17 = _p14; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p18 = _p16._0(seed0); + var a = _p18._0; + var seed1 = _p18._1; + var _p19 = _p17._0(seed1); + var b = _p19._0; + var seed2 = _p19._1; + return { + ctor: '_Tuple2', + _0: A2(func, a, b), + _1: seed2 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$pair = F2( + function (genA, genB) { + return A3( + _mgold$elm_random_pcg$Random_Pcg$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + genA, + genB); + }); +var _mgold$elm_random_pcg$Random_Pcg$andMap = _mgold$elm_random_pcg$Random_Pcg$map2( + F2( + function (x, y) { + return x(y); + })); +var _mgold$elm_random_pcg$Random_Pcg$map3 = F4( + function (func, _p22, _p21, _p20) { + var _p23 = _p22; + var _p24 = _p21; + var _p25 = _p20; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p26 = _p23._0(seed0); + var a = _p26._0; + var seed1 = _p26._1; + var _p27 = _p24._0(seed1); + var b = _p27._0; + var seed2 = _p27._1; + var _p28 = _p25._0(seed2); + var c = _p28._0; + var seed3 = _p28._1; + return { + ctor: '_Tuple2', + _0: A3(func, a, b, c), + _1: seed3 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$map4 = F5( + function (func, _p32, _p31, _p30, _p29) { + var _p33 = _p32; + var _p34 = _p31; + var _p35 = _p30; + var _p36 = _p29; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p37 = _p33._0(seed0); + var a = _p37._0; + var seed1 = _p37._1; + var _p38 = _p34._0(seed1); + var b = _p38._0; + var seed2 = _p38._1; + var _p39 = _p35._0(seed2); + var c = _p39._0; + var seed3 = _p39._1; + var _p40 = _p36._0(seed3); + var d = _p40._0; + var seed4 = _p40._1; + return { + ctor: '_Tuple2', + _0: A4(func, a, b, c, d), + _1: seed4 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$map5 = F6( + function (func, _p45, _p44, _p43, _p42, _p41) { + var _p46 = _p45; + var _p47 = _p44; + var _p48 = _p43; + var _p49 = _p42; + var _p50 = _p41; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p51 = _p46._0(seed0); + var a = _p51._0; + var seed1 = _p51._1; + var _p52 = _p47._0(seed1); + var b = _p52._0; + var seed2 = _p52._1; + var _p53 = _p48._0(seed2); + var c = _p53._0; + var seed3 = _p53._1; + var _p54 = _p49._0(seed3); + var d = _p54._0; + var seed4 = _p54._1; + var _p55 = _p50._0(seed4); + var e = _p55._0; + var seed5 = _p55._1; + return { + ctor: '_Tuple2', + _0: A5(func, a, b, c, d, e), + _1: seed5 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$andThen = F2( + function (callback, _p56) { + var _p57 = _p56; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed) { + var _p58 = _p57._0(seed); + var result = _p58._0; + var newSeed = _p58._1; + var _p59 = callback(result); + var generateB = _p59._0; + return generateB(newSeed); + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$maybe = F2( + function (genBool, genA) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (b) { + return b ? A2(_mgold$elm_random_pcg$Random_Pcg$map, _elm_lang$core$Maybe$Just, genA) : _mgold$elm_random_pcg$Random_Pcg$constant(_elm_lang$core$Maybe$Nothing); + }, + genBool); + }); +var _mgold$elm_random_pcg$Random_Pcg$filter = F2( + function (predicate, generator) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + A2(_mgold$elm_random_pcg$Random_Pcg$retry, generator, predicate)); + }); +var _mgold$elm_random_pcg$Random_Pcg$Seed = F2( + function (a, b) { + return {ctor: 'Seed', _0: a, _1: b}; + }); +var _mgold$elm_random_pcg$Random_Pcg$next = function (_p60) { + var _p61 = _p60; + var _p62 = _p61._1; + return A2( + _mgold$elm_random_pcg$Random_Pcg$Seed, + A2(_elm_lang$core$Bitwise$shiftRightZfBy, 0, (_p61._0 * 1664525) + _p62), + _p62); +}; +var _mgold$elm_random_pcg$Random_Pcg$initialSeed = function (x) { + var _p63 = _mgold$elm_random_pcg$Random_Pcg$next( + A2(_mgold$elm_random_pcg$Random_Pcg$Seed, 0, 1013904223)); + var state1 = _p63._0; + var incr = _p63._1; + var state2 = A2(_elm_lang$core$Bitwise$shiftRightZfBy, 0, state1 + x); + return _mgold$elm_random_pcg$Random_Pcg$next( + A2(_mgold$elm_random_pcg$Random_Pcg$Seed, state2, incr)); +}; +var _mgold$elm_random_pcg$Random_Pcg$generate = F2( + function (toMsg, generator) { + return A2( + _elm_lang$core$Task$perform, + toMsg, + A2( + _elm_lang$core$Task$map, + function (_p64) { + return _elm_lang$core$Tuple$first( + A2( + _mgold$elm_random_pcg$Random_Pcg$step, + generator, + _mgold$elm_random_pcg$Random_Pcg$initialSeed( + _elm_lang$core$Basics$round(_p64)))); + }, + _elm_lang$core$Time$now)); + }); +var _mgold$elm_random_pcg$Random_Pcg$int = F2( + function (a, b) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p65 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; + var lo = _p65._0; + var hi = _p65._1; + var range = (hi - lo) + 1; + if (_elm_lang$core$Native_Utils.eq( + A2(_elm_lang$core$Bitwise$and, range - 1, range), + 0)) { + return { + ctor: '_Tuple2', + _0: A2( + _elm_lang$core$Bitwise$shiftRightZfBy, + 0, + A2( + _elm_lang$core$Bitwise$and, + range - 1, + _mgold$elm_random_pcg$Random_Pcg$peel(seed0))) + lo, + _1: _mgold$elm_random_pcg$Random_Pcg$next(seed0) + }; + } else { + var threshhold = A2( + _elm_lang$core$Bitwise$shiftRightZfBy, + 0, + A2( + _elm_lang$core$Basics$rem, + A2(_elm_lang$core$Bitwise$shiftRightZfBy, 0, 0 - range), + range)); + var accountForBias = function (seed) { + accountForBias: + while (true) { + var seedN = _mgold$elm_random_pcg$Random_Pcg$next(seed); + var x = _mgold$elm_random_pcg$Random_Pcg$peel(seed); + if (_elm_lang$core$Native_Utils.cmp(x, threshhold) < 0) { + var _v28 = seedN; + seed = _v28; + continue accountForBias; + } else { + return { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$Basics$rem, x, range) + lo, + _1: seedN + }; + } + } + }; + return accountForBias(seed0); + } + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$bool = A2( + _mgold$elm_random_pcg$Random_Pcg$map, + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })(1), + A2(_mgold$elm_random_pcg$Random_Pcg$int, 0, 1)); +var _mgold$elm_random_pcg$Random_Pcg$choice = F2( + function (x, y) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + function (b) { + return b ? x : y; + }, + _mgold$elm_random_pcg$Random_Pcg$bool); + }); +var _mgold$elm_random_pcg$Random_Pcg$oneIn = function (n) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })(1), + A2(_mgold$elm_random_pcg$Random_Pcg$int, 1, n)); +}; +var _mgold$elm_random_pcg$Random_Pcg$sample = function () { + var find = F2( + function (k, ys) { + find: + while (true) { + var _p66 = ys; + if (_p66.ctor === '[]') { + return _elm_lang$core$Maybe$Nothing; + } else { + if (_elm_lang$core$Native_Utils.eq(k, 0)) { + return _elm_lang$core$Maybe$Just(_p66._0); + } else { + var _v30 = k - 1, + _v31 = _p66._1; + k = _v30; + ys = _v31; + continue find; + } + } + } + }); + return function (xs) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + function (i) { + return A2(find, i, xs); + }, + A2( + _mgold$elm_random_pcg$Random_Pcg$int, + 0, + _elm_lang$core$List$length(xs) - 1)); + }; +}(); +var _mgold$elm_random_pcg$Random_Pcg$float = F2( + function (min, max) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var range = _elm_lang$core$Basics$abs(max - min); + var n0 = _mgold$elm_random_pcg$Random_Pcg$peel(seed0); + var hi = _elm_lang$core$Basics$toFloat( + A2(_elm_lang$core$Bitwise$and, 67108863, n0)) * 1.0; + var seed1 = _mgold$elm_random_pcg$Random_Pcg$next(seed0); + var n1 = _mgold$elm_random_pcg$Random_Pcg$peel(seed1); + var lo = _elm_lang$core$Basics$toFloat( + A2(_elm_lang$core$Bitwise$and, 134217727, n1)) * 1.0; + var val = ((hi * _mgold$elm_random_pcg$Random_Pcg$bit27) + lo) / _mgold$elm_random_pcg$Random_Pcg$bit53; + var scaled = (val * range) + min; + return { + ctor: '_Tuple2', + _0: scaled, + _1: _mgold$elm_random_pcg$Random_Pcg$next(seed1) + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$frequency = function (pairs) { + var pick = F2( + function (choices, n) { + pick: + while (true) { + var _p67 = choices; + if ((_p67.ctor === '::') && (_p67._0.ctor === '_Tuple2')) { + var _p68 = _p67._0._0; + if (_elm_lang$core$Native_Utils.cmp(n, _p68) < 1) { + return _p67._0._1; + } else { + var _v33 = _p67._1, + _v34 = n - _p68; + choices = _v33; + n = _v34; + continue pick; + } + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'Random.Pcg', + { + start: {line: 682, column: 13}, + end: {line: 690, column: 77} + }, + _p67)('Empty list passed to Random.Pcg.frequency!'); + } + } + }); + var total = _elm_lang$core$List$sum( + A2( + _elm_lang$core$List$map, + function (_p70) { + return _elm_lang$core$Basics$abs( + _elm_lang$core$Tuple$first(_p70)); + }, + pairs)); + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + pick(pairs), + A2(_mgold$elm_random_pcg$Random_Pcg$float, 0, total)); +}; +var _mgold$elm_random_pcg$Random_Pcg$choices = function (gens) { + return _mgold$elm_random_pcg$Random_Pcg$frequency( + A2( + _elm_lang$core$List$map, + function (g) { + return {ctor: '_Tuple2', _0: 1, _1: g}; + }, + gens)); +}; +var _mgold$elm_random_pcg$Random_Pcg$independentSeed = _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var gen = A2(_mgold$elm_random_pcg$Random_Pcg$int, 0, 4294967295); + var _p71 = A2( + _mgold$elm_random_pcg$Random_Pcg$step, + A4( + _mgold$elm_random_pcg$Random_Pcg$map3, + F3( + function (v0, v1, v2) { + return {ctor: '_Tuple3', _0: v0, _1: v1, _2: v2}; + }), + gen, + gen, + gen), + seed0); + var state = _p71._0._0; + var b = _p71._0._1; + var c = _p71._0._2; + var seed1 = _p71._1; + var incr = A2( + _elm_lang$core$Bitwise$or, + 1, + A2(_elm_lang$core$Bitwise$xor, b, c)); + return { + ctor: '_Tuple2', + _0: seed1, + _1: _mgold$elm_random_pcg$Random_Pcg$next( + A2(_mgold$elm_random_pcg$Random_Pcg$Seed, state, incr)) + }; + }); +var _mgold$elm_random_pcg$Random_Pcg$fastForward = F2( + function (delta0, _p72) { + var _p73 = _p72; + var _p76 = _p73._1; + var helper = F6( + function (accMult, accPlus, curMult, curPlus, delta, repeat) { + helper: + while (true) { + var newDelta = A2(_elm_lang$core$Bitwise$shiftRightZfBy, 1, delta); + var curMult_ = A2(_mgold$elm_random_pcg$Random_Pcg$mul32, curMult, curMult); + var curPlus_ = A2(_mgold$elm_random_pcg$Random_Pcg$mul32, curMult + 1, curPlus); + var _p74 = _elm_lang$core$Native_Utils.eq( + A2(_elm_lang$core$Bitwise$and, delta, 1), + 1) ? { + ctor: '_Tuple2', + _0: A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accMult, curMult), + _1: A2( + _elm_lang$core$Bitwise$shiftRightZfBy, + 0, + A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accPlus, curMult) + curPlus) + } : {ctor: '_Tuple2', _0: accMult, _1: accPlus}; + var accMult_ = _p74._0; + var accPlus_ = _p74._1; + if (_elm_lang$core$Native_Utils.eq(newDelta, 0)) { + if ((_elm_lang$core$Native_Utils.cmp(delta0, 0) < 0) && repeat) { + var _v36 = accMult_, + _v37 = accPlus_, + _v38 = curMult_, + _v39 = curPlus_, + _v40 = -1, + _v41 = false; + accMult = _v36; + accPlus = _v37; + curMult = _v38; + curPlus = _v39; + delta = _v40; + repeat = _v41; + continue helper; + } else { + return {ctor: '_Tuple2', _0: accMult_, _1: accPlus_}; + } + } else { + var _v42 = accMult_, + _v43 = accPlus_, + _v44 = curMult_, + _v45 = curPlus_, + _v46 = newDelta, + _v47 = repeat; + accMult = _v42; + accPlus = _v43; + curMult = _v44; + curPlus = _v45; + delta = _v46; + repeat = _v47; + continue helper; + } + } + }); + var _p75 = A6(helper, 1, 0, 1664525, _p76, delta0, true); + var accMultFinal = _p75._0; + var accPlusFinal = _p75._1; + return A2( + _mgold$elm_random_pcg$Random_Pcg$Seed, + A2( + _elm_lang$core$Bitwise$shiftRightZfBy, + 0, + A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accMultFinal, _p73._0) + accPlusFinal), + _p76); + }); +var _mgold$elm_random_pcg$Random_Pcg$fromJson = _elm_lang$core$Json_Decode$oneOf( + _elm_lang$core$Native_List.fromArray( + [ + A3( + _elm_lang$core$Json_Decode$map2, + _mgold$elm_random_pcg$Random_Pcg$Seed, + A2(_elm_lang$core$Json_Decode$index, 0, _elm_lang$core$Json_Decode$int), + A2(_elm_lang$core$Json_Decode$index, 1, _elm_lang$core$Json_Decode$int)), + A2(_elm_lang$core$Json_Decode$map, _mgold$elm_random_pcg$Random_Pcg$initialSeed, _elm_lang$core$Json_Decode$int) + ])); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/graph.dat new file mode 100644 index 0000000..7ee5f24 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/mgold/elm-random-pcg/4.0.2/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/Erl.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/Erl.elmi new file mode 100644 index 0000000..decbc8e Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/Erl.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/Erl.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/Erl.elmo new file mode 100644 index 0000000..55b5948 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/Erl.elmo @@ -0,0 +1,449 @@ +var _sporto$erl$Erl$appendPathSegments = F2( + function (segments, url) { + var newPath = A2(_elm_lang$core$List$append, url.path, segments); + return _elm_lang$core$Native_Utils.update( + url, + {path: newPath}); + }); +var _sporto$erl$Erl$removeQuery = F2( + function (key, url) { + var updated = A2( + _elm_lang$core$List$filter, + function (_p0) { + var _p1 = _p0; + return !_elm_lang$core$Native_Utils.eq(_p1._0, key); + }, + url.query); + return _elm_lang$core$Native_Utils.update( + url, + {query: updated}); + }); +var _sporto$erl$Erl$addQuery = F3( + function (key, val, url) { + var updated = _elm_lang$core$List$reverse( + A2( + F2( + function (x, y) { + return A2(_elm_lang$core$List_ops['::'], x, y); + }), + {ctor: '_Tuple2', _0: key, _1: val}, + _elm_lang$core$List$reverse(url.query))); + return _elm_lang$core$Native_Utils.update( + url, + {query: updated}); + }); +var _sporto$erl$Erl$setQuery = F3( + function (key, val, url) { + var without = A2(_sporto$erl$Erl$removeQuery, key, url); + return A3(_sporto$erl$Erl$addQuery, key, val, without); + }); +var _sporto$erl$Erl$clearQuery = function (url) { + return _elm_lang$core$Native_Utils.update( + url, + { + query: _elm_lang$core$Native_List.fromArray( + []) + }); +}; +var _sporto$erl$Erl$new = { + protocol: '', + username: '', + password: '', + host: _elm_lang$core$Native_List.fromArray( + []), + path: _elm_lang$core$Native_List.fromArray( + []), + hasLeadingSlash: false, + hasTrailingSlash: false, + port_: 0, + hash: '', + query: _elm_lang$core$Native_List.fromArray( + []) +}; +var _sporto$erl$Erl$hashToString = function (url) { + return _elm_lang$core$String$isEmpty(url.hash) ? '' : A2(_elm_lang$core$Basics_ops['++'], '#', url.hash); +}; +var _sporto$erl$Erl$trailingSlashComponent = function (url) { + return _elm_lang$core$Native_Utils.eq(url.hasTrailingSlash, true) ? '/' : ''; +}; +var _sporto$erl$Erl$portComponent = function (url) { + var _p2 = url.port_; + switch (_p2) { + case 0: + return ''; + case 80: + return ''; + default: + return A2( + _elm_lang$core$Basics_ops['++'], + ':', + _elm_lang$core$Basics$toString(url.port_)); + } +}; +var _sporto$erl$Erl$hostComponent = function (url) { + return _elm_lang$http$Http$encodeUri( + A2(_elm_lang$core$String$join, '.', url.host)); +}; +var _sporto$erl$Erl$pathComponent = function (url) { + var leadingSlash = ((!_elm_lang$core$Native_Utils.eq( + _sporto$erl$Erl$hostComponent(url), + '')) || url.hasLeadingSlash) ? '/' : ''; + var encoded = A2(_elm_lang$core$List$map, _elm_lang$http$Http$encodeUri, url.path); + return _elm_lang$core$Native_Utils.eq( + _elm_lang$core$List$length(url.path), + 0) ? '' : A2( + _elm_lang$core$Basics_ops['++'], + leadingSlash, + A2(_elm_lang$core$String$join, '/', encoded)); +}; +var _sporto$erl$Erl$protocolComponent = function (url) { + var _p3 = url.protocol; + if (_p3 === '') { + return ''; + } else { + return A2(_elm_lang$core$Basics_ops['++'], url.protocol, '://'); + } +}; +var _sporto$erl$Erl$queryToString = function (url) { + var encodedTuples = A2( + _elm_lang$core$List$map, + function (_p4) { + var _p5 = _p4; + return { + ctor: '_Tuple2', + _0: _elm_lang$http$Http$encodeUri(_p5._0), + _1: _elm_lang$http$Http$encodeUri(_p5._1) + }; + }, + url.query); + var parts = A2( + _elm_lang$core$List$map, + function (_p6) { + var _p7 = _p6; + return A2( + _elm_lang$core$Basics_ops['++'], + _p7._0, + A2(_elm_lang$core$Basics_ops['++'], '=', _p7._1)); + }, + encodedTuples); + return _elm_lang$core$List$isEmpty(url.query) ? '' : A2( + _elm_lang$core$Basics_ops['++'], + '?', + A2(_elm_lang$core$String$join, '&', parts)); +}; +var _sporto$erl$Erl$toString = function (url) { + var hash = _sporto$erl$Erl$hashToString(url); + var query_ = _sporto$erl$Erl$queryToString(url); + var trailingSlash_ = _sporto$erl$Erl$trailingSlashComponent(url); + var path_ = _sporto$erl$Erl$pathComponent(url); + var port_ = _sporto$erl$Erl$portComponent(url); + var host_ = _sporto$erl$Erl$hostComponent(url); + var protocol_ = _sporto$erl$Erl$protocolComponent(url); + return A2( + _elm_lang$core$Basics_ops['++'], + protocol_, + A2( + _elm_lang$core$Basics_ops['++'], + host_, + A2( + _elm_lang$core$Basics_ops['++'], + port_, + A2( + _elm_lang$core$Basics_ops['++'], + path_, + A2( + _elm_lang$core$Basics_ops['++'], + trailingSlash_, + A2(_elm_lang$core$Basics_ops['++'], query_, hash)))))); +}; +var _sporto$erl$Erl$queryStringElementToTuple = function (element) { + var splitted = A2(_elm_lang$core$String$split, '=', element); + var first = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head(splitted)); + var firstDecoded = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$http$Http$decodeUri(first)); + var second = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2(_elm_lang$core$List$drop, 1, splitted))); + var secondDecoded = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$http$Http$decodeUri(second)); + return {ctor: '_Tuple2', _0: firstDecoded, _1: secondDecoded}; +}; +var _sporto$erl$Erl$parseQuery = function (queryString) { + var splitted = A2(_elm_lang$core$String$split, '&', queryString); + return _elm_lang$core$String$isEmpty(queryString) ? _elm_lang$core$Native_List.fromArray( + []) : A2(_elm_lang$core$List$map, _sporto$erl$Erl$queryStringElementToTuple, splitted); +}; +var _sporto$erl$Erl$extractQuery = function (str) { + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$String$split, + '#', + A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$drop, + 1, + A2(_elm_lang$core$String$split, '?', str))))))); +}; +var _sporto$erl$Erl$queryFromAll = function (all) { + return _sporto$erl$Erl$parseQuery( + _sporto$erl$Erl$extractQuery(all)); +}; +var _sporto$erl$Erl$extractHash = function (str) { + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$drop, + 1, + A2(_elm_lang$core$String$split, '#', str)))); +}; +var _sporto$erl$Erl$hashFromAll = function (str) { + return _sporto$erl$Erl$extractHash(str); +}; +var _sporto$erl$Erl$parseHost = function (str) { + return A2(_elm_lang$core$String$split, '.', str); +}; +var _sporto$erl$Erl$extractProtocol = function (str) { + var parts = A2(_elm_lang$core$String$split, '://', str); + var _p8 = _elm_lang$core$List$length(parts); + if (_p8 === 1) { + return ''; + } else { + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head(parts)); + } +}; +var _sporto$erl$Erl$extractPort = function (str) { + var rx = _elm_lang$core$Regex$regex(':\\d+'); + var res = A3( + _elm_lang$core$Regex$find, + _elm_lang$core$Regex$AtMost(1), + rx, + str); + return function (result) { + var _p9 = result; + if (_p9.ctor === 'Ok') { + return _p9._0; + } else { + var _p10 = _sporto$erl$Erl$extractProtocol(str); + switch (_p10) { + case 'http': + return 80; + case 'https': + return 443; + case 'ftp': + return 21; + case 'sftp': + return 22; + default: + return 0; + } + } + }( + _elm_lang$core$String$toInt( + A2( + _elm_lang$core$String$dropLeft, + 1, + A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$map, + function (_) { + return _.match; + }, + res)))))); +}; +var _sporto$erl$Erl$leftFrom = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + var head = _elm_lang$core$List$head(parts); + var _p11 = _elm_lang$core$List$length(parts); + switch (_p11) { + case 0: + return ''; + case 1: + return ''; + default: + return A2(_elm_lang$core$Maybe$withDefault, '', head); + } + }); +var _sporto$erl$Erl$leftFromOrSame = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head(parts)); + }); +var _sporto$erl$Erl$rightFromOrSame = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + _elm_lang$core$List$reverse(parts))); + }); +var _sporto$erl$Erl$extractHost = function (str) { + var localhostRx = 'localhost'; + var dotsRx = '((\\w|-)+\\.)+(\\w|-)+'; + var rx = A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + dotsRx, + A2( + _elm_lang$core$Basics_ops['++'], + '|', + A2(_elm_lang$core$Basics_ops['++'], localhostRx, ')')))); + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$map, + function (_) { + return _.match; + }, + A3( + _elm_lang$core$Regex$find, + _elm_lang$core$Regex$AtMost(1), + _elm_lang$core$Regex$regex(rx), + A2( + _sporto$erl$Erl$leftFromOrSame, + '/', + A2(_sporto$erl$Erl$rightFromOrSame, '//', str)))))); +}; +var _sporto$erl$Erl$host = function (str) { + return _sporto$erl$Erl$parseHost( + _sporto$erl$Erl$extractHost(str)); +}; +var _sporto$erl$Erl$extractPath = function (str) { + var host = _sporto$erl$Erl$extractHost(str); + return A4( + _elm_lang$core$Regex$replace, + _elm_lang$core$Regex$AtMost(1), + _elm_lang$core$Regex$regex(':\\d+'), + function (_p12) { + return ''; + }, + A4( + _elm_lang$core$Regex$replace, + _elm_lang$core$Regex$AtMost(1), + _elm_lang$core$Regex$regex(host), + function (_p13) { + return ''; + }, + A2( + _sporto$erl$Erl$leftFromOrSame, + '#', + A2( + _sporto$erl$Erl$leftFromOrSame, + '?', + A2(_sporto$erl$Erl$rightFromOrSame, '//', str))))); +}; +var _sporto$erl$Erl$hasLeadingSlashFromAll = function (str) { + return A2( + _elm_lang$core$Regex$contains, + _elm_lang$core$Regex$regex('^/'), + _sporto$erl$Erl$extractPath(str)); +}; +var _sporto$erl$Erl$hasTrailingSlashFromAll = function (str) { + return A2( + _elm_lang$core$Regex$contains, + _elm_lang$core$Regex$regex('/$'), + _sporto$erl$Erl$extractPath(str)); +}; +var _sporto$erl$Erl$rightFrom = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + var _p14 = _elm_lang$core$List$length(parts); + switch (_p14) { + case 0: + return ''; + case 1: + return ''; + default: + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + _elm_lang$core$List$reverse(parts))); + } + }); +var _sporto$erl$Erl$notEmpty = function (str) { + return _elm_lang$core$Basics$not( + _elm_lang$core$String$isEmpty(str)); +}; +var _sporto$erl$Erl$parsePath = function (str) { + return A2( + _elm_lang$core$List$map, + _elm_lang$core$Maybe$withDefault(''), + A2( + _elm_lang$core$List$map, + _elm_lang$http$Http$decodeUri, + A2( + _elm_lang$core$List$filter, + _sporto$erl$Erl$notEmpty, + A2(_elm_lang$core$String$split, '/', str)))); +}; +var _sporto$erl$Erl$pathFromAll = function (str) { + return _sporto$erl$Erl$parsePath( + _sporto$erl$Erl$extractPath(str)); +}; +var _sporto$erl$Erl$parse = function (str) { + return { + host: _sporto$erl$Erl$host(str), + hash: _sporto$erl$Erl$hashFromAll(str), + password: '', + path: _sporto$erl$Erl$pathFromAll(str), + hasLeadingSlash: _sporto$erl$Erl$hasLeadingSlashFromAll(str), + hasTrailingSlash: _sporto$erl$Erl$hasTrailingSlashFromAll(str), + port_: _sporto$erl$Erl$extractPort(str), + protocol: _sporto$erl$Erl$extractProtocol(str), + query: _sporto$erl$Erl$queryFromAll(str), + username: '' + }; +}; +var _sporto$erl$Erl$Url = function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function (i) { + return function (j) { + return {protocol: a, username: b, password: c, host: d, port_: e, path: f, hasLeadingSlash: g, hasTrailingSlash: h, hash: i, query: j}; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/graph.dat new file mode 100644 index 0000000..1b6dd30 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/sporto/erl/11.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/Base64.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/Base64.elmi new file mode 100644 index 0000000..0b3804b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/Base64.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/Base64.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/Base64.elmo new file mode 100644 index 0000000..48c966d --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/Base64.elmo @@ -0,0 +1,180 @@ +var _truqu$elm_base64$Base64$dropLast = F2( + function (number, list) { + return _elm_lang$core$List$reverse( + A2( + _elm_lang$core$List$drop, + number, + _elm_lang$core$List$reverse(list))); + }); +var _truqu$elm_base64$Base64$partitionBits = function (list) { + var list_ = A3( + _elm_lang$core$List$foldr, + _elm_lang$core$List$append, + _elm_lang$core$Native_List.fromArray( + []), + A2(_elm_lang$core$List$map, _truqu$elm_base64$BitList$fromByte, list)); + return A2( + _elm_lang$core$List$map, + _truqu$elm_base64$BitList$toByte, + A2(_truqu$elm_base64$BitList$partition, 6, list_)); +}; +var _truqu$elm_base64$Base64$base64CharsList = _elm_lang$core$String$toList('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'); +var _truqu$elm_base64$Base64$base64Map = function () { + var insert = F2( + function (_p0, dict) { + var _p1 = _p0; + return A3(_elm_lang$core$Dict$insert, _p1._1, _p1._0, dict); + }); + return A3( + _elm_lang$core$List$foldl, + insert, + _elm_lang$core$Dict$empty, + A2( + _elm_lang$core$List$indexedMap, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + _truqu$elm_base64$Base64$base64CharsList)); +}(); +var _truqu$elm_base64$Base64$isValid = function (string) { + var string_ = A2(_elm_lang$core$String$endsWith, '==', string) ? A2(_elm_lang$core$String$dropRight, 2, string) : (A2(_elm_lang$core$String$endsWith, '=', string) ? A2(_elm_lang$core$String$dropRight, 1, string) : string); + var isBase64Char = function ($char) { + return A2(_elm_lang$core$Dict$member, $char, _truqu$elm_base64$Base64$base64Map); + }; + return A2(_elm_lang$core$String$all, isBase64Char, string_); +}; +var _truqu$elm_base64$Base64$toBase64BitList = function (string) { + var endingEquals = A2(_elm_lang$core$String$endsWith, '==', string) ? 2 : (A2(_elm_lang$core$String$endsWith, '=', string) ? 1 : 0); + var stripped = _elm_lang$core$String$toList( + A2(_elm_lang$core$String$dropRight, endingEquals, string)); + var base64ToInt = function ($char) { + var _p2 = A2(_elm_lang$core$Dict$get, $char, _truqu$elm_base64$Base64$base64Map); + if (_p2.ctor === 'Just') { + return _p2._0; + } else { + return -1; + } + }; + var numberList = A2(_elm_lang$core$List$map, base64ToInt, stripped); + return A2( + _truqu$elm_base64$Base64$dropLast, + endingEquals * 2, + A2( + _elm_lang$core$List$concatMap, + A2(_elm_lang$core$Basics$flip, _truqu$elm_base64$BitList$fromNumberWithSize, 6), + numberList)); +}; +var _truqu$elm_base64$Base64$toCharList = function (bitList) { + var array = _elm_lang$core$Array$fromList(_truqu$elm_base64$Base64$base64CharsList); + var toBase64Char = function (index) { + return A2( + _elm_lang$core$Maybe$withDefault, + _elm_lang$core$Native_Utils.chr('!'), + A2(_elm_lang$core$Array$get, index, array)); + }; + var toChars = function (_p3) { + var _p4 = _p3; + var _p5 = {ctor: '_Tuple3', _0: _p4._0, _1: _p4._1, _2: _p4._2}; + if (_p5._2 === -1) { + if (_p5._1 === -1) { + return A2( + _elm_lang$core$List$append, + A2( + _truqu$elm_base64$Base64$dropLast, + 2, + A2( + _elm_lang$core$List$map, + toBase64Char, + _truqu$elm_base64$Base64$partitionBits( + _elm_lang$core$Native_List.fromArray( + [_p5._0, 0, 0])))), + _elm_lang$core$Native_List.fromArray( + [ + _elm_lang$core$Native_Utils.chr('='), + _elm_lang$core$Native_Utils.chr('=') + ])); + } else { + return A2( + _elm_lang$core$List$append, + A2( + _truqu$elm_base64$Base64$dropLast, + 1, + A2( + _elm_lang$core$List$map, + toBase64Char, + _truqu$elm_base64$Base64$partitionBits( + _elm_lang$core$Native_List.fromArray( + [_p5._0, _p5._1, 0])))), + _elm_lang$core$Native_List.fromArray( + [ + _elm_lang$core$Native_Utils.chr('=') + ])); + } + } else { + return A2( + _elm_lang$core$List$map, + toBase64Char, + _truqu$elm_base64$Base64$partitionBits( + _elm_lang$core$Native_List.fromArray( + [_p5._0, _p5._1, _p5._2]))); + } + }; + return A2(_elm_lang$core$List$concatMap, toChars, bitList); +}; +var _truqu$elm_base64$Base64$toTupleList = function (list) { + var _p6 = list; + if (_p6.ctor === '::') { + if (_p6._1.ctor === '::') { + if (_p6._1._1.ctor === '::') { + return A2( + _elm_lang$core$List_ops['::'], + {ctor: '_Tuple3', _0: _p6._0, _1: _p6._1._0, _2: _p6._1._1._0}, + _truqu$elm_base64$Base64$toTupleList(_p6._1._1._1)); + } else { + return _elm_lang$core$Native_List.fromArray( + [ + {ctor: '_Tuple3', _0: _p6._0, _1: _p6._1._0, _2: -1} + ]); + } + } else { + return _elm_lang$core$Native_List.fromArray( + [ + {ctor: '_Tuple3', _0: _p6._0, _1: -1, _2: -1} + ]); + } + } else { + return _elm_lang$core$Native_List.fromArray( + []); + } +}; +var _truqu$elm_base64$Base64$toCodeList = function (string) { + return A2( + _elm_lang$core$List$map, + _elm_lang$core$Char$toCode, + _elm_lang$core$String$toList(string)); +}; +var _truqu$elm_base64$Base64$decode = function (s) { + if (_elm_lang$core$Basics$not( + _truqu$elm_base64$Base64$isValid(s))) { + return _elm_lang$core$Result$Err('Error while decoding'); + } else { + var bitList = A2( + _elm_lang$core$List$map, + _truqu$elm_base64$BitList$toByte, + A2( + _truqu$elm_base64$BitList$partition, + 8, + _truqu$elm_base64$Base64$toBase64BitList(s))); + var charList = A2(_elm_lang$core$List$map, _elm_lang$core$Char$fromCode, bitList); + return _elm_lang$core$Result$Ok( + _elm_lang$core$String$fromList(charList)); + } +}; +var _truqu$elm_base64$Base64$encode = function (s) { + return _elm_lang$core$Result$Ok( + _elm_lang$core$String$fromList( + _truqu$elm_base64$Base64$toCharList( + _truqu$elm_base64$Base64$toTupleList( + _truqu$elm_base64$Base64$toCodeList(s))))); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/BitList.elmi b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/BitList.elmi new file mode 100644 index 0000000..76aca01 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/BitList.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/BitList.elmo b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/BitList.elmo new file mode 100644 index 0000000..740b22f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/BitList.elmo @@ -0,0 +1,82 @@ +var _truqu$elm_base64$BitList$partition = F2( + function (size, list) { + if (_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$List$length(list), + size) < 1) { + return _elm_lang$core$Native_List.fromArray( + [list]); + } else { + var partitionTail = F3( + function (size, list, res) { + partitionTail: + while (true) { + var _p0 = list; + if (_p0.ctor === '[]') { + return res; + } else { + var _v1 = size, + _v2 = A2(_elm_lang$core$List$drop, size, list), + _v3 = A2( + _elm_lang$core$List_ops['::'], + A2(_elm_lang$core$List$take, size, list), + res); + size = _v1; + list = _v2; + res = _v3; + continue partitionTail; + } + } + }); + return _elm_lang$core$List$reverse( + A3( + partitionTail, + size, + list, + _elm_lang$core$Native_List.fromArray( + []))); + } + }); +var _truqu$elm_base64$BitList$toByteReverse = function (bitList) { + var _p1 = bitList; + if (_p1.ctor === '[]') { + return 0; + } else { + if (_p1._0.ctor === 'Off') { + return 2 * _truqu$elm_base64$BitList$toByteReverse(_p1._1); + } else { + return 1 + (2 * _truqu$elm_base64$BitList$toByteReverse(_p1._1)); + } + } +}; +var _truqu$elm_base64$BitList$toByte = function (bitList) { + return _truqu$elm_base64$BitList$toByteReverse( + _elm_lang$core$List$reverse(bitList)); +}; +var _truqu$elm_base64$BitList$Off = {ctor: 'Off'}; +var _truqu$elm_base64$BitList$On = {ctor: 'On'}; +var _truqu$elm_base64$BitList$fromNumber = function ($int) { + return _elm_lang$core$Native_Utils.eq($int, 0) ? _elm_lang$core$Native_List.fromArray( + []) : (_elm_lang$core$Native_Utils.eq( + A2(_elm_lang$core$Basics_ops['%'], $int, 2), + 1) ? A2( + _elm_lang$core$List$append, + _truqu$elm_base64$BitList$fromNumber(($int / 2) | 0), + _elm_lang$core$Native_List.fromArray( + [_truqu$elm_base64$BitList$On])) : A2( + _elm_lang$core$List$append, + _truqu$elm_base64$BitList$fromNumber(($int / 2) | 0), + _elm_lang$core$Native_List.fromArray( + [_truqu$elm_base64$BitList$Off]))); +}; +var _truqu$elm_base64$BitList$fromNumberWithSize = F2( + function (number, size) { + var bitList = _truqu$elm_base64$BitList$fromNumber(number); + var paddingSize = size - _elm_lang$core$List$length(bitList); + return A2( + _elm_lang$core$List$append, + A2(_elm_lang$core$List$repeat, paddingSize, _truqu$elm_base64$BitList$Off), + bitList); + }); +var _truqu$elm_base64$BitList$fromByte = function ($byte) { + return A2(_truqu$elm_base64$BitList$fromNumberWithSize, $byte, 8); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/graph.dat new file mode 100644 index 0000000..9904b59 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.17.1/truqu/elm-base64/1.0.5/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Model.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Model.elmi new file mode 100644 index 0000000..d764d67 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Model.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Model.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Model.elmo new file mode 100644 index 0000000..d4b25ce --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Model.elmo @@ -0,0 +1,20 @@ +var _Gizra$elm_spa_exmple$App_Model$Model = F5( + function (a, b, c, d, e) { + return {accessToken: a, activePage: b, config: c, pageLogin: d, user: e}; + }); +var _Gizra$elm_spa_exmple$App_Model$Flags = F2( + function (a, b) { + return {accessToken: a, hostname: b}; + }); +var _Gizra$elm_spa_exmple$App_Model$PageNotFound = {ctor: 'PageNotFound'}; +var _Gizra$elm_spa_exmple$App_Model$MyAccount = {ctor: 'MyAccount'}; +var _Gizra$elm_spa_exmple$App_Model$Login = {ctor: 'Login'}; +var _Gizra$elm_spa_exmple$App_Model$emptyModel = {accessToken: '', activePage: _Gizra$elm_spa_exmple$App_Model$Login, config: _krisajenkins$remotedata$RemoteData$NotAsked, pageLogin: _Gizra$elm_spa_exmple$Pages_Login_Model$emptyModel, user: _krisajenkins$remotedata$RemoteData$NotAsked}; +var _Gizra$elm_spa_exmple$App_Model$AccessDenied = {ctor: 'AccessDenied'}; +var _Gizra$elm_spa_exmple$App_Model$SetActivePage = function (a) { + return {ctor: 'SetActivePage', _0: a}; +}; +var _Gizra$elm_spa_exmple$App_Model$PageLogin = function (a) { + return {ctor: 'PageLogin', _0: a}; +}; +var _Gizra$elm_spa_exmple$App_Model$Logout = {ctor: 'Logout'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Test.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Test.elmi new file mode 100644 index 0000000..6db6e37 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Test.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Test.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Test.elmo new file mode 100644 index 0000000..6704ba1 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Test.elmo @@ -0,0 +1,120 @@ +var _Gizra$elm_spa_exmple$App_Test$getPageAsAuthenticated = function (page) { + var dummyUser = {id: 100, name: 'Foo', avatarUrl: 'https://example.com'}; + var model = _elm_lang$core$Native_Utils.update( + _Gizra$elm_spa_exmple$App_Model$emptyModel, + { + user: _krisajenkins$remotedata$RemoteData$Success(dummyUser) + }); + return function (_) { + return _.activePage; + }( + _elm_lang$core$Tuple$first( + A2( + _Gizra$elm_spa_exmple$App_Update$update, + _Gizra$elm_spa_exmple$App_Model$SetActivePage(page), + model))); +}; +var _Gizra$elm_spa_exmple$App_Test$getPageAsAnonymous = function (page) { + return function (_) { + return _.activePage; + }( + _elm_lang$core$Tuple$first( + A2( + _Gizra$elm_spa_exmple$App_Update$update, + _Gizra$elm_spa_exmple$App_Model$SetActivePage(page), + _Gizra$elm_spa_exmple$App_Model$emptyModel))); +}; +var _Gizra$elm_spa_exmple$App_Test$setActivePageTest = A2( + _elm_community$elm_test$Test$describe, + 'SetActivePage msg', + { + ctor: '::', + _0: A2( + _elm_community$elm_test$Test$test, + 'set new active page', + function (_p0) { + var _p1 = _p0; + var _p2 = A2( + _elm_lang$core$Debug$log, + 'foo', + { + ctor: '_Tuple3', + _0: true, + _1: 'me', + _2: { + ctor: '::', + _0: 'last', + _1: { + ctor: '::', + _0: 'one', + _1: {ctor: '[]'} + } + } + }); + return A2( + _elm_community$elm_test$Expect$equal, + _Gizra$elm_spa_exmple$App_Model$PageNotFound, + _Gizra$elm_spa_exmple$App_Test$getPageAsAnonymous(_Gizra$elm_spa_exmple$App_Model$PageNotFound)); + }), + _1: { + ctor: '::', + _0: A2( + _elm_community$elm_test$Test$test, + 'set Login page for anonymous user', + function (_p3) { + var _p4 = _p3; + return A2( + _elm_community$elm_test$Expect$equal, + _Gizra$elm_spa_exmple$App_Model$Login, + _Gizra$elm_spa_exmple$App_Test$getPageAsAnonymous(_Gizra$elm_spa_exmple$App_Model$Login)); + }), + _1: { + ctor: '::', + _0: A2( + _elm_community$elm_test$Test$test, + 'set My account page for anonymous user', + function (_p5) { + var _p6 = _p5; + return A2( + _elm_community$elm_test$Expect$equal, + _Gizra$elm_spa_exmple$App_Model$AccessDenied, + _Gizra$elm_spa_exmple$App_Test$getPageAsAnonymous(_Gizra$elm_spa_exmple$App_Model$MyAccount)); + }), + _1: { + ctor: '::', + _0: A2( + _elm_community$elm_test$Test$test, + 'set Login page for authenticated user', + function (_p7) { + var _p8 = _p7; + return A2( + _elm_community$elm_test$Expect$equal, + _Gizra$elm_spa_exmple$App_Model$AccessDenied, + _Gizra$elm_spa_exmple$App_Test$getPageAsAuthenticated(_Gizra$elm_spa_exmple$App_Model$Login)); + }), + _1: { + ctor: '::', + _0: A2( + _elm_community$elm_test$Test$test, + 'set My account page for authenticated user', + function (_p9) { + var _p10 = _p9; + return A2( + _elm_community$elm_test$Expect$equal, + _Gizra$elm_spa_exmple$App_Model$MyAccount, + _Gizra$elm_spa_exmple$App_Test$getPageAsAuthenticated(_Gizra$elm_spa_exmple$App_Model$MyAccount)); + }), + _1: {ctor: '[]'} + } + } + } + } + }); +var _Gizra$elm_spa_exmple$App_Test$all = A2( + _elm_community$elm_test$Test$describe, + 'App tests', + { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_Test$setActivePageTest, + _1: {ctor: '[]'} + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Update.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Update.elmi new file mode 100644 index 0000000..a7f8631 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Update.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Update.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Update.elmo new file mode 100644 index 0000000..b8de96a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-Update.elmo @@ -0,0 +1,123 @@ +var _Gizra$elm_spa_exmple$App_Update$setActivePageAccess = F2( + function (user, page) { + var _p0 = user; + if (_p0.ctor === 'Success') { + return _elm_lang$core$Native_Utils.eq(page, _Gizra$elm_spa_exmple$App_Model$Login) ? _Gizra$elm_spa_exmple$App_Model$AccessDenied : page; + } else { + return _elm_lang$core$Native_Utils.eq(page, _Gizra$elm_spa_exmple$App_Model$MyAccount) ? _Gizra$elm_spa_exmple$App_Model$AccessDenied : page; + } + }); +var _Gizra$elm_spa_exmple$App_Update$init = function (flags) { + var _p1 = function () { + var _p2 = A2(_elm_lang$core$Dict$get, flags.hostname, _Gizra$elm_spa_exmple$Config$configs); + if (_p2.ctor === 'Just') { + var _p3 = _p2._0; + var cmd = _elm_lang$core$String$isEmpty(flags.accessToken) ? _elm_lang$core$Platform_Cmd$none : A2( + _elm_lang$core$Platform_Cmd$map, + _Gizra$elm_spa_exmple$App_Model$PageLogin, + A2(_Gizra$elm_spa_exmple$Pages_Login_Update$fetchUserFromBackend, _p3.backendUrl, flags.accessToken)); + return { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Success(_p3), + _1: cmd + }; + } else { + return { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Failure('No config found'), + _1: _elm_lang$core$Platform_Cmd$none + }; + } + }(); + var config = _p1._0; + var cmds = _p1._1; + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + _Gizra$elm_spa_exmple$App_Model$emptyModel, + {accessToken: flags.accessToken, config: config}), + { + ctor: '::', + _0: cmds, + _1: {ctor: '[]'} + }); +}; +var _Gizra$elm_spa_exmple$App_Update$accessTokenPort = _elm_lang$core$Native_Platform.outgoingPort( + 'accessTokenPort', + function (v) { + return v; + }); +var _Gizra$elm_spa_exmple$App_Update$update = F2( + function (msg, model) { + var backendUrl = function () { + var _p4 = model.config; + if (_p4.ctor === 'Success') { + return _p4._0.backendUrl; + } else { + return ''; + } + }(); + var _p5 = msg; + switch (_p5.ctor) { + case 'Logout': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Native_Utils.update( + _Gizra$elm_spa_exmple$App_Model$emptyModel, + {accessToken: '', config: model.config}), + _1: _Gizra$elm_spa_exmple$App_Update$accessTokenPort('') + }; + case 'PageLogin': + var _p6 = A3(_Gizra$elm_spa_exmple$Pages_Login_Update$update, backendUrl, _p5._0, model.pageLogin); + var val = _p6._0; + var cmds = _p6._1; + var webDataUser = _p6._2._0; + var accessToken = _p6._2._1; + var modelUpdated = _elm_lang$core$Native_Utils.update( + model, + {pageLogin: val, accessToken: accessToken, user: webDataUser}); + var _p7 = function () { + var _p8 = webDataUser; + if (_p8.ctor === 'Success') { + return A2( + _Gizra$elm_spa_exmple$App_Update$update, + _Gizra$elm_spa_exmple$App_Model$SetActivePage(_Gizra$elm_spa_exmple$App_Model$MyAccount), + modelUpdated); + } else { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + modelUpdated, + {ctor: '[]'}); + } + }(); + var modelWithRedirect = _p7._0; + var setActivePageCmds = _p7._1; + return { + ctor: '_Tuple2', + _0: modelWithRedirect, + _1: _elm_lang$core$Platform_Cmd$batch( + { + ctor: '::', + _0: A2(_elm_lang$core$Platform_Cmd$map, _Gizra$elm_spa_exmple$App_Model$PageLogin, cmds), + _1: { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_Update$accessTokenPort(accessToken), + _1: { + ctor: '::', + _0: setActivePageCmds, + _1: {ctor: '[]'} + } + } + }) + }; + default: + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + { + activePage: A2(_Gizra$elm_spa_exmple$App_Update$setActivePageAccess, model.user, _p5._0) + }), + {ctor: '[]'}); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-View.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-View.elmi new file mode 100644 index 0000000..3423c69 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-View.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-View.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-View.elmo new file mode 100644 index 0000000..e345bd6 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/App-View.elmo @@ -0,0 +1,361 @@ +var _Gizra$elm_spa_exmple$App_View$classByPage = F2( + function (page, activePage) { + return _elm_lang$html$Html_Attributes$classList( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'item', _1: true}, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'active', + _1: _elm_lang$core$Native_Utils.eq(page, activePage) + }, + _1: {ctor: '[]'} + } + }); + }); +var _Gizra$elm_spa_exmple$App_View$viewFooter = A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui inverted vertical footer segment form-page'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui container'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$a, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$href('http://gizra.com'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$target('_blank'), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Gizra'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$span, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text(' // '), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$a, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$href('https://github.com/Gizra/elm-spa-example'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$target('_blank'), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Github'), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + } + }), + _1: {ctor: '[]'} + }); +var _Gizra$elm_spa_exmple$App_View$viewMainContent = function (model) { + var _p0 = model.activePage; + switch (_p0.ctor) { + case 'AccessDenied': + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Access denied'), + _1: {ctor: '[]'} + }); + case 'Login': + return A2( + _elm_lang$html$Html$map, + _Gizra$elm_spa_exmple$App_Model$PageLogin, + A2(_Gizra$elm_spa_exmple$Pages_Login_View$view, model.user, model.pageLogin)); + case 'MyAccount': + return _Gizra$elm_spa_exmple$Pages_MyAccount_View$view(model.user); + default: + return _Gizra$elm_spa_exmple$Pages_PageNotFound_View$view; + } +}; +var _Gizra$elm_spa_exmple$App_View$viewAvatar = function (user) { + var _p1 = user; + if (_p1.ctor === 'Success') { + return A2( + _elm_lang$html$Html$a, + { + ctor: '::', + _0: _elm_lang$html$Html_Events$onClick( + _Gizra$elm_spa_exmple$App_Model$SetActivePage(_Gizra$elm_spa_exmple$App_Model$MyAccount)), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui item'), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$img, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui avatar image'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$src(_p1._0.avatarUrl), + _1: {ctor: '[]'} + } + }, + {ctor: '[]'}), + _1: {ctor: '[]'} + }); + } else { + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + {ctor: '[]'}); + } +}; +var _Gizra$elm_spa_exmple$App_View$viewPageNotFoundItem = function (activePage) { + return A2( + _elm_lang$html$Html$a, + { + ctor: '::', + _0: A2(_Gizra$elm_spa_exmple$App_View$classByPage, _Gizra$elm_spa_exmple$App_Model$PageNotFound, activePage), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Events$onClick( + _Gizra$elm_spa_exmple$App_Model$SetActivePage(_Gizra$elm_spa_exmple$App_Model$PageNotFound)), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text('404 page'), + _1: {ctor: '[]'} + }); +}; +var _Gizra$elm_spa_exmple$App_View$navbarAuthenticated = function (model) { + return { + ctor: '::', + _0: A2( + _elm_lang$html$Html$a, + { + ctor: '::', + _0: A2(_Gizra$elm_spa_exmple$App_View$classByPage, _Gizra$elm_spa_exmple$App_Model$MyAccount, model.activePage), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Events$onClick( + _Gizra$elm_spa_exmple$App_Model$SetActivePage(_Gizra$elm_spa_exmple$App_Model$MyAccount)), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text('My Account'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_View$viewPageNotFoundItem(model.activePage), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('right menu'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_View$viewAvatar(model.user), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$a, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui item'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Events$onClick(_Gizra$elm_spa_exmple$App_Model$Logout), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Logout'), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }), + _1: {ctor: '[]'} + } + } + }; +}; +var _Gizra$elm_spa_exmple$App_View$navbarAnonymous = function (model) { + return { + ctor: '::', + _0: A2( + _elm_lang$html$Html$a, + { + ctor: '::', + _0: A2(_Gizra$elm_spa_exmple$App_View$classByPage, _Gizra$elm_spa_exmple$App_Model$Login, model.activePage), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Events$onClick( + _Gizra$elm_spa_exmple$App_Model$SetActivePage(_Gizra$elm_spa_exmple$App_Model$Login)), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Login'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_View$viewPageNotFoundItem(model.activePage), + _1: {ctor: '[]'} + } + }; +}; +var _Gizra$elm_spa_exmple$App_View$viewHeader = function (model) { + var navbar = function () { + var _p2 = model.user; + if (_p2.ctor === 'Success') { + return _Gizra$elm_spa_exmple$App_View$navbarAuthenticated; + } else { + return _Gizra$elm_spa_exmple$App_View$navbarAnonymous; + } + }(); + return A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui secondary pointing menu'), + _1: {ctor: '[]'} + }, + navbar(model)); +}; +var _Gizra$elm_spa_exmple$App_View$view = function (model) { + var _p3 = model.config; + if (_p3.ctor === 'Failure') { + return _Gizra$elm_spa_exmple$Config_View$view; + } else { + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui container main'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_View$viewHeader(model), + _1: { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_View$viewMainContent(model), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$pre, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui padded secondary segment'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text( + A2( + _elm_lang$core$Basics_ops['++'], + 'activePage: ', + _elm_lang$core$Basics$toString(model.activePage))), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text( + A2( + _elm_lang$core$Basics_ops['++'], + 'pageLogin: ', + _elm_lang$core$Basics$toString(model.pageLogin))), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text( + A2( + _elm_lang$core$Basics_ops['++'], + 'user: ', + _elm_lang$core$Basics$toString(model.user))), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + } + }), + _1: {ctor: '[]'} + } + } + }), + _1: { + ctor: '::', + _0: _Gizra$elm_spa_exmple$App_View$viewFooter, + _1: {ctor: '[]'} + } + }); + } +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-Model.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-Model.elmi new file mode 100644 index 0000000..3bbf7aa Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-Model.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-Model.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-Model.elmo new file mode 100644 index 0000000..dd576e2 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-Model.elmo @@ -0,0 +1,4 @@ +var _Gizra$elm_spa_exmple$Config_Model$Model = F2( + function (a, b) { + return {backendUrl: a, name: b}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-View.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-View.elmi new file mode 100644 index 0000000..1c74006 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-View.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-View.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-View.elmo new file mode 100644 index 0000000..2e7d052 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config-View.elmo @@ -0,0 +1,30 @@ +var _Gizra$elm_spa_exmple$Config_View$view = A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('config-error'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$h2, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Configuration error'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Check your Config.elm file and make sure you have defined the enviorement properly'), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config.elmi new file mode 100644 index 0000000..9c3896e Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config.elmo new file mode 100644 index 0000000..94e8d6b --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Config.elmo @@ -0,0 +1,12 @@ +var _Gizra$elm_spa_exmple$Config$production = {backendUrl: 'https://live-hedley-elm.pantheonsite.io', name: 'gh-pages'}; +var _Gizra$elm_spa_exmple$Config$local = {backendUrl: 'https://live-hedley-elm.pantheonsite.io', name: 'local'}; +var _Gizra$elm_spa_exmple$Config$configs = _elm_lang$core$Dict$fromList( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'localhost', _1: _Gizra$elm_spa_exmple$Config$local}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'example', _1: _Gizra$elm_spa_exmple$Config$production}, + _1: {ctor: '[]'} + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Main.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Main.elmi new file mode 100644 index 0000000..0067978 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Main.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Main.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Main.elmo new file mode 100644 index 0000000..6f95dbe --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Main.elmo @@ -0,0 +1,17 @@ +var _Gizra$elm_spa_exmple$Main$subscriptions = function (model) { + return _elm_lang$core$Platform_Sub$none; +}; +var _Gizra$elm_spa_exmple$Main$main = _elm_lang$html$Html$programWithFlags( + {init: _Gizra$elm_spa_exmple$App_Update$init, update: _Gizra$elm_spa_exmple$App_Update$update, view: _Gizra$elm_spa_exmple$App_View$view, subscriptions: _Gizra$elm_spa_exmple$Main$subscriptions})( + A2( + _elm_lang$core$Json_Decode$andThen, + function (accessToken) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (hostname) { + return _elm_lang$core$Json_Decode$succeed( + {accessToken: accessToken, hostname: hostname}); + }, + A2(_elm_lang$core$Json_Decode$field, 'hostname', _elm_lang$core$Json_Decode$string)); + }, + A2(_elm_lang$core$Json_Decode$field, 'accessToken', _elm_lang$core$Json_Decode$string))); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Decoder.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Decoder.elmi new file mode 100644 index 0000000..c5a0f96 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Decoder.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Decoder.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Decoder.elmo new file mode 100644 index 0000000..e64d735 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Decoder.elmo @@ -0,0 +1,46 @@ +var _Gizra$elm_spa_exmple$Pages_Login_Decoder$encodeCredentials = function (_p0) { + var _p1 = _p0; + var base64 = _truqu$elm_base64$Base64$encode( + A2( + _elm_lang$core$Basics_ops['++'], + _p1._0, + A2(_elm_lang$core$Basics_ops['++'], ':', _p1._1))); + var _p2 = base64; + if (_p2.ctor === 'Ok') { + return _p2._0; + } else { + return ''; + } +}; +var _Gizra$elm_spa_exmple$Pages_Login_Decoder$decodeError = A2( + _elm_lang$core$Json_Decode$at, + { + ctor: '::', + _0: 'data', + _1: { + ctor: '::', + _0: 'error', + _1: {ctor: '[]'} + } + }, + _elm_lang$core$Json_Decode$string); +var _Gizra$elm_spa_exmple$Pages_Login_Decoder$decodeAccessToken = A2( + _elm_lang$core$Json_Decode$at, + { + ctor: '::', + _0: 'access_token', + _1: {ctor: '[]'} + }, + _elm_lang$core$Json_Decode$string); +var _Gizra$elm_spa_exmple$Pages_Login_Decoder$decodeUser = A2( + _elm_lang$core$Json_Decode$at, + { + ctor: '::', + _0: 'data', + _1: { + ctor: '::', + _0: '0', + _1: {ctor: '[]'} + } + }, + _Gizra$elm_spa_exmple$User_Decoder$decodeUser); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Model.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Model.elmi new file mode 100644 index 0000000..446ea0c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Model.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Model.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Model.elmo new file mode 100644 index 0000000..7e2492e --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Model.elmo @@ -0,0 +1,28 @@ +var _Gizra$elm_spa_exmple$Pages_Login_Model$LoginForm = F2( + function (a, b) { + return {name: a, pass: b}; + }); +var _Gizra$elm_spa_exmple$Pages_Login_Model$emptyModel = { + loginForm: A2(_Gizra$elm_spa_exmple$Pages_Login_Model$LoginForm, 'demo', '1234') +}; +var _Gizra$elm_spa_exmple$Pages_Login_Model$Model = function (a) { + return {loginForm: a}; +}; +var _Gizra$elm_spa_exmple$Pages_Login_Model$Error = function (a) { + return {ctor: 'Error', _0: a}; +}; +var _Gizra$elm_spa_exmple$Pages_Login_Model$None = {ctor: 'None'}; +var _Gizra$elm_spa_exmple$Pages_Login_Model$TryLogin = {ctor: 'TryLogin'}; +var _Gizra$elm_spa_exmple$Pages_Login_Model$SetPassword = function (a) { + return {ctor: 'SetPassword', _0: a}; +}; +var _Gizra$elm_spa_exmple$Pages_Login_Model$SetName = function (a) { + return {ctor: 'SetName', _0: a}; +}; +var _Gizra$elm_spa_exmple$Pages_Login_Model$HandleFetchedUser = F2( + function (a, b) { + return {ctor: 'HandleFetchedUser', _0: a, _1: b}; + }); +var _Gizra$elm_spa_exmple$Pages_Login_Model$HandleFetchedAccessToken = function (a) { + return {ctor: 'HandleFetchedAccessToken', _0: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Update.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Update.elmi new file mode 100644 index 0000000..14d696d Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Update.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Update.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Update.elmo new file mode 100644 index 0000000..e677444 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-Update.elmo @@ -0,0 +1,115 @@ +var _Gizra$elm_spa_exmple$Pages_Login_Update$fetchUserFromBackend = F2( + function (backendUrl, accessToken) { + return A3( + _Gizra$elm_spa_exmple$Utils_WebData$sendWithHandler, + _Gizra$elm_spa_exmple$Pages_Login_Decoder$decodeUser, + _Gizra$elm_spa_exmple$Pages_Login_Model$HandleFetchedUser(accessToken), + A2( + _lukewestby$elm_http_builder$HttpBuilder$withQueryParams, + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'access_token', _1: accessToken}, + _1: {ctor: '[]'} + }, + _lukewestby$elm_http_builder$HttpBuilder$get( + A2(_elm_lang$core$Basics_ops['++'], backendUrl, '/api/me')))); + }); +var _Gizra$elm_spa_exmple$Pages_Login_Update$fetchAccessTokenFromBackend = F2( + function (backendUrl, loginForm) { + var credentials = _Gizra$elm_spa_exmple$Pages_Login_Decoder$encodeCredentials( + {ctor: '_Tuple2', _0: loginForm.name, _1: loginForm.pass}); + return A3( + _Gizra$elm_spa_exmple$Utils_WebData$sendWithHandler, + _Gizra$elm_spa_exmple$Pages_Login_Decoder$decodeAccessToken, + _Gizra$elm_spa_exmple$Pages_Login_Model$HandleFetchedAccessToken, + A3( + _lukewestby$elm_http_builder$HttpBuilder$withHeader, + 'Authorization', + A2(_elm_lang$core$Basics_ops['++'], 'Basic ', credentials), + _lukewestby$elm_http_builder$HttpBuilder$get( + A2(_elm_lang$core$Basics_ops['++'], backendUrl, '/api/login-token')))); + }); +var _Gizra$elm_spa_exmple$Pages_Login_Update$update = F3( + function (backendUrl, msg, model) { + var _p0 = msg; + switch (_p0.ctor) { + case 'HandleFetchedAccessToken': + if (_p0._0.ctor === 'Ok') { + var _p1 = _p0._0._0; + return { + ctor: '_Tuple3', + _0: model, + _1: A2(_Gizra$elm_spa_exmple$Pages_Login_Update$fetchUserFromBackend, backendUrl, _p1), + _2: {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$Loading, _1: _p1} + }; + } else { + return { + ctor: '_Tuple3', + _0: model, + _1: _elm_lang$core$Platform_Cmd$none, + _2: { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Failure(_p0._0._0), + _1: '' + } + }; + } + case 'HandleFetchedUser': + if (_p0._1.ctor === 'Ok') { + return { + ctor: '_Tuple3', + _0: model, + _1: _elm_lang$core$Platform_Cmd$none, + _2: { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Success(_p0._1._0), + _1: _p0._0 + } + }; + } else { + return { + ctor: '_Tuple3', + _0: model, + _1: _elm_lang$core$Platform_Cmd$none, + _2: { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Failure(_p0._1._0), + _1: _p0._0 + } + }; + } + case 'SetName': + var loginForm = model.loginForm; + var loginForm_ = _elm_lang$core$Native_Utils.update( + loginForm, + {name: _p0._0}); + return { + ctor: '_Tuple3', + _0: _elm_lang$core$Native_Utils.update( + model, + {loginForm: loginForm_}), + _1: _elm_lang$core$Platform_Cmd$none, + _2: {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$NotAsked, _1: ''} + }; + case 'SetPassword': + var loginForm = model.loginForm; + var loginForm_ = _elm_lang$core$Native_Utils.update( + loginForm, + {pass: _p0._0}); + return { + ctor: '_Tuple3', + _0: _elm_lang$core$Native_Utils.update( + model, + {loginForm: loginForm_}), + _1: _elm_lang$core$Platform_Cmd$none, + _2: {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$NotAsked, _1: ''} + }; + default: + return { + ctor: '_Tuple3', + _0: model, + _1: A2(_Gizra$elm_spa_exmple$Pages_Login_Update$fetchAccessTokenFromBackend, backendUrl, model.loginForm), + _2: {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$Loading, _1: ''} + }; + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-View.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-View.elmi new file mode 100644 index 0000000..e5001b1 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-View.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-View.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-View.elmo new file mode 100644 index 0000000..d6d5eae --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-Login-View.elmo @@ -0,0 +1,178 @@ +var _Gizra$elm_spa_exmple$Pages_Login_View$view = F2( + function (user, model) { + var error = function () { + var _p0 = user; + if (_p0.ctor === 'Failure') { + return A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui error'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _Gizra$elm_spa_exmple$Utils_WebData$viewError(_p0._0), + _1: {ctor: '[]'} + }); + } else { + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + {ctor: '[]'}); + } + }(); + var _p1 = function () { + var _p2 = user; + switch (_p2.ctor) { + case 'Loading': + return {ctor: '_Tuple2', _0: true, _1: false}; + case 'Failure': + return {ctor: '_Tuple2', _0: false, _1: true}; + default: + return {ctor: '_Tuple2', _0: false, _1: false}; + } + }(); + var isLoading = _p1._0; + var isError = _p1._1; + var inputClasses = _elm_lang$html$Html_Attributes$classList( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'ui action input', _1: true}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'error', _1: isError}, + _1: {ctor: '[]'} + } + }); + var spinner = A2( + _elm_lang$html$Html$i, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('notched circle loading icon'), + _1: {ctor: '[]'} + }, + {ctor: '[]'}); + return A2( + _elm_lang$html$Html$form, + { + ctor: '::', + _0: _elm_lang$html$Html_Events$onSubmit(_Gizra$elm_spa_exmple$Pages_Login_Model$TryLogin), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$action('javascript:void(0);'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui stacked segment'), + _1: {ctor: '[]'} + } + } + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: inputClasses, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$input, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$type_('text'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$placeholder('Name'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Events$onInput(_Gizra$elm_spa_exmple$Pages_Login_Model$SetName), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$value(model.loginForm.name), + _1: {ctor: '[]'} + } + } + } + }, + {ctor: '[]'}), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$input, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$type_('password'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$placeholder('Password'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Events$onInput(_Gizra$elm_spa_exmple$Pages_Login_Model$SetPassword), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$value(model.loginForm.pass), + _1: {ctor: '[]'} + } + } + } + }, + {ctor: '[]'}), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$button, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$disabled(isLoading), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui primary button'), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$span, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$hidden(!isLoading), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: spinner, + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$span, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$hidden(isLoading), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text('Login'), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }), + _1: {ctor: '[]'} + } + } + }), + _1: { + ctor: '::', + _0: error, + _1: {ctor: '[]'} + } + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-MyAccount-View.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-MyAccount-View.elmi new file mode 100644 index 0000000..21c5b43 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-MyAccount-View.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-MyAccount-View.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-MyAccount-View.elmo new file mode 100644 index 0000000..6a61081 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-MyAccount-View.elmo @@ -0,0 +1,81 @@ +var _Gizra$elm_spa_exmple$Pages_MyAccount_View$view = function (user) { + var _p0 = function () { + var _p1 = user; + if (_p1.ctor === 'Success') { + var _p2 = _p1._0; + return { + ctor: '_Tuple2', + _0: _p2.name, + _1: A2( + _elm_lang$html$Html$img, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$src(_p2.avatarUrl), + _1: {ctor: '[]'} + }, + {ctor: '[]'}) + }; + } else { + return { + ctor: '_Tuple2', + _0: '', + _1: A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + {ctor: '[]'}) + }; + } + }(); + var name = _p0._0; + var avatar = _p0._1; + return A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui centered card'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('image'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: avatar, + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('content'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('header'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text( + A2(_elm_lang$core$Basics_ops['++'], 'Welcome ', name)), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-PageNotFound-View.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-PageNotFound-View.elmi new file mode 100644 index 0000000..baea4a1 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-PageNotFound-View.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-PageNotFound-View.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-PageNotFound-View.elmo new file mode 100644 index 0000000..e6f22f8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Pages-PageNotFound-View.elmo @@ -0,0 +1,19 @@ +var _Gizra$elm_spa_exmple$Pages_PageNotFound_View$view = A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('ui segment center aligned'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$h2, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('This is a 404 page!'), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Decoder.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Decoder.elmi new file mode 100644 index 0000000..1c691df Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Decoder.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Decoder.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Decoder.elmo new file mode 100644 index 0000000..439e512 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Decoder.elmo @@ -0,0 +1,14 @@ +var _Gizra$elm_spa_exmple$User_Decoder$decodeUser = A4( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optional, + 'avatar_url', + _elm_lang$core$Json_Decode$string, + 'https://github.com/foo.png?s=90', + A3( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required, + 'label', + _elm_lang$core$Json_Decode$string, + A3( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required, + 'id', + _Gizra$elm_spa_exmple$Utils_Json$decodeInt, + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$decode(_Gizra$elm_spa_exmple$User_Model$User)))); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Model.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Model.elmi new file mode 100644 index 0000000..ef029f5 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Model.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Model.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Model.elmo new file mode 100644 index 0000000..a26f476 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/User-Model.elmo @@ -0,0 +1,4 @@ +var _Gizra$elm_spa_exmple$User_Model$User = F3( + function (a, b, c) { + return {id: a, name: b, avatarUrl: c}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-Json.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-Json.elmi new file mode 100644 index 0000000..88033e2 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-Json.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-Json.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-Json.elmo new file mode 100644 index 0000000..343bfc8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-Json.elmo @@ -0,0 +1,21 @@ +var _Gizra$elm_spa_exmple$Utils_Json$decodeError = A2(_elm_lang$core$Json_Decode$field, 'title', _elm_lang$core$Json_Decode$string); +var _Gizra$elm_spa_exmple$Utils_Json$decodeInt = _elm_lang$core$Json_Decode$oneOf( + { + ctor: '::', + _0: _elm_lang$core$Json_Decode$int, + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$Json_Decode$andThen, + function (val) { + var _p0 = _elm_lang$core$String$toInt(val); + if (_p0.ctor === 'Ok') { + return _elm_lang$core$Json_Decode$succeed(_p0._0); + } else { + return _elm_lang$core$Json_Decode$fail('Cannot convert string to integer'); + } + }, + _elm_lang$core$Json_Decode$string), + _1: {ctor: '[]'} + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-WebData.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-WebData.elmi new file mode 100644 index 0000000..9422588 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-WebData.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-WebData.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-WebData.elmo new file mode 100644 index 0000000..8388a51 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/Gizra/elm-spa-exmple/1.0.0/Utils-WebData.elmo @@ -0,0 +1,96 @@ +var _Gizra$elm_spa_exmple$Utils_WebData$sendWithHandler = F3( + function (decoder, tagger, builder) { + return A2( + _lukewestby$elm_http_builder$HttpBuilder$send, + tagger, + A2( + _lukewestby$elm_http_builder$HttpBuilder$withExpect, + _elm_lang$http$Http$expectJson(decoder), + builder)); + }); +var _Gizra$elm_spa_exmple$Utils_WebData$viewError = function (error) { + var _p0 = error; + switch (_p0.ctor) { + case 'BadUrl': + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('URL is not valid.'), + _1: {ctor: '[]'} + }); + case 'BadPayload': + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$p, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('The server responded with data of an unexpected type.'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$p, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text(_p0._0), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }); + case 'NetworkError': + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('There was a network error.'), + _1: {ctor: '[]'} + }); + case 'Timeout': + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('The network request timed out.'), + _1: {ctor: '[]'} + }); + default: + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('The server indicated the following error:'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text(_p0._0.status.message), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }); + } +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmi new file mode 100644 index 0000000..3a5fc8b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmo new file mode 100644 index 0000000..cb10246 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/Json-Decode-Pipeline.elmo @@ -0,0 +1,79 @@ +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$decode = _elm_lang$core$Json_Decode$succeed; +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$resolve = _elm_lang$core$Json_Decode$andThen(_elm_lang$core$Basics$identity); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom = _elm_lang$core$Json_Decode$map2( + F2( + function (x, y) { + return y(x); + })); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$hardcoded = function (_p0) { + return _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom( + _elm_lang$core$Json_Decode$succeed(_p0)); +}; +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalDecoder = F3( + function (pathDecoder, valDecoder, fallback) { + var nullOr = function (decoder) { + return _elm_lang$core$Json_Decode$oneOf( + { + ctor: '::', + _0: decoder, + _1: { + ctor: '::', + _0: _elm_lang$core$Json_Decode$null(fallback), + _1: {ctor: '[]'} + } + }); + }; + var handleResult = function (input) { + var _p1 = A2(_elm_lang$core$Json_Decode$decodeValue, pathDecoder, input); + if (_p1.ctor === 'Ok') { + var _p2 = A2( + _elm_lang$core$Json_Decode$decodeValue, + nullOr(valDecoder), + _p1._0); + if (_p2.ctor === 'Ok') { + return _elm_lang$core$Json_Decode$succeed(_p2._0); + } else { + return _elm_lang$core$Json_Decode$fail(_p2._0); + } + } else { + return _elm_lang$core$Json_Decode$succeed(fallback); + } + }; + return A2(_elm_lang$core$Json_Decode$andThen, handleResult, _elm_lang$core$Json_Decode$value); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalAt = F4( + function (path, valDecoder, fallback, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A3( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalDecoder, + A2(_elm_lang$core$Json_Decode$at, path, _elm_lang$core$Json_Decode$value), + valDecoder, + fallback), + decoder); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optional = F4( + function (key, valDecoder, fallback, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A3( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optionalDecoder, + A2(_elm_lang$core$Json_Decode$field, key, _elm_lang$core$Json_Decode$value), + valDecoder, + fallback), + decoder); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$requiredAt = F3( + function (path, valDecoder, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A2(_elm_lang$core$Json_Decode$at, path, valDecoder), + decoder); + }); +var _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required = F3( + function (key, valDecoder, decoder) { + return A2( + _NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$custom, + A2(_elm_lang$core$Json_Decode$field, key, valDecoder), + decoder); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/graph.dat new file mode 100644 index 0000000..fccff33 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/NoRedInk/elm-decode-pipeline/3.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Expect.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Expect.elmi new file mode 100644 index 0000000..38b523b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Expect.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Expect.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Expect.elmo new file mode 100644 index 0000000..7ade01c --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Expect.elmo @@ -0,0 +1,392 @@ +var _elm_community$elm_test$Expect$formatDiffs = F2( + function (diffType, diffs) { + if (_elm_lang$core$List$isEmpty(diffs)) { + return ''; + } else { + var modifier = function () { + var _p0 = diffType; + if (_p0.ctor === 'Extra') { + return '+'; + } else { + return '-'; + } + }(); + return function (d) { + return A2( + _elm_lang$core$Basics_ops['++'], + ' ', + A2( + _elm_lang$core$Basics_ops['++'], + modifier, + A2( + _elm_lang$core$Basics_ops['++'], + '[ ', + A2(_elm_lang$core$Basics_ops['++'], d, ' ]')))); + }( + A2( + _elm_lang$core$String$join, + ', ', + A2(_elm_lang$core$List$map, _elm_lang$core$Basics$toString, diffs))); + } + }); +var _elm_community$elm_test$Expect$reportFailure = F3( + function (comparison, expected, actual) { + return A2( + _elm_lang$core$String$join, + '\n', + { + ctor: '::', + _0: actual, + _1: { + ctor: '::', + _0: '╷', + _1: { + ctor: '::', + _0: A2(_elm_lang$core$Basics_ops['++'], '│ ', comparison), + _1: { + ctor: '::', + _0: '╵', + _1: { + ctor: '::', + _0: expected, + _1: {ctor: '[]'} + } + } + } + } + }); + }); +var _elm_community$elm_test$Expect$onFail = F2( + function (str, expectation) { + var _p1 = expectation; + if (_p1.ctor === 'Pass') { + return expectation; + } else { + return A2(_elm_community$elm_test$Test_Expectation$Fail, _p1._0, str); + } + }); +var _elm_community$elm_test$Expect$getFailure = function (expectation) { + var _p2 = expectation; + if (_p2.ctor === 'Pass') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just( + {given: _p2._0, message: _p2._1}); + } +}; +var _elm_community$elm_test$Expect$fail = _elm_community$elm_test$Test_Expectation$Fail(''); +var _elm_community$elm_test$Expect$pass = _elm_community$elm_test$Test_Expectation$Pass; +var _elm_community$elm_test$Expect$compareWith = F4( + function (label, compare, expected, actual) { + return A2(compare, actual, expected) ? _elm_community$elm_test$Expect$pass : _elm_community$elm_test$Expect$fail( + A3( + _elm_community$elm_test$Expect$reportFailure, + label, + _elm_lang$core$Basics$toString(expected), + _elm_lang$core$Basics$toString(actual))); + }); +var _elm_community$elm_test$Expect$allHelp = F2( + function (list, query) { + allHelp: + while (true) { + var _p3 = list; + if (_p3.ctor === '[]') { + return _elm_community$elm_test$Expect$pass; + } else { + var _p4 = _p3._0(query); + if (_p4.ctor === 'Pass') { + var _v5 = _p3._1, + _v6 = query; + list = _v5; + query = _v6; + continue allHelp; + } else { + return _p4; + } + } + } + }); +var _elm_community$elm_test$Expect$all = F2( + function (list, query) { + return _elm_lang$core$List$isEmpty(list) ? _elm_community$elm_test$Expect$fail('Expect.all received an empty list. I assume this was due to a mistake somewhere, so I\'m failing this test!') : A2(_elm_community$elm_test$Expect$allHelp, list, query); + }); +var _elm_community$elm_test$Expect$equalLists = F2( + function (expected, actual) { + if (_elm_lang$core$Native_Utils.eq(expected, actual)) { + return _elm_community$elm_test$Expect$pass; + } else { + var result = A2( + _elm_lang$core$Maybe$map, + function (_p5) { + var _p6 = _p5; + var _p9 = _p6._0; + var _p8 = _p6._2; + var _p7 = _p6._1; + return _elm_community$elm_test$Expect$fail( + A2( + _elm_lang$core$String$join, + '\n', + { + ctor: '::', + _0: _elm_lang$core$Basics$toString(actual), + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$Basics_ops['++'], + 'first diff at index index ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p9), + A2( + _elm_lang$core$Basics_ops['++'], + ': +`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p7), + A2( + _elm_lang$core$Basics_ops['++'], + '`, -`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p8), + '`')))))), + _1: { + ctor: '::', + _0: '╷', + _1: { + ctor: '::', + _0: '│ Expect.equalLists', + _1: { + ctor: '::', + _0: '╵', + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$Basics_ops['++'], + 'first diff at index index ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p9), + A2( + _elm_lang$core$Basics_ops['++'], + ': +`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p8), + A2( + _elm_lang$core$Basics_ops['++'], + '`, -`', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p7), + '`')))))), + _1: { + ctor: '::', + _0: _elm_lang$core$Basics$toString(expected), + _1: {ctor: '[]'} + } + } + } + } + } + } + })); + }, + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$filterMap, + function (_p10) { + var _p11 = _p10; + var _p13 = _p11._1._1; + var _p12 = _p11._1._0; + return _elm_lang$core$Native_Utils.eq(_p13, _p12) ? _elm_lang$core$Maybe$Nothing : _elm_lang$core$Maybe$Just( + {ctor: '_Tuple3', _0: _p11._0, _1: _p12, _2: _p13}); + }, + A2( + _elm_lang$core$List$indexedMap, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A3( + _elm_lang$core$List$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + actual, + expected))))); + var _p14 = result; + if (_p14.ctor === 'Just') { + return _p14._0; + } else { + var _p15 = A2( + _elm_lang$core$Basics$compare, + _elm_lang$core$List$length(actual), + _elm_lang$core$List$length(expected)); + switch (_p15.ctor) { + case 'GT': + return _elm_community$elm_test$Expect$fail( + A3( + _elm_community$elm_test$Expect$reportFailure, + 'Expect.equalLists was longer than', + _elm_lang$core$Basics$toString(expected), + _elm_lang$core$Basics$toString(actual))); + case 'LT': + return _elm_community$elm_test$Expect$fail( + A3( + _elm_community$elm_test$Expect$reportFailure, + 'Expect.equalLists was shorter than', + _elm_lang$core$Basics$toString(expected), + _elm_lang$core$Basics$toString(actual))); + default: + return _elm_community$elm_test$Expect$pass; + } + } + } + }); +var _elm_community$elm_test$Expect$false = F2( + function (message, bool) { + return bool ? _elm_community$elm_test$Expect$fail(message) : _elm_community$elm_test$Expect$pass; + }); +var _elm_community$elm_test$Expect$true = F2( + function (message, bool) { + return bool ? _elm_community$elm_test$Expect$pass : _elm_community$elm_test$Expect$fail(message); + }); +var _elm_community$elm_test$Expect$atLeast = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.atLeast', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) > -1; + })); +var _elm_community$elm_test$Expect$greaterThan = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.greaterThan', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) > 0; + })); +var _elm_community$elm_test$Expect$atMost = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.atMost', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) < 1; + })); +var _elm_community$elm_test$Expect$lessThan = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.lessThan', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.cmp(x, y) < 0; + })); +var _elm_community$elm_test$Expect$notEqual = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.notEqual', + F2( + function (x, y) { + return !_elm_lang$core$Native_Utils.eq(x, y); + })); +var _elm_community$elm_test$Expect$equal = A2( + _elm_community$elm_test$Expect$compareWith, + 'Expect.equal', + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })); +var _elm_community$elm_test$Expect$Missing = {ctor: 'Missing'}; +var _elm_community$elm_test$Expect$Extra = {ctor: 'Extra'}; +var _elm_community$elm_test$Expect$reportCollectionFailure = F5( + function (comparison, expected, actual, missingKeys, extraKeys) { + return A2( + _elm_lang$core$String$join, + '\n', + { + ctor: '::', + _0: _elm_lang$core$Basics$toString(actual), + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$Basics_ops['++'], + 'diff:', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Missing, missingKeys), + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Extra, extraKeys))), + _1: { + ctor: '::', + _0: '╷', + _1: { + ctor: '::', + _0: A2(_elm_lang$core$Basics_ops['++'], '│ ', comparison), + _1: { + ctor: '::', + _0: '╵', + _1: { + ctor: '::', + _0: A2( + _elm_lang$core$Basics_ops['++'], + 'diff:', + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Extra, missingKeys), + A2(_elm_community$elm_test$Expect$formatDiffs, _elm_community$elm_test$Expect$Missing, extraKeys))), + _1: { + ctor: '::', + _0: _elm_lang$core$Basics$toString(expected), + _1: {ctor: '[]'} + } + } + } + } + } + } + }); + }); +var _elm_community$elm_test$Expect$equalDicts = F2( + function (expected, actual) { + if (_elm_lang$core$Native_Utils.eq( + _elm_lang$core$Dict$toList(expected), + _elm_lang$core$Dict$toList(actual))) { + return _elm_community$elm_test$Expect$pass; + } else { + var differ = F4( + function (dict, k, v, diffs) { + return _elm_lang$core$Native_Utils.eq( + A2(_elm_lang$core$Dict$get, k, dict), + _elm_lang$core$Maybe$Just(v)) ? diffs : { + ctor: '::', + _0: {ctor: '_Tuple2', _0: k, _1: v}, + _1: diffs + }; + }); + var missingKeys = A3( + _elm_lang$core$Dict$foldr, + differ(actual), + {ctor: '[]'}, + expected); + var extraKeys = A3( + _elm_lang$core$Dict$foldr, + differ(expected), + {ctor: '[]'}, + actual); + return _elm_community$elm_test$Expect$fail( + A5(_elm_community$elm_test$Expect$reportCollectionFailure, 'Expect.equalDicts', expected, actual, missingKeys, extraKeys)); + } + }); +var _elm_community$elm_test$Expect$equalSets = F2( + function (expected, actual) { + if (_elm_lang$core$Native_Utils.eq( + _elm_lang$core$Set$toList(expected), + _elm_lang$core$Set$toList(actual))) { + return _elm_community$elm_test$Expect$pass; + } else { + var extraKeys = _elm_lang$core$Set$toList( + A2(_elm_lang$core$Set$diff, actual, expected)); + var missingKeys = _elm_lang$core$Set$toList( + A2(_elm_lang$core$Set$diff, expected, actual)); + return _elm_community$elm_test$Expect$fail( + A5(_elm_community$elm_test$Expect$reportCollectionFailure, 'Expect.equalSets', expected, actual, missingKeys, extraKeys)); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz-Internal.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz-Internal.elmi new file mode 100644 index 0000000..59971c5 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz-Internal.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz-Internal.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz-Internal.elmo new file mode 100644 index 0000000..003bed5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz-Internal.elmo @@ -0,0 +1,43 @@ +var _elm_community$elm_test$Fuzz_Internal$unpackGenTree = function (_p0) { + var _p1 = _p0; + var _p2 = _p1._0(false); + if (_p2.ctor === 'Shrink') { + return _p2._0; + } else { + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz.Internal', + { + start: {line: 58, column: 13}, + end: {line: 58, column: 24} + }), + 'This shouldn\'t happen: Fuzz.Internal.unpackGenTree', + _p2); + } +}; +var _elm_community$elm_test$Fuzz_Internal$unpackGenVal = function (_p3) { + var _p4 = _p3; + var _p5 = _p4._0(true); + if (_p5.ctor === 'Gen') { + return _p5._0; + } else { + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz.Internal', + { + start: {line: 48, column: 13}, + end: {line: 48, column: 24} + }), + 'This shouldn\'t happen: Fuzz.Internal.unpackGenVal', + _p5); + } +}; +var _elm_community$elm_test$Fuzz_Internal$Fuzzer = function (a) { + return {ctor: 'Fuzzer', _0: a}; +}; +var _elm_community$elm_test$Fuzz_Internal$Shrink = function (a) { + return {ctor: 'Shrink', _0: a}; +}; +var _elm_community$elm_test$Fuzz_Internal$Gen = function (a) { + return {ctor: 'Gen', _0: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz.elmi new file mode 100644 index 0000000..5553c44 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz.elmo new file mode 100644 index 0000000..a0ca052 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Fuzz.elmo @@ -0,0 +1,1124 @@ +var _elm_community$elm_test$Fuzz$okOrCrash = function (result) { + var _p0 = result; + if (_p0.ctor === 'Ok') { + return _p0._0; + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'Fuzz', + { + start: {line: 797, column: 5}, + end: {line: 802, column: 28} + }, + _p0)(_p0._0); + } +}; +var _elm_community$elm_test$Fuzz$frequency = function (list) { + return _elm_lang$core$List$isEmpty(list) ? _elm_lang$core$Result$Err('You must provide at least one frequency pair.') : (A2( + _elm_lang$core$List$any, + function (_p2) { + var _p3 = _p2; + return _elm_lang$core$Native_Utils.cmp(_p3._0, 0) < 0; + }, + list) ? _elm_lang$core$Result$Err('No frequency weights can be less than 0.') : ((_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$List$sum( + A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$first, list)), + 0) < 1) ? _elm_lang$core$Result$Err('Frequency weights must sum to more than 0.') : _elm_lang$core$Result$Ok( + _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + return noShrink ? _elm_community$elm_test$Fuzz_Internal$Gen( + _mgold$elm_random_pcg$Random_Pcg$frequency( + A2( + _elm_lang$core$List$map, + function (_p4) { + var _p5 = _p4; + return { + ctor: '_Tuple2', + _0: _p5._0, + _1: _elm_community$elm_test$Fuzz_Internal$unpackGenVal(_p5._1) + }; + }, + list))) : _elm_community$elm_test$Fuzz_Internal$Shrink( + _mgold$elm_random_pcg$Random_Pcg$frequency( + A2( + _elm_lang$core$List$map, + function (_p6) { + var _p7 = _p6; + return { + ctor: '_Tuple2', + _0: _p7._0, + _1: _elm_community$elm_test$Fuzz_Internal$unpackGenTree(_p7._1) + }; + }, + list))); + })))); +}; +var _elm_community$elm_test$Fuzz$frequencyOrCrash = function (_p8) { + return _elm_community$elm_test$Fuzz$okOrCrash( + _elm_community$elm_test$Fuzz$frequency(_p8)); +}; +var _elm_community$elm_test$Fuzz$unwindLazyList = function (lazyListOfGenerators) { + var _p9 = _elm_community$lazy_list$Lazy_List$headAndTail(lazyListOfGenerators); + if (_p9.ctor === 'Nothing') { + return _mgold$elm_random_pcg$Random_Pcg$constant(_elm_community$lazy_list$Lazy_List$empty); + } else { + return A3( + _mgold$elm_random_pcg$Random_Pcg$map2, + _elm_community$lazy_list$Lazy_List$cons, + _p9._0._0, + _elm_community$elm_test$Fuzz$unwindLazyList(_p9._0._1)); + } +}; +var _elm_community$elm_test$Fuzz$unwindRoseTree = function (_p10) { + var _p11 = _p10; + var _p13 = _p11._0; + var _p12 = _elm_community$lazy_list$Lazy_List$headAndTail(_p11._1); + if (_p12.ctor === 'Nothing') { + return A2(_mgold$elm_random_pcg$Random_Pcg$map, _elm_community$elm_test$RoseTree$singleton, _p13); + } else { + return A5( + _mgold$elm_random_pcg$Random_Pcg$map4, + F4( + function (a, b, c, d) { + return A2( + _elm_community$elm_test$RoseTree$Rose, + a, + A2( + _elm_community$lazy_list$Lazy_List$cons, + A2(_elm_community$elm_test$RoseTree$Rose, b, c), + d)); + }), + _p13, + _p12._0._0._0, + _elm_community$elm_test$Fuzz$unwindLazyList( + A2(_elm_community$lazy_list$Lazy_List$map, _elm_community$elm_test$Fuzz$unwindRoseTree, _p12._0._0._1)), + _elm_community$elm_test$Fuzz$unwindLazyList( + A2(_elm_community$lazy_list$Lazy_List$map, _elm_community$elm_test$Fuzz$unwindRoseTree, _p12._0._1))); + } +}; +var _elm_community$elm_test$Fuzz$andThenRoseTrees = F2( + function (transform, genTree) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (_p14) { + var _p15 = _p14; + var genOtherChildren = A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_community$lazy_list$Lazy_List$map(_elm_community$elm_test$RoseTree$flatten), + _elm_community$elm_test$Fuzz$unwindLazyList( + A2( + _elm_community$lazy_list$Lazy_List$map, + function (rt) { + return _elm_community$elm_test$Fuzz$unwindRoseTree( + A2( + _elm_community$elm_test$RoseTree$map, + function (_p16) { + return _elm_community$elm_test$Fuzz_Internal$unpackGenTree( + transform(_p16)); + }, + rt)); + }, + _p15._1))); + return A3( + _mgold$elm_random_pcg$Random_Pcg$map2, + F2( + function (_p17, otherChildren) { + var _p18 = _p17; + return A2( + _elm_community$elm_test$RoseTree$Rose, + _p18._0, + A2(_elm_community$lazy_list$Lazy_List$append, _p18._1, otherChildren)); + }), + _elm_community$elm_test$Fuzz_Internal$unpackGenTree( + transform(_p15._0)), + genOtherChildren); + }, + genTree); + }); +var _elm_community$elm_test$Fuzz$andThen = F2( + function (transform, _p19) { + var _p20 = _p19; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p21 = _p20._0(noShrink); + if (_p21.ctor === 'Gen') { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (_p22) { + return _elm_community$elm_test$Fuzz_Internal$unpackGenVal( + transform(_p22)); + }, + _p21._0)); + } else { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A2(_elm_community$elm_test$Fuzz$andThenRoseTrees, transform, _p21._0)); + } + }); + }); +var _elm_community$elm_test$Fuzz$map = F2( + function (transform, _p23) { + var _p24 = _p23; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p25 = _p24._0(noShrink); + if (_p25.ctor === 'Gen') { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A2(_mgold$elm_random_pcg$Random_Pcg$map, transform, _p25._0)); + } else { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_community$elm_test$RoseTree$map(transform), + _p25._0)); + } + }); + }); +var _elm_community$elm_test$Fuzz$constant = function (x) { + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + return noShrink ? _elm_community$elm_test$Fuzz_Internal$Gen( + _mgold$elm_random_pcg$Random_Pcg$constant(x)) : _elm_community$elm_test$Fuzz_Internal$Shrink( + _mgold$elm_random_pcg$Random_Pcg$constant( + _elm_community$elm_test$RoseTree$singleton(x))); + }); +}; +var _elm_community$elm_test$Fuzz$tupleShrinkHelp5 = F5( + function (rose1, rose2, rose3, rose4, rose5) { + var shrink5 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A5(_elm_community$elm_test$Fuzz$tupleShrinkHelp5, rose1, rose2, rose3, rose4, subtree); + }, + _elm_community$elm_test$RoseTree$children(rose5)); + var shrink4 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A5(_elm_community$elm_test$Fuzz$tupleShrinkHelp5, rose1, rose2, rose3, subtree, rose5); + }, + _elm_community$elm_test$RoseTree$children(rose4)); + var shrink3 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A5(_elm_community$elm_test$Fuzz$tupleShrinkHelp5, rose1, rose2, subtree, rose4, rose5); + }, + _elm_community$elm_test$RoseTree$children(rose3)); + var shrink2 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A5(_elm_community$elm_test$Fuzz$tupleShrinkHelp5, rose1, subtree, rose3, rose4, rose5); + }, + _elm_community$elm_test$RoseTree$children(rose2)); + var shrink1 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A5(_elm_community$elm_test$Fuzz$tupleShrinkHelp5, subtree, rose2, rose3, rose4, rose5); + }, + _elm_community$elm_test$RoseTree$children(rose1)); + var root = { + ctor: '_Tuple5', + _0: _elm_community$elm_test$RoseTree$root(rose1), + _1: _elm_community$elm_test$RoseTree$root(rose2), + _2: _elm_community$elm_test$RoseTree$root(rose3), + _3: _elm_community$elm_test$RoseTree$root(rose4), + _4: _elm_community$elm_test$RoseTree$root(rose5) + }; + return A2( + _elm_community$elm_test$RoseTree$Rose, + root, + A2( + _elm_community$lazy_list$Lazy_List$append, + shrink1, + A2( + _elm_community$lazy_list$Lazy_List$append, + shrink2, + A2( + _elm_community$lazy_list$Lazy_List$append, + shrink3, + A2(_elm_community$lazy_list$Lazy_List$append, shrink4, shrink5))))); + }); +var _elm_community$elm_test$Fuzz$tuple5 = function (_p26) { + var _p27 = _p26; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p28 = { + ctor: '_Tuple5', + _0: _p27._0._0(noShrink), + _1: _p27._1._0(noShrink), + _2: _p27._2._0(noShrink), + _3: _p27._3._0(noShrink), + _4: _p27._4._0(noShrink) + }; + _v14_2: + do { + if (_p28.ctor === '_Tuple5') { + if (_p28._0.ctor === 'Gen') { + if ((((_p28._1.ctor === 'Gen') && (_p28._2.ctor === 'Gen')) && (_p28._3.ctor === 'Gen')) && (_p28._4.ctor === 'Gen')) { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A6( + _mgold$elm_random_pcg$Random_Pcg$map5, + F5( + function (v0, v1, v2, v3, v4) { + return {ctor: '_Tuple5', _0: v0, _1: v1, _2: v2, _3: v3, _4: v4}; + }), + _p28._0._0, + _p28._1._0, + _p28._2._0, + _p28._3._0, + _p28._4._0)); + } else { + break _v14_2; + } + } else { + if ((((_p28._1.ctor === 'Shrink') && (_p28._2.ctor === 'Shrink')) && (_p28._3.ctor === 'Shrink')) && (_p28._4.ctor === 'Shrink')) { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A6(_mgold$elm_random_pcg$Random_Pcg$map5, _elm_community$elm_test$Fuzz$tupleShrinkHelp5, _p28._0._0, _p28._1._0, _p28._2._0, _p28._3._0, _p28._4._0)); + } else { + break _v14_2; + } + } + } else { + break _v14_2; + } + } while(false); + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz', + { + start: {line: 573, column: 21}, + end: {line: 573, column: 32} + }), + 'This shouldn\'t happen: Fuzz.tuple5', + _p28); + }); +}; +var _elm_community$elm_test$Fuzz$map5 = F6( + function (transform, fuzzA, fuzzB, fuzzC, fuzzD, fuzzE) { + return A2( + _elm_community$elm_test$Fuzz$map, + function (_p29) { + var _p30 = _p29; + return A5(transform, _p30._0, _p30._1, _p30._2, _p30._3, _p30._4); + }, + _elm_community$elm_test$Fuzz$tuple5( + {ctor: '_Tuple5', _0: fuzzA, _1: fuzzB, _2: fuzzC, _3: fuzzD, _4: fuzzE})); + }); +var _elm_community$elm_test$Fuzz$tupleShrinkHelp4 = F4( + function (rose1, rose2, rose3, rose4) { + var shrink4 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A4(_elm_community$elm_test$Fuzz$tupleShrinkHelp4, rose1, rose2, rose3, subtree); + }, + _elm_community$elm_test$RoseTree$children(rose4)); + var shrink3 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A4(_elm_community$elm_test$Fuzz$tupleShrinkHelp4, rose1, rose2, subtree, rose4); + }, + _elm_community$elm_test$RoseTree$children(rose3)); + var shrink2 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A4(_elm_community$elm_test$Fuzz$tupleShrinkHelp4, rose1, subtree, rose3, rose4); + }, + _elm_community$elm_test$RoseTree$children(rose2)); + var shrink1 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A4(_elm_community$elm_test$Fuzz$tupleShrinkHelp4, subtree, rose2, rose3, rose4); + }, + _elm_community$elm_test$RoseTree$children(rose1)); + var root = { + ctor: '_Tuple4', + _0: _elm_community$elm_test$RoseTree$root(rose1), + _1: _elm_community$elm_test$RoseTree$root(rose2), + _2: _elm_community$elm_test$RoseTree$root(rose3), + _3: _elm_community$elm_test$RoseTree$root(rose4) + }; + return A2( + _elm_community$elm_test$RoseTree$Rose, + root, + A2( + _elm_community$lazy_list$Lazy_List$append, + shrink1, + A2( + _elm_community$lazy_list$Lazy_List$append, + shrink2, + A2(_elm_community$lazy_list$Lazy_List$append, shrink3, shrink4)))); + }); +var _elm_community$elm_test$Fuzz$tuple4 = function (_p31) { + var _p32 = _p31; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p33 = { + ctor: '_Tuple4', + _0: _p32._0._0(noShrink), + _1: _p32._1._0(noShrink), + _2: _p32._2._0(noShrink), + _3: _p32._3._0(noShrink) + }; + _v17_2: + do { + if (_p33.ctor === '_Tuple4') { + if (_p33._0.ctor === 'Gen') { + if (((_p33._1.ctor === 'Gen') && (_p33._2.ctor === 'Gen')) && (_p33._3.ctor === 'Gen')) { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A5( + _mgold$elm_random_pcg$Random_Pcg$map4, + F4( + function (v0, v1, v2, v3) { + return {ctor: '_Tuple4', _0: v0, _1: v1, _2: v2, _3: v3}; + }), + _p33._0._0, + _p33._1._0, + _p33._2._0, + _p33._3._0)); + } else { + break _v17_2; + } + } else { + if (((_p33._1.ctor === 'Shrink') && (_p33._2.ctor === 'Shrink')) && (_p33._3.ctor === 'Shrink')) { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A5(_mgold$elm_random_pcg$Random_Pcg$map4, _elm_community$elm_test$Fuzz$tupleShrinkHelp4, _p33._0._0, _p33._1._0, _p33._2._0, _p33._3._0)); + } else { + break _v17_2; + } + } + } else { + break _v17_2; + } + } while(false); + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz', + { + start: {line: 530, column: 21}, + end: {line: 530, column: 32} + }), + 'This shouldn\'t happen: Fuzz.tuple4', + _p33); + }); +}; +var _elm_community$elm_test$Fuzz$map4 = F5( + function (transform, fuzzA, fuzzB, fuzzC, fuzzD) { + return A2( + _elm_community$elm_test$Fuzz$map, + function (_p34) { + var _p35 = _p34; + return A4(transform, _p35._0, _p35._1, _p35._2, _p35._3); + }, + _elm_community$elm_test$Fuzz$tuple4( + {ctor: '_Tuple4', _0: fuzzA, _1: fuzzB, _2: fuzzC, _3: fuzzD})); + }); +var _elm_community$elm_test$Fuzz$tupleShrinkHelp3 = F3( + function (_p38, _p37, _p36) { + var _p39 = _p38; + var _p44 = _p39; + var _p40 = _p37; + var _p43 = _p40; + var _p41 = _p36; + var _p42 = _p41; + var shrink3 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A3(_elm_community$elm_test$Fuzz$tupleShrinkHelp3, _p44, _p43, subtree); + }, + _p41._1); + var shrink2 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A3(_elm_community$elm_test$Fuzz$tupleShrinkHelp3, _p44, subtree, _p42); + }, + _p40._1); + var shrink1 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A3(_elm_community$elm_test$Fuzz$tupleShrinkHelp3, subtree, _p43, _p42); + }, + _p39._1); + var root = {ctor: '_Tuple3', _0: _p39._0, _1: _p40._0, _2: _p41._0}; + return A2( + _elm_community$elm_test$RoseTree$Rose, + root, + A2( + _elm_community$lazy_list$Lazy_List$append, + shrink1, + A2(_elm_community$lazy_list$Lazy_List$append, shrink2, shrink3))); + }); +var _elm_community$elm_test$Fuzz$tuple3 = function (_p45) { + var _p46 = _p45; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p47 = { + ctor: '_Tuple3', + _0: _p46._0._0(noShrink), + _1: _p46._1._0(noShrink), + _2: _p46._2._0(noShrink) + }; + _v23_2: + do { + if (_p47.ctor === '_Tuple3') { + if (_p47._0.ctor === 'Gen') { + if ((_p47._1.ctor === 'Gen') && (_p47._2.ctor === 'Gen')) { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A4( + _mgold$elm_random_pcg$Random_Pcg$map3, + F3( + function (v0, v1, v2) { + return {ctor: '_Tuple3', _0: v0, _1: v1, _2: v2}; + }), + _p47._0._0, + _p47._1._0, + _p47._2._0)); + } else { + break _v23_2; + } + } else { + if ((_p47._1.ctor === 'Shrink') && (_p47._2.ctor === 'Shrink')) { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A4(_mgold$elm_random_pcg$Random_Pcg$map3, _elm_community$elm_test$Fuzz$tupleShrinkHelp3, _p47._0._0, _p47._1._0, _p47._2._0)); + } else { + break _v23_2; + } + } + } else { + break _v23_2; + } + } while(false); + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz', + { + start: {line: 491, column: 21}, + end: {line: 491, column: 32} + }), + 'This shouldn\'t happen: Fuzz.tuple3', + _p47); + }); +}; +var _elm_community$elm_test$Fuzz$map3 = F4( + function (transform, fuzzA, fuzzB, fuzzC) { + return A2( + _elm_community$elm_test$Fuzz$map, + function (_p48) { + var _p49 = _p48; + return A3(transform, _p49._0, _p49._1, _p49._2); + }, + _elm_community$elm_test$Fuzz$tuple3( + {ctor: '_Tuple3', _0: fuzzA, _1: fuzzB, _2: fuzzC})); + }); +var _elm_community$elm_test$Fuzz$tupleShrinkHelp = F2( + function (_p51, _p50) { + var _p52 = _p51; + var _p53 = _p50; + var shrink2 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A2(_elm_community$elm_test$Fuzz$tupleShrinkHelp, _p52, subtree); + }, + _p53._1); + var shrink1 = A2( + _elm_community$lazy_list$Lazy_List$map, + function (subtree) { + return A2(_elm_community$elm_test$Fuzz$tupleShrinkHelp, subtree, _p53); + }, + _p52._1); + var root = {ctor: '_Tuple2', _0: _p52._0, _1: _p53._0}; + return A2( + _elm_community$elm_test$RoseTree$Rose, + root, + A2(_elm_community$lazy_list$Lazy_List$append, shrink1, shrink2)); + }); +var _elm_community$elm_test$Fuzz$tuple = function (_p54) { + var _p55 = _p54; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p56 = { + ctor: '_Tuple2', + _0: _p55._0._0(noShrink), + _1: _p55._1._0(noShrink) + }; + _v28_2: + do { + if (_p56.ctor === '_Tuple2') { + if (_p56._0.ctor === 'Gen') { + if (_p56._1.ctor === 'Gen') { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A3( + _mgold$elm_random_pcg$Random_Pcg$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + _p56._0._0, + _p56._1._0)); + } else { + break _v28_2; + } + } else { + if (_p56._1.ctor === 'Shrink') { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A3(_mgold$elm_random_pcg$Random_Pcg$map2, _elm_community$elm_test$Fuzz$tupleShrinkHelp, _p56._0._0, _p56._1._0)); + } else { + break _v28_2; + } + } + } else { + break _v28_2; + } + } while(false); + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz', + { + start: {line: 449, column: 21}, + end: {line: 449, column: 32} + }), + 'This shouldn\'t happen: Fuzz.tuple', + _p56); + }); +}; +var _elm_community$elm_test$Fuzz$map2 = F3( + function (transform, fuzzA, fuzzB) { + return A2( + _elm_community$elm_test$Fuzz$map, + function (_p57) { + var _p58 = _p57; + return A2(transform, _p58._0, _p58._1); + }, + _elm_community$elm_test$Fuzz$tuple( + {ctor: '_Tuple2', _0: fuzzA, _1: fuzzB})); + }); +var _elm_community$elm_test$Fuzz$andMap = _elm_community$elm_test$Fuzz$map2( + F2( + function (x, y) { + return y(x); + })); +var _elm_community$elm_test$Fuzz$listShrinkHelp = function (listOfTrees) { + var shorter = F3( + function (windowSize, aList, recursing) { + if ((_elm_lang$core$Native_Utils.cmp( + windowSize, + _elm_lang$core$List$length(aList)) > 0) || (_elm_lang$core$Native_Utils.eq( + windowSize, + _elm_lang$core$List$length(aList)) && (!recursing))) { + return _elm_community$lazy_list$Lazy_List$empty; + } else { + var _p59 = aList; + if (_p59.ctor === '[]') { + return _elm_community$lazy_list$Lazy_List$empty; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$cons, + A2(_elm_lang$core$List$take, windowSize, aList), + A3(shorter, windowSize, _p59._1, true)); + } + } + }); + var shrinkOne = F2( + function (prefix, list) { + var _p60 = list; + if (_p60.ctor === '[]') { + return _elm_community$lazy_list$Lazy_List$empty; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$map, + function (childTree) { + return _elm_community$elm_test$Fuzz$listShrinkHelp( + A2( + _elm_lang$core$Basics_ops['++'], + prefix, + {ctor: '::', _0: childTree, _1: _p60._1})); + }, + _p60._0._1); + } + }); + var root = A2(_elm_lang$core$List$map, _elm_community$elm_test$RoseTree$root, listOfTrees); + var n = _elm_lang$core$List$length(listOfTrees); + var shrunkenVals = A2( + _elm_community$lazy_list$Lazy_List$andThen, + function (i) { + return A2( + shrinkOne, + A2(_elm_lang$core$List$take, i, listOfTrees), + A2(_elm_lang$core$List$drop, i, listOfTrees)); + }, + A2( + _elm_community$lazy_list$Lazy_List$take, + n, + A2( + _elm_community$lazy_list$Lazy_List$map, + function (i) { + return i - 1; + }, + _elm_community$lazy_list$Lazy_List$numbers))); + var shortened = A2( + _elm_community$lazy_list$Lazy_List$map, + _elm_community$elm_test$Fuzz$listShrinkHelp, + A2( + _elm_community$lazy_list$Lazy_List$andThen, + function (len) { + return A3(shorter, len, listOfTrees, false); + }, + (_elm_lang$core$Native_Utils.cmp(n, 6) > 0) ? A2( + _elm_community$lazy_list$Lazy_List$takeWhile, + function (x) { + return _elm_lang$core$Native_Utils.cmp(x, 0) > 0; + }, + A2( + _elm_community$lazy_list$Lazy_List$iterate, + function (n) { + return (n / 2) | 0; + }, + n)) : _elm_community$lazy_list$Lazy_List$fromList( + A2(_elm_lang$core$List$range, 1, n)))); + return A2( + _elm_community$elm_test$RoseTree$Rose, + root, + A2( + _elm_community$lazy_list$Lazy_List$cons, + _elm_community$elm_test$RoseTree$singleton( + {ctor: '[]'}), + A2(_elm_community$lazy_list$Lazy_List$append, shortened, shrunkenVals))); +}; +var _elm_community$elm_test$Fuzz$list = function (_p61) { + var _p62 = _p61; + var genLength = _mgold$elm_random_pcg$Random_Pcg$frequency( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(0) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(1) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 3, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, 2, 10) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 2, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, 10, 100) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 0.5, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, 100, 400) + }, + _1: {ctor: '[]'} + } + } + } + } + }); + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p63 = _p62._0(noShrink); + if (_p63.ctor === 'Gen') { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (i) { + return A2(_mgold$elm_random_pcg$Random_Pcg$list, i, _p63._0); + }, + genLength)); + } else { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_community$elm_test$Fuzz$listShrinkHelp, + A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (i) { + return A2(_mgold$elm_random_pcg$Random_Pcg$list, i, _p63._0); + }, + genLength))); + } + }); +}; +var _elm_community$elm_test$Fuzz$array = function (fuzzer) { + return A2( + _elm_community$elm_test$Fuzz$map, + _elm_lang$core$Array$fromList, + _elm_community$elm_test$Fuzz$list(fuzzer)); +}; +var _elm_community$elm_test$Fuzz$result = F2( + function (_p65, _p64) { + var _p66 = _p65; + var _p67 = _p64; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p68 = { + ctor: '_Tuple2', + _0: _p66._0(noShrink), + _1: _p67._0(noShrink) + }; + _v36_2: + do { + if (_p68.ctor === '_Tuple2') { + if (_p68._0.ctor === 'Gen') { + if (_p68._1.ctor === 'Gen') { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A4( + _mgold$elm_random_pcg$Random_Pcg$map3, + F3( + function (useError, err, val) { + return useError ? _elm_lang$core$Result$Err(err) : _elm_lang$core$Result$Ok(val); + }), + _mgold$elm_random_pcg$Random_Pcg$oneIn(4), + _p68._0._0, + _p68._1._0)); + } else { + break _v36_2; + } + } else { + if (_p68._1.ctor === 'Shrink') { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A4( + _mgold$elm_random_pcg$Random_Pcg$map3, + F3( + function (useError, errorTree, valueTree) { + return useError ? A2(_elm_community$elm_test$RoseTree$map, _elm_lang$core$Result$Err, errorTree) : A2(_elm_community$elm_test$RoseTree$map, _elm_lang$core$Result$Ok, valueTree); + }), + _mgold$elm_random_pcg$Random_Pcg$oneIn(4), + _p68._0._0, + _p68._1._0)); + } else { + break _v36_2; + } + } + } else { + break _v36_2; + } + } while(false); + return A2( + _elm_lang$core$Native_Utils.crash( + 'Fuzz', + { + start: {line: 335, column: 21}, + end: {line: 335, column: 32} + }), + 'This shouldn\'t happen: Fuzz.result', + _p68); + }); + }); +var _elm_community$elm_test$Fuzz$maybe = function (_p69) { + var _p70 = _p69; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + var _p71 = _p70._0(noShrink); + if (_p71.ctor === 'Gen') { + return _elm_community$elm_test$Fuzz_Internal$Gen( + A3( + _mgold$elm_random_pcg$Random_Pcg$map2, + F2( + function (useNothing, val) { + return useNothing ? _elm_lang$core$Maybe$Nothing : _elm_lang$core$Maybe$Just(val); + }), + _mgold$elm_random_pcg$Random_Pcg$oneIn(4), + _p71._0)); + } else { + return _elm_community$elm_test$Fuzz_Internal$Shrink( + A3( + _mgold$elm_random_pcg$Random_Pcg$map2, + F2( + function (useNothing, tree) { + return useNothing ? _elm_community$elm_test$RoseTree$singleton(_elm_lang$core$Maybe$Nothing) : A2( + _elm_community$elm_test$RoseTree$addChild, + _elm_community$elm_test$RoseTree$singleton(_elm_lang$core$Maybe$Nothing), + A2(_elm_community$elm_test$RoseTree$map, _elm_lang$core$Maybe$Just, tree)); + }), + _mgold$elm_random_pcg$Random_Pcg$oneIn(4), + _p71._0)); + } + }); +}; +var _elm_community$elm_test$Fuzz$charGenerator = A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_lang$core$Char$fromCode, + A2(_mgold$elm_random_pcg$Random_Pcg$int, 32, 126)); +var _elm_community$elm_test$Fuzz$unit = _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + return noShrink ? _elm_community$elm_test$Fuzz_Internal$Gen( + _mgold$elm_random_pcg$Random_Pcg$constant( + {ctor: '_Tuple0'})) : _elm_community$elm_test$Fuzz_Internal$Shrink( + _mgold$elm_random_pcg$Random_Pcg$constant( + _elm_community$elm_test$RoseTree$singleton( + {ctor: '_Tuple0'}))); + }); +var _elm_community$elm_test$Fuzz$custom = F2( + function (generator, shrinker) { + var shrinkTree = function (a) { + return A2( + _elm_community$elm_test$RoseTree$Rose, + a, + A2( + _elm_community$lazy_list$Lazy_List$map, + shrinkTree, + shrinker(a))); + }; + return _elm_community$elm_test$Fuzz_Internal$Fuzzer( + function (noShrink) { + return noShrink ? _elm_community$elm_test$Fuzz_Internal$Gen(generator) : _elm_community$elm_test$Fuzz_Internal$Shrink( + A2(_mgold$elm_random_pcg$Random_Pcg$map, shrinkTree, generator)); + }); + }); +var _elm_community$elm_test$Fuzz$bool = A2(_elm_community$elm_test$Fuzz$custom, _mgold$elm_random_pcg$Random_Pcg$bool, _elm_community$shrink$Shrink$bool); +var _elm_community$elm_test$Fuzz$order = function () { + var intToOrder = function (i) { + return _elm_lang$core$Native_Utils.eq(i, 0) ? _elm_lang$core$Basics$LT : (_elm_lang$core$Native_Utils.eq(i, 1) ? _elm_lang$core$Basics$EQ : _elm_lang$core$Basics$GT); + }; + return A2( + _elm_community$elm_test$Fuzz$custom, + A2( + _mgold$elm_random_pcg$Random_Pcg$map, + intToOrder, + A2(_mgold$elm_random_pcg$Random_Pcg$int, 0, 2)), + _elm_community$shrink$Shrink$order); +}(); +var _elm_community$elm_test$Fuzz$int = function () { + var generator = _mgold$elm_random_pcg$Random_Pcg$frequency( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 3, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, -50, 50) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 0.2, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(0) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, 0, _mgold$elm_random_pcg$Random_Pcg$maxInt - _mgold$elm_random_pcg$Random_Pcg$minInt) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, _mgold$elm_random_pcg$Random_Pcg$minInt - _mgold$elm_random_pcg$Random_Pcg$maxInt, 0) + }, + _1: {ctor: '[]'} + } + } + } + }); + return A2(_elm_community$elm_test$Fuzz$custom, generator, _elm_community$shrink$Shrink$int); +}(); +var _elm_community$elm_test$Fuzz$intRange = F2( + function (lo, hi) { + return A2( + _elm_community$elm_test$Fuzz$custom, + _mgold$elm_random_pcg$Random_Pcg$frequency( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 8, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, lo, hi) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(lo) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(hi) + }, + _1: {ctor: '[]'} + } + } + }), + A2( + _elm_community$shrink$Shrink$keepIf, + function (i) { + return (_elm_lang$core$Native_Utils.cmp(i, lo) > -1) && (_elm_lang$core$Native_Utils.cmp(i, hi) < 1); + }, + _elm_community$shrink$Shrink$int)); + }); +var _elm_community$elm_test$Fuzz$float = function () { + var generator = _mgold$elm_random_pcg$Random_Pcg$frequency( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 3, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$float, -50, 50) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 0.5, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(0) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$float, -1, 1) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: A2( + _mgold$elm_random_pcg$Random_Pcg$float, + 0, + _elm_lang$core$Basics$toFloat(_mgold$elm_random_pcg$Random_Pcg$maxInt - _mgold$elm_random_pcg$Random_Pcg$minInt)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: A2( + _mgold$elm_random_pcg$Random_Pcg$float, + _elm_lang$core$Basics$toFloat(_mgold$elm_random_pcg$Random_Pcg$minInt - _mgold$elm_random_pcg$Random_Pcg$maxInt), + 0) + }, + _1: {ctor: '[]'} + } + } + } + } + }); + return A2(_elm_community$elm_test$Fuzz$custom, generator, _elm_community$shrink$Shrink$float); +}(); +var _elm_community$elm_test$Fuzz$floatRange = F2( + function (lo, hi) { + return A2( + _elm_community$elm_test$Fuzz$custom, + _mgold$elm_random_pcg$Random_Pcg$frequency( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 8, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$float, lo, hi) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(lo) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(hi) + }, + _1: {ctor: '[]'} + } + } + }), + A2( + _elm_community$shrink$Shrink$keepIf, + function (i) { + return (_elm_lang$core$Native_Utils.cmp(i, lo) > -1) && (_elm_lang$core$Native_Utils.cmp(i, hi) < 1); + }, + _elm_community$shrink$Shrink$float)); + }); +var _elm_community$elm_test$Fuzz$percentage = function () { + var generator = _mgold$elm_random_pcg$Random_Pcg$frequency( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 8, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$float, 0, 1) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(0) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(1) + }, + _1: {ctor: '[]'} + } + } + }); + return A2(_elm_community$elm_test$Fuzz$custom, generator, _elm_community$shrink$Shrink$float); +}(); +var _elm_community$elm_test$Fuzz$char = A2(_elm_community$elm_test$Fuzz$custom, _elm_community$elm_test$Fuzz$charGenerator, _elm_community$shrink$Shrink$character); +var _elm_community$elm_test$Fuzz$string = function () { + var generator = A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + _elm_community$elm_test$Util$lengthString(_elm_community$elm_test$Fuzz$charGenerator), + _mgold$elm_random_pcg$Random_Pcg$frequency( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 3, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, 1, 10) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 0.2, + _1: _mgold$elm_random_pcg$Random_Pcg$constant(0) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, 11, 50) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 1, + _1: A2(_mgold$elm_random_pcg$Random_Pcg$int, 50, 1000) + }, + _1: {ctor: '[]'} + } + } + } + })); + return A2(_elm_community$elm_test$Fuzz$custom, generator, _elm_community$shrink$Shrink$string); +}(); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/RoseTree.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/RoseTree.elmi new file mode 100644 index 0000000..6ebe800 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/RoseTree.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/RoseTree.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/RoseTree.elmo new file mode 100644 index 0000000..0198165 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/RoseTree.elmo @@ -0,0 +1,44 @@ +var _elm_community$elm_test$RoseTree$children = function (_p0) { + var _p1 = _p0; + return _p1._1; +}; +var _elm_community$elm_test$RoseTree$root = function (_p2) { + var _p3 = _p2; + return _p3._0; +}; +var _elm_community$elm_test$RoseTree$Rose = F2( + function (a, b) { + return {ctor: 'Rose', _0: a, _1: b}; + }); +var _elm_community$elm_test$RoseTree$singleton = function (a) { + return A2(_elm_community$elm_test$RoseTree$Rose, a, _elm_community$lazy_list$Lazy_List$empty); +}; +var _elm_community$elm_test$RoseTree$addChild = F2( + function (child, _p4) { + var _p5 = _p4; + return A2( + _elm_community$elm_test$RoseTree$Rose, + _p5._0, + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], child, _p5._1)); + }); +var _elm_community$elm_test$RoseTree$map = F2( + function (f, _p6) { + var _p7 = _p6; + return A2( + _elm_community$elm_test$RoseTree$Rose, + f(_p7._0), + A2( + _elm_community$lazy_list$Lazy_List$map, + _elm_community$elm_test$RoseTree$map(f), + _p7._1)); + }); +var _elm_community$elm_test$RoseTree$flatten = function (_p8) { + var _p9 = _p8; + return A2( + _elm_community$elm_test$RoseTree$Rose, + _p9._0._0, + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + _p9._0._1, + A2(_elm_community$lazy_list$Lazy_List$map, _elm_community$elm_test$RoseTree$flatten, _p9._1))); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Expectation.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Expectation.elmi new file mode 100644 index 0000000..1288d39 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Expectation.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Expectation.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Expectation.elmo new file mode 100644 index 0000000..ed01560 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Expectation.elmo @@ -0,0 +1,14 @@ +var _elm_community$elm_test$Test_Expectation$Fail = F2( + function (a, b) { + return {ctor: 'Fail', _0: a, _1: b}; + }); +var _elm_community$elm_test$Test_Expectation$withGiven = F2( + function (given, outcome) { + var _p0 = outcome; + if (_p0.ctor === 'Fail') { + return A2(_elm_community$elm_test$Test_Expectation$Fail, given, _p0._1); + } else { + return outcome; + } + }); +var _elm_community$elm_test$Test_Expectation$Pass = {ctor: 'Pass'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Internal.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Internal.elmi new file mode 100644 index 0000000..d87f7e2 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Internal.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Internal.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Internal.elmo new file mode 100644 index 0000000..ad27fc6 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Internal.elmo @@ -0,0 +1,134 @@ +var _elm_community$elm_test$Test_Internal$isFail = F2( + function (x, y) { + return !_elm_lang$core$Native_Utils.eq(x, y); + })(_elm_community$elm_test$Test_Expectation$Pass); +var _elm_community$elm_test$Test_Internal$formatExpectation = function (_p0) { + var _p1 = _p0; + return A2(_elm_community$elm_test$Test_Expectation$withGiven, _p1._0, _p1._1); +}; +var _elm_community$elm_test$Test_Internal$shrinkAndAdd = F4( + function (rootTree, getExpectation, rootsExpectation, dict) { + var shrink = F2( + function (oldExpectation, _p2) { + shrink: + while (true) { + var _p3 = _p2; + var _p6 = _p3._0; + var _p4 = _elm_community$lazy_list$Lazy_List$headAndTail(_p3._1); + if (_p4.ctor === 'Just') { + var _p5 = getExpectation(_p4._0._0._0); + if (_p5.ctor === 'Pass') { + var _v4 = oldExpectation, + _v5 = A2(_elm_community$elm_test$RoseTree$Rose, _p6, _p4._0._1); + oldExpectation = _v4; + _p2 = _v5; + continue shrink; + } else { + var _v6 = _p5, + _v7 = _p4._0._0; + oldExpectation = _v6; + _p2 = _v7; + continue shrink; + } + } else { + return {ctor: '_Tuple2', _0: _p6, _1: oldExpectation}; + } + } + }); + var _p7 = A2(shrink, rootsExpectation, rootTree); + var result = _p7._0; + var finalExpectation = _p7._1; + return A3( + _elm_lang$core$Dict$insert, + _elm_lang$core$Basics$toString(result), + finalExpectation, + dict); + }); +var _elm_community$elm_test$Test_Internal$Batch = function (a) { + return {ctor: 'Batch', _0: a}; +}; +var _elm_community$elm_test$Test_Internal$Labeled = F2( + function (a, b) { + return {ctor: 'Labeled', _0: a, _1: b}; + }); +var _elm_community$elm_test$Test_Internal$filterHelp = F3( + function (lastCheckPassed, isKeepable, test) { + var _p8 = test; + switch (_p8.ctor) { + case 'Test': + return lastCheckPassed ? test : _elm_community$elm_test$Test_Internal$Batch( + {ctor: '[]'}); + case 'Labeled': + var _p9 = _p8._0; + return A2( + _elm_community$elm_test$Test_Internal$Labeled, + _p9, + A3( + _elm_community$elm_test$Test_Internal$filterHelp, + isKeepable(_p9), + isKeepable, + _p8._1)); + default: + return _elm_community$elm_test$Test_Internal$Batch( + A2( + _elm_lang$core$List$map, + A2(_elm_community$elm_test$Test_Internal$filterHelp, lastCheckPassed, isKeepable), + _p8._0)); + } + }); +var _elm_community$elm_test$Test_Internal$filter = _elm_community$elm_test$Test_Internal$filterHelp(false); +var _elm_community$elm_test$Test_Internal$Test = function (a) { + return {ctor: 'Test', _0: a}; +}; +var _elm_community$elm_test$Test_Internal$fuzzTest = F3( + function (fuzzer, desc, getExpectation) { + var getFailures = F3( + function (failures, currentSeed, remainingRuns) { + getFailures: + while (true) { + var genVal = _elm_community$elm_test$Fuzz_Internal$unpackGenVal(fuzzer); + var _p10 = A2(_mgold$elm_random_pcg$Random_Pcg$step, genVal, currentSeed); + var value = _p10._0; + var nextSeed = _p10._1; + var newFailures = function () { + var _p11 = getExpectation(value); + if (_p11.ctor === 'Pass') { + return failures; + } else { + var genTree = _elm_community$elm_test$Fuzz_Internal$unpackGenTree(fuzzer); + var _p12 = A2(_mgold$elm_random_pcg$Random_Pcg$step, genTree, currentSeed); + var rosetree = _p12._0; + var nextSeedAgain = _p12._1; + return A4(_elm_community$elm_test$Test_Internal$shrinkAndAdd, rosetree, getExpectation, _p11, failures); + } + }(); + if (_elm_lang$core$Native_Utils.eq(remainingRuns, 1)) { + return newFailures; + } else { + var _v10 = newFailures, + _v11 = nextSeed, + _v12 = remainingRuns - 1; + failures = _v10; + currentSeed = _v11; + remainingRuns = _v12; + continue getFailures; + } + } + }); + var run = F2( + function (seed, runs) { + var failures = A3(getFailures, _elm_lang$core$Dict$empty, seed, runs); + return _elm_lang$core$Dict$isEmpty(failures) ? { + ctor: '::', + _0: _elm_community$elm_test$Test_Expectation$Pass, + _1: {ctor: '[]'} + } : A2( + _elm_lang$core$List$map, + _elm_community$elm_test$Test_Internal$formatExpectation, + _elm_lang$core$Dict$toList(failures)); + }); + return A2( + _elm_community$elm_test$Test_Internal$Labeled, + desc, + _elm_community$elm_test$Test_Internal$Test(run)); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Runner.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Runner.elmi new file mode 100644 index 0000000..80b10d5 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Runner.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Runner.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Runner.elmo new file mode 100644 index 0000000..3889a6f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test-Runner.elmo @@ -0,0 +1,159 @@ +var _elm_community$elm_test$Test_Runner$formatLabels = F3( + function (formatDescription, formatTest, labels) { + var _p1 = A2( + _elm_lang$core$List$filter, + function (_p0) { + return !_elm_lang$core$String$isEmpty(_p0); + }, + labels); + if (_p1.ctor === '[]') { + return {ctor: '[]'}; + } else { + return _elm_lang$core$List$reverse( + A2( + F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + }), + formatTest(_p1._0), + A2(_elm_lang$core$List$map, formatDescription, _p1._1))); + } + }); +var _elm_community$elm_test$Test_Runner$run = function (_p2) { + var _p3 = _p2; + return _p3._0( + {ctor: '_Tuple0'}); +}; +var _elm_community$elm_test$Test_Runner$Thunk = function (a) { + return {ctor: 'Thunk', _0: a}; +}; +var _elm_community$elm_test$Test_Runner$Batch = function (a) { + return {ctor: 'Batch', _0: a}; +}; +var _elm_community$elm_test$Test_Runner$Labeled = F2( + function (a, b) { + return {ctor: 'Labeled', _0: a, _1: b}; + }); +var _elm_community$elm_test$Test_Runner$Runnable = function (a) { + return {ctor: 'Runnable', _0: a}; +}; +var _elm_community$elm_test$Test_Runner$distributeSeeds = F3( + function (runs, test, _p4) { + var _p5 = _p4; + var _p13 = _p5._0; + var _p12 = _p5._1; + var _p6 = test; + switch (_p6.ctor) { + case 'Test': + var _p7 = A2(_mgold$elm_random_pcg$Random_Pcg$step, _mgold$elm_random_pcg$Random_Pcg$independentSeed, _p13); + var seed = _p7._0; + var nextSeed = _p7._1; + return { + ctor: '_Tuple2', + _0: nextSeed, + _1: A2( + _elm_lang$core$Basics_ops['++'], + _p12, + { + ctor: '::', + _0: _elm_community$elm_test$Test_Runner$Runnable( + _elm_community$elm_test$Test_Runner$Thunk( + function (_p8) { + var _p9 = _p8; + return A2(_p6._0, seed, runs); + })), + _1: {ctor: '[]'} + }) + }; + case 'Labeled': + var _p10 = A3( + _elm_community$elm_test$Test_Runner$distributeSeeds, + runs, + _p6._1, + { + ctor: '_Tuple2', + _0: _p13, + _1: {ctor: '[]'} + }); + var nextSeed = _p10._0; + var nextRunners = _p10._1; + var finalRunners = A2( + _elm_lang$core$List$map, + _elm_community$elm_test$Test_Runner$Labeled(_p6._0), + nextRunners); + return { + ctor: '_Tuple2', + _0: nextSeed, + _1: A2(_elm_lang$core$Basics_ops['++'], _p12, finalRunners) + }; + default: + var _p11 = A3( + _elm_lang$core$List$foldl, + _elm_community$elm_test$Test_Runner$distributeSeeds(runs), + { + ctor: '_Tuple2', + _0: _p13, + _1: {ctor: '[]'} + }, + _p6._0); + var nextSeed = _p11._0; + var nextRunners = _p11._1; + return { + ctor: '_Tuple2', + _0: nextSeed, + _1: { + ctor: '::', + _0: _elm_community$elm_test$Test_Runner$Batch( + A2(_elm_lang$core$Basics_ops['++'], _p12, nextRunners)), + _1: {ctor: '[]'} + } + }; + } + }); +var _elm_community$elm_test$Test_Runner$fromTest = F3( + function (runs, seed, test) { + if (_elm_lang$core$Native_Utils.cmp(runs, 1) < 0) { + return _elm_community$elm_test$Test_Runner$Runnable( + _elm_community$elm_test$Test_Runner$Thunk( + function (_p14) { + var _p15 = _p14; + return { + ctor: '::', + _0: _elm_community$elm_test$Expect$fail( + A2( + _elm_lang$core$Basics_ops['++'], + 'Test runner run count must be at least 1, not ', + _elm_lang$core$Basics$toString(runs))), + _1: {ctor: '[]'} + }; + })); + } else { + var _p16 = test; + switch (_p16.ctor) { + case 'Test': + return _elm_community$elm_test$Test_Runner$Runnable( + _elm_community$elm_test$Test_Runner$Thunk( + function (_p17) { + var _p18 = _p17; + return A2(_p16._0, seed, runs); + })); + case 'Labeled': + return A2( + _elm_community$elm_test$Test_Runner$Labeled, + _p16._0, + A3(_elm_community$elm_test$Test_Runner$fromTest, runs, seed, _p16._1)); + default: + return _elm_community$elm_test$Test_Runner$Batch( + _elm_lang$core$Tuple$second( + A3( + _elm_lang$core$List$foldl, + _elm_community$elm_test$Test_Runner$distributeSeeds(runs), + { + ctor: '_Tuple2', + _0: seed, + _1: {ctor: '[]'} + }, + _p16._0))); + } + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test.elmi new file mode 100644 index 0000000..fa027a8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test.elmo new file mode 100644 index 0000000..4b6a12d --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Test.elmo @@ -0,0 +1,133 @@ +var _elm_community$elm_test$Test$uncurry5 = F2( + function (fn, _p0) { + var _p1 = _p0; + return A5(fn, _p1._0, _p1._1, _p1._2, _p1._3, _p1._4); + }); +var _elm_community$elm_test$Test$uncurry4 = F2( + function (fn, _p2) { + var _p3 = _p2; + return A4(fn, _p3._0, _p3._1, _p3._2, _p3._3); + }); +var _elm_community$elm_test$Test$uncurry3 = F2( + function (fn, _p4) { + var _p5 = _p4; + return A3(fn, _p5._0, _p5._1, _p5._2); + }); +var _elm_community$elm_test$Test$fuzz = _elm_community$elm_test$Test_Internal$fuzzTest; +var _elm_community$elm_test$Test$fuzz2 = F3( + function (fuzzA, fuzzB, desc) { + var fuzzer = _elm_community$elm_test$Fuzz$tuple( + {ctor: '_Tuple2', _0: fuzzA, _1: fuzzB}); + return function (_p6) { + return A3( + _elm_community$elm_test$Test$fuzz, + fuzzer, + desc, + _elm_lang$core$Basics$uncurry(_p6)); + }; + }); +var _elm_community$elm_test$Test$fuzz3 = F4( + function (fuzzA, fuzzB, fuzzC, desc) { + var fuzzer = _elm_community$elm_test$Fuzz$tuple3( + {ctor: '_Tuple3', _0: fuzzA, _1: fuzzB, _2: fuzzC}); + return function (_p7) { + return A3( + _elm_community$elm_test$Test$fuzz, + fuzzer, + desc, + _elm_community$elm_test$Test$uncurry3(_p7)); + }; + }); +var _elm_community$elm_test$Test$fuzz4 = F5( + function (fuzzA, fuzzB, fuzzC, fuzzD, desc) { + var fuzzer = _elm_community$elm_test$Fuzz$tuple4( + {ctor: '_Tuple4', _0: fuzzA, _1: fuzzB, _2: fuzzC, _3: fuzzD}); + return function (_p8) { + return A3( + _elm_community$elm_test$Test$fuzz, + fuzzer, + desc, + _elm_community$elm_test$Test$uncurry4(_p8)); + }; + }); +var _elm_community$elm_test$Test$fuzz5 = F6( + function (fuzzA, fuzzB, fuzzC, fuzzD, fuzzE, desc) { + var fuzzer = _elm_community$elm_test$Fuzz$tuple5( + {ctor: '_Tuple5', _0: fuzzA, _1: fuzzB, _2: fuzzC, _3: fuzzD, _4: fuzzE}); + return function (_p9) { + return A3( + _elm_community$elm_test$Test$fuzz, + fuzzer, + desc, + _elm_community$elm_test$Test$uncurry5(_p9)); + }; + }); +var _elm_community$elm_test$Test$fuzzWithHelp = F2( + function (options, test) { + var _p10 = test; + switch (_p10.ctor) { + case 'Test': + return _elm_community$elm_test$Test_Internal$Test( + F2( + function (seed, _p11) { + return A2(_p10._0, seed, options.runs); + })); + case 'Labeled': + return A2( + _elm_community$elm_test$Test_Internal$Labeled, + _p10._0, + A2(_elm_community$elm_test$Test$fuzzWithHelp, options, _p10._1)); + default: + return _elm_community$elm_test$Test_Internal$Batch( + A2( + _elm_lang$core$List$map, + _elm_community$elm_test$Test$fuzzWithHelp(options), + _p10._0)); + } + }); +var _elm_community$elm_test$Test$test = F2( + function (desc, thunk) { + return A2( + _elm_community$elm_test$Test_Internal$Labeled, + desc, + _elm_community$elm_test$Test_Internal$Test( + F2( + function (_p13, _p12) { + return { + ctor: '::', + _0: thunk( + {ctor: '_Tuple0'}), + _1: {ctor: '[]'} + }; + }))); + }); +var _elm_community$elm_test$Test$fuzzWith = F4( + function (options, fuzzer, desc, getTest) { + return (_elm_lang$core$Native_Utils.cmp(options.runs, 1) < 0) ? A2( + _elm_community$elm_test$Test$test, + desc, + function (_p14) { + var _p15 = _p14; + return _elm_community$elm_test$Expect$fail( + A2( + _elm_lang$core$Basics_ops['++'], + 'Fuzz test run count must be at least 1, not ', + _elm_lang$core$Basics$toString(options.runs))); + }) : A2( + _elm_community$elm_test$Test$fuzzWithHelp, + options, + A3(_elm_community$elm_test$Test$fuzz, fuzzer, desc, getTest)); + }); +var _elm_community$elm_test$Test$describe = function (desc) { + return function (_p16) { + return A2( + _elm_community$elm_test$Test_Internal$Labeled, + desc, + _elm_community$elm_test$Test_Internal$Batch(_p16)); + }; +}; +var _elm_community$elm_test$Test$filter = _elm_community$elm_test$Test_Internal$filter; +var _elm_community$elm_test$Test$concat = _elm_community$elm_test$Test_Internal$Batch; +var _elm_community$elm_test$Test$FuzzOptions = function (a) { + return {runs: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Util.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Util.elmi new file mode 100644 index 0000000..a4d4a05 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Util.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Util.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Util.elmo new file mode 100644 index 0000000..54384c5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/Util.elmo @@ -0,0 +1,30 @@ +var _elm_community$elm_test$Util$lengthString = F2( + function (charGenerator, stringLength) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_lang$core$String$fromList, + A2(_mgold$elm_random_pcg$Random_Pcg$list, stringLength, charGenerator)); + }); +var _elm_community$elm_test$Util$rangeLengthString = F3( + function (minLength, maxLength, charGenerator) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + _elm_community$elm_test$Util$lengthString(charGenerator), + A2(_mgold$elm_random_pcg$Random_Pcg$int, minLength, maxLength)); + }); +var _elm_community$elm_test$Util$rangeLengthList = F3( + function (minLength, maxLength, generator) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (len) { + return A2(_mgold$elm_random_pcg$Random_Pcg$list, len, generator); + }, + A2(_mgold$elm_random_pcg$Random_Pcg$int, minLength, maxLength)); + }); +var _elm_community$elm_test$Util$rangeLengthArray = F3( + function (minLength, maxLength, generator) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + _elm_lang$core$Array$fromList, + A3(_elm_community$elm_test$Util$rangeLengthList, minLength, maxLength, generator)); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/graph.dat new file mode 100644 index 0000000..5f53b0e Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/elm-test/3.1.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmi new file mode 100644 index 0000000..583afd7 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmo new file mode 100644 index 0000000..413a62a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Decode-Extra.elmo @@ -0,0 +1,95 @@ +var _elm_community$json_extra$Json_Decode_Extra$fromResult = function (result) { + var _p0 = result; + if (_p0.ctor === 'Ok') { + return _elm_lang$core$Json_Decode$succeed(_p0._0); + } else { + return _elm_lang$core$Json_Decode$fail(_p0._0); + } +}; +var _elm_community$json_extra$Json_Decode_Extra$sequenceHelp = F2( + function (decoders, jsonValues) { + return (!_elm_lang$core$Native_Utils.eq( + _elm_lang$core$List$length(jsonValues), + _elm_lang$core$List$length(decoders))) ? _elm_lang$core$Json_Decode$fail('Number of decoders does not match number of values') : _elm_community$json_extra$Json_Decode_Extra$fromResult( + A3( + _elm_lang$core$List$foldr, + _elm_lang$core$Result$map2( + F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + })), + _elm_lang$core$Result$Ok( + {ctor: '[]'}), + A3(_elm_lang$core$List$map2, _elm_lang$core$Json_Decode$decodeValue, decoders, jsonValues))); + }); +var _elm_community$json_extra$Json_Decode_Extra$sequence = function (decoders) { + return A2( + _elm_lang$core$Json_Decode$andThen, + _elm_community$json_extra$Json_Decode_Extra$sequenceHelp(decoders), + _elm_lang$core$Json_Decode$list(_elm_lang$core$Json_Decode$value)); +}; +var _elm_community$json_extra$Json_Decode_Extra$withDefault = F2( + function (fallback, decoder) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p1) { + return _elm_lang$core$Json_Decode$succeed( + A2(_elm_lang$core$Maybe$withDefault, fallback, _p1)); + }, + _elm_lang$core$Json_Decode$maybe(decoder)); + }); +var _elm_community$json_extra$Json_Decode_Extra$decodeDictFromTuples = F2( + function (keyDecoder, tuples) { + var _p2 = tuples; + if (_p2.ctor === '[]') { + return _elm_lang$core$Json_Decode$succeed(_elm_lang$core$Dict$empty); + } else { + var _p3 = A2(_elm_lang$core$Json_Decode$decodeString, keyDecoder, _p2._0._0); + if (_p3.ctor === 'Ok') { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p4) { + return _elm_lang$core$Json_Decode$succeed( + A3(_elm_lang$core$Dict$insert, _p3._0, _p2._0._1, _p4)); + }, + A2(_elm_community$json_extra$Json_Decode_Extra$decodeDictFromTuples, keyDecoder, _p2._1)); + } else { + return _elm_lang$core$Json_Decode$fail(_p3._0); + } + } + }); +var _elm_community$json_extra$Json_Decode_Extra$dict2 = F2( + function (keyDecoder, valueDecoder) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p5) { + return A2( + _elm_community$json_extra$Json_Decode_Extra$decodeDictFromTuples, + keyDecoder, + _elm_lang$core$Dict$toList(_p5)); + }, + _elm_lang$core$Json_Decode$dict(valueDecoder)); + }); +var _elm_community$json_extra$Json_Decode_Extra$set = function (decoder) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (_p6) { + return _elm_lang$core$Json_Decode$succeed( + _elm_lang$core$Set$fromList(_p6)); + }, + _elm_lang$core$Json_Decode$list(decoder)); +}; +var _elm_community$json_extra$Json_Decode_Extra$date = A2( + _elm_lang$core$Json_Decode$andThen, + function (_p7) { + return _elm_community$json_extra$Json_Decode_Extra$fromResult( + _elm_lang$core$Date$fromString(_p7)); + }, + _elm_lang$core$Json_Decode$string); +var _elm_community$json_extra$Json_Decode_Extra$andMap = _elm_lang$core$Json_Decode$map2( + F2( + function (x, y) { + return y(x); + })); +var _elm_community$json_extra$Json_Decode_Extra_ops = _elm_community$json_extra$Json_Decode_Extra_ops || {}; +_elm_community$json_extra$Json_Decode_Extra_ops['|:'] = _elm_lang$core$Basics$flip(_elm_community$json_extra$Json_Decode_Extra$andMap); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmi new file mode 100644 index 0000000..a041eb0 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmo new file mode 100644 index 0000000..c8513c6 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/Json-Encode-Extra.elmo @@ -0,0 +1,9 @@ +var _elm_community$json_extra$Json_Encode_Extra$maybe = F2( + function (encoder, value) { + var _p0 = value; + if (_p0.ctor === 'Nothing') { + return _elm_lang$core$Json_Encode$null; + } else { + return encoder(_p0._0); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/graph.dat new file mode 100644 index 0000000..403f767 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/json-extra/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/Lazy-List.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/Lazy-List.elmi new file mode 100644 index 0000000..01dd2ad Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/Lazy-List.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/Lazy-List.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/Lazy-List.elmo new file mode 100644 index 0000000..a946219 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/Lazy-List.elmo @@ -0,0 +1,686 @@ +var _elm_community$lazy_list$Lazy_List$toArray = function (list) { + var _p0 = _elm_lang$lazy$Lazy$force(list); + if (_p0.ctor === 'Nil') { + return _elm_lang$core$Array$empty; + } else { + return A2( + _elm_lang$core$Array$append, + A2(_elm_lang$core$Array$push, _p0._0, _elm_lang$core$Array$empty), + _elm_community$lazy_list$Lazy_List$toArray(_p0._1)); + } +}; +var _elm_community$lazy_list$Lazy_List$toList = function (list) { + var _p1 = _elm_lang$lazy$Lazy$force(list); + if (_p1.ctor === 'Nil') { + return {ctor: '[]'}; + } else { + return { + ctor: '::', + _0: _p1._0, + _1: _elm_community$lazy_list$Lazy_List$toList(_p1._1) + }; + } +}; +var _elm_community$lazy_list$Lazy_List$foldr = F3( + function (reducer, b, list) { + return A3( + _elm_lang$core$Array$foldr, + reducer, + b, + _elm_community$lazy_list$Lazy_List$toArray(list)); + }); +var _elm_community$lazy_list$Lazy_List$reduce = F3( + function (reducer, b, list) { + reduce: + while (true) { + var _p2 = _elm_lang$lazy$Lazy$force(list); + if (_p2.ctor === 'Nil') { + return b; + } else { + var _v3 = reducer, + _v4 = A2(reducer, _p2._0, b), + _v5 = _p2._1; + reducer = _v3; + b = _v4; + list = _v5; + continue reduce; + } + } + }); +var _elm_community$lazy_list$Lazy_List$foldl = _elm_community$lazy_list$Lazy_List$reduce; +var _elm_community$lazy_list$Lazy_List$sum = A2( + _elm_community$lazy_list$Lazy_List$reduce, + F2( + function (x, y) { + return x + y; + }), + 0); +var _elm_community$lazy_list$Lazy_List$product = A2( + _elm_community$lazy_list$Lazy_List$reduce, + F2( + function (x, y) { + return x * y; + }), + 1); +var _elm_community$lazy_list$Lazy_List$length = A2( + _elm_community$lazy_list$Lazy_List$reduce, + F2( + function (_p3, n) { + return n + 1; + }), + 0); +var _elm_community$lazy_list$Lazy_List$member = F2( + function (a, list) { + var _p4 = _elm_lang$lazy$Lazy$force(list); + if (_p4.ctor === 'Nil') { + return false; + } else { + return _elm_lang$core$Native_Utils.eq(_p4._0, a) || A2(_elm_community$lazy_list$Lazy_List$member, a, _p4._1); + } + }); +var _elm_community$lazy_list$Lazy_List$headAndTail = function (list) { + var _p5 = _elm_lang$lazy$Lazy$force(list); + if (_p5.ctor === 'Nil') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just( + {ctor: '_Tuple2', _0: _p5._0, _1: _p5._1}); + } +}; +var _elm_community$lazy_list$Lazy_List$tail = function (list) { + var _p6 = _elm_lang$lazy$Lazy$force(list); + if (_p6.ctor === 'Nil') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just(_p6._1); + } +}; +var _elm_community$lazy_list$Lazy_List$head = function (list) { + var _p7 = _elm_lang$lazy$Lazy$force(list); + if (_p7.ctor === 'Nil') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just(_p7._0); + } +}; +var _elm_community$lazy_list$Lazy_List$isEmpty = function (list) { + var _p8 = _elm_lang$lazy$Lazy$force(list); + if (_p8.ctor === 'Nil') { + return true; + } else { + return false; + } +}; +var _elm_community$lazy_list$Lazy_List$Cons = F2( + function (a, b) { + return {ctor: 'Cons', _0: a, _1: b}; + }); +var _elm_community$lazy_list$Lazy_List$cons = F2( + function (a, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p9) { + var _p10 = _p9; + return A2(_elm_community$lazy_list$Lazy_List$Cons, a, list); + }); + }); +var _elm_community$lazy_list$Lazy_List_ops = _elm_community$lazy_list$Lazy_List_ops || {}; +_elm_community$lazy_list$Lazy_List_ops[':::'] = _elm_community$lazy_list$Lazy_List$cons; +var _elm_community$lazy_list$Lazy_List$append = F2( + function (list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p11) { + var _p12 = _p11; + var _p13 = _elm_lang$lazy$Lazy$force(list1); + if (_p13.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force(list2); + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p13._0, + A2(_elm_community$lazy_list$Lazy_List_ops['+++'], _p13._1, list2))); + } + }); + }); +var _elm_community$lazy_list$Lazy_List_ops = _elm_community$lazy_list$Lazy_List_ops || {}; +_elm_community$lazy_list$Lazy_List_ops['+++'] = _elm_community$lazy_list$Lazy_List$append; +var _elm_community$lazy_list$Lazy_List$cycle = function (list) { + return A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + list, + _elm_lang$lazy$Lazy$lazy( + function (_p14) { + var _p15 = _p14; + return _elm_lang$lazy$Lazy$force( + _elm_community$lazy_list$Lazy_List$cycle(list)); + })); +}; +var _elm_community$lazy_list$Lazy_List$interleave = F2( + function (list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p16) { + var _p17 = _p16; + var _p18 = _elm_lang$lazy$Lazy$force(list1); + if (_p18.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force(list2); + } else { + var _p19 = _elm_lang$lazy$Lazy$force(list2); + if (_p19.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force(list1); + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p18._0, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p19._0, + A2(_elm_community$lazy_list$Lazy_List$interleave, _p18._1, _p19._1)))); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$repeat = function (a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p20) { + var _p21 = _p20; + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + a, + _elm_community$lazy_list$Lazy_List$repeat(a)); + }); +}; +var _elm_community$lazy_list$Lazy_List$iterate = F2( + function (f, a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p22) { + var _p23 = _p22; + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + a, + A2( + _elm_community$lazy_list$Lazy_List$iterate, + f, + f(a))); + }); + }); +var _elm_community$lazy_list$Lazy_List$numbers = A2( + _elm_community$lazy_list$Lazy_List$iterate, + F2( + function (x, y) { + return x + y; + })(1), + 1); +var _elm_community$lazy_list$Lazy_List$Nil = {ctor: 'Nil'}; +var _elm_community$lazy_list$Lazy_List$empty = _elm_lang$lazy$Lazy$lazy( + function (_p24) { + var _p25 = _p24; + return _elm_community$lazy_list$Lazy_List$Nil; + }); +var _elm_community$lazy_list$Lazy_List$singleton = function (a) { + return A2(_elm_community$lazy_list$Lazy_List$cons, a, _elm_community$lazy_list$Lazy_List$empty); +}; +var _elm_community$lazy_list$Lazy_List$reverse = A2(_elm_community$lazy_list$Lazy_List$reduce, _elm_community$lazy_list$Lazy_List$cons, _elm_community$lazy_list$Lazy_List$empty); +var _elm_community$lazy_list$Lazy_List$fromList = A2(_elm_lang$core$List$foldr, _elm_community$lazy_list$Lazy_List$cons, _elm_community$lazy_list$Lazy_List$empty); +var _elm_community$lazy_list$Lazy_List$fromArray = A2(_elm_lang$core$Array$foldr, _elm_community$lazy_list$Lazy_List$cons, _elm_community$lazy_list$Lazy_List$empty); +var _elm_community$lazy_list$Lazy_List$intersperse = F2( + function (a, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p26) { + var _p27 = _p26; + var _p28 = _elm_lang$lazy$Lazy$force(list); + if (_p28.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p33 = _p28._0; + var _p29 = _elm_lang$lazy$Lazy$force(_p28._1); + if (_p29.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], _p33, _elm_community$lazy_list$Lazy_List$empty)); + } else { + var _p32 = _p29._1; + var _p31 = _p29._0; + var _p30 = _elm_lang$lazy$Lazy$force(_p32); + if (_p30.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p33, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + a, + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], _p31, _elm_community$lazy_list$Lazy_List$empty)))); + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p33, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + a, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _p31, + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + a, + A2(_elm_community$lazy_list$Lazy_List$intersperse, a, _p32)))))); + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$take = F2( + function (n, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p34) { + var _p35 = _p34; + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p36 = _elm_lang$lazy$Lazy$force(list); + if (_p36.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p36._0, + A2(_elm_community$lazy_list$Lazy_List$take, n - 1, _p36._1)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$takeWhile = F2( + function (predicate, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p37) { + var _p38 = _p37; + var _p39 = _elm_lang$lazy$Lazy$force(list); + if (_p39.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p40 = _p39._0; + return predicate(_p40) ? A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p40, + A2(_elm_community$lazy_list$Lazy_List$takeWhile, predicate, _p39._1)) : _elm_community$lazy_list$Lazy_List$Nil; + } + }); + }); +var _elm_community$lazy_list$Lazy_List$drop = F2( + function (n, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p41) { + var _p42 = _p41; + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return _elm_lang$lazy$Lazy$force(list); + } else { + var _p43 = _elm_lang$lazy$Lazy$force(list); + if (_p43.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$drop, n - 1, _p43._1)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$dropWhile = F2( + function (predicate, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p44) { + var _p45 = _p44; + var _p46 = _elm_lang$lazy$Lazy$force(list); + if (_p46.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return predicate(_p46._0) ? _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$dropWhile, predicate, _p46._1)) : _elm_lang$lazy$Lazy$force(list); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$unique = function (list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p47) { + var _p48 = _p47; + var _p49 = _elm_lang$lazy$Lazy$force(list); + if (_p49.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p51 = _p49._1; + var _p50 = _p49._0; + return A2(_elm_community$lazy_list$Lazy_List$member, _p50, _p51) ? _elm_lang$lazy$Lazy$force( + _elm_community$lazy_list$Lazy_List$unique(_p51)) : A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p50, + _elm_community$lazy_list$Lazy_List$unique(_p51)); + } + }); +}; +var _elm_community$lazy_list$Lazy_List$keepIf = F2( + function (predicate, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p52) { + var _p53 = _p52; + var _p54 = _elm_lang$lazy$Lazy$force(list); + if (_p54.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p56 = _p54._1; + var _p55 = _p54._0; + return predicate(_p55) ? A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p55, + A2(_elm_community$lazy_list$Lazy_List$keepIf, predicate, _p56)) : _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$keepIf, predicate, _p56)); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$dropIf = function (predicate) { + return _elm_community$lazy_list$Lazy_List$keepIf( + function (n) { + return !predicate(n); + }); +}; +var _elm_community$lazy_list$Lazy_List$filterMap = F2( + function (transform, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p57) { + var _p58 = _p57; + var _p59 = _elm_lang$lazy$Lazy$force(list); + if (_p59.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p61 = _p59._1; + var _p60 = transform(_p59._0); + if (_p60.ctor === 'Just') { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + _p60._0, + A2(_elm_community$lazy_list$Lazy_List$filterMap, transform, _p61)); + } else { + return _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List$filterMap, transform, _p61)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$flatten = function (list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p62) { + var _p63 = _p62; + var _p64 = _elm_lang$lazy$Lazy$force(list); + if (_p64.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + _p64._0, + _elm_community$lazy_list$Lazy_List$flatten(_p64._1))); + } + }); +}; +var _elm_community$lazy_list$Lazy_List$map = F2( + function (f, list) { + return _elm_lang$lazy$Lazy$lazy( + function (_p65) { + var _p66 = _p65; + var _p67 = _elm_lang$lazy$Lazy$force(list); + if (_p67.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + f(_p67._0), + A2(_elm_community$lazy_list$Lazy_List$map, f, _p67._1)); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$andThen = F2( + function (f, list) { + return _elm_community$lazy_list$Lazy_List$flatten( + A2(_elm_community$lazy_list$Lazy_List$map, f, list)); + }); +var _elm_community$lazy_list$Lazy_List$map2 = F3( + function (f, list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p68) { + var _p69 = _p68; + var _p70 = _elm_lang$lazy$Lazy$force(list1); + if (_p70.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p71 = _elm_lang$lazy$Lazy$force(list2); + if (_p71.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A2(f, _p70._0, _p71._0), + A3(_elm_community$lazy_list$Lazy_List$map2, f, _p70._1, _p71._1)); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$andMap = F2( + function (listVal, listFuncs) { + return A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (x, y) { + return x(y); + }), + listFuncs, + listVal); + }); +var _elm_community$lazy_list$Lazy_List$zip = _elm_community$lazy_list$Lazy_List$map2( + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + })); +var _elm_community$lazy_list$Lazy_List$map3 = F4( + function (f, list1, list2, list3) { + return _elm_lang$lazy$Lazy$lazy( + function (_p72) { + var _p73 = _p72; + var _p74 = _elm_lang$lazy$Lazy$force(list1); + if (_p74.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p75 = _elm_lang$lazy$Lazy$force(list2); + if (_p75.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p76 = _elm_lang$lazy$Lazy$force(list3); + if (_p76.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A3(f, _p74._0, _p75._0, _p76._0), + A4(_elm_community$lazy_list$Lazy_List$map3, f, _p74._1, _p75._1, _p76._1)); + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$zip3 = _elm_community$lazy_list$Lazy_List$map3( + F3( + function (v0, v1, v2) { + return {ctor: '_Tuple3', _0: v0, _1: v1, _2: v2}; + })); +var _elm_community$lazy_list$Lazy_List$map4 = F5( + function (f, list1, list2, list3, list4) { + return _elm_lang$lazy$Lazy$lazy( + function (_p77) { + var _p78 = _p77; + var _p79 = _elm_lang$lazy$Lazy$force(list1); + if (_p79.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p80 = _elm_lang$lazy$Lazy$force(list2); + if (_p80.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p81 = _elm_lang$lazy$Lazy$force(list3); + if (_p81.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p82 = _elm_lang$lazy$Lazy$force(list4); + if (_p82.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A4(f, _p79._0, _p80._0, _p81._0, _p82._0), + A5(_elm_community$lazy_list$Lazy_List$map4, f, _p79._1, _p80._1, _p81._1, _p82._1)); + } + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$zip4 = _elm_community$lazy_list$Lazy_List$map4( + F4( + function (v0, v1, v2, v3) { + return {ctor: '_Tuple4', _0: v0, _1: v1, _2: v2, _3: v3}; + })); +var _elm_community$lazy_list$Lazy_List$map5 = F6( + function (f, list1, list2, list3, list4, list5) { + return _elm_lang$lazy$Lazy$lazy( + function (_p83) { + var _p84 = _p83; + var _p85 = _elm_lang$lazy$Lazy$force(list1); + if (_p85.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p86 = _elm_lang$lazy$Lazy$force(list2); + if (_p86.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p87 = _elm_lang$lazy$Lazy$force(list3); + if (_p87.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p88 = _elm_lang$lazy$Lazy$force(list4); + if (_p88.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p89 = _elm_lang$lazy$Lazy$force(list5); + if (_p89.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return A2( + _elm_community$lazy_list$Lazy_List$Cons, + A5(f, _p85._0, _p86._0, _p87._0, _p88._0, _p89._0), + A6(_elm_community$lazy_list$Lazy_List$map5, f, _p85._1, _p86._1, _p87._1, _p88._1, _p89._1)); + } + } + } + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$zip5 = _elm_community$lazy_list$Lazy_List$map5( + F5( + function (v0, v1, v2, v3, v4) { + return {ctor: '_Tuple5', _0: v0, _1: v1, _2: v2, _3: v3, _4: v4}; + })); +var _elm_community$lazy_list$Lazy_List$product2 = F2( + function (list1, list2) { + return _elm_lang$lazy$Lazy$lazy( + function (_p90) { + var _p91 = _p90; + var _p92 = _elm_lang$lazy$Lazy$force(list1); + if (_p92.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + var _p93 = _elm_lang$lazy$Lazy$force(list2); + if (_p93.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + })(_p92._0), + list2), + A2(_elm_community$lazy_list$Lazy_List$product2, _p92._1, list2))); + } + } + }); + }); +var _elm_community$lazy_list$Lazy_List$product3 = F3( + function (list1, list2, list3) { + return _elm_lang$lazy$Lazy$lazy( + function (_p94) { + var _p95 = _p94; + var _p96 = _elm_lang$lazy$Lazy$force(list1); + if (_p96.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (_p97) { + var _p98 = _p97; + return {ctor: '_Tuple3', _0: _p96._0, _1: _p98._0, _2: _p98._1}; + }, + A2(_elm_community$lazy_list$Lazy_List$product2, list2, list3)), + A3(_elm_community$lazy_list$Lazy_List$product3, _p96._1, list2, list3))); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$product4 = F4( + function (list1, list2, list3, list4) { + return _elm_lang$lazy$Lazy$lazy( + function (_p99) { + var _p100 = _p99; + var _p101 = _elm_lang$lazy$Lazy$force(list1); + if (_p101.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (_p102) { + var _p103 = _p102; + return {ctor: '_Tuple4', _0: _p101._0, _1: _p103._0, _2: _p103._1, _3: _p103._2}; + }, + A3(_elm_community$lazy_list$Lazy_List$product3, list2, list3, list4)), + A4(_elm_community$lazy_list$Lazy_List$product4, _p101._1, list2, list3, list4))); + } + }); + }); +var _elm_community$lazy_list$Lazy_List$product5 = F5( + function (list1, list2, list3, list4, list5) { + return _elm_lang$lazy$Lazy$lazy( + function (_p104) { + var _p105 = _p104; + var _p106 = _elm_lang$lazy$Lazy$force(list1); + if (_p106.ctor === 'Nil') { + return _elm_community$lazy_list$Lazy_List$Nil; + } else { + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (_p107) { + var _p108 = _p107; + return {ctor: '_Tuple5', _0: _p106._0, _1: _p108._0, _2: _p108._1, _3: _p108._2, _4: _p108._3}; + }, + A4(_elm_community$lazy_list$Lazy_List$product4, list2, list3, list4, list5)), + A5(_elm_community$lazy_list$Lazy_List$product5, _p106._1, list2, list3, list4, list5))); + } + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/graph.dat new file mode 100644 index 0000000..dd4ff2d Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/lazy-list/1.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/Shrink.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/Shrink.elmi new file mode 100644 index 0000000..46b2fd6 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/Shrink.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/Shrink.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/Shrink.elmo new file mode 100644 index 0000000..a935ac3 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/Shrink.elmo @@ -0,0 +1,918 @@ +var _elm_community$shrink$Shrink$seriesFloat = F2( + function (low, high) { + if (_elm_lang$core$Native_Utils.cmp(low, high - 1.0e-4) > -1) { + return (!_elm_lang$core$Native_Utils.eq(high, 1.0e-6)) ? _elm_community$lazy_list$Lazy_List$singleton(low + 1.0e-6) : _elm_community$lazy_list$Lazy_List$empty; + } else { + var low_ = low + ((high - low) / 2); + return A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + low, + A2(_elm_community$shrink$Shrink$seriesFloat, low_, high)); + } + }); +var _elm_community$shrink$Shrink$seriesInt = F2( + function (low, high) { + if (_elm_lang$core$Native_Utils.cmp(low, high) > -1) { + return _elm_community$lazy_list$Lazy_List$empty; + } else { + if (_elm_lang$core$Native_Utils.eq(low, high - 1)) { + return A2(_elm_community$lazy_list$Lazy_List_ops[':::'], low, _elm_community$lazy_list$Lazy_List$empty); + } else { + var low_ = low + (((high - low) / 2) | 0); + return A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + low, + A2(_elm_community$shrink$Shrink$seriesInt, low_, high)); + } + } + }); +var _elm_community$shrink$Shrink$andMap = _elm_community$lazy_list$Lazy_List$andMap; +var _elm_community$shrink$Shrink$map = _elm_community$lazy_list$Lazy_List$map; +var _elm_community$shrink$Shrink$merge = F3( + function (shrink1, shrink2, a) { + return _elm_community$lazy_list$Lazy_List$unique( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + shrink1(a), + shrink2(a))); + }); +var _elm_community$shrink$Shrink$keepIf = F3( + function (predicate, shrink, a) { + return A2( + _elm_community$lazy_list$Lazy_List$keepIf, + predicate, + shrink(a)); + }); +var _elm_community$shrink$Shrink$dropIf = function (predicate) { + return _elm_community$shrink$Shrink$keepIf( + function (_p0) { + return !predicate(_p0); + }); +}; +var _elm_community$shrink$Shrink$convert = F4( + function (f, g, shrink, b) { + return A2( + _elm_community$lazy_list$Lazy_List$map, + f, + shrink( + g(b))); + }); +var _elm_community$shrink$Shrink$tuple5 = F2( + function (_p2, _p1) { + var _p3 = _p2; + var _p14 = _p3._4; + var _p13 = _p3._3; + var _p12 = _p3._2; + var _p11 = _p3._1; + var _p10 = _p3._0; + var _p4 = _p1; + var _p9 = _p4._4; + var _p8 = _p4._3; + var _p7 = _p4._2; + var _p6 = _p4._1; + var _p5 = _p4._0; + return A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (e) { + return {ctor: '_Tuple5', _0: _p5, _1: _p6, _2: _p7, _3: _p8, _4: e}; + }, + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (d) { + return {ctor: '_Tuple5', _0: _p5, _1: _p6, _2: _p7, _3: d, _4: _p9}; + }, + _p13(_p8)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (c) { + return {ctor: '_Tuple5', _0: _p5, _1: _p6, _2: c, _3: _p8, _4: _p9}; + }, + _p12(_p7)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (b) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: _p7, _3: _p8, _4: _p9}; + }, + _p11(_p6)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (a) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: _p7, _3: _p8, _4: _p9}; + }, + _p10(_p5)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (d, e) { + return {ctor: '_Tuple5', _0: _p5, _1: _p6, _2: _p7, _3: d, _4: e}; + }), + _p13(_p8), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (c, e) { + return {ctor: '_Tuple5', _0: _p5, _1: _p6, _2: c, _3: _p8, _4: e}; + }), + _p12(_p7), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (b, e) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: _p7, _3: _p8, _4: e}; + }), + _p11(_p6), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, e) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: _p7, _3: _p8, _4: e}; + }), + _p10(_p5), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (c, d) { + return {ctor: '_Tuple5', _0: _p5, _1: _p6, _2: c, _3: d, _4: _p9}; + }), + _p12(_p7), + _p13(_p8)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (b, d) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: _p7, _3: d, _4: _p9}; + }), + _p11(_p6), + _p13(_p8)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, d) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: _p7, _3: d, _4: _p9}; + }), + _p10(_p5), + _p13(_p8)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (b, c) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: c, _3: _p8, _4: _p9}; + }), + _p11(_p6), + _p12(_p7)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, c) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: c, _3: _p8, _4: _p9}; + }), + _p10(_p5), + _p12(_p7)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, b) { + return {ctor: '_Tuple5', _0: a, _1: b, _2: _p7, _3: _p8, _4: _p9}; + }), + _p10(_p5), + _p11(_p6)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, b, c) { + return {ctor: '_Tuple5', _0: a, _1: b, _2: c, _3: _p8, _4: _p9}; + }), + _p10(_p5), + _p11(_p6), + _p12(_p7)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, b, d) { + return {ctor: '_Tuple5', _0: a, _1: b, _2: _p7, _3: d, _4: _p9}; + }), + _p10(_p5), + _p11(_p6), + _p13(_p8)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, c, d) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: c, _3: d, _4: _p9}; + }), + _p10(_p5), + _p12(_p7), + _p13(_p8)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (b, c, d) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: c, _3: d, _4: _p9}; + }), + _p11(_p6), + _p12(_p7), + _p13(_p8)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, b, e) { + return {ctor: '_Tuple5', _0: a, _1: b, _2: _p7, _3: _p8, _4: e}; + }), + _p10(_p5), + _p11(_p6), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, c, e) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: c, _3: _p8, _4: e}; + }), + _p10(_p5), + _p12(_p7), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (b, c, e) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: c, _3: _p8, _4: e}; + }), + _p11(_p6), + _p12(_p7), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, d, e) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: _p7, _3: d, _4: e}; + }), + _p10(_p5), + _p13(_p8), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (b, d, e) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: _p7, _3: d, _4: e}; + }), + _p11(_p6), + _p13(_p8), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (c, d, e) { + return {ctor: '_Tuple5', _0: _p5, _1: _p6, _2: c, _3: d, _4: e}; + }), + _p12(_p7), + _p13(_p8), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A5( + _elm_community$lazy_list$Lazy_List$map4, + F4( + function (b, c, d, e) { + return {ctor: '_Tuple5', _0: _p5, _1: b, _2: c, _3: d, _4: e}; + }), + _p11(_p6), + _p12(_p7), + _p13(_p8), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A5( + _elm_community$lazy_list$Lazy_List$map4, + F4( + function (a, c, d, e) { + return {ctor: '_Tuple5', _0: a, _1: _p6, _2: c, _3: d, _4: e}; + }), + _p10(_p5), + _p12(_p7), + _p13(_p8), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A5( + _elm_community$lazy_list$Lazy_List$map4, + F4( + function (a, b, d, e) { + return {ctor: '_Tuple5', _0: a, _1: b, _2: _p7, _3: d, _4: e}; + }), + _p10(_p5), + _p11(_p6), + _p13(_p8), + _p14(_p9)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A5( + _elm_community$lazy_list$Lazy_List$map4, + F4( + function (a, b, c, d) { + return {ctor: '_Tuple5', _0: a, _1: b, _2: c, _3: d, _4: _p9}; + }), + _p10(_p5), + _p11(_p6), + _p12(_p7), + _p13(_p8)), + A6( + _elm_community$lazy_list$Lazy_List$map5, + F5( + function (v0, v1, v2, v3, v4) { + return {ctor: '_Tuple5', _0: v0, _1: v1, _2: v2, _3: v3, _4: v4}; + }), + _p10(_p5), + _p11(_p6), + _p12(_p7), + _p13(_p8), + _p14(_p9))))))))))))))))))))))))))))))); + }); +var _elm_community$shrink$Shrink$tuple4 = F2( + function (_p16, _p15) { + var _p17 = _p16; + var _p26 = _p17._3; + var _p25 = _p17._2; + var _p24 = _p17._1; + var _p23 = _p17._0; + var _p18 = _p15; + var _p22 = _p18._3; + var _p21 = _p18._2; + var _p20 = _p18._1; + var _p19 = _p18._0; + return A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (d) { + return {ctor: '_Tuple4', _0: _p19, _1: _p20, _2: _p21, _3: d}; + }, + _p26(_p22)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (c) { + return {ctor: '_Tuple4', _0: _p19, _1: _p20, _2: c, _3: _p22}; + }, + _p25(_p21)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (b) { + return {ctor: '_Tuple4', _0: _p19, _1: b, _2: _p21, _3: _p22}; + }, + _p24(_p20)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (a) { + return {ctor: '_Tuple4', _0: a, _1: _p20, _2: _p21, _3: _p22}; + }, + _p23(_p19)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (c, d) { + return {ctor: '_Tuple4', _0: _p19, _1: _p20, _2: c, _3: d}; + }), + _p25(_p21), + _p26(_p22)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (b, d) { + return {ctor: '_Tuple4', _0: _p19, _1: b, _2: _p21, _3: d}; + }), + _p24(_p20), + _p26(_p22)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, d) { + return {ctor: '_Tuple4', _0: a, _1: _p20, _2: _p21, _3: d}; + }), + _p23(_p19), + _p26(_p22)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (b, c) { + return {ctor: '_Tuple4', _0: _p19, _1: b, _2: c, _3: _p22}; + }), + _p24(_p20), + _p25(_p21)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, c) { + return {ctor: '_Tuple4', _0: a, _1: _p20, _2: c, _3: _p22}; + }), + _p23(_p19), + _p25(_p21)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, b) { + return {ctor: '_Tuple4', _0: a, _1: b, _2: _p21, _3: _p22}; + }), + _p23(_p19), + _p24(_p20)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (b, c, d) { + return {ctor: '_Tuple4', _0: _p19, _1: b, _2: c, _3: d}; + }), + _p24(_p20), + _p25(_p21), + _p26(_p22)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, c, d) { + return {ctor: '_Tuple4', _0: a, _1: _p20, _2: c, _3: d}; + }), + _p23(_p19), + _p25(_p21), + _p26(_p22)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, b, d) { + return {ctor: '_Tuple4', _0: a, _1: b, _2: _p21, _3: d}; + }), + _p23(_p19), + _p24(_p20), + _p26(_p22)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (a, b, c) { + return {ctor: '_Tuple4', _0: a, _1: b, _2: c, _3: _p22}; + }), + _p23(_p19), + _p24(_p20), + _p25(_p21)), + A5( + _elm_community$lazy_list$Lazy_List$map4, + F4( + function (v0, v1, v2, v3) { + return {ctor: '_Tuple4', _0: v0, _1: v1, _2: v2, _3: v3}; + }), + _p23(_p19), + _p24(_p20), + _p25(_p21), + _p26(_p22)))))))))))))))); + }); +var _elm_community$shrink$Shrink$tuple3 = F2( + function (_p28, _p27) { + var _p29 = _p28; + var _p36 = _p29._2; + var _p35 = _p29._1; + var _p34 = _p29._0; + var _p30 = _p27; + var _p33 = _p30._2; + var _p32 = _p30._1; + var _p31 = _p30._0; + return A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (c) { + return {ctor: '_Tuple3', _0: _p31, _1: _p32, _2: c}; + }, + _p36(_p33)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (b) { + return {ctor: '_Tuple3', _0: _p31, _1: b, _2: _p33}; + }, + _p35(_p32)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + function (a) { + return {ctor: '_Tuple3', _0: a, _1: _p32, _2: _p33}; + }, + _p34(_p31)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (b, c) { + return {ctor: '_Tuple3', _0: _p31, _1: b, _2: c}; + }), + _p35(_p32), + _p36(_p33)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, c) { + return {ctor: '_Tuple3', _0: a, _1: _p32, _2: c}; + }), + _p34(_p31), + _p36(_p33)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (a, b) { + return {ctor: '_Tuple3', _0: a, _1: b, _2: _p33}; + }), + _p34(_p31), + _p35(_p32)), + A4( + _elm_community$lazy_list$Lazy_List$map3, + F3( + function (v0, v1, v2) { + return {ctor: '_Tuple3', _0: v0, _1: v1, _2: v2}; + }), + _p34(_p31), + _p35(_p32), + _p36(_p33)))))))); + }); +var _elm_community$shrink$Shrink$tuple = F2( + function (_p38, _p37) { + var _p39 = _p38; + var _p44 = _p39._1; + var _p43 = _p39._0; + var _p40 = _p37; + var _p42 = _p40._1; + var _p41 = _p40._0; + return A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + })(_p41), + _p44(_p42)), + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + A2( + _elm_lang$core$Basics$flip, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + _p42), + _p43(_p41)), + A3( + _elm_community$lazy_list$Lazy_List$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + _p43(_p41), + _p44(_p42)))); + }); +var _elm_community$shrink$Shrink$lazylist = F2( + function (shrink, l) { + return _elm_lang$lazy$Lazy$lazy( + function (_p45) { + var _p46 = _p45; + var removes = F3( + function (k, n, l) { + return _elm_lang$lazy$Lazy$lazy( + function (_p47) { + var _p48 = _p47; + if (_elm_lang$core$Native_Utils.cmp(k, n) > 0) { + return _elm_lang$lazy$Lazy$force(_elm_community$lazy_list$Lazy_List$empty); + } else { + if (_elm_community$lazy_list$Lazy_List$isEmpty(l)) { + return _elm_lang$lazy$Lazy$force( + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], _elm_community$lazy_list$Lazy_List$empty, _elm_community$lazy_list$Lazy_List$empty)); + } else { + var rest = A2(_elm_community$lazy_list$Lazy_List$drop, k, l); + var first = A2(_elm_community$lazy_list$Lazy_List$take, k, l); + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + rest, + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (x, y) { + return A2(_elm_community$lazy_list$Lazy_List_ops['+++'], x, y); + })(first), + A3(removes, k, n - k, rest)))); + } + } + }); + }); + var shrinkOne = function (l) { + return _elm_lang$lazy$Lazy$lazy( + function (_p49) { + var _p50 = _p49; + var _p51 = _elm_lang$lazy$Lazy$force(l); + if (_p51.ctor === 'Nil') { + return _elm_lang$lazy$Lazy$force(_elm_community$lazy_list$Lazy_List$empty); + } else { + var _p53 = _p51._1; + var _p52 = _p51._0; + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$map, + A2( + _elm_lang$core$Basics$flip, + F2( + function (x, y) { + return A2(_elm_community$lazy_list$Lazy_List_ops[':::'], x, y); + }), + _p53), + shrink(_p52)), + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (x, y) { + return A2(_elm_community$lazy_list$Lazy_List_ops[':::'], x, y); + })(_p52), + shrinkOne(_p53)))); + } + }); + }; + var n = _elm_community$lazy_list$Lazy_List$length(l); + return _elm_lang$lazy$Lazy$force( + A2( + _elm_community$lazy_list$Lazy_List_ops['+++'], + A2( + _elm_community$lazy_list$Lazy_List$andThen, + function (k) { + return A3(removes, k, n, l); + }, + A2( + _elm_community$lazy_list$Lazy_List$takeWhile, + function (x) { + return _elm_lang$core$Native_Utils.cmp(x, 0) > 0; + }, + A2( + _elm_community$lazy_list$Lazy_List$iterate, + function (n) { + return (n / 2) | 0; + }, + n))), + shrinkOne(l))); + }); + }); +var _elm_community$shrink$Shrink$list = function (shrink) { + return A3( + _elm_community$shrink$Shrink$convert, + _elm_community$lazy_list$Lazy_List$toList, + _elm_community$lazy_list$Lazy_List$fromList, + _elm_community$shrink$Shrink$lazylist(shrink)); +}; +var _elm_community$shrink$Shrink$array = function (shrink) { + return A3( + _elm_community$shrink$Shrink$convert, + _elm_community$lazy_list$Lazy_List$toArray, + _elm_community$lazy_list$Lazy_List$fromArray, + _elm_community$shrink$Shrink$lazylist(shrink)); +}; +var _elm_community$shrink$Shrink$result = F3( + function (shrinkError, shrinkValue, r) { + var _p54 = r; + if (_p54.ctor === 'Ok') { + return A2( + _elm_community$lazy_list$Lazy_List$map, + _elm_lang$core$Result$Ok, + shrinkValue(_p54._0)); + } else { + return A2( + _elm_community$lazy_list$Lazy_List$map, + _elm_lang$core$Result$Err, + shrinkError(_p54._0)); + } + }); +var _elm_community$shrink$Shrink$maybe = F2( + function (shrink, m) { + var _p55 = m; + if (_p55.ctor === 'Just') { + return A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _elm_lang$core$Maybe$Nothing, + A2( + _elm_community$lazy_list$Lazy_List$map, + _elm_lang$core$Maybe$Just, + shrink(_p55._0))); + } else { + return _elm_community$lazy_list$Lazy_List$empty; + } + }); +var _elm_community$shrink$Shrink$atLeastFloat = F2( + function (min, n) { + return ((_elm_lang$core$Native_Utils.cmp(n, 0) < 0) && (_elm_lang$core$Native_Utils.cmp(n, min) > -1)) ? A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + 0 - n, + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (x, y) { + return x * y; + })(-1), + A2(_elm_community$shrink$Shrink$seriesFloat, 0, 0 - n))) : A2( + _elm_community$shrink$Shrink$seriesFloat, + A2(_elm_lang$core$Basics$max, 0, min), + n); + }); +var _elm_community$shrink$Shrink$float = function (n) { + return (_elm_lang$core$Native_Utils.cmp(n, 0) < 0) ? A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + 0 - n, + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (x, y) { + return x * y; + })(-1), + A2(_elm_community$shrink$Shrink$seriesFloat, 0, 0 - n))) : A2(_elm_community$shrink$Shrink$seriesFloat, 0, n); +}; +var _elm_community$shrink$Shrink$atLeastInt = F2( + function (min, n) { + return ((_elm_lang$core$Native_Utils.cmp(n, 0) < 0) && (_elm_lang$core$Native_Utils.cmp(n, min) > -1)) ? A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + 0 - n, + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (x, y) { + return x * y; + })(-1), + A2(_elm_community$shrink$Shrink$seriesInt, 0, 0 - n))) : A2( + _elm_community$shrink$Shrink$seriesInt, + A2(_elm_lang$core$Basics$max, 0, min), + n); + }); +var _elm_community$shrink$Shrink$atLeastChar = function ($char) { + return A3( + _elm_community$shrink$Shrink$convert, + _elm_lang$core$Char$fromCode, + _elm_lang$core$Char$toCode, + _elm_community$shrink$Shrink$atLeastInt( + _elm_lang$core$Char$toCode($char))); +}; +var _elm_community$shrink$Shrink$character = _elm_community$shrink$Shrink$atLeastChar( + _elm_lang$core$Char$fromCode(32)); +var _elm_community$shrink$Shrink$string = A3( + _elm_community$shrink$Shrink$convert, + _elm_lang$core$String$fromList, + _elm_lang$core$String$toList, + _elm_community$shrink$Shrink$list(_elm_community$shrink$Shrink$character)); +var _elm_community$shrink$Shrink$int = function (n) { + return (_elm_lang$core$Native_Utils.cmp(n, 0) < 0) ? A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + 0 - n, + A2( + _elm_community$lazy_list$Lazy_List$map, + F2( + function (x, y) { + return x * y; + })(-1), + A2(_elm_community$shrink$Shrink$seriesInt, 0, 0 - n))) : A2(_elm_community$shrink$Shrink$seriesInt, 0, n); +}; +var _elm_community$shrink$Shrink$char = A3(_elm_community$shrink$Shrink$convert, _elm_lang$core$Char$fromCode, _elm_lang$core$Char$toCode, _elm_community$shrink$Shrink$int); +var _elm_community$shrink$Shrink$order = function (o) { + var _p56 = o; + switch (_p56.ctor) { + case 'GT': + return A2( + _elm_community$lazy_list$Lazy_List_ops[':::'], + _elm_lang$core$Basics$EQ, + A2(_elm_community$lazy_list$Lazy_List_ops[':::'], _elm_lang$core$Basics$LT, _elm_community$lazy_list$Lazy_List$empty)); + case 'LT': + return A2(_elm_community$lazy_list$Lazy_List_ops[':::'], _elm_lang$core$Basics$EQ, _elm_community$lazy_list$Lazy_List$empty); + default: + return _elm_community$lazy_list$Lazy_List$empty; + } +}; +var _elm_community$shrink$Shrink$bool = function (b) { + var _p57 = b; + if (_p57 === true) { + return A2(_elm_community$lazy_list$Lazy_List_ops[':::'], false, _elm_community$lazy_list$Lazy_List$empty); + } else { + return _elm_community$lazy_list$Lazy_List$empty; + } +}; +var _elm_community$shrink$Shrink$noShrink = function (_p58) { + return _elm_community$lazy_list$Lazy_List$empty; +}; +var _elm_community$shrink$Shrink$unit = _elm_community$shrink$Shrink$noShrink; +var _elm_community$shrink$Shrink$shrink = F3( + function (keepShrinking, shrinker, originalVal) { + var helper = F2( + function (lazyList, val) { + helper: + while (true) { + var _p59 = _elm_lang$lazy$Lazy$force(lazyList); + if (_p59.ctor === 'Nil') { + return val; + } else { + var _p60 = _p59._0; + if (keepShrinking(_p60)) { + var _v17 = shrinker(_p60), + _v18 = _p60; + lazyList = _v17; + val = _v18; + continue helper; + } else { + var _v19 = _p59._1, + _v20 = val; + lazyList = _v19; + val = _v20; + continue helper; + } + } + } + }); + return A2( + helper, + shrinker(originalVal), + originalVal); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/graph.dat new file mode 100644 index 0000000..d552caf Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-community/shrink/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Array.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Array.elmi new file mode 100644 index 0000000..0c0307d Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Array.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Array.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Array.elmo new file mode 100644 index 0000000..958955b --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Array.elmo @@ -0,0 +1,54 @@ +var _elm_lang$core$Array$append = _elm_lang$core$Native_Array.append; +var _elm_lang$core$Array$length = _elm_lang$core$Native_Array.length; +var _elm_lang$core$Array$isEmpty = function (array) { + return _elm_lang$core$Native_Utils.eq( + _elm_lang$core$Array$length(array), + 0); +}; +var _elm_lang$core$Array$slice = _elm_lang$core$Native_Array.slice; +var _elm_lang$core$Array$set = _elm_lang$core$Native_Array.set; +var _elm_lang$core$Array$get = F2( + function (i, array) { + return ((_elm_lang$core$Native_Utils.cmp(0, i) < 1) && (_elm_lang$core$Native_Utils.cmp( + i, + _elm_lang$core$Native_Array.length(array)) < 0)) ? _elm_lang$core$Maybe$Just( + A2(_elm_lang$core$Native_Array.get, i, array)) : _elm_lang$core$Maybe$Nothing; + }); +var _elm_lang$core$Array$push = _elm_lang$core$Native_Array.push; +var _elm_lang$core$Array$empty = _elm_lang$core$Native_Array.empty; +var _elm_lang$core$Array$filter = F2( + function (isOkay, arr) { + var update = F2( + function (x, xs) { + return isOkay(x) ? A2(_elm_lang$core$Native_Array.push, x, xs) : xs; + }); + return A3(_elm_lang$core$Native_Array.foldl, update, _elm_lang$core$Native_Array.empty, arr); + }); +var _elm_lang$core$Array$foldr = _elm_lang$core$Native_Array.foldr; +var _elm_lang$core$Array$foldl = _elm_lang$core$Native_Array.foldl; +var _elm_lang$core$Array$indexedMap = _elm_lang$core$Native_Array.indexedMap; +var _elm_lang$core$Array$map = _elm_lang$core$Native_Array.map; +var _elm_lang$core$Array$toIndexedList = function (array) { + return A3( + _elm_lang$core$List$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A2( + _elm_lang$core$List$range, + 0, + _elm_lang$core$Native_Array.length(array) - 1), + _elm_lang$core$Native_Array.toList(array)); +}; +var _elm_lang$core$Array$toList = _elm_lang$core$Native_Array.toList; +var _elm_lang$core$Array$fromList = _elm_lang$core$Native_Array.fromList; +var _elm_lang$core$Array$initialize = _elm_lang$core$Native_Array.initialize; +var _elm_lang$core$Array$repeat = F2( + function (n, e) { + return A2( + _elm_lang$core$Array$initialize, + n, + _elm_lang$core$Basics$always(e)); + }); +var _elm_lang$core$Array$Array = {ctor: 'Array'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Basics.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Basics.elmi new file mode 100644 index 0000000..75f620a Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Basics.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Basics.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Basics.elmo new file mode 100644 index 0000000..64d8f36 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Basics.elmo @@ -0,0 +1,125 @@ +var _elm_lang$core$Basics$never = function (_p0) { + never: + while (true) { + var _p1 = _p0; + var _v1 = _p1._0; + _p0 = _v1; + continue never; + } +}; +var _elm_lang$core$Basics$uncurry = F2( + function (f, _p2) { + var _p3 = _p2; + return A2(f, _p3._0, _p3._1); + }); +var _elm_lang$core$Basics$curry = F3( + function (f, a, b) { + return f( + {ctor: '_Tuple2', _0: a, _1: b}); + }); +var _elm_lang$core$Basics$flip = F3( + function (f, b, a) { + return A2(f, a, b); + }); +var _elm_lang$core$Basics$always = F2( + function (a, _p4) { + return a; + }); +var _elm_lang$core$Basics$identity = function (x) { + return x; +}; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<|'] = F2( + function (f, x) { + return f(x); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['|>'] = F2( + function (x, f) { + return f(x); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['>>'] = F3( + function (f, g, x) { + return g( + f(x)); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<<'] = F3( + function (g, f, x) { + return g( + f(x)); + }); +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['++'] = _elm_lang$core$Native_Utils.append; +var _elm_lang$core$Basics$toString = _elm_lang$core$Native_Utils.toString; +var _elm_lang$core$Basics$isInfinite = _elm_lang$core$Native_Basics.isInfinite; +var _elm_lang$core$Basics$isNaN = _elm_lang$core$Native_Basics.isNaN; +var _elm_lang$core$Basics$toFloat = _elm_lang$core$Native_Basics.toFloat; +var _elm_lang$core$Basics$ceiling = _elm_lang$core$Native_Basics.ceiling; +var _elm_lang$core$Basics$floor = _elm_lang$core$Native_Basics.floor; +var _elm_lang$core$Basics$truncate = _elm_lang$core$Native_Basics.truncate; +var _elm_lang$core$Basics$round = _elm_lang$core$Native_Basics.round; +var _elm_lang$core$Basics$not = _elm_lang$core$Native_Basics.not; +var _elm_lang$core$Basics$xor = _elm_lang$core$Native_Basics.xor; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['||'] = _elm_lang$core$Native_Basics.or; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['&&'] = _elm_lang$core$Native_Basics.and; +var _elm_lang$core$Basics$max = _elm_lang$core$Native_Basics.max; +var _elm_lang$core$Basics$min = _elm_lang$core$Native_Basics.min; +var _elm_lang$core$Basics$compare = _elm_lang$core$Native_Basics.compare; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['>='] = _elm_lang$core$Native_Basics.ge; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<='] = _elm_lang$core$Native_Basics.le; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['>'] = _elm_lang$core$Native_Basics.gt; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['<'] = _elm_lang$core$Native_Basics.lt; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['/='] = _elm_lang$core$Native_Basics.neq; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['=='] = _elm_lang$core$Native_Basics.eq; +var _elm_lang$core$Basics$e = _elm_lang$core$Native_Basics.e; +var _elm_lang$core$Basics$pi = _elm_lang$core$Native_Basics.pi; +var _elm_lang$core$Basics$clamp = _elm_lang$core$Native_Basics.clamp; +var _elm_lang$core$Basics$logBase = _elm_lang$core$Native_Basics.logBase; +var _elm_lang$core$Basics$abs = _elm_lang$core$Native_Basics.abs; +var _elm_lang$core$Basics$negate = _elm_lang$core$Native_Basics.negate; +var _elm_lang$core$Basics$sqrt = _elm_lang$core$Native_Basics.sqrt; +var _elm_lang$core$Basics$atan2 = _elm_lang$core$Native_Basics.atan2; +var _elm_lang$core$Basics$atan = _elm_lang$core$Native_Basics.atan; +var _elm_lang$core$Basics$asin = _elm_lang$core$Native_Basics.asin; +var _elm_lang$core$Basics$acos = _elm_lang$core$Native_Basics.acos; +var _elm_lang$core$Basics$tan = _elm_lang$core$Native_Basics.tan; +var _elm_lang$core$Basics$sin = _elm_lang$core$Native_Basics.sin; +var _elm_lang$core$Basics$cos = _elm_lang$core$Native_Basics.cos; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['^'] = _elm_lang$core$Native_Basics.exp; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['%'] = _elm_lang$core$Native_Basics.mod; +var _elm_lang$core$Basics$rem = _elm_lang$core$Native_Basics.rem; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['//'] = _elm_lang$core$Native_Basics.div; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['/'] = _elm_lang$core$Native_Basics.floatDiv; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['*'] = _elm_lang$core$Native_Basics.mul; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['-'] = _elm_lang$core$Native_Basics.sub; +var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; +_elm_lang$core$Basics_ops['+'] = _elm_lang$core$Native_Basics.add; +var _elm_lang$core$Basics$toPolar = _elm_lang$core$Native_Basics.toPolar; +var _elm_lang$core$Basics$fromPolar = _elm_lang$core$Native_Basics.fromPolar; +var _elm_lang$core$Basics$turns = _elm_lang$core$Native_Basics.turns; +var _elm_lang$core$Basics$degrees = _elm_lang$core$Native_Basics.degrees; +var _elm_lang$core$Basics$radians = function (t) { + return t; +}; +var _elm_lang$core$Basics$GT = {ctor: 'GT'}; +var _elm_lang$core$Basics$EQ = {ctor: 'EQ'}; +var _elm_lang$core$Basics$LT = {ctor: 'LT'}; +var _elm_lang$core$Basics$JustOneMore = function (a) { + return {ctor: 'JustOneMore', _0: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Bitwise.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Bitwise.elmi new file mode 100644 index 0000000..627a4b5 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Bitwise.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Bitwise.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Bitwise.elmo new file mode 100644 index 0000000..91e7c15 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Bitwise.elmo @@ -0,0 +1,7 @@ +var _elm_lang$core$Bitwise$shiftRightZfBy = _elm_lang$core$Native_Bitwise.shiftRightZfBy; +var _elm_lang$core$Bitwise$shiftRightBy = _elm_lang$core$Native_Bitwise.shiftRightBy; +var _elm_lang$core$Bitwise$shiftLeftBy = _elm_lang$core$Native_Bitwise.shiftLeftBy; +var _elm_lang$core$Bitwise$complement = _elm_lang$core$Native_Bitwise.complement; +var _elm_lang$core$Bitwise$xor = _elm_lang$core$Native_Bitwise.xor; +var _elm_lang$core$Bitwise$or = _elm_lang$core$Native_Bitwise.or; +var _elm_lang$core$Bitwise$and = _elm_lang$core$Native_Bitwise.and; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Char.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Char.elmi new file mode 100644 index 0000000..0ca5ebc Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Char.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Char.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Char.elmo new file mode 100644 index 0000000..39837ec --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Char.elmo @@ -0,0 +1,42 @@ +var _elm_lang$core$Char$fromCode = _elm_lang$core$Native_Char.fromCode; +var _elm_lang$core$Char$toCode = _elm_lang$core$Native_Char.toCode; +var _elm_lang$core$Char$toLocaleLower = _elm_lang$core$Native_Char.toLocaleLower; +var _elm_lang$core$Char$toLocaleUpper = _elm_lang$core$Native_Char.toLocaleUpper; +var _elm_lang$core$Char$toLower = _elm_lang$core$Native_Char.toLower; +var _elm_lang$core$Char$toUpper = _elm_lang$core$Native_Char.toUpper; +var _elm_lang$core$Char$isBetween = F3( + function (low, high, $char) { + var code = _elm_lang$core$Char$toCode($char); + return (_elm_lang$core$Native_Utils.cmp( + code, + _elm_lang$core$Char$toCode(low)) > -1) && (_elm_lang$core$Native_Utils.cmp( + code, + _elm_lang$core$Char$toCode(high)) < 1); + }); +var _elm_lang$core$Char$isUpper = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('A'), + _elm_lang$core$Native_Utils.chr('Z')); +var _elm_lang$core$Char$isLower = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('a'), + _elm_lang$core$Native_Utils.chr('z')); +var _elm_lang$core$Char$isDigit = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Native_Utils.chr('9')); +var _elm_lang$core$Char$isOctDigit = A2( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Native_Utils.chr('7')); +var _elm_lang$core$Char$isHexDigit = function ($char) { + return _elm_lang$core$Char$isDigit($char) || (A3( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('a'), + _elm_lang$core$Native_Utils.chr('f'), + $char) || A3( + _elm_lang$core$Char$isBetween, + _elm_lang$core$Native_Utils.chr('A'), + _elm_lang$core$Native_Utils.chr('F'), + $char)); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Color.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Color.elmi new file mode 100644 index 0000000..7a9c04b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Color.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Color.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Color.elmo new file mode 100644 index 0000000..077056a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Color.elmo @@ -0,0 +1,165 @@ +var _elm_lang$core$Color$fmod = F2( + function (f, n) { + var integer = _elm_lang$core$Basics$floor(f); + return (_elm_lang$core$Basics$toFloat( + A2(_elm_lang$core$Basics_ops['%'], integer, n)) + f) - _elm_lang$core$Basics$toFloat(integer); + }); +var _elm_lang$core$Color$rgbToHsl = F3( + function (red, green, blue) { + var b = _elm_lang$core$Basics$toFloat(blue) / 255; + var g = _elm_lang$core$Basics$toFloat(green) / 255; + var r = _elm_lang$core$Basics$toFloat(red) / 255; + var cMax = A2( + _elm_lang$core$Basics$max, + A2(_elm_lang$core$Basics$max, r, g), + b); + var cMin = A2( + _elm_lang$core$Basics$min, + A2(_elm_lang$core$Basics$min, r, g), + b); + var c = cMax - cMin; + var lightness = (cMax + cMin) / 2; + var saturation = _elm_lang$core$Native_Utils.eq(lightness, 0) ? 0 : (c / (1 - _elm_lang$core$Basics$abs((2 * lightness) - 1))); + var hue = _elm_lang$core$Basics$degrees(60) * (_elm_lang$core$Native_Utils.eq(cMax, r) ? A2(_elm_lang$core$Color$fmod, (g - b) / c, 6) : (_elm_lang$core$Native_Utils.eq(cMax, g) ? (((b - r) / c) + 2) : (((r - g) / c) + 4))); + return {ctor: '_Tuple3', _0: hue, _1: saturation, _2: lightness}; + }); +var _elm_lang$core$Color$hslToRgb = F3( + function (hue, saturation, lightness) { + var normHue = hue / _elm_lang$core$Basics$degrees(60); + var chroma = (1 - _elm_lang$core$Basics$abs((2 * lightness) - 1)) * saturation; + var x = chroma * (1 - _elm_lang$core$Basics$abs( + A2(_elm_lang$core$Color$fmod, normHue, 2) - 1)); + var _p0 = (_elm_lang$core$Native_Utils.cmp(normHue, 0) < 0) ? {ctor: '_Tuple3', _0: 0, _1: 0, _2: 0} : ((_elm_lang$core$Native_Utils.cmp(normHue, 1) < 0) ? {ctor: '_Tuple3', _0: chroma, _1: x, _2: 0} : ((_elm_lang$core$Native_Utils.cmp(normHue, 2) < 0) ? {ctor: '_Tuple3', _0: x, _1: chroma, _2: 0} : ((_elm_lang$core$Native_Utils.cmp(normHue, 3) < 0) ? {ctor: '_Tuple3', _0: 0, _1: chroma, _2: x} : ((_elm_lang$core$Native_Utils.cmp(normHue, 4) < 0) ? {ctor: '_Tuple3', _0: 0, _1: x, _2: chroma} : ((_elm_lang$core$Native_Utils.cmp(normHue, 5) < 0) ? {ctor: '_Tuple3', _0: x, _1: 0, _2: chroma} : ((_elm_lang$core$Native_Utils.cmp(normHue, 6) < 0) ? {ctor: '_Tuple3', _0: chroma, _1: 0, _2: x} : {ctor: '_Tuple3', _0: 0, _1: 0, _2: 0})))))); + var r = _p0._0; + var g = _p0._1; + var b = _p0._2; + var m = lightness - (chroma / 2); + return {ctor: '_Tuple3', _0: r + m, _1: g + m, _2: b + m}; + }); +var _elm_lang$core$Color$toRgb = function (color) { + var _p1 = color; + if (_p1.ctor === 'RGBA') { + return {red: _p1._0, green: _p1._1, blue: _p1._2, alpha: _p1._3}; + } else { + var _p2 = A3(_elm_lang$core$Color$hslToRgb, _p1._0, _p1._1, _p1._2); + var r = _p2._0; + var g = _p2._1; + var b = _p2._2; + return { + red: _elm_lang$core$Basics$round(255 * r), + green: _elm_lang$core$Basics$round(255 * g), + blue: _elm_lang$core$Basics$round(255 * b), + alpha: _p1._3 + }; + } +}; +var _elm_lang$core$Color$toHsl = function (color) { + var _p3 = color; + if (_p3.ctor === 'HSLA') { + return {hue: _p3._0, saturation: _p3._1, lightness: _p3._2, alpha: _p3._3}; + } else { + var _p4 = A3(_elm_lang$core$Color$rgbToHsl, _p3._0, _p3._1, _p3._2); + var h = _p4._0; + var s = _p4._1; + var l = _p4._2; + return {hue: h, saturation: s, lightness: l, alpha: _p3._3}; + } +}; +var _elm_lang$core$Color$HSLA = F4( + function (a, b, c, d) { + return {ctor: 'HSLA', _0: a, _1: b, _2: c, _3: d}; + }); +var _elm_lang$core$Color$hsla = F4( + function (hue, saturation, lightness, alpha) { + return A4( + _elm_lang$core$Color$HSLA, + hue - _elm_lang$core$Basics$turns( + _elm_lang$core$Basics$toFloat( + _elm_lang$core$Basics$floor(hue / (2 * _elm_lang$core$Basics$pi)))), + saturation, + lightness, + alpha); + }); +var _elm_lang$core$Color$hsl = F3( + function (hue, saturation, lightness) { + return A4(_elm_lang$core$Color$hsla, hue, saturation, lightness, 1); + }); +var _elm_lang$core$Color$complement = function (color) { + var _p5 = color; + if (_p5.ctor === 'HSLA') { + return A4( + _elm_lang$core$Color$hsla, + _p5._0 + _elm_lang$core$Basics$degrees(180), + _p5._1, + _p5._2, + _p5._3); + } else { + var _p6 = A3(_elm_lang$core$Color$rgbToHsl, _p5._0, _p5._1, _p5._2); + var h = _p6._0; + var s = _p6._1; + var l = _p6._2; + return A4( + _elm_lang$core$Color$hsla, + h + _elm_lang$core$Basics$degrees(180), + s, + l, + _p5._3); + } +}; +var _elm_lang$core$Color$grayscale = function (p) { + return A4(_elm_lang$core$Color$HSLA, 0, 0, 1 - p, 1); +}; +var _elm_lang$core$Color$greyscale = function (p) { + return A4(_elm_lang$core$Color$HSLA, 0, 0, 1 - p, 1); +}; +var _elm_lang$core$Color$RGBA = F4( + function (a, b, c, d) { + return {ctor: 'RGBA', _0: a, _1: b, _2: c, _3: d}; + }); +var _elm_lang$core$Color$rgba = _elm_lang$core$Color$RGBA; +var _elm_lang$core$Color$rgb = F3( + function (r, g, b) { + return A4(_elm_lang$core$Color$RGBA, r, g, b, 1); + }); +var _elm_lang$core$Color$lightRed = A4(_elm_lang$core$Color$RGBA, 239, 41, 41, 1); +var _elm_lang$core$Color$red = A4(_elm_lang$core$Color$RGBA, 204, 0, 0, 1); +var _elm_lang$core$Color$darkRed = A4(_elm_lang$core$Color$RGBA, 164, 0, 0, 1); +var _elm_lang$core$Color$lightOrange = A4(_elm_lang$core$Color$RGBA, 252, 175, 62, 1); +var _elm_lang$core$Color$orange = A4(_elm_lang$core$Color$RGBA, 245, 121, 0, 1); +var _elm_lang$core$Color$darkOrange = A4(_elm_lang$core$Color$RGBA, 206, 92, 0, 1); +var _elm_lang$core$Color$lightYellow = A4(_elm_lang$core$Color$RGBA, 255, 233, 79, 1); +var _elm_lang$core$Color$yellow = A4(_elm_lang$core$Color$RGBA, 237, 212, 0, 1); +var _elm_lang$core$Color$darkYellow = A4(_elm_lang$core$Color$RGBA, 196, 160, 0, 1); +var _elm_lang$core$Color$lightGreen = A4(_elm_lang$core$Color$RGBA, 138, 226, 52, 1); +var _elm_lang$core$Color$green = A4(_elm_lang$core$Color$RGBA, 115, 210, 22, 1); +var _elm_lang$core$Color$darkGreen = A4(_elm_lang$core$Color$RGBA, 78, 154, 6, 1); +var _elm_lang$core$Color$lightBlue = A4(_elm_lang$core$Color$RGBA, 114, 159, 207, 1); +var _elm_lang$core$Color$blue = A4(_elm_lang$core$Color$RGBA, 52, 101, 164, 1); +var _elm_lang$core$Color$darkBlue = A4(_elm_lang$core$Color$RGBA, 32, 74, 135, 1); +var _elm_lang$core$Color$lightPurple = A4(_elm_lang$core$Color$RGBA, 173, 127, 168, 1); +var _elm_lang$core$Color$purple = A4(_elm_lang$core$Color$RGBA, 117, 80, 123, 1); +var _elm_lang$core$Color$darkPurple = A4(_elm_lang$core$Color$RGBA, 92, 53, 102, 1); +var _elm_lang$core$Color$lightBrown = A4(_elm_lang$core$Color$RGBA, 233, 185, 110, 1); +var _elm_lang$core$Color$brown = A4(_elm_lang$core$Color$RGBA, 193, 125, 17, 1); +var _elm_lang$core$Color$darkBrown = A4(_elm_lang$core$Color$RGBA, 143, 89, 2, 1); +var _elm_lang$core$Color$black = A4(_elm_lang$core$Color$RGBA, 0, 0, 0, 1); +var _elm_lang$core$Color$white = A4(_elm_lang$core$Color$RGBA, 255, 255, 255, 1); +var _elm_lang$core$Color$lightGrey = A4(_elm_lang$core$Color$RGBA, 238, 238, 236, 1); +var _elm_lang$core$Color$grey = A4(_elm_lang$core$Color$RGBA, 211, 215, 207, 1); +var _elm_lang$core$Color$darkGrey = A4(_elm_lang$core$Color$RGBA, 186, 189, 182, 1); +var _elm_lang$core$Color$lightGray = A4(_elm_lang$core$Color$RGBA, 238, 238, 236, 1); +var _elm_lang$core$Color$gray = A4(_elm_lang$core$Color$RGBA, 211, 215, 207, 1); +var _elm_lang$core$Color$darkGray = A4(_elm_lang$core$Color$RGBA, 186, 189, 182, 1); +var _elm_lang$core$Color$lightCharcoal = A4(_elm_lang$core$Color$RGBA, 136, 138, 133, 1); +var _elm_lang$core$Color$charcoal = A4(_elm_lang$core$Color$RGBA, 85, 87, 83, 1); +var _elm_lang$core$Color$darkCharcoal = A4(_elm_lang$core$Color$RGBA, 46, 52, 54, 1); +var _elm_lang$core$Color$Radial = F5( + function (a, b, c, d, e) { + return {ctor: 'Radial', _0: a, _1: b, _2: c, _3: d, _4: e}; + }); +var _elm_lang$core$Color$radial = _elm_lang$core$Color$Radial; +var _elm_lang$core$Color$Linear = F3( + function (a, b, c) { + return {ctor: 'Linear', _0: a, _1: b, _2: c}; + }); +var _elm_lang$core$Color$linear = _elm_lang$core$Color$Linear; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Date.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Date.elmi new file mode 100644 index 0000000..374b8c8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Date.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Date.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Date.elmo new file mode 100644 index 0000000..94ac728 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Date.elmo @@ -0,0 +1,32 @@ +var _elm_lang$core$Date$millisecond = _elm_lang$core$Native_Date.millisecond; +var _elm_lang$core$Date$second = _elm_lang$core$Native_Date.second; +var _elm_lang$core$Date$minute = _elm_lang$core$Native_Date.minute; +var _elm_lang$core$Date$hour = _elm_lang$core$Native_Date.hour; +var _elm_lang$core$Date$dayOfWeek = _elm_lang$core$Native_Date.dayOfWeek; +var _elm_lang$core$Date$day = _elm_lang$core$Native_Date.day; +var _elm_lang$core$Date$month = _elm_lang$core$Native_Date.month; +var _elm_lang$core$Date$year = _elm_lang$core$Native_Date.year; +var _elm_lang$core$Date$fromTime = _elm_lang$core$Native_Date.fromTime; +var _elm_lang$core$Date$toTime = _elm_lang$core$Native_Date.toTime; +var _elm_lang$core$Date$fromString = _elm_lang$core$Native_Date.fromString; +var _elm_lang$core$Date$now = A2(_elm_lang$core$Task$map, _elm_lang$core$Date$fromTime, _elm_lang$core$Time$now); +var _elm_lang$core$Date$Date = {ctor: 'Date'}; +var _elm_lang$core$Date$Sun = {ctor: 'Sun'}; +var _elm_lang$core$Date$Sat = {ctor: 'Sat'}; +var _elm_lang$core$Date$Fri = {ctor: 'Fri'}; +var _elm_lang$core$Date$Thu = {ctor: 'Thu'}; +var _elm_lang$core$Date$Wed = {ctor: 'Wed'}; +var _elm_lang$core$Date$Tue = {ctor: 'Tue'}; +var _elm_lang$core$Date$Mon = {ctor: 'Mon'}; +var _elm_lang$core$Date$Dec = {ctor: 'Dec'}; +var _elm_lang$core$Date$Nov = {ctor: 'Nov'}; +var _elm_lang$core$Date$Oct = {ctor: 'Oct'}; +var _elm_lang$core$Date$Sep = {ctor: 'Sep'}; +var _elm_lang$core$Date$Aug = {ctor: 'Aug'}; +var _elm_lang$core$Date$Jul = {ctor: 'Jul'}; +var _elm_lang$core$Date$Jun = {ctor: 'Jun'}; +var _elm_lang$core$Date$May = {ctor: 'May'}; +var _elm_lang$core$Date$Apr = {ctor: 'Apr'}; +var _elm_lang$core$Date$Mar = {ctor: 'Mar'}; +var _elm_lang$core$Date$Feb = {ctor: 'Feb'}; +var _elm_lang$core$Date$Jan = {ctor: 'Jan'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Debug.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Debug.elmi new file mode 100644 index 0000000..07f4024 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Debug.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Debug.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Debug.elmo new file mode 100644 index 0000000..ea00ee2 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Debug.elmo @@ -0,0 +1,2 @@ +var _elm_lang$core$Debug$crash = _elm_lang$core$Native_Debug.crash; +var _elm_lang$core$Debug$log = _elm_lang$core$Native_Debug.log; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Dict.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Dict.elmi new file mode 100644 index 0000000..58d6f83 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Dict.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Dict.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Dict.elmo new file mode 100644 index 0000000..3bca2d9 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Dict.elmo @@ -0,0 +1,916 @@ +var _elm_lang$core$Dict$foldr = F3( + function (f, acc, t) { + foldr: + while (true) { + var _p0 = t; + if (_p0.ctor === 'RBEmpty_elm_builtin') { + return acc; + } else { + var _v1 = f, + _v2 = A3( + f, + _p0._1, + _p0._2, + A3(_elm_lang$core$Dict$foldr, f, acc, _p0._4)), + _v3 = _p0._3; + f = _v1; + acc = _v2; + t = _v3; + continue foldr; + } + } + }); +var _elm_lang$core$Dict$keys = function (dict) { + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (key, value, keyList) { + return {ctor: '::', _0: key, _1: keyList}; + }), + {ctor: '[]'}, + dict); +}; +var _elm_lang$core$Dict$values = function (dict) { + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (key, value, valueList) { + return {ctor: '::', _0: value, _1: valueList}; + }), + {ctor: '[]'}, + dict); +}; +var _elm_lang$core$Dict$toList = function (dict) { + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (key, value, list) { + return { + ctor: '::', + _0: {ctor: '_Tuple2', _0: key, _1: value}, + _1: list + }; + }), + {ctor: '[]'}, + dict); +}; +var _elm_lang$core$Dict$foldl = F3( + function (f, acc, dict) { + foldl: + while (true) { + var _p1 = dict; + if (_p1.ctor === 'RBEmpty_elm_builtin') { + return acc; + } else { + var _v5 = f, + _v6 = A3( + f, + _p1._1, + _p1._2, + A3(_elm_lang$core$Dict$foldl, f, acc, _p1._3)), + _v7 = _p1._4; + f = _v5; + acc = _v6; + dict = _v7; + continue foldl; + } + } + }); +var _elm_lang$core$Dict$merge = F6( + function (leftStep, bothStep, rightStep, leftDict, rightDict, initialResult) { + var stepState = F3( + function (rKey, rValue, _p2) { + stepState: + while (true) { + var _p3 = _p2; + var _p9 = _p3._1; + var _p8 = _p3._0; + var _p4 = _p8; + if (_p4.ctor === '[]') { + return { + ctor: '_Tuple2', + _0: _p8, + _1: A3(rightStep, rKey, rValue, _p9) + }; + } else { + var _p7 = _p4._1; + var _p6 = _p4._0._1; + var _p5 = _p4._0._0; + if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) < 0) { + var _v10 = rKey, + _v11 = rValue, + _v12 = { + ctor: '_Tuple2', + _0: _p7, + _1: A3(leftStep, _p5, _p6, _p9) + }; + rKey = _v10; + rValue = _v11; + _p2 = _v12; + continue stepState; + } else { + if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) > 0) { + return { + ctor: '_Tuple2', + _0: _p8, + _1: A3(rightStep, rKey, rValue, _p9) + }; + } else { + return { + ctor: '_Tuple2', + _0: _p7, + _1: A4(bothStep, _p5, _p6, rValue, _p9) + }; + } + } + } + } + }); + var _p10 = A3( + _elm_lang$core$Dict$foldl, + stepState, + { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$toList(leftDict), + _1: initialResult + }, + rightDict); + var leftovers = _p10._0; + var intermediateResult = _p10._1; + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p11, result) { + var _p12 = _p11; + return A3(leftStep, _p12._0, _p12._1, result); + }), + intermediateResult, + leftovers); + }); +var _elm_lang$core$Dict$reportRemBug = F4( + function (msg, c, lgot, rgot) { + return _elm_lang$core$Native_Debug.crash( + _elm_lang$core$String$concat( + { + ctor: '::', + _0: 'Internal red-black tree invariant violated, expected ', + _1: { + ctor: '::', + _0: msg, + _1: { + ctor: '::', + _0: ' and got ', + _1: { + ctor: '::', + _0: _elm_lang$core$Basics$toString(c), + _1: { + ctor: '::', + _0: '/', + _1: { + ctor: '::', + _0: lgot, + _1: { + ctor: '::', + _0: '/', + _1: { + ctor: '::', + _0: rgot, + _1: { + ctor: '::', + _0: '\nPlease report this bug to ', + _1: {ctor: '[]'} + } + } + } + } + } + } + } + } + })); + }); +var _elm_lang$core$Dict$isBBlack = function (dict) { + var _p13 = dict; + _v14_2: + do { + if (_p13.ctor === 'RBNode_elm_builtin') { + if (_p13._0.ctor === 'BBlack') { + return true; + } else { + break _v14_2; + } + } else { + if (_p13._0.ctor === 'LBBlack') { + return true; + } else { + break _v14_2; + } + } + } while(false); + return false; +}; +var _elm_lang$core$Dict$sizeHelp = F2( + function (n, dict) { + sizeHelp: + while (true) { + var _p14 = dict; + if (_p14.ctor === 'RBEmpty_elm_builtin') { + return n; + } else { + var _v16 = A2(_elm_lang$core$Dict$sizeHelp, n + 1, _p14._4), + _v17 = _p14._3; + n = _v16; + dict = _v17; + continue sizeHelp; + } + } + }); +var _elm_lang$core$Dict$size = function (dict) { + return A2(_elm_lang$core$Dict$sizeHelp, 0, dict); +}; +var _elm_lang$core$Dict$get = F2( + function (targetKey, dict) { + get: + while (true) { + var _p15 = dict; + if (_p15.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Maybe$Nothing; + } else { + var _p16 = A2(_elm_lang$core$Basics$compare, targetKey, _p15._1); + switch (_p16.ctor) { + case 'LT': + var _v20 = targetKey, + _v21 = _p15._3; + targetKey = _v20; + dict = _v21; + continue get; + case 'EQ': + return _elm_lang$core$Maybe$Just(_p15._2); + default: + var _v22 = targetKey, + _v23 = _p15._4; + targetKey = _v22; + dict = _v23; + continue get; + } + } + } + }); +var _elm_lang$core$Dict$member = F2( + function (key, dict) { + var _p17 = A2(_elm_lang$core$Dict$get, key, dict); + if (_p17.ctor === 'Just') { + return true; + } else { + return false; + } + }); +var _elm_lang$core$Dict$maxWithDefault = F3( + function (k, v, r) { + maxWithDefault: + while (true) { + var _p18 = r; + if (_p18.ctor === 'RBEmpty_elm_builtin') { + return {ctor: '_Tuple2', _0: k, _1: v}; + } else { + var _v26 = _p18._1, + _v27 = _p18._2, + _v28 = _p18._4; + k = _v26; + v = _v27; + r = _v28; + continue maxWithDefault; + } + } + }); +var _elm_lang$core$Dict$NBlack = {ctor: 'NBlack'}; +var _elm_lang$core$Dict$BBlack = {ctor: 'BBlack'}; +var _elm_lang$core$Dict$Black = {ctor: 'Black'}; +var _elm_lang$core$Dict$blackish = function (t) { + var _p19 = t; + if (_p19.ctor === 'RBNode_elm_builtin') { + var _p20 = _p19._0; + return _elm_lang$core$Native_Utils.eq(_p20, _elm_lang$core$Dict$Black) || _elm_lang$core$Native_Utils.eq(_p20, _elm_lang$core$Dict$BBlack); + } else { + return true; + } +}; +var _elm_lang$core$Dict$Red = {ctor: 'Red'}; +var _elm_lang$core$Dict$moreBlack = function (color) { + var _p21 = color; + switch (_p21.ctor) { + case 'Black': + return _elm_lang$core$Dict$BBlack; + case 'Red': + return _elm_lang$core$Dict$Black; + case 'NBlack': + return _elm_lang$core$Dict$Red; + default: + return _elm_lang$core$Native_Debug.crash('Can\'t make a double black node more black!'); + } +}; +var _elm_lang$core$Dict$lessBlack = function (color) { + var _p22 = color; + switch (_p22.ctor) { + case 'BBlack': + return _elm_lang$core$Dict$Black; + case 'Black': + return _elm_lang$core$Dict$Red; + case 'Red': + return _elm_lang$core$Dict$NBlack; + default: + return _elm_lang$core$Native_Debug.crash('Can\'t make a negative black node less black!'); + } +}; +var _elm_lang$core$Dict$LBBlack = {ctor: 'LBBlack'}; +var _elm_lang$core$Dict$LBlack = {ctor: 'LBlack'}; +var _elm_lang$core$Dict$RBEmpty_elm_builtin = function (a) { + return {ctor: 'RBEmpty_elm_builtin', _0: a}; +}; +var _elm_lang$core$Dict$empty = _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); +var _elm_lang$core$Dict$isEmpty = function (dict) { + return _elm_lang$core$Native_Utils.eq(dict, _elm_lang$core$Dict$empty); +}; +var _elm_lang$core$Dict$RBNode_elm_builtin = F5( + function (a, b, c, d, e) { + return {ctor: 'RBNode_elm_builtin', _0: a, _1: b, _2: c, _3: d, _4: e}; + }); +var _elm_lang$core$Dict$ensureBlackRoot = function (dict) { + var _p23 = dict; + if ((_p23.ctor === 'RBNode_elm_builtin') && (_p23._0.ctor === 'Red')) { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p23._1, _p23._2, _p23._3, _p23._4); + } else { + return dict; + } +}; +var _elm_lang$core$Dict$lessBlackTree = function (dict) { + var _p24 = dict; + if (_p24.ctor === 'RBNode_elm_builtin') { + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$lessBlack(_p24._0), + _p24._1, + _p24._2, + _p24._3, + _p24._4); + } else { + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + } +}; +var _elm_lang$core$Dict$balancedTree = function (col) { + return function (xk) { + return function (xv) { + return function (yk) { + return function (yv) { + return function (zk) { + return function (zv) { + return function (a) { + return function (b) { + return function (c) { + return function (d) { + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$lessBlack(col), + yk, + yv, + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, xk, xv, a, b), + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, zk, zv, c, d)); + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; +var _elm_lang$core$Dict$blacken = function (t) { + var _p25 = t; + if (_p25.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + } else { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p25._1, _p25._2, _p25._3, _p25._4); + } +}; +var _elm_lang$core$Dict$redden = function (t) { + var _p26 = t; + if (_p26.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Native_Debug.crash('can\'t make a Leaf red'); + } else { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Red, _p26._1, _p26._2, _p26._3, _p26._4); + } +}; +var _elm_lang$core$Dict$balanceHelp = function (tree) { + var _p27 = tree; + _v36_6: + do { + _v36_5: + do { + _v36_4: + do { + _v36_3: + do { + _v36_2: + do { + _v36_1: + do { + _v36_0: + do { + if (_p27.ctor === 'RBNode_elm_builtin') { + if (_p27._3.ctor === 'RBNode_elm_builtin') { + if (_p27._4.ctor === 'RBNode_elm_builtin') { + switch (_p27._3._0.ctor) { + case 'Red': + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + break _v36_6; + } + } + } + } + case 'NBlack': + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + break _v36_6; + } + } + } + default: + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + break _v36_6; + } + } + } + case 'NBlack': + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + } + } + case 'NBlack': + if (_p27._0.ctor === 'BBlack') { + if ((((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + if ((((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + } + } else { + break _v36_6; + } + default: + if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + } + default: + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + break _v36_6; + } + } + case 'NBlack': + if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + break _v36_6; + } + default: + break _v36_6; + } + } + } else { + switch (_p27._3._0.ctor) { + case 'Red': + if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { + break _v36_0; + } else { + if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { + break _v36_1; + } else { + break _v36_6; + } + } + case 'NBlack': + if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { + break _v36_5; + } else { + break _v36_6; + } + default: + break _v36_6; + } + } + } else { + if (_p27._4.ctor === 'RBNode_elm_builtin') { + switch (_p27._4._0.ctor) { + case 'Red': + if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { + break _v36_2; + } else { + if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { + break _v36_3; + } else { + break _v36_6; + } + } + case 'NBlack': + if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { + break _v36_4; + } else { + break _v36_6; + } + default: + break _v36_6; + } + } else { + break _v36_6; + } + } + } else { + break _v36_6; + } + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._3._3._1)(_p27._3._3._2)(_p27._3._1)(_p27._3._2)(_p27._1)(_p27._2)(_p27._3._3._3)(_p27._3._3._4)(_p27._3._4)(_p27._4); + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._3._1)(_p27._3._2)(_p27._3._4._1)(_p27._3._4._2)(_p27._1)(_p27._2)(_p27._3._3)(_p27._3._4._3)(_p27._3._4._4)(_p27._4); + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._1)(_p27._2)(_p27._4._3._1)(_p27._4._3._2)(_p27._4._1)(_p27._4._2)(_p27._3)(_p27._4._3._3)(_p27._4._3._4)(_p27._4._4); + } while(false); + return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._1)(_p27._2)(_p27._4._1)(_p27._4._2)(_p27._4._4._1)(_p27._4._4._2)(_p27._3)(_p27._4._3)(_p27._4._4._3)(_p27._4._4._4); + } while(false); + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$Black, + _p27._4._3._1, + _p27._4._3._2, + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._1, _p27._2, _p27._3, _p27._4._3._3), + A5( + _elm_lang$core$Dict$balance, + _elm_lang$core$Dict$Black, + _p27._4._1, + _p27._4._2, + _p27._4._3._4, + _elm_lang$core$Dict$redden(_p27._4._4))); + } while(false); + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _elm_lang$core$Dict$Black, + _p27._3._4._1, + _p27._3._4._2, + A5( + _elm_lang$core$Dict$balance, + _elm_lang$core$Dict$Black, + _p27._3._1, + _p27._3._2, + _elm_lang$core$Dict$redden(_p27._3._3), + _p27._3._4._3), + A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._1, _p27._2, _p27._3._4._4, _p27._4)); + } while(false); + return tree; +}; +var _elm_lang$core$Dict$balance = F5( + function (c, k, v, l, r) { + var tree = A5(_elm_lang$core$Dict$RBNode_elm_builtin, c, k, v, l, r); + return _elm_lang$core$Dict$blackish(tree) ? _elm_lang$core$Dict$balanceHelp(tree) : tree; + }); +var _elm_lang$core$Dict$bubble = F5( + function (c, k, v, l, r) { + return (_elm_lang$core$Dict$isBBlack(l) || _elm_lang$core$Dict$isBBlack(r)) ? A5( + _elm_lang$core$Dict$balance, + _elm_lang$core$Dict$moreBlack(c), + k, + v, + _elm_lang$core$Dict$lessBlackTree(l), + _elm_lang$core$Dict$lessBlackTree(r)) : A5(_elm_lang$core$Dict$RBNode_elm_builtin, c, k, v, l, r); + }); +var _elm_lang$core$Dict$removeMax = F5( + function (c, k, v, l, r) { + var _p28 = r; + if (_p28.ctor === 'RBEmpty_elm_builtin') { + return A3(_elm_lang$core$Dict$rem, c, l, r); + } else { + return A5( + _elm_lang$core$Dict$bubble, + c, + k, + v, + l, + A5(_elm_lang$core$Dict$removeMax, _p28._0, _p28._1, _p28._2, _p28._3, _p28._4)); + } + }); +var _elm_lang$core$Dict$rem = F3( + function (color, left, right) { + var _p29 = {ctor: '_Tuple2', _0: left, _1: right}; + if (_p29._0.ctor === 'RBEmpty_elm_builtin') { + if (_p29._1.ctor === 'RBEmpty_elm_builtin') { + var _p30 = color; + switch (_p30.ctor) { + case 'Red': + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + case 'Black': + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBBlack); + default: + return _elm_lang$core$Native_Debug.crash('cannot have bblack or nblack nodes at this point'); + } + } else { + var _p33 = _p29._1._0; + var _p32 = _p29._0._0; + var _p31 = {ctor: '_Tuple3', _0: color, _1: _p32, _2: _p33}; + if ((((_p31.ctor === '_Tuple3') && (_p31._0.ctor === 'Black')) && (_p31._1.ctor === 'LBlack')) && (_p31._2.ctor === 'Red')) { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p29._1._1, _p29._1._2, _p29._1._3, _p29._1._4); + } else { + return A4( + _elm_lang$core$Dict$reportRemBug, + 'Black/LBlack/Red', + color, + _elm_lang$core$Basics$toString(_p32), + _elm_lang$core$Basics$toString(_p33)); + } + } + } else { + if (_p29._1.ctor === 'RBEmpty_elm_builtin') { + var _p36 = _p29._1._0; + var _p35 = _p29._0._0; + var _p34 = {ctor: '_Tuple3', _0: color, _1: _p35, _2: _p36}; + if ((((_p34.ctor === '_Tuple3') && (_p34._0.ctor === 'Black')) && (_p34._1.ctor === 'Red')) && (_p34._2.ctor === 'LBlack')) { + return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p29._0._1, _p29._0._2, _p29._0._3, _p29._0._4); + } else { + return A4( + _elm_lang$core$Dict$reportRemBug, + 'Black/Red/LBlack', + color, + _elm_lang$core$Basics$toString(_p35), + _elm_lang$core$Basics$toString(_p36)); + } + } else { + var _p40 = _p29._0._2; + var _p39 = _p29._0._4; + var _p38 = _p29._0._1; + var newLeft = A5(_elm_lang$core$Dict$removeMax, _p29._0._0, _p38, _p40, _p29._0._3, _p39); + var _p37 = A3(_elm_lang$core$Dict$maxWithDefault, _p38, _p40, _p39); + var k = _p37._0; + var v = _p37._1; + return A5(_elm_lang$core$Dict$bubble, color, k, v, newLeft, right); + } + } + }); +var _elm_lang$core$Dict$map = F2( + function (f, dict) { + var _p41 = dict; + if (_p41.ctor === 'RBEmpty_elm_builtin') { + return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); + } else { + var _p42 = _p41._1; + return A5( + _elm_lang$core$Dict$RBNode_elm_builtin, + _p41._0, + _p42, + A2(f, _p42, _p41._2), + A2(_elm_lang$core$Dict$map, f, _p41._3), + A2(_elm_lang$core$Dict$map, f, _p41._4)); + } + }); +var _elm_lang$core$Dict$Same = {ctor: 'Same'}; +var _elm_lang$core$Dict$Remove = {ctor: 'Remove'}; +var _elm_lang$core$Dict$Insert = {ctor: 'Insert'}; +var _elm_lang$core$Dict$update = F3( + function (k, alter, dict) { + var up = function (dict) { + var _p43 = dict; + if (_p43.ctor === 'RBEmpty_elm_builtin') { + var _p44 = alter(_elm_lang$core$Maybe$Nothing); + if (_p44.ctor === 'Nothing') { + return {ctor: '_Tuple2', _0: _elm_lang$core$Dict$Same, _1: _elm_lang$core$Dict$empty}; + } else { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Insert, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Red, k, _p44._0, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty) + }; + } + } else { + var _p55 = _p43._2; + var _p54 = _p43._4; + var _p53 = _p43._3; + var _p52 = _p43._1; + var _p51 = _p43._0; + var _p45 = A2(_elm_lang$core$Basics$compare, k, _p52); + switch (_p45.ctor) { + case 'EQ': + var _p46 = alter( + _elm_lang$core$Maybe$Just(_p55)); + if (_p46.ctor === 'Nothing') { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Remove, + _1: A3(_elm_lang$core$Dict$rem, _p51, _p53, _p54) + }; + } else { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Same, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p46._0, _p53, _p54) + }; + } + case 'LT': + var _p47 = up(_p53); + var flag = _p47._0; + var newLeft = _p47._1; + var _p48 = flag; + switch (_p48.ctor) { + case 'Same': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Same, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p55, newLeft, _p54) + }; + case 'Insert': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Insert, + _1: A5(_elm_lang$core$Dict$balance, _p51, _p52, _p55, newLeft, _p54) + }; + default: + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Remove, + _1: A5(_elm_lang$core$Dict$bubble, _p51, _p52, _p55, newLeft, _p54) + }; + } + default: + var _p49 = up(_p54); + var flag = _p49._0; + var newRight = _p49._1; + var _p50 = flag; + switch (_p50.ctor) { + case 'Same': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Same, + _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p55, _p53, newRight) + }; + case 'Insert': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Insert, + _1: A5(_elm_lang$core$Dict$balance, _p51, _p52, _p55, _p53, newRight) + }; + default: + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Dict$Remove, + _1: A5(_elm_lang$core$Dict$bubble, _p51, _p52, _p55, _p53, newRight) + }; + } + } + } + }; + var _p56 = up(dict); + var flag = _p56._0; + var updatedDict = _p56._1; + var _p57 = flag; + switch (_p57.ctor) { + case 'Same': + return updatedDict; + case 'Insert': + return _elm_lang$core$Dict$ensureBlackRoot(updatedDict); + default: + return _elm_lang$core$Dict$blacken(updatedDict); + } + }); +var _elm_lang$core$Dict$insert = F3( + function (key, value, dict) { + return A3( + _elm_lang$core$Dict$update, + key, + _elm_lang$core$Basics$always( + _elm_lang$core$Maybe$Just(value)), + dict); + }); +var _elm_lang$core$Dict$singleton = F2( + function (key, value) { + return A3(_elm_lang$core$Dict$insert, key, value, _elm_lang$core$Dict$empty); + }); +var _elm_lang$core$Dict$union = F2( + function (t1, t2) { + return A3(_elm_lang$core$Dict$foldl, _elm_lang$core$Dict$insert, t2, t1); + }); +var _elm_lang$core$Dict$filter = F2( + function (predicate, dictionary) { + var add = F3( + function (key, value, dict) { + return A2(predicate, key, value) ? A3(_elm_lang$core$Dict$insert, key, value, dict) : dict; + }); + return A3(_elm_lang$core$Dict$foldl, add, _elm_lang$core$Dict$empty, dictionary); + }); +var _elm_lang$core$Dict$intersect = F2( + function (t1, t2) { + return A2( + _elm_lang$core$Dict$filter, + F2( + function (k, _p58) { + return A2(_elm_lang$core$Dict$member, k, t2); + }), + t1); + }); +var _elm_lang$core$Dict$partition = F2( + function (predicate, dict) { + var add = F3( + function (key, value, _p59) { + var _p60 = _p59; + var _p62 = _p60._1; + var _p61 = _p60._0; + return A2(predicate, key, value) ? { + ctor: '_Tuple2', + _0: A3(_elm_lang$core$Dict$insert, key, value, _p61), + _1: _p62 + } : { + ctor: '_Tuple2', + _0: _p61, + _1: A3(_elm_lang$core$Dict$insert, key, value, _p62) + }; + }); + return A3( + _elm_lang$core$Dict$foldl, + add, + {ctor: '_Tuple2', _0: _elm_lang$core$Dict$empty, _1: _elm_lang$core$Dict$empty}, + dict); + }); +var _elm_lang$core$Dict$fromList = function (assocs) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p63, dict) { + var _p64 = _p63; + return A3(_elm_lang$core$Dict$insert, _p64._0, _p64._1, dict); + }), + _elm_lang$core$Dict$empty, + assocs); +}; +var _elm_lang$core$Dict$remove = F2( + function (key, dict) { + return A3( + _elm_lang$core$Dict$update, + key, + _elm_lang$core$Basics$always(_elm_lang$core$Maybe$Nothing), + dict); + }); +var _elm_lang$core$Dict$diff = F2( + function (t1, t2) { + return A3( + _elm_lang$core$Dict$foldl, + F3( + function (k, v, t) { + return A2(_elm_lang$core$Dict$remove, k, t); + }), + t1, + t2); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Decode.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Decode.elmi new file mode 100644 index 0000000..091b7c3 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Decode.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Decode.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Decode.elmo new file mode 100644 index 0000000..10795ad --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Decode.elmo @@ -0,0 +1,62 @@ +var _elm_lang$core$Json_Decode$null = _elm_lang$core$Native_Json.decodeNull; +var _elm_lang$core$Json_Decode$value = _elm_lang$core$Native_Json.decodePrimitive('value'); +var _elm_lang$core$Json_Decode$andThen = _elm_lang$core$Native_Json.andThen; +var _elm_lang$core$Json_Decode$fail = _elm_lang$core$Native_Json.fail; +var _elm_lang$core$Json_Decode$succeed = _elm_lang$core$Native_Json.succeed; +var _elm_lang$core$Json_Decode$lazy = function (thunk) { + return A2( + _elm_lang$core$Json_Decode$andThen, + thunk, + _elm_lang$core$Json_Decode$succeed( + {ctor: '_Tuple0'})); +}; +var _elm_lang$core$Json_Decode$decodeValue = _elm_lang$core$Native_Json.run; +var _elm_lang$core$Json_Decode$decodeString = _elm_lang$core$Native_Json.runOnString; +var _elm_lang$core$Json_Decode$map8 = _elm_lang$core$Native_Json.map8; +var _elm_lang$core$Json_Decode$map7 = _elm_lang$core$Native_Json.map7; +var _elm_lang$core$Json_Decode$map6 = _elm_lang$core$Native_Json.map6; +var _elm_lang$core$Json_Decode$map5 = _elm_lang$core$Native_Json.map5; +var _elm_lang$core$Json_Decode$map4 = _elm_lang$core$Native_Json.map4; +var _elm_lang$core$Json_Decode$map3 = _elm_lang$core$Native_Json.map3; +var _elm_lang$core$Json_Decode$map2 = _elm_lang$core$Native_Json.map2; +var _elm_lang$core$Json_Decode$map = _elm_lang$core$Native_Json.map1; +var _elm_lang$core$Json_Decode$oneOf = _elm_lang$core$Native_Json.oneOf; +var _elm_lang$core$Json_Decode$maybe = function (decoder) { + return A2(_elm_lang$core$Native_Json.decodeContainer, 'maybe', decoder); +}; +var _elm_lang$core$Json_Decode$index = _elm_lang$core$Native_Json.decodeIndex; +var _elm_lang$core$Json_Decode$field = _elm_lang$core$Native_Json.decodeField; +var _elm_lang$core$Json_Decode$at = F2( + function (fields, decoder) { + return A3(_elm_lang$core$List$foldr, _elm_lang$core$Json_Decode$field, decoder, fields); + }); +var _elm_lang$core$Json_Decode$keyValuePairs = _elm_lang$core$Native_Json.decodeKeyValuePairs; +var _elm_lang$core$Json_Decode$dict = function (decoder) { + return A2( + _elm_lang$core$Json_Decode$map, + _elm_lang$core$Dict$fromList, + _elm_lang$core$Json_Decode$keyValuePairs(decoder)); +}; +var _elm_lang$core$Json_Decode$array = function (decoder) { + return A2(_elm_lang$core$Native_Json.decodeContainer, 'array', decoder); +}; +var _elm_lang$core$Json_Decode$list = function (decoder) { + return A2(_elm_lang$core$Native_Json.decodeContainer, 'list', decoder); +}; +var _elm_lang$core$Json_Decode$nullable = function (decoder) { + return _elm_lang$core$Json_Decode$oneOf( + { + ctor: '::', + _0: _elm_lang$core$Json_Decode$null(_elm_lang$core$Maybe$Nothing), + _1: { + ctor: '::', + _0: A2(_elm_lang$core$Json_Decode$map, _elm_lang$core$Maybe$Just, decoder), + _1: {ctor: '[]'} + } + }); +}; +var _elm_lang$core$Json_Decode$float = _elm_lang$core$Native_Json.decodePrimitive('float'); +var _elm_lang$core$Json_Decode$int = _elm_lang$core$Native_Json.decodePrimitive('int'); +var _elm_lang$core$Json_Decode$bool = _elm_lang$core$Native_Json.decodePrimitive('bool'); +var _elm_lang$core$Json_Decode$string = _elm_lang$core$Native_Json.decodePrimitive('string'); +var _elm_lang$core$Json_Decode$Decoder = {ctor: 'Decoder'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Encode.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Encode.elmi new file mode 100644 index 0000000..42a0c09 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Encode.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Encode.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Encode.elmo new file mode 100644 index 0000000..3d24faa --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Json-Encode.elmo @@ -0,0 +1,10 @@ +var _elm_lang$core$Json_Encode$list = _elm_lang$core$Native_Json.encodeList; +var _elm_lang$core$Json_Encode$array = _elm_lang$core$Native_Json.encodeArray; +var _elm_lang$core$Json_Encode$object = _elm_lang$core$Native_Json.encodeObject; +var _elm_lang$core$Json_Encode$null = _elm_lang$core$Native_Json.encodeNull; +var _elm_lang$core$Json_Encode$bool = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$float = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$int = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$string = _elm_lang$core$Native_Json.identity; +var _elm_lang$core$Json_Encode$encode = _elm_lang$core$Native_Json.encode; +var _elm_lang$core$Json_Encode$Value = {ctor: 'Value'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/List.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/List.elmi new file mode 100644 index 0000000..2599529 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/List.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/List.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/List.elmo new file mode 100644 index 0000000..58b74c2 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/List.elmo @@ -0,0 +1,545 @@ +var _elm_lang$core$List$sortWith = _elm_lang$core$Native_List.sortWith; +var _elm_lang$core$List$sortBy = _elm_lang$core$Native_List.sortBy; +var _elm_lang$core$List$sort = function (xs) { + return A2(_elm_lang$core$List$sortBy, _elm_lang$core$Basics$identity, xs); +}; +var _elm_lang$core$List$drop = F2( + function (n, list) { + drop: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return list; + } else { + var _p0 = list; + if (_p0.ctor === '[]') { + return list; + } else { + var _v1 = n - 1, + _v2 = _p0._1; + n = _v1; + list = _v2; + continue drop; + } + } + } + }); +var _elm_lang$core$List$map5 = _elm_lang$core$Native_List.map5; +var _elm_lang$core$List$map4 = _elm_lang$core$Native_List.map4; +var _elm_lang$core$List$map3 = _elm_lang$core$Native_List.map3; +var _elm_lang$core$List$map2 = _elm_lang$core$Native_List.map2; +var _elm_lang$core$List$any = F2( + function (isOkay, list) { + any: + while (true) { + var _p1 = list; + if (_p1.ctor === '[]') { + return false; + } else { + if (isOkay(_p1._0)) { + return true; + } else { + var _v4 = isOkay, + _v5 = _p1._1; + isOkay = _v4; + list = _v5; + continue any; + } + } + } + }); +var _elm_lang$core$List$all = F2( + function (isOkay, list) { + return !A2( + _elm_lang$core$List$any, + function (_p2) { + return !isOkay(_p2); + }, + list); + }); +var _elm_lang$core$List$foldr = _elm_lang$core$Native_List.foldr; +var _elm_lang$core$List$foldl = F3( + function (func, acc, list) { + foldl: + while (true) { + var _p3 = list; + if (_p3.ctor === '[]') { + return acc; + } else { + var _v7 = func, + _v8 = A2(func, _p3._0, acc), + _v9 = _p3._1; + func = _v7; + acc = _v8; + list = _v9; + continue foldl; + } + } + }); +var _elm_lang$core$List$length = function (xs) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (_p4, i) { + return i + 1; + }), + 0, + xs); +}; +var _elm_lang$core$List$sum = function (numbers) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (x, y) { + return x + y; + }), + 0, + numbers); +}; +var _elm_lang$core$List$product = function (numbers) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (x, y) { + return x * y; + }), + 1, + numbers); +}; +var _elm_lang$core$List$maximum = function (list) { + var _p5 = list; + if (_p5.ctor === '::') { + return _elm_lang$core$Maybe$Just( + A3(_elm_lang$core$List$foldl, _elm_lang$core$Basics$max, _p5._0, _p5._1)); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List$minimum = function (list) { + var _p6 = list; + if (_p6.ctor === '::') { + return _elm_lang$core$Maybe$Just( + A3(_elm_lang$core$List$foldl, _elm_lang$core$Basics$min, _p6._0, _p6._1)); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List$member = F2( + function (x, xs) { + return A2( + _elm_lang$core$List$any, + function (a) { + return _elm_lang$core$Native_Utils.eq(a, x); + }, + xs); + }); +var _elm_lang$core$List$isEmpty = function (xs) { + var _p7 = xs; + if (_p7.ctor === '[]') { + return true; + } else { + return false; + } +}; +var _elm_lang$core$List$tail = function (list) { + var _p8 = list; + if (_p8.ctor === '::') { + return _elm_lang$core$Maybe$Just(_p8._1); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List$head = function (list) { + var _p9 = list; + if (_p9.ctor === '::') { + return _elm_lang$core$Maybe$Just(_p9._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$List_ops = _elm_lang$core$List_ops || {}; +_elm_lang$core$List_ops['::'] = _elm_lang$core$Native_List.cons; +var _elm_lang$core$List$map = F2( + function (f, xs) { + return A3( + _elm_lang$core$List$foldr, + F2( + function (x, acc) { + return { + ctor: '::', + _0: f(x), + _1: acc + }; + }), + {ctor: '[]'}, + xs); + }); +var _elm_lang$core$List$filter = F2( + function (pred, xs) { + var conditionalCons = F2( + function (front, back) { + return pred(front) ? {ctor: '::', _0: front, _1: back} : back; + }); + return A3( + _elm_lang$core$List$foldr, + conditionalCons, + {ctor: '[]'}, + xs); + }); +var _elm_lang$core$List$maybeCons = F3( + function (f, mx, xs) { + var _p10 = f(mx); + if (_p10.ctor === 'Just') { + return {ctor: '::', _0: _p10._0, _1: xs}; + } else { + return xs; + } + }); +var _elm_lang$core$List$filterMap = F2( + function (f, xs) { + return A3( + _elm_lang$core$List$foldr, + _elm_lang$core$List$maybeCons(f), + {ctor: '[]'}, + xs); + }); +var _elm_lang$core$List$reverse = function (list) { + return A3( + _elm_lang$core$List$foldl, + F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + }), + {ctor: '[]'}, + list); +}; +var _elm_lang$core$List$scanl = F3( + function (f, b, xs) { + var scan1 = F2( + function (x, accAcc) { + var _p11 = accAcc; + if (_p11.ctor === '::') { + return { + ctor: '::', + _0: A2(f, x, _p11._0), + _1: accAcc + }; + } else { + return {ctor: '[]'}; + } + }); + return _elm_lang$core$List$reverse( + A3( + _elm_lang$core$List$foldl, + scan1, + { + ctor: '::', + _0: b, + _1: {ctor: '[]'} + }, + xs)); + }); +var _elm_lang$core$List$append = F2( + function (xs, ys) { + var _p12 = ys; + if (_p12.ctor === '[]') { + return xs; + } else { + return A3( + _elm_lang$core$List$foldr, + F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + }), + ys, + xs); + } + }); +var _elm_lang$core$List$concat = function (lists) { + return A3( + _elm_lang$core$List$foldr, + _elm_lang$core$List$append, + {ctor: '[]'}, + lists); +}; +var _elm_lang$core$List$concatMap = F2( + function (f, list) { + return _elm_lang$core$List$concat( + A2(_elm_lang$core$List$map, f, list)); + }); +var _elm_lang$core$List$partition = F2( + function (pred, list) { + var step = F2( + function (x, _p13) { + var _p14 = _p13; + var _p16 = _p14._0; + var _p15 = _p14._1; + return pred(x) ? { + ctor: '_Tuple2', + _0: {ctor: '::', _0: x, _1: _p16}, + _1: _p15 + } : { + ctor: '_Tuple2', + _0: _p16, + _1: {ctor: '::', _0: x, _1: _p15} + }; + }); + return A3( + _elm_lang$core$List$foldr, + step, + { + ctor: '_Tuple2', + _0: {ctor: '[]'}, + _1: {ctor: '[]'} + }, + list); + }); +var _elm_lang$core$List$unzip = function (pairs) { + var step = F2( + function (_p18, _p17) { + var _p19 = _p18; + var _p20 = _p17; + return { + ctor: '_Tuple2', + _0: {ctor: '::', _0: _p19._0, _1: _p20._0}, + _1: {ctor: '::', _0: _p19._1, _1: _p20._1} + }; + }); + return A3( + _elm_lang$core$List$foldr, + step, + { + ctor: '_Tuple2', + _0: {ctor: '[]'}, + _1: {ctor: '[]'} + }, + pairs); +}; +var _elm_lang$core$List$intersperse = F2( + function (sep, xs) { + var _p21 = xs; + if (_p21.ctor === '[]') { + return {ctor: '[]'}; + } else { + var step = F2( + function (x, rest) { + return { + ctor: '::', + _0: sep, + _1: {ctor: '::', _0: x, _1: rest} + }; + }); + var spersed = A3( + _elm_lang$core$List$foldr, + step, + {ctor: '[]'}, + _p21._1); + return {ctor: '::', _0: _p21._0, _1: spersed}; + } + }); +var _elm_lang$core$List$takeReverse = F3( + function (n, list, taken) { + takeReverse: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return taken; + } else { + var _p22 = list; + if (_p22.ctor === '[]') { + return taken; + } else { + var _v23 = n - 1, + _v24 = _p22._1, + _v25 = {ctor: '::', _0: _p22._0, _1: taken}; + n = _v23; + list = _v24; + taken = _v25; + continue takeReverse; + } + } + } + }); +var _elm_lang$core$List$takeTailRec = F2( + function (n, list) { + return _elm_lang$core$List$reverse( + A3( + _elm_lang$core$List$takeReverse, + n, + list, + {ctor: '[]'})); + }); +var _elm_lang$core$List$takeFast = F3( + function (ctr, n, list) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return {ctor: '[]'}; + } else { + var _p23 = {ctor: '_Tuple2', _0: n, _1: list}; + _v26_5: + do { + _v26_1: + do { + if (_p23.ctor === '_Tuple2') { + if (_p23._1.ctor === '[]') { + return list; + } else { + if (_p23._1._1.ctor === '::') { + switch (_p23._0) { + case 1: + break _v26_1; + case 2: + return { + ctor: '::', + _0: _p23._1._0, + _1: { + ctor: '::', + _0: _p23._1._1._0, + _1: {ctor: '[]'} + } + }; + case 3: + if (_p23._1._1._1.ctor === '::') { + return { + ctor: '::', + _0: _p23._1._0, + _1: { + ctor: '::', + _0: _p23._1._1._0, + _1: { + ctor: '::', + _0: _p23._1._1._1._0, + _1: {ctor: '[]'} + } + } + }; + } else { + break _v26_5; + } + default: + if ((_p23._1._1._1.ctor === '::') && (_p23._1._1._1._1.ctor === '::')) { + var _p28 = _p23._1._1._1._0; + var _p27 = _p23._1._1._0; + var _p26 = _p23._1._0; + var _p25 = _p23._1._1._1._1._0; + var _p24 = _p23._1._1._1._1._1; + return (_elm_lang$core$Native_Utils.cmp(ctr, 1000) > 0) ? { + ctor: '::', + _0: _p26, + _1: { + ctor: '::', + _0: _p27, + _1: { + ctor: '::', + _0: _p28, + _1: { + ctor: '::', + _0: _p25, + _1: A2(_elm_lang$core$List$takeTailRec, n - 4, _p24) + } + } + } + } : { + ctor: '::', + _0: _p26, + _1: { + ctor: '::', + _0: _p27, + _1: { + ctor: '::', + _0: _p28, + _1: { + ctor: '::', + _0: _p25, + _1: A3(_elm_lang$core$List$takeFast, ctr + 1, n - 4, _p24) + } + } + } + }; + } else { + break _v26_5; + } + } + } else { + if (_p23._0 === 1) { + break _v26_1; + } else { + break _v26_5; + } + } + } + } else { + break _v26_5; + } + } while(false); + return { + ctor: '::', + _0: _p23._1._0, + _1: {ctor: '[]'} + }; + } while(false); + return list; + } + }); +var _elm_lang$core$List$take = F2( + function (n, list) { + return A3(_elm_lang$core$List$takeFast, 0, n, list); + }); +var _elm_lang$core$List$repeatHelp = F3( + function (result, n, value) { + repeatHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { + return result; + } else { + var _v27 = {ctor: '::', _0: value, _1: result}, + _v28 = n - 1, + _v29 = value; + result = _v27; + n = _v28; + value = _v29; + continue repeatHelp; + } + } + }); +var _elm_lang$core$List$repeat = F2( + function (n, value) { + return A3( + _elm_lang$core$List$repeatHelp, + {ctor: '[]'}, + n, + value); + }); +var _elm_lang$core$List$rangeHelp = F3( + function (lo, hi, list) { + rangeHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(lo, hi) < 1) { + var _v30 = lo, + _v31 = hi - 1, + _v32 = {ctor: '::', _0: hi, _1: list}; + lo = _v30; + hi = _v31; + list = _v32; + continue rangeHelp; + } else { + return list; + } + } + }); +var _elm_lang$core$List$range = F2( + function (lo, hi) { + return A3( + _elm_lang$core$List$rangeHelp, + lo, + hi, + {ctor: '[]'}); + }); +var _elm_lang$core$List$indexedMap = F2( + function (f, xs) { + return A3( + _elm_lang$core$List$map2, + f, + A2( + _elm_lang$core$List$range, + 0, + _elm_lang$core$List$length(xs) - 1), + xs); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Maybe.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Maybe.elmi new file mode 100644 index 0000000..e6c0acf Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Maybe.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Maybe.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Maybe.elmo new file mode 100644 index 0000000..0a0a7e4 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Maybe.elmo @@ -0,0 +1,72 @@ +var _elm_lang$core$Maybe$withDefault = F2( + function ($default, maybe) { + var _p0 = maybe; + if (_p0.ctor === 'Just') { + return _p0._0; + } else { + return $default; + } + }); +var _elm_lang$core$Maybe$Nothing = {ctor: 'Nothing'}; +var _elm_lang$core$Maybe$andThen = F2( + function (callback, maybeValue) { + var _p1 = maybeValue; + if (_p1.ctor === 'Just') { + return callback(_p1._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$Just = function (a) { + return {ctor: 'Just', _0: a}; +}; +var _elm_lang$core$Maybe$map = F2( + function (f, maybe) { + var _p2 = maybe; + if (_p2.ctor === 'Just') { + return _elm_lang$core$Maybe$Just( + f(_p2._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map2 = F3( + function (func, ma, mb) { + var _p3 = {ctor: '_Tuple2', _0: ma, _1: mb}; + if (((_p3.ctor === '_Tuple2') && (_p3._0.ctor === 'Just')) && (_p3._1.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A2(func, _p3._0._0, _p3._1._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map3 = F4( + function (func, ma, mb, mc) { + var _p4 = {ctor: '_Tuple3', _0: ma, _1: mb, _2: mc}; + if ((((_p4.ctor === '_Tuple3') && (_p4._0.ctor === 'Just')) && (_p4._1.ctor === 'Just')) && (_p4._2.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A3(func, _p4._0._0, _p4._1._0, _p4._2._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map4 = F5( + function (func, ma, mb, mc, md) { + var _p5 = {ctor: '_Tuple4', _0: ma, _1: mb, _2: mc, _3: md}; + if (((((_p5.ctor === '_Tuple4') && (_p5._0.ctor === 'Just')) && (_p5._1.ctor === 'Just')) && (_p5._2.ctor === 'Just')) && (_p5._3.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A4(func, _p5._0._0, _p5._1._0, _p5._2._0, _p5._3._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _elm_lang$core$Maybe$map5 = F6( + function (func, ma, mb, mc, md, me) { + var _p6 = {ctor: '_Tuple5', _0: ma, _1: mb, _2: mc, _3: md, _4: me}; + if ((((((_p6.ctor === '_Tuple5') && (_p6._0.ctor === 'Just')) && (_p6._1.ctor === 'Just')) && (_p6._2.ctor === 'Just')) && (_p6._3.ctor === 'Just')) && (_p6._4.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A5(func, _p6._0._0, _p6._1._0, _p6._2._0, _p6._3._0, _p6._4._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Cmd.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Cmd.elmi new file mode 100644 index 0000000..309a63c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Cmd.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Cmd.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Cmd.elmo new file mode 100644 index 0000000..ad59e10 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Cmd.elmo @@ -0,0 +1,14 @@ +var _elm_lang$core$Platform_Cmd$batch = _elm_lang$core$Native_Platform.batch; +var _elm_lang$core$Platform_Cmd$none = _elm_lang$core$Platform_Cmd$batch( + {ctor: '[]'}); +var _elm_lang$core$Platform_Cmd_ops = _elm_lang$core$Platform_Cmd_ops || {}; +_elm_lang$core$Platform_Cmd_ops['!'] = F2( + function (model, commands) { + return { + ctor: '_Tuple2', + _0: model, + _1: _elm_lang$core$Platform_Cmd$batch(commands) + }; + }); +var _elm_lang$core$Platform_Cmd$map = _elm_lang$core$Native_Platform.map; +var _elm_lang$core$Platform_Cmd$Cmd = {ctor: 'Cmd'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Sub.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Sub.elmi new file mode 100644 index 0000000..3712277 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Sub.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Sub.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Sub.elmo new file mode 100644 index 0000000..3e4f39a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform-Sub.elmo @@ -0,0 +1,5 @@ +var _elm_lang$core$Platform_Sub$batch = _elm_lang$core$Native_Platform.batch; +var _elm_lang$core$Platform_Sub$none = _elm_lang$core$Platform_Sub$batch( + {ctor: '[]'}); +var _elm_lang$core$Platform_Sub$map = _elm_lang$core$Native_Platform.map; +var _elm_lang$core$Platform_Sub$Sub = {ctor: 'Sub'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform.elmi new file mode 100644 index 0000000..131df30 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform.elmo new file mode 100644 index 0000000..58b681a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Platform.elmo @@ -0,0 +1,9 @@ +var _elm_lang$core$Platform$hack = _elm_lang$core$Native_Scheduler.succeed; +var _elm_lang$core$Platform$sendToSelf = _elm_lang$core$Native_Platform.sendToSelf; +var _elm_lang$core$Platform$sendToApp = _elm_lang$core$Native_Platform.sendToApp; +var _elm_lang$core$Platform$programWithFlags = _elm_lang$core$Native_Platform.programWithFlags; +var _elm_lang$core$Platform$program = _elm_lang$core$Native_Platform.program; +var _elm_lang$core$Platform$Program = {ctor: 'Program'}; +var _elm_lang$core$Platform$Task = {ctor: 'Task'}; +var _elm_lang$core$Platform$ProcessId = {ctor: 'ProcessId'}; +var _elm_lang$core$Platform$Router = {ctor: 'Router'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Process.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Process.elmi new file mode 100644 index 0000000..d8b5249 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Process.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Process.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Process.elmo new file mode 100644 index 0000000..be9f100 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Process.elmo @@ -0,0 +1,3 @@ +var _elm_lang$core$Process$kill = _elm_lang$core$Native_Scheduler.kill; +var _elm_lang$core$Process$sleep = _elm_lang$core$Native_Scheduler.sleep; +var _elm_lang$core$Process$spawn = _elm_lang$core$Native_Scheduler.spawn; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Random.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Random.elmi new file mode 100644 index 0000000..0067b03 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Random.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Random.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Random.elmo new file mode 100644 index 0000000..e7b93de --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Random.elmo @@ -0,0 +1,378 @@ +var _elm_lang$core$Random$onSelfMsg = F3( + function (_p1, _p0, seed) { + return _elm_lang$core$Task$succeed(seed); + }); +var _elm_lang$core$Random$magicNum8 = 2147483562; +var _elm_lang$core$Random$range = function (_p2) { + return {ctor: '_Tuple2', _0: 0, _1: _elm_lang$core$Random$magicNum8}; +}; +var _elm_lang$core$Random$magicNum7 = 2147483399; +var _elm_lang$core$Random$magicNum6 = 2147483563; +var _elm_lang$core$Random$magicNum5 = 3791; +var _elm_lang$core$Random$magicNum4 = 40692; +var _elm_lang$core$Random$magicNum3 = 52774; +var _elm_lang$core$Random$magicNum2 = 12211; +var _elm_lang$core$Random$magicNum1 = 53668; +var _elm_lang$core$Random$magicNum0 = 40014; +var _elm_lang$core$Random$step = F2( + function (_p3, seed) { + var _p4 = _p3; + return _p4._0(seed); + }); +var _elm_lang$core$Random$onEffects = F3( + function (router, commands, seed) { + var _p5 = commands; + if (_p5.ctor === '[]') { + return _elm_lang$core$Task$succeed(seed); + } else { + var _p6 = A2(_elm_lang$core$Random$step, _p5._0._0, seed); + var value = _p6._0; + var newSeed = _p6._1; + return A2( + _elm_lang$core$Task$andThen, + function (_p7) { + return A3(_elm_lang$core$Random$onEffects, router, _p5._1, newSeed); + }, + A2(_elm_lang$core$Platform$sendToApp, router, value)); + } + }); +var _elm_lang$core$Random$listHelp = F4( + function (list, n, generate, seed) { + listHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 1) < 0) { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$List$reverse(list), + _1: seed + }; + } else { + var _p8 = generate(seed); + var value = _p8._0; + var newSeed = _p8._1; + var _v2 = {ctor: '::', _0: value, _1: list}, + _v3 = n - 1, + _v4 = generate, + _v5 = newSeed; + list = _v2; + n = _v3; + generate = _v4; + seed = _v5; + continue listHelp; + } + } + }); +var _elm_lang$core$Random$minInt = -2147483648; +var _elm_lang$core$Random$maxInt = 2147483647; +var _elm_lang$core$Random$iLogBase = F2( + function (b, i) { + return (_elm_lang$core$Native_Utils.cmp(i, b) < 0) ? 1 : (1 + A2(_elm_lang$core$Random$iLogBase, b, (i / b) | 0)); + }); +var _elm_lang$core$Random$command = _elm_lang$core$Native_Platform.leaf('Random'); +var _elm_lang$core$Random$Generator = function (a) { + return {ctor: 'Generator', _0: a}; +}; +var _elm_lang$core$Random$list = F2( + function (n, _p9) { + var _p10 = _p9; + return _elm_lang$core$Random$Generator( + function (seed) { + return A4( + _elm_lang$core$Random$listHelp, + {ctor: '[]'}, + n, + _p10._0, + seed); + }); + }); +var _elm_lang$core$Random$map = F2( + function (func, _p11) { + var _p12 = _p11; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p13 = _p12._0(seed0); + var a = _p13._0; + var seed1 = _p13._1; + return { + ctor: '_Tuple2', + _0: func(a), + _1: seed1 + }; + }); + }); +var _elm_lang$core$Random$map2 = F3( + function (func, _p15, _p14) { + var _p16 = _p15; + var _p17 = _p14; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p18 = _p16._0(seed0); + var a = _p18._0; + var seed1 = _p18._1; + var _p19 = _p17._0(seed1); + var b = _p19._0; + var seed2 = _p19._1; + return { + ctor: '_Tuple2', + _0: A2(func, a, b), + _1: seed2 + }; + }); + }); +var _elm_lang$core$Random$pair = F2( + function (genA, genB) { + return A3( + _elm_lang$core$Random$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + genA, + genB); + }); +var _elm_lang$core$Random$map3 = F4( + function (func, _p22, _p21, _p20) { + var _p23 = _p22; + var _p24 = _p21; + var _p25 = _p20; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p26 = _p23._0(seed0); + var a = _p26._0; + var seed1 = _p26._1; + var _p27 = _p24._0(seed1); + var b = _p27._0; + var seed2 = _p27._1; + var _p28 = _p25._0(seed2); + var c = _p28._0; + var seed3 = _p28._1; + return { + ctor: '_Tuple2', + _0: A3(func, a, b, c), + _1: seed3 + }; + }); + }); +var _elm_lang$core$Random$map4 = F5( + function (func, _p32, _p31, _p30, _p29) { + var _p33 = _p32; + var _p34 = _p31; + var _p35 = _p30; + var _p36 = _p29; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p37 = _p33._0(seed0); + var a = _p37._0; + var seed1 = _p37._1; + var _p38 = _p34._0(seed1); + var b = _p38._0; + var seed2 = _p38._1; + var _p39 = _p35._0(seed2); + var c = _p39._0; + var seed3 = _p39._1; + var _p40 = _p36._0(seed3); + var d = _p40._0; + var seed4 = _p40._1; + return { + ctor: '_Tuple2', + _0: A4(func, a, b, c, d), + _1: seed4 + }; + }); + }); +var _elm_lang$core$Random$map5 = F6( + function (func, _p45, _p44, _p43, _p42, _p41) { + var _p46 = _p45; + var _p47 = _p44; + var _p48 = _p43; + var _p49 = _p42; + var _p50 = _p41; + return _elm_lang$core$Random$Generator( + function (seed0) { + var _p51 = _p46._0(seed0); + var a = _p51._0; + var seed1 = _p51._1; + var _p52 = _p47._0(seed1); + var b = _p52._0; + var seed2 = _p52._1; + var _p53 = _p48._0(seed2); + var c = _p53._0; + var seed3 = _p53._1; + var _p54 = _p49._0(seed3); + var d = _p54._0; + var seed4 = _p54._1; + var _p55 = _p50._0(seed4); + var e = _p55._0; + var seed5 = _p55._1; + return { + ctor: '_Tuple2', + _0: A5(func, a, b, c, d, e), + _1: seed5 + }; + }); + }); +var _elm_lang$core$Random$andThen = F2( + function (callback, _p56) { + var _p57 = _p56; + return _elm_lang$core$Random$Generator( + function (seed) { + var _p58 = _p57._0(seed); + var result = _p58._0; + var newSeed = _p58._1; + var _p59 = callback(result); + var genB = _p59._0; + return genB(newSeed); + }); + }); +var _elm_lang$core$Random$State = F2( + function (a, b) { + return {ctor: 'State', _0: a, _1: b}; + }); +var _elm_lang$core$Random$initState = function (seed) { + var s = A2(_elm_lang$core$Basics$max, seed, 0 - seed); + var q = (s / (_elm_lang$core$Random$magicNum6 - 1)) | 0; + var s2 = A2(_elm_lang$core$Basics_ops['%'], q, _elm_lang$core$Random$magicNum7 - 1); + var s1 = A2(_elm_lang$core$Basics_ops['%'], s, _elm_lang$core$Random$magicNum6 - 1); + return A2(_elm_lang$core$Random$State, s1 + 1, s2 + 1); +}; +var _elm_lang$core$Random$next = function (_p60) { + var _p61 = _p60; + var _p63 = _p61._1; + var _p62 = _p61._0; + var k2 = (_p63 / _elm_lang$core$Random$magicNum3) | 0; + var rawState2 = (_elm_lang$core$Random$magicNum4 * (_p63 - (k2 * _elm_lang$core$Random$magicNum3))) - (k2 * _elm_lang$core$Random$magicNum5); + var newState2 = (_elm_lang$core$Native_Utils.cmp(rawState2, 0) < 0) ? (rawState2 + _elm_lang$core$Random$magicNum7) : rawState2; + var k1 = (_p62 / _elm_lang$core$Random$magicNum1) | 0; + var rawState1 = (_elm_lang$core$Random$magicNum0 * (_p62 - (k1 * _elm_lang$core$Random$magicNum1))) - (k1 * _elm_lang$core$Random$magicNum2); + var newState1 = (_elm_lang$core$Native_Utils.cmp(rawState1, 0) < 0) ? (rawState1 + _elm_lang$core$Random$magicNum6) : rawState1; + var z = newState1 - newState2; + var newZ = (_elm_lang$core$Native_Utils.cmp(z, 1) < 0) ? (z + _elm_lang$core$Random$magicNum8) : z; + return { + ctor: '_Tuple2', + _0: newZ, + _1: A2(_elm_lang$core$Random$State, newState1, newState2) + }; +}; +var _elm_lang$core$Random$split = function (_p64) { + var _p65 = _p64; + var _p68 = _p65._1; + var _p67 = _p65._0; + var _p66 = _elm_lang$core$Tuple$second( + _elm_lang$core$Random$next(_p65)); + var t1 = _p66._0; + var t2 = _p66._1; + var new_s2 = _elm_lang$core$Native_Utils.eq(_p68, 1) ? (_elm_lang$core$Random$magicNum7 - 1) : (_p68 - 1); + var new_s1 = _elm_lang$core$Native_Utils.eq(_p67, _elm_lang$core$Random$magicNum6 - 1) ? 1 : (_p67 + 1); + return { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$Random$State, new_s1, t2), + _1: A2(_elm_lang$core$Random$State, t1, new_s2) + }; +}; +var _elm_lang$core$Random$Seed = function (a) { + return {ctor: 'Seed', _0: a}; +}; +var _elm_lang$core$Random$int = F2( + function (a, b) { + return _elm_lang$core$Random$Generator( + function (_p69) { + var _p70 = _p69; + var _p75 = _p70._0; + var base = 2147483561; + var f = F3( + function (n, acc, state) { + f: + while (true) { + var _p71 = n; + if (_p71 === 0) { + return {ctor: '_Tuple2', _0: acc, _1: state}; + } else { + var _p72 = _p75.next(state); + var x = _p72._0; + var nextState = _p72._1; + var _v27 = n - 1, + _v28 = x + (acc * base), + _v29 = nextState; + n = _v27; + acc = _v28; + state = _v29; + continue f; + } + } + }); + var _p73 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; + var lo = _p73._0; + var hi = _p73._1; + var k = (hi - lo) + 1; + var n = A2(_elm_lang$core$Random$iLogBase, base, k); + var _p74 = A3(f, n, 1, _p75.state); + var v = _p74._0; + var nextState = _p74._1; + return { + ctor: '_Tuple2', + _0: lo + A2(_elm_lang$core$Basics_ops['%'], v, k), + _1: _elm_lang$core$Random$Seed( + _elm_lang$core$Native_Utils.update( + _p75, + {state: nextState})) + }; + }); + }); +var _elm_lang$core$Random$bool = A2( + _elm_lang$core$Random$map, + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })(1), + A2(_elm_lang$core$Random$int, 0, 1)); +var _elm_lang$core$Random$float = F2( + function (a, b) { + return _elm_lang$core$Random$Generator( + function (seed) { + var _p76 = A2( + _elm_lang$core$Random$step, + A2(_elm_lang$core$Random$int, _elm_lang$core$Random$minInt, _elm_lang$core$Random$maxInt), + seed); + var number = _p76._0; + var newSeed = _p76._1; + var negativeOneToOne = _elm_lang$core$Basics$toFloat(number) / _elm_lang$core$Basics$toFloat(_elm_lang$core$Random$maxInt - _elm_lang$core$Random$minInt); + var _p77 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; + var lo = _p77._0; + var hi = _p77._1; + var scaled = ((lo + hi) / 2) + ((hi - lo) * negativeOneToOne); + return {ctor: '_Tuple2', _0: scaled, _1: newSeed}; + }); + }); +var _elm_lang$core$Random$initialSeed = function (n) { + return _elm_lang$core$Random$Seed( + { + state: _elm_lang$core$Random$initState(n), + next: _elm_lang$core$Random$next, + split: _elm_lang$core$Random$split, + range: _elm_lang$core$Random$range + }); +}; +var _elm_lang$core$Random$init = A2( + _elm_lang$core$Task$andThen, + function (t) { + return _elm_lang$core$Task$succeed( + _elm_lang$core$Random$initialSeed( + _elm_lang$core$Basics$round(t))); + }, + _elm_lang$core$Time$now); +var _elm_lang$core$Random$Generate = function (a) { + return {ctor: 'Generate', _0: a}; +}; +var _elm_lang$core$Random$generate = F2( + function (tagger, generator) { + return _elm_lang$core$Random$command( + _elm_lang$core$Random$Generate( + A2(_elm_lang$core$Random$map, tagger, generator))); + }); +var _elm_lang$core$Random$cmdMap = F2( + function (func, _p78) { + var _p79 = _p78; + return _elm_lang$core$Random$Generate( + A2(_elm_lang$core$Random$map, func, _p79._0)); + }); +_elm_lang$core$Native_Platform.effectManagers['Random'] = {pkg: 'elm-lang/core', init: _elm_lang$core$Random$init, onEffects: _elm_lang$core$Random$onEffects, onSelfMsg: _elm_lang$core$Random$onSelfMsg, tag: 'cmd', cmdMap: _elm_lang$core$Random$cmdMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Regex.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Regex.elmi new file mode 100644 index 0000000..5ad8e06 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Regex.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Regex.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Regex.elmo new file mode 100644 index 0000000..55577ec --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Regex.elmo @@ -0,0 +1,16 @@ +var _elm_lang$core$Regex$split = _elm_lang$core$Native_Regex.split; +var _elm_lang$core$Regex$replace = _elm_lang$core$Native_Regex.replace; +var _elm_lang$core$Regex$find = _elm_lang$core$Native_Regex.find; +var _elm_lang$core$Regex$contains = _elm_lang$core$Native_Regex.contains; +var _elm_lang$core$Regex$caseInsensitive = _elm_lang$core$Native_Regex.caseInsensitive; +var _elm_lang$core$Regex$regex = _elm_lang$core$Native_Regex.regex; +var _elm_lang$core$Regex$escape = _elm_lang$core$Native_Regex.escape; +var _elm_lang$core$Regex$Match = F4( + function (a, b, c, d) { + return {match: a, submatches: b, index: c, number: d}; + }); +var _elm_lang$core$Regex$Regex = {ctor: 'Regex'}; +var _elm_lang$core$Regex$AtMost = function (a) { + return {ctor: 'AtMost', _0: a}; +}; +var _elm_lang$core$Regex$All = {ctor: 'All'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Result.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Result.elmi new file mode 100644 index 0000000..4c87e50 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Result.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Result.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Result.elmo new file mode 100644 index 0000000..a9b91ff --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Result.elmo @@ -0,0 +1,141 @@ +var _elm_lang$core$Result$toMaybe = function (result) { + var _p0 = result; + if (_p0.ctor === 'Ok') { + return _elm_lang$core$Maybe$Just(_p0._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _elm_lang$core$Result$withDefault = F2( + function (def, result) { + var _p1 = result; + if (_p1.ctor === 'Ok') { + return _p1._0; + } else { + return def; + } + }); +var _elm_lang$core$Result$Err = function (a) { + return {ctor: 'Err', _0: a}; +}; +var _elm_lang$core$Result$andThen = F2( + function (callback, result) { + var _p2 = result; + if (_p2.ctor === 'Ok') { + return callback(_p2._0); + } else { + return _elm_lang$core$Result$Err(_p2._0); + } + }); +var _elm_lang$core$Result$Ok = function (a) { + return {ctor: 'Ok', _0: a}; +}; +var _elm_lang$core$Result$map = F2( + function (func, ra) { + var _p3 = ra; + if (_p3.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + func(_p3._0)); + } else { + return _elm_lang$core$Result$Err(_p3._0); + } + }); +var _elm_lang$core$Result$map2 = F3( + function (func, ra, rb) { + var _p4 = {ctor: '_Tuple2', _0: ra, _1: rb}; + if (_p4._0.ctor === 'Ok') { + if (_p4._1.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A2(func, _p4._0._0, _p4._1._0)); + } else { + return _elm_lang$core$Result$Err(_p4._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p4._0._0); + } + }); +var _elm_lang$core$Result$map3 = F4( + function (func, ra, rb, rc) { + var _p5 = {ctor: '_Tuple3', _0: ra, _1: rb, _2: rc}; + if (_p5._0.ctor === 'Ok') { + if (_p5._1.ctor === 'Ok') { + if (_p5._2.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A3(func, _p5._0._0, _p5._1._0, _p5._2._0)); + } else { + return _elm_lang$core$Result$Err(_p5._2._0); + } + } else { + return _elm_lang$core$Result$Err(_p5._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p5._0._0); + } + }); +var _elm_lang$core$Result$map4 = F5( + function (func, ra, rb, rc, rd) { + var _p6 = {ctor: '_Tuple4', _0: ra, _1: rb, _2: rc, _3: rd}; + if (_p6._0.ctor === 'Ok') { + if (_p6._1.ctor === 'Ok') { + if (_p6._2.ctor === 'Ok') { + if (_p6._3.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A4(func, _p6._0._0, _p6._1._0, _p6._2._0, _p6._3._0)); + } else { + return _elm_lang$core$Result$Err(_p6._3._0); + } + } else { + return _elm_lang$core$Result$Err(_p6._2._0); + } + } else { + return _elm_lang$core$Result$Err(_p6._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p6._0._0); + } + }); +var _elm_lang$core$Result$map5 = F6( + function (func, ra, rb, rc, rd, re) { + var _p7 = {ctor: '_Tuple5', _0: ra, _1: rb, _2: rc, _3: rd, _4: re}; + if (_p7._0.ctor === 'Ok') { + if (_p7._1.ctor === 'Ok') { + if (_p7._2.ctor === 'Ok') { + if (_p7._3.ctor === 'Ok') { + if (_p7._4.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + A5(func, _p7._0._0, _p7._1._0, _p7._2._0, _p7._3._0, _p7._4._0)); + } else { + return _elm_lang$core$Result$Err(_p7._4._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._3._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._2._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._1._0); + } + } else { + return _elm_lang$core$Result$Err(_p7._0._0); + } + }); +var _elm_lang$core$Result$mapError = F2( + function (f, result) { + var _p8 = result; + if (_p8.ctor === 'Ok') { + return _elm_lang$core$Result$Ok(_p8._0); + } else { + return _elm_lang$core$Result$Err( + f(_p8._0)); + } + }); +var _elm_lang$core$Result$fromMaybe = F2( + function (err, maybe) { + var _p9 = maybe; + if (_p9.ctor === 'Just') { + return _elm_lang$core$Result$Ok(_p9._0); + } else { + return _elm_lang$core$Result$Err(err); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Set.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Set.elmi new file mode 100644 index 0000000..091648f Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Set.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Set.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Set.elmo new file mode 100644 index 0000000..7fcd718 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Set.elmo @@ -0,0 +1,130 @@ +var _elm_lang$core$Set$foldr = F3( + function (f, b, _p0) { + var _p1 = _p0; + return A3( + _elm_lang$core$Dict$foldr, + F3( + function (k, _p2, b) { + return A2(f, k, b); + }), + b, + _p1._0); + }); +var _elm_lang$core$Set$foldl = F3( + function (f, b, _p3) { + var _p4 = _p3; + return A3( + _elm_lang$core$Dict$foldl, + F3( + function (k, _p5, b) { + return A2(f, k, b); + }), + b, + _p4._0); + }); +var _elm_lang$core$Set$toList = function (_p6) { + var _p7 = _p6; + return _elm_lang$core$Dict$keys(_p7._0); +}; +var _elm_lang$core$Set$size = function (_p8) { + var _p9 = _p8; + return _elm_lang$core$Dict$size(_p9._0); +}; +var _elm_lang$core$Set$member = F2( + function (k, _p10) { + var _p11 = _p10; + return A2(_elm_lang$core$Dict$member, k, _p11._0); + }); +var _elm_lang$core$Set$isEmpty = function (_p12) { + var _p13 = _p12; + return _elm_lang$core$Dict$isEmpty(_p13._0); +}; +var _elm_lang$core$Set$Set_elm_builtin = function (a) { + return {ctor: 'Set_elm_builtin', _0: a}; +}; +var _elm_lang$core$Set$empty = _elm_lang$core$Set$Set_elm_builtin(_elm_lang$core$Dict$empty); +var _elm_lang$core$Set$singleton = function (k) { + return _elm_lang$core$Set$Set_elm_builtin( + A2( + _elm_lang$core$Dict$singleton, + k, + {ctor: '_Tuple0'})); +}; +var _elm_lang$core$Set$insert = F2( + function (k, _p14) { + var _p15 = _p14; + return _elm_lang$core$Set$Set_elm_builtin( + A3( + _elm_lang$core$Dict$insert, + k, + {ctor: '_Tuple0'}, + _p15._0)); + }); +var _elm_lang$core$Set$fromList = function (xs) { + return A3(_elm_lang$core$List$foldl, _elm_lang$core$Set$insert, _elm_lang$core$Set$empty, xs); +}; +var _elm_lang$core$Set$map = F2( + function (f, s) { + return _elm_lang$core$Set$fromList( + A2( + _elm_lang$core$List$map, + f, + _elm_lang$core$Set$toList(s))); + }); +var _elm_lang$core$Set$remove = F2( + function (k, _p16) { + var _p17 = _p16; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$remove, k, _p17._0)); + }); +var _elm_lang$core$Set$union = F2( + function (_p19, _p18) { + var _p20 = _p19; + var _p21 = _p18; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$union, _p20._0, _p21._0)); + }); +var _elm_lang$core$Set$intersect = F2( + function (_p23, _p22) { + var _p24 = _p23; + var _p25 = _p22; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$intersect, _p24._0, _p25._0)); + }); +var _elm_lang$core$Set$diff = F2( + function (_p27, _p26) { + var _p28 = _p27; + var _p29 = _p26; + return _elm_lang$core$Set$Set_elm_builtin( + A2(_elm_lang$core$Dict$diff, _p28._0, _p29._0)); + }); +var _elm_lang$core$Set$filter = F2( + function (p, _p30) { + var _p31 = _p30; + return _elm_lang$core$Set$Set_elm_builtin( + A2( + _elm_lang$core$Dict$filter, + F2( + function (k, _p32) { + return p(k); + }), + _p31._0)); + }); +var _elm_lang$core$Set$partition = F2( + function (p, _p33) { + var _p34 = _p33; + var _p35 = A2( + _elm_lang$core$Dict$partition, + F2( + function (k, _p36) { + return p(k); + }), + _p34._0); + var p1 = _p35._0; + var p2 = _p35._1; + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Set$Set_elm_builtin(p1), + _1: _elm_lang$core$Set$Set_elm_builtin(p2) + }; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/String.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/String.elmi new file mode 100644 index 0000000..64d71f8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/String.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/String.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/String.elmo new file mode 100644 index 0000000..07b139f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/String.elmo @@ -0,0 +1,43 @@ +var _elm_lang$core$String$fromList = _elm_lang$core$Native_String.fromList; +var _elm_lang$core$String$toList = _elm_lang$core$Native_String.toList; +var _elm_lang$core$String$toFloat = _elm_lang$core$Native_String.toFloat; +var _elm_lang$core$String$toInt = _elm_lang$core$Native_String.toInt; +var _elm_lang$core$String$indices = _elm_lang$core$Native_String.indexes; +var _elm_lang$core$String$indexes = _elm_lang$core$Native_String.indexes; +var _elm_lang$core$String$endsWith = _elm_lang$core$Native_String.endsWith; +var _elm_lang$core$String$startsWith = _elm_lang$core$Native_String.startsWith; +var _elm_lang$core$String$contains = _elm_lang$core$Native_String.contains; +var _elm_lang$core$String$all = _elm_lang$core$Native_String.all; +var _elm_lang$core$String$any = _elm_lang$core$Native_String.any; +var _elm_lang$core$String$toLower = _elm_lang$core$Native_String.toLower; +var _elm_lang$core$String$toUpper = _elm_lang$core$Native_String.toUpper; +var _elm_lang$core$String$lines = _elm_lang$core$Native_String.lines; +var _elm_lang$core$String$words = _elm_lang$core$Native_String.words; +var _elm_lang$core$String$trimRight = _elm_lang$core$Native_String.trimRight; +var _elm_lang$core$String$trimLeft = _elm_lang$core$Native_String.trimLeft; +var _elm_lang$core$String$trim = _elm_lang$core$Native_String.trim; +var _elm_lang$core$String$padRight = _elm_lang$core$Native_String.padRight; +var _elm_lang$core$String$padLeft = _elm_lang$core$Native_String.padLeft; +var _elm_lang$core$String$pad = _elm_lang$core$Native_String.pad; +var _elm_lang$core$String$dropRight = _elm_lang$core$Native_String.dropRight; +var _elm_lang$core$String$dropLeft = _elm_lang$core$Native_String.dropLeft; +var _elm_lang$core$String$right = _elm_lang$core$Native_String.right; +var _elm_lang$core$String$left = _elm_lang$core$Native_String.left; +var _elm_lang$core$String$slice = _elm_lang$core$Native_String.slice; +var _elm_lang$core$String$repeat = _elm_lang$core$Native_String.repeat; +var _elm_lang$core$String$join = _elm_lang$core$Native_String.join; +var _elm_lang$core$String$split = _elm_lang$core$Native_String.split; +var _elm_lang$core$String$foldr = _elm_lang$core$Native_String.foldr; +var _elm_lang$core$String$foldl = _elm_lang$core$Native_String.foldl; +var _elm_lang$core$String$reverse = _elm_lang$core$Native_String.reverse; +var _elm_lang$core$String$filter = _elm_lang$core$Native_String.filter; +var _elm_lang$core$String$map = _elm_lang$core$Native_String.map; +var _elm_lang$core$String$length = _elm_lang$core$Native_String.length; +var _elm_lang$core$String$concat = _elm_lang$core$Native_String.concat; +var _elm_lang$core$String$append = _elm_lang$core$Native_String.append; +var _elm_lang$core$String$uncons = _elm_lang$core$Native_String.uncons; +var _elm_lang$core$String$cons = _elm_lang$core$Native_String.cons; +var _elm_lang$core$String$fromChar = function ($char) { + return A2(_elm_lang$core$String$cons, $char, ''); +}; +var _elm_lang$core$String$isEmpty = _elm_lang$core$Native_String.isEmpty; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Task.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Task.elmi new file mode 100644 index 0000000..35b54d7 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Task.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Task.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Task.elmo new file mode 100644 index 0000000..ae28b66 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Task.elmo @@ -0,0 +1,196 @@ +var _elm_lang$core$Task$onError = _elm_lang$core$Native_Scheduler.onError; +var _elm_lang$core$Task$andThen = _elm_lang$core$Native_Scheduler.andThen; +var _elm_lang$core$Task$spawnCmd = F2( + function (router, _p0) { + var _p1 = _p0; + return _elm_lang$core$Native_Scheduler.spawn( + A2( + _elm_lang$core$Task$andThen, + _elm_lang$core$Platform$sendToApp(router), + _p1._0)); + }); +var _elm_lang$core$Task$fail = _elm_lang$core$Native_Scheduler.fail; +var _elm_lang$core$Task$mapError = F2( + function (convert, task) { + return A2( + _elm_lang$core$Task$onError, + function (_p2) { + return _elm_lang$core$Task$fail( + convert(_p2)); + }, + task); + }); +var _elm_lang$core$Task$succeed = _elm_lang$core$Native_Scheduler.succeed; +var _elm_lang$core$Task$map = F2( + function (func, taskA) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return _elm_lang$core$Task$succeed( + func(a)); + }, + taskA); + }); +var _elm_lang$core$Task$map2 = F3( + function (func, taskA, taskB) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return _elm_lang$core$Task$succeed( + A2(func, a, b)); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$map3 = F4( + function (func, taskA, taskB, taskC) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return A2( + _elm_lang$core$Task$andThen, + function (c) { + return _elm_lang$core$Task$succeed( + A3(func, a, b, c)); + }, + taskC); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$map4 = F5( + function (func, taskA, taskB, taskC, taskD) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return A2( + _elm_lang$core$Task$andThen, + function (c) { + return A2( + _elm_lang$core$Task$andThen, + function (d) { + return _elm_lang$core$Task$succeed( + A4(func, a, b, c, d)); + }, + taskD); + }, + taskC); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$map5 = F6( + function (func, taskA, taskB, taskC, taskD, taskE) { + return A2( + _elm_lang$core$Task$andThen, + function (a) { + return A2( + _elm_lang$core$Task$andThen, + function (b) { + return A2( + _elm_lang$core$Task$andThen, + function (c) { + return A2( + _elm_lang$core$Task$andThen, + function (d) { + return A2( + _elm_lang$core$Task$andThen, + function (e) { + return _elm_lang$core$Task$succeed( + A5(func, a, b, c, d, e)); + }, + taskE); + }, + taskD); + }, + taskC); + }, + taskB); + }, + taskA); + }); +var _elm_lang$core$Task$sequence = function (tasks) { + var _p3 = tasks; + if (_p3.ctor === '[]') { + return _elm_lang$core$Task$succeed( + {ctor: '[]'}); + } else { + return A3( + _elm_lang$core$Task$map2, + F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + }), + _p3._0, + _elm_lang$core$Task$sequence(_p3._1)); + } +}; +var _elm_lang$core$Task$onEffects = F3( + function (router, commands, state) { + return A2( + _elm_lang$core$Task$map, + function (_p4) { + return {ctor: '_Tuple0'}; + }, + _elm_lang$core$Task$sequence( + A2( + _elm_lang$core$List$map, + _elm_lang$core$Task$spawnCmd(router), + commands))); + }); +var _elm_lang$core$Task$init = _elm_lang$core$Task$succeed( + {ctor: '_Tuple0'}); +var _elm_lang$core$Task$onSelfMsg = F3( + function (_p7, _p6, _p5) { + return _elm_lang$core$Task$succeed( + {ctor: '_Tuple0'}); + }); +var _elm_lang$core$Task$command = _elm_lang$core$Native_Platform.leaf('Task'); +var _elm_lang$core$Task$Perform = function (a) { + return {ctor: 'Perform', _0: a}; +}; +var _elm_lang$core$Task$perform = F2( + function (toMessage, task) { + return _elm_lang$core$Task$command( + _elm_lang$core$Task$Perform( + A2(_elm_lang$core$Task$map, toMessage, task))); + }); +var _elm_lang$core$Task$attempt = F2( + function (resultToMessage, task) { + return _elm_lang$core$Task$command( + _elm_lang$core$Task$Perform( + A2( + _elm_lang$core$Task$onError, + function (_p8) { + return _elm_lang$core$Task$succeed( + resultToMessage( + _elm_lang$core$Result$Err(_p8))); + }, + A2( + _elm_lang$core$Task$andThen, + function (_p9) { + return _elm_lang$core$Task$succeed( + resultToMessage( + _elm_lang$core$Result$Ok(_p9))); + }, + task)))); + }); +var _elm_lang$core$Task$cmdMap = F2( + function (tagger, _p10) { + var _p11 = _p10; + return _elm_lang$core$Task$Perform( + A2(_elm_lang$core$Task$map, tagger, _p11._0)); + }); +_elm_lang$core$Native_Platform.effectManagers['Task'] = {pkg: 'elm-lang/core', init: _elm_lang$core$Task$init, onEffects: _elm_lang$core$Task$onEffects, onSelfMsg: _elm_lang$core$Task$onSelfMsg, tag: 'cmd', cmdMap: _elm_lang$core$Task$cmdMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Time.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Time.elmi new file mode 100644 index 0000000..4e6b2e4 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Time.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Time.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Time.elmo new file mode 100644 index 0000000..5b7c37c --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Time.elmo @@ -0,0 +1,187 @@ +var _elm_lang$core$Time$setInterval = _elm_lang$core$Native_Time.setInterval_; +var _elm_lang$core$Time$spawnHelp = F3( + function (router, intervals, processes) { + var _p0 = intervals; + if (_p0.ctor === '[]') { + return _elm_lang$core$Task$succeed(processes); + } else { + var _p1 = _p0._0; + var spawnRest = function (id) { + return A3( + _elm_lang$core$Time$spawnHelp, + router, + _p0._1, + A3(_elm_lang$core$Dict$insert, _p1, id, processes)); + }; + var spawnTimer = _elm_lang$core$Native_Scheduler.spawn( + A2( + _elm_lang$core$Time$setInterval, + _p1, + A2(_elm_lang$core$Platform$sendToSelf, router, _p1))); + return A2(_elm_lang$core$Task$andThen, spawnRest, spawnTimer); + } + }); +var _elm_lang$core$Time$addMySub = F2( + function (_p2, state) { + var _p3 = _p2; + var _p6 = _p3._1; + var _p5 = _p3._0; + var _p4 = A2(_elm_lang$core$Dict$get, _p5, state); + if (_p4.ctor === 'Nothing') { + return A3( + _elm_lang$core$Dict$insert, + _p5, + { + ctor: '::', + _0: _p6, + _1: {ctor: '[]'} + }, + state); + } else { + return A3( + _elm_lang$core$Dict$insert, + _p5, + {ctor: '::', _0: _p6, _1: _p4._0}, + state); + } + }); +var _elm_lang$core$Time$inMilliseconds = function (t) { + return t; +}; +var _elm_lang$core$Time$millisecond = 1; +var _elm_lang$core$Time$second = 1000 * _elm_lang$core$Time$millisecond; +var _elm_lang$core$Time$minute = 60 * _elm_lang$core$Time$second; +var _elm_lang$core$Time$hour = 60 * _elm_lang$core$Time$minute; +var _elm_lang$core$Time$inHours = function (t) { + return t / _elm_lang$core$Time$hour; +}; +var _elm_lang$core$Time$inMinutes = function (t) { + return t / _elm_lang$core$Time$minute; +}; +var _elm_lang$core$Time$inSeconds = function (t) { + return t / _elm_lang$core$Time$second; +}; +var _elm_lang$core$Time$now = _elm_lang$core$Native_Time.now; +var _elm_lang$core$Time$onSelfMsg = F3( + function (router, interval, state) { + var _p7 = A2(_elm_lang$core$Dict$get, interval, state.taggers); + if (_p7.ctor === 'Nothing') { + return _elm_lang$core$Task$succeed(state); + } else { + var tellTaggers = function (time) { + return _elm_lang$core$Task$sequence( + A2( + _elm_lang$core$List$map, + function (tagger) { + return A2( + _elm_lang$core$Platform$sendToApp, + router, + tagger(time)); + }, + _p7._0)); + }; + return A2( + _elm_lang$core$Task$andThen, + function (_p8) { + return _elm_lang$core$Task$succeed(state); + }, + A2(_elm_lang$core$Task$andThen, tellTaggers, _elm_lang$core$Time$now)); + } + }); +var _elm_lang$core$Time$subscription = _elm_lang$core$Native_Platform.leaf('Time'); +var _elm_lang$core$Time$State = F2( + function (a, b) { + return {taggers: a, processes: b}; + }); +var _elm_lang$core$Time$init = _elm_lang$core$Task$succeed( + A2(_elm_lang$core$Time$State, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty)); +var _elm_lang$core$Time$onEffects = F3( + function (router, subs, _p9) { + var _p10 = _p9; + var rightStep = F3( + function (_p12, id, _p11) { + var _p13 = _p11; + return { + ctor: '_Tuple3', + _0: _p13._0, + _1: _p13._1, + _2: A2( + _elm_lang$core$Task$andThen, + function (_p14) { + return _p13._2; + }, + _elm_lang$core$Native_Scheduler.kill(id)) + }; + }); + var bothStep = F4( + function (interval, taggers, id, _p15) { + var _p16 = _p15; + return { + ctor: '_Tuple3', + _0: _p16._0, + _1: A3(_elm_lang$core$Dict$insert, interval, id, _p16._1), + _2: _p16._2 + }; + }); + var leftStep = F3( + function (interval, taggers, _p17) { + var _p18 = _p17; + return { + ctor: '_Tuple3', + _0: {ctor: '::', _0: interval, _1: _p18._0}, + _1: _p18._1, + _2: _p18._2 + }; + }); + var newTaggers = A3(_elm_lang$core$List$foldl, _elm_lang$core$Time$addMySub, _elm_lang$core$Dict$empty, subs); + var _p19 = A6( + _elm_lang$core$Dict$merge, + leftStep, + bothStep, + rightStep, + newTaggers, + _p10.processes, + { + ctor: '_Tuple3', + _0: {ctor: '[]'}, + _1: _elm_lang$core$Dict$empty, + _2: _elm_lang$core$Task$succeed( + {ctor: '_Tuple0'}) + }); + var spawnList = _p19._0; + var existingDict = _p19._1; + var killTask = _p19._2; + return A2( + _elm_lang$core$Task$andThen, + function (newProcesses) { + return _elm_lang$core$Task$succeed( + A2(_elm_lang$core$Time$State, newTaggers, newProcesses)); + }, + A2( + _elm_lang$core$Task$andThen, + function (_p20) { + return A3(_elm_lang$core$Time$spawnHelp, router, spawnList, existingDict); + }, + killTask)); + }); +var _elm_lang$core$Time$Every = F2( + function (a, b) { + return {ctor: 'Every', _0: a, _1: b}; + }); +var _elm_lang$core$Time$every = F2( + function (interval, tagger) { + return _elm_lang$core$Time$subscription( + A2(_elm_lang$core$Time$Every, interval, tagger)); + }); +var _elm_lang$core$Time$subMap = F2( + function (f, _p21) { + var _p22 = _p21; + return A2( + _elm_lang$core$Time$Every, + _p22._0, + function (_p23) { + return f( + _p22._1(_p23)); + }); + }); +_elm_lang$core$Native_Platform.effectManagers['Time'] = {pkg: 'elm-lang/core', init: _elm_lang$core$Time$init, onEffects: _elm_lang$core$Time$onEffects, onSelfMsg: _elm_lang$core$Time$onSelfMsg, tag: 'sub', subMap: _elm_lang$core$Time$subMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Tuple.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Tuple.elmi new file mode 100644 index 0000000..e02273f Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Tuple.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Tuple.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Tuple.elmo new file mode 100644 index 0000000..0b5bc70 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/Tuple.elmo @@ -0,0 +1,26 @@ +var _elm_lang$core$Tuple$mapSecond = F2( + function (func, _p0) { + var _p1 = _p0; + return { + ctor: '_Tuple2', + _0: _p1._0, + _1: func(_p1._1) + }; + }); +var _elm_lang$core$Tuple$mapFirst = F2( + function (func, _p2) { + var _p3 = _p2; + return { + ctor: '_Tuple2', + _0: func(_p3._0), + _1: _p3._1 + }; + }); +var _elm_lang$core$Tuple$second = function (_p4) { + var _p5 = _p4; + return _p5._1; +}; +var _elm_lang$core$Tuple$first = function (_p6) { + var _p7 = _p6; + return _p7._0; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/graph.dat new file mode 100644 index 0000000..697f901 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/core/5.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-LowLevel.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-LowLevel.elmi new file mode 100644 index 0000000..ba32cbd Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-LowLevel.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-LowLevel.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-LowLevel.elmo new file mode 100644 index 0000000..8d3b00f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-LowLevel.elmo @@ -0,0 +1,2 @@ +var _elm_lang$dom$Dom_LowLevel$onWindow = _elm_lang$dom$Native_Dom.onWindow; +var _elm_lang$dom$Dom_LowLevel$onDocument = _elm_lang$dom$Native_Dom.onDocument; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Scroll.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Scroll.elmi new file mode 100644 index 0000000..a47825d Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Scroll.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Scroll.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Scroll.elmo new file mode 100644 index 0000000..fb0b404 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Scroll.elmo @@ -0,0 +1,12 @@ +var _elm_lang$dom$Dom_Scroll$toX = _elm_lang$dom$Native_Dom.setScrollLeft; +var _elm_lang$dom$Dom_Scroll$x = _elm_lang$dom$Native_Dom.getScrollLeft; +var _elm_lang$dom$Dom_Scroll$toRight = _elm_lang$dom$Native_Dom.toRight; +var _elm_lang$dom$Dom_Scroll$toLeft = function (id) { + return A2(_elm_lang$dom$Dom_Scroll$toX, id, 0); +}; +var _elm_lang$dom$Dom_Scroll$toY = _elm_lang$dom$Native_Dom.setScrollTop; +var _elm_lang$dom$Dom_Scroll$y = _elm_lang$dom$Native_Dom.getScrollTop; +var _elm_lang$dom$Dom_Scroll$toBottom = _elm_lang$dom$Native_Dom.toBottom; +var _elm_lang$dom$Dom_Scroll$toTop = function (id) { + return A2(_elm_lang$dom$Dom_Scroll$toY, id, 0); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Size.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Size.elmi new file mode 100644 index 0000000..0d66f46 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Size.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Size.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Size.elmo new file mode 100644 index 0000000..a11fa14 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom-Size.elmo @@ -0,0 +1,6 @@ +var _elm_lang$dom$Dom_Size$width = _elm_lang$dom$Native_Dom.width; +var _elm_lang$dom$Dom_Size$height = _elm_lang$dom$Native_Dom.height; +var _elm_lang$dom$Dom_Size$VisibleContentWithBordersAndMargins = {ctor: 'VisibleContentWithBordersAndMargins'}; +var _elm_lang$dom$Dom_Size$VisibleContentWithBorders = {ctor: 'VisibleContentWithBorders'}; +var _elm_lang$dom$Dom_Size$VisibleContent = {ctor: 'VisibleContent'}; +var _elm_lang$dom$Dom_Size$Content = {ctor: 'Content'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom.elmi new file mode 100644 index 0000000..8515df1 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom.elmo new file mode 100644 index 0000000..00d6a73 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/Dom.elmo @@ -0,0 +1,5 @@ +var _elm_lang$dom$Dom$blur = _elm_lang$dom$Native_Dom.blur; +var _elm_lang$dom$Dom$focus = _elm_lang$dom$Native_Dom.focus; +var _elm_lang$dom$Dom$NotFound = function (a) { + return {ctor: 'NotFound', _0: a}; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/graph.dat new file mode 100644 index 0000000..8194afa Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/dom/1.1.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Attributes.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Attributes.elmi new file mode 100644 index 0000000..beea82a Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Attributes.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Attributes.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Attributes.elmo new file mode 100644 index 0000000..cac2be5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Attributes.elmo @@ -0,0 +1,349 @@ +var _elm_lang$html$Html_Attributes$map = _elm_lang$virtual_dom$VirtualDom$mapProperty; +var _elm_lang$html$Html_Attributes$attribute = _elm_lang$virtual_dom$VirtualDom$attribute; +var _elm_lang$html$Html_Attributes$contextmenu = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'contextmenu', value); +}; +var _elm_lang$html$Html_Attributes$draggable = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'draggable', value); +}; +var _elm_lang$html$Html_Attributes$itemprop = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'itemprop', value); +}; +var _elm_lang$html$Html_Attributes$tabindex = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'tabIndex', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$charset = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'charset', value); +}; +var _elm_lang$html$Html_Attributes$height = function (value) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'height', + _elm_lang$core$Basics$toString(value)); +}; +var _elm_lang$html$Html_Attributes$width = function (value) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'width', + _elm_lang$core$Basics$toString(value)); +}; +var _elm_lang$html$Html_Attributes$formaction = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'formAction', value); +}; +var _elm_lang$html$Html_Attributes$list = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'list', value); +}; +var _elm_lang$html$Html_Attributes$minlength = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'minLength', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$maxlength = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'maxlength', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$size = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'size', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$form = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'form', value); +}; +var _elm_lang$html$Html_Attributes$cols = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'cols', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$rows = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'rows', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$challenge = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'challenge', value); +}; +var _elm_lang$html$Html_Attributes$media = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'media', value); +}; +var _elm_lang$html$Html_Attributes$rel = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'rel', value); +}; +var _elm_lang$html$Html_Attributes$datetime = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'datetime', value); +}; +var _elm_lang$html$Html_Attributes$pubdate = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'pubdate', value); +}; +var _elm_lang$html$Html_Attributes$colspan = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'colspan', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$rowspan = function (n) { + return A2( + _elm_lang$html$Html_Attributes$attribute, + 'rowspan', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$manifest = function (value) { + return A2(_elm_lang$html$Html_Attributes$attribute, 'manifest', value); +}; +var _elm_lang$html$Html_Attributes$property = _elm_lang$virtual_dom$VirtualDom$property; +var _elm_lang$html$Html_Attributes$stringProperty = F2( + function (name, string) { + return A2( + _elm_lang$html$Html_Attributes$property, + name, + _elm_lang$core$Json_Encode$string(string)); + }); +var _elm_lang$html$Html_Attributes$class = function (name) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'className', name); +}; +var _elm_lang$html$Html_Attributes$id = function (name) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'id', name); +}; +var _elm_lang$html$Html_Attributes$title = function (name) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'title', name); +}; +var _elm_lang$html$Html_Attributes$accesskey = function ($char) { + return A2( + _elm_lang$html$Html_Attributes$stringProperty, + 'accessKey', + _elm_lang$core$String$fromChar($char)); +}; +var _elm_lang$html$Html_Attributes$dir = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'dir', value); +}; +var _elm_lang$html$Html_Attributes$dropzone = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'dropzone', value); +}; +var _elm_lang$html$Html_Attributes$lang = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'lang', value); +}; +var _elm_lang$html$Html_Attributes$content = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'content', value); +}; +var _elm_lang$html$Html_Attributes$httpEquiv = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'httpEquiv', value); +}; +var _elm_lang$html$Html_Attributes$language = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'language', value); +}; +var _elm_lang$html$Html_Attributes$src = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'src', value); +}; +var _elm_lang$html$Html_Attributes$alt = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'alt', value); +}; +var _elm_lang$html$Html_Attributes$preload = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'preload', value); +}; +var _elm_lang$html$Html_Attributes$poster = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'poster', value); +}; +var _elm_lang$html$Html_Attributes$kind = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'kind', value); +}; +var _elm_lang$html$Html_Attributes$srclang = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'srclang', value); +}; +var _elm_lang$html$Html_Attributes$sandbox = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'sandbox', value); +}; +var _elm_lang$html$Html_Attributes$srcdoc = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'srcdoc', value); +}; +var _elm_lang$html$Html_Attributes$type_ = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'type', value); +}; +var _elm_lang$html$Html_Attributes$value = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'value', value); +}; +var _elm_lang$html$Html_Attributes$defaultValue = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'defaultValue', value); +}; +var _elm_lang$html$Html_Attributes$placeholder = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'placeholder', value); +}; +var _elm_lang$html$Html_Attributes$accept = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'accept', value); +}; +var _elm_lang$html$Html_Attributes$acceptCharset = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'acceptCharset', value); +}; +var _elm_lang$html$Html_Attributes$action = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'action', value); +}; +var _elm_lang$html$Html_Attributes$autocomplete = function (bool) { + return A2( + _elm_lang$html$Html_Attributes$stringProperty, + 'autocomplete', + bool ? 'on' : 'off'); +}; +var _elm_lang$html$Html_Attributes$enctype = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'enctype', value); +}; +var _elm_lang$html$Html_Attributes$method = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'method', value); +}; +var _elm_lang$html$Html_Attributes$name = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'name', value); +}; +var _elm_lang$html$Html_Attributes$pattern = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'pattern', value); +}; +var _elm_lang$html$Html_Attributes$for = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'htmlFor', value); +}; +var _elm_lang$html$Html_Attributes$max = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'max', value); +}; +var _elm_lang$html$Html_Attributes$min = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'min', value); +}; +var _elm_lang$html$Html_Attributes$step = function (n) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'step', n); +}; +var _elm_lang$html$Html_Attributes$wrap = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'wrap', value); +}; +var _elm_lang$html$Html_Attributes$usemap = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'useMap', value); +}; +var _elm_lang$html$Html_Attributes$shape = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'shape', value); +}; +var _elm_lang$html$Html_Attributes$coords = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'coords', value); +}; +var _elm_lang$html$Html_Attributes$keytype = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'keytype', value); +}; +var _elm_lang$html$Html_Attributes$align = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'align', value); +}; +var _elm_lang$html$Html_Attributes$cite = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'cite', value); +}; +var _elm_lang$html$Html_Attributes$href = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'href', value); +}; +var _elm_lang$html$Html_Attributes$target = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'target', value); +}; +var _elm_lang$html$Html_Attributes$downloadAs = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'download', value); +}; +var _elm_lang$html$Html_Attributes$hreflang = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'hreflang', value); +}; +var _elm_lang$html$Html_Attributes$ping = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'ping', value); +}; +var _elm_lang$html$Html_Attributes$start = function (n) { + return A2( + _elm_lang$html$Html_Attributes$stringProperty, + 'start', + _elm_lang$core$Basics$toString(n)); +}; +var _elm_lang$html$Html_Attributes$headers = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'headers', value); +}; +var _elm_lang$html$Html_Attributes$scope = function (value) { + return A2(_elm_lang$html$Html_Attributes$stringProperty, 'scope', value); +}; +var _elm_lang$html$Html_Attributes$boolProperty = F2( + function (name, bool) { + return A2( + _elm_lang$html$Html_Attributes$property, + name, + _elm_lang$core$Json_Encode$bool(bool)); + }); +var _elm_lang$html$Html_Attributes$hidden = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'hidden', bool); +}; +var _elm_lang$html$Html_Attributes$contenteditable = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'contentEditable', bool); +}; +var _elm_lang$html$Html_Attributes$spellcheck = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'spellcheck', bool); +}; +var _elm_lang$html$Html_Attributes$async = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'async', bool); +}; +var _elm_lang$html$Html_Attributes$defer = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'defer', bool); +}; +var _elm_lang$html$Html_Attributes$scoped = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'scoped', bool); +}; +var _elm_lang$html$Html_Attributes$autoplay = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'autoplay', bool); +}; +var _elm_lang$html$Html_Attributes$controls = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'controls', bool); +}; +var _elm_lang$html$Html_Attributes$loop = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'loop', bool); +}; +var _elm_lang$html$Html_Attributes$default = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'default', bool); +}; +var _elm_lang$html$Html_Attributes$seamless = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'seamless', bool); +}; +var _elm_lang$html$Html_Attributes$checked = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'checked', bool); +}; +var _elm_lang$html$Html_Attributes$selected = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'selected', bool); +}; +var _elm_lang$html$Html_Attributes$autofocus = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'autofocus', bool); +}; +var _elm_lang$html$Html_Attributes$disabled = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'disabled', bool); +}; +var _elm_lang$html$Html_Attributes$multiple = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'multiple', bool); +}; +var _elm_lang$html$Html_Attributes$novalidate = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'noValidate', bool); +}; +var _elm_lang$html$Html_Attributes$readonly = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'readOnly', bool); +}; +var _elm_lang$html$Html_Attributes$required = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'required', bool); +}; +var _elm_lang$html$Html_Attributes$ismap = function (value) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'isMap', value); +}; +var _elm_lang$html$Html_Attributes$download = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'download', bool); +}; +var _elm_lang$html$Html_Attributes$reversed = function (bool) { + return A2(_elm_lang$html$Html_Attributes$boolProperty, 'reversed', bool); +}; +var _elm_lang$html$Html_Attributes$classList = function (list) { + return _elm_lang$html$Html_Attributes$class( + A2( + _elm_lang$core$String$join, + ' ', + A2( + _elm_lang$core$List$map, + _elm_lang$core$Tuple$first, + A2(_elm_lang$core$List$filter, _elm_lang$core$Tuple$second, list)))); +}; +var _elm_lang$html$Html_Attributes$style = _elm_lang$virtual_dom$VirtualDom$style; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Events.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Events.elmi new file mode 100644 index 0000000..35502d8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Events.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Events.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Events.elmo new file mode 100644 index 0000000..43e1b1a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Events.elmo @@ -0,0 +1,114 @@ +var _elm_lang$html$Html_Events$keyCode = A2(_elm_lang$core$Json_Decode$field, 'keyCode', _elm_lang$core$Json_Decode$int); +var _elm_lang$html$Html_Events$targetChecked = A2( + _elm_lang$core$Json_Decode$at, + { + ctor: '::', + _0: 'target', + _1: { + ctor: '::', + _0: 'checked', + _1: {ctor: '[]'} + } + }, + _elm_lang$core$Json_Decode$bool); +var _elm_lang$html$Html_Events$targetValue = A2( + _elm_lang$core$Json_Decode$at, + { + ctor: '::', + _0: 'target', + _1: { + ctor: '::', + _0: 'value', + _1: {ctor: '[]'} + } + }, + _elm_lang$core$Json_Decode$string); +var _elm_lang$html$Html_Events$defaultOptions = _elm_lang$virtual_dom$VirtualDom$defaultOptions; +var _elm_lang$html$Html_Events$onWithOptions = _elm_lang$virtual_dom$VirtualDom$onWithOptions; +var _elm_lang$html$Html_Events$on = _elm_lang$virtual_dom$VirtualDom$on; +var _elm_lang$html$Html_Events$onFocus = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'focus', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onBlur = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'blur', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onSubmitOptions = _elm_lang$core$Native_Utils.update( + _elm_lang$html$Html_Events$defaultOptions, + {preventDefault: true}); +var _elm_lang$html$Html_Events$onSubmit = function (msg) { + return A3( + _elm_lang$html$Html_Events$onWithOptions, + 'submit', + _elm_lang$html$Html_Events$onSubmitOptions, + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onCheck = function (tagger) { + return A2( + _elm_lang$html$Html_Events$on, + 'change', + A2(_elm_lang$core$Json_Decode$map, tagger, _elm_lang$html$Html_Events$targetChecked)); +}; +var _elm_lang$html$Html_Events$onInput = function (tagger) { + return A2( + _elm_lang$html$Html_Events$on, + 'input', + A2(_elm_lang$core$Json_Decode$map, tagger, _elm_lang$html$Html_Events$targetValue)); +}; +var _elm_lang$html$Html_Events$onMouseOut = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'mouseout', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onMouseOver = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'mouseover', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onMouseLeave = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'mouseleave', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onMouseEnter = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'mouseenter', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onMouseUp = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'mouseup', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onMouseDown = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'mousedown', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onDoubleClick = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'dblclick', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$onClick = function (msg) { + return A2( + _elm_lang$html$Html_Events$on, + 'click', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$html$Html_Events$Options = F2( + function (a, b) { + return {stopPropagation: a, preventDefault: b}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Keyed.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Keyed.elmi new file mode 100644 index 0000000..e9746ba Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Keyed.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Keyed.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Keyed.elmo new file mode 100644 index 0000000..6d99fd5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Keyed.elmo @@ -0,0 +1,3 @@ +var _elm_lang$html$Html_Keyed$node = _elm_lang$virtual_dom$VirtualDom$keyedNode; +var _elm_lang$html$Html_Keyed$ol = _elm_lang$html$Html_Keyed$node('ol'); +var _elm_lang$html$Html_Keyed$ul = _elm_lang$html$Html_Keyed$node('ul'); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Lazy.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Lazy.elmi new file mode 100644 index 0000000..5921eed Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Lazy.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Lazy.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Lazy.elmo new file mode 100644 index 0000000..d8d2b70 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html-Lazy.elmo @@ -0,0 +1,3 @@ +var _elm_lang$html$Html_Lazy$lazy3 = _elm_lang$virtual_dom$VirtualDom$lazy3; +var _elm_lang$html$Html_Lazy$lazy2 = _elm_lang$virtual_dom$VirtualDom$lazy2; +var _elm_lang$html$Html_Lazy$lazy = _elm_lang$virtual_dom$VirtualDom$lazy; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html.elmi new file mode 100644 index 0000000..2b629f1 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html.elmo new file mode 100644 index 0000000..03f9981 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/Html.elmo @@ -0,0 +1,124 @@ +var _elm_lang$html$Html$programWithFlags = _elm_lang$virtual_dom$VirtualDom$programWithFlags; +var _elm_lang$html$Html$program = _elm_lang$virtual_dom$VirtualDom$program; +var _elm_lang$html$Html$beginnerProgram = function (_p0) { + var _p1 = _p0; + return _elm_lang$html$Html$program( + { + init: A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _p1.model, + {ctor: '[]'}), + update: F2( + function (msg, model) { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + A2(_p1.update, msg, model), + {ctor: '[]'}); + }), + view: _p1.view, + subscriptions: function (_p2) { + return _elm_lang$core$Platform_Sub$none; + } + }); +}; +var _elm_lang$html$Html$map = _elm_lang$virtual_dom$VirtualDom$map; +var _elm_lang$html$Html$text = _elm_lang$virtual_dom$VirtualDom$text; +var _elm_lang$html$Html$node = _elm_lang$virtual_dom$VirtualDom$node; +var _elm_lang$html$Html$body = _elm_lang$html$Html$node('body'); +var _elm_lang$html$Html$section = _elm_lang$html$Html$node('section'); +var _elm_lang$html$Html$nav = _elm_lang$html$Html$node('nav'); +var _elm_lang$html$Html$article = _elm_lang$html$Html$node('article'); +var _elm_lang$html$Html$aside = _elm_lang$html$Html$node('aside'); +var _elm_lang$html$Html$h1 = _elm_lang$html$Html$node('h1'); +var _elm_lang$html$Html$h2 = _elm_lang$html$Html$node('h2'); +var _elm_lang$html$Html$h3 = _elm_lang$html$Html$node('h3'); +var _elm_lang$html$Html$h4 = _elm_lang$html$Html$node('h4'); +var _elm_lang$html$Html$h5 = _elm_lang$html$Html$node('h5'); +var _elm_lang$html$Html$h6 = _elm_lang$html$Html$node('h6'); +var _elm_lang$html$Html$header = _elm_lang$html$Html$node('header'); +var _elm_lang$html$Html$footer = _elm_lang$html$Html$node('footer'); +var _elm_lang$html$Html$address = _elm_lang$html$Html$node('address'); +var _elm_lang$html$Html$main_ = _elm_lang$html$Html$node('main'); +var _elm_lang$html$Html$p = _elm_lang$html$Html$node('p'); +var _elm_lang$html$Html$hr = _elm_lang$html$Html$node('hr'); +var _elm_lang$html$Html$pre = _elm_lang$html$Html$node('pre'); +var _elm_lang$html$Html$blockquote = _elm_lang$html$Html$node('blockquote'); +var _elm_lang$html$Html$ol = _elm_lang$html$Html$node('ol'); +var _elm_lang$html$Html$ul = _elm_lang$html$Html$node('ul'); +var _elm_lang$html$Html$li = _elm_lang$html$Html$node('li'); +var _elm_lang$html$Html$dl = _elm_lang$html$Html$node('dl'); +var _elm_lang$html$Html$dt = _elm_lang$html$Html$node('dt'); +var _elm_lang$html$Html$dd = _elm_lang$html$Html$node('dd'); +var _elm_lang$html$Html$figure = _elm_lang$html$Html$node('figure'); +var _elm_lang$html$Html$figcaption = _elm_lang$html$Html$node('figcaption'); +var _elm_lang$html$Html$div = _elm_lang$html$Html$node('div'); +var _elm_lang$html$Html$a = _elm_lang$html$Html$node('a'); +var _elm_lang$html$Html$em = _elm_lang$html$Html$node('em'); +var _elm_lang$html$Html$strong = _elm_lang$html$Html$node('strong'); +var _elm_lang$html$Html$small = _elm_lang$html$Html$node('small'); +var _elm_lang$html$Html$s = _elm_lang$html$Html$node('s'); +var _elm_lang$html$Html$cite = _elm_lang$html$Html$node('cite'); +var _elm_lang$html$Html$q = _elm_lang$html$Html$node('q'); +var _elm_lang$html$Html$dfn = _elm_lang$html$Html$node('dfn'); +var _elm_lang$html$Html$abbr = _elm_lang$html$Html$node('abbr'); +var _elm_lang$html$Html$time = _elm_lang$html$Html$node('time'); +var _elm_lang$html$Html$code = _elm_lang$html$Html$node('code'); +var _elm_lang$html$Html$var = _elm_lang$html$Html$node('var'); +var _elm_lang$html$Html$samp = _elm_lang$html$Html$node('samp'); +var _elm_lang$html$Html$kbd = _elm_lang$html$Html$node('kbd'); +var _elm_lang$html$Html$sub = _elm_lang$html$Html$node('sub'); +var _elm_lang$html$Html$sup = _elm_lang$html$Html$node('sup'); +var _elm_lang$html$Html$i = _elm_lang$html$Html$node('i'); +var _elm_lang$html$Html$b = _elm_lang$html$Html$node('b'); +var _elm_lang$html$Html$u = _elm_lang$html$Html$node('u'); +var _elm_lang$html$Html$mark = _elm_lang$html$Html$node('mark'); +var _elm_lang$html$Html$ruby = _elm_lang$html$Html$node('ruby'); +var _elm_lang$html$Html$rt = _elm_lang$html$Html$node('rt'); +var _elm_lang$html$Html$rp = _elm_lang$html$Html$node('rp'); +var _elm_lang$html$Html$bdi = _elm_lang$html$Html$node('bdi'); +var _elm_lang$html$Html$bdo = _elm_lang$html$Html$node('bdo'); +var _elm_lang$html$Html$span = _elm_lang$html$Html$node('span'); +var _elm_lang$html$Html$br = _elm_lang$html$Html$node('br'); +var _elm_lang$html$Html$wbr = _elm_lang$html$Html$node('wbr'); +var _elm_lang$html$Html$ins = _elm_lang$html$Html$node('ins'); +var _elm_lang$html$Html$del = _elm_lang$html$Html$node('del'); +var _elm_lang$html$Html$img = _elm_lang$html$Html$node('img'); +var _elm_lang$html$Html$iframe = _elm_lang$html$Html$node('iframe'); +var _elm_lang$html$Html$embed = _elm_lang$html$Html$node('embed'); +var _elm_lang$html$Html$object = _elm_lang$html$Html$node('object'); +var _elm_lang$html$Html$param = _elm_lang$html$Html$node('param'); +var _elm_lang$html$Html$video = _elm_lang$html$Html$node('video'); +var _elm_lang$html$Html$audio = _elm_lang$html$Html$node('audio'); +var _elm_lang$html$Html$source = _elm_lang$html$Html$node('source'); +var _elm_lang$html$Html$track = _elm_lang$html$Html$node('track'); +var _elm_lang$html$Html$canvas = _elm_lang$html$Html$node('canvas'); +var _elm_lang$html$Html$math = _elm_lang$html$Html$node('math'); +var _elm_lang$html$Html$table = _elm_lang$html$Html$node('table'); +var _elm_lang$html$Html$caption = _elm_lang$html$Html$node('caption'); +var _elm_lang$html$Html$colgroup = _elm_lang$html$Html$node('colgroup'); +var _elm_lang$html$Html$col = _elm_lang$html$Html$node('col'); +var _elm_lang$html$Html$tbody = _elm_lang$html$Html$node('tbody'); +var _elm_lang$html$Html$thead = _elm_lang$html$Html$node('thead'); +var _elm_lang$html$Html$tfoot = _elm_lang$html$Html$node('tfoot'); +var _elm_lang$html$Html$tr = _elm_lang$html$Html$node('tr'); +var _elm_lang$html$Html$td = _elm_lang$html$Html$node('td'); +var _elm_lang$html$Html$th = _elm_lang$html$Html$node('th'); +var _elm_lang$html$Html$form = _elm_lang$html$Html$node('form'); +var _elm_lang$html$Html$fieldset = _elm_lang$html$Html$node('fieldset'); +var _elm_lang$html$Html$legend = _elm_lang$html$Html$node('legend'); +var _elm_lang$html$Html$label = _elm_lang$html$Html$node('label'); +var _elm_lang$html$Html$input = _elm_lang$html$Html$node('input'); +var _elm_lang$html$Html$button = _elm_lang$html$Html$node('button'); +var _elm_lang$html$Html$select = _elm_lang$html$Html$node('select'); +var _elm_lang$html$Html$datalist = _elm_lang$html$Html$node('datalist'); +var _elm_lang$html$Html$optgroup = _elm_lang$html$Html$node('optgroup'); +var _elm_lang$html$Html$option = _elm_lang$html$Html$node('option'); +var _elm_lang$html$Html$textarea = _elm_lang$html$Html$node('textarea'); +var _elm_lang$html$Html$keygen = _elm_lang$html$Html$node('keygen'); +var _elm_lang$html$Html$output = _elm_lang$html$Html$node('output'); +var _elm_lang$html$Html$progress = _elm_lang$html$Html$node('progress'); +var _elm_lang$html$Html$meter = _elm_lang$html$Html$node('meter'); +var _elm_lang$html$Html$details = _elm_lang$html$Html$node('details'); +var _elm_lang$html$Html$summary = _elm_lang$html$Html$node('summary'); +var _elm_lang$html$Html$menuitem = _elm_lang$html$Html$node('menuitem'); +var _elm_lang$html$Html$menu = _elm_lang$html$Html$node('menu'); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/graph.dat new file mode 100644 index 0000000..fbc8007 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/html/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Internal.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Internal.elmi new file mode 100644 index 0000000..2c98acd Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Internal.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Internal.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Internal.elmo new file mode 100644 index 0000000..73e3571 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Internal.elmo @@ -0,0 +1,26 @@ +var _elm_lang$http$Http_Internal$map = F2( + function (func, request) { + return _elm_lang$core$Native_Utils.update( + request, + { + expect: A2(_elm_lang$http$Native_Http.mapExpect, func, request.expect) + }); + }); +var _elm_lang$http$Http_Internal$RawRequest = F7( + function (a, b, c, d, e, f, g) { + return {method: a, headers: b, url: c, body: d, expect: e, timeout: f, withCredentials: g}; + }); +var _elm_lang$http$Http_Internal$Request = function (a) { + return {ctor: 'Request', _0: a}; +}; +var _elm_lang$http$Http_Internal$Expect = {ctor: 'Expect'}; +var _elm_lang$http$Http_Internal$FormDataBody = {ctor: 'FormDataBody'}; +var _elm_lang$http$Http_Internal$StringBody = F2( + function (a, b) { + return {ctor: 'StringBody', _0: a, _1: b}; + }); +var _elm_lang$http$Http_Internal$EmptyBody = {ctor: 'EmptyBody'}; +var _elm_lang$http$Http_Internal$Header = F2( + function (a, b) { + return {ctor: 'Header', _0: a, _1: b}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Progress.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Progress.elmi new file mode 100644 index 0000000..c867a5a Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Progress.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Progress.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Progress.elmo new file mode 100644 index 0000000..5d89c9c --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http-Progress.elmo @@ -0,0 +1,195 @@ +var _elm_lang$http$Http_Progress$onSelfMsg = F3( + function (router, _p0, state) { + return _elm_lang$core$Task$succeed(state); + }); +var _elm_lang$http$Http_Progress$addSub = F2( + function (_p1, subDict) { + var _p2 = _p1; + var _p3 = _p2._1; + var request = _p3.request; + var uid = A2( + _elm_lang$core$Basics_ops['++'], + _p2._0, + A2(_elm_lang$core$Basics_ops['++'], request.method, request.url)); + return A3(_elm_lang$core$Dict$insert, uid, _p3, subDict); + }); +var _elm_lang$http$Http_Progress$collectSubs = function (subs) { + return A3(_elm_lang$core$List$foldl, _elm_lang$http$Http_Progress$addSub, _elm_lang$core$Dict$empty, subs); +}; +var _elm_lang$http$Http_Progress$toTask = F2( + function (router, _p4) { + var _p5 = _p4; + return A2( + _elm_lang$core$Task$onError, + function (_p6) { + return A2( + _elm_lang$core$Platform$sendToApp, + router, + _p5.toError(_p6)); + }, + A2( + _elm_lang$core$Task$andThen, + _elm_lang$core$Platform$sendToApp(router), + A2( + _elm_lang$http$Native_Http.toTask, + _p5.request, + _elm_lang$core$Maybe$Just( + function (_p7) { + return A2( + _elm_lang$core$Platform$sendToApp, + router, + _p5.toProgress(_p7)); + })))); + }); +var _elm_lang$http$Http_Progress$spawnRequests = F3( + function (router, trackedRequests, state) { + var _p8 = trackedRequests; + if (_p8.ctor === '[]') { + return _elm_lang$core$Task$succeed(state); + } else { + return A2( + _elm_lang$core$Task$andThen, + function (process) { + return A3( + _elm_lang$http$Http_Progress$spawnRequests, + router, + _p8._1, + A3(_elm_lang$core$Dict$insert, _p8._0._0, process, state)); + }, + _elm_lang$core$Process$spawn( + A2(_elm_lang$http$Http_Progress$toTask, router, _p8._0._1))); + } + }); +var _elm_lang$http$Http_Progress$onEffects = F3( + function (router, subs, state) { + var rightStep = F3( + function (id, trackedRequest, _p9) { + var _p10 = _p9; + return { + ctor: '_Tuple3', + _0: _p10._0, + _1: _p10._1, + _2: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: id, _1: trackedRequest}, + _1: _p10._2 + } + }; + }); + var bothStep = F4( + function (id, process, _p12, _p11) { + var _p13 = _p11; + return { + ctor: '_Tuple3', + _0: _p13._0, + _1: A3(_elm_lang$core$Dict$insert, id, process, _p13._1), + _2: _p13._2 + }; + }); + var leftStep = F3( + function (id, process, _p14) { + var _p15 = _p14; + return { + ctor: '_Tuple3', + _0: { + ctor: '::', + _0: _elm_lang$core$Process$kill(process), + _1: _p15._0 + }, + _1: _p15._1, + _2: _p15._2 + }; + }); + var subDict = _elm_lang$http$Http_Progress$collectSubs(subs); + var _p16 = A6( + _elm_lang$core$Dict$merge, + leftStep, + bothStep, + rightStep, + state, + subDict, + { + ctor: '_Tuple3', + _0: {ctor: '[]'}, + _1: _elm_lang$core$Dict$empty, + _2: {ctor: '[]'} + }); + var dead = _p16._0; + var ongoing = _p16._1; + var $new = _p16._2; + return A2( + _elm_lang$core$Task$andThen, + function (_p17) { + return A3(_elm_lang$http$Http_Progress$spawnRequests, router, $new, ongoing); + }, + _elm_lang$core$Task$sequence(dead)); + }); +var _elm_lang$http$Http_Progress$init = _elm_lang$core$Task$succeed(_elm_lang$core$Dict$empty); +var _elm_lang$http$Http_Progress$map = F2( + function (func, _p18) { + var _p19 = _p18; + return { + request: A2(_elm_lang$http$Http_Internal$map, func, _p19.request), + toProgress: function (_p20) { + return func( + _p19.toProgress(_p20)); + }, + toError: function (_p21) { + return func( + _p19.toError(_p21)); + } + }; + }); +var _elm_lang$http$Http_Progress$subscription = _elm_lang$core$Native_Platform.leaf('Http.Progress'); +var _elm_lang$http$Http_Progress$TrackedRequest = F3( + function (a, b, c) { + return {request: a, toProgress: b, toError: c}; + }); +var _elm_lang$http$Http_Progress$Done = function (a) { + return {ctor: 'Done', _0: a}; +}; +var _elm_lang$http$Http_Progress$Fail = function (a) { + return {ctor: 'Fail', _0: a}; +}; +var _elm_lang$http$Http_Progress$Some = function (a) { + return {ctor: 'Some', _0: a}; +}; +var _elm_lang$http$Http_Progress$None = {ctor: 'None'}; +var _elm_lang$http$Http_Progress$Track = F2( + function (a, b) { + return {ctor: 'Track', _0: a, _1: b}; + }); +var _elm_lang$http$Http_Progress$track = F3( + function (id, toMessage, _p22) { + var _p23 = _p22; + return _elm_lang$http$Http_Progress$subscription( + A2( + _elm_lang$http$Http_Progress$Track, + id, + { + request: A2( + _elm_lang$http$Http_Internal$map, + function (_p24) { + return toMessage( + _elm_lang$http$Http_Progress$Done(_p24)); + }, + _p23._0), + toProgress: function (_p25) { + return toMessage( + _elm_lang$http$Http_Progress$Some(_p25)); + }, + toError: function (_p26) { + return toMessage( + _elm_lang$http$Http_Progress$Fail(_p26)); + } + })); + }); +var _elm_lang$http$Http_Progress$subMap = F2( + function (func, _p27) { + var _p28 = _p27; + return A2( + _elm_lang$http$Http_Progress$Track, + _p28._0, + A2(_elm_lang$http$Http_Progress$map, func, _p28._1)); + }); +_elm_lang$core$Native_Platform.effectManagers['Http.Progress'] = {pkg: 'elm-lang/http', init: _elm_lang$http$Http_Progress$init, onEffects: _elm_lang$http$Http_Progress$onEffects, onSelfMsg: _elm_lang$http$Http_Progress$onSelfMsg, tag: 'sub', subMap: _elm_lang$http$Http_Progress$subMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http.elmi new file mode 100644 index 0000000..30093f2 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http.elmo new file mode 100644 index 0000000..a4b3596 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/Http.elmo @@ -0,0 +1,94 @@ +var _elm_lang$http$Http$decodeUri = _elm_lang$http$Native_Http.decodeUri; +var _elm_lang$http$Http$encodeUri = _elm_lang$http$Native_Http.encodeUri; +var _elm_lang$http$Http$expectStringResponse = _elm_lang$http$Native_Http.expectStringResponse; +var _elm_lang$http$Http$expectJson = function (decoder) { + return _elm_lang$http$Http$expectStringResponse( + function (response) { + return A2(_elm_lang$core$Json_Decode$decodeString, decoder, response.body); + }); +}; +var _elm_lang$http$Http$expectString = _elm_lang$http$Http$expectStringResponse( + function (response) { + return _elm_lang$core$Result$Ok(response.body); + }); +var _elm_lang$http$Http$multipartBody = _elm_lang$http$Native_Http.multipart; +var _elm_lang$http$Http$stringBody = _elm_lang$http$Http_Internal$StringBody; +var _elm_lang$http$Http$jsonBody = function (value) { + return A2( + _elm_lang$http$Http_Internal$StringBody, + 'application/json', + A2(_elm_lang$core$Json_Encode$encode, 0, value)); +}; +var _elm_lang$http$Http$emptyBody = _elm_lang$http$Http_Internal$EmptyBody; +var _elm_lang$http$Http$header = _elm_lang$http$Http_Internal$Header; +var _elm_lang$http$Http$request = _elm_lang$http$Http_Internal$Request; +var _elm_lang$http$Http$post = F3( + function (url, body, decoder) { + return _elm_lang$http$Http$request( + { + method: 'POST', + headers: {ctor: '[]'}, + url: url, + body: body, + expect: _elm_lang$http$Http$expectJson(decoder), + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false + }); + }); +var _elm_lang$http$Http$get = F2( + function (url, decoder) { + return _elm_lang$http$Http$request( + { + method: 'GET', + headers: {ctor: '[]'}, + url: url, + body: _elm_lang$http$Http$emptyBody, + expect: _elm_lang$http$Http$expectJson(decoder), + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false + }); + }); +var _elm_lang$http$Http$getString = function (url) { + return _elm_lang$http$Http$request( + { + method: 'GET', + headers: {ctor: '[]'}, + url: url, + body: _elm_lang$http$Http$emptyBody, + expect: _elm_lang$http$Http$expectString, + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false + }); +}; +var _elm_lang$http$Http$toTask = function (_p0) { + var _p1 = _p0; + return A2(_elm_lang$http$Native_Http.toTask, _p1._0, _elm_lang$core$Maybe$Nothing); +}; +var _elm_lang$http$Http$send = F2( + function (resultToMessage, request) { + return A2( + _elm_lang$core$Task$attempt, + resultToMessage, + _elm_lang$http$Http$toTask(request)); + }); +var _elm_lang$http$Http$Response = F4( + function (a, b, c, d) { + return {url: a, status: b, headers: c, body: d}; + }); +var _elm_lang$http$Http$BadPayload = F2( + function (a, b) { + return {ctor: 'BadPayload', _0: a, _1: b}; + }); +var _elm_lang$http$Http$BadStatus = function (a) { + return {ctor: 'BadStatus', _0: a}; +}; +var _elm_lang$http$Http$NetworkError = {ctor: 'NetworkError'}; +var _elm_lang$http$Http$Timeout = {ctor: 'Timeout'}; +var _elm_lang$http$Http$BadUrl = function (a) { + return {ctor: 'BadUrl', _0: a}; +}; +var _elm_lang$http$Http$StringPart = F2( + function (a, b) { + return {ctor: 'StringPart', _0: a, _1: b}; + }); +var _elm_lang$http$Http$stringPart = _elm_lang$http$Http$StringPart; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/graph.dat new file mode 100644 index 0000000..ee0d0c3 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/http/1.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/Lazy.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/Lazy.elmi new file mode 100644 index 0000000..3f6f041 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/Lazy.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/Lazy.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/Lazy.elmo new file mode 100644 index 0000000..0f9c52a --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/Lazy.elmo @@ -0,0 +1,92 @@ +var _elm_lang$lazy$Lazy$force = function (_p0) { + var _p1 = _p0; + return _p1._0( + {ctor: '_Tuple0'}); +}; +var _elm_lang$lazy$Lazy$Lazy = function (a) { + return {ctor: 'Lazy', _0: a}; +}; +var _elm_lang$lazy$Lazy$lazy = function (thunk) { + return _elm_lang$lazy$Lazy$Lazy( + _elm_lang$lazy$Native_Lazy.memoize(thunk)); +}; +var _elm_lang$lazy$Lazy$map = F2( + function (f, a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p2) { + var _p3 = _p2; + return f( + _elm_lang$lazy$Lazy$force(a)); + }); + }); +var _elm_lang$lazy$Lazy$map2 = F3( + function (f, a, b) { + return _elm_lang$lazy$Lazy$lazy( + function (_p4) { + var _p5 = _p4; + return A2( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b)); + }); + }); +var _elm_lang$lazy$Lazy$map3 = F4( + function (f, a, b, c) { + return _elm_lang$lazy$Lazy$lazy( + function (_p6) { + var _p7 = _p6; + return A3( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b), + _elm_lang$lazy$Lazy$force(c)); + }); + }); +var _elm_lang$lazy$Lazy$map4 = F5( + function (f, a, b, c, d) { + return _elm_lang$lazy$Lazy$lazy( + function (_p8) { + var _p9 = _p8; + return A4( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b), + _elm_lang$lazy$Lazy$force(c), + _elm_lang$lazy$Lazy$force(d)); + }); + }); +var _elm_lang$lazy$Lazy$map5 = F6( + function (f, a, b, c, d, e) { + return _elm_lang$lazy$Lazy$lazy( + function (_p10) { + var _p11 = _p10; + return A5( + f, + _elm_lang$lazy$Lazy$force(a), + _elm_lang$lazy$Lazy$force(b), + _elm_lang$lazy$Lazy$force(c), + _elm_lang$lazy$Lazy$force(d), + _elm_lang$lazy$Lazy$force(e)); + }); + }); +var _elm_lang$lazy$Lazy$apply = F2( + function (f, x) { + return _elm_lang$lazy$Lazy$lazy( + function (_p12) { + var _p13 = _p12; + return A2( + _elm_lang$lazy$Lazy$force, + f, + _elm_lang$lazy$Lazy$force(x)); + }); + }); +var _elm_lang$lazy$Lazy$andThen = F2( + function (callback, a) { + return _elm_lang$lazy$Lazy$lazy( + function (_p14) { + var _p15 = _p14; + return _elm_lang$lazy$Lazy$force( + callback( + _elm_lang$lazy$Lazy$force(a))); + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/graph.dat new file mode 100644 index 0000000..c5582eb Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/lazy/2.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/Navigation.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/Navigation.elmi new file mode 100644 index 0000000..8399512 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/Navigation.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/Navigation.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/Navigation.elmo new file mode 100644 index 0000000..517c4fc --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/Navigation.elmo @@ -0,0 +1,244 @@ +var _elm_lang$navigation$Navigation$replaceState = _elm_lang$navigation$Native_Navigation.replaceState; +var _elm_lang$navigation$Navigation$pushState = _elm_lang$navigation$Native_Navigation.pushState; +var _elm_lang$navigation$Navigation$go = _elm_lang$navigation$Native_Navigation.go; +var _elm_lang$navigation$Navigation$spawnPopState = function (router) { + return _elm_lang$core$Process$spawn( + A3( + _elm_lang$dom$Dom_LowLevel$onWindow, + 'popstate', + _elm_lang$core$Json_Decode$value, + function (_p0) { + return A2( + _elm_lang$core$Platform$sendToSelf, + router, + _elm_lang$navigation$Native_Navigation.getLocation( + {ctor: '_Tuple0'})); + })); +}; +var _elm_lang$navigation$Navigation_ops = _elm_lang$navigation$Navigation_ops || {}; +_elm_lang$navigation$Navigation_ops['&>'] = F2( + function (task1, task2) { + return A2( + _elm_lang$core$Task$andThen, + function (_p1) { + return task2; + }, + task1); + }); +var _elm_lang$navigation$Navigation$notify = F3( + function (router, subs, location) { + var send = function (_p2) { + var _p3 = _p2; + return A2( + _elm_lang$core$Platform$sendToApp, + router, + _p3._0(location)); + }; + return A2( + _elm_lang$navigation$Navigation_ops['&>'], + _elm_lang$core$Task$sequence( + A2(_elm_lang$core$List$map, send, subs)), + _elm_lang$core$Task$succeed( + {ctor: '_Tuple0'})); + }); +var _elm_lang$navigation$Navigation$onSelfMsg = F3( + function (router, location, state) { + return A2( + _elm_lang$navigation$Navigation_ops['&>'], + A3(_elm_lang$navigation$Navigation$notify, router, state.subs, location), + _elm_lang$core$Task$succeed(state)); + }); +var _elm_lang$navigation$Navigation$cmdHelp = F3( + function (router, subs, cmd) { + var _p4 = cmd; + switch (_p4.ctor) { + case 'Jump': + return _elm_lang$navigation$Navigation$go(_p4._0); + case 'New': + return A2( + _elm_lang$core$Task$andThen, + A2(_elm_lang$navigation$Navigation$notify, router, subs), + _elm_lang$navigation$Navigation$pushState(_p4._0)); + default: + return A2( + _elm_lang$core$Task$andThen, + A2(_elm_lang$navigation$Navigation$notify, router, subs), + _elm_lang$navigation$Navigation$replaceState(_p4._0)); + } + }); +var _elm_lang$navigation$Navigation$subscription = _elm_lang$core$Native_Platform.leaf('Navigation'); +var _elm_lang$navigation$Navigation$command = _elm_lang$core$Native_Platform.leaf('Navigation'); +var _elm_lang$navigation$Navigation$Location = function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function (i) { + return function (j) { + return function (k) { + return {href: a, host: b, hostname: c, protocol: d, origin: e, port_: f, pathname: g, search: h, hash: i, username: j, password: k}; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; +var _elm_lang$navigation$Navigation$State = F2( + function (a, b) { + return {subs: a, process: b}; + }); +var _elm_lang$navigation$Navigation$init = _elm_lang$core$Task$succeed( + A2( + _elm_lang$navigation$Navigation$State, + {ctor: '[]'}, + _elm_lang$core$Maybe$Nothing)); +var _elm_lang$navigation$Navigation$onEffects = F4( + function (router, cmds, subs, _p5) { + var _p6 = _p5; + var _p9 = _p6.process; + var stepState = function () { + var _p7 = {ctor: '_Tuple2', _0: subs, _1: _p9}; + _v3_2: + do { + if (_p7._0.ctor === '[]') { + if (_p7._1.ctor === 'Just') { + return A2( + _elm_lang$navigation$Navigation_ops['&>'], + _elm_lang$core$Process$kill(_p7._1._0), + _elm_lang$core$Task$succeed( + A2(_elm_lang$navigation$Navigation$State, subs, _elm_lang$core$Maybe$Nothing))); + } else { + break _v3_2; + } + } else { + if (_p7._1.ctor === 'Nothing') { + return A2( + _elm_lang$core$Task$map, + function (_p8) { + return A2( + _elm_lang$navigation$Navigation$State, + subs, + _elm_lang$core$Maybe$Just(_p8)); + }, + _elm_lang$navigation$Navigation$spawnPopState(router)); + } else { + break _v3_2; + } + } + } while(false); + return _elm_lang$core$Task$succeed( + A2(_elm_lang$navigation$Navigation$State, subs, _p9)); + }(); + return A2( + _elm_lang$navigation$Navigation_ops['&>'], + _elm_lang$core$Task$sequence( + A2( + _elm_lang$core$List$map, + A2(_elm_lang$navigation$Navigation$cmdHelp, router, subs), + cmds)), + stepState); + }); +var _elm_lang$navigation$Navigation$Modify = function (a) { + return {ctor: 'Modify', _0: a}; +}; +var _elm_lang$navigation$Navigation$modifyUrl = function (url) { + return _elm_lang$navigation$Navigation$command( + _elm_lang$navigation$Navigation$Modify(url)); +}; +var _elm_lang$navigation$Navigation$New = function (a) { + return {ctor: 'New', _0: a}; +}; +var _elm_lang$navigation$Navigation$newUrl = function (url) { + return _elm_lang$navigation$Navigation$command( + _elm_lang$navigation$Navigation$New(url)); +}; +var _elm_lang$navigation$Navigation$Jump = function (a) { + return {ctor: 'Jump', _0: a}; +}; +var _elm_lang$navigation$Navigation$back = function (n) { + return _elm_lang$navigation$Navigation$command( + _elm_lang$navigation$Navigation$Jump(0 - n)); +}; +var _elm_lang$navigation$Navigation$forward = function (n) { + return _elm_lang$navigation$Navigation$command( + _elm_lang$navigation$Navigation$Jump(n)); +}; +var _elm_lang$navigation$Navigation$cmdMap = F2( + function (_p10, myCmd) { + var _p11 = myCmd; + switch (_p11.ctor) { + case 'Jump': + return _elm_lang$navigation$Navigation$Jump(_p11._0); + case 'New': + return _elm_lang$navigation$Navigation$New(_p11._0); + default: + return _elm_lang$navigation$Navigation$Modify(_p11._0); + } + }); +var _elm_lang$navigation$Navigation$Monitor = function (a) { + return {ctor: 'Monitor', _0: a}; +}; +var _elm_lang$navigation$Navigation$program = F2( + function (locationToMessage, stuff) { + var init = stuff.init( + _elm_lang$navigation$Native_Navigation.getLocation( + {ctor: '_Tuple0'})); + var subs = function (model) { + return _elm_lang$core$Platform_Sub$batch( + { + ctor: '::', + _0: _elm_lang$navigation$Navigation$subscription( + _elm_lang$navigation$Navigation$Monitor(locationToMessage)), + _1: { + ctor: '::', + _0: stuff.subscriptions(model), + _1: {ctor: '[]'} + } + }); + }; + return _elm_lang$html$Html$program( + {init: init, view: stuff.view, update: stuff.update, subscriptions: subs}); + }); +var _elm_lang$navigation$Navigation$programWithFlags = F2( + function (locationToMessage, stuff) { + var init = function (flags) { + return A2( + stuff.init, + flags, + _elm_lang$navigation$Native_Navigation.getLocation( + {ctor: '_Tuple0'})); + }; + var subs = function (model) { + return _elm_lang$core$Platform_Sub$batch( + { + ctor: '::', + _0: _elm_lang$navigation$Navigation$subscription( + _elm_lang$navigation$Navigation$Monitor(locationToMessage)), + _1: { + ctor: '::', + _0: stuff.subscriptions(model), + _1: {ctor: '[]'} + } + }); + }; + return _elm_lang$html$Html$programWithFlags( + {init: init, view: stuff.view, update: stuff.update, subscriptions: subs}); + }); +var _elm_lang$navigation$Navigation$subMap = F2( + function (func, _p12) { + var _p13 = _p12; + return _elm_lang$navigation$Navigation$Monitor( + function (_p14) { + return func( + _p13._0(_p14)); + }); + }); +_elm_lang$core$Native_Platform.effectManagers['Navigation'] = {pkg: 'elm-lang/navigation', init: _elm_lang$navigation$Navigation$init, onEffects: _elm_lang$navigation$Navigation$onEffects, onSelfMsg: _elm_lang$navigation$Navigation$onSelfMsg, tag: 'fx', cmdMap: _elm_lang$navigation$Navigation$cmdMap, subMap: _elm_lang$navigation$Navigation$subMap}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/graph.dat new file mode 100644 index 0000000..40e502f Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/navigation/2.0.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/Trampoline.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/Trampoline.elmi new file mode 100644 index 0000000..c44a864 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/Trampoline.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/Trampoline.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/Trampoline.elmo new file mode 100644 index 0000000..501f487 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/Trampoline.elmo @@ -0,0 +1,22 @@ +var _elm_lang$trampoline$Trampoline$evaluate = function (trampoline) { + evaluate: + while (true) { + var _p0 = trampoline; + if (_p0.ctor === 'Done') { + return _p0._0; + } else { + var _v1 = _p0._0( + {ctor: '_Tuple0'}); + trampoline = _v1; + continue evaluate; + } + } +}; +var _elm_lang$trampoline$Trampoline$Jump = function (a) { + return {ctor: 'Jump', _0: a}; +}; +var _elm_lang$trampoline$Trampoline$jump = _elm_lang$trampoline$Trampoline$Jump; +var _elm_lang$trampoline$Trampoline$Done = function (a) { + return {ctor: 'Done', _0: a}; +}; +var _elm_lang$trampoline$Trampoline$done = _elm_lang$trampoline$Trampoline$Done; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/graph.dat new file mode 100644 index 0000000..38fefaf Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/trampoline/1.0.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Debug.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Debug.elmi new file mode 100644 index 0000000..9943206 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Debug.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Debug.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Debug.elmo new file mode 100644 index 0000000..7cd3d0e --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Debug.elmo @@ -0,0 +1,622 @@ +var _elm_lang$virtual_dom$VirtualDom_Debug$styles = A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'style', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('\n\nhtml {\n overflow: hidden;\n height: 100%;\n}\n\nbody {\n height: 100%;\n overflow: auto;\n}\n\n#debugger {\n width: 100%\n height: 100%;\n font-family: monospace;\n}\n\n#values {\n display: block;\n float: left;\n height: 100%;\n width: calc(100% - 30ch);\n margin: 0;\n overflow: auto;\n cursor: default;\n}\n\n.debugger-sidebar {\n display: block;\n float: left;\n width: 30ch;\n height: 100%;\n color: white;\n background-color: rgb(61, 61, 61);\n}\n\n.debugger-sidebar-controls {\n width: 100%;\n text-align: center;\n background-color: rgb(50, 50, 50);\n}\n\n.debugger-sidebar-controls-import-export {\n width: 100%;\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n}\n\n.debugger-sidebar-controls-resume {\n width: 100%;\n height: 30px;\n line-height: 30px;\n cursor: pointer;\n}\n\n.debugger-sidebar-controls-resume:hover {\n background-color: rgb(41, 41, 41);\n}\n\n.debugger-sidebar-messages {\n width: 100%;\n overflow-y: auto;\n height: calc(100% - 24px);\n}\n\n.debugger-sidebar-messages-paused {\n width: 100%;\n overflow-y: auto;\n height: calc(100% - 54px);\n}\n\n.messages-entry {\n cursor: pointer;\n width: 100%;\n}\n\n.messages-entry:hover {\n background-color: rgb(41, 41, 41);\n}\n\n.messages-entry-selected, .messages-entry-selected:hover {\n background-color: rgb(10, 10, 10);\n}\n\n.messages-entry-content {\n width: calc(100% - 7ch);\n padding-top: 4px;\n padding-bottom: 4px;\n padding-left: 1ch;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n}\n\n.messages-entry-index {\n color: #666;\n width: 5ch;\n padding-top: 4px;\n padding-bottom: 4px;\n padding-right: 1ch;\n text-align: right;\n display: block;\n float: right;\n}\n\n'), + _1: {ctor: '[]'} + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$button = F2( + function (msg, label) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(msg), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$style( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'cursor', _1: 'pointer'}, + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(label), + _1: {ctor: '[]'} + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$getLatestModel = function (state) { + var _p0 = state; + if (_p0.ctor === 'Running') { + return _p0._0; + } else { + return _p0._2; + } +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$withGoodMetadata = F2( + function (model, func) { + var _p1 = model.metadata; + if (_p1.ctor === 'Ok') { + return func(_p1._0); + } else { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + { + overlay: _elm_lang$virtual_dom$VirtualDom_Overlay$badMetadata(_p1._0) + }), + {ctor: '[]'}); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$Model = F6( + function (a, b, c, d, e, f) { + return {history: a, state: b, expando: c, metadata: d, overlay: e, isDebuggerOpen: f}; + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$Paused = F3( + function (a, b, c) { + return {ctor: 'Paused', _0: a, _1: b, _2: c}; + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$Running = function (a) { + return {ctor: 'Running', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$loadNewHistory = F3( + function (rawHistory, userUpdate, model) { + var pureUserUpdate = F2( + function (msg, userModel) { + return _elm_lang$core$Tuple$first( + A2(userUpdate, msg, userModel)); + }); + var initialUserModel = _elm_lang$virtual_dom$VirtualDom_History$initialModel(model.history); + var decoder = A2(_elm_lang$virtual_dom$VirtualDom_History$decoder, initialUserModel, pureUserUpdate); + var _p2 = A2(_elm_lang$core$Json_Decode$decodeValue, decoder, rawHistory); + if (_p2.ctor === 'Err') { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + {overlay: _elm_lang$virtual_dom$VirtualDom_Overlay$corruptImport}), + {ctor: '[]'}); + } else { + var _p3 = _p2._0._0; + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + { + history: _p2._0._1, + state: _elm_lang$virtual_dom$VirtualDom_Debug$Running(_p3), + expando: _elm_lang$virtual_dom$VirtualDom_Expando$init(_p3), + overlay: _elm_lang$virtual_dom$VirtualDom_Overlay$none + }), + {ctor: '[]'}); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$OverlayMsg = function (a) { + return {ctor: 'OverlayMsg', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Upload = function (a) { + return {ctor: 'Upload', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$upload = A2(_elm_lang$core$Task$perform, _elm_lang$virtual_dom$VirtualDom_Debug$Upload, _elm_lang$virtual_dom$Native_Debug.upload); +var _elm_lang$virtual_dom$VirtualDom_Debug$Export = {ctor: 'Export'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Import = {ctor: 'Import'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Down = {ctor: 'Down'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Up = {ctor: 'Up'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Close = {ctor: 'Close'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Open = {ctor: 'Open'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Jump = function (a) { + return {ctor: 'Jump', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$Resume = {ctor: 'Resume'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$overlayConfig = {resume: _elm_lang$virtual_dom$VirtualDom_Debug$Resume, open: _elm_lang$virtual_dom$VirtualDom_Debug$Open, importHistory: _elm_lang$virtual_dom$VirtualDom_Debug$Import, exportHistory: _elm_lang$virtual_dom$VirtualDom_Debug$Export, wrap: _elm_lang$virtual_dom$VirtualDom_Debug$OverlayMsg}; +var _elm_lang$virtual_dom$VirtualDom_Debug$viewIn = function (_p4) { + var _p5 = _p4; + var isPaused = function () { + var _p6 = _p5.state; + if (_p6.ctor === 'Running') { + return false; + } else { + return true; + } + }(); + return A5( + _elm_lang$virtual_dom$VirtualDom_Overlay$view, + _elm_lang$virtual_dom$VirtualDom_Debug$overlayConfig, + isPaused, + _p5.isDebuggerOpen, + _elm_lang$virtual_dom$VirtualDom_History$size(_p5.history), + _p5.overlay); +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$resumeButton = A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Debug$Resume), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('debugger-sidebar-controls-resume'), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('Resume'), + _1: {ctor: '[]'} + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$viewResumeButton = function (maybeIndex) { + var _p7 = maybeIndex; + if (_p7.ctor === 'Nothing') { + return _elm_lang$virtual_dom$VirtualDom_Helpers$text(''); + } else { + return _elm_lang$virtual_dom$VirtualDom_Debug$resumeButton; + } +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$playButton = function (maybeIndex) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('debugger-sidebar-controls'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Debug$viewResumeButton(maybeIndex), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('debugger-sidebar-controls-import-export'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Debug$button, _elm_lang$virtual_dom$VirtualDom_Debug$Import, 'Import'), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' / '), + _1: { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Debug$button, _elm_lang$virtual_dom$VirtualDom_Debug$Export, 'Export'), + _1: {ctor: '[]'} + } + } + }), + _1: {ctor: '[]'} + } + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$viewSidebar = F2( + function (state, history) { + var maybeIndex = function () { + var _p8 = state; + if (_p8.ctor === 'Running') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just(_p8._0); + } + }(); + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('debugger-sidebar'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + _elm_lang$virtual_dom$VirtualDom_Debug$Jump, + A2(_elm_lang$virtual_dom$VirtualDom_History$view, maybeIndex, history)), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Debug$playButton(maybeIndex), + _1: {ctor: '[]'} + } + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$ExpandoMsg = function (a) { + return {ctor: 'ExpandoMsg', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$viewOut = function (_p9) { + var _p10 = _p9; + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$id('debugger'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Debug$styles, + _1: { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Debug$viewSidebar, _p10.state, _p10.history), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + _elm_lang$virtual_dom$VirtualDom_Debug$ExpandoMsg, + A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$id('values'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Expando$view, _elm_lang$core$Maybe$Nothing, _p10.expando), + _1: {ctor: '[]'} + })), + _1: {ctor: '[]'} + } + } + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$UserMsg = function (a) { + return {ctor: 'UserMsg', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Debug$wrapInit = F2( + function (metadata, _p11) { + var _p12 = _p11; + var _p13 = _p12._0; + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + { + history: _elm_lang$virtual_dom$VirtualDom_History$empty(_p13), + state: _elm_lang$virtual_dom$VirtualDom_Debug$Running(_p13), + expando: _elm_lang$virtual_dom$VirtualDom_Expando$init(_p13), + metadata: _elm_lang$virtual_dom$VirtualDom_Metadata$decode(metadata), + overlay: _elm_lang$virtual_dom$VirtualDom_Overlay$none, + isDebuggerOpen: false + }, + { + ctor: '::', + _0: A2(_elm_lang$core$Platform_Cmd$map, _elm_lang$virtual_dom$VirtualDom_Debug$UserMsg, _p12._1), + _1: {ctor: '[]'} + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$wrapSubs = F2( + function (userSubscriptions, _p14) { + var _p15 = _p14; + return A2( + _elm_lang$core$Platform_Sub$map, + _elm_lang$virtual_dom$VirtualDom_Debug$UserMsg, + userSubscriptions( + _elm_lang$virtual_dom$VirtualDom_Debug$getLatestModel(_p15.state))); + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$wrapView = F2( + function (userView, _p16) { + var _p17 = _p16; + var currentModel = function () { + var _p18 = _p17.state; + if (_p18.ctor === 'Running') { + return _p18._0; + } else { + return _p18._1; + } + }(); + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + _elm_lang$virtual_dom$VirtualDom_Debug$UserMsg, + userView(currentModel)); + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$NoOp = {ctor: 'NoOp'}; +var _elm_lang$virtual_dom$VirtualDom_Debug$download = F2( + function (metadata, history) { + var json = _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'metadata', + _1: _elm_lang$virtual_dom$VirtualDom_Metadata$encode(metadata) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'history', + _1: _elm_lang$virtual_dom$VirtualDom_History$encode(history) + }, + _1: {ctor: '[]'} + } + }); + var historyLength = _elm_lang$virtual_dom$VirtualDom_History$size(history); + return A2( + _elm_lang$core$Task$perform, + function (_p19) { + return _elm_lang$virtual_dom$VirtualDom_Debug$NoOp; + }, + A2(_elm_lang$virtual_dom$Native_Debug.download, historyLength, json)); + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$runIf = F2( + function (bool, task) { + return bool ? A2( + _elm_lang$core$Task$perform, + _elm_lang$core$Basics$always(_elm_lang$virtual_dom$VirtualDom_Debug$NoOp), + task) : _elm_lang$core$Platform_Cmd$none; + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$updateUserMsg = F4( + function (userUpdate, scrollTask, userMsg, _p20) { + var _p21 = _p20; + var _p25 = _p21.state; + var _p24 = _p21; + var userModel = _elm_lang$virtual_dom$VirtualDom_Debug$getLatestModel(_p25); + var newHistory = A3(_elm_lang$virtual_dom$VirtualDom_History$add, userMsg, userModel, _p21.history); + var _p22 = A2(userUpdate, userMsg, userModel); + var newUserModel = _p22._0; + var userCmds = _p22._1; + var commands = A2(_elm_lang$core$Platform_Cmd$map, _elm_lang$virtual_dom$VirtualDom_Debug$UserMsg, userCmds); + var _p23 = _p25; + if (_p23.ctor === 'Running') { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + _p24, + { + history: newHistory, + state: _elm_lang$virtual_dom$VirtualDom_Debug$Running(newUserModel), + expando: A2(_elm_lang$virtual_dom$VirtualDom_Expando$merge, newUserModel, _p21.expando) + }), + { + ctor: '::', + _0: commands, + _1: { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Debug$runIf, _p24.isDebuggerOpen, scrollTask), + _1: {ctor: '[]'} + } + }); + } else { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + _p24, + { + history: newHistory, + state: A3(_elm_lang$virtual_dom$VirtualDom_Debug$Paused, _p23._0, _p23._1, newUserModel) + }), + { + ctor: '::', + _0: commands, + _1: {ctor: '[]'} + }); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$wrapUpdate = F4( + function (userUpdate, scrollTask, msg, model) { + wrapUpdate: + while (true) { + var _p26 = msg; + switch (_p26.ctor) { + case 'NoOp': + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + model, + {ctor: '[]'}); + case 'UserMsg': + return A4(_elm_lang$virtual_dom$VirtualDom_Debug$updateUserMsg, userUpdate, scrollTask, _p26._0, model); + case 'ExpandoMsg': + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + { + expando: A2(_elm_lang$virtual_dom$VirtualDom_Expando$update, _p26._0, model.expando) + }), + {ctor: '[]'}); + case 'Resume': + var _p27 = model.state; + if (_p27.ctor === 'Running') { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + model, + {ctor: '[]'}); + } else { + var _p28 = _p27._2; + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + { + state: _elm_lang$virtual_dom$VirtualDom_Debug$Running(_p28), + expando: A2(_elm_lang$virtual_dom$VirtualDom_Expando$merge, _p28, model.expando) + }), + { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Debug$runIf, model.isDebuggerOpen, scrollTask), + _1: {ctor: '[]'} + }); + } + case 'Jump': + var _p30 = _p26._0; + var _p29 = A3(_elm_lang$virtual_dom$VirtualDom_History$get, userUpdate, _p30, model.history); + var indexModel = _p29._0; + var indexMsg = _p29._1; + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + { + state: A3( + _elm_lang$virtual_dom$VirtualDom_Debug$Paused, + _p30, + indexModel, + _elm_lang$virtual_dom$VirtualDom_Debug$getLatestModel(model.state)), + expando: A2(_elm_lang$virtual_dom$VirtualDom_Expando$merge, indexModel, model.expando) + }), + {ctor: '[]'}); + case 'Open': + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + {isDebuggerOpen: true}), + {ctor: '[]'}); + case 'Close': + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + {isDebuggerOpen: false}), + {ctor: '[]'}); + case 'Up': + var index = function () { + var _p31 = model.state; + if (_p31.ctor === 'Paused') { + return _p31._0; + } else { + return _elm_lang$virtual_dom$VirtualDom_History$size(model.history); + } + }(); + if (_elm_lang$core$Native_Utils.cmp(index, 0) > 0) { + var _v17 = userUpdate, + _v18 = scrollTask, + _v19 = _elm_lang$virtual_dom$VirtualDom_Debug$Jump(index - 1), + _v20 = model; + userUpdate = _v17; + scrollTask = _v18; + msg = _v19; + model = _v20; + continue wrapUpdate; + } else { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + model, + {ctor: '[]'}); + } + case 'Down': + var _p32 = model.state; + if (_p32.ctor === 'Running') { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + model, + {ctor: '[]'}); + } else { + var _p33 = _p32._0; + if (_elm_lang$core$Native_Utils.eq( + _p33, + _elm_lang$virtual_dom$VirtualDom_History$size(model.history) - 1)) { + var _v22 = userUpdate, + _v23 = scrollTask, + _v24 = _elm_lang$virtual_dom$VirtualDom_Debug$Resume, + _v25 = model; + userUpdate = _v22; + scrollTask = _v23; + msg = _v24; + model = _v25; + continue wrapUpdate; + } else { + var _v26 = userUpdate, + _v27 = scrollTask, + _v28 = _elm_lang$virtual_dom$VirtualDom_Debug$Jump(_p33 + 1), + _v29 = model; + userUpdate = _v26; + scrollTask = _v27; + msg = _v28; + model = _v29; + continue wrapUpdate; + } + } + case 'Import': + return A2( + _elm_lang$virtual_dom$VirtualDom_Debug$withGoodMetadata, + model, + function (_p34) { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + model, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Debug$upload, + _1: {ctor: '[]'} + }); + }); + case 'Export': + return A2( + _elm_lang$virtual_dom$VirtualDom_Debug$withGoodMetadata, + model, + function (metadata) { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + model, + { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Debug$download, metadata, model.history), + _1: {ctor: '[]'} + }); + }); + case 'Upload': + return A2( + _elm_lang$virtual_dom$VirtualDom_Debug$withGoodMetadata, + model, + function (metadata) { + var _p35 = A2(_elm_lang$virtual_dom$VirtualDom_Overlay$assessImport, metadata, _p26._0); + if (_p35.ctor === 'Err') { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + {overlay: _p35._0}), + {ctor: '[]'}); + } else { + return A3(_elm_lang$virtual_dom$VirtualDom_Debug$loadNewHistory, _p35._0, userUpdate, model); + } + }); + default: + var _p36 = A2(_elm_lang$virtual_dom$VirtualDom_Overlay$close, _p26._0, model.overlay); + if (_p36.ctor === 'Nothing') { + return A2( + _elm_lang$core$Platform_Cmd_ops['!'], + _elm_lang$core$Native_Utils.update( + model, + {overlay: _elm_lang$virtual_dom$VirtualDom_Overlay$none}), + {ctor: '[]'}); + } else { + return A3(_elm_lang$virtual_dom$VirtualDom_Debug$loadNewHistory, _p36._0, userUpdate, model); + } + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$wrap = F2( + function (metadata, _p37) { + var _p38 = _p37; + return { + init: A2(_elm_lang$virtual_dom$VirtualDom_Debug$wrapInit, metadata, _p38.init), + view: _elm_lang$virtual_dom$VirtualDom_Debug$wrapView(_p38.view), + update: _elm_lang$virtual_dom$VirtualDom_Debug$wrapUpdate(_p38.update), + viewIn: _elm_lang$virtual_dom$VirtualDom_Debug$viewIn, + viewOut: _elm_lang$virtual_dom$VirtualDom_Debug$viewOut, + subscriptions: _elm_lang$virtual_dom$VirtualDom_Debug$wrapSubs(_p38.subscriptions) + }; + }); +var _elm_lang$virtual_dom$VirtualDom_Debug$wrapWithFlags = F2( + function (metadata, _p39) { + var _p40 = _p39; + return { + init: function (flags) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Debug$wrapInit, + metadata, + _p40.init(flags)); + }, + view: _elm_lang$virtual_dom$VirtualDom_Debug$wrapView(_p40.view), + update: _elm_lang$virtual_dom$VirtualDom_Debug$wrapUpdate(_p40.update), + viewIn: _elm_lang$virtual_dom$VirtualDom_Debug$viewIn, + viewOut: _elm_lang$virtual_dom$VirtualDom_Debug$viewOut, + subscriptions: _elm_lang$virtual_dom$VirtualDom_Debug$wrapSubs(_p40.subscriptions) + }; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Expando.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Expando.elmi new file mode 100644 index 0000000..5631661 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Expando.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Expando.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Expando.elmo new file mode 100644 index 0000000..514f0ba --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Expando.elmo @@ -0,0 +1,1353 @@ +var _elm_lang$virtual_dom$VirtualDom_Expando$purple = _elm_lang$virtual_dom$VirtualDom_Helpers$style( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'color', _1: 'rgb(136, 19, 145)'}, + _1: {ctor: '[]'} + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$blue = _elm_lang$virtual_dom$VirtualDom_Helpers$style( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'color', _1: 'rgb(28, 0, 207)'}, + _1: {ctor: '[]'} + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$red = _elm_lang$virtual_dom$VirtualDom_Helpers$style( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'color', _1: 'rgb(196, 26, 22)'}, + _1: {ctor: '[]'} + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$leftPad = function (maybeKey) { + var _p0 = maybeKey; + if (_p0.ctor === 'Nothing') { + return _elm_lang$virtual_dom$VirtualDom_Helpers$style( + {ctor: '[]'}); + } else { + return _elm_lang$virtual_dom$VirtualDom_Helpers$style( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'padding-left', _1: '4ch'}, + _1: {ctor: '[]'} + }); + } +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$makeArrow = function (arrow) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$style( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'color', _1: '#777'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'padding-left', _1: '2ch'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'width', _1: '2ch'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'display', _1: 'inline-block'}, + _1: {ctor: '[]'} + } + } + } + }), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(arrow), + _1: {ctor: '[]'} + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$lineStarter = F3( + function (maybeKey, maybeIsClosed, description) { + var arrow = function () { + var _p1 = maybeIsClosed; + if (_p1.ctor === 'Nothing') { + return _elm_lang$virtual_dom$VirtualDom_Expando$makeArrow(''); + } else { + if (_p1._0 === true) { + return _elm_lang$virtual_dom$VirtualDom_Expando$makeArrow('▸'); + } else { + return _elm_lang$virtual_dom$VirtualDom_Expando$makeArrow('▾'); + } + } + }(); + var _p2 = maybeKey; + if (_p2.ctor === 'Nothing') { + return {ctor: '::', _0: arrow, _1: description}; + } else { + return { + ctor: '::', + _0: arrow, + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$purple, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p2._0), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' = '), + _1: description + } + } + }; + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewExtraTinyRecord = F3( + function (length, starter, entries) { + var _p3 = entries; + if (_p3.ctor === '[]') { + return { + ctor: '_Tuple2', + _0: length + 1, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('}'), + _1: {ctor: '[]'} + } + }; + } else { + var _p5 = _p3._0; + var nextLength = (length + _elm_lang$core$String$length(_p5)) + 1; + if (_elm_lang$core$Native_Utils.cmp(nextLength, 18) > 0) { + return { + ctor: '_Tuple2', + _0: length + 2, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('…}'), + _1: {ctor: '[]'} + } + }; + } else { + var _p4 = A3(_elm_lang$virtual_dom$VirtualDom_Expando$viewExtraTinyRecord, nextLength, ',', _p3._1); + var finalLength = _p4._0; + var otherNodes = _p4._1; + return { + ctor: '_Tuple2', + _0: finalLength, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(starter), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$purple, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p5), + _1: {ctor: '[]'} + }), + _1: otherNodes + } + } + }; + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$elideMiddle = function (str) { + return (_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$String$length(str), + 18) < 1) ? str : A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$String$left, 8, str), + A2( + _elm_lang$core$Basics_ops['++'], + '...', + A2(_elm_lang$core$String$right, 8, str))); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyHelp = function (str) { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$String$length(str), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(str), + _1: {ctor: '[]'} + } + }; +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$updateIndex = F3( + function (n, func, list) { + var _p6 = list; + if (_p6.ctor === '[]') { + return {ctor: '[]'}; + } else { + var _p8 = _p6._1; + var _p7 = _p6._0; + return (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) ? { + ctor: '::', + _0: func(_p7), + _1: _p8 + } : { + ctor: '::', + _0: _p7, + _1: A3(_elm_lang$virtual_dom$VirtualDom_Expando$updateIndex, n - 1, func, _p8) + }; + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$seqTypeToString = F2( + function (n, seqType) { + var _p9 = seqType; + switch (_p9.ctor) { + case 'ListSeq': + return A2( + _elm_lang$core$Basics_ops['++'], + 'List(', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(n), + ')')); + case 'SetSeq': + return A2( + _elm_lang$core$Basics_ops['++'], + 'Set(', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(n), + ')')); + default: + return A2( + _elm_lang$core$Basics_ops['++'], + 'Array(', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(n), + ')')); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewTiny = function (value) { + var _p10 = value; + switch (_p10.ctor) { + case 'S': + var str = _elm_lang$virtual_dom$VirtualDom_Expando$elideMiddle(_p10._0); + return { + ctor: '_Tuple2', + _0: _elm_lang$core$String$length(str), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$red, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(str), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }; + case 'Primitive': + var _p11 = _p10._0; + return { + ctor: '_Tuple2', + _0: _elm_lang$core$String$length(_p11), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$blue, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p11), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }; + case 'Sequence': + return _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyHelp( + A2( + _elm_lang$virtual_dom$VirtualDom_Expando$seqTypeToString, + _elm_lang$core$List$length(_p10._2), + _p10._0)); + case 'Dictionary': + return _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyHelp( + A2( + _elm_lang$core$Basics_ops['++'], + 'Dict(', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString( + _elm_lang$core$List$length(_p10._1)), + ')'))); + case 'Record': + return _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyRecord(_p10._1); + default: + if (_p10._2.ctor === '[]') { + return _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyHelp( + A2(_elm_lang$core$Maybe$withDefault, 'Unit', _p10._0)); + } else { + return _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyHelp( + function () { + var _p12 = _p10._0; + if (_p12.ctor === 'Nothing') { + return A2( + _elm_lang$core$Basics_ops['++'], + 'Tuple(', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString( + _elm_lang$core$List$length(_p10._2)), + ')')); + } else { + return A2(_elm_lang$core$Basics_ops['++'], _p12._0, ' …'); + } + }()); + } + } +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyRecord = function (record) { + return _elm_lang$core$Dict$isEmpty(record) ? { + ctor: '_Tuple2', + _0: 2, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('{}'), + _1: {ctor: '[]'} + } + } : A3( + _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyRecordHelp, + 0, + '{ ', + _elm_lang$core$Dict$toList(record)); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyRecordHelp = F3( + function (length, starter, entries) { + var _p13 = entries; + if (_p13.ctor === '[]') { + return { + ctor: '_Tuple2', + _0: length + 2, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' }'), + _1: {ctor: '[]'} + } + }; + } else { + var _p16 = _p13._0._0; + var _p14 = _elm_lang$virtual_dom$VirtualDom_Expando$viewExtraTiny(_p13._0._1); + var valueLen = _p14._0; + var valueNodes = _p14._1; + var fieldLen = _elm_lang$core$String$length(_p16); + var newLength = ((length + fieldLen) + valueLen) + 5; + if (_elm_lang$core$Native_Utils.cmp(newLength, 60) > 0) { + return { + ctor: '_Tuple2', + _0: length + 4, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(', … }'), + _1: {ctor: '[]'} + } + }; + } else { + var _p15 = A3(_elm_lang$virtual_dom$VirtualDom_Expando$viewTinyRecordHelp, newLength, ', ', _p13._1); + var finalLength = _p15._0; + var otherNodes = _p15._1; + return { + ctor: '_Tuple2', + _0: finalLength, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(starter), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$purple, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p16), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' = '), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + {ctor: '[]'}, + valueNodes), + _1: otherNodes + } + } + } + } + }; + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewExtraTiny = function (value) { + var _p17 = value; + if (_p17.ctor === 'Record') { + return A3( + _elm_lang$virtual_dom$VirtualDom_Expando$viewExtraTinyRecord, + 0, + '{', + _elm_lang$core$Dict$keys(_p17._1)); + } else { + return _elm_lang$virtual_dom$VirtualDom_Expando$viewTiny(value); + } +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$Constructor = F3( + function (a, b, c) { + return {ctor: 'Constructor', _0: a, _1: b, _2: c}; + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$Record = F2( + function (a, b) { + return {ctor: 'Record', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$Dictionary = F2( + function (a, b) { + return {ctor: 'Dictionary', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$Sequence = F3( + function (a, b, c) { + return {ctor: 'Sequence', _0: a, _1: b, _2: c}; + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$initHelp = F2( + function (isOuter, expando) { + var _p18 = expando; + switch (_p18.ctor) { + case 'S': + return expando; + case 'Primitive': + return expando; + case 'Sequence': + var _p20 = _p18._0; + var _p19 = _p18._2; + return isOuter ? A3( + _elm_lang$virtual_dom$VirtualDom_Expando$Sequence, + _p20, + false, + A2( + _elm_lang$core$List$map, + _elm_lang$virtual_dom$VirtualDom_Expando$initHelp(false), + _p19)) : ((_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$List$length(_p19), + 8) < 1) ? A3(_elm_lang$virtual_dom$VirtualDom_Expando$Sequence, _p20, false, _p19) : expando); + case 'Dictionary': + var _p23 = _p18._1; + return isOuter ? A2( + _elm_lang$virtual_dom$VirtualDom_Expando$Dictionary, + false, + A2( + _elm_lang$core$List$map, + function (_p21) { + var _p22 = _p21; + return { + ctor: '_Tuple2', + _0: _p22._0, + _1: A2(_elm_lang$virtual_dom$VirtualDom_Expando$initHelp, false, _p22._1) + }; + }, + _p23)) : ((_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$List$length(_p23), + 8) < 1) ? A2(_elm_lang$virtual_dom$VirtualDom_Expando$Dictionary, false, _p23) : expando); + case 'Record': + var _p25 = _p18._1; + return isOuter ? A2( + _elm_lang$virtual_dom$VirtualDom_Expando$Record, + false, + A2( + _elm_lang$core$Dict$map, + F2( + function (_p24, v) { + return A2(_elm_lang$virtual_dom$VirtualDom_Expando$initHelp, false, v); + }), + _p25)) : ((_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$Dict$size(_p25), + 4) < 1) ? A2(_elm_lang$virtual_dom$VirtualDom_Expando$Record, false, _p25) : expando); + default: + var _p27 = _p18._0; + var _p26 = _p18._2; + return isOuter ? A3( + _elm_lang$virtual_dom$VirtualDom_Expando$Constructor, + _p27, + false, + A2( + _elm_lang$core$List$map, + _elm_lang$virtual_dom$VirtualDom_Expando$initHelp(false), + _p26)) : ((_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$List$length(_p26), + 4) < 1) ? A3(_elm_lang$virtual_dom$VirtualDom_Expando$Constructor, _p27, false, _p26) : expando); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$init = function (value) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Expando$initHelp, + true, + _elm_lang$virtual_dom$Native_Debug.init(value)); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$mergeHelp = F2( + function (old, $new) { + var _p28 = {ctor: '_Tuple2', _0: old, _1: $new}; + _v12_6: + do { + if (_p28.ctor === '_Tuple2') { + switch (_p28._1.ctor) { + case 'S': + return $new; + case 'Primitive': + return $new; + case 'Sequence': + if (_p28._0.ctor === 'Sequence') { + return A3( + _elm_lang$virtual_dom$VirtualDom_Expando$Sequence, + _p28._1._0, + _p28._0._1, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$mergeListHelp, _p28._0._2, _p28._1._2)); + } else { + break _v12_6; + } + case 'Dictionary': + if (_p28._0.ctor === 'Dictionary') { + return A2(_elm_lang$virtual_dom$VirtualDom_Expando$Dictionary, _p28._0._0, _p28._1._1); + } else { + break _v12_6; + } + case 'Record': + if (_p28._0.ctor === 'Record') { + return A2( + _elm_lang$virtual_dom$VirtualDom_Expando$Record, + _p28._0._0, + A2( + _elm_lang$core$Dict$map, + _elm_lang$virtual_dom$VirtualDom_Expando$mergeDictHelp(_p28._0._1), + _p28._1._1)); + } else { + break _v12_6; + } + default: + if (_p28._0.ctor === 'Constructor') { + return A3( + _elm_lang$virtual_dom$VirtualDom_Expando$Constructor, + _p28._1._0, + _p28._0._1, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$mergeListHelp, _p28._0._2, _p28._1._2)); + } else { + break _v12_6; + } + } + } else { + break _v12_6; + } + } while(false); + return $new; + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$mergeDictHelp = F3( + function (oldDict, key, value) { + var _p29 = A2(_elm_lang$core$Dict$get, key, oldDict); + if (_p29.ctor === 'Nothing') { + return value; + } else { + return A2(_elm_lang$virtual_dom$VirtualDom_Expando$mergeHelp, _p29._0, value); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$mergeListHelp = F2( + function (olds, news) { + var _p30 = {ctor: '_Tuple2', _0: olds, _1: news}; + if (_p30._0.ctor === '[]') { + return news; + } else { + if (_p30._1.ctor === '[]') { + return news; + } else { + return { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Expando$mergeHelp, _p30._0._0, _p30._1._0), + _1: A2(_elm_lang$virtual_dom$VirtualDom_Expando$mergeListHelp, _p30._0._1, _p30._1._1) + }; + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$merge = F2( + function (value, expando) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Expando$mergeHelp, + expando, + _elm_lang$virtual_dom$Native_Debug.init(value)); + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$update = F2( + function (msg, value) { + var _p31 = value; + switch (_p31.ctor) { + case 'S': + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 168, column: 3}, + end: {line: 235, column: 50} + }, + _p31)('No messages for primitives'); + case 'Primitive': + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 168, column: 3}, + end: {line: 235, column: 50} + }, + _p31)('No messages for primitives'); + case 'Sequence': + var _p39 = _p31._2; + var _p38 = _p31._0; + var _p37 = _p31._1; + var _p34 = msg; + switch (_p34.ctor) { + case 'Toggle': + return A3(_elm_lang$virtual_dom$VirtualDom_Expando$Sequence, _p38, !_p37, _p39); + case 'Index': + if (_p34._0.ctor === 'None') { + return A3( + _elm_lang$virtual_dom$VirtualDom_Expando$Sequence, + _p38, + _p37, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$updateIndex, + _p34._1, + _elm_lang$virtual_dom$VirtualDom_Expando$update(_p34._2), + _p39)); + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 176, column: 7}, + end: {line: 188, column: 46} + }, + _p34)('No redirected indexes on sequences'); + } + default: + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 176, column: 7}, + end: {line: 188, column: 46} + }, + _p34)('No field on sequences'); + } + case 'Dictionary': + var _p51 = _p31._1; + var _p50 = _p31._0; + var _p40 = msg; + switch (_p40.ctor) { + case 'Toggle': + return A2(_elm_lang$virtual_dom$VirtualDom_Expando$Dictionary, !_p50, _p51); + case 'Index': + var _p48 = _p40._2; + var _p47 = _p40._1; + var _p41 = _p40._0; + switch (_p41.ctor) { + case 'None': + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 196, column: 11}, + end: {line: 206, column: 81} + }, + _p41)('must have redirect for dictionaries'); + case 'Key': + return A2( + _elm_lang$virtual_dom$VirtualDom_Expando$Dictionary, + _p50, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$updateIndex, + _p47, + function (_p43) { + var _p44 = _p43; + return { + ctor: '_Tuple2', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Expando$update, _p48, _p44._0), + _1: _p44._1 + }; + }, + _p51)); + default: + return A2( + _elm_lang$virtual_dom$VirtualDom_Expando$Dictionary, + _p50, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$updateIndex, + _p47, + function (_p45) { + var _p46 = _p45; + return { + ctor: '_Tuple2', + _0: _p46._0, + _1: A2(_elm_lang$virtual_dom$VirtualDom_Expando$update, _p48, _p46._1) + }; + }, + _p51)); + } + default: + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 191, column: 7}, + end: {line: 209, column: 50} + }, + _p40)('no field for dictionaries'); + } + case 'Record': + var _p55 = _p31._1; + var _p54 = _p31._0; + var _p52 = msg; + switch (_p52.ctor) { + case 'Toggle': + return A2(_elm_lang$virtual_dom$VirtualDom_Expando$Record, !_p54, _p55); + case 'Index': + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 212, column: 7}, + end: {line: 220, column: 77} + }, + _p52)('No index for records'); + default: + return A2( + _elm_lang$virtual_dom$VirtualDom_Expando$Record, + _p54, + A3( + _elm_lang$core$Dict$update, + _p52._0, + _elm_lang$virtual_dom$VirtualDom_Expando$updateField(_p52._1), + _p55)); + } + default: + var _p61 = _p31._2; + var _p60 = _p31._0; + var _p59 = _p31._1; + var _p56 = msg; + switch (_p56.ctor) { + case 'Toggle': + return A3(_elm_lang$virtual_dom$VirtualDom_Expando$Constructor, _p60, !_p59, _p61); + case 'Index': + if (_p56._0.ctor === 'None') { + return A3( + _elm_lang$virtual_dom$VirtualDom_Expando$Constructor, + _p60, + _p59, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$updateIndex, + _p56._1, + _elm_lang$virtual_dom$VirtualDom_Expando$update(_p56._2), + _p61)); + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 223, column: 7}, + end: {line: 235, column: 50} + }, + _p56)('No redirected indexes on sequences'); + } + default: + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 223, column: 7}, + end: {line: 235, column: 50} + }, + _p56)('No field for constructors'); + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$updateField = F2( + function (msg, maybeExpando) { + var _p62 = maybeExpando; + if (_p62.ctor === 'Nothing') { + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Expando', + { + start: {line: 253, column: 3}, + end: {line: 258, column: 32} + }, + _p62)('key does not exist'); + } else { + return _elm_lang$core$Maybe$Just( + A2(_elm_lang$virtual_dom$VirtualDom_Expando$update, msg, _p62._0)); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$Primitive = function (a) { + return {ctor: 'Primitive', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$S = function (a) { + return {ctor: 'S', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$ArraySeq = {ctor: 'ArraySeq'}; +var _elm_lang$virtual_dom$VirtualDom_Expando$SetSeq = {ctor: 'SetSeq'}; +var _elm_lang$virtual_dom$VirtualDom_Expando$ListSeq = {ctor: 'ListSeq'}; +var _elm_lang$virtual_dom$VirtualDom_Expando$Field = F2( + function (a, b) { + return {ctor: 'Field', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$Index = F3( + function (a, b, c) { + return {ctor: 'Index', _0: a, _1: b, _2: c}; + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$Toggle = {ctor: 'Toggle'}; +var _elm_lang$virtual_dom$VirtualDom_Expando$Value = {ctor: 'Value'}; +var _elm_lang$virtual_dom$VirtualDom_Expando$Key = {ctor: 'Key'}; +var _elm_lang$virtual_dom$VirtualDom_Expando$None = {ctor: 'None'}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewConstructorEntry = F2( + function (index, value) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$None, index), + A2( + _elm_lang$virtual_dom$VirtualDom_Expando$view, + _elm_lang$core$Maybe$Just( + _elm_lang$core$Basics$toString(index)), + value)); + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$view = F2( + function (maybeKey, expando) { + var _p64 = expando; + switch (_p64.ctor) { + case 'S': + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$leftPad(maybeKey), + _1: {ctor: '[]'} + }, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$lineStarter, + maybeKey, + _elm_lang$core$Maybe$Nothing, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$red, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p64._0), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + })); + case 'Primitive': + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$leftPad(maybeKey), + _1: {ctor: '[]'} + }, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$lineStarter, + maybeKey, + _elm_lang$core$Maybe$Nothing, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$blue, + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p64._0), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + })); + case 'Sequence': + return A4(_elm_lang$virtual_dom$VirtualDom_Expando$viewSequence, maybeKey, _p64._0, _p64._1, _p64._2); + case 'Dictionary': + return A3(_elm_lang$virtual_dom$VirtualDom_Expando$viewDictionary, maybeKey, _p64._0, _p64._1); + case 'Record': + return A3(_elm_lang$virtual_dom$VirtualDom_Expando$viewRecord, maybeKey, _p64._0, _p64._1); + default: + return A4(_elm_lang$virtual_dom$VirtualDom_Expando$viewConstructor, maybeKey, _p64._0, _p64._1, _p64._2); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewConstructor = F4( + function (maybeKey, maybeName, isClosed, valueList) { + var _p65 = function () { + var _p66 = valueList; + if (_p66.ctor === '[]') { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Nothing, + _1: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) + }; + } else { + if (_p66._1.ctor === '[]') { + var _p67 = _p66._0; + switch (_p67.ctor) { + case 'S': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Nothing, + _1: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) + }; + case 'Primitive': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Nothing, + _1: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) + }; + case 'Sequence': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Just(isClosed), + _1: isClosed ? A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) : A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$None, 0), + _elm_lang$virtual_dom$VirtualDom_Expando$viewSequenceOpen(_p67._2)) + }; + case 'Dictionary': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Just(isClosed), + _1: isClosed ? A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) : A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$None, 0), + _elm_lang$virtual_dom$VirtualDom_Expando$viewDictionaryOpen(_p67._1)) + }; + case 'Record': + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Just(isClosed), + _1: isClosed ? A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) : A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$None, 0), + _elm_lang$virtual_dom$VirtualDom_Expando$viewRecordOpen(_p67._1)) + }; + default: + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Just(isClosed), + _1: isClosed ? A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) : A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$None, 0), + _elm_lang$virtual_dom$VirtualDom_Expando$viewConstructorOpen(_p67._2)) + }; + } + } else { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Just(isClosed), + _1: isClosed ? A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + {ctor: '[]'}) : _elm_lang$virtual_dom$VirtualDom_Expando$viewConstructorOpen(valueList) + }; + } + } + }(); + var maybeIsClosed = _p65._0; + var openHtml = _p65._1; + var tinyArgs = A2( + _elm_lang$core$List$map, + function (_p68) { + return _elm_lang$core$Tuple$second( + _elm_lang$virtual_dom$VirtualDom_Expando$viewExtraTiny(_p68)); + }, + valueList); + var description = function () { + var _p69 = {ctor: '_Tuple2', _0: maybeName, _1: tinyArgs}; + if (_p69._0.ctor === 'Nothing') { + if (_p69._1.ctor === '[]') { + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('()'), + _1: {ctor: '[]'} + }; + } else { + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('( '), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + {ctor: '[]'}, + _p69._1._0), + _1: A3( + _elm_lang$core$List$foldr, + F2( + function (args, rest) { + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(', '), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + {ctor: '[]'}, + args), + _1: rest + } + }; + }), + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' )'), + _1: {ctor: '[]'} + }, + _p69._1._1) + } + }; + } + } else { + if (_p69._1.ctor === '[]') { + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p69._0._0), + _1: {ctor: '[]'} + }; + } else { + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + A2(_elm_lang$core$Basics_ops['++'], _p69._0._0, ' ')), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + {ctor: '[]'}, + _p69._1._0), + _1: A3( + _elm_lang$core$List$foldr, + F2( + function (args, rest) { + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' '), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + {ctor: '[]'}, + args), + _1: rest + } + }; + }), + {ctor: '[]'}, + _p69._1._1) + } + }; + } + } + }(); + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$leftPad(maybeKey), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Expando$Toggle), + _1: {ctor: '[]'} + }, + A3(_elm_lang$virtual_dom$VirtualDom_Expando$lineStarter, maybeKey, maybeIsClosed, description)), + _1: { + ctor: '::', + _0: openHtml, + _1: {ctor: '[]'} + } + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewConstructorOpen = function (valueList) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + A2(_elm_lang$core$List$indexedMap, _elm_lang$virtual_dom$VirtualDom_Expando$viewConstructorEntry, valueList)); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewDictionaryOpen = function (keyValuePairs) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + A2(_elm_lang$core$List$indexedMap, _elm_lang$virtual_dom$VirtualDom_Expando$viewDictionaryEntry, keyValuePairs)); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewDictionaryEntry = F2( + function (index, _p70) { + var _p71 = _p70; + var _p74 = _p71._1; + var _p73 = _p71._0; + var _p72 = _p73; + switch (_p72.ctor) { + case 'S': + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$Value, index), + A2( + _elm_lang$virtual_dom$VirtualDom_Expando$view, + _elm_lang$core$Maybe$Just(_p72._0), + _p74)); + case 'Primitive': + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$Value, index), + A2( + _elm_lang$virtual_dom$VirtualDom_Expando$view, + _elm_lang$core$Maybe$Just(_p72._0), + _p74)); + default: + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$Key, index), + A2( + _elm_lang$virtual_dom$VirtualDom_Expando$view, + _elm_lang$core$Maybe$Just('key'), + _p73)), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + A2(_elm_lang$virtual_dom$VirtualDom_Expando$Index, _elm_lang$virtual_dom$VirtualDom_Expando$Value, index), + A2( + _elm_lang$virtual_dom$VirtualDom_Expando$view, + _elm_lang$core$Maybe$Just('value'), + _p74)), + _1: {ctor: '[]'} + } + }); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewRecordOpen = function (record) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + A2( + _elm_lang$core$List$map, + _elm_lang$virtual_dom$VirtualDom_Expando$viewRecordEntry, + _elm_lang$core$Dict$toList(record))); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewRecordEntry = function (_p75) { + var _p76 = _p75; + var _p77 = _p76._0; + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + _elm_lang$virtual_dom$VirtualDom_Expando$Field(_p77), + A2( + _elm_lang$virtual_dom$VirtualDom_Expando$view, + _elm_lang$core$Maybe$Just(_p77), + _p76._1)); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewSequenceOpen = function (values) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + A2(_elm_lang$core$List$indexedMap, _elm_lang$virtual_dom$VirtualDom_Expando$viewConstructorEntry, values)); +}; +var _elm_lang$virtual_dom$VirtualDom_Expando$viewDictionary = F3( + function (maybeKey, isClosed, keyValuePairs) { + var starter = A2( + _elm_lang$core$Basics_ops['++'], + 'Dict(', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString( + _elm_lang$core$List$length(keyValuePairs)), + ')')); + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$leftPad(maybeKey), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Expando$Toggle), + _1: {ctor: '[]'} + }, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$lineStarter, + maybeKey, + _elm_lang$core$Maybe$Just(isClosed), + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(starter), + _1: {ctor: '[]'} + })), + _1: { + ctor: '::', + _0: isClosed ? _elm_lang$virtual_dom$VirtualDom_Helpers$text('') : _elm_lang$virtual_dom$VirtualDom_Expando$viewDictionaryOpen(keyValuePairs), + _1: {ctor: '[]'} + } + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewRecord = F3( + function (maybeKey, isClosed, record) { + var _p78 = isClosed ? { + ctor: '_Tuple3', + _0: _elm_lang$core$Tuple$second( + _elm_lang$virtual_dom$VirtualDom_Expando$viewTinyRecord(record)), + _1: _elm_lang$virtual_dom$VirtualDom_Helpers$text(''), + _2: _elm_lang$virtual_dom$VirtualDom_Helpers$text('') + } : { + ctor: '_Tuple3', + _0: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('{'), + _1: {ctor: '[]'} + }, + _1: _elm_lang$virtual_dom$VirtualDom_Expando$viewRecordOpen(record), + _2: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$leftPad( + _elm_lang$core$Maybe$Just( + {ctor: '_Tuple0'})), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('}'), + _1: {ctor: '[]'} + }) + }; + var start = _p78._0; + var middle = _p78._1; + var end = _p78._2; + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$leftPad(maybeKey), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Expando$Toggle), + _1: {ctor: '[]'} + }, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$lineStarter, + maybeKey, + _elm_lang$core$Maybe$Just(isClosed), + start)), + _1: { + ctor: '::', + _0: middle, + _1: { + ctor: '::', + _0: end, + _1: {ctor: '[]'} + } + } + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Expando$viewSequence = F4( + function (maybeKey, seqType, isClosed, valueList) { + var starter = A2( + _elm_lang$virtual_dom$VirtualDom_Expando$seqTypeToString, + _elm_lang$core$List$length(valueList), + seqType); + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Expando$leftPad(maybeKey), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Expando$Toggle), + _1: {ctor: '[]'} + }, + A3( + _elm_lang$virtual_dom$VirtualDom_Expando$lineStarter, + maybeKey, + _elm_lang$core$Maybe$Just(isClosed), + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(starter), + _1: {ctor: '[]'} + })), + _1: { + ctor: '::', + _0: isClosed ? _elm_lang$virtual_dom$VirtualDom_Helpers$text('') : _elm_lang$virtual_dom$VirtualDom_Expando$viewSequenceOpen(valueList), + _1: {ctor: '[]'} + } + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmi new file mode 100644 index 0000000..48258be Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmo new file mode 100644 index 0000000..b9d718e --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Helpers.elmo @@ -0,0 +1,45 @@ +var _elm_lang$virtual_dom$VirtualDom_Helpers$keyedNode = _elm_lang$virtual_dom$Native_VirtualDom.keyedNode; +var _elm_lang$virtual_dom$VirtualDom_Helpers$lazy3 = _elm_lang$virtual_dom$Native_VirtualDom.lazy3; +var _elm_lang$virtual_dom$VirtualDom_Helpers$lazy2 = _elm_lang$virtual_dom$Native_VirtualDom.lazy2; +var _elm_lang$virtual_dom$VirtualDom_Helpers$lazy = _elm_lang$virtual_dom$Native_VirtualDom.lazy; +var _elm_lang$virtual_dom$VirtualDom_Helpers$defaultOptions = {stopPropagation: false, preventDefault: false}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$onWithOptions = _elm_lang$virtual_dom$Native_VirtualDom.on; +var _elm_lang$virtual_dom$VirtualDom_Helpers$on = F2( + function (eventName, decoder) { + return A3(_elm_lang$virtual_dom$VirtualDom_Helpers$onWithOptions, eventName, _elm_lang$virtual_dom$VirtualDom_Helpers$defaultOptions, decoder); + }); +var _elm_lang$virtual_dom$VirtualDom_Helpers$onClick = function (msg) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$on, + 'click', + _elm_lang$core$Json_Decode$succeed(msg)); +}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$style = _elm_lang$virtual_dom$Native_VirtualDom.style; +var _elm_lang$virtual_dom$VirtualDom_Helpers$attribute = _elm_lang$virtual_dom$Native_VirtualDom.attribute; +var _elm_lang$virtual_dom$VirtualDom_Helpers$id = _elm_lang$virtual_dom$VirtualDom_Helpers$attribute('id'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$property = _elm_lang$virtual_dom$Native_VirtualDom.property; +var _elm_lang$virtual_dom$VirtualDom_Helpers$class = function (name) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$property, + 'className', + _elm_lang$core$Json_Encode$string(name)); +}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$href = function (name) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$property, + 'href', + _elm_lang$core$Json_Encode$string(name)); +}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$map = _elm_lang$virtual_dom$Native_VirtualDom.map; +var _elm_lang$virtual_dom$VirtualDom_Helpers$text = _elm_lang$virtual_dom$Native_VirtualDom.text; +var _elm_lang$virtual_dom$VirtualDom_Helpers$node = _elm_lang$virtual_dom$Native_VirtualDom.node; +var _elm_lang$virtual_dom$VirtualDom_Helpers$div = _elm_lang$virtual_dom$VirtualDom_Helpers$node('div'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$span = _elm_lang$virtual_dom$VirtualDom_Helpers$node('span'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$a = _elm_lang$virtual_dom$VirtualDom_Helpers$node('a'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$h1 = _elm_lang$virtual_dom$VirtualDom_Helpers$node('h1'); +var _elm_lang$virtual_dom$VirtualDom_Helpers$Options = F2( + function (a, b) { + return {stopPropagation: a, preventDefault: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Helpers$Node = {ctor: 'Node'}; +var _elm_lang$virtual_dom$VirtualDom_Helpers$Property = {ctor: 'Property'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-History.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-History.elmi new file mode 100644 index 0000000..8a068b6 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-History.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-History.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-History.elmo new file mode 100644 index 0000000..999acfa --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-History.elmo @@ -0,0 +1,363 @@ +var _elm_lang$virtual_dom$VirtualDom_History$viewMessage = F3( + function (currentIndex, index, msg) { + var className = _elm_lang$core$Native_Utils.eq(currentIndex, index) ? 'messages-entry messages-entry-selected' : 'messages-entry'; + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class(className), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$on, + 'click', + _elm_lang$core$Json_Decode$succeed(index)), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('messages-entry-content'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + _elm_lang$virtual_dom$Native_Debug.messageToString(msg)), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('messages-entry-index'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + _elm_lang$core$Basics$toString(index)), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }); + }); +var _elm_lang$virtual_dom$VirtualDom_History$consMsg = F3( + function (currentIndex, msg, _p0) { + var _p1 = _p0; + var _p2 = _p1._0; + return { + ctor: '_Tuple2', + _0: _p2 - 1, + _1: { + ctor: '::', + _0: A4(_elm_lang$virtual_dom$VirtualDom_Helpers$lazy3, _elm_lang$virtual_dom$VirtualDom_History$viewMessage, currentIndex, _p2, msg), + _1: _p1._1 + } + }; + }); +var _elm_lang$virtual_dom$VirtualDom_History$viewSnapshot = F3( + function (currentIndex, index, _p3) { + var _p4 = _p3; + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + _elm_lang$core$Tuple$second( + A3( + _elm_lang$core$Array$foldl, + _elm_lang$virtual_dom$VirtualDom_History$consMsg(currentIndex), + { + ctor: '_Tuple2', + _0: index - 1, + _1: {ctor: '[]'} + }, + _p4.messages))); + }); +var _elm_lang$virtual_dom$VirtualDom_History$undone = function (getResult) { + var _p5 = getResult; + if (_p5.ctor === 'Done') { + return {ctor: '_Tuple2', _0: _p5._1, _1: _p5._0}; + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.History', + { + start: {line: 195, column: 3}, + end: {line: 200, column: 39} + }, + _p5)('Bug in History.get'); + } +}; +var _elm_lang$virtual_dom$VirtualDom_History$elmToJs = _elm_lang$virtual_dom$Native_Debug.unsafeCoerce; +var _elm_lang$virtual_dom$VirtualDom_History$encodeHelp = F2( + function (snapshot, allMessages) { + return A3( + _elm_lang$core$Array$foldl, + F2( + function (elm, msgs) { + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_History$elmToJs(elm), + _1: msgs + }; + }), + allMessages, + snapshot.messages); + }); +var _elm_lang$virtual_dom$VirtualDom_History$encode = function (_p7) { + var _p8 = _p7; + var recentJson = A2( + _elm_lang$core$List$map, + _elm_lang$virtual_dom$VirtualDom_History$elmToJs, + _elm_lang$core$List$reverse(_p8.recent.messages)); + return _elm_lang$core$Json_Encode$list( + A3(_elm_lang$core$Array$foldr, _elm_lang$virtual_dom$VirtualDom_History$encodeHelp, recentJson, _p8.snapshots)); +}; +var _elm_lang$virtual_dom$VirtualDom_History$jsToElm = _elm_lang$virtual_dom$Native_Debug.unsafeCoerce; +var _elm_lang$virtual_dom$VirtualDom_History$initialModel = function (_p9) { + var _p10 = _p9; + var _p11 = A2(_elm_lang$core$Array$get, 0, _p10.snapshots); + if (_p11.ctor === 'Just') { + return _p11._0.model; + } else { + return _p10.recent.model; + } +}; +var _elm_lang$virtual_dom$VirtualDom_History$size = function (history) { + return history.numMessages; +}; +var _elm_lang$virtual_dom$VirtualDom_History$maxSnapshotSize = 64; +var _elm_lang$virtual_dom$VirtualDom_History$consSnapshot = F3( + function (currentIndex, snapshot, _p12) { + var _p13 = _p12; + var _p14 = _p13._0; + var nextIndex = _p14 - _elm_lang$virtual_dom$VirtualDom_History$maxSnapshotSize; + var currentIndexHelp = ((_elm_lang$core$Native_Utils.cmp(nextIndex, currentIndex) < 1) && (_elm_lang$core$Native_Utils.cmp(currentIndex, _p14) < 0)) ? currentIndex : -1; + return { + ctor: '_Tuple2', + _0: _p14 - _elm_lang$virtual_dom$VirtualDom_History$maxSnapshotSize, + _1: { + ctor: '::', + _0: A4(_elm_lang$virtual_dom$VirtualDom_Helpers$lazy3, _elm_lang$virtual_dom$VirtualDom_History$viewSnapshot, currentIndexHelp, _p14, snapshot), + _1: _p13._1 + } + }; + }); +var _elm_lang$virtual_dom$VirtualDom_History$viewSnapshots = F2( + function (currentIndex, snapshots) { + var highIndex = _elm_lang$virtual_dom$VirtualDom_History$maxSnapshotSize * _elm_lang$core$Array$length(snapshots); + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + {ctor: '[]'}, + _elm_lang$core$Tuple$second( + A3( + _elm_lang$core$Array$foldr, + _elm_lang$virtual_dom$VirtualDom_History$consSnapshot(currentIndex), + { + ctor: '_Tuple2', + _0: highIndex, + _1: {ctor: '[]'} + }, + snapshots))); + }); +var _elm_lang$virtual_dom$VirtualDom_History$view = F2( + function (maybeIndex, _p15) { + var _p16 = _p15; + var _p17 = function () { + var _p18 = maybeIndex; + if (_p18.ctor === 'Nothing') { + return {ctor: '_Tuple2', _0: -1, _1: 'debugger-sidebar-messages'}; + } else { + return {ctor: '_Tuple2', _0: _p18._0, _1: 'debugger-sidebar-messages-paused'}; + } + }(); + var index = _p17._0; + var className = _p17._1; + var oldStuff = A3(_elm_lang$virtual_dom$VirtualDom_Helpers$lazy2, _elm_lang$virtual_dom$VirtualDom_History$viewSnapshots, index, _p16.snapshots); + var newStuff = _elm_lang$core$Tuple$second( + A3( + _elm_lang$core$List$foldl, + _elm_lang$virtual_dom$VirtualDom_History$consMsg(index), + { + ctor: '_Tuple2', + _0: _p16.numMessages - 1, + _1: {ctor: '[]'} + }, + _p16.recent.messages)); + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class(className), + _1: {ctor: '[]'} + }, + {ctor: '::', _0: oldStuff, _1: newStuff}); + }); +var _elm_lang$virtual_dom$VirtualDom_History$History = F3( + function (a, b, c) { + return {snapshots: a, recent: b, numMessages: c}; + }); +var _elm_lang$virtual_dom$VirtualDom_History$RecentHistory = F3( + function (a, b, c) { + return {model: a, messages: b, numMessages: c}; + }); +var _elm_lang$virtual_dom$VirtualDom_History$empty = function (model) { + return A3( + _elm_lang$virtual_dom$VirtualDom_History$History, + _elm_lang$core$Array$empty, + A3( + _elm_lang$virtual_dom$VirtualDom_History$RecentHistory, + model, + {ctor: '[]'}, + 0), + 0); +}; +var _elm_lang$virtual_dom$VirtualDom_History$Snapshot = F2( + function (a, b) { + return {model: a, messages: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_History$addRecent = F3( + function (msg, newModel, _p19) { + var _p20 = _p19; + var _p23 = _p20.numMessages; + var _p22 = _p20.model; + var _p21 = _p20.messages; + return _elm_lang$core$Native_Utils.eq(_p23, _elm_lang$virtual_dom$VirtualDom_History$maxSnapshotSize) ? { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Just( + A2( + _elm_lang$virtual_dom$VirtualDom_History$Snapshot, + _p22, + _elm_lang$core$Array$fromList(_p21))), + _1: A3( + _elm_lang$virtual_dom$VirtualDom_History$RecentHistory, + newModel, + { + ctor: '::', + _0: msg, + _1: {ctor: '[]'} + }, + 1) + } : { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Nothing, + _1: A3( + _elm_lang$virtual_dom$VirtualDom_History$RecentHistory, + _p22, + {ctor: '::', _0: msg, _1: _p21}, + _p23 + 1) + }; + }); +var _elm_lang$virtual_dom$VirtualDom_History$add = F3( + function (msg, model, _p24) { + var _p25 = _p24; + var _p28 = _p25.snapshots; + var _p27 = _p25.numMessages; + var _p26 = A3(_elm_lang$virtual_dom$VirtualDom_History$addRecent, msg, model, _p25.recent); + if (_p26._0.ctor === 'Just') { + return A3( + _elm_lang$virtual_dom$VirtualDom_History$History, + A2(_elm_lang$core$Array$push, _p26._0._0, _p28), + _p26._1, + _p27 + 1); + } else { + return A3(_elm_lang$virtual_dom$VirtualDom_History$History, _p28, _p26._1, _p27 + 1); + } + }); +var _elm_lang$virtual_dom$VirtualDom_History$decoder = F2( + function (initialModel, update) { + var addMessage = F2( + function (rawMsg, _p29) { + var _p30 = _p29; + var _p31 = _p30._0; + var msg = _elm_lang$virtual_dom$VirtualDom_History$jsToElm(rawMsg); + return { + ctor: '_Tuple2', + _0: A2(update, msg, _p31), + _1: A3(_elm_lang$virtual_dom$VirtualDom_History$add, msg, _p31, _p30._1) + }; + }); + var updateModel = function (rawMsgs) { + return A3( + _elm_lang$core$List$foldl, + addMessage, + { + ctor: '_Tuple2', + _0: initialModel, + _1: _elm_lang$virtual_dom$VirtualDom_History$empty(initialModel) + }, + rawMsgs); + }; + return A2( + _elm_lang$core$Json_Decode$map, + updateModel, + _elm_lang$core$Json_Decode$list(_elm_lang$core$Json_Decode$value)); + }); +var _elm_lang$virtual_dom$VirtualDom_History$Done = F2( + function (a, b) { + return {ctor: 'Done', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_History$Stepping = F2( + function (a, b) { + return {ctor: 'Stepping', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_History$getHelp = F3( + function (update, msg, getResult) { + var _p32 = getResult; + if (_p32.ctor === 'Done') { + return getResult; + } else { + var _p34 = _p32._0; + var _p33 = _p32._1; + return _elm_lang$core$Native_Utils.eq(_p34, 0) ? A2( + _elm_lang$virtual_dom$VirtualDom_History$Done, + msg, + _elm_lang$core$Tuple$first( + A2(update, msg, _p33))) : A2( + _elm_lang$virtual_dom$VirtualDom_History$Stepping, + _p34 - 1, + _elm_lang$core$Tuple$first( + A2(update, msg, _p33))); + } + }); +var _elm_lang$virtual_dom$VirtualDom_History$get = F3( + function (update, index, _p35) { + var _p36 = _p35; + var _p39 = _p36.recent; + var snapshotMax = _p36.numMessages - _p39.numMessages; + if (_elm_lang$core$Native_Utils.cmp(index, snapshotMax) > -1) { + return _elm_lang$virtual_dom$VirtualDom_History$undone( + A3( + _elm_lang$core$List$foldr, + _elm_lang$virtual_dom$VirtualDom_History$getHelp(update), + A2(_elm_lang$virtual_dom$VirtualDom_History$Stepping, index - snapshotMax, _p39.model), + _p39.messages)); + } else { + var _p37 = A2(_elm_lang$core$Array$get, (index / _elm_lang$virtual_dom$VirtualDom_History$maxSnapshotSize) | 0, _p36.snapshots); + if (_p37.ctor === 'Nothing') { + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.History', + { + start: {line: 165, column: 7}, + end: {line: 171, column: 95} + }, + _p37)('UI should only let you ask for real indexes!'); + } else { + return _elm_lang$virtual_dom$VirtualDom_History$undone( + A3( + _elm_lang$core$Array$foldr, + _elm_lang$virtual_dom$VirtualDom_History$getHelp(update), + A2( + _elm_lang$virtual_dom$VirtualDom_History$Stepping, + A2(_elm_lang$core$Basics$rem, index, _elm_lang$virtual_dom$VirtualDom_History$maxSnapshotSize), + _p37._0.model), + _p37._0.messages)); + } + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Metadata.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Metadata.elmi new file mode 100644 index 0000000..8c1b675 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Metadata.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Metadata.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Metadata.elmo new file mode 100644 index 0000000..2871a37 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Metadata.elmo @@ -0,0 +1,393 @@ +var _elm_lang$virtual_dom$VirtualDom_Metadata$encodeDict = F2( + function (f, dict) { + return _elm_lang$core$Json_Encode$object( + _elm_lang$core$Dict$toList( + A2( + _elm_lang$core$Dict$map, + F2( + function (key, value) { + return f(value); + }), + dict))); + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$encodeUnion = function (_p0) { + var _p1 = _p0; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'args', + _1: _elm_lang$core$Json_Encode$list( + A2(_elm_lang$core$List$map, _elm_lang$core$Json_Encode$string, _p1.args)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'tags', + _1: A2( + _elm_lang$virtual_dom$VirtualDom_Metadata$encodeDict, + function (_p2) { + return _elm_lang$core$Json_Encode$list( + A2(_elm_lang$core$List$map, _elm_lang$core$Json_Encode$string, _p2)); + }, + _p1.tags) + }, + _1: {ctor: '[]'} + } + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$encodeAlias = function (_p3) { + var _p4 = _p3; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'args', + _1: _elm_lang$core$Json_Encode$list( + A2(_elm_lang$core$List$map, _elm_lang$core$Json_Encode$string, _p4.args)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'type', + _1: _elm_lang$core$Json_Encode$string(_p4.tipe) + }, + _1: {ctor: '[]'} + } + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$encodeTypes = function (_p5) { + var _p6 = _p5; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'message', + _1: _elm_lang$core$Json_Encode$string(_p6.message) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'aliases', + _1: A2(_elm_lang$virtual_dom$VirtualDom_Metadata$encodeDict, _elm_lang$virtual_dom$VirtualDom_Metadata$encodeAlias, _p6.aliases) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'unions', + _1: A2(_elm_lang$virtual_dom$VirtualDom_Metadata$encodeDict, _elm_lang$virtual_dom$VirtualDom_Metadata$encodeUnion, _p6.unions) + }, + _1: {ctor: '[]'} + } + } + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$encodeVersions = function (_p7) { + var _p8 = _p7; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'elm', + _1: _elm_lang$core$Json_Encode$string(_p8.elm) + }, + _1: {ctor: '[]'} + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$encode = function (_p9) { + var _p10 = _p9; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'versions', + _1: _elm_lang$virtual_dom$VirtualDom_Metadata$encodeVersions(_p10.versions) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'types', + _1: _elm_lang$virtual_dom$VirtualDom_Metadata$encodeTypes(_p10.types) + }, + _1: {ctor: '[]'} + } + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$checkTag = F4( + function (tag, old, $new, changes) { + return _elm_lang$core$Native_Utils.eq(old, $new) ? changes : _elm_lang$core$Native_Utils.update( + changes, + { + changed: {ctor: '::', _0: tag, _1: changes.changed} + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$addTag = F3( + function (tag, _p11, changes) { + return _elm_lang$core$Native_Utils.update( + changes, + { + added: {ctor: '::', _0: tag, _1: changes.added} + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$removeTag = F3( + function (tag, _p12, changes) { + return _elm_lang$core$Native_Utils.update( + changes, + { + removed: {ctor: '::', _0: tag, _1: changes.removed} + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$checkUnion = F4( + function (name, old, $new, changes) { + var tagChanges = A6( + _elm_lang$core$Dict$merge, + _elm_lang$virtual_dom$VirtualDom_Metadata$removeTag, + _elm_lang$virtual_dom$VirtualDom_Metadata$checkTag, + _elm_lang$virtual_dom$VirtualDom_Metadata$addTag, + old.tags, + $new.tags, + _elm_lang$virtual_dom$VirtualDom_Report$emptyTagChanges( + _elm_lang$core$Native_Utils.eq(old.args, $new.args))); + return _elm_lang$virtual_dom$VirtualDom_Report$hasTagChanges(tagChanges) ? changes : { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Report$UnionChange, name, tagChanges), + _1: changes + }; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$checkAlias = F4( + function (name, old, $new, changes) { + return (_elm_lang$core$Native_Utils.eq(old.tipe, $new.tipe) && _elm_lang$core$Native_Utils.eq(old.args, $new.args)) ? changes : { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Report$AliasChange(name), + _1: changes + }; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$ignore = F3( + function (key, value, report) { + return report; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$checkTypes = F2( + function (old, $new) { + return (!_elm_lang$core$Native_Utils.eq(old.message, $new.message)) ? A2(_elm_lang$virtual_dom$VirtualDom_Report$MessageChanged, old.message, $new.message) : _elm_lang$virtual_dom$VirtualDom_Report$SomethingChanged( + A6( + _elm_lang$core$Dict$merge, + _elm_lang$virtual_dom$VirtualDom_Metadata$ignore, + _elm_lang$virtual_dom$VirtualDom_Metadata$checkUnion, + _elm_lang$virtual_dom$VirtualDom_Metadata$ignore, + old.unions, + $new.unions, + A6( + _elm_lang$core$Dict$merge, + _elm_lang$virtual_dom$VirtualDom_Metadata$ignore, + _elm_lang$virtual_dom$VirtualDom_Metadata$checkAlias, + _elm_lang$virtual_dom$VirtualDom_Metadata$ignore, + old.aliases, + $new.aliases, + {ctor: '[]'}))); + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$check = F2( + function (old, $new) { + return (!_elm_lang$core$Native_Utils.eq(old.versions.elm, $new.versions.elm)) ? A2(_elm_lang$virtual_dom$VirtualDom_Report$VersionChanged, old.versions.elm, $new.versions.elm) : A2(_elm_lang$virtual_dom$VirtualDom_Metadata$checkTypes, old.types, $new.types); + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$hasProblem = F2( + function (tipe, _p13) { + var _p14 = _p13; + return A2(_elm_lang$core$String$contains, _p14._1, tipe) ? _elm_lang$core$Maybe$Just(_p14._0) : _elm_lang$core$Maybe$Nothing; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$Metadata = F2( + function (a, b) { + return {versions: a, types: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$Versions = function (a) { + return {elm: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$decodeVersions = A2( + _elm_lang$core$Json_Decode$map, + _elm_lang$virtual_dom$VirtualDom_Metadata$Versions, + A2(_elm_lang$core$Json_Decode$field, 'elm', _elm_lang$core$Json_Decode$string)); +var _elm_lang$virtual_dom$VirtualDom_Metadata$Types = F3( + function (a, b, c) { + return {message: a, aliases: b, unions: c}; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$Alias = F2( + function (a, b) { + return {args: a, tipe: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$decodeAlias = A3( + _elm_lang$core$Json_Decode$map2, + _elm_lang$virtual_dom$VirtualDom_Metadata$Alias, + A2( + _elm_lang$core$Json_Decode$field, + 'args', + _elm_lang$core$Json_Decode$list(_elm_lang$core$Json_Decode$string)), + A2(_elm_lang$core$Json_Decode$field, 'type', _elm_lang$core$Json_Decode$string)); +var _elm_lang$virtual_dom$VirtualDom_Metadata$Union = F2( + function (a, b) { + return {args: a, tags: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$decodeUnion = A3( + _elm_lang$core$Json_Decode$map2, + _elm_lang$virtual_dom$VirtualDom_Metadata$Union, + A2( + _elm_lang$core$Json_Decode$field, + 'args', + _elm_lang$core$Json_Decode$list(_elm_lang$core$Json_Decode$string)), + A2( + _elm_lang$core$Json_Decode$field, + 'tags', + _elm_lang$core$Json_Decode$dict( + _elm_lang$core$Json_Decode$list(_elm_lang$core$Json_Decode$string)))); +var _elm_lang$virtual_dom$VirtualDom_Metadata$decodeTypes = A4( + _elm_lang$core$Json_Decode$map3, + _elm_lang$virtual_dom$VirtualDom_Metadata$Types, + A2(_elm_lang$core$Json_Decode$field, 'message', _elm_lang$core$Json_Decode$string), + A2( + _elm_lang$core$Json_Decode$field, + 'aliases', + _elm_lang$core$Json_Decode$dict(_elm_lang$virtual_dom$VirtualDom_Metadata$decodeAlias)), + A2( + _elm_lang$core$Json_Decode$field, + 'unions', + _elm_lang$core$Json_Decode$dict(_elm_lang$virtual_dom$VirtualDom_Metadata$decodeUnion))); +var _elm_lang$virtual_dom$VirtualDom_Metadata$decoder = A3( + _elm_lang$core$Json_Decode$map2, + _elm_lang$virtual_dom$VirtualDom_Metadata$Metadata, + A2(_elm_lang$core$Json_Decode$field, 'versions', _elm_lang$virtual_dom$VirtualDom_Metadata$decodeVersions), + A2(_elm_lang$core$Json_Decode$field, 'types', _elm_lang$virtual_dom$VirtualDom_Metadata$decodeTypes)); +var _elm_lang$virtual_dom$VirtualDom_Metadata$Error = F2( + function (a, b) { + return {message: a, problems: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$ProblemType = F2( + function (a, b) { + return {name: a, problems: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$VirtualDom = {ctor: 'VirtualDom'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$Program = {ctor: 'Program'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$Request = {ctor: 'Request'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$Socket = {ctor: 'Socket'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$Process = {ctor: 'Process'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$Task = {ctor: 'Task'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$Decoder = {ctor: 'Decoder'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$Function = {ctor: 'Function'}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$problemTable = { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$Function, _1: '->'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$Decoder, _1: 'Json.Decode.Decoder'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$Task, _1: 'Task.Task'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$Process, _1: 'Process.Id'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$Socket, _1: 'WebSocket.LowLevel.WebSocket'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$Request, _1: 'Http.Request'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$Program, _1: 'Platform.Program'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$VirtualDom, _1: 'VirtualDom.Node'}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: _elm_lang$virtual_dom$VirtualDom_Metadata$VirtualDom, _1: 'VirtualDom.Attribute'}, + _1: {ctor: '[]'} + } + } + } + } + } + } + } + } +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$findProblems = function (tipe) { + return A2( + _elm_lang$core$List$filterMap, + _elm_lang$virtual_dom$VirtualDom_Metadata$hasProblem(tipe), + _elm_lang$virtual_dom$VirtualDom_Metadata$problemTable); +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$collectBadAliases = F3( + function (name, _p15, list) { + var _p16 = _p15; + var _p17 = _elm_lang$virtual_dom$VirtualDom_Metadata$findProblems(_p16.tipe); + if (_p17.ctor === '[]') { + return list; + } else { + return { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Metadata$ProblemType, name, _p17), + _1: list + }; + } + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$collectBadUnions = F3( + function (name, _p18, list) { + var _p19 = _p18; + var _p20 = A2( + _elm_lang$core$List$concatMap, + _elm_lang$virtual_dom$VirtualDom_Metadata$findProblems, + _elm_lang$core$List$concat( + _elm_lang$core$Dict$values(_p19.tags))); + if (_p20.ctor === '[]') { + return list; + } else { + return { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Metadata$ProblemType, name, _p20), + _1: list + }; + } + }); +var _elm_lang$virtual_dom$VirtualDom_Metadata$isPortable = function (_p21) { + var _p22 = _p21; + var _p24 = _p22.types; + var badAliases = A3( + _elm_lang$core$Dict$foldl, + _elm_lang$virtual_dom$VirtualDom_Metadata$collectBadAliases, + {ctor: '[]'}, + _p24.aliases); + var _p23 = A3(_elm_lang$core$Dict$foldl, _elm_lang$virtual_dom$VirtualDom_Metadata$collectBadUnions, badAliases, _p24.unions); + if (_p23.ctor === '[]') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just( + A2(_elm_lang$virtual_dom$VirtualDom_Metadata$Error, _p24.message, _p23)); + } +}; +var _elm_lang$virtual_dom$VirtualDom_Metadata$decode = function (value) { + var _p25 = A2(_elm_lang$core$Json_Decode$decodeValue, _elm_lang$virtual_dom$VirtualDom_Metadata$decoder, value); + if (_p25.ctor === 'Err') { + return _elm_lang$core$Native_Utils.crashCase( + 'VirtualDom.Metadata', + { + start: {line: 229, column: 3}, + end: {line: 239, column: 20} + }, + _p25)('Compiler is generating bad metadata. Report this at .'); + } else { + var _p28 = _p25._0; + var _p27 = _elm_lang$virtual_dom$VirtualDom_Metadata$isPortable(_p28); + if (_p27.ctor === 'Nothing') { + return _elm_lang$core$Result$Ok(_p28); + } else { + return _elm_lang$core$Result$Err(_p27._0); + } + } +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Overlay.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Overlay.elmi new file mode 100644 index 0000000..d8cfd38 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Overlay.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Overlay.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Overlay.elmo new file mode 100644 index 0000000..fb9c05f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Overlay.elmo @@ -0,0 +1,793 @@ +var _elm_lang$virtual_dom$VirtualDom_Overlay$styles = A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'style', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('\n\n.elm-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n color: white;\n pointer-events: none;\n font-family: \'Trebuchet MS\', \'Lucida Grande\', \'Bitstream Vera Sans\', \'Helvetica Neue\', sans-serif;\n}\n\n.elm-overlay-resume {\n width: 100%;\n height: 100%;\n cursor: pointer;\n text-align: center;\n pointer-events: auto;\n background-color: rgba(200, 200, 200, 0.7);\n}\n\n.elm-overlay-resume-words {\n position: absolute;\n top: calc(50% - 40px);\n font-size: 80px;\n line-height: 80px;\n height: 80px;\n width: 100%;\n}\n\n.elm-mini-controls {\n position: fixed;\n bottom: 0;\n right: 6px;\n border-radius: 4px;\n background-color: rgb(61, 61, 61);\n font-family: monospace;\n pointer-events: auto;\n}\n\n.elm-mini-controls-button {\n padding: 6px;\n cursor: pointer;\n text-align: center;\n min-width: 24ch;\n}\n\n.elm-mini-controls-import-export {\n padding: 4px 0;\n font-size: 0.8em;\n text-align: center;\n background-color: rgb(50, 50, 50);\n}\n\n.elm-overlay-message {\n position: absolute;\n width: 600px;\n height: 100%;\n padding-left: calc(50% - 300px);\n padding-right: calc(50% - 300px);\n background-color: rgba(200, 200, 200, 0.7);\n pointer-events: auto;\n}\n\n.elm-overlay-message-title {\n font-size: 36px;\n height: 80px;\n background-color: rgb(50, 50, 50);\n padding-left: 22px;\n vertical-align: middle;\n line-height: 80px;\n}\n\n.elm-overlay-message-details {\n padding: 8px 20px;\n overflow-y: auto;\n max-height: calc(100% - 156px);\n background-color: rgb(61, 61, 61);\n}\n\n.elm-overlay-message-details-type {\n font-size: 1.5em;\n}\n\n.elm-overlay-message-details ul {\n list-style-type: none;\n padding-left: 20px;\n}\n\n.elm-overlay-message-details ul ul {\n list-style-type: disc;\n padding-left: 2em;\n}\n\n.elm-overlay-message-details li {\n margin: 8px 0;\n}\n\n.elm-overlay-message-buttons {\n height: 60px;\n line-height: 60px;\n text-align: right;\n background-color: rgb(50, 50, 50);\n}\n\n.elm-overlay-message-buttons button {\n margin-right: 20px;\n}\n\n'), + _1: {ctor: '[]'} + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$button = F2( + function (msg, label) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(msg), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$style( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'cursor', _1: 'pointer'}, + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(label), + _1: {ctor: '[]'} + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewImportExport = F3( + function (props, importMsg, exportMsg) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + props, + { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Overlay$button, importMsg, 'Import'), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' / '), + _1: { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Overlay$button, exportMsg, 'Export'), + _1: {ctor: '[]'} + } + } + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewMiniControls = F2( + function (config, numMsgs) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-mini-controls'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(config.open), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-mini-controls-button'), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + A2( + _elm_lang$core$Basics_ops['++'], + 'Explore History (', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(numMsgs), + ')'))), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Overlay$viewImportExport, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-mini-controls-import-export'), + _1: {ctor: '[]'} + }, + config.importHistory, + config.exportHistory), + _1: {ctor: '[]'} + } + }); + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$addCommas = function (items) { + var _p0 = items; + if (_p0.ctor === '[]') { + return ''; + } else { + if (_p0._1.ctor === '[]') { + return _p0._0; + } else { + if (_p0._1._1.ctor === '[]') { + return A2( + _elm_lang$core$Basics_ops['++'], + _p0._0, + A2(_elm_lang$core$Basics_ops['++'], ' and ', _p0._1._0)); + } else { + return A2( + _elm_lang$core$String$join, + ', ', + A2( + _elm_lang$core$Basics_ops['++'], + _p0._1, + { + ctor: '::', + _0: A2(_elm_lang$core$Basics_ops['++'], ' and ', _p0._0), + _1: {ctor: '[]'} + })); + } + } + } +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$problemToString = function (problem) { + var _p1 = problem; + switch (_p1.ctor) { + case 'Function': + return 'functions'; + case 'Decoder': + return 'JSON decoders'; + case 'Task': + return 'tasks'; + case 'Process': + return 'processes'; + case 'Socket': + return 'web sockets'; + case 'Request': + return 'HTTP requests'; + case 'Program': + return 'programs'; + default: + return 'virtual DOM values'; + } +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$goodNews2 = '\nfunction can pattern match on that data and call whatever functions, JSON\ndecoders, etc. you need. This makes the code much more explicit and easy to\nfollow for other readers (or you in a few months!)\n'; +var _elm_lang$virtual_dom$VirtualDom_Overlay$goodNews1 = '\nThe good news is that having values like this in your message type is not\nso great in the long run. You are better off using simpler data, like\n'; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode = function (name) { + return A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'code', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(name), + _1: {ctor: '[]'} + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewMention = F2( + function (tags, verbed) { + var _p2 = A2( + _elm_lang$core$List$map, + _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode, + _elm_lang$core$List$reverse(tags)); + if (_p2.ctor === '[]') { + return _elm_lang$virtual_dom$VirtualDom_Helpers$text(''); + } else { + if (_p2._1.ctor === '[]') { + return A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'li', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(verbed), + _1: { + ctor: '::', + _0: _p2._0, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('.'), + _1: {ctor: '[]'} + } + } + }); + } else { + if (_p2._1._1.ctor === '[]') { + return A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'li', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(verbed), + _1: { + ctor: '::', + _0: _p2._1._0, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' and '), + _1: { + ctor: '::', + _0: _p2._0, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('.'), + _1: {ctor: '[]'} + } + } + } + } + }); + } else { + return A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'li', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(verbed), + _1: A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$List$intersperse, + _elm_lang$virtual_dom$VirtualDom_Helpers$text(', '), + _elm_lang$core$List$reverse(_p2._1)), + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(', and '), + _1: { + ctor: '::', + _0: _p2._0, + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('.'), + _1: {ctor: '[]'} + } + } + }) + }); + } + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewChange = function (change) { + return A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'li', + {ctor: '[]'}, + function () { + var _p3 = change; + if (_p3.ctor === 'AliasChange') { + return { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-message-details-type'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode(_p3._0), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + }; + } else { + return { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$span, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-message-details-type'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode(_p3._0), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'ul', + {ctor: '[]'}, + { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Overlay$viewMention, _p3._1.removed, 'Removed '), + _1: { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Overlay$viewMention, _p3._1.changed, 'Changed '), + _1: { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Overlay$viewMention, _p3._1.added, 'Added '), + _1: {ctor: '[]'} + } + } + }), + _1: { + ctor: '::', + _0: _p3._1.argsMatch ? _elm_lang$virtual_dom$VirtualDom_Helpers$text('') : _elm_lang$virtual_dom$VirtualDom_Helpers$text('This may be due to the fact that the type variable names changed.'), + _1: {ctor: '[]'} + } + } + }; + } + }()); +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewProblemType = function (_p4) { + var _p5 = _p4; + return A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'li', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode(_p5.name), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + A2( + _elm_lang$core$Basics_ops['++'], + ' can contain ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$virtual_dom$VirtualDom_Overlay$addCommas( + A2(_elm_lang$core$List$map, _elm_lang$virtual_dom$VirtualDom_Overlay$problemToString, _p5.problems)), + '.'))), + _1: {ctor: '[]'} + } + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewBadMetadata = function (_p6) { + var _p7 = _p6; + return { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'p', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('The '), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode(_p7.message), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' type of your program cannot be reliably serialized for history files.'), + _1: {ctor: '[]'} + } + } + }), + _1: { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'p', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('Functions cannot be serialized, nor can values that contain functions. This is a problem in these places:'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'ul', + {ctor: '[]'}, + A2(_elm_lang$core$List$map, _elm_lang$virtual_dom$VirtualDom_Overlay$viewProblemType, _p7.problems)), + _1: { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'p', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_elm_lang$virtual_dom$VirtualDom_Overlay$goodNews1), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$a, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$href('https://guide.elm-lang.org/types/union_types.html'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('union types'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(', in your messages. From there, your '), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode('update'), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_elm_lang$virtual_dom$VirtualDom_Overlay$goodNews2), + _1: {ctor: '[]'} + } + } + } + } + }), + _1: {ctor: '[]'} + } + } + } + }; +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$explanationRisky = '\nThis history seems old. It will work with this program, but some\nmessages have been added since the history was created:\n'; +var _elm_lang$virtual_dom$VirtualDom_Overlay$explanationBad = '\nThe messages in this history do not match the messages handled by your\nprogram. I noticed changes in the following types:\n'; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewReport = F2( + function (isBad, report) { + var _p8 = report; + switch (_p8.ctor) { + case 'CorruptHistory': + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('Looks like this history file is corrupt. I cannot understand it.'), + _1: {ctor: '[]'} + }; + case 'VersionChanged': + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + A2( + _elm_lang$core$Basics_ops['++'], + 'This history was created with Elm ', + A2( + _elm_lang$core$Basics_ops['++'], + _p8._0, + A2( + _elm_lang$core$Basics_ops['++'], + ', but you are using Elm ', + A2(_elm_lang$core$Basics_ops['++'], _p8._1, ' right now.'))))), + _1: {ctor: '[]'} + }; + case 'MessageChanged': + return { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + A2(_elm_lang$core$Basics_ops['++'], 'To import some other history, the overall message type must', ' be the same. The old history has ')), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode(_p8._0), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' messages, but the new program works with '), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewCode(_p8._1), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(' messages.'), + _1: {ctor: '[]'} + } + } + } + } + }; + default: + return { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'p', + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text( + isBad ? _elm_lang$virtual_dom$VirtualDom_Overlay$explanationBad : _elm_lang$virtual_dom$VirtualDom_Overlay$explanationRisky), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'ul', + {ctor: '[]'}, + A2(_elm_lang$core$List$map, _elm_lang$virtual_dom$VirtualDom_Overlay$viewChange, _p8._0)), + _1: {ctor: '[]'} + } + }; + } + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewResume = function (config) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-resume'), + _1: { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(config.resume), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-resume-words'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text('Click to Resume'), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + }); +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$uploadDecoder = A3( + _elm_lang$core$Json_Decode$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A2(_elm_lang$core$Json_Decode$field, 'metadata', _elm_lang$virtual_dom$VirtualDom_Metadata$decoder), + A2(_elm_lang$core$Json_Decode$field, 'history', _elm_lang$core$Json_Decode$value)); +var _elm_lang$virtual_dom$VirtualDom_Overlay$close = F2( + function (msg, state) { + var _p9 = state; + switch (_p9.ctor) { + case 'None': + return _elm_lang$core$Maybe$Nothing; + case 'BadMetadata': + return _elm_lang$core$Maybe$Nothing; + case 'BadImport': + return _elm_lang$core$Maybe$Nothing; + default: + var _p10 = msg; + if (_p10.ctor === 'Cancel') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just(_p9._1); + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$isBlocking = function (state) { + var _p11 = state; + if (_p11.ctor === 'None') { + return false; + } else { + return true; + } +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$Config = F5( + function (a, b, c, d, e) { + return {resume: a, open: b, importHistory: c, exportHistory: d, wrap: e}; + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$RiskyImport = F2( + function (a, b) { + return {ctor: 'RiskyImport', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$BadImport = function (a) { + return {ctor: 'BadImport', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$corruptImport = _elm_lang$virtual_dom$VirtualDom_Overlay$BadImport(_elm_lang$virtual_dom$VirtualDom_Report$CorruptHistory); +var _elm_lang$virtual_dom$VirtualDom_Overlay$assessImport = F2( + function (metadata, jsonString) { + var _p12 = A2(_elm_lang$core$Json_Decode$decodeString, _elm_lang$virtual_dom$VirtualDom_Overlay$uploadDecoder, jsonString); + if (_p12.ctor === 'Err') { + return _elm_lang$core$Result$Err(_elm_lang$virtual_dom$VirtualDom_Overlay$corruptImport); + } else { + var _p14 = _p12._0._1; + var report = A2(_elm_lang$virtual_dom$VirtualDom_Metadata$check, _p12._0._0, metadata); + var _p13 = _elm_lang$virtual_dom$VirtualDom_Report$evaluate(report); + switch (_p13.ctor) { + case 'Impossible': + return _elm_lang$core$Result$Err( + _elm_lang$virtual_dom$VirtualDom_Overlay$BadImport(report)); + case 'Risky': + return _elm_lang$core$Result$Err( + A2(_elm_lang$virtual_dom$VirtualDom_Overlay$RiskyImport, report, _p14)); + default: + return _elm_lang$core$Result$Ok(_p14); + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$BadMetadata = function (a) { + return {ctor: 'BadMetadata', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$badMetadata = _elm_lang$virtual_dom$VirtualDom_Overlay$BadMetadata; +var _elm_lang$virtual_dom$VirtualDom_Overlay$None = {ctor: 'None'}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$none = _elm_lang$virtual_dom$VirtualDom_Overlay$None; +var _elm_lang$virtual_dom$VirtualDom_Overlay$Proceed = {ctor: 'Proceed'}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$Cancel = {ctor: 'Cancel'}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewButtons = function (buttons) { + return A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-message-buttons'), + _1: {ctor: '[]'} + }, + function () { + var _p15 = buttons; + if (_p15.ctor === 'Accept') { + return { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'button', + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Overlay$Proceed), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p15._0), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + }; + } else { + return { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'button', + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Overlay$Cancel), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p15._0), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A3( + _elm_lang$virtual_dom$VirtualDom_Helpers$node, + 'button', + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$onClick(_elm_lang$virtual_dom$VirtualDom_Overlay$Proceed), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(_p15._1), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }; + } + }()); +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$Message = {ctor: 'Message'}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewMessage = F4( + function (config, title, details, buttons) { + return { + ctor: '_Tuple2', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$Message, + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-message'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-message-title'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$text(title), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay-message-details'), + _1: {ctor: '[]'} + }, + details), + _1: { + ctor: '::', + _0: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$map, + config.wrap, + _elm_lang$virtual_dom$VirtualDom_Overlay$viewButtons(buttons)), + _1: {ctor: '[]'} + } + } + }), + _1: {ctor: '[]'} + } + }; + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$Pause = {ctor: 'Pause'}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$Normal = {ctor: 'Normal'}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$Choose = F2( + function (a, b) { + return {ctor: 'Choose', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$Accept = function (a) { + return {ctor: 'Accept', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Overlay$viewHelp = F5( + function (config, isPaused, isOpen, numMsgs, state) { + var _p16 = state; + switch (_p16.ctor) { + case 'None': + var miniControls = isOpen ? {ctor: '[]'} : { + ctor: '::', + _0: A2(_elm_lang$virtual_dom$VirtualDom_Overlay$viewMiniControls, config, numMsgs), + _1: {ctor: '[]'} + }; + return { + ctor: '_Tuple2', + _0: isPaused ? _elm_lang$virtual_dom$VirtualDom_Overlay$Pause : _elm_lang$virtual_dom$VirtualDom_Overlay$Normal, + _1: (isPaused && (!isOpen)) ? { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Overlay$viewResume(config), + _1: miniControls + } : miniControls + }; + case 'BadMetadata': + return A4( + _elm_lang$virtual_dom$VirtualDom_Overlay$viewMessage, + config, + 'Cannot use Import or Export', + _elm_lang$virtual_dom$VirtualDom_Overlay$viewBadMetadata(_p16._0), + _elm_lang$virtual_dom$VirtualDom_Overlay$Accept('Ok')); + case 'BadImport': + return A4( + _elm_lang$virtual_dom$VirtualDom_Overlay$viewMessage, + config, + 'Cannot Import History', + A2(_elm_lang$virtual_dom$VirtualDom_Overlay$viewReport, true, _p16._0), + _elm_lang$virtual_dom$VirtualDom_Overlay$Accept('Ok')); + default: + return A4( + _elm_lang$virtual_dom$VirtualDom_Overlay$viewMessage, + config, + 'Warning', + A2(_elm_lang$virtual_dom$VirtualDom_Overlay$viewReport, false, _p16._0), + A2(_elm_lang$virtual_dom$VirtualDom_Overlay$Choose, 'Cancel', 'Import Anyway')); + } + }); +var _elm_lang$virtual_dom$VirtualDom_Overlay$view = F5( + function (config, isPaused, isOpen, numMsgs, state) { + var _p17 = A5(_elm_lang$virtual_dom$VirtualDom_Overlay$viewHelp, config, isPaused, isOpen, numMsgs, state); + var block = _p17._0; + var nodes = _p17._1; + return { + ctor: '_Tuple2', + _0: block, + _1: A2( + _elm_lang$virtual_dom$VirtualDom_Helpers$div, + { + ctor: '::', + _0: _elm_lang$virtual_dom$VirtualDom_Helpers$class('elm-overlay'), + _1: {ctor: '[]'} + }, + {ctor: '::', _0: _elm_lang$virtual_dom$VirtualDom_Overlay$styles, _1: nodes}) + }; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmi new file mode 100644 index 0000000..3c6311e Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmo new file mode 100644 index 0000000..778a213 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom-Report.elmo @@ -0,0 +1,98 @@ +var _elm_lang$virtual_dom$VirtualDom_Report$some = function (list) { + return !_elm_lang$core$List$isEmpty(list); +}; +var _elm_lang$virtual_dom$VirtualDom_Report$TagChanges = F4( + function (a, b, c, d) { + return {removed: a, changed: b, added: c, argsMatch: d}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$emptyTagChanges = function (argsMatch) { + return A4( + _elm_lang$virtual_dom$VirtualDom_Report$TagChanges, + {ctor: '[]'}, + {ctor: '[]'}, + {ctor: '[]'}, + argsMatch); +}; +var _elm_lang$virtual_dom$VirtualDom_Report$hasTagChanges = function (tagChanges) { + return _elm_lang$core$Native_Utils.eq( + tagChanges, + A4( + _elm_lang$virtual_dom$VirtualDom_Report$TagChanges, + {ctor: '[]'}, + {ctor: '[]'}, + {ctor: '[]'}, + true)); +}; +var _elm_lang$virtual_dom$VirtualDom_Report$SomethingChanged = function (a) { + return {ctor: 'SomethingChanged', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Report$MessageChanged = F2( + function (a, b) { + return {ctor: 'MessageChanged', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$VersionChanged = F2( + function (a, b) { + return {ctor: 'VersionChanged', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$CorruptHistory = {ctor: 'CorruptHistory'}; +var _elm_lang$virtual_dom$VirtualDom_Report$UnionChange = F2( + function (a, b) { + return {ctor: 'UnionChange', _0: a, _1: b}; + }); +var _elm_lang$virtual_dom$VirtualDom_Report$AliasChange = function (a) { + return {ctor: 'AliasChange', _0: a}; +}; +var _elm_lang$virtual_dom$VirtualDom_Report$Fine = {ctor: 'Fine'}; +var _elm_lang$virtual_dom$VirtualDom_Report$Risky = {ctor: 'Risky'}; +var _elm_lang$virtual_dom$VirtualDom_Report$Impossible = {ctor: 'Impossible'}; +var _elm_lang$virtual_dom$VirtualDom_Report$worstCase = F2( + function (status, statusList) { + worstCase: + while (true) { + var _p0 = statusList; + if (_p0.ctor === '[]') { + return status; + } else { + switch (_p0._0.ctor) { + case 'Impossible': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + case 'Risky': + var _v1 = _elm_lang$virtual_dom$VirtualDom_Report$Risky, + _v2 = _p0._1; + status = _v1; + statusList = _v2; + continue worstCase; + default: + var _v3 = status, + _v4 = _p0._1; + status = _v3; + statusList = _v4; + continue worstCase; + } + } + } + }); +var _elm_lang$virtual_dom$VirtualDom_Report$evaluateChange = function (change) { + var _p1 = change; + if (_p1.ctor === 'AliasChange') { + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + } else { + return ((!_p1._1.argsMatch) || (_elm_lang$virtual_dom$VirtualDom_Report$some(_p1._1.changed) || _elm_lang$virtual_dom$VirtualDom_Report$some(_p1._1.removed))) ? _elm_lang$virtual_dom$VirtualDom_Report$Impossible : (_elm_lang$virtual_dom$VirtualDom_Report$some(_p1._1.added) ? _elm_lang$virtual_dom$VirtualDom_Report$Risky : _elm_lang$virtual_dom$VirtualDom_Report$Fine); + } +}; +var _elm_lang$virtual_dom$VirtualDom_Report$evaluate = function (report) { + var _p2 = report; + switch (_p2.ctor) { + case 'CorruptHistory': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + case 'VersionChanged': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + case 'MessageChanged': + return _elm_lang$virtual_dom$VirtualDom_Report$Impossible; + default: + return A2( + _elm_lang$virtual_dom$VirtualDom_Report$worstCase, + _elm_lang$virtual_dom$VirtualDom_Report$Fine, + A2(_elm_lang$core$List$map, _elm_lang$virtual_dom$VirtualDom_Report$evaluateChange, _p2._0)); + } +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom.elmi new file mode 100644 index 0000000..27677ab Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom.elmo new file mode 100644 index 0000000..a4f6bfd --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/VirtualDom.elmo @@ -0,0 +1,30 @@ +var _elm_lang$virtual_dom$VirtualDom$programWithFlags = function (impl) { + return A2(_elm_lang$virtual_dom$Native_VirtualDom.programWithFlags, _elm_lang$virtual_dom$VirtualDom_Debug$wrapWithFlags, impl); +}; +var _elm_lang$virtual_dom$VirtualDom$program = function (impl) { + return A2(_elm_lang$virtual_dom$Native_VirtualDom.program, _elm_lang$virtual_dom$VirtualDom_Debug$wrap, impl); +}; +var _elm_lang$virtual_dom$VirtualDom$keyedNode = _elm_lang$virtual_dom$Native_VirtualDom.keyedNode; +var _elm_lang$virtual_dom$VirtualDom$lazy3 = _elm_lang$virtual_dom$Native_VirtualDom.lazy3; +var _elm_lang$virtual_dom$VirtualDom$lazy2 = _elm_lang$virtual_dom$Native_VirtualDom.lazy2; +var _elm_lang$virtual_dom$VirtualDom$lazy = _elm_lang$virtual_dom$Native_VirtualDom.lazy; +var _elm_lang$virtual_dom$VirtualDom$defaultOptions = {stopPropagation: false, preventDefault: false}; +var _elm_lang$virtual_dom$VirtualDom$onWithOptions = _elm_lang$virtual_dom$Native_VirtualDom.on; +var _elm_lang$virtual_dom$VirtualDom$on = F2( + function (eventName, decoder) { + return A3(_elm_lang$virtual_dom$VirtualDom$onWithOptions, eventName, _elm_lang$virtual_dom$VirtualDom$defaultOptions, decoder); + }); +var _elm_lang$virtual_dom$VirtualDom$style = _elm_lang$virtual_dom$Native_VirtualDom.style; +var _elm_lang$virtual_dom$VirtualDom$mapProperty = _elm_lang$virtual_dom$Native_VirtualDom.mapProperty; +var _elm_lang$virtual_dom$VirtualDom$attributeNS = _elm_lang$virtual_dom$Native_VirtualDom.attributeNS; +var _elm_lang$virtual_dom$VirtualDom$attribute = _elm_lang$virtual_dom$Native_VirtualDom.attribute; +var _elm_lang$virtual_dom$VirtualDom$property = _elm_lang$virtual_dom$Native_VirtualDom.property; +var _elm_lang$virtual_dom$VirtualDom$map = _elm_lang$virtual_dom$Native_VirtualDom.map; +var _elm_lang$virtual_dom$VirtualDom$text = _elm_lang$virtual_dom$Native_VirtualDom.text; +var _elm_lang$virtual_dom$VirtualDom$node = _elm_lang$virtual_dom$Native_VirtualDom.node; +var _elm_lang$virtual_dom$VirtualDom$Options = F2( + function (a, b) { + return {stopPropagation: a, preventDefault: b}; + }); +var _elm_lang$virtual_dom$VirtualDom$Node = {ctor: 'Node'}; +var _elm_lang$virtual_dom$VirtualDom$Property = {ctor: 'Property'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/graph.dat new file mode 100644 index 0000000..50cb3dd Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/elm-lang/virtual-dom/2.0.2/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Array.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Array.elmi new file mode 100644 index 0000000..4d39d9e Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Array.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Array.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Array.elmo new file mode 100644 index 0000000..8f6e9ce --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Array.elmo @@ -0,0 +1,46 @@ +var _krisajenkins$elm_exts$Exts_Array$singleton = function (x) { + return A2(_elm_lang$core$Array$push, x, _elm_lang$core$Array$empty); +}; +var _krisajenkins$elm_exts$Exts_Array$unzip = function () { + var reducer = F2( + function (_p1, _p0) { + var _p2 = _p1; + var _p3 = _p0; + return { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$Array$push, _p2._0, _p3._0), + _1: A2(_elm_lang$core$Array$push, _p2._1, _p3._1) + }; + }); + return A2( + _elm_lang$core$Array$foldl, + reducer, + {ctor: '_Tuple2', _0: _elm_lang$core$Array$empty, _1: _elm_lang$core$Array$empty}); +}(); +var _krisajenkins$elm_exts$Exts_Array$delete = F2( + function (n, xs) { + if (_elm_lang$core$Native_Utils.cmp(n, 0) < 0) { + return xs; + } else { + var after = A3( + _elm_lang$core$Array$slice, + n + 1, + _elm_lang$core$Array$length(xs), + xs); + var before = A3(_elm_lang$core$Array$slice, 0, n, xs); + return A2(_elm_lang$core$Array$append, before, after); + } + }); +var _krisajenkins$elm_exts$Exts_Array$update = F3( + function (n, f, xs) { + var _p4 = A2(_elm_lang$core$Array$get, n, xs); + if (_p4.ctor === 'Nothing') { + return xs; + } else { + return A3( + _elm_lang$core$Array$set, + n, + f(_p4._0), + xs); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Basics.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Basics.elmi new file mode 100644 index 0000000..018ee4b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Basics.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Basics.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Basics.elmo new file mode 100644 index 0000000..28ef19f --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Basics.elmo @@ -0,0 +1,19 @@ +var _krisajenkins$elm_exts$Exts_Basics$compareBy = F3( + function (f, a, b) { + return A2( + _elm_lang$core$Basics$compare, + f(a), + f(b)); + }); +var _krisajenkins$elm_exts$Exts_Basics$maxBy = F3( + function (toComparable, x, y) { + return _elm_lang$core$Native_Utils.eq( + A3(_krisajenkins$elm_exts$Exts_Basics$compareBy, toComparable, x, y), + _elm_lang$core$Basics$LT) ? y : x; + }); +var _krisajenkins$elm_exts$Exts_Basics$minBy = F3( + function (toComparable, x, y) { + return _elm_lang$core$Native_Utils.eq( + A3(_krisajenkins$elm_exts$Exts_Basics$compareBy, toComparable, x, y), + _elm_lang$core$Basics$LT) ? x : y; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Date.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Date.elmi new file mode 100644 index 0000000..bb3efea Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Date.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Date.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Date.elmo new file mode 100644 index 0000000..1d554b4 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Date.elmo @@ -0,0 +1,128 @@ +var _krisajenkins$elm_exts$Exts_Date$monthNumber = function (date) { + var _p0 = _elm_lang$core$Date$month(date); + switch (_p0.ctor) { + case 'Jan': + return 1; + case 'Feb': + return 2; + case 'Mar': + return 3; + case 'Apr': + return 4; + case 'May': + return 5; + case 'Jun': + return 6; + case 'Jul': + return 7; + case 'Aug': + return 8; + case 'Sep': + return 9; + case 'Oct': + return 10; + case 'Nov': + return 11; + default: + return 12; + } +}; +var _krisajenkins$elm_exts$Exts_Date$toRFC3339 = function (date) { + return A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$year(date)), + A2( + _elm_lang$core$Basics_ops['++'], + '-', + A2( + _elm_lang$core$Basics_ops['++'], + A3( + _elm_lang$core$String$padLeft, + 2, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _krisajenkins$elm_exts$Exts_Date$monthNumber(date))), + A2( + _elm_lang$core$Basics_ops['++'], + '-', + A3( + _elm_lang$core$String$padLeft, + 2, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$day(date))))))); +}; +var _krisajenkins$elm_exts$Exts_Date$toISOString = function (d) { + return A2( + _elm_lang$core$Basics_ops['++'], + A3( + _elm_lang$core$String$padLeft, + 2, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$year(d))), + A2( + _elm_lang$core$Basics_ops['++'], + '-', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString( + _krisajenkins$elm_exts$Exts_Date$monthNumber(d)), + A2( + _elm_lang$core$Basics_ops['++'], + '-', + A2( + _elm_lang$core$Basics_ops['++'], + A3( + _elm_lang$core$String$padLeft, + 2, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$day(d))), + A2( + _elm_lang$core$Basics_ops['++'], + 'T', + A2( + _elm_lang$core$Basics_ops['++'], + A3( + _elm_lang$core$String$padLeft, + 2, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$hour(d))), + A2( + _elm_lang$core$Basics_ops['++'], + ':', + A2( + _elm_lang$core$Basics_ops['++'], + A3( + _elm_lang$core$String$padLeft, + 2, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$minute(d))), + A2( + _elm_lang$core$Basics_ops['++'], + ':', + A2( + _elm_lang$core$Basics_ops['++'], + A3( + _elm_lang$core$String$padLeft, + 2, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$second(d))), + A2( + _elm_lang$core$Basics_ops['++'], + '.', + A2( + _elm_lang$core$Basics_ops['++'], + A3( + _elm_lang$core$String$padLeft, + 3, + _elm_lang$core$Native_Utils.chr('0'), + _elm_lang$core$Basics$toString( + _elm_lang$core$Date$millisecond(d))), + 'Z'))))))))))))); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Delta.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Delta.elmi new file mode 100644 index 0000000..33f4ea8 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Delta.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Delta.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Delta.elmo new file mode 100644 index 0000000..e99a087 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Delta.elmo @@ -0,0 +1,83 @@ +var _krisajenkins$elm_exts$Exts_Delta$empty = { + entering: {ctor: '[]'}, + continuing: {ctor: '[]'}, + leaving: {ctor: '[]'} +}; +var _krisajenkins$elm_exts$Exts_Delta$listContains = function (x) { + return _elm_lang$core$List$any( + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })(x)); +}; +var _krisajenkins$elm_exts$Exts_Delta$intersect = F2( + function (xs, ys) { + return A2( + _elm_lang$core$List$filter, + function (x) { + return A2(_krisajenkins$elm_exts$Exts_Delta$listContains, x, ys); + }, + xs); + }); +var _krisajenkins$elm_exts$Exts_Delta$filter = F2( + function (p, xs) { + filter: + while (true) { + var _p0 = xs; + if (_p0.ctor === '[]') { + return {ctor: '[]'}; + } else { + var _p2 = _p0._1; + var _p1 = _p0._0; + if (p(_p1)) { + return { + ctor: '::', + _0: _p1, + _1: A2(_krisajenkins$elm_exts$Exts_Delta$filter, p, _p2) + }; + } else { + var _v1 = p, + _v2 = _p2; + p = _v1; + xs = _v2; + continue filter; + } + } + } + }); +var _krisajenkins$elm_exts$Exts_Delta$remove = function (p) { + return _krisajenkins$elm_exts$Exts_Delta$filter( + function (_p3) { + return !p(_p3); + }); +}; +var _krisajenkins$elm_exts$Exts_Delta$diff = F2( + function (xs, ys) { + return A2( + _krisajenkins$elm_exts$Exts_Delta$remove, + function (x) { + return A2(_krisajenkins$elm_exts$Exts_Delta$listContains, x, ys); + }, + xs); + }); +var _krisajenkins$elm_exts$Exts_Delta$union = F2( + function (xs, ys) { + return A2( + _elm_lang$core$List$append, + xs, + A2(_krisajenkins$elm_exts$Exts_Delta$diff, ys, xs)); + }); +var _krisajenkins$elm_exts$Exts_Delta$generation = F2( + function (xs, ds) { + var actives = A2(_krisajenkins$elm_exts$Exts_Delta$union, ds.entering, ds.continuing); + var newEntries = A2(_krisajenkins$elm_exts$Exts_Delta$diff, xs, actives); + var newLeavers = A2(_krisajenkins$elm_exts$Exts_Delta$diff, actives, xs); + var newContinuers = A2(_krisajenkins$elm_exts$Exts_Delta$intersect, xs, actives); + return _elm_lang$core$Native_Utils.update( + _krisajenkins$elm_exts$Exts_Delta$empty, + {entering: newEntries, continuing: newContinuers, leaving: newLeavers}); + }); +var _krisajenkins$elm_exts$Exts_Delta$Delta = F3( + function (a, b, c) { + return {entering: a, continuing: b, leaving: c}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Dict.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Dict.elmi new file mode 100644 index 0000000..34e7d97 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Dict.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Dict.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Dict.elmo new file mode 100644 index 0000000..30d9527 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Dict.elmo @@ -0,0 +1,84 @@ +var _krisajenkins$elm_exts$Exts_Dict$updateDict = F3( + function (f, key, dict) { + var _p0 = A2(_elm_lang$core$Dict$get, key, dict); + if (_p0.ctor === 'Nothing') { + return {ctor: '_Tuple2', _0: dict, _1: _elm_lang$core$Platform_Cmd$none}; + } else { + var _p1 = f(_p0._0); + var newSubmodel = _p1._0; + var subcmd = _p1._1; + return { + ctor: '_Tuple2', + _0: A3(_elm_lang$core$Dict$insert, key, newSubmodel, dict), + _1: subcmd + }; + } + }); +var _krisajenkins$elm_exts$Exts_Dict$foldToList = F2( + function (f, dict) { + return A3( + _elm_lang$core$Dict$foldr, + F2( + function (k, v) { + return F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + })( + A2(f, k, v)); + }), + {ctor: '[]'}, + dict); + }); +var _krisajenkins$elm_exts$Exts_Dict$getWithDefault = F2( + function (def, key) { + return function (_p2) { + return A2( + _elm_lang$core$Maybe$withDefault, + def, + A2(_elm_lang$core$Dict$get, key, _p2)); + }; + }); +var _krisajenkins$elm_exts$Exts_Dict$frequency = function () { + var updater = function (m) { + var _p3 = m; + if (_p3.ctor === 'Nothing') { + return _elm_lang$core$Maybe$Just(1); + } else { + return _elm_lang$core$Maybe$Just(_p3._0 + 1); + } + }; + var reducer = function (x) { + return A2(_elm_lang$core$Dict$update, x, updater); + }; + return A2(_elm_lang$core$List$foldl, reducer, _elm_lang$core$Dict$empty); +}(); +var _krisajenkins$elm_exts$Exts_Dict$groupBy = function (f) { + var reducer = F3( + function (g, x, d) { + var key = g(x); + var newValue = { + ctor: '::', + _0: x, + _1: A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2(_elm_lang$core$Dict$get, key, d)) + }; + return A3(_elm_lang$core$Dict$insert, key, newValue, d); + }); + return A2( + _elm_lang$core$List$foldl, + reducer(f), + _elm_lang$core$Dict$empty); +}; +var _krisajenkins$elm_exts$Exts_Dict$indexBy = function (f) { + return A2( + _elm_lang$core$List$foldl, + function (x) { + return A2( + _elm_lang$core$Dict$insert, + f(x), + x); + }, + _elm_lang$core$Dict$empty); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Float.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Float.elmi new file mode 100644 index 0000000..c6bc007 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Float.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Float.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Float.elmo new file mode 100644 index 0000000..999fe77 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Float.elmo @@ -0,0 +1,7 @@ +var _krisajenkins$elm_exts$Exts_Float$roundTo = F2( + function (places, value) { + var factor = _elm_lang$core$Basics$toFloat( + Math.pow(10, places)); + return _elm_lang$core$Basics$toFloat( + _elm_lang$core$Basics$round(value * factor)) / factor; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Function.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Function.elmi new file mode 100644 index 0000000..ca2efdf Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Function.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Function.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Function.elmo new file mode 100644 index 0000000..9f83927 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Function.elmo @@ -0,0 +1,20 @@ +var _krisajenkins$elm_exts$Exts_Function_ops = _krisajenkins$elm_exts$Exts_Function_ops || {}; +_krisajenkins$elm_exts$Exts_Function_ops['<<<'] = F3( + function (f, g, env) { + return function (_p0) { + return A2( + f, + env, + A2(g, env, _p0)); + }; + }); +var _krisajenkins$elm_exts$Exts_Function_ops = _krisajenkins$elm_exts$Exts_Function_ops || {}; +_krisajenkins$elm_exts$Exts_Function_ops['>>>'] = F3( + function (f, g, env) { + return function (_p1) { + return A2( + g, + env, + A2(f, env, _p1)); + }; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Attributes.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Attributes.elmi new file mode 100644 index 0000000..1a6ec62 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Attributes.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Attributes.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Attributes.elmo new file mode 100644 index 0000000..f5bf21d --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Attributes.elmo @@ -0,0 +1,24 @@ +var _krisajenkins$elm_exts$Exts_Html_Attributes$styleList = function () { + var withActive = function (_p0) { + var _p1 = _p0; + return _p1._2 ? _elm_lang$core$Maybe$Just( + {ctor: '_Tuple2', _0: _p1._0, _1: _p1._1}) : _elm_lang$core$Maybe$Nothing; + }; + return function (_p2) { + return _elm_lang$html$Html_Attributes$style( + A2(_elm_lang$core$List$filterMap, withActive, _p2)); + }; +}(); +var _krisajenkins$elm_exts$Exts_Html_Attributes$defaultValue = _elm_lang$html$Html_Attributes$property('defaultValue'); +var _krisajenkins$elm_exts$Exts_Html_Attributes$defaultString = function (_p3) { + return _krisajenkins$elm_exts$Exts_Html_Attributes$defaultValue( + _elm_lang$core$Json_Encode$string(_p3)); +}; +var _krisajenkins$elm_exts$Exts_Html_Attributes$defaultInt = function (_p4) { + return _krisajenkins$elm_exts$Exts_Html_Attributes$defaultValue( + _elm_lang$core$Json_Encode$int(_p4)); +}; +var _krisajenkins$elm_exts$Exts_Html_Attributes$defaultFloat = function (_p5) { + return _krisajenkins$elm_exts$Exts_Html_Attributes$defaultValue( + _elm_lang$core$Json_Encode$float(_p5)); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap-Glyphicons.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap-Glyphicons.elmi new file mode 100644 index 0000000..4260295 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap-Glyphicons.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap-Glyphicons.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap-Glyphicons.elmo new file mode 100644 index 0000000..f1ccf25 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap-Glyphicons.elmo @@ -0,0 +1,822 @@ +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$glyphiconClass = function (icon) { + return A2( + _elm_lang$core$Basics_ops['++'], + 'glyphicon-', + function () { + var _p0 = icon; + switch (_p0.ctor) { + case 'Asterisk': + return 'asterisk'; + case 'Plus': + return 'plus'; + case 'Euro': + return 'euro'; + case 'Eur': + return 'eur'; + case 'Minus': + return 'minus'; + case 'Cloud': + return 'cloud'; + case 'Envelope': + return 'envelope'; + case 'Pencil': + return 'pencil'; + case 'Glass': + return 'glass'; + case 'Music': + return 'music'; + case 'Search': + return 'search'; + case 'Heart': + return 'heart'; + case 'Star': + return 'star'; + case 'StarEmpty': + return 'star-empty'; + case 'User': + return 'user'; + case 'Film': + return 'film'; + case 'ThLarge': + return 'th-large'; + case 'Th': + return 'th'; + case 'ThList': + return 'th-list'; + case 'Ok': + return 'ok'; + case 'Remove': + return 'remove'; + case 'ZoomIn': + return 'zoom-in'; + case 'ZoomOut': + return 'zoom-out'; + case 'Off': + return 'off'; + case 'Signal': + return 'signal'; + case 'Cog': + return 'cog'; + case 'Trash': + return 'trash'; + case 'Home': + return 'home'; + case 'File': + return 'file'; + case 'Time': + return 'time'; + case 'Road': + return 'road'; + case 'DownloadAlt': + return 'download-alt'; + case 'Download': + return 'download'; + case 'Upload': + return 'upload'; + case 'Inbox': + return 'inbox'; + case 'PlayCircle': + return 'play-circle'; + case 'Repeat': + return 'repeat'; + case 'Refresh': + return 'refresh'; + case 'ListAlt': + return 'list-alt'; + case 'Lock': + return 'lock'; + case 'Flag': + return 'flag'; + case 'Headphones': + return 'headphones'; + case 'VolumeOff': + return 'volume-off'; + case 'VolumeDown': + return 'volume-down'; + case 'VolumeUp': + return 'volume-up'; + case 'Qrcode': + return 'qrcode'; + case 'Barcode': + return 'barcode'; + case 'Tag': + return 'tag'; + case 'Tags': + return 'tags'; + case 'Book': + return 'book'; + case 'Bookmark': + return 'bookmark'; + case 'Print': + return 'print'; + case 'Camera': + return 'camera'; + case 'Font': + return 'font'; + case 'Bold': + return 'bold'; + case 'Italic': + return 'italic'; + case 'TextHeight': + return 'text-height'; + case 'TextWidth': + return 'text-width'; + case 'AlignLeft': + return 'align-left'; + case 'AlignCenter': + return 'align-center'; + case 'AlignRight': + return 'align-right'; + case 'AlignJustify': + return 'align-justify'; + case 'List': + return 'list'; + case 'IndentLeft': + return 'indent-left'; + case 'IndentRight': + return 'indent-right'; + case 'FacetimeVideo': + return 'facetime-video'; + case 'Picture': + return 'picture'; + case 'MapMarker': + return 'map-marker'; + case 'Adjust': + return 'adjust'; + case 'Tint': + return 'tint'; + case 'Edit': + return 'edit'; + case 'Share': + return 'share'; + case 'Check': + return 'check'; + case 'Move': + return 'move'; + case 'StepBackward': + return 'step-backward'; + case 'FastBackward': + return 'fast-backward'; + case 'Backward': + return 'backward'; + case 'Play': + return 'play'; + case 'Pause': + return 'pause'; + case 'Stop': + return 'stop'; + case 'Forward': + return 'forward'; + case 'FastForward': + return 'fast-forward'; + case 'StepForward': + return 'step-forward'; + case 'Eject': + return 'eject'; + case 'ChevronLeft': + return 'chevron-left'; + case 'ChevronRight': + return 'chevron-right'; + case 'PlusSign': + return 'plus-sign'; + case 'MinusSign': + return 'minus-sign'; + case 'RemoveSign': + return 'remove-sign'; + case 'OkSign': + return 'ok-sign'; + case 'QuestionSign': + return 'question-sign'; + case 'InfoSign': + return 'info-sign'; + case 'Screenshot': + return 'screenshot'; + case 'RemoveCircle': + return 'remove-circle'; + case 'OkCircle': + return 'ok-circle'; + case 'BanCircle': + return 'ban-circle'; + case 'ArrowLeft': + return 'arrow-left'; + case 'ArrowRight': + return 'arrow-right'; + case 'ArrowUp': + return 'arrow-up'; + case 'ArrowDown': + return 'arrow-down'; + case 'ShareAlt': + return 'share-alt'; + case 'ResizeFull': + return 'resize-full'; + case 'ResizeSmall': + return 'resize-small'; + case 'ExclamationSign': + return 'exclamation-sign'; + case 'Gift': + return 'gift'; + case 'Leaf': + return 'leaf'; + case 'Fire': + return 'fire'; + case 'EyeOpen': + return 'eye-open'; + case 'EyeClose': + return 'eye-close'; + case 'WarningSign': + return 'warning-sign'; + case 'Plane': + return 'plane'; + case 'Calendar': + return 'calendar'; + case 'Random': + return 'random'; + case 'Comment': + return 'comment'; + case 'Magnet': + return 'magnet'; + case 'ChevronUp': + return 'chevron-up'; + case 'ChevronDown': + return 'chevron-down'; + case 'Retweet': + return 'retweet'; + case 'ShoppingCart': + return 'shopping-cart'; + case 'FolderClose': + return 'folder-close'; + case 'FolderOpen': + return 'folder-open'; + case 'ResizeVertical': + return 'resize-vertical'; + case 'ResizeHorizontal': + return 'resize-horizontal'; + case 'Hdd': + return 'hdd'; + case 'Bullhorn': + return 'bullhorn'; + case 'Bell': + return 'bell'; + case 'Certificate': + return 'certificate'; + case 'ThumbsUp': + return 'thumbs-up'; + case 'ThumbsDown': + return 'thumbs-down'; + case 'HandRight': + return 'hand-right'; + case 'HandLeft': + return 'hand-left'; + case 'HandUp': + return 'hand-up'; + case 'HandDown': + return 'hand-down'; + case 'CircleArrowRight': + return 'circle-arrow-right'; + case 'CircleArrowLeft': + return 'circle-arrow-left'; + case 'CircleArrowUp': + return 'circle-arrow-up'; + case 'CircleArrowDown': + return 'circle-arrow-down'; + case 'Globe': + return 'globe'; + case 'Wrench': + return 'wrench'; + case 'Tasks': + return 'tasks'; + case 'Filter': + return 'filter'; + case 'Briefcase': + return 'briefcase'; + case 'Fullscreen': + return 'fullscreen'; + case 'Dashboard': + return 'dashboard'; + case 'Paperclip': + return 'paperclip'; + case 'HeartEmpty': + return 'heart-empty'; + case 'Link': + return 'link'; + case 'Phone': + return 'phone'; + case 'Pushpin': + return 'pushpin'; + case 'Usd': + return 'usd'; + case 'Gbp': + return 'gbp'; + case 'Sort': + return 'sort'; + case 'SortByAlphabet': + return 'sort-by-alphabet'; + case 'SortByAlphabetAlt': + return 'sort-by-alphabet-alt'; + case 'SortByOrder': + return 'sort-by-order'; + case 'SortByOrderAlt': + return 'sort-by-order-alt'; + case 'SortByAttributes': + return 'sort-by-attributes'; + case 'SortByAttributesAlt': + return 'sort-by-attributes-alt'; + case 'Unchecked': + return 'unchecked'; + case 'Expand': + return 'expand'; + case 'CollapseDown': + return 'collapse-down'; + case 'CollapseUp': + return 'collapse-up'; + case 'LogIn': + return 'log-in'; + case 'Flash': + return 'flash'; + case 'LogOut': + return 'log-out'; + case 'NewWindow': + return 'new-window'; + case 'Record': + return 'record'; + case 'Save': + return 'save'; + case 'Open': + return 'open'; + case 'Saved': + return 'saved'; + case 'Import': + return 'import'; + case 'Export': + return 'export'; + case 'Send': + return 'send'; + case 'FloppyDisk': + return 'floppy-disk'; + case 'FloppySaved': + return 'floppy-saved'; + case 'FloppyRemove': + return 'floppy-remove'; + case 'FloppySave': + return 'floppy-save'; + case 'FloppyOpen': + return 'floppy-open'; + case 'CreditCard': + return 'credit-card'; + case 'Transfer': + return 'transfer'; + case 'Cutlery': + return 'cutlery'; + case 'Header': + return 'header'; + case 'Compressed': + return 'compressed'; + case 'Earphone': + return 'earphone'; + case 'PhoneAlt': + return 'phone-alt'; + case 'Tower': + return 'tower'; + case 'Stats': + return 'stats'; + case 'SdVideo': + return 'sd-video'; + case 'HdVideo': + return 'hd-video'; + case 'Subtitles': + return 'subtitles'; + case 'SoundStereo': + return 'sound-stereo'; + case 'SoundDolby': + return 'sound-dolby'; + case 'Sound51': + return 'sound-5-1'; + case 'Sound61': + return 'sound-6-1'; + case 'Sound71': + return 'sound-7-1'; + case 'CopyrightMark': + return 'copyright-mark'; + case 'RegistrationMark': + return 'registration-mark'; + case 'CloudDownload': + return 'cloud-download'; + case 'CloudUpload': + return 'cloud-upload'; + case 'TreeConifer': + return 'tree-conifer'; + case 'TreeDeciduous': + return 'tree-deciduous'; + case 'Cd': + return 'cd'; + case 'SaveFile': + return 'save-file'; + case 'OpenFile': + return 'open-file'; + case 'LevelUp': + return 'level-up'; + case 'Copy': + return 'copy'; + case 'Paste': + return 'paste'; + case 'Alert': + return 'alert'; + case 'Equalizer': + return 'equalizer'; + case 'King': + return 'king'; + case 'Queen': + return 'queen'; + case 'Pawn': + return 'pawn'; + case 'Bishop': + return 'bishop'; + case 'Knight': + return 'knight'; + case 'BabyFormula': + return 'baby-formula'; + case 'Tent': + return 'tent'; + case 'Blackboard': + return 'blackboard'; + case 'Bed': + return 'bed'; + case 'Apple': + return 'apple'; + case 'Erase': + return 'erase'; + case 'Hourglass': + return 'hourglass'; + case 'Lamp': + return 'lamp'; + case 'Duplicate': + return 'duplicate'; + case 'PiggyBank': + return 'piggy-bank'; + case 'Scissors': + return 'scissors'; + case 'Bitcoin': + return 'bitcoin'; + case 'Btc': + return 'btc'; + case 'Xbt': + return 'xbt'; + case 'Yen': + return 'yen'; + case 'Jpy': + return 'jpy'; + case 'Ruble': + return 'ruble'; + case 'Rub': + return 'rub'; + case 'Scale': + return 'scale'; + case 'IceLolly': + return 'ice-lolly'; + case 'IceLollyTasted': + return 'ice-lolly-tasted'; + case 'Education': + return 'education'; + case 'OptionHorizontal': + return 'option-horizontal'; + case 'OptionVertical': + return 'option-vertical'; + case 'MenuHamburger': + return 'menu-hamburger'; + case 'ModalWindow': + return 'modal-window'; + case 'Oil': + return 'oil'; + case 'Grain': + return 'grain'; + case 'Sunglasses': + return 'sunglasses'; + case 'TextSize': + return 'text-size'; + case 'TextColor': + return 'text-color'; + case 'TextBackground': + return 'text-background'; + case 'ObjectAlignTop': + return 'object-align-top'; + case 'ObjectAlignBottom': + return 'object-align-bottom'; + case 'ObjectAlignHorizontal': + return 'object-align-horizontal'; + case 'ObjectAlignLeft': + return 'object-align-left'; + case 'ObjectAlignVertical': + return 'object-align-vertical'; + case 'ObjectAlignRight': + return 'object-align-right'; + case 'TriangleRight': + return 'triangle-right'; + case 'TriangleLeft': + return 'triangle-left'; + case 'TriangleBottom': + return 'triangle-bottom'; + case 'TriangleTop': + return 'triangle-top'; + case 'Console': + return 'console'; + case 'Superscript': + return 'superscript'; + case 'Subscript': + return 'subscript'; + case 'MenuLeft': + return 'menu-left'; + case 'MenuRight': + return 'menu-right'; + case 'MenuDown': + return 'menu-down'; + default: + return 'menu-up'; + } + }()); +}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$glyphicon = function (icon) { + return A2( + _elm_lang$html$Html$span, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$classList( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'glyphicon', _1: true}, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$glyphiconClass(icon), + _1: true + }, + _1: {ctor: '[]'} + } + }), + _1: {ctor: '[]'} + }, + {ctor: '[]'}); +}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$MenuUp = {ctor: 'MenuUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$MenuDown = {ctor: 'MenuDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$MenuRight = {ctor: 'MenuRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$MenuLeft = {ctor: 'MenuLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Subscript = {ctor: 'Subscript'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Superscript = {ctor: 'Superscript'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Console = {ctor: 'Console'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TriangleTop = {ctor: 'TriangleTop'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TriangleBottom = {ctor: 'TriangleBottom'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TriangleLeft = {ctor: 'TriangleLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TriangleRight = {ctor: 'TriangleRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ObjectAlignRight = {ctor: 'ObjectAlignRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ObjectAlignVertical = {ctor: 'ObjectAlignVertical'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ObjectAlignLeft = {ctor: 'ObjectAlignLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ObjectAlignHorizontal = {ctor: 'ObjectAlignHorizontal'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ObjectAlignBottom = {ctor: 'ObjectAlignBottom'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ObjectAlignTop = {ctor: 'ObjectAlignTop'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TextBackground = {ctor: 'TextBackground'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TextColor = {ctor: 'TextColor'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TextSize = {ctor: 'TextSize'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Sunglasses = {ctor: 'Sunglasses'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Grain = {ctor: 'Grain'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Oil = {ctor: 'Oil'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ModalWindow = {ctor: 'ModalWindow'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$MenuHamburger = {ctor: 'MenuHamburger'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$OptionVertical = {ctor: 'OptionVertical'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$OptionHorizontal = {ctor: 'OptionHorizontal'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Education = {ctor: 'Education'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$IceLollyTasted = {ctor: 'IceLollyTasted'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$IceLolly = {ctor: 'IceLolly'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Scale = {ctor: 'Scale'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Rub = {ctor: 'Rub'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Ruble = {ctor: 'Ruble'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Jpy = {ctor: 'Jpy'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Yen = {ctor: 'Yen'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Xbt = {ctor: 'Xbt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Btc = {ctor: 'Btc'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Bitcoin = {ctor: 'Bitcoin'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Scissors = {ctor: 'Scissors'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$PiggyBank = {ctor: 'PiggyBank'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Duplicate = {ctor: 'Duplicate'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Lamp = {ctor: 'Lamp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Hourglass = {ctor: 'Hourglass'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Erase = {ctor: 'Erase'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Apple = {ctor: 'Apple'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Bed = {ctor: 'Bed'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Blackboard = {ctor: 'Blackboard'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Tent = {ctor: 'Tent'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$BabyFormula = {ctor: 'BabyFormula'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Knight = {ctor: 'Knight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Bishop = {ctor: 'Bishop'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Pawn = {ctor: 'Pawn'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Queen = {ctor: 'Queen'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$King = {ctor: 'King'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Equalizer = {ctor: 'Equalizer'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Alert = {ctor: 'Alert'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Paste = {ctor: 'Paste'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Copy = {ctor: 'Copy'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$LevelUp = {ctor: 'LevelUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$OpenFile = {ctor: 'OpenFile'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SaveFile = {ctor: 'SaveFile'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Cd = {ctor: 'Cd'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TreeDeciduous = {ctor: 'TreeDeciduous'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TreeConifer = {ctor: 'TreeConifer'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CloudUpload = {ctor: 'CloudUpload'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CloudDownload = {ctor: 'CloudDownload'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$RegistrationMark = {ctor: 'RegistrationMark'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CopyrightMark = {ctor: 'CopyrightMark'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Sound71 = {ctor: 'Sound71'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Sound61 = {ctor: 'Sound61'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Sound51 = {ctor: 'Sound51'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SoundDolby = {ctor: 'SoundDolby'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SoundStereo = {ctor: 'SoundStereo'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Subtitles = {ctor: 'Subtitles'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$HdVideo = {ctor: 'HdVideo'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SdVideo = {ctor: 'SdVideo'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Stats = {ctor: 'Stats'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Tower = {ctor: 'Tower'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$PhoneAlt = {ctor: 'PhoneAlt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Earphone = {ctor: 'Earphone'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Compressed = {ctor: 'Compressed'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Header = {ctor: 'Header'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Cutlery = {ctor: 'Cutlery'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Transfer = {ctor: 'Transfer'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CreditCard = {ctor: 'CreditCard'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FloppyOpen = {ctor: 'FloppyOpen'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FloppySave = {ctor: 'FloppySave'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FloppyRemove = {ctor: 'FloppyRemove'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FloppySaved = {ctor: 'FloppySaved'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FloppyDisk = {ctor: 'FloppyDisk'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Send = {ctor: 'Send'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Export = {ctor: 'Export'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Import = {ctor: 'Import'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Saved = {ctor: 'Saved'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Open = {ctor: 'Open'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Save = {ctor: 'Save'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Record = {ctor: 'Record'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$NewWindow = {ctor: 'NewWindow'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$LogOut = {ctor: 'LogOut'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Flash = {ctor: 'Flash'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$LogIn = {ctor: 'LogIn'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CollapseUp = {ctor: 'CollapseUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CollapseDown = {ctor: 'CollapseDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Expand = {ctor: 'Expand'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Unchecked = {ctor: 'Unchecked'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SortByAttributesAlt = {ctor: 'SortByAttributesAlt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SortByAttributes = {ctor: 'SortByAttributes'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SortByOrderAlt = {ctor: 'SortByOrderAlt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SortByOrder = {ctor: 'SortByOrder'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SortByAlphabetAlt = {ctor: 'SortByAlphabetAlt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$SortByAlphabet = {ctor: 'SortByAlphabet'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Sort = {ctor: 'Sort'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Gbp = {ctor: 'Gbp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Usd = {ctor: 'Usd'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Pushpin = {ctor: 'Pushpin'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Phone = {ctor: 'Phone'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Link = {ctor: 'Link'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$HeartEmpty = {ctor: 'HeartEmpty'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Paperclip = {ctor: 'Paperclip'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Dashboard = {ctor: 'Dashboard'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Fullscreen = {ctor: 'Fullscreen'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Briefcase = {ctor: 'Briefcase'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Filter = {ctor: 'Filter'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Tasks = {ctor: 'Tasks'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Wrench = {ctor: 'Wrench'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Globe = {ctor: 'Globe'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CircleArrowDown = {ctor: 'CircleArrowDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CircleArrowUp = {ctor: 'CircleArrowUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CircleArrowLeft = {ctor: 'CircleArrowLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$CircleArrowRight = {ctor: 'CircleArrowRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$HandDown = {ctor: 'HandDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$HandUp = {ctor: 'HandUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$HandLeft = {ctor: 'HandLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$HandRight = {ctor: 'HandRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ThumbsDown = {ctor: 'ThumbsDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ThumbsUp = {ctor: 'ThumbsUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Certificate = {ctor: 'Certificate'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Bell = {ctor: 'Bell'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Bullhorn = {ctor: 'Bullhorn'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Hdd = {ctor: 'Hdd'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ResizeHorizontal = {ctor: 'ResizeHorizontal'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ResizeVertical = {ctor: 'ResizeVertical'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FolderOpen = {ctor: 'FolderOpen'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FolderClose = {ctor: 'FolderClose'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ShoppingCart = {ctor: 'ShoppingCart'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Retweet = {ctor: 'Retweet'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ChevronDown = {ctor: 'ChevronDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ChevronUp = {ctor: 'ChevronUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Magnet = {ctor: 'Magnet'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Comment = {ctor: 'Comment'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Random = {ctor: 'Random'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Calendar = {ctor: 'Calendar'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Plane = {ctor: 'Plane'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$WarningSign = {ctor: 'WarningSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$EyeClose = {ctor: 'EyeClose'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$EyeOpen = {ctor: 'EyeOpen'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Fire = {ctor: 'Fire'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Leaf = {ctor: 'Leaf'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Gift = {ctor: 'Gift'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ExclamationSign = {ctor: 'ExclamationSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ResizeSmall = {ctor: 'ResizeSmall'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ResizeFull = {ctor: 'ResizeFull'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ShareAlt = {ctor: 'ShareAlt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ArrowDown = {ctor: 'ArrowDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ArrowUp = {ctor: 'ArrowUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ArrowRight = {ctor: 'ArrowRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ArrowLeft = {ctor: 'ArrowLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$BanCircle = {ctor: 'BanCircle'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$OkCircle = {ctor: 'OkCircle'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$RemoveCircle = {ctor: 'RemoveCircle'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Screenshot = {ctor: 'Screenshot'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$InfoSign = {ctor: 'InfoSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$QuestionSign = {ctor: 'QuestionSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$OkSign = {ctor: 'OkSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$RemoveSign = {ctor: 'RemoveSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$MinusSign = {ctor: 'MinusSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$PlusSign = {ctor: 'PlusSign'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ChevronRight = {ctor: 'ChevronRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ChevronLeft = {ctor: 'ChevronLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Eject = {ctor: 'Eject'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$StepForward = {ctor: 'StepForward'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FastForward = {ctor: 'FastForward'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Forward = {ctor: 'Forward'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Stop = {ctor: 'Stop'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Pause = {ctor: 'Pause'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Play = {ctor: 'Play'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Backward = {ctor: 'Backward'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FastBackward = {ctor: 'FastBackward'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$StepBackward = {ctor: 'StepBackward'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Move = {ctor: 'Move'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Check = {ctor: 'Check'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Share = {ctor: 'Share'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Edit = {ctor: 'Edit'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Tint = {ctor: 'Tint'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Adjust = {ctor: 'Adjust'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$MapMarker = {ctor: 'MapMarker'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Picture = {ctor: 'Picture'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$FacetimeVideo = {ctor: 'FacetimeVideo'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$IndentRight = {ctor: 'IndentRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$IndentLeft = {ctor: 'IndentLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$List = {ctor: 'List'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$AlignJustify = {ctor: 'AlignJustify'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$AlignRight = {ctor: 'AlignRight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$AlignCenter = {ctor: 'AlignCenter'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$AlignLeft = {ctor: 'AlignLeft'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TextWidth = {ctor: 'TextWidth'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$TextHeight = {ctor: 'TextHeight'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Italic = {ctor: 'Italic'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Bold = {ctor: 'Bold'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Font = {ctor: 'Font'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Camera = {ctor: 'Camera'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Print = {ctor: 'Print'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Bookmark = {ctor: 'Bookmark'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Book = {ctor: 'Book'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Tags = {ctor: 'Tags'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Tag = {ctor: 'Tag'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Barcode = {ctor: 'Barcode'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Qrcode = {ctor: 'Qrcode'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$VolumeUp = {ctor: 'VolumeUp'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$VolumeDown = {ctor: 'VolumeDown'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$VolumeOff = {ctor: 'VolumeOff'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Headphones = {ctor: 'Headphones'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Flag = {ctor: 'Flag'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Lock = {ctor: 'Lock'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ListAlt = {ctor: 'ListAlt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Refresh = {ctor: 'Refresh'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Repeat = {ctor: 'Repeat'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$PlayCircle = {ctor: 'PlayCircle'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Inbox = {ctor: 'Inbox'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Upload = {ctor: 'Upload'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Download = {ctor: 'Download'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$DownloadAlt = {ctor: 'DownloadAlt'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Road = {ctor: 'Road'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Time = {ctor: 'Time'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$File = {ctor: 'File'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Home = {ctor: 'Home'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Trash = {ctor: 'Trash'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Cog = {ctor: 'Cog'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Signal = {ctor: 'Signal'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Off = {ctor: 'Off'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ZoomOut = {ctor: 'ZoomOut'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ZoomIn = {ctor: 'ZoomIn'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Remove = {ctor: 'Remove'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Ok = {ctor: 'Ok'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ThList = {ctor: 'ThList'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Th = {ctor: 'Th'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$ThLarge = {ctor: 'ThLarge'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Film = {ctor: 'Film'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$User = {ctor: 'User'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$StarEmpty = {ctor: 'StarEmpty'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Star = {ctor: 'Star'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Heart = {ctor: 'Heart'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Search = {ctor: 'Search'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Music = {ctor: 'Music'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Glass = {ctor: 'Glass'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Pencil = {ctor: 'Pencil'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Envelope = {ctor: 'Envelope'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Cloud = {ctor: 'Cloud'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Minus = {ctor: 'Minus'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Eur = {ctor: 'Eur'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Euro = {ctor: 'Euro'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Plus = {ctor: 'Plus'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap_Glyphicons$Asterisk = {ctor: 'Asterisk'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap.elmi new file mode 100644 index 0000000..c962ddb Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap.elmo new file mode 100644 index 0000000..e641a3e --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Bootstrap.elmo @@ -0,0 +1,264 @@ +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$video = F2( + function (ratio, url) { + var ratioClass = function () { + var _p0 = ratio; + if (_p0.ctor === 'SixteenByNine') { + return 'embed-responsive-16by9'; + } else { + return 'embed-responsive-4by3'; + } + }(); + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$h1, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text('About'), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('embed-responsive'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$iframe, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('embed-responsive-item'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$src(url), + _1: {ctor: '[]'} + } + }, + {ctor: '[]'}), + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + }); + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$badge = _elm_lang$html$Html$span( + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('badge'), + _1: {ctor: '[]'} + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$well = _elm_lang$html$Html$div( + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('well'), + _1: {ctor: '[]'} + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$jumbotron = _elm_lang$html$Html$div( + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('jumbotron'), + _1: {ctor: '[]'} + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$clearfix = A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('clearfix'), + _1: {ctor: '[]'} + }, + {ctor: '[]'}); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$empty = A2( + _elm_lang$html$Html$span, + {ctor: '[]'}, + {ctor: '[]'}); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$formGroup = _elm_lang$html$Html$div( + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('form-group'), + _1: {ctor: '[]'} + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$row = _elm_lang$html$Html$div( + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('row'), + _1: {ctor: '[]'} + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$twoColumns = F2( + function (left, right) { + return _krisajenkins$elm_exts$Exts_Html_Bootstrap$row( + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('col-xs-6'), + _1: {ctor: '[]'} + }, + left), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('col-xs-6'), + _1: {ctor: '[]'} + }, + right), + _1: {ctor: '[]'} + } + }); + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$containerFluid = _elm_lang$html$Html$div( + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('container-fluid'), + _1: {ctor: '[]'} + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$container = _elm_lang$html$Html$div( + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('container'), + _1: {ctor: '[]'} + }); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$stylesheet = A3( + _elm_lang$html$Html$node, + 'link', + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$rel('stylesheet'), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$href('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'), + _1: {ctor: '[]'} + } + }, + {ctor: '[]'}); +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$FourByThree = {ctor: 'FourByThree'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$SixteenByNine = {ctor: 'SixteenByNine'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$Left = {ctor: 'Left'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$Bottom = {ctor: 'Bottom'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$Right = {ctor: 'Right'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$Top = {ctor: 'Top'}; +var _krisajenkins$elm_exts$Exts_Html_Bootstrap$popover = F5( + function (direction, isShown, styles, title, body) { + return A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$classList( + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'popover fade', _1: true}, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'in', _1: isShown}, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'top', + _1: _elm_lang$core$Native_Utils.eq(direction, _krisajenkins$elm_exts$Exts_Html_Bootstrap$Top) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'right', + _1: _elm_lang$core$Native_Utils.eq(direction, _krisajenkins$elm_exts$Exts_Html_Bootstrap$Right) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'bottom', + _1: _elm_lang$core$Native_Utils.eq(direction, _krisajenkins$elm_exts$Exts_Html_Bootstrap$Bottom) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'left', + _1: _elm_lang$core$Native_Utils.eq(direction, _krisajenkins$elm_exts$Exts_Html_Bootstrap$Left) + }, + _1: {ctor: '[]'} + } + } + } + } + } + }), + _1: { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$style( + A2( + _elm_lang$core$Basics_ops['++'], + styles, + { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'display', _1: 'block'}, + _1: {ctor: '[]'} + })), + _1: {ctor: '[]'} + } + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('arrow'), + _1: {ctor: '[]'} + }, + {ctor: '[]'}), + _1: { + ctor: '::', + _0: function () { + var _p1 = title; + if (_p1.ctor === 'Just') { + return A2( + _elm_lang$html$Html$h3, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('popover-title'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: _elm_lang$html$Html$text(_p1._0), + _1: {ctor: '[]'} + }); + } else { + return _krisajenkins$elm_exts$Exts_Html_Bootstrap$empty; + } + }(), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$div, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('popover-content'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: body, + _1: {ctor: '[]'} + }), + _1: {ctor: '[]'} + } + } + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Events.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Events.elmi new file mode 100644 index 0000000..314726b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Events.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Events.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Events.elmo new file mode 100644 index 0000000..02235ec --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Events.elmo @@ -0,0 +1,30 @@ +var _krisajenkins$elm_exts$Exts_Html_Events$emptyIsNothing = function (s) { + return _elm_lang$core$Native_Utils.eq(s, '') ? _elm_lang$core$Maybe$Nothing : _elm_lang$core$Maybe$Just(s); +}; +var _krisajenkins$elm_exts$Exts_Html_Events$maybeTargetValue = A2(_elm_lang$core$Json_Decode$map, _krisajenkins$elm_exts$Exts_Html_Events$emptyIsNothing, _elm_lang$html$Html_Events$targetValue); +var _krisajenkins$elm_exts$Exts_Html_Events$onSelect = function (f) { + return A2( + _elm_lang$html$Html_Events$on, + 'change', + A2(_elm_lang$core$Json_Decode$map, f, _krisajenkins$elm_exts$Exts_Html_Events$maybeTargetValue)); +}; +var _krisajenkins$elm_exts$Exts_Html_Events$keyCodeIs = F2( + function (expected, actual) { + return _elm_lang$core$Native_Utils.eq(expected, actual) ? _elm_lang$core$Result$Ok( + {ctor: '_Tuple0'}) : _elm_lang$core$Result$Err('Not the right key code'); + }); +var _krisajenkins$elm_exts$Exts_Html_Events$enterKey = _krisajenkins$elm_exts$Exts_Html_Events$keyCodeIs(13); +var _krisajenkins$elm_exts$Exts_Html_Events$onEnter = function (message) { + return A3( + _elm_lang$html$Html_Events$onWithOptions, + 'keydown', + {preventDefault: true, stopPropagation: false}, + A2( + _elm_lang$core$Json_Decode$andThen, + _elm_lang$core$Basics$always( + _elm_lang$core$Json_Decode$succeed(message)), + A2( + _elm_lang$core$Json_Decode$andThen, + _krisajenkins$elm_exts$Exts_Json_Decode$parseWith(_krisajenkins$elm_exts$Exts_Html_Events$enterKey), + _elm_lang$html$Html_Events$keyCode))); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Table.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Table.elmi new file mode 100644 index 0000000..1c8861c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Table.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Table.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Table.elmo new file mode 100644 index 0000000..f81aea2 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html-Table.elmo @@ -0,0 +1,105 @@ +var _krisajenkins$elm_exts$Exts_Html_Table$valueGroup = F2( + function (fs, x) { + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + A2( + _elm_lang$core$List$map, + function (f) { + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: f(x), + _1: {ctor: '[]'} + }); + }, + fs)); + }); +var _krisajenkins$elm_exts$Exts_Html_Table$titleGroup = function (strings) { + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + A2( + _elm_lang$core$List$map, + function (s) { + return A2( + _elm_lang$html$Html$div, + {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text(s), + _1: {ctor: '[]'} + }); + }, + strings)); +}; +var _krisajenkins$elm_exts$Exts_Html_Table$simpleTableRow = F2( + function (tableDef, item) { + return A2( + _elm_lang$html$Html$tr, + {ctor: '[]'}, + A2( + _elm_lang$core$List$map, + function (_p0) { + var _p1 = _p0; + return A2( + _elm_lang$html$Html$td, + {ctor: '[]'}, + { + ctor: '::', + _0: _p1._1(item), + _1: {ctor: '[]'} + }); + }, + tableDef)); + }); +var _krisajenkins$elm_exts$Exts_Html_Table$simpleTable = F2( + function (tableDef, items) { + return A2( + _elm_lang$html$Html$table, + { + ctor: '::', + _0: _elm_lang$html$Html_Attributes$class('table table-bordered table-hover'), + _1: {ctor: '[]'} + }, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$thead, + {ctor: '[]'}, + { + ctor: '::', + _0: A2( + _elm_lang$html$Html$tr, + {ctor: '[]'}, + A2( + _elm_lang$core$List$map, + function (_p2) { + var _p3 = _p2; + return A2( + _elm_lang$html$Html$th, + {ctor: '[]'}, + { + ctor: '::', + _0: _p3._0, + _1: {ctor: '[]'} + }); + }, + tableDef)), + _1: {ctor: '[]'} + }), + _1: { + ctor: '::', + _0: A2( + _elm_lang$html$Html$tbody, + {ctor: '[]'}, + A2( + _elm_lang$core$List$map, + _krisajenkins$elm_exts$Exts_Html_Table$simpleTableRow(tableDef), + items)), + _1: {ctor: '[]'} + } + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html.elmi new file mode 100644 index 0000000..da228ed Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html.elmo new file mode 100644 index 0000000..345fa52 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Html.elmo @@ -0,0 +1,60 @@ +var _krisajenkins$elm_exts$Exts_Html$nbsp = ' '; +var _krisajenkins$elm_exts$Exts_Html$matchText = F3( + function (attributes, search, string) { + var sliceSegments = F2( + function (_p1, _p0) { + var _p2 = _p1; + var _p3 = _p0; + return A2( + _elm_lang$html$Html$span, + _p2._1 ? attributes : {ctor: '[]'}, + { + ctor: '::', + _0: _elm_lang$html$Html$text( + A3(_elm_lang$core$String$slice, _p2._0, _p3._0, string)), + _1: {ctor: '[]'} + }); + }); + var matchStringEnd = { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: _elm_lang$core$String$length(string), + _1: false + }, + _1: {ctor: '[]'} + }; + var matchStringStart = { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 0, _1: false}, + _1: {ctor: '[]'} + }; + var matchBoundaries = function (place) { + return { + ctor: '::', + _0: {ctor: '_Tuple2', _0: place.index, _1: true}, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: place.index + _elm_lang$core$String$length(place.match), + _1: false + }, + _1: {ctor: '[]'} + } + }; + }; + var matches = A3(_elm_lang$core$Regex$find, _elm_lang$core$Regex$All, search, string); + var allSegmentBoundaries = A2( + _elm_lang$core$Basics_ops['++'], + matchStringStart, + A2( + _elm_lang$core$Basics_ops['++'], + A2(_elm_lang$core$List$concatMap, matchBoundaries, matches), + matchStringEnd)); + return A3( + _elm_lang$core$List$map2, + sliceSegments, + allSegmentBoundaries, + _krisajenkins$elm_exts$Exts_List$rest(allSegmentBoundaries)); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Int.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Int.elmi new file mode 100644 index 0000000..7e3d124 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Int.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Int.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Int.elmo new file mode 100644 index 0000000..e2962ee --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Int.elmo @@ -0,0 +1,4 @@ +var _krisajenkins$elm_exts$Exts_Int$floorBy = F2( + function (factor, n) { + return _elm_lang$core$Native_Utils.eq(factor, 0) ? _elm_lang$core$Maybe$Nothing : _elm_lang$core$Maybe$Just(factor * ((n / factor) | 0)); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Decode.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Decode.elmi new file mode 100644 index 0000000..2010ba4 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Decode.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Decode.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Decode.elmo new file mode 100644 index 0000000..7553339 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Decode.elmo @@ -0,0 +1,25 @@ +var _krisajenkins$elm_exts$Exts_Json_Decode$parseWith = F2( + function (f, input) { + var _p0 = f(input); + if (_p0.ctor === 'Err') { + return _elm_lang$core$Json_Decode$fail(_p0._0); + } else { + return _elm_lang$core$Json_Decode$succeed(_p0._0); + } + }); +var _krisajenkins$elm_exts$Exts_Json_Decode$decodeDate = A2( + _elm_lang$core$Json_Decode$andThen, + _krisajenkins$elm_exts$Exts_Json_Decode$parseWith(_elm_lang$core$Date$fromString), + _elm_lang$core$Json_Decode$string); +var _krisajenkins$elm_exts$Exts_Json_Decode$decodeTime = A2(_elm_lang$core$Json_Decode$map, _elm_lang$core$Date$fromTime, _elm_lang$core$Json_Decode$float); +var _krisajenkins$elm_exts$Exts_Json_Decode$parseEmptyOrString = function (string) { + return _elm_lang$core$String$isEmpty( + _elm_lang$core$String$trim(string)) ? _elm_lang$core$Maybe$Nothing : _elm_lang$core$Maybe$Just(string); +}; +var _krisajenkins$elm_exts$Exts_Json_Decode$stringIgnoringBlanks = A2( + _elm_lang$core$Json_Decode$andThen, + function (maybeString) { + return _elm_lang$core$Json_Decode$succeed( + A2(_elm_lang$core$Maybe$andThen, _krisajenkins$elm_exts$Exts_Json_Decode$parseEmptyOrString, maybeString)); + }, + _elm_lang$core$Json_Decode$maybe(_elm_lang$core$Json_Decode$string)); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Encode.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Encode.elmi new file mode 100644 index 0000000..673a946 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Encode.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Encode.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Encode.elmo new file mode 100644 index 0000000..82570bd --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Json-Encode.elmo @@ -0,0 +1,34 @@ +var _krisajenkins$elm_exts$Exts_Json_Encode$tuple2 = F3( + function (encodeKey, encodeValue, _p0) { + var _p1 = _p0; + return _elm_lang$core$Json_Encode$list( + { + ctor: '::', + _0: encodeKey(_p1._0), + _1: { + ctor: '::', + _0: encodeValue(_p1._1), + _1: {ctor: '[]'} + } + }); + }); +var _krisajenkins$elm_exts$Exts_Json_Encode$dict = F2( + function (encodeKey, encodeValue) { + return function (_p2) { + return _elm_lang$core$Json_Encode$list( + A2( + _elm_lang$core$List$map, + A2(_krisajenkins$elm_exts$Exts_Json_Encode$tuple2, encodeKey, encodeValue), + _elm_lang$core$Dict$toList(_p2))); + }; + }); +var _krisajenkins$elm_exts$Exts_Json_Encode$set = function (encodeElement) { + return function (_p3) { + return _elm_lang$core$Json_Encode$list( + A2( + _elm_lang$core$List$map, + encodeElement, + _elm_lang$core$List$sort( + _elm_lang$core$Set$toList(_p3)))); + }; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-LatLng.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-LatLng.elmi new file mode 100644 index 0000000..5367a45 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-LatLng.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-LatLng.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-LatLng.elmo new file mode 100644 index 0000000..bc86a15 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-LatLng.elmo @@ -0,0 +1,27 @@ +var _krisajenkins$elm_exts$Exts_LatLng$bearingTo = F2( + function (a, b) { + var dlon = _elm_lang$core$Basics$degrees(b.longitude) - _elm_lang$core$Basics$degrees(a.longitude); + var y = _elm_lang$core$Basics$sin(dlon) * _elm_lang$core$Basics$cos( + _elm_lang$core$Basics$degrees(b.latitude)); + var x = (_elm_lang$core$Basics$cos( + _elm_lang$core$Basics$degrees(a.latitude)) * _elm_lang$core$Basics$sin( + _elm_lang$core$Basics$degrees(b.latitude))) - ((_elm_lang$core$Basics$sin( + _elm_lang$core$Basics$degrees(a.latitude)) * _elm_lang$core$Basics$cos( + _elm_lang$core$Basics$degrees(b.latitude))) * _elm_lang$core$Basics$cos(dlon)); + var bearing = A2(_elm_lang$core$Basics$atan2, y, x) * (180 / _elm_lang$core$Basics$pi); + return bearing; + }); +var _krisajenkins$elm_exts$Exts_LatLng$distanceBetween = F2( + function (a, b) { + var dlng = _elm_lang$core$Basics$degrees(b.longitude - a.longitude); + var dlat = _elm_lang$core$Basics$degrees(b.latitude - a.latitude); + var v1 = (_elm_lang$core$Basics$sin(dlat / 2) * _elm_lang$core$Basics$sin(dlat / 2)) + (((_elm_lang$core$Basics$cos( + _elm_lang$core$Basics$degrees(a.latitude)) * _elm_lang$core$Basics$cos( + _elm_lang$core$Basics$degrees(b.latitude))) * _elm_lang$core$Basics$sin(dlng / 2)) * _elm_lang$core$Basics$sin(dlng / 2)); + var v2 = 2 * A2( + _elm_lang$core$Basics$atan2, + _elm_lang$core$Basics$sqrt(v1), + _elm_lang$core$Basics$sqrt(1 - v1)); + var earthRadius = 6371; + return earthRadius * v2; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-List.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-List.elmi new file mode 100644 index 0000000..ab19f64 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-List.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-List.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-List.elmo new file mode 100644 index 0000000..d0cacb8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-List.elmo @@ -0,0 +1,145 @@ +var _krisajenkins$elm_exts$Exts_List$minimumBy = F2( + function (toComparable, list) { + var _p0 = list; + if (_p0.ctor === '::') { + return _elm_lang$core$Maybe$Just( + A3( + _elm_lang$core$List$foldl, + _krisajenkins$elm_exts$Exts_Basics$minBy(toComparable), + _p0._0, + _p0._1)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _krisajenkins$elm_exts$Exts_List$maximumBy = F2( + function (toComparable, list) { + var _p1 = list; + if (_p1.ctor === '::') { + return _elm_lang$core$Maybe$Just( + A3( + _elm_lang$core$List$foldl, + _krisajenkins$elm_exts$Exts_Basics$maxBy(toComparable), + _p1._0, + _p1._1)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _krisajenkins$elm_exts$Exts_List$exactlyOne = function (xs) { + var _p2 = xs; + if (_p2.ctor === '[]') { + return _elm_lang$core$Result$Err('Expected a list with one item. Got an empty list.'); + } else { + if (_p2._1.ctor === '[]') { + return _elm_lang$core$Result$Ok(_p2._0); + } else { + return _elm_lang$core$Result$Err( + A2( + _elm_lang$core$Basics_ops['++'], + 'Expected a list with one item. Got ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString( + _elm_lang$core$List$length(_p2._1)), + ' items.'))); + } + } +}; +var _krisajenkins$elm_exts$Exts_List$unique = function () { + var f = F2( + function (x, _p3) { + var _p4 = _p3; + var _p6 = _p4._0; + var _p5 = _p4._1; + return A2(_elm_lang$core$Set$member, x, _p6) ? {ctor: '_Tuple2', _0: _p6, _1: _p5} : { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$Set$insert, x, _p6), + _1: {ctor: '::', _0: x, _1: _p5} + }; + }); + return function (_p7) { + return _elm_lang$core$List$reverse( + _elm_lang$core$Tuple$second( + A3( + _elm_lang$core$List$foldl, + f, + { + ctor: '_Tuple2', + _0: _elm_lang$core$Set$empty, + _1: {ctor: '[]'} + }, + _p7))); + }; +}(); +var _krisajenkins$elm_exts$Exts_List$rest = function (_p8) { + return A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + _elm_lang$core$List$tail(_p8)); +}; +var _krisajenkins$elm_exts$Exts_List$firstMatch = function (predicate) { + return A2( + _elm_lang$core$List$foldl, + F2( + function (item, acc) { + var _p9 = acc; + if (_p9.ctor === 'Just') { + return acc; + } else { + return predicate(item) ? _elm_lang$core$Maybe$Just(item) : _elm_lang$core$Maybe$Nothing; + } + }), + _elm_lang$core$Maybe$Nothing); +}; +var _krisajenkins$elm_exts$Exts_List$singleton = function (x) { + return { + ctor: '::', + _0: x, + _1: {ctor: '[]'} + }; +}; +var _krisajenkins$elm_exts$Exts_List$maybeSingleton = function (_p10) { + return A2( + _elm_lang$core$Maybe$withDefault, + {ctor: '[]'}, + A2(_elm_lang$core$Maybe$map, _krisajenkins$elm_exts$Exts_List$singleton, _p10)); +}; +var _krisajenkins$elm_exts$Exts_List$mergeBy = F3( + function (f, xs, ys) { + var reducer = F2( + function (v, acc) { + return A3( + _elm_lang$core$Dict$insert, + f(v), + v, + acc); + }); + return _elm_lang$core$Dict$values( + A3( + _elm_lang$core$List$foldl, + reducer, + _elm_lang$core$Dict$empty, + A2(_elm_lang$core$Basics_ops['++'], xs, ys))); + }); +var _krisajenkins$elm_exts$Exts_List$chunkInternal = F3( + function (n, xs, accum) { + return _elm_lang$core$List$isEmpty(xs) ? _elm_lang$trampoline$Trampoline$done( + _elm_lang$core$Array$toList(accum)) : _elm_lang$trampoline$Trampoline$jump( + function (_p11) { + var _p12 = _p11; + return A3( + _krisajenkins$elm_exts$Exts_List$chunkInternal, + n, + A2(_elm_lang$core$List$drop, n, xs), + A2( + _elm_lang$core$Array$push, + A2(_elm_lang$core$List$take, n, xs), + accum)); + }); + }); +var _krisajenkins$elm_exts$Exts_List$chunk = F2( + function (n, xs) { + return (_elm_lang$core$Native_Utils.cmp(n, 1) < 0) ? _krisajenkins$elm_exts$Exts_List$singleton(xs) : _elm_lang$trampoline$Trampoline$evaluate( + A3(_krisajenkins$elm_exts$Exts_List$chunkInternal, n, xs, _elm_lang$core$Array$empty)); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Maybe.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Maybe.elmi new file mode 100644 index 0000000..d46d0fd Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Maybe.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Maybe.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Maybe.elmo new file mode 100644 index 0000000..33a6188 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Maybe.elmo @@ -0,0 +1,73 @@ +var _krisajenkins$elm_exts$Exts_Maybe$oneOf = A2( + _elm_lang$core$List$foldl, + F2( + function (x, acc) { + return (!_elm_lang$core$Native_Utils.eq(acc, _elm_lang$core$Maybe$Nothing)) ? acc : x; + }), + _elm_lang$core$Maybe$Nothing); +var _krisajenkins$elm_exts$Exts_Maybe$when = F2( + function (test, value) { + return test ? _elm_lang$core$Maybe$Just(value) : _elm_lang$core$Maybe$Nothing; + }); +var _krisajenkins$elm_exts$Exts_Maybe$validate = F2( + function (predicate, value) { + return predicate(value) ? _elm_lang$core$Maybe$Just(value) : _elm_lang$core$Maybe$Nothing; + }); +var _krisajenkins$elm_exts$Exts_Maybe$matches = function (predicate) { + return _elm_lang$core$Maybe$andThen( + _krisajenkins$elm_exts$Exts_Maybe$validate(predicate)); +}; +var _krisajenkins$elm_exts$Exts_Maybe$maybeDefault = F2( + function ($default, x) { + var _p0 = x; + if (_p0.ctor === 'Just') { + return _elm_lang$core$Maybe$Just(_p0._0); + } else { + return _elm_lang$core$Maybe$Just($default); + } + }); +var _krisajenkins$elm_exts$Exts_Maybe$join = F3( + function (f, left, right) { + var _p1 = {ctor: '_Tuple2', _0: left, _1: right}; + if (((_p1.ctor === '_Tuple2') && (_p1._0.ctor === 'Just')) && (_p1._1.ctor === 'Just')) { + return _elm_lang$core$Maybe$Just( + A2(f, _p1._0._0, _p1._1._0)); + } else { + return _elm_lang$core$Maybe$Nothing; + } + }); +var _krisajenkins$elm_exts$Exts_Maybe$catMaybes = _elm_lang$core$List$filterMap(_elm_lang$core$Basics$identity); +var _krisajenkins$elm_exts$Exts_Maybe$mappend = F2( + function (a, b) { + var _p2 = {ctor: '_Tuple2', _0: a, _1: b}; + if (_p2._0.ctor === 'Nothing') { + return _elm_lang$core$Maybe$Nothing; + } else { + if (_p2._1.ctor === 'Nothing') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just( + {ctor: '_Tuple2', _0: _p2._0._0, _1: _p2._1._0}); + } + } + }); +var _krisajenkins$elm_exts$Exts_Maybe$maybe = F2( + function ($default, f) { + return function (_p3) { + return A2( + _elm_lang$core$Maybe$withDefault, + $default, + A2(_elm_lang$core$Maybe$map, f, _p3)); + }; + }); +var _krisajenkins$elm_exts$Exts_Maybe$isJust = function (x) { + var _p4 = x; + if (_p4.ctor === 'Just') { + return true; + } else { + return false; + } +}; +var _krisajenkins$elm_exts$Exts_Maybe$isNothing = function (_p5) { + return !_krisajenkins$elm_exts$Exts_Maybe$isJust(_p5); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Result.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Result.elmi new file mode 100644 index 0000000..6d684f7 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Result.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Result.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Result.elmo new file mode 100644 index 0000000..80c2527 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Result.elmo @@ -0,0 +1,52 @@ +var _krisajenkins$elm_exts$Exts_Result$mappend = F2( + function (a, b) { + var _p0 = {ctor: '_Tuple2', _0: a, _1: b}; + if (_p0._0.ctor === 'Err') { + return _elm_lang$core$Result$Err(_p0._0._0); + } else { + if (_p0._1.ctor === 'Err') { + return _elm_lang$core$Result$Err(_p0._1._0); + } else { + return _elm_lang$core$Result$Ok( + {ctor: '_Tuple2', _0: _p0._0._0, _1: _p0._1._0}); + } + } + }); +var _krisajenkins$elm_exts$Exts_Result$fromErr = function (x) { + var _p1 = x; + if (_p1.ctor === 'Err') { + return _elm_lang$core$Maybe$Just(_p1._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _krisajenkins$elm_exts$Exts_Result$fromOk = function (x) { + var _p2 = x; + if (_p2.ctor === 'Ok') { + return _elm_lang$core$Maybe$Just(_p2._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } +}; +var _krisajenkins$elm_exts$Exts_Result$isOk = function (x) { + var _p3 = x; + if (_p3.ctor === 'Ok') { + return true; + } else { + return false; + } +}; +var _krisajenkins$elm_exts$Exts_Result$isErr = function (_p4) { + return !_krisajenkins$elm_exts$Exts_Result$isOk(_p4); +}; +var _krisajenkins$elm_exts$Exts_Result$mapBoth = F3( + function (f, g, r) { + var _p5 = r; + if (_p5.ctor === 'Ok') { + return _elm_lang$core$Result$Ok( + g(_p5._0)); + } else { + return _elm_lang$core$Result$Err( + f(_p5._0)); + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Set.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Set.elmi new file mode 100644 index 0000000..7daa367 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Set.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Set.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Set.elmo new file mode 100644 index 0000000..c73eab0 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Set.elmo @@ -0,0 +1,20 @@ +var _krisajenkins$elm_exts$Exts_Set$toggle = F2( + function (key, set) { + return A2(_elm_lang$core$Set$member, key, set) ? A2(_elm_lang$core$Set$remove, key, set) : A2(_elm_lang$core$Set$insert, key, set); + }); +var _krisajenkins$elm_exts$Exts_Set$uniqueItems = function (accessor) { + return function (_p0) { + return _elm_lang$core$Set$fromList( + A2(_elm_lang$core$List$filterMap, accessor, _p0)); + }; +}; +var _krisajenkins$elm_exts$Exts_Set$select = F2( + function (f, keys) { + return _elm_lang$core$List$filter( + function (x) { + return A2( + _elm_lang$core$Set$member, + f(x), + keys); + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-String.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-String.elmi new file mode 100644 index 0000000..d83be25 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-String.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-String.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-String.elmo new file mode 100644 index 0000000..8b1fe84 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-String.elmo @@ -0,0 +1,7 @@ +var _krisajenkins$elm_exts$Exts_String$removePrefix = F2( + function (prefix, s) { + return A2(_elm_lang$core$String$startsWith, prefix, s) ? A2( + _elm_lang$core$String$dropLeft, + _elm_lang$core$String$length(prefix), + s) : s; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Task.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Task.elmi new file mode 100644 index 0000000..a39dff1 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Task.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Task.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Task.elmo new file mode 100644 index 0000000..ceab9a5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Task.elmo @@ -0,0 +1,8 @@ +var _krisajenkins$elm_exts$Exts_Task$asCmd = _elm_lang$core$Task$attempt(_elm_lang$core$Basics$identity); +var _krisajenkins$elm_exts$Exts_Task$delay = F2( + function (time, task) { + return A2( + _elm_lang$core$Task$andThen, + _elm_lang$core$Basics$always(task), + _elm_lang$core$Process$sleep(time)); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Tuple.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Tuple.elmi new file mode 100644 index 0000000..2e273ad Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Tuple.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Tuple.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Tuple.elmo new file mode 100644 index 0000000..fc6c808 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Tuple.elmo @@ -0,0 +1,72 @@ +var _krisajenkins$elm_exts$Exts_Tuple$onSecond = F2( + function (f, _p0) { + var _p1 = _p0; + var _p2 = _p1._0; + return { + ctor: '_Tuple2', + _0: _p2, + _1: A2(f, _p2, _p1._1) + }; + }); +var _krisajenkins$elm_exts$Exts_Tuple$onFirst = F2( + function (f, _p3) { + var _p4 = _p3; + var _p5 = _p4._1; + return { + ctor: '_Tuple2', + _0: A2(f, _p4._0, _p5), + _1: _p5 + }; + }); +var _krisajenkins$elm_exts$Exts_Tuple$fork = F3( + function (fX, fY, v) { + return { + ctor: '_Tuple2', + _0: fX(v), + _1: fY(v) + }; + }); +var _krisajenkins$elm_exts$Exts_Tuple$pair = F3( + function (f1, f2, _p6) { + var _p7 = _p6; + return { + ctor: '_Tuple2', + _0: f1(_p7._0), + _1: f2(_p7._1) + }; + }); +var _krisajenkins$elm_exts$Exts_Tuple$both = F2( + function (f, _p8) { + var _p9 = _p8; + return { + ctor: '_Tuple2', + _0: f(_p9._0), + _1: f(_p9._1) + }; + }); +var _krisajenkins$elm_exts$Exts_Tuple$mapSecond = F2( + function (f, _p10) { + var _p11 = _p10; + return { + ctor: '_Tuple2', + _0: _p11._0, + _1: f(_p11._1) + }; + }); +var _krisajenkins$elm_exts$Exts_Tuple$mapFirst = F2( + function (f, _p12) { + var _p13 = _p12; + return { + ctor: '_Tuple2', + _0: f(_p13._0), + _1: _p13._1 + }; + }); +var _krisajenkins$elm_exts$Exts_Tuple$indexedPair = F2( + function (f, x) { + return { + ctor: '_Tuple2', + _0: f(x), + _1: x + }; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Validation.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Validation.elmi new file mode 100644 index 0000000..8da77b2 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Validation.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Validation.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Validation.elmo new file mode 100644 index 0000000..2f13826 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/Exts-Validation.elmo @@ -0,0 +1,45 @@ +var _krisajenkins$elm_exts$Exts_Validation$emailRegex = _elm_lang$core$Regex$caseInsensitive( + _elm_lang$core$Regex$regex('^\\S+@\\S+\\.\\S+$')); +var _krisajenkins$elm_exts$Exts_Validation$matches = F3( + function (expression, err, str) { + var _p0 = str; + if (_p0.ctor === 'Nothing') { + return _elm_lang$core$Result$Err(err); + } else { + var _p1 = _p0._0; + return A2(_elm_lang$core$Regex$contains, expression, _p1) ? _elm_lang$core$Result$Ok(_p1) : _elm_lang$core$Result$Err(err); + } + }); +var _krisajenkins$elm_exts$Exts_Validation$email = _krisajenkins$elm_exts$Exts_Validation$matches(_krisajenkins$elm_exts$Exts_Validation$emailRegex); +var _krisajenkins$elm_exts$Exts_Validation$notBlank = F2( + function (err, str) { + var _p2 = str; + if (_p2.ctor === 'Nothing') { + return _elm_lang$core$Result$Err(err); + } else { + if (_p2._0 === '') { + return _elm_lang$core$Result$Err(err); + } else { + return _elm_lang$core$Result$Ok(_p2._0); + } + } + }); +var _krisajenkins$elm_exts$Exts_Validation$required = function (err) { + return function (_p3) { + return A2( + _elm_lang$core$Maybe$withDefault, + _elm_lang$core$Result$Err(err), + A2(_elm_lang$core$Maybe$map, _elm_lang$core$Result$Ok, _p3)); + }; +}; +var _krisajenkins$elm_exts$Exts_Validation$apply = F2( + function (f, aResult) { + return A2( + _elm_lang$core$Result$andThen, + function (continuation) { + return A2(_elm_lang$core$Result$map, continuation, aResult); + }, + f); + }); +var _krisajenkins$elm_exts$Exts_Validation_ops = _krisajenkins$elm_exts$Exts_Validation_ops || {}; +_krisajenkins$elm_exts$Exts_Validation_ops['|:'] = _krisajenkins$elm_exts$Exts_Validation$apply; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/graph.dat new file mode 100644 index 0000000..1cd4ad5 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/elm-exts/26.1.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmi new file mode 100644 index 0000000..0733fc9 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmo new file mode 100644 index 0000000..f1769d8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData-Infix.elmo @@ -0,0 +1,4 @@ +var _krisajenkins$remotedata$RemoteData_Infix_ops = _krisajenkins$remotedata$RemoteData_Infix_ops || {}; +_krisajenkins$remotedata$RemoteData_Infix_ops['<*>'] = _elm_lang$core$Basics$flip(_krisajenkins$remotedata$RemoteData$andMap); +var _krisajenkins$remotedata$RemoteData_Infix_ops = _krisajenkins$remotedata$RemoteData_Infix_ops || {}; +_krisajenkins$remotedata$RemoteData_Infix_ops['<$>'] = _krisajenkins$remotedata$RemoteData$map; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData.elmi new file mode 100644 index 0000000..8d7d096 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData.elmo new file mode 100644 index 0000000..798af99 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/RemoteData.elmo @@ -0,0 +1,232 @@ +var _krisajenkins$remotedata$RemoteData$isNotAsked = function (data) { + var _p0 = data; + if (_p0.ctor === 'NotAsked') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$isLoading = function (data) { + var _p1 = data; + if (_p1.ctor === 'Loading') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$isFailure = function (data) { + var _p2 = data; + if (_p2.ctor === 'Failure') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$isSuccess = function (data) { + var _p3 = data; + if (_p3.ctor === 'Success') { + return true; + } else { + return false; + } +}; +var _krisajenkins$remotedata$RemoteData$withDefault = F2( + function ($default, data) { + var _p4 = data; + if (_p4.ctor === 'Success') { + return _p4._0; + } else { + return $default; + } + }); +var _krisajenkins$remotedata$RemoteData$Success = function (a) { + return {ctor: 'Success', _0: a}; +}; +var _krisajenkins$remotedata$RemoteData$succeed = _krisajenkins$remotedata$RemoteData$Success; +var _krisajenkins$remotedata$RemoteData$prism = { + reverseGet: _krisajenkins$remotedata$RemoteData$Success, + getOption: function (data) { + var _p5 = data; + if (_p5.ctor === 'Success') { + return _elm_lang$core$Maybe$Just(_p5._0); + } else { + return _elm_lang$core$Maybe$Nothing; + } + } +}; +var _krisajenkins$remotedata$RemoteData$Failure = function (a) { + return {ctor: 'Failure', _0: a}; +}; +var _krisajenkins$remotedata$RemoteData$fromResult = function (result) { + var _p6 = result; + if (_p6.ctor === 'Err') { + return _krisajenkins$remotedata$RemoteData$Failure(_p6._0); + } else { + return _krisajenkins$remotedata$RemoteData$Success(_p6._0); + } +}; +var _krisajenkins$remotedata$RemoteData$asCmd = _elm_lang$core$Task$attempt(_krisajenkins$remotedata$RemoteData$fromResult); +var _krisajenkins$remotedata$RemoteData$Loading = {ctor: 'Loading'}; +var _krisajenkins$remotedata$RemoteData$NotAsked = {ctor: 'NotAsked'}; +var _krisajenkins$remotedata$RemoteData$map = F2( + function (f, data) { + var _p7 = data; + switch (_p7.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success( + f(_p7._0)); + case 'Loading': + return _krisajenkins$remotedata$RemoteData$Loading; + case 'NotAsked': + return _krisajenkins$remotedata$RemoteData$NotAsked; + default: + return _krisajenkins$remotedata$RemoteData$Failure(_p7._0); + } + }); +var _krisajenkins$remotedata$RemoteData$toMaybe = function (_p8) { + return A2( + _krisajenkins$remotedata$RemoteData$withDefault, + _elm_lang$core$Maybe$Nothing, + A2(_krisajenkins$remotedata$RemoteData$map, _elm_lang$core$Maybe$Just, _p8)); +}; +var _krisajenkins$remotedata$RemoteData$mapError = F2( + function (f, data) { + var _p9 = data; + switch (_p9.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success(_p9._0); + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure( + f(_p9._0)); + case 'Loading': + return _krisajenkins$remotedata$RemoteData$Loading; + default: + return _krisajenkins$remotedata$RemoteData$NotAsked; + } + }); +var _krisajenkins$remotedata$RemoteData$mapBoth = F3( + function (successFn, errorFn, data) { + var _p10 = data; + switch (_p10.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success( + successFn(_p10._0)); + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure( + errorFn(_p10._0)); + case 'Loading': + return _krisajenkins$remotedata$RemoteData$Loading; + default: + return _krisajenkins$remotedata$RemoteData$NotAsked; + } + }); +var _krisajenkins$remotedata$RemoteData$andThen = F2( + function (f, data) { + var _p11 = data; + switch (_p11.ctor) { + case 'Success': + return f(_p11._0); + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure(_p11._0); + case 'NotAsked': + return _krisajenkins$remotedata$RemoteData$NotAsked; + default: + return _krisajenkins$remotedata$RemoteData$Loading; + } + }); +var _krisajenkins$remotedata$RemoteData$andMap = F2( + function (wrappedValue, wrappedFunction) { + var _p12 = {ctor: '_Tuple2', _0: wrappedFunction, _1: wrappedValue}; + _v11_5: + do { + _v11_4: + do { + _v11_3: + do { + _v11_2: + do { + switch (_p12._0.ctor) { + case 'Success': + switch (_p12._1.ctor) { + case 'Success': + return _krisajenkins$remotedata$RemoteData$Success( + _p12._0._0(_p12._1._0)); + case 'Failure': + break _v11_2; + case 'Loading': + break _v11_4; + default: + return _krisajenkins$remotedata$RemoteData$NotAsked; + } + case 'Failure': + return _krisajenkins$remotedata$RemoteData$Failure(_p12._0._0); + case 'Loading': + switch (_p12._1.ctor) { + case 'Failure': + break _v11_2; + case 'Loading': + break _v11_3; + case 'NotAsked': + break _v11_3; + default: + break _v11_3; + } + default: + switch (_p12._1.ctor) { + case 'Failure': + break _v11_2; + case 'Loading': + break _v11_4; + case 'NotAsked': + break _v11_5; + default: + break _v11_5; + } + } + } while(false); + return _krisajenkins$remotedata$RemoteData$Failure(_p12._1._0); + } while(false); + return _krisajenkins$remotedata$RemoteData$Loading; + } while(false); + return _krisajenkins$remotedata$RemoteData$Loading; + } while(false); + return _krisajenkins$remotedata$RemoteData$NotAsked; + }); +var _krisajenkins$remotedata$RemoteData$append = F2( + function (a, b) { + return A2( + _krisajenkins$remotedata$RemoteData$andMap, + b, + A2( + _krisajenkins$remotedata$RemoteData$map, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + a)); + }); +var _krisajenkins$remotedata$RemoteData$update = F2( + function (f, remoteData) { + var _p13 = remoteData; + switch (_p13.ctor) { + case 'Success': + var _p14 = f(_p13._0); + var first = _p14._0; + var second = _p14._1; + return { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Success(first), + _1: second + }; + case 'NotAsked': + return {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$NotAsked, _1: _elm_lang$core$Platform_Cmd$none}; + case 'Loading': + return {ctor: '_Tuple2', _0: _krisajenkins$remotedata$RemoteData$Loading, _1: _elm_lang$core$Platform_Cmd$none}; + default: + return { + ctor: '_Tuple2', + _0: _krisajenkins$remotedata$RemoteData$Failure(_p13._0), + _1: _elm_lang$core$Platform_Cmd$none + }; + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/graph.dat new file mode 100644 index 0000000..20f059b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/krisajenkins/remotedata/4.0.1/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmi new file mode 100644 index 0000000..305dd31 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmo new file mode 100644 index 0000000..755dae5 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/HttpBuilder.elmo @@ -0,0 +1,191 @@ +var _lukewestby$elm_http_builder$HttpBuilder$replace = F2( + function (old, $new) { + return function (_p0) { + return A2( + _elm_lang$core$String$join, + $new, + A2(_elm_lang$core$String$split, old, _p0)); + }; + }); +var _lukewestby$elm_http_builder$HttpBuilder$queryEscape = function (_p1) { + return A3( + _lukewestby$elm_http_builder$HttpBuilder$replace, + '%20', + '+', + _elm_lang$http$Http$encodeUri(_p1)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$queryPair = function (_p2) { + var _p3 = _p2; + return A2( + _elm_lang$core$Basics_ops['++'], + _lukewestby$elm_http_builder$HttpBuilder$queryEscape(_p3._0), + A2( + _elm_lang$core$Basics_ops['++'], + '=', + _lukewestby$elm_http_builder$HttpBuilder$queryEscape(_p3._1))); +}; +var _lukewestby$elm_http_builder$HttpBuilder$joinUrlEncoded = function (args) { + return A2( + _elm_lang$core$String$join, + '&', + A2(_elm_lang$core$List$map, _lukewestby$elm_http_builder$HttpBuilder$queryPair, args)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$toRequest = function (_p4) { + var _p5 = _p4; + var _p6 = _p5._0; + var encodedParams = _lukewestby$elm_http_builder$HttpBuilder$joinUrlEncoded(_p6.queryParams); + var fullUrl = _elm_lang$core$String$isEmpty(encodedParams) ? _p6.url : A2( + _elm_lang$core$Basics_ops['++'], + _p6.url, + A2(_elm_lang$core$Basics_ops['++'], '?', encodedParams)); + return _elm_lang$http$Http$request( + {method: _p6.method, url: fullUrl, headers: _p6.headers, body: _p6.body, expect: _p6.expect, timeout: _p6.timeout, withCredentials: _p6.withCredentials}); +}; +var _lukewestby$elm_http_builder$HttpBuilder$send = F2( + function (tagger, builder) { + return A2( + _elm_lang$http$Http$send, + tagger, + _lukewestby$elm_http_builder$HttpBuilder$toRequest(builder)); + }); +var _lukewestby$elm_http_builder$HttpBuilder$RequestDetails = F8( + function (a, b, c, d, e, f, g, h) { + return {method: a, headers: b, url: c, body: d, expect: e, timeout: f, withCredentials: g, queryParams: h}; + }); +var _lukewestby$elm_http_builder$HttpBuilder$RequestBuilder = function (a) { + return {ctor: 'RequestBuilder', _0: a}; +}; +var _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl = F2( + function (method, url) { + return _lukewestby$elm_http_builder$HttpBuilder$RequestBuilder( + { + method: method, + url: url, + headers: {ctor: '[]'}, + body: _elm_lang$http$Http$emptyBody, + expect: _elm_lang$http$Http$expectStringResponse( + function (_p7) { + return _elm_lang$core$Result$Ok( + {ctor: '_Tuple0'}); + }), + timeout: _elm_lang$core$Maybe$Nothing, + withCredentials: false, + queryParams: {ctor: '[]'} + }); + }); +var _lukewestby$elm_http_builder$HttpBuilder$get = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('GET'); +var _lukewestby$elm_http_builder$HttpBuilder$post = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('POST'); +var _lukewestby$elm_http_builder$HttpBuilder$put = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('PUT'); +var _lukewestby$elm_http_builder$HttpBuilder$patch = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('PATCH'); +var _lukewestby$elm_http_builder$HttpBuilder$delete = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('DELETE'); +var _lukewestby$elm_http_builder$HttpBuilder$options = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('OPTIONS'); +var _lukewestby$elm_http_builder$HttpBuilder$trace = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('TRACE'); +var _lukewestby$elm_http_builder$HttpBuilder$head = _lukewestby$elm_http_builder$HttpBuilder$requestWithMethodAndUrl('HEAD'); +var _lukewestby$elm_http_builder$HttpBuilder$map = F2( + function (fn, _p8) { + var _p9 = _p8; + return _lukewestby$elm_http_builder$HttpBuilder$RequestBuilder( + fn(_p9._0)); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withHeader = F2( + function (key, value) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + headers: { + ctor: '::', + _0: A2(_elm_lang$http$Http$header, key, value), + _1: details.headers + } + }); + }); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withHeaders = function (headerPairs) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + headers: A2( + _elm_lang$core$Basics_ops['++'], + A2( + _elm_lang$core$List$map, + _elm_lang$core$Basics$uncurry(_elm_lang$http$Http$header), + headerPairs), + details.headers) + }); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withBody = function (body) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + {body: body}); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withStringBody = F2( + function (contentType, value) { + return _lukewestby$elm_http_builder$HttpBuilder$withBody( + A2(_elm_lang$http$Http$stringBody, contentType, value)); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withUrlEncodedBody = function (_p10) { + return A2( + _lukewestby$elm_http_builder$HttpBuilder$withStringBody, + 'application/x-www-form-urlencoded', + _lukewestby$elm_http_builder$HttpBuilder$joinUrlEncoded(_p10)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withJsonBody = function (value) { + return _lukewestby$elm_http_builder$HttpBuilder$withBody( + _elm_lang$http$Http$jsonBody(value)); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withMultipartStringBody = function (partPairs) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + body: _elm_lang$http$Http$multipartBody( + A2( + _elm_lang$core$List$map, + _elm_lang$core$Basics$uncurry(_elm_lang$http$Http$stringPart), + partPairs)) + }); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withTimeout = function (timeout) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + timeout: _elm_lang$core$Maybe$Just(timeout) + }); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withCredentials = _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + {withCredentials: true}); + }); +var _lukewestby$elm_http_builder$HttpBuilder$withExpect = function (expect) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + {expect: expect}); + }); +}; +var _lukewestby$elm_http_builder$HttpBuilder$withQueryParams = function (queryParams) { + return _lukewestby$elm_http_builder$HttpBuilder$map( + function (details) { + return _elm_lang$core$Native_Utils.update( + details, + { + queryParams: A2(_elm_lang$core$Basics_ops['++'], details.queryParams, queryParams) + }); + }); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/graph.dat new file mode 100644 index 0000000..d7cb0d5 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/lukewestby/elm-http-builder/4.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmi new file mode 100644 index 0000000..9255843 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmo new file mode 100644 index 0000000..e7d2f61 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg-Interop.elmo @@ -0,0 +1,4 @@ +var _mgold$elm_random_pcg$Random_Pcg_Interop$fission = A2( + _elm_lang$core$Random$map, + _mgold$elm_random_pcg$Random_Pcg$initialSeed, + A2(_elm_lang$core$Random$int, 0, 4294967295)); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmi new file mode 100644 index 0000000..36c0abb Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmo new file mode 100644 index 0000000..29ca43c --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/Random-Pcg.elmo @@ -0,0 +1,560 @@ +var _mgold$elm_random_pcg$Random_Pcg$toJson = function (_p0) { + var _p1 = _p0; + return _elm_lang$core$Json_Encode$list( + { + ctor: '::', + _0: _elm_lang$core$Json_Encode$int(_p1._0), + _1: { + ctor: '::', + _0: _elm_lang$core$Json_Encode$int(_p1._1), + _1: {ctor: '[]'} + } + }); +}; +var _mgold$elm_random_pcg$Random_Pcg$mul32 = F2( + function (a, b) { + var bl = b & 65535; + var bh = 65535 & (b >>> 16); + var al = a & 65535; + var ah = 65535 & (a >>> 16); + return 0 | ((al * bl) + ((((ah * bl) + (al * bh)) << 16) >>> 0)); + }); +var _mgold$elm_random_pcg$Random_Pcg$listHelp = F4( + function (list, n, generate, seed) { + listHelp: + while (true) { + if (_elm_lang$core$Native_Utils.cmp(n, 1) < 0) { + return {ctor: '_Tuple2', _0: list, _1: seed}; + } else { + var _p2 = generate(seed); + var value = _p2._0; + var newSeed = _p2._1; + var _v1 = {ctor: '::', _0: value, _1: list}, + _v2 = n - 1, + _v3 = generate, + _v4 = newSeed; + list = _v1; + n = _v2; + generate = _v3; + seed = _v4; + continue listHelp; + } + } + }); +var _mgold$elm_random_pcg$Random_Pcg$minInt = -2147483648; +var _mgold$elm_random_pcg$Random_Pcg$maxInt = 2147483647; +var _mgold$elm_random_pcg$Random_Pcg$bit27 = 1.34217728e8; +var _mgold$elm_random_pcg$Random_Pcg$bit53 = 9.007199254740992e15; +var _mgold$elm_random_pcg$Random_Pcg$peel = function (_p3) { + var _p4 = _p3; + var _p5 = _p4._0; + var word = (_p5 ^ (_p5 >>> ((_p5 >>> 28) + 4))) * 277803737; + return ((word >>> 22) ^ word) >>> 0; +}; +var _mgold$elm_random_pcg$Random_Pcg$step = F2( + function (_p6, seed) { + var _p7 = _p6; + return _p7._0(seed); + }); +var _mgold$elm_random_pcg$Random_Pcg$retry = F3( + function (generator, predicate, seed) { + retry: + while (true) { + var _p8 = A2(_mgold$elm_random_pcg$Random_Pcg$step, generator, seed); + var candidate = _p8._0; + var newSeed = _p8._1; + if (predicate(candidate)) { + return {ctor: '_Tuple2', _0: candidate, _1: newSeed}; + } else { + var _v7 = generator, + _v8 = predicate, + _v9 = newSeed; + generator = _v7; + predicate = _v8; + seed = _v9; + continue retry; + } + } + }); +var _mgold$elm_random_pcg$Random_Pcg$Generator = function (a) { + return {ctor: 'Generator', _0: a}; +}; +var _mgold$elm_random_pcg$Random_Pcg$list = F2( + function (n, _p9) { + var _p10 = _p9; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed) { + return A4( + _mgold$elm_random_pcg$Random_Pcg$listHelp, + {ctor: '[]'}, + n, + _p10._0, + seed); + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$constant = function (value) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed) { + return {ctor: '_Tuple2', _0: value, _1: seed}; + }); +}; +var _mgold$elm_random_pcg$Random_Pcg$map = F2( + function (func, _p11) { + var _p12 = _p11; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p13 = _p12._0(seed0); + var a = _p13._0; + var seed1 = _p13._1; + return { + ctor: '_Tuple2', + _0: func(a), + _1: seed1 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$map2 = F3( + function (func, _p15, _p14) { + var _p16 = _p15; + var _p17 = _p14; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p18 = _p16._0(seed0); + var a = _p18._0; + var seed1 = _p18._1; + var _p19 = _p17._0(seed1); + var b = _p19._0; + var seed2 = _p19._1; + return { + ctor: '_Tuple2', + _0: A2(func, a, b), + _1: seed2 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$pair = F2( + function (genA, genB) { + return A3( + _mgold$elm_random_pcg$Random_Pcg$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + genA, + genB); + }); +var _mgold$elm_random_pcg$Random_Pcg$andMap = _mgold$elm_random_pcg$Random_Pcg$map2( + F2( + function (x, y) { + return x(y); + })); +var _mgold$elm_random_pcg$Random_Pcg$map3 = F4( + function (func, _p22, _p21, _p20) { + var _p23 = _p22; + var _p24 = _p21; + var _p25 = _p20; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p26 = _p23._0(seed0); + var a = _p26._0; + var seed1 = _p26._1; + var _p27 = _p24._0(seed1); + var b = _p27._0; + var seed2 = _p27._1; + var _p28 = _p25._0(seed2); + var c = _p28._0; + var seed3 = _p28._1; + return { + ctor: '_Tuple2', + _0: A3(func, a, b, c), + _1: seed3 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$map4 = F5( + function (func, _p32, _p31, _p30, _p29) { + var _p33 = _p32; + var _p34 = _p31; + var _p35 = _p30; + var _p36 = _p29; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p37 = _p33._0(seed0); + var a = _p37._0; + var seed1 = _p37._1; + var _p38 = _p34._0(seed1); + var b = _p38._0; + var seed2 = _p38._1; + var _p39 = _p35._0(seed2); + var c = _p39._0; + var seed3 = _p39._1; + var _p40 = _p36._0(seed3); + var d = _p40._0; + var seed4 = _p40._1; + return { + ctor: '_Tuple2', + _0: A4(func, a, b, c, d), + _1: seed4 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$map5 = F6( + function (func, _p45, _p44, _p43, _p42, _p41) { + var _p46 = _p45; + var _p47 = _p44; + var _p48 = _p43; + var _p49 = _p42; + var _p50 = _p41; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p51 = _p46._0(seed0); + var a = _p51._0; + var seed1 = _p51._1; + var _p52 = _p47._0(seed1); + var b = _p52._0; + var seed2 = _p52._1; + var _p53 = _p48._0(seed2); + var c = _p53._0; + var seed3 = _p53._1; + var _p54 = _p49._0(seed3); + var d = _p54._0; + var seed4 = _p54._1; + var _p55 = _p50._0(seed4); + var e = _p55._0; + var seed5 = _p55._1; + return { + ctor: '_Tuple2', + _0: A5(func, a, b, c, d, e), + _1: seed5 + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$andThen = F2( + function (callback, _p56) { + var _p57 = _p56; + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed) { + var _p58 = _p57._0(seed); + var result = _p58._0; + var newSeed = _p58._1; + var _p59 = callback(result); + var generateB = _p59._0; + return generateB(newSeed); + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$maybe = F2( + function (genBool, genA) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + function (b) { + return b ? A2(_mgold$elm_random_pcg$Random_Pcg$map, _elm_lang$core$Maybe$Just, genA) : _mgold$elm_random_pcg$Random_Pcg$constant(_elm_lang$core$Maybe$Nothing); + }, + genBool); + }); +var _mgold$elm_random_pcg$Random_Pcg$filter = F2( + function (predicate, generator) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + A2(_mgold$elm_random_pcg$Random_Pcg$retry, generator, predicate)); + }); +var _mgold$elm_random_pcg$Random_Pcg$Seed = F2( + function (a, b) { + return {ctor: 'Seed', _0: a, _1: b}; + }); +var _mgold$elm_random_pcg$Random_Pcg$next = function (_p60) { + var _p61 = _p60; + var _p62 = _p61._1; + return A2(_mgold$elm_random_pcg$Random_Pcg$Seed, ((_p61._0 * 1664525) + _p62) >>> 0, _p62); +}; +var _mgold$elm_random_pcg$Random_Pcg$initialSeed = function (x) { + var _p63 = _mgold$elm_random_pcg$Random_Pcg$next( + A2(_mgold$elm_random_pcg$Random_Pcg$Seed, 0, 1013904223)); + var state1 = _p63._0; + var incr = _p63._1; + var state2 = (state1 + x) >>> 0; + return _mgold$elm_random_pcg$Random_Pcg$next( + A2(_mgold$elm_random_pcg$Random_Pcg$Seed, state2, incr)); +}; +var _mgold$elm_random_pcg$Random_Pcg$generate = F2( + function (toMsg, generator) { + return A2( + _elm_lang$core$Task$perform, + toMsg, + A2( + _elm_lang$core$Task$map, + function (_p64) { + return _elm_lang$core$Tuple$first( + A2( + _mgold$elm_random_pcg$Random_Pcg$step, + generator, + _mgold$elm_random_pcg$Random_Pcg$initialSeed( + _elm_lang$core$Basics$round(_p64)))); + }, + _elm_lang$core$Time$now)); + }); +var _mgold$elm_random_pcg$Random_Pcg$int = F2( + function (a, b) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var _p65 = (_elm_lang$core$Native_Utils.cmp(a, b) < 0) ? {ctor: '_Tuple2', _0: a, _1: b} : {ctor: '_Tuple2', _0: b, _1: a}; + var lo = _p65._0; + var hi = _p65._1; + var range = (hi - lo) + 1; + if (_elm_lang$core$Native_Utils.eq((range - 1) & range, 0)) { + return { + ctor: '_Tuple2', + _0: (((range - 1) & _mgold$elm_random_pcg$Random_Pcg$peel(seed0)) >>> 0) + lo, + _1: _mgold$elm_random_pcg$Random_Pcg$next(seed0) + }; + } else { + var threshhold = A2(_elm_lang$core$Basics$rem, (0 - range) >>> 0, range) >>> 0; + var accountForBias = function (seed) { + accountForBias: + while (true) { + var seedN = _mgold$elm_random_pcg$Random_Pcg$next(seed); + var x = _mgold$elm_random_pcg$Random_Pcg$peel(seed); + if (_elm_lang$core$Native_Utils.cmp(x, threshhold) < 0) { + var _v28 = seedN; + seed = _v28; + continue accountForBias; + } else { + return { + ctor: '_Tuple2', + _0: A2(_elm_lang$core$Basics$rem, x, range) + lo, + _1: seedN + }; + } + } + }; + return accountForBias(seed0); + } + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$bool = A2( + _mgold$elm_random_pcg$Random_Pcg$map, + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })(1), + A2(_mgold$elm_random_pcg$Random_Pcg$int, 0, 1)); +var _mgold$elm_random_pcg$Random_Pcg$choice = F2( + function (x, y) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + function (b) { + return b ? x : y; + }, + _mgold$elm_random_pcg$Random_Pcg$bool); + }); +var _mgold$elm_random_pcg$Random_Pcg$oneIn = function (n) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + F2( + function (x, y) { + return _elm_lang$core$Native_Utils.eq(x, y); + })(1), + A2(_mgold$elm_random_pcg$Random_Pcg$int, 1, n)); +}; +var _mgold$elm_random_pcg$Random_Pcg$sample = function () { + var find = F2( + function (k, ys) { + find: + while (true) { + var _p66 = ys; + if (_p66.ctor === '[]') { + return _elm_lang$core$Maybe$Nothing; + } else { + if (_elm_lang$core$Native_Utils.eq(k, 0)) { + return _elm_lang$core$Maybe$Just(_p66._0); + } else { + var _v30 = k - 1, + _v31 = _p66._1; + k = _v30; + ys = _v31; + continue find; + } + } + } + }); + return function (xs) { + return A2( + _mgold$elm_random_pcg$Random_Pcg$map, + function (i) { + return A2(find, i, xs); + }, + A2( + _mgold$elm_random_pcg$Random_Pcg$int, + 0, + _elm_lang$core$List$length(xs) - 1)); + }; +}(); +var _mgold$elm_random_pcg$Random_Pcg$float = F2( + function (min, max) { + return _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var range = _elm_lang$core$Basics$abs(max - min); + var n0 = _mgold$elm_random_pcg$Random_Pcg$peel(seed0); + var hi = _elm_lang$core$Basics$toFloat(67108863 & n0) * 1.0; + var seed1 = _mgold$elm_random_pcg$Random_Pcg$next(seed0); + var n1 = _mgold$elm_random_pcg$Random_Pcg$peel(seed1); + var lo = _elm_lang$core$Basics$toFloat(134217727 & n1) * 1.0; + var val = ((hi * _mgold$elm_random_pcg$Random_Pcg$bit27) + lo) / _mgold$elm_random_pcg$Random_Pcg$bit53; + var scaled = (val * range) + min; + return { + ctor: '_Tuple2', + _0: scaled, + _1: _mgold$elm_random_pcg$Random_Pcg$next(seed1) + }; + }); + }); +var _mgold$elm_random_pcg$Random_Pcg$frequency = function (pairs) { + var pick = F2( + function (choices, n) { + pick: + while (true) { + var _p67 = choices; + if ((_p67.ctor === '::') && (_p67._0.ctor === '_Tuple2')) { + var _p68 = _p67._0._0; + if (_elm_lang$core$Native_Utils.cmp(n, _p68) < 1) { + return _p67._0._1; + } else { + var _v33 = _p67._1, + _v34 = n - _p68; + choices = _v33; + n = _v34; + continue pick; + } + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'Random.Pcg', + { + start: {line: 682, column: 13}, + end: {line: 690, column: 77} + }, + _p67)('Empty list passed to Random.Pcg.frequency!'); + } + } + }); + var total = _elm_lang$core$List$sum( + A2( + _elm_lang$core$List$map, + function (_p70) { + return _elm_lang$core$Basics$abs( + _elm_lang$core$Tuple$first(_p70)); + }, + pairs)); + return A2( + _mgold$elm_random_pcg$Random_Pcg$andThen, + pick(pairs), + A2(_mgold$elm_random_pcg$Random_Pcg$float, 0, total)); +}; +var _mgold$elm_random_pcg$Random_Pcg$choices = function (gens) { + return _mgold$elm_random_pcg$Random_Pcg$frequency( + A2( + _elm_lang$core$List$map, + function (g) { + return {ctor: '_Tuple2', _0: 1, _1: g}; + }, + gens)); +}; +var _mgold$elm_random_pcg$Random_Pcg$independentSeed = _mgold$elm_random_pcg$Random_Pcg$Generator( + function (seed0) { + var gen = A2(_mgold$elm_random_pcg$Random_Pcg$int, 0, 4294967295); + var _p71 = A2( + _mgold$elm_random_pcg$Random_Pcg$step, + A4( + _mgold$elm_random_pcg$Random_Pcg$map3, + F3( + function (v0, v1, v2) { + return {ctor: '_Tuple3', _0: v0, _1: v1, _2: v2}; + }), + gen, + gen, + gen), + seed0); + var state = _p71._0._0; + var b = _p71._0._1; + var c = _p71._0._2; + var seed1 = _p71._1; + var incr = 1 | (b ^ c); + return { + ctor: '_Tuple2', + _0: seed1, + _1: _mgold$elm_random_pcg$Random_Pcg$next( + A2(_mgold$elm_random_pcg$Random_Pcg$Seed, state, incr)) + }; + }); +var _mgold$elm_random_pcg$Random_Pcg$fastForward = F2( + function (delta0, _p72) { + var _p73 = _p72; + var _p76 = _p73._1; + var helper = F6( + function (accMult, accPlus, curMult, curPlus, delta, repeat) { + helper: + while (true) { + var newDelta = delta >>> 1; + var curMult_ = A2(_mgold$elm_random_pcg$Random_Pcg$mul32, curMult, curMult); + var curPlus_ = A2(_mgold$elm_random_pcg$Random_Pcg$mul32, curMult + 1, curPlus); + var _p74 = _elm_lang$core$Native_Utils.eq(delta & 1, 1) ? { + ctor: '_Tuple2', + _0: A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accMult, curMult), + _1: (A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accPlus, curMult) + curPlus) >>> 0 + } : {ctor: '_Tuple2', _0: accMult, _1: accPlus}; + var accMult_ = _p74._0; + var accPlus_ = _p74._1; + if (_elm_lang$core$Native_Utils.eq(newDelta, 0)) { + if ((_elm_lang$core$Native_Utils.cmp(delta0, 0) < 0) && repeat) { + var _v36 = accMult_, + _v37 = accPlus_, + _v38 = curMult_, + _v39 = curPlus_, + _v40 = -1, + _v41 = false; + accMult = _v36; + accPlus = _v37; + curMult = _v38; + curPlus = _v39; + delta = _v40; + repeat = _v41; + continue helper; + } else { + return {ctor: '_Tuple2', _0: accMult_, _1: accPlus_}; + } + } else { + var _v42 = accMult_, + _v43 = accPlus_, + _v44 = curMult_, + _v45 = curPlus_, + _v46 = newDelta, + _v47 = repeat; + accMult = _v42; + accPlus = _v43; + curMult = _v44; + curPlus = _v45; + delta = _v46; + repeat = _v47; + continue helper; + } + } + }); + var _p75 = A6(helper, 1, 0, 1664525, _p76, delta0, true); + var accMultFinal = _p75._0; + var accPlusFinal = _p75._1; + return A2( + _mgold$elm_random_pcg$Random_Pcg$Seed, + (A2(_mgold$elm_random_pcg$Random_Pcg$mul32, accMultFinal, _p73._0) + accPlusFinal) >>> 0, + _p76); + }); +var _mgold$elm_random_pcg$Random_Pcg$fromJson = _elm_lang$core$Json_Decode$oneOf( + { + ctor: '::', + _0: A3( + _elm_lang$core$Json_Decode$map2, + _mgold$elm_random_pcg$Random_Pcg$Seed, + A2(_elm_lang$core$Json_Decode$index, 0, _elm_lang$core$Json_Decode$int), + A2(_elm_lang$core$Json_Decode$index, 1, _elm_lang$core$Json_Decode$int)), + _1: { + ctor: '::', + _0: A2(_elm_lang$core$Json_Decode$map, _mgold$elm_random_pcg$Random_Pcg$initialSeed, _elm_lang$core$Json_Decode$int), + _1: {ctor: '[]'} + } + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/graph.dat new file mode 100644 index 0000000..dfec8b0 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/mgold/elm-random-pcg/4.0.2/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Chalk.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Chalk.elmi new file mode 100644 index 0000000..dda205c Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Chalk.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Chalk.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Chalk.elmo new file mode 100644 index 0000000..0339210 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Chalk.elmo @@ -0,0 +1,43 @@ +var _rtfeldman$node_test_runner$Chalk$withColorChar = F3( + function (icon, textColor, str) { + return { + styles: { + ctor: '::', + _0: textColor, + _1: {ctor: '[]'} + }, + text: A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$String$fromChar(icon), + A2( + _elm_lang$core$Basics_ops['++'], + ' ', + A2(_elm_lang$core$Basics_ops['++'], str, '\n'))) + }; + }); +var _rtfeldman$node_test_runner$Chalk$encode = function (_p0) { + var _p1 = _p0; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'styles', + _1: _elm_lang$core$Json_Encode$list( + A2(_elm_lang$core$List$map, _elm_lang$core$Json_Encode$string, _p1.styles)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'text', + _1: _elm_lang$core$Json_Encode$string(_p1.text) + }, + _1: {ctor: '[]'} + } + }); +}; +var _rtfeldman$node_test_runner$Chalk$Chalk = F2( + function (a, b) { + return {styles: a, text: b}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Chalk.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Chalk.elmi new file mode 100644 index 0000000..f3e1775 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Chalk.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Chalk.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Chalk.elmo new file mode 100644 index 0000000..31024a7 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Chalk.elmo @@ -0,0 +1,230 @@ +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$chalkWith = function (chalks) { + return _elm_lang$core$Json_Encode$list( + A2(_elm_lang$core$List$map, _rtfeldman$node_test_runner$Chalk$encode, chalks)); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$labelsToChalk = A2( + _elm_community$elm_test$Test_Runner$formatLabels, + A2( + _rtfeldman$node_test_runner$Chalk$withColorChar, + _elm_lang$core$Native_Utils.chr('↓'), + 'dim'), + A2( + _rtfeldman$node_test_runner$Chalk$withColorChar, + _elm_lang$core$Native_Utils.chr('✗'), + 'red')); +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$pluralize = F3( + function (singular, plural, count) { + var suffix = _elm_lang$core$Native_Utils.eq(count, 1) ? singular : plural; + return A2( + _elm_lang$core$String$join, + ' ', + { + ctor: '::', + _0: _elm_lang$core$Basics$toString(count), + _1: { + ctor: '::', + _0: suffix, + _1: {ctor: '[]'} + } + }); + }); +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$reportBegin = function (_p0) { + var _p1 = _p0; + return _rtfeldman$node_test_runner$Test_Reporter_Chalk$chalkWith( + { + ctor: '::', + _0: { + styles: {ctor: '[]'}, + text: A2( + _elm_lang$core$Basics_ops['++'], + '\nelm-test\n--------\n\nRunning ', + A2( + _elm_lang$core$Basics_ops['++'], + A3(_rtfeldman$node_test_runner$Test_Reporter_Chalk$pluralize, 'test', 'tests', _p1.testCount), + A2( + _elm_lang$core$Basics_ops['++'], + '. To reproduce these results, run: elm-test --seed ', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p1.initialSeed), + '\n')))) + }, + _1: {ctor: '[]'} + }); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$indent = function (str) { + return A2( + _elm_lang$core$String$join, + '\n', + A2( + _elm_lang$core$List$map, + F2( + function (x, y) { + return A2(_elm_lang$core$Basics_ops['++'], x, y); + })(' '), + A2(_elm_lang$core$String$split, '\n', str))); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$failureToChalk = function (_p2) { + var _p3 = _p2; + var _p4 = _p3.given; + var messageChalk = { + styles: {ctor: '[]'}, + text: A2( + _elm_lang$core$Basics_ops['++'], + '\n', + A2( + _elm_lang$core$Basics_ops['++'], + _rtfeldman$node_test_runner$Test_Reporter_Chalk$indent(_p3.message), + '\n\n')) + }; + return _elm_lang$core$String$isEmpty(_p4) ? { + ctor: '::', + _0: messageChalk, + _1: {ctor: '[]'} + } : { + ctor: '::', + _0: { + styles: { + ctor: '::', + _0: 'dim', + _1: {ctor: '[]'} + }, + text: A2( + _elm_lang$core$Basics_ops['++'], + '\nGiven ', + A2(_elm_lang$core$Basics_ops['++'], _p4, '\n')) + }, + _1: { + ctor: '::', + _0: messageChalk, + _1: {ctor: '[]'} + } + }; +}; +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$failuresToChalk = F2( + function (labels, failures) { + return A2( + _elm_lang$core$Basics_ops['++'], + _rtfeldman$node_test_runner$Test_Reporter_Chalk$labelsToChalk(labels), + A2(_elm_lang$core$List$concatMap, _rtfeldman$node_test_runner$Test_Reporter_Chalk$failureToChalk, failures)); + }); +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$reportComplete = function (_p5) { + var _p6 = _p5; + var _p7 = A2(_elm_lang$core$List$filterMap, _elm_community$elm_test$Expect$getFailure, _p6.expectations); + if (_p7.ctor === '[]') { + return _elm_lang$core$Maybe$Nothing; + } else { + return _elm_lang$core$Maybe$Just( + _rtfeldman$node_test_runner$Test_Reporter_Chalk$chalkWith( + A2(_rtfeldman$node_test_runner$Test_Reporter_Chalk$failuresToChalk, _p6.labels, _p7))); + } +}; +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$formatDuration = function (time) { + return A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(time), + ' ms'); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Chalk$reportSummary = F2( + function (duration, results) { + var stat = F2( + function (label, value) { + return { + ctor: '::', + _0: { + styles: { + ctor: '::', + _0: 'dim', + _1: {ctor: '[]'} + }, + text: label + }, + _1: { + ctor: '::', + _0: { + styles: {ctor: '[]'}, + text: A2(_elm_lang$core$Basics_ops['++'], value, '\n') + }, + _1: {ctor: '[]'} + } + }; + }); + var failed = _elm_lang$core$List$length( + A2( + _elm_lang$core$List$filter, + function (_p8) { + return A2( + _elm_lang$core$List$all, + F2( + function (x, y) { + return !_elm_lang$core$Native_Utils.eq(x, y); + })(_elm_community$elm_test$Expect$pass), + function (_) { + return _.expectations; + }(_p8)); + }, + results)); + var headline = (_elm_lang$core$Native_Utils.cmp(failed, 0) > 0) ? { + ctor: '::', + _0: { + styles: { + ctor: '::', + _0: 'underline', + _1: { + ctor: '::', + _0: 'red', + _1: {ctor: '[]'} + } + }, + text: '\nTEST RUN FAILED\n\n' + }, + _1: {ctor: '[]'} + } : { + ctor: '::', + _0: { + styles: { + ctor: '::', + _0: 'underline', + _1: { + ctor: '::', + _0: 'green', + _1: {ctor: '[]'} + } + }, + text: '\nTEST RUN PASSED\n\n' + }, + _1: {ctor: '[]'} + }; + var passed = _elm_lang$core$List$length(results) - failed; + return _elm_lang$core$Json_Encode$list( + A2( + _elm_lang$core$List$map, + _rtfeldman$node_test_runner$Chalk$encode, + _elm_lang$core$List$concat( + { + ctor: '::', + _0: headline, + _1: { + ctor: '::', + _0: A2( + stat, + 'Duration: ', + _rtfeldman$node_test_runner$Test_Reporter_Chalk$formatDuration(duration)), + _1: { + ctor: '::', + _0: A2( + stat, + 'Passed: ', + _elm_lang$core$Basics$toString(passed)), + _1: { + ctor: '::', + _0: A2( + stat, + 'Failed: ', + _elm_lang$core$Basics$toString(failed)), + _1: {ctor: '[]'} + } + } + } + }))); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Json.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Json.elmi new file mode 100644 index 0000000..8914157 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Json.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Json.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Json.elmo new file mode 100644 index 0000000..5edf24c --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Json.elmo @@ -0,0 +1,179 @@ +var _rtfeldman$node_test_runner$Test_Reporter_Json$reportSummary = F2( + function (duration, results) { + var failed = _elm_lang$core$List$length( + A2( + _elm_lang$core$List$filter, + function (_p0) { + return A2( + _elm_lang$core$List$all, + F2( + function (x, y) { + return !_elm_lang$core$Native_Utils.eq(x, y); + })(_elm_community$elm_test$Expect$pass), + function (_) { + return _.expectations; + }(_p0)); + }, + results)); + var passed = _elm_lang$core$List$length(results) - failed; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'event', + _1: _elm_lang$core$Json_Encode$string('runComplete') + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'passed', + _1: _elm_lang$core$Json_Encode$string( + _elm_lang$core$Basics$toString(passed)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'failed', + _1: _elm_lang$core$Json_Encode$string( + _elm_lang$core$Basics$toString(failed)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'duration', + _1: _elm_lang$core$Json_Encode$string( + _elm_lang$core$Basics$toString(duration)) + }, + _1: {ctor: '[]'} + } + } + } + }); + }); +var _rtfeldman$node_test_runner$Test_Reporter_Json$encodeFailure = function (_p1) { + var _p2 = _p1; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'given', + _1: _elm_lang$core$Json_Encode$string(_p2.given) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'actual', + _1: _elm_lang$core$Json_Encode$string(_p2.message) + }, + _1: {ctor: '[]'} + } + }); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Json$encodeFailures = function (expectations) { + return _elm_lang$core$Json_Encode$list( + A2( + _elm_lang$core$List$map, + _rtfeldman$node_test_runner$Test_Reporter_Json$encodeFailure, + A2(_elm_lang$core$List$filterMap, _elm_community$elm_test$Expect$getFailure, expectations))); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Json$encodeLabels = function (labels) { + return _elm_lang$core$Json_Encode$list( + A2( + _elm_lang$core$List$map, + _elm_lang$core$Json_Encode$string, + _elm_lang$core$List$reverse(labels))); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Json$getStatus = function (expectations) { + var _p3 = A2(_elm_lang$core$List$filterMap, _elm_community$elm_test$Expect$getFailure, expectations); + if (_p3.ctor === '[]') { + return 'pass'; + } else { + return 'fail'; + } +}; +var _rtfeldman$node_test_runner$Test_Reporter_Json$reportComplete = function (_p4) { + var _p5 = _p4; + var _p6 = _p5.expectations; + return _elm_lang$core$Maybe$Just( + _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'event', + _1: _elm_lang$core$Json_Encode$string('testCompleted') + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'status', + _1: _elm_lang$core$Json_Encode$string( + _rtfeldman$node_test_runner$Test_Reporter_Json$getStatus(_p6)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'labels', + _1: _rtfeldman$node_test_runner$Test_Reporter_Json$encodeLabels(_p5.labels) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'failures', + _1: _rtfeldman$node_test_runner$Test_Reporter_Json$encodeFailures(_p6) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'duration', + _1: _elm_lang$core$Json_Encode$string( + _elm_lang$core$Basics$toString(_p5.duration)) + }, + _1: {ctor: '[]'} + } + } + } + } + })); +}; +var _rtfeldman$node_test_runner$Test_Reporter_Json$reportBegin = function (_p7) { + var _p8 = _p7; + return _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'event', + _1: _elm_lang$core$Json_Encode$string('runStart') + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'testCount', + _1: _elm_lang$core$Json_Encode$string( + _elm_lang$core$Basics$toString(_p8.testCount)) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'initialSeed', + _1: _elm_lang$core$Json_Encode$string( + _elm_lang$core$Basics$toString(_p8.initialSeed)) + }, + _1: {ctor: '[]'} + } + } + }); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Reporter.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Reporter.elmi new file mode 100644 index 0000000..399d0c1 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Reporter.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Reporter.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Reporter.elmo new file mode 100644 index 0000000..3082b98 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Reporter.elmo @@ -0,0 +1,14 @@ +var _rtfeldman$node_test_runner$Test_Reporter_Reporter$TestReporter = F4( + function (a, b, c, d) { + return {format: a, reportBegin: b, reportComplete: c, reportSummary: d}; + }); +var _rtfeldman$node_test_runner$Test_Reporter_Reporter$createReporter = function (report) { + var _p0 = report; + if (_p0.ctor === 'JsonReport') { + return A4(_rtfeldman$node_test_runner$Test_Reporter_Reporter$TestReporter, 'JSON', _rtfeldman$node_test_runner$Test_Reporter_Json$reportBegin, _rtfeldman$node_test_runner$Test_Reporter_Json$reportComplete, _rtfeldman$node_test_runner$Test_Reporter_Json$reportSummary); + } else { + return A4(_rtfeldman$node_test_runner$Test_Reporter_Reporter$TestReporter, 'CHALK', _rtfeldman$node_test_runner$Test_Reporter_Chalk$reportBegin, _rtfeldman$node_test_runner$Test_Reporter_Chalk$reportComplete, _rtfeldman$node_test_runner$Test_Reporter_Chalk$reportSummary); + } +}; +var _rtfeldman$node_test_runner$Test_Reporter_Reporter$JsonReport = {ctor: 'JsonReport'}; +var _rtfeldman$node_test_runner$Test_Reporter_Reporter$ChalkReport = {ctor: 'ChalkReport'}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Result.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Result.elmi new file mode 100644 index 0000000..aedffa5 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Result.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Result.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Result.elmo new file mode 100644 index 0000000..ff8c3cc --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Reporter-Result.elmo @@ -0,0 +1,8 @@ +var _rtfeldman$node_test_runner$Test_Reporter_Result$TestResult = F3( + function (a, b, c) { + return {labels: a, expectations: b, duration: c}; + }); +var _rtfeldman$node_test_runner$Test_Reporter_Result$Failure = F2( + function (a, b) { + return {given: a, message: b}; + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node-App.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node-App.elmi new file mode 100644 index 0000000..997a791 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node-App.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node-App.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node-App.elmo new file mode 100644 index 0000000..2dae6b9 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node-App.elmo @@ -0,0 +1,288 @@ +var _rtfeldman$node_test_runner$Test_Runner_Node_App$decodeReport = function (decoder) { + return A2( + _elm_lang$core$Json_Decode$andThen, + function (str) { + var _p0 = str; + switch (_p0) { + case 'json': + return _elm_lang$core$Json_Decode$succeed(_rtfeldman$node_test_runner$Test_Reporter_Reporter$JsonReport); + case 'chalk': + return _elm_lang$core$Json_Decode$succeed(_rtfeldman$node_test_runner$Test_Reporter_Reporter$ChalkReport); + default: + return _elm_lang$core$Json_Decode$fail( + A2(_elm_lang$core$Basics_ops['++'], 'Invalid --report argument: ', str)); + } + }, + decoder); +}; +var _rtfeldman$node_test_runner$Test_Runner_Node_App$intFromString = A2( + _elm_lang$core$Json_Decode$andThen, + function (str) { + var _p1 = _elm_lang$core$String$toInt(str); + if (_p1.ctor === 'Ok') { + return _elm_lang$core$Json_Decode$succeed(_p1._0); + } else { + return _elm_lang$core$Json_Decode$fail(_p1._0); + } + }, + _elm_lang$core$Json_Decode$string); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$decodeInitArgs = function (args) { + return A2( + _elm_lang$core$Json_Decode$decodeValue, + _elm_lang$core$Json_Decode$oneOf( + { + ctor: '::', + _0: _elm_lang$core$Json_Decode$null( + {ctor: '_Tuple2', _0: _elm_lang$core$Maybe$Nothing, _1: _rtfeldman$node_test_runner$Test_Reporter_Reporter$ChalkReport}), + _1: { + ctor: '::', + _0: A3( + _elm_lang$core$Json_Decode$map2, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + A2( + _elm_lang$core$Json_Decode$field, + 'seed', + _elm_lang$core$Json_Decode$nullable(_rtfeldman$node_test_runner$Test_Runner_Node_App$intFromString)), + A2( + _elm_lang$core$Json_Decode$field, + 'report', + _rtfeldman$node_test_runner$Test_Runner_Node_App$decodeReport(_elm_lang$core$Json_Decode$string))), + _1: {ctor: '[]'} + } + }), + args); +}; +var _rtfeldman$node_test_runner$Test_Runner_Node_App$toThunksHelp = F2( + function (labels, runner) { + toThunksHelp: + while (true) { + var _p2 = runner; + switch (_p2.ctor) { + case 'Runnable': + return { + ctor: '::', + _0: function (_p3) { + var _p4 = _p3; + return { + ctor: '_Tuple2', + _0: labels, + _1: _elm_community$elm_test$Test_Runner$run(_p2._0) + }; + }, + _1: {ctor: '[]'} + }; + case 'Labeled': + var _v4 = {ctor: '::', _0: _p2._0, _1: labels}, + _v5 = _p2._1; + labels = _v4; + runner = _v5; + continue toThunksHelp; + default: + return A2( + _elm_lang$core$List$concatMap, + _rtfeldman$node_test_runner$Test_Runner_Node_App$toThunksHelp(labels), + _p2._0); + } + } + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$toThunks = _rtfeldman$node_test_runner$Test_Runner_Node_App$toThunksHelp( + {ctor: '[]'}); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$fromNever = function (a) { + fromNever: + while (true) { + var _v6 = a; + a = _v6; + continue fromNever; + } +}; +var _rtfeldman$node_test_runner$Test_Runner_Node_App$timeToNumericSeed = function (time) { + return _elm_lang$core$Tuple$first( + A2( + _mgold$elm_random_pcg$Random_Pcg$step, + A2(_mgold$elm_random_pcg$Random_Pcg$int, 100, _mgold$elm_random_pcg$Random_Pcg$maxInt), + _mgold$elm_random_pcg$Random_Pcg$initialSeed( + _elm_lang$core$Basics$floor(time)))); +}; +var _rtfeldman$node_test_runner$Test_Runner_Node_App$InitArgs = F4( + function (a, b, c, d) { + return {initialSeed: a, startTime: b, thunks: c, report: d}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$RunnerOptions = F2( + function (a, b) { + return {seed: a, runs: b}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$AppOptions = F3( + function (a, b, c) { + return {init: a, update: b, subscriptions: c}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$SubMsg = function (a) { + return {ctor: 'SubMsg', _0: a}; +}; +var _rtfeldman$node_test_runner$Test_Runner_Node_App$subscriptions = F2( + function (subs, model) { + var _p5 = model; + if (_p5.ctor === 'Uninitialized') { + return _elm_lang$core$Platform_Sub$none; + } else { + return A2( + _elm_lang$core$Platform_Sub$map, + _rtfeldman$node_test_runner$Test_Runner_Node_App$SubMsg, + subs(_p5._1)); + } + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$Init = function (a) { + return {ctor: 'Init', _0: a}; +}; +var _rtfeldman$node_test_runner$Test_Runner_Node_App$Uninitialized = F2( + function (a, b) { + return {ctor: 'Uninitialized', _0: a, _1: b}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$Initialized = F2( + function (a, b) { + return {ctor: 'Initialized', _0: a, _1: b}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$initOrUpdate = F2( + function (msg, maybeModel) { + var _p6 = maybeModel; + if (_p6.ctor === 'Uninitialized') { + var _p7 = msg; + if (_p7.ctor === 'Init') { + var _p10 = _p7._0; + var numericSeed = function () { + var _p8 = _p6._1.maybeInitialSeed; + if (_p8.ctor === 'Just') { + return _p8._0; + } else { + return _rtfeldman$node_test_runner$Test_Runner_Node_App$timeToNumericSeed(_p10); + } + }(); + var seed = _mgold$elm_random_pcg$Random_Pcg$initialSeed(numericSeed); + var thunks = _rtfeldman$node_test_runner$Test_Runner_Node_App$toThunks( + A3(_elm_community$elm_test$Test_Runner$fromTest, _p6._1.runs, seed, _p6._1.test)); + var _p9 = _p6._1.init( + {initialSeed: numericSeed, startTime: _p10, thunks: thunks, report: _p6._1.report}); + var subModel = _p9._0; + var subCmd = _p9._1; + return { + ctor: '_Tuple2', + _0: A2(_rtfeldman$node_test_runner$Test_Runner_Node_App$Initialized, _p6._0, subModel), + _1: A2(_elm_lang$core$Platform_Cmd$map, _rtfeldman$node_test_runner$Test_Runner_Node_App$SubMsg, subCmd) + }; + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'Test.Runner.Node.App', + { + start: {line: 65, column: 13}, + end: {line: 95, column: 70} + }, + _p7)('Attempted to run a SubMsg pre-Init!'); + } + } else { + var _p15 = _p6._0; + var _p12 = msg; + if (_p12.ctor === 'SubMsg') { + var _p13 = A2(_p15, _p12._0, _p6._1); + var newModel = _p13._0; + var cmd = _p13._1; + return { + ctor: '_Tuple2', + _0: A2(_rtfeldman$node_test_runner$Test_Runner_Node_App$Initialized, _p15, newModel), + _1: A2(_elm_lang$core$Platform_Cmd$map, _rtfeldman$node_test_runner$Test_Runner_Node_App$SubMsg, cmd) + }; + } else { + return _elm_lang$core$Native_Utils.crashCase( + 'Test.Runner.Node.App', + { + start: {line: 98, column: 13}, + end: {line: 107, column: 59} + }, + _p12)('Attempted to init twice!'); + } + } + }); +var _rtfeldman$node_test_runner$Test_Runner_Node_App$run = F3( + function (_p16, appOpts, test) { + var _p17 = _p16; + var _p22 = _p17.seed; + var init = function (args) { + var initArgs = function () { + var _p18 = { + ctor: '_Tuple2', + _0: _rtfeldman$node_test_runner$Test_Runner_Node_App$decodeInitArgs(args), + _1: _p22 + }; + if (_p18._0.ctor === 'Err') { + return _elm_lang$core$Native_Utils.crashCase( + 'Test.Runner.Node.App', + { + start: {line: 212, column: 21}, + end: {line: 237, column: 48} + }, + _p18)( + A2(_elm_lang$core$Basics_ops['++'], 'Invalid --seed argument: ', _p18._0._0)); + } else { + if (_p18._0._0._0.ctor === 'Just') { + if (_p18._1.ctor === 'Just') { + var _p21 = _p18._1._0; + var _p20 = _p18._0._0._0._0; + return _elm_lang$core$Native_Utils.eq(_p20, _p21) ? {ctor: '_Tuple2', _0: _p22, _1: _p18._0._0._1} : _elm_lang$core$Native_Utils.crash( + 'Test.Runner.Node.App', + { + start: {line: 225, column: 33}, + end: {line: 225, column: 44} + })( + A2( + _elm_lang$core$Basics_ops['++'], + 'Received both a --seed flag (', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p20), + A2( + _elm_lang$core$Basics_ops['++'], + ') and a runner option seed (', + A2( + _elm_lang$core$Basics_ops['++'], + _elm_lang$core$Basics$toString(_p21), + '). Which initial seed did you mean to use?'))))); + } else { + return { + ctor: '_Tuple2', + _0: _elm_lang$core$Maybe$Just(_p18._0._0._0._0), + _1: _p18._0._0._1 + }; + } + } else { + if (_p18._1.ctor === 'Just') { + return {ctor: '_Tuple2', _0: _p22, _1: _p18._0._0._1}; + } else { + return {ctor: '_Tuple2', _0: _elm_lang$core$Maybe$Nothing, _1: _p18._0._0._1}; + } + } + } + }(); + var cmd = A2(_elm_lang$core$Task$perform, _rtfeldman$node_test_runner$Test_Runner_Node_App$Init, _elm_lang$core$Time$now); + return { + ctor: '_Tuple2', + _0: A2( + _rtfeldman$node_test_runner$Test_Runner_Node_App$Uninitialized, + appOpts.update, + { + maybeInitialSeed: _elm_lang$core$Tuple$first(initArgs), + report: _elm_lang$core$Tuple$second(initArgs), + runs: _p17.runs, + test: test, + init: appOpts.init + }), + _1: cmd + }; + }; + return _elm_lang$core$Platform$programWithFlags( + { + init: init, + update: _rtfeldman$node_test_runner$Test_Runner_Node_App$initOrUpdate, + subscriptions: _rtfeldman$node_test_runner$Test_Runner_Node_App$subscriptions(appOpts.subscriptions) + }); + }); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node.elmi new file mode 100644 index 0000000..2a73530 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node.elmo new file mode 100644 index 0000000..0f65259 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/Test-Runner-Node.elmo @@ -0,0 +1,243 @@ +var _rtfeldman$node_test_runner$Test_Runner_Node$defaultOptions = {runs: 100, seed: _elm_lang$core$Maybe$Nothing}; +var _rtfeldman$node_test_runner$Test_Runner_Node$warn = F2( + function (str, result) { + var _p0 = _elm_lang$core$Debug$log(str); + return result; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node$Model = F7( + function (a, b, c, d, e, f, g) { + return {available: a, running: b, queue: c, startTime: d, finishTime: e, completed: f, testReporter: g}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node$Options = F2( + function (a, b) { + return {runs: a, seed: b}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node$Finish = function (a) { + return {ctor: 'Finish', _0: a}; +}; +var _rtfeldman$node_test_runner$Test_Runner_Node$Complete = F4( + function (a, b, c, d) { + return {ctor: 'Complete', _0: a, _1: b, _2: c, _3: d}; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node$Dispatch = function (a) { + return {ctor: 'Dispatch', _0: a}; +}; +var _rtfeldman$node_test_runner$Test_Runner_Node$dispatch = A2(_elm_lang$core$Task$perform, _rtfeldman$node_test_runner$Test_Runner_Node$Dispatch, _elm_lang$core$Time$now); +var _rtfeldman$node_test_runner$Test_Runner_Node$update = F3( + function (emit, msg, _p1) { + var _p2 = _p1; + var _p10 = _p2.testReporter; + var _p9 = _p2; + var _p3 = msg; + switch (_p3.ctor) { + case 'Finish': + var duration = _p3._0 - _p9.startTime; + var summary = A2(_p10.reportSummary, duration, _p9.completed); + var failed = _elm_lang$core$List$length( + A2( + _elm_lang$core$List$filter, + function (_p4) { + return A2( + _elm_lang$core$List$all, + F2( + function (x, y) { + return !_elm_lang$core$Native_Utils.eq(x, y); + })(_elm_community$elm_test$Expect$pass), + function (_) { + return _.expectations; + }(_p4)); + }, + _p9.completed)); + var exitCode = _elm_lang$core$Native_Utils.eq(failed, 0) ? 0 : 1; + var data = _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'exitCode', + _1: _elm_lang$core$Json_Encode$int(exitCode) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'format', + _1: _elm_lang$core$Json_Encode$string(_p10.format) + }, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'message', _1: summary}, + _1: {ctor: '[]'} + } + } + }); + return A2( + _rtfeldman$node_test_runner$Test_Runner_Node$warn, + 'Attempted to Dispatch when all tests completed!', + { + ctor: '_Tuple2', + _0: _p9, + _1: emit( + {ctor: '_Tuple2', _0: 'FINISHED', _1: data}) + }); + case 'Complete': + var result = {labels: _p3._1._0, expectations: _p3._1._1, duration: _p3._3 - _p3._2}; + var newModel = _elm_lang$core$Native_Utils.update( + _p9, + { + completed: {ctor: '::', _0: result, _1: _p9.completed} + }); + var reportCmd = function () { + var _p5 = _p10.reportComplete(result); + if (_p5.ctor === 'Just') { + return emit( + { + ctor: '_Tuple2', + _0: 'TEST_COMPLETED', + _1: _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'format', + _1: _elm_lang$core$Json_Encode$string(_p10.format) + }, + _1: { + ctor: '::', + _0: {ctor: '_Tuple2', _0: 'message', _1: _p5._0}, + _1: {ctor: '[]'} + } + }) + }); + } else { + return _elm_lang$core$Platform_Cmd$none; + } + }(); + return { + ctor: '_Tuple2', + _0: newModel, + _1: _elm_lang$core$Platform_Cmd$batch( + { + ctor: '::', + _0: reportCmd, + _1: { + ctor: '::', + _0: _rtfeldman$node_test_runner$Test_Runner_Node$dispatch, + _1: {ctor: '[]'} + } + }) + }; + default: + var _p6 = _p9.queue; + if (_p6.ctor === '[]') { + return { + ctor: '_Tuple2', + _0: _p9, + _1: A2(_elm_lang$core$Task$perform, _rtfeldman$node_test_runner$Test_Runner_Node$Finish, _elm_lang$core$Time$now) + }; + } else { + var _p8 = _p6._0; + var _p7 = A2(_elm_lang$core$Dict$get, _p8, _p9.available); + if (_p7.ctor === 'Nothing') { + return A2( + _rtfeldman$node_test_runner$Test_Runner_Node$warn, + A2( + _elm_lang$core$Basics_ops['++'], + 'Could not find testId ', + _elm_lang$core$Basics$toString(_p8)), + {ctor: '_Tuple2', _0: _p9, _1: _elm_lang$core$Platform_Cmd$none}); + } else { + var available = A2(_elm_lang$core$Dict$remove, _p8, _p9.available); + var newModel = _elm_lang$core$Native_Utils.update( + _p9, + {available: available, queue: _p6._1}); + var complete = A3( + _rtfeldman$node_test_runner$Test_Runner_Node$Complete, + _p8, + _p7._0( + {ctor: '_Tuple0'}), + _p3._0); + return { + ctor: '_Tuple2', + _0: newModel, + _1: A2(_elm_lang$core$Task$perform, complete, _elm_lang$core$Time$now) + }; + } + } + } + }); +var _rtfeldman$node_test_runner$Test_Runner_Node$init = F2( + function (emit, _p11) { + var _p12 = _p11; + var testReporter = _rtfeldman$node_test_runner$Test_Reporter_Reporter$createReporter(_p12.report); + var indexedThunks = A2( + _elm_lang$core$List$indexedMap, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + _p12.thunks); + var testCount = _elm_lang$core$List$length(indexedThunks); + var reportCmd = emit( + { + ctor: '_Tuple2', + _0: 'STARTED', + _1: _elm_lang$core$Json_Encode$object( + { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'format', + _1: _elm_lang$core$Json_Encode$string(testReporter.format) + }, + _1: { + ctor: '::', + _0: { + ctor: '_Tuple2', + _0: 'message', + _1: testReporter.reportBegin( + {testCount: testCount, initialSeed: _p12.initialSeed}) + }, + _1: {ctor: '[]'} + } + }) + }); + var model = { + available: _elm_lang$core$Dict$fromList(indexedThunks), + running: _elm_lang$core$Set$empty, + queue: A2(_elm_lang$core$List$map, _elm_lang$core$Tuple$first, indexedThunks), + completed: {ctor: '[]'}, + startTime: _p12.startTime, + finishTime: _elm_lang$core$Maybe$Nothing, + testReporter: testReporter + }; + return { + ctor: '_Tuple2', + _0: model, + _1: _elm_lang$core$Platform_Cmd$batch( + { + ctor: '::', + _0: _rtfeldman$node_test_runner$Test_Runner_Node$dispatch, + _1: { + ctor: '::', + _0: reportCmd, + _1: {ctor: '[]'} + } + }) + }; + }); +var _rtfeldman$node_test_runner$Test_Runner_Node$runWithOptions = F2( + function (_p13, emit) { + var _p14 = _p13; + return A2( + _rtfeldman$node_test_runner$Test_Runner_Node_App$run, + {runs: _p14.runs, seed: _p14.seed}, + { + init: _rtfeldman$node_test_runner$Test_Runner_Node$init(emit), + update: _rtfeldman$node_test_runner$Test_Runner_Node$update(emit), + subscriptions: function (_p15) { + return _elm_lang$core$Platform_Sub$none; + } + }); + }); +var _rtfeldman$node_test_runner$Test_Runner_Node$run = _rtfeldman$node_test_runner$Test_Runner_Node$runWithOptions(_rtfeldman$node_test_runner$Test_Runner_Node$defaultOptions); diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/graph.dat new file mode 100644 index 0000000..2741f9b Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/rtfeldman/node-test-runner/3.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/Erl.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/Erl.elmi new file mode 100644 index 0000000..f257f55 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/Erl.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/Erl.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/Erl.elmo new file mode 100644 index 0000000..42835fb --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/Erl.elmo @@ -0,0 +1,443 @@ +var _sporto$erl$Erl$appendPathSegments = F2( + function (segments, url) { + var newPath = A2(_elm_lang$core$List$append, url.path, segments); + return _elm_lang$core$Native_Utils.update( + url, + {path: newPath}); + }); +var _sporto$erl$Erl$removeQuery = F2( + function (key, url) { + var updated = A2( + _elm_lang$core$List$filter, + function (_p0) { + var _p1 = _p0; + return !_elm_lang$core$Native_Utils.eq(_p1._0, key); + }, + url.query); + return _elm_lang$core$Native_Utils.update( + url, + {query: updated}); + }); +var _sporto$erl$Erl$addQuery = F3( + function (key, val, url) { + var updated = _elm_lang$core$List$reverse( + A2( + F2( + function (x, y) { + return {ctor: '::', _0: x, _1: y}; + }), + {ctor: '_Tuple2', _0: key, _1: val}, + _elm_lang$core$List$reverse(url.query))); + return _elm_lang$core$Native_Utils.update( + url, + {query: updated}); + }); +var _sporto$erl$Erl$setQuery = F3( + function (key, val, url) { + var without = A2(_sporto$erl$Erl$removeQuery, key, url); + return A3(_sporto$erl$Erl$addQuery, key, val, without); + }); +var _sporto$erl$Erl$clearQuery = function (url) { + return _elm_lang$core$Native_Utils.update( + url, + { + query: {ctor: '[]'} + }); +}; +var _sporto$erl$Erl$new = { + protocol: '', + username: '', + password: '', + host: {ctor: '[]'}, + path: {ctor: '[]'}, + hasLeadingSlash: false, + hasTrailingSlash: false, + port_: 0, + hash: '', + query: {ctor: '[]'} +}; +var _sporto$erl$Erl$hashToString = function (url) { + return _elm_lang$core$String$isEmpty(url.hash) ? '' : A2(_elm_lang$core$Basics_ops['++'], '#', url.hash); +}; +var _sporto$erl$Erl$trailingSlashComponent = function (url) { + return _elm_lang$core$Native_Utils.eq(url.hasTrailingSlash, true) ? '/' : ''; +}; +var _sporto$erl$Erl$portComponent = function (url) { + var _p2 = url.port_; + switch (_p2) { + case 0: + return ''; + case 80: + return ''; + default: + return A2( + _elm_lang$core$Basics_ops['++'], + ':', + _elm_lang$core$Basics$toString(url.port_)); + } +}; +var _sporto$erl$Erl$hostComponent = function (url) { + return _elm_lang$http$Http$encodeUri( + A2(_elm_lang$core$String$join, '.', url.host)); +}; +var _sporto$erl$Erl$pathComponent = function (url) { + var leadingSlash = ((!_elm_lang$core$Native_Utils.eq( + _sporto$erl$Erl$hostComponent(url), + '')) || url.hasLeadingSlash) ? '/' : ''; + var encoded = A2(_elm_lang$core$List$map, _elm_lang$http$Http$encodeUri, url.path); + return _elm_lang$core$Native_Utils.eq( + _elm_lang$core$List$length(url.path), + 0) ? '' : A2( + _elm_lang$core$Basics_ops['++'], + leadingSlash, + A2(_elm_lang$core$String$join, '/', encoded)); +}; +var _sporto$erl$Erl$protocolComponent = function (url) { + var _p3 = url.protocol; + if (_p3 === '') { + return ''; + } else { + return A2(_elm_lang$core$Basics_ops['++'], url.protocol, '://'); + } +}; +var _sporto$erl$Erl$queryToString = function (url) { + var encodedTuples = A2( + _elm_lang$core$List$map, + function (_p4) { + var _p5 = _p4; + return { + ctor: '_Tuple2', + _0: _elm_lang$http$Http$encodeUri(_p5._0), + _1: _elm_lang$http$Http$encodeUri(_p5._1) + }; + }, + url.query); + var parts = A2( + _elm_lang$core$List$map, + function (_p6) { + var _p7 = _p6; + return A2( + _elm_lang$core$Basics_ops['++'], + _p7._0, + A2(_elm_lang$core$Basics_ops['++'], '=', _p7._1)); + }, + encodedTuples); + return _elm_lang$core$List$isEmpty(url.query) ? '' : A2( + _elm_lang$core$Basics_ops['++'], + '?', + A2(_elm_lang$core$String$join, '&', parts)); +}; +var _sporto$erl$Erl$toString = function (url) { + var hash = _sporto$erl$Erl$hashToString(url); + var query_ = _sporto$erl$Erl$queryToString(url); + var trailingSlash_ = _sporto$erl$Erl$trailingSlashComponent(url); + var path_ = _sporto$erl$Erl$pathComponent(url); + var port_ = _sporto$erl$Erl$portComponent(url); + var host_ = _sporto$erl$Erl$hostComponent(url); + var protocol_ = _sporto$erl$Erl$protocolComponent(url); + return A2( + _elm_lang$core$Basics_ops['++'], + protocol_, + A2( + _elm_lang$core$Basics_ops['++'], + host_, + A2( + _elm_lang$core$Basics_ops['++'], + port_, + A2( + _elm_lang$core$Basics_ops['++'], + path_, + A2( + _elm_lang$core$Basics_ops['++'], + trailingSlash_, + A2(_elm_lang$core$Basics_ops['++'], query_, hash)))))); +}; +var _sporto$erl$Erl$queryStringElementToTuple = function (element) { + var splitted = A2(_elm_lang$core$String$split, '=', element); + var first = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head(splitted)); + var firstDecoded = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$http$Http$decodeUri(first)); + var second = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2(_elm_lang$core$List$drop, 1, splitted))); + var secondDecoded = A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$http$Http$decodeUri(second)); + return {ctor: '_Tuple2', _0: firstDecoded, _1: secondDecoded}; +}; +var _sporto$erl$Erl$parseQuery = function (queryString) { + var splitted = A2(_elm_lang$core$String$split, '&', queryString); + return _elm_lang$core$String$isEmpty(queryString) ? {ctor: '[]'} : A2(_elm_lang$core$List$map, _sporto$erl$Erl$queryStringElementToTuple, splitted); +}; +var _sporto$erl$Erl$extractQuery = function (str) { + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$String$split, + '#', + A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$drop, + 1, + A2(_elm_lang$core$String$split, '?', str))))))); +}; +var _sporto$erl$Erl$queryFromAll = function (all) { + return _sporto$erl$Erl$parseQuery( + _sporto$erl$Erl$extractQuery(all)); +}; +var _sporto$erl$Erl$extractHash = function (str) { + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$drop, + 1, + A2(_elm_lang$core$String$split, '#', str)))); +}; +var _sporto$erl$Erl$hashFromAll = function (str) { + return _sporto$erl$Erl$extractHash(str); +}; +var _sporto$erl$Erl$parseHost = function (str) { + return A2(_elm_lang$core$String$split, '.', str); +}; +var _sporto$erl$Erl$extractProtocol = function (str) { + var parts = A2(_elm_lang$core$String$split, '://', str); + var _p8 = _elm_lang$core$List$length(parts); + if (_p8 === 1) { + return ''; + } else { + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head(parts)); + } +}; +var _sporto$erl$Erl$extractPort = function (str) { + var rx = _elm_lang$core$Regex$regex(':\\d+'); + var res = A3( + _elm_lang$core$Regex$find, + _elm_lang$core$Regex$AtMost(1), + rx, + str); + return function (result) { + var _p9 = result; + if (_p9.ctor === 'Ok') { + return _p9._0; + } else { + var _p10 = _sporto$erl$Erl$extractProtocol(str); + switch (_p10) { + case 'http': + return 80; + case 'https': + return 443; + case 'ftp': + return 21; + case 'sftp': + return 22; + default: + return 0; + } + } + }( + _elm_lang$core$String$toInt( + A2( + _elm_lang$core$String$dropLeft, + 1, + A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$map, + function (_) { + return _.match; + }, + res)))))); +}; +var _sporto$erl$Erl$leftFrom = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + var head = _elm_lang$core$List$head(parts); + var _p11 = _elm_lang$core$List$length(parts); + switch (_p11) { + case 0: + return ''; + case 1: + return ''; + default: + return A2(_elm_lang$core$Maybe$withDefault, '', head); + } + }); +var _sporto$erl$Erl$leftFromOrSame = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head(parts)); + }); +var _sporto$erl$Erl$rightFromOrSame = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + _elm_lang$core$List$reverse(parts))); + }); +var _sporto$erl$Erl$extractHost = function (str) { + var localhostRx = 'localhost'; + var dotsRx = '((\\w|-)+\\.)+(\\w|-)+'; + var rx = A2( + _elm_lang$core$Basics_ops['++'], + '(', + A2( + _elm_lang$core$Basics_ops['++'], + dotsRx, + A2( + _elm_lang$core$Basics_ops['++'], + '|', + A2(_elm_lang$core$Basics_ops['++'], localhostRx, ')')))); + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + A2( + _elm_lang$core$List$map, + function (_) { + return _.match; + }, + A3( + _elm_lang$core$Regex$find, + _elm_lang$core$Regex$AtMost(1), + _elm_lang$core$Regex$regex(rx), + A2( + _sporto$erl$Erl$leftFromOrSame, + '/', + A2(_sporto$erl$Erl$rightFromOrSame, '//', str)))))); +}; +var _sporto$erl$Erl$host = function (str) { + return _sporto$erl$Erl$parseHost( + _sporto$erl$Erl$extractHost(str)); +}; +var _sporto$erl$Erl$extractPath = function (str) { + var host = _sporto$erl$Erl$extractHost(str); + return A4( + _elm_lang$core$Regex$replace, + _elm_lang$core$Regex$AtMost(1), + _elm_lang$core$Regex$regex(':\\d+'), + function (_p12) { + return ''; + }, + A4( + _elm_lang$core$Regex$replace, + _elm_lang$core$Regex$AtMost(1), + _elm_lang$core$Regex$regex(host), + function (_p13) { + return ''; + }, + A2( + _sporto$erl$Erl$leftFromOrSame, + '#', + A2( + _sporto$erl$Erl$leftFromOrSame, + '?', + A2(_sporto$erl$Erl$rightFromOrSame, '//', str))))); +}; +var _sporto$erl$Erl$hasLeadingSlashFromAll = function (str) { + return A2( + _elm_lang$core$Regex$contains, + _elm_lang$core$Regex$regex('^/'), + _sporto$erl$Erl$extractPath(str)); +}; +var _sporto$erl$Erl$hasTrailingSlashFromAll = function (str) { + return A2( + _elm_lang$core$Regex$contains, + _elm_lang$core$Regex$regex('/$'), + _sporto$erl$Erl$extractPath(str)); +}; +var _sporto$erl$Erl$rightFrom = F2( + function (delimiter, str) { + var parts = A2(_elm_lang$core$String$split, delimiter, str); + var _p14 = _elm_lang$core$List$length(parts); + switch (_p14) { + case 0: + return ''; + case 1: + return ''; + default: + return A2( + _elm_lang$core$Maybe$withDefault, + '', + _elm_lang$core$List$head( + _elm_lang$core$List$reverse(parts))); + } + }); +var _sporto$erl$Erl$notEmpty = function (str) { + return !_elm_lang$core$String$isEmpty(str); +}; +var _sporto$erl$Erl$parsePath = function (str) { + return A2( + _elm_lang$core$List$map, + _elm_lang$core$Maybe$withDefault(''), + A2( + _elm_lang$core$List$map, + _elm_lang$http$Http$decodeUri, + A2( + _elm_lang$core$List$filter, + _sporto$erl$Erl$notEmpty, + A2(_elm_lang$core$String$split, '/', str)))); +}; +var _sporto$erl$Erl$pathFromAll = function (str) { + return _sporto$erl$Erl$parsePath( + _sporto$erl$Erl$extractPath(str)); +}; +var _sporto$erl$Erl$parse = function (str) { + return { + host: _sporto$erl$Erl$host(str), + hash: _sporto$erl$Erl$hashFromAll(str), + password: '', + path: _sporto$erl$Erl$pathFromAll(str), + hasLeadingSlash: _sporto$erl$Erl$hasLeadingSlashFromAll(str), + hasTrailingSlash: _sporto$erl$Erl$hasTrailingSlashFromAll(str), + port_: _sporto$erl$Erl$extractPort(str), + protocol: _sporto$erl$Erl$extractProtocol(str), + query: _sporto$erl$Erl$queryFromAll(str), + username: '' + }; +}; +var _sporto$erl$Erl$Url = function (a) { + return function (b) { + return function (c) { + return function (d) { + return function (e) { + return function (f) { + return function (g) { + return function (h) { + return function (i) { + return function (j) { + return {protocol: a, username: b, password: c, host: d, port_: e, path: f, hasLeadingSlash: g, hasTrailingSlash: h, hash: i, query: j}; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/graph.dat new file mode 100644 index 0000000..4138324 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/sporto/erl/11.0.0/graph.dat differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/Base64.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/Base64.elmi new file mode 100644 index 0000000..1ed0524 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/Base64.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/Base64.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/Base64.elmo new file mode 100644 index 0000000..d9a92d8 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/Base64.elmo @@ -0,0 +1,218 @@ +var _truqu$elm_base64$Base64$dropLast = F2( + function (number, list) { + return _elm_lang$core$List$reverse( + A2( + _elm_lang$core$List$drop, + number, + _elm_lang$core$List$reverse(list))); + }); +var _truqu$elm_base64$Base64$partitionBits = function (list) { + var list_ = A3( + _elm_lang$core$List$foldr, + _elm_lang$core$List$append, + {ctor: '[]'}, + A2(_elm_lang$core$List$map, _truqu$elm_base64$BitList$fromByte, list)); + return A2( + _elm_lang$core$List$map, + _truqu$elm_base64$BitList$toByte, + A2(_truqu$elm_base64$BitList$partition, 6, list_)); +}; +var _truqu$elm_base64$Base64$base64CharsList = _elm_lang$core$String$toList('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'); +var _truqu$elm_base64$Base64$base64Map = function () { + var insert = F2( + function (_p0, dict) { + var _p1 = _p0; + return A3(_elm_lang$core$Dict$insert, _p1._1, _p1._0, dict); + }); + return A3( + _elm_lang$core$List$foldl, + insert, + _elm_lang$core$Dict$empty, + A2( + _elm_lang$core$List$indexedMap, + F2( + function (v0, v1) { + return {ctor: '_Tuple2', _0: v0, _1: v1}; + }), + _truqu$elm_base64$Base64$base64CharsList)); +}(); +var _truqu$elm_base64$Base64$isValid = function (string) { + var string_ = A2(_elm_lang$core$String$endsWith, '==', string) ? A2(_elm_lang$core$String$dropRight, 2, string) : (A2(_elm_lang$core$String$endsWith, '=', string) ? A2(_elm_lang$core$String$dropRight, 1, string) : string); + var isBase64Char = function ($char) { + return A2(_elm_lang$core$Dict$member, $char, _truqu$elm_base64$Base64$base64Map); + }; + return A2(_elm_lang$core$String$all, isBase64Char, string_); +}; +var _truqu$elm_base64$Base64$toBase64BitList = function (string) { + var endingEquals = A2(_elm_lang$core$String$endsWith, '==', string) ? 2 : (A2(_elm_lang$core$String$endsWith, '=', string) ? 1 : 0); + var stripped = _elm_lang$core$String$toList( + A2(_elm_lang$core$String$dropRight, endingEquals, string)); + var base64ToInt = function ($char) { + var _p2 = A2(_elm_lang$core$Dict$get, $char, _truqu$elm_base64$Base64$base64Map); + if (_p2.ctor === 'Just') { + return _p2._0; + } else { + return -1; + } + }; + var numberList = A2(_elm_lang$core$List$map, base64ToInt, stripped); + return A2( + _truqu$elm_base64$Base64$dropLast, + endingEquals * 2, + A2( + _elm_lang$core$List$concatMap, + A2(_elm_lang$core$Basics$flip, _truqu$elm_base64$BitList$fromNumberWithSize, 6), + numberList)); +}; +var _truqu$elm_base64$Base64$toCharList = function (bitList) { + var array = _elm_lang$core$Array$fromList(_truqu$elm_base64$Base64$base64CharsList); + var toBase64Char = function (index) { + return A2( + _elm_lang$core$Maybe$withDefault, + _elm_lang$core$Native_Utils.chr('!'), + A2(_elm_lang$core$Array$get, index, array)); + }; + var toChars = function (_p3) { + var _p4 = _p3; + var _p5 = {ctor: '_Tuple3', _0: _p4._0, _1: _p4._1, _2: _p4._2}; + if (_p5._2 === -1) { + if (_p5._1 === -1) { + return A2( + _elm_lang$core$List$append, + A2( + _truqu$elm_base64$Base64$dropLast, + 2, + A2( + _elm_lang$core$List$map, + toBase64Char, + _truqu$elm_base64$Base64$partitionBits( + { + ctor: '::', + _0: _p5._0, + _1: { + ctor: '::', + _0: 0, + _1: { + ctor: '::', + _0: 0, + _1: {ctor: '[]'} + } + } + }))), + { + ctor: '::', + _0: _elm_lang$core$Native_Utils.chr('='), + _1: { + ctor: '::', + _0: _elm_lang$core$Native_Utils.chr('='), + _1: {ctor: '[]'} + } + }); + } else { + return A2( + _elm_lang$core$List$append, + A2( + _truqu$elm_base64$Base64$dropLast, + 1, + A2( + _elm_lang$core$List$map, + toBase64Char, + _truqu$elm_base64$Base64$partitionBits( + { + ctor: '::', + _0: _p5._0, + _1: { + ctor: '::', + _0: _p5._1, + _1: { + ctor: '::', + _0: 0, + _1: {ctor: '[]'} + } + } + }))), + { + ctor: '::', + _0: _elm_lang$core$Native_Utils.chr('='), + _1: {ctor: '[]'} + }); + } + } else { + return A2( + _elm_lang$core$List$map, + toBase64Char, + _truqu$elm_base64$Base64$partitionBits( + { + ctor: '::', + _0: _p5._0, + _1: { + ctor: '::', + _0: _p5._1, + _1: { + ctor: '::', + _0: _p5._2, + _1: {ctor: '[]'} + } + } + })); + } + }; + return A2(_elm_lang$core$List$concatMap, toChars, bitList); +}; +var _truqu$elm_base64$Base64$toTupleList = function (list) { + var _p6 = list; + if (_p6.ctor === '::') { + if (_p6._1.ctor === '::') { + if (_p6._1._1.ctor === '::') { + return { + ctor: '::', + _0: {ctor: '_Tuple3', _0: _p6._0, _1: _p6._1._0, _2: _p6._1._1._0}, + _1: _truqu$elm_base64$Base64$toTupleList(_p6._1._1._1) + }; + } else { + return { + ctor: '::', + _0: {ctor: '_Tuple3', _0: _p6._0, _1: _p6._1._0, _2: -1}, + _1: {ctor: '[]'} + }; + } + } else { + return { + ctor: '::', + _0: {ctor: '_Tuple3', _0: _p6._0, _1: -1, _2: -1}, + _1: {ctor: '[]'} + }; + } + } else { + return {ctor: '[]'}; + } +}; +var _truqu$elm_base64$Base64$toCodeList = function (string) { + return A2( + _elm_lang$core$List$map, + _elm_lang$core$Char$toCode, + _elm_lang$core$String$toList(string)); +}; +var _truqu$elm_base64$Base64$decode = function (s) { + if (!_truqu$elm_base64$Base64$isValid(s)) { + return _elm_lang$core$Result$Err('Error while decoding'); + } else { + var bitList = A2( + _elm_lang$core$List$map, + _truqu$elm_base64$BitList$toByte, + A2( + _truqu$elm_base64$BitList$partition, + 8, + _truqu$elm_base64$Base64$toBase64BitList(s))); + var charList = A2(_elm_lang$core$List$map, _elm_lang$core$Char$fromCode, bitList); + return _elm_lang$core$Result$Ok( + _elm_lang$core$String$fromList(charList)); + } +}; +var _truqu$elm_base64$Base64$encode = function (s) { + return _elm_lang$core$Result$Ok( + _elm_lang$core$String$fromList( + _truqu$elm_base64$Base64$toCharList( + _truqu$elm_base64$Base64$toTupleList( + _truqu$elm_base64$Base64$toCodeList(s))))); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/BitList.elmi b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/BitList.elmi new file mode 100644 index 0000000..9a13866 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/BitList.elmi differ diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/BitList.elmo b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/BitList.elmo new file mode 100644 index 0000000..7e552c2 --- /dev/null +++ b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/BitList.elmo @@ -0,0 +1,90 @@ +var _truqu$elm_base64$BitList$partition = F2( + function (size, list) { + if (_elm_lang$core$Native_Utils.cmp( + _elm_lang$core$List$length(list), + size) < 1) { + return { + ctor: '::', + _0: list, + _1: {ctor: '[]'} + }; + } else { + var partitionTail = F3( + function (size, list, res) { + partitionTail: + while (true) { + var _p0 = list; + if (_p0.ctor === '[]') { + return res; + } else { + var _v1 = size, + _v2 = A2(_elm_lang$core$List$drop, size, list), + _v3 = { + ctor: '::', + _0: A2(_elm_lang$core$List$take, size, list), + _1: res + }; + size = _v1; + list = _v2; + res = _v3; + continue partitionTail; + } + } + }); + return _elm_lang$core$List$reverse( + A3( + partitionTail, + size, + list, + {ctor: '[]'})); + } + }); +var _truqu$elm_base64$BitList$toByteReverse = function (bitList) { + var _p1 = bitList; + if (_p1.ctor === '[]') { + return 0; + } else { + if (_p1._0.ctor === 'Off') { + return 2 * _truqu$elm_base64$BitList$toByteReverse(_p1._1); + } else { + return 1 + (2 * _truqu$elm_base64$BitList$toByteReverse(_p1._1)); + } + } +}; +var _truqu$elm_base64$BitList$toByte = function (bitList) { + return _truqu$elm_base64$BitList$toByteReverse( + _elm_lang$core$List$reverse(bitList)); +}; +var _truqu$elm_base64$BitList$Off = {ctor: 'Off'}; +var _truqu$elm_base64$BitList$On = {ctor: 'On'}; +var _truqu$elm_base64$BitList$fromNumber = function ($int) { + return _elm_lang$core$Native_Utils.eq($int, 0) ? {ctor: '[]'} : (_elm_lang$core$Native_Utils.eq( + A2(_elm_lang$core$Basics_ops['%'], $int, 2), + 1) ? A2( + _elm_lang$core$List$append, + _truqu$elm_base64$BitList$fromNumber(($int / 2) | 0), + { + ctor: '::', + _0: _truqu$elm_base64$BitList$On, + _1: {ctor: '[]'} + }) : A2( + _elm_lang$core$List$append, + _truqu$elm_base64$BitList$fromNumber(($int / 2) | 0), + { + ctor: '::', + _0: _truqu$elm_base64$BitList$Off, + _1: {ctor: '[]'} + })); +}; +var _truqu$elm_base64$BitList$fromNumberWithSize = F2( + function (number, size) { + var bitList = _truqu$elm_base64$BitList$fromNumber(number); + var paddingSize = size - _elm_lang$core$List$length(bitList); + return A2( + _elm_lang$core$List$append, + A2(_elm_lang$core$List$repeat, paddingSize, _truqu$elm_base64$BitList$Off), + bitList); + }); +var _truqu$elm_base64$BitList$fromByte = function ($byte) { + return A2(_truqu$elm_base64$BitList$fromNumberWithSize, $byte, 8); +}; diff --git a/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/graph.dat b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/graph.dat new file mode 100644 index 0000000..1892bf9 Binary files /dev/null and b/app/templates/client/elm-stuff/build-artifacts/0.18.0/truqu/elm-base64/1.0.5/graph.dat differ diff --git a/app/templates/client/elm-stuff/exact-dependencies.json b/app/templates/client/elm-stuff/exact-dependencies.json new file mode 100644 index 0000000..60a5840 --- /dev/null +++ b/app/templates/client/elm-stuff/exact-dependencies.json @@ -0,0 +1,20 @@ +{ + "elm-community/lazy-list": "1.0.0", + "krisajenkins/remotedata": "4.0.1", + "elm-community/elm-test": "3.1.0", + "elm-lang/navigation": "2.0.1", + "elm-community/shrink": "2.0.0", + "elm-lang/virtual-dom": "2.0.2", + "truqu/elm-base64": "1.0.5", + "mgold/elm-random-pcg": "4.0.2", + "elm-lang/lazy": "2.0.0", + "elm-lang/dom": "1.1.1", + "elm-lang/html": "2.0.0", + "elm-community/json-extra": "2.0.0", + "elm-lang/http": "1.0.0", + "lukewestby/elm-http-builder": "4.0.0", + "NoRedInk/elm-decode-pipeline": "3.0.0", + "rtfeldman/node-test-runner": "3.0.0", + "sporto/erl": "11.0.0", + "elm-lang/core": "5.0.0" +} \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/.gitignore b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/.gitignore new file mode 100644 index 0000000..a594364 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/.gitignore @@ -0,0 +1,4 @@ +# elm-package generated files +elm-stuff/ +# elm-repl generated files +repl-temp-* diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/LICENSE b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/LICENSE new file mode 100644 index 0000000..a8e355a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2016, NoRedInk +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of elm-decode-pipeline nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/README.md b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/README.md new file mode 100644 index 0000000..7843d4d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/README.md @@ -0,0 +1,108 @@ +# elm-decode-pipeline + +A library for building decoders using the pipeline [`(|>)`](http://package.elm-lang.org/packages/elm-lang/core/3.0.0/Basics#|>) +operator and plain function calls. + +## Motivation + +It's common to decode into a record that has a `type alias`. Here's an example +of this from the [`object3`](http://package.elm-lang.org/packages/elm-lang/core/3.0.0/Json-Decode#object3) +docs: + +```elm +type alias Job = { name : String, id : Int, completed : Bool } + +point : Decoder Job +point = + object3 Job + ("name" := string) + ("id" := int) + ("completed" := bool) +``` + +This works because a record type alias can be called as a normal function. In +that case it accepts one argument for each field (in whatever order the fields +are declared in the type alias) and then returns an appropriate record built +with those arguments. + +The `objectN` decoders are straightforward, but require manually changing N +whenever the field count changes. This library provides functions designed to +be used with the `|>` operator, with the goal of having decoders that are both +easy to read and easy to modify. + +## Examples + +Here is a decoder built with this library. + +```elm +import Json.Decode exposing (int, string, float, Decoder) +import Json.Decode.Pipeline exposing (decode, required, optional, hardcoded) + + +type alias User = + { id : Int + , email : Maybe String + , name : String + , percentExcited : Float + } + + +userDecoder : Decoder User +userDecoder = + decode User + |> required "id" int + |> required "email" (nullable string) -- `null` decodes to `Nothing` + |> optional "name" string "(fallback if name is `null` or not present)" + |> hardcoded 1.0 +``` + +In this example: + +* `decode` is a synonym for [`succeed`](http://package.elm-lang.org/packages/elm-lang/core/3.0.0/Json-Decode#succeed) (it just reads better here) +* `required "id" int` is similar to `("id" := int)` +* `optional` is like `required`, but if the field is either `null` or not present, decoding does not fail; instead it succeeds with the provided fallback value. +* `hardcoded` does not look at the provided JSON, and instead always decodes to the same value. + +You could use this decoder as follows: + +```elm +Json.Decode.decodeString + userDecoder + """ + {"id": 123, "email": "sam@example.com", "name": "Sam Sample"} + """ +``` + +The result would be: + +```elm +{ id = 123 +, email = "sam@example.com" +, name = "Sam Sample" +, percentExcited = 1.0 +} +``` + +Alternatively, you could use it like so: + +```elm +Json.Decode.decodeString + userDecoder + """ + {"id": 123, "email": "sam@example.com", "percentExcited": "(hardcoded)"} + """ +``` + +In this case, the result would be: + +```elm +{ id = 123 +, email = "sam@example.com" +, name = "(fallback if name not present)" +, percentExcited = 1.0 +} +``` + +--- +[![NoRedInk](https://cloud.githubusercontent.com/assets/1094080/9069346/99522418-3a9d-11e5-8175-1c2bfd7a2ffe.png)][team] +[team]: http://noredink.com/about/team diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/elm-package.json new file mode 100644 index 0000000..06af200 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/elm-package.json @@ -0,0 +1,16 @@ +{ + "version": "3.0.0", + "summary": "A pipeline-friendly library for building JSON decoders.", + "repository": "https://github.com/NoRedInk/elm-decode-pipeline.git", + "license": "BSD-3-Clause", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Json.Decode.Pipeline" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/examples/Example.elm b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/examples/Example.elm new file mode 100644 index 0000000..3b83e15 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/examples/Example.elm @@ -0,0 +1,19 @@ +module Example exposing (..) + +import Json.Decode exposing (int, string, float, Decoder) +import Json.Decode.Pipeline exposing (decode, required, optional, hardcoded) + + +type alias User = + { id : Int + , name : String + , percentExcited : Float + } + + +userDecoder : Decoder User +userDecoder = + decode User + |> required "id" int + |> optional "name" string "(fallback if name not present)" + |> hardcoded 1.0 diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/src/Json/Decode/Pipeline.elm b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/src/Json/Decode/Pipeline.elm new file mode 100644 index 0000000..15eab71 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/src/Json/Decode/Pipeline.elm @@ -0,0 +1,292 @@ +module Json.Decode.Pipeline exposing (required, requiredAt, optional, optionalAt, resolve, decode, hardcoded, custom) + +{-| # Json.Decode.Pipeline + +Use the `(|>)` operator to build JSON decoders. + +## Decoding fields + +@docs required, requiredAt, optional, optionalAt, hardcoded, custom + +## Beginning and ending pipelines + +@docs decode, resolve + +-} + +import Json.Decode as Decode exposing (Decoder) + + +{-| Decode a required field. + + import Json.Decode exposing (int, string, Decoder) + import Decode.Pipeline exposing (decode, required) + + + type alias User = + { id : Int + , name : String + , email : String + } + + + userDecoder : Decoder User + userDecoder = + decode User + |> required "id" int + |> required "name" string + |> required "email" string + + + result : Result String User + result = + Decode.decodeString + userDecoder + """ + {"id": 123, "email": "sam@example.com", "name": "Sam"} + """ + -- Ok { id = 123, name = "Sam", email = "sam@example.com" } +-} +required : String -> Decoder a -> Decoder (a -> b) -> Decoder b +required key valDecoder decoder = + custom (Decode.field key valDecoder) decoder + + +{-| Decode a required nested field. +-} +requiredAt : List String -> Decoder a -> Decoder (a -> b) -> Decoder b +requiredAt path valDecoder decoder = + custom (Decode.at path valDecoder) decoder + + +{-| Decode a field that may be missing or have a null value. If the field is +missing, then it decodes as the `fallback` value. If the field is present, +then `valDecoder` is used to decode its value. If `valDecoder` fails on a +`null` value, then the `fallback` is used as if the field were missing +entirely. + + import Json.Decode exposing (int, string, null, oneOf, Decoder) + import Decode.Pipeline exposing (decode, required, optional) + + + type alias User = + { id : Int + , name : String + , email : String + } + + + userDecoder : Decoder User + userDecoder = + decode User + |> required "id" int + |> optional "name" string "blah" + |> required "email" string + + + result : Result String User + result = + Decode.decodeString + userDecoder + """ + {"id": 123, "email": "sam@example.com" } + """ + -- Ok { id = 123, name = "blah", email = "sam@example.com" } + +Because `valDecoder` is given an opportunity to decode `null` values before +resorting to the `fallback`, you can distinguish between missing and `null` +values if you need to: + + userDecoder2 = + decode User + |> required "id" int + |> optional "name" (oneOf [ string, null "NULL" ]) "MISSING" + |> required "email" string + +-} +optional : String -> Decoder a -> a -> Decoder (a -> b) -> Decoder b +optional key valDecoder fallback decoder = + custom (optionalDecoder (Decode.field key Decode.value) valDecoder fallback) decoder + + +{-| Decode an optional nested field. +-} +optionalAt : List String -> Decoder a -> a -> Decoder (a -> b) -> Decoder b +optionalAt path valDecoder fallback decoder = + custom (optionalDecoder (Decode.at path Decode.value) valDecoder fallback) decoder + + +optionalDecoder : Decoder Decode.Value -> Decoder a -> a -> Decoder a +optionalDecoder pathDecoder valDecoder fallback = + let + nullOr decoder = + Decode.oneOf [ decoder, Decode.null fallback ] + + handleResult input = + case Decode.decodeValue pathDecoder input of + Ok rawValue -> + -- The field was present, so now let's try to decode that value. + -- (If it was present but fails to decode, this should and will fail!) + case Decode.decodeValue (nullOr valDecoder) rawValue of + Ok finalResult -> + Decode.succeed finalResult + + Err finalErr -> + Decode.fail finalErr + + Err _ -> + -- The field was not present, so use the fallback. + Decode.succeed fallback + in + Decode.value + |> Decode.andThen handleResult + + +{-| Rather than decoding anything, use a fixed value for the next step in the +pipeline. `harcoded` does not look at the JSON at all. + + import Json.Decode exposing (int, string, Decoder) + import Decode.Pipeline exposing (decode, required) + + + type alias User = + { id : Int + , email : String + , followers : Int + } + + + userDecoder : Decoder User + userDecoder = + decode User + |> required "id" int + |> required "email" string + |> hardcoded 0 + + + result : Result String User + result = + Decode.decodeString + userDecoder + """ + {"id": 123, "email": "sam@example.com"} + """ + -- Ok { id = 123, email = "sam@example.com", followers = 0 } +-} +hardcoded : a -> Decoder (a -> b) -> Decoder b +hardcoded = + Decode.succeed >> custom + + +{-| Run the given decoder and feed its result into the pipeline at this point. + +Consider this example. + + import Json.Decode exposing (int, string, at, Decoder) + import Decode.Pipeline exposing (decode, required, custom) + + + type alias User = + { id : Int + , name : String + , email : String + } + + + userDecoder : Decoder User + userDecoder = + decode User + |> required "id" int + |> custom (at [ "profile", "name" ] string) + |> required "email" string + + + result : Result String User + result = + Decode.decodeString + userDecoder + """ + { + "id": 123, + "email": "sam@example.com", + "profile": {"name": "Sam"} + } + """ + -- Ok { id = 123, name = "Sam", email = "sam@example.com" } +-} +custom : Decoder a -> Decoder (a -> b) -> Decoder b +custom = + Decode.map2 (|>) + + +{-| Convert a `Decoder (Result x a)` into a `Decoder a`. Useful when you want +to perform some custom processing just before completing the decoding operation. + + import Json.Decode exposing (int, string, float, Decoder) + import Decode.Pipeline exposing + (decode, required, resolve) + + + type alias User = + { id : Int + , email : String + } + + + userDecoder : Decoder User + userDecoder = + let + -- toDecoder gets run *after* all the + -- (|> required ...) steps are done. + toDecoder : Int -> String -> Int -> Decoder User + toDecoder id email version = + if version > 2 then + succeed (User id email) + else + fail "This JSON is from a deprecated source. Please upgrade!" + in + decode toDecoder + |> required "id" int + |> required "email" string + |> required "version" int -- version is part of toDecoder, + |> resolve -- but it is not a part of User + + + result : Result String User + result = + Decode.decodeString + userDecoder + """ + {"id": 123, "email": "sam@example.com", "version": 1} + """ + -- Err "This JSON is from a deprecated source. Please upgrade!" +-} +resolve : Decoder (Decoder a) -> Decoder a +resolve = + Decode.andThen identity + + +{-| Begin a decoding pipeline. This is a synonym for [Json.Decode.succeed](http://package.elm-lang.org/packages/elm-lang/core/latest/Json-Decode#succeed), +intended to make things read more clearly. + + import Json.Decode exposing (int, string, float, Decoder) + import Json.Decode.Pipeline exposing (decode, required, optional) + + + type alias User = + { id : Int + , email : String + , name : String + } + + + userDecoder : Decoder User + userDecoder = + decode User + |> required "id" int + |> required "email" string + |> optional "name" string "" +-} +decode : a -> Decoder a +decode = + Decode.succeed diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/.gitignore b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/.gitignore new file mode 100644 index 0000000..aee9810 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/.gitignore @@ -0,0 +1 @@ +/elm-stuff/ diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/Main.elm b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/Main.elm new file mode 100644 index 0000000..532f8e6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/Main.elm @@ -0,0 +1,19 @@ +port module Main exposing (..) + +{-| +Run the tests with node-test-runner: + +https://github.com/rtfeldman/node-test-runner +-} + +import Tests +import Test.Runner.Node exposing (run) +import Json.Encode exposing (Value) + + +main : Program Never +main = + run emit Tests.all + + +port emit : ( String, Value ) -> Cmd msg diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/Tests.elm b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/Tests.elm new file mode 100644 index 0000000..f4bcaa1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/Tests.elm @@ -0,0 +1,114 @@ +module Tests exposing (..) + +import Test exposing (..) +import Expect exposing (Expectation) +import Json.Decode.Pipeline + exposing + ( decode + , required + , requiredAt + , optional + , optionalAt + , resolveResult + ) +import Json.Decode exposing (Decoder, string, null) + + +{-| Run some JSON through a Decoder and return the result. +-} +runWith : String -> Decoder a -> Result String a +runWith = + flip Json.Decode.decodeString + + +isError : Result err ok -> Bool +isError result = + case result of + Err _ -> + True + + Ok _ -> + False + + +expectErr : Result err ok -> Expectation +expectErr result = + isError result + |> Expect.true ("Expected an Err but got " ++ toString result) + + +all : Test +all = + describe + "Json.Decode.Pipeline" + [ test "should decode basic example" <| + \() -> + decode (,) + |> required "a" string + |> required "b" string + |> runWith """{"a":"foo","b":"bar"}""" + |> Expect.equal (Ok ( "foo", "bar" )) + , test "should decode requiredAt fields" <| + \() -> + decode (,) + |> requiredAt [ "a" ] string + |> requiredAt [ "b", "c" ] string + |> runWith """{"a":"foo","b":{"c":"bar"}}""" + |> Expect.equal (Ok ( "foo", "bar" )) + , test "should decode optionalAt fields" <| + \() -> + decode (,) + |> optionalAt [ "a", "b" ] string "--" + |> optionalAt [ "x", "y" ] string "--" + |> runWith """{"a":{},"x":{"y":"bar"}}""" + |> Expect.equal (Ok ( "--", "bar" )) + , test "optional succeeds if the field is not present" <| + \() -> + decode (,) + |> optional "a" string "--" + |> optional "x" string "--" + |> runWith """{"x":"five"}""" + |> Expect.equal (Ok ( "--", "five" )) + , test "optional succeeds with fallback if the field is present but null" <| + \() -> + decode (,) + |> optional "a" string "--" + |> optional "x" string "--" + |> runWith """{"a":null,"x":"five"}""" + |> Expect.equal (Ok ( "--", "five" )) + , test "optional succeeds with result of the given decoder if the field is null and the decoder decodes nulls" <| + \() -> + decode (,) + |> optional "a" (null "null") "--" + |> optional "x" string "--" + |> runWith """{"a":null,"x":"five"}""" + |> Expect.equal (Ok ( "null", "five" )) + , test "optional fails if the field is present but doesn't decode" <| + \() -> + decode (,) + |> optional "a" string "--" + |> optional "x" string "--" + |> runWith """{"x":5}""" + |> expectErr + , test "optionalAt fails if the field is present but doesn't decode" <| + \() -> + decode (,) + |> optionalAt [ "a", "b" ] string "--" + |> optionalAt [ "x", "y" ] string "--" + |> runWith """{"a":{},"x":{"y":5}}""" + |> expectErr + , test "resolveResult bubbles up decoded Err results" <| + \() -> + decode Err + |> required "error" string + |> resolveResult + |> runWith """{"error":"invalid"}""" + |> expectErr + , test "resolveResult bubbles up decoded Ok results" <| + \() -> + decode Ok + |> required "ok" string + |> resolveResult + |> runWith """{"ok":"valid"}""" + |> Expect.equal (Ok "valid") + ] diff --git a/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/elm-package.json b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/elm-package.json new file mode 100644 index 0000000..4513220 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/NoRedInk/elm-decode-pipeline/3.0.0/tests/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "1.0.0", + "summary": "Sample Elm Test", + "repository": "https://github.com/user/project.git", + "license": "BSD-3-Clause", + "source-directories": [ + ".", + "../src" + ], + "exposed-modules": [], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-community/elm-test": "2.0.0 <= v < 3.0.0", + "rtfeldman/node-test-runner": "1.0.0 <= v < 2.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/.gitignore new file mode 100644 index 0000000..3ce2c7d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/.gitignore @@ -0,0 +1,5 @@ +*~ +node_modules/ +elm-stuff/ +docs/ +*.html diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/.travis.yml b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/.travis.yml new file mode 100644 index 0000000..267ad1c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/.travis.yml @@ -0,0 +1,46 @@ +sudo: false + +cache: + directories: + - test/elm-stuff/build-artifacts + - sysconfcpus + +os: + - osx + - linux + +env: + matrix: + - ELM_VERSION=0.18.0-beta TARGET_NODE_VERSION=node + - ELM_VERSION=0.18.0-beta TARGET_NODE_VERSION=4.0 + +before_install: + - if [ ${TRAVIS_OS_NAME} == "osx" ]; + then brew update; brew install nvm; mkdir ~/.nvm; export NVM_DIR=~/.nvm; source $(brew --prefix nvm)/nvm.sh; + fi + - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config + - | # epic build time improvement - see https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142 + if [ ! -d sysconfcpus/bin ]; + then + git clone https://github.com/obmarg/libsysconfcpus.git; + cd libsysconfcpus; + ./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus; + make && make install; + cd ..; + fi + +install: + - nvm install $TARGET_NODE_VERSION + - nvm use $TARGET_NODE_VERSION + - node --version + - npm --version + - cd tests + - npm install -g elm@$ELM_VERSION elm-test + - mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old + - printf '%s\n\n' '#!/bin/bash' 'echo "Running elm-make with sysconfcpus -n 2"' '$TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make-old "$@"' > $(npm config get prefix)/bin/elm-make + - chmod +x $(npm config get prefix)/bin/elm-make + - npm install + - elm package install --yes + +script: + - npm test diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/LICENSE b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/LICENSE new file mode 100644 index 0000000..9a5e944 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2016 Richard Feldman and Max Goldstein +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of elm-test nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/README.md b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/README.md new file mode 100644 index 0000000..f52cdb4 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/README.md @@ -0,0 +1,107 @@ +# elm-test [![Travis build Status](https://travis-ci.org/elm-community/elm-test.svg?branch=master)](http://travis-ci.org/elm-community/elm-test) + +Write unit and fuzz tests for your Elm code, in Elm. + +## Quick Start + +Here are three example tests: + +```elm +suite : Test +suite = + describe "The String module" + [ describe "String.reverse" -- Nest as many descriptions as you like. + [ test "has no effect on a palindrome" <| + \() -> + let + palindrome = + "hannah" + in + Expect.equal palindrome (String.reverse palindrome) + + -- Expect.equal is designed to be used in pipeline style, like this. + , test "reverses a known string" <| + \() -> + "ABCDEFG" + |> String.reverse + |> Expect.equal "GFEDCBA" + + -- fuzz runs the test 100 times with randomly-generated inputs! + , fuzz string "restores the original string if you run it again" <| + \randomlyGeneratedString -> + randomlyGeneratedString + |> String.reverse + |> String.reverse + |> Expect.equal randomlyGeneratedString + ] + ] +``` + +This code uses a few common functions: + +* [`describe`](http://package.elm-lang.org/packages/elm-community/elm-test/latest/Test#test) to add a description string to a list of tests +* [`test`](http://package.elm-lang.org/packages/elm-community/elm-test/latest/Test#test) to write a unit test +* [`Expect`](http://package.elm-lang.org/packages/elm-community/elm-test/latest/Expect) to determine if a test should pass or fail +* [`fuzz`](http://package.elm-lang.org/packages/elm-community/elm-test/latest/Test#fuzz) to run a function that produces a test several times with randomly-generated inputs + +Check out [a large real-world test suite](https://github.com/rtfeldman/elm-css/tree/master/tests) for more. + +### Running tests locally + +There are several ways you can run tests locally: + +* [from your terminal](https://github.com/rtfeldman/node-test-runner) via `npm install -g elm-test` +* [from your browser](https://github.com/rtfeldman/html-test-runner) + +Here's how to set up and run your tests using the CLI test runner: + +1. Run `npm install -g elm-test` if you haven't already. +2. `cd` into the project's root directory that has your `elm-package.json`. +3. Run `elm-test init`. It will create a `tests` directory inside this one, + with some files in it. +4. Copy all the dependencies from `elm-package.json` into + `tests/elm-package.json`. These dependencies need to stay in sync, so make + sure whenever you change your dependencies in your current + `elm-package.json`, you make the same change to `tests/elm-package.json`. +5. Run `elm-test`. +6. Edit `tests/Tests.elm` to introduce new tests. + +### Running tests on CI + +Here are some examples of running tests on CI servers: + +* [`travis.yml`](https://github.com/rtfeldman/elm-css/blob/6ba8404f53269bc110c2e08ab24c9caf850da515/.travis.yml) +* [`appveyor.yml`](https://github.com/rtfeldman/elm-css/blob/6ba8404f53269bc110c2e08ab24c9caf850da515/appveyor.yml) + +## Strategies for effective testing + +* [Make impossible states unrepresentable](https://www.youtube.com/watch?v=IcgmSRJHu_8) so that you don't have to test that they can't occur. +* When doing TDD, treat compiler errors as a red test. So feel free to write the test you wish you had even if it means calling functions that don't exist yet! +* How do you know when to stop testing? This is an engineering tradeoff without a perfect answer. If you don't feel confident in the correctness of your code, write more tests. If you feel you are wasting time testing better spent writing your application, stop writing tests for now. +* Prefer fuzz tests to unit tests, when possible. But don't be afraid to supplement them with unit tests for tricky cases and regressions. +* For simple functions, it's okay to copy the implementation to the test; this is a useful regression check. But if the implementation isn't obviously right, try to write tests that don't duplicate the suspect logic. The great thing about fuzz tests is that you don't have to arrive at the exact same value as the code under test, just state something that will be true of that value. +* If you're writing a library that wraps an existing standard or protocol, use examples from the specification or docs as unit tests. Anything in your README should be backed by a unit test (sadly there's no easy way to keep them in sync). +* Not even your test modules can import unexposed functions, so test them only as the exposed interface uses them. Don't expose a function just to test it. Every exposed function should have tests. (If you practice TDD, this happens automatically!) +* `elm-test` is designed to test functions, not effects. To test them, use [elm-testable](http://package.elm-lang.org/packages/avh4/elm-testable/latest). For integration or end-to-end testing, use your favorite PhantomJS or Selenium webdriver, such as Capybara. + +## Upgrading +### From 0.17 +You will need to delete `elm-stuff` and `tests/elm-stuff`. + +If you are using the Node runner, you will need to pull down the new `Main.elm`: `curl -o tests/Main.elm https://raw.githubusercontent.com/rtfeldman/node-test-runner/master/templates/Main.elm` + +### From the old elm-test +[`legacy-elm-test`](http://package.elm-lang.org/packages/rtfeldman/legacy-elm-test/latest) provides a +drop-in replacement for the `ElmTest 1.0` API, except implemented in terms of +the current `elm-test`. It also includes support for `elm-check` tests. + +This lets you use the latest test runners right now, and upgrade incrementally. + +## Releases +| Version | Notes | +| ------- | ----- | +| [**3.1.0**](https://github.com/elm-community/elm-test/tree/3.1.0) | Add Expect.all +| [**3.0.0**](https://github.com/elm-community/elm-test/tree/3.0.0) | Update for Elm 0.18; switch the argument order of `Fuzz.andMap`. +| [**2.1.0**](https://github.com/elm-community/elm-test/tree/2.1.0) | Switch to rose trees for `Fuzz.andThen`, other API additions. +| [**2.0.0**](https://github.com/elm-community/elm-test/tree/2.0.0) | Scratch-rewrite to project-fuzzball +| [**1.0.0**](https://github.com/elm-community/elm-test/tree/1.0.0) | ElmTest initial release diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/elm-package.json new file mode 100644 index 0000000..9b1cc00 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/elm-package.json @@ -0,0 +1,22 @@ +{ + "version": "3.1.0", + "summary": "Unit and Fuzz testing support with Console/Html/String outputs.", + "repository": "https://github.com/elm-community/elm-test.git", + "license": "BSD-3-Clause", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Test", + "Test.Runner", + "Expect", + "Fuzz" + ], + "dependencies": { + "elm-community/lazy-list": "1.0.0 <= v < 2.0.0", + "elm-community/shrink": "2.0.0 <= v < 3.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "mgold/elm-random-pcg": "4.0.2 <= v < 5.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Expect.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Expect.elm new file mode 100644 index 0000000..61916f8 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Expect.elm @@ -0,0 +1,649 @@ +module Expect + exposing + ( Expectation + , pass + , fail + , getFailure + , equal + , notEqual + , atMost + , lessThan + , greaterThan + , atLeast + , true + , false + , equalLists + , equalDicts + , equalSets + , onFail + , all + ) + +{-| A library to create `Expectation`s, which describe a claim to be tested. + +## Quick Reference + +* [`equal`](#equal) `(arg2 == arg1)` +* [`notEqual`](#notEqual) `(arg2 /= arg1)` +* [`lessThan`](#lessThan) `(arg2 < arg1)` +* [`atMost`](#atMost) `(arg2 <= arg1)` +* [`greaterThan`](#greaterThan) `(arg2 > arg1)` +* [`atLeast`](#atLeast) `(arg2 >= arg1)` +* [`true`](#true) `(arg == True)` +* [`false`](#false) `(arg == False)` + +## Basic Expectations + +@docs Expectation, equal, notEqual, all + +## Comparisons + +@docs lessThan, atMost, greaterThan, atLeast + +## Booleans + +@docs true, false + +## Collections + +@docs equalLists, equalDicts, equalSets + +## Customizing + +@docs pass, fail, onFail, getFailure +-} + +import Test.Expectation +import Dict exposing (Dict) +import Set exposing (Set) +import String + + +{-| The result of a single test run: either a [`pass`](#pass) or a +[`fail`](#fail). +-} +type alias Expectation = + Test.Expectation.Expectation + + +{-| Passes if the arguments are equal. + + Expect.equal 0 (List.length []) + + -- Passes because (0 == 0) is True + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because the expected value didn't split the space in "Betty Botter" + String.split " " "Betty Botter bought some butter" + |> Expect.equal [ "Betty Botter", "bought", "some", "butter" ] + + {- + + [ "Betty", "Botter", "bought", "some", "butter" ] + ╷ + │ Expect.equal + ╵ + [ "Betty Botter", "bought", "some", "butter" ] + + -} +-} +equal : a -> a -> Expectation +equal = + compareWith "Expect.equal" (==) + + +{-| Passes if the arguments are not equal. + + -- Passes because (11 /= 100) is True + 90 + 10 + |> Expect.notEqual 11 + + + -- Fails because (100 /= 100) is False + 90 + 10 + |> Expect.notEqual 100 + + {- + + 100 + ╷ + │ Expect.notEqual + ╵ + 100 + + -} +-} +notEqual : a -> a -> Expectation +notEqual = + compareWith "Expect.notEqual" (/=) + + +{-| Passes if the second argument is less than the first. + + Expect.lessThan 1 (List.length []) + + -- Passes because (0 < 1) is True + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because (0 < -1) is False + List.length [] + |> Expect.lessThan -1 + + + {- + + 0 + ╷ + │ Expect.lessThan + ╵ + -1 + + -} +-} +lessThan : comparable -> comparable -> Expectation +lessThan = + compareWith "Expect.lessThan" (<) + + +{-| Passes if the second argument is less than or equal to the first. + + Expect.atMost 1 (List.length []) + + -- Passes because (0 <= 1) is True + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because (0 <= -3) is False + List.length [] + |> Expect.atMost -3 + + {- + + 0 + ╷ + │ Expect.atMost + ╵ + -3 + + -} +-} +atMost : comparable -> comparable -> Expectation +atMost = + compareWith "Expect.atMost" (<=) + + +{-| Passes if the second argument is greater than the first. + + Expect.greaterThan -2 List.length [] + + -- Passes because (0 > -2) is True + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because (0 > 1) is False + List.length [] + |> Expect.greaterThan 1 + + {- + + 0 + ╷ + │ Expect.greaterThan + ╵ + 1 + + -} +-} +greaterThan : comparable -> comparable -> Expectation +greaterThan = + compareWith "Expect.greaterThan" (>) + + +{-| Passes if the second argument is greater than or equal to the first. + + Expect.atLeast -2 (List.length []) + + -- Passes because (0 >= -2) is True + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because (0 >= 3) is False + List.length [] + |> Expect.atLeast 3 + + {- + + 0 + ╷ + │ Expect.atLeast + ╵ + 3 + + -} +-} +atLeast : comparable -> comparable -> Expectation +atLeast = + compareWith "Expect.atLeast" (>=) + + +{-| Passes if the argument is 'True', and otherwise fails with the given message. + + Expect.true "Expected the list to be empty." (List.isEmpty []) + + -- Passes because (List.isEmpty []) is True + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because List.isEmpty returns False, but we expect True. + List.isEmpty [ 42 ] + |> Expect.true "Expected the list to be empty." + + {- + + Expected the list to be empty. + + -} +-} +true : String -> Bool -> Expectation +true message bool = + if bool then + pass + else + fail message + + +{-| Passes if the argument is 'False', and otherwise fails with the given message. + + Expect.false "Expected the list not to be empty." (List.isEmpty [ 42 ]) + + -- Passes because (List.isEmpty [ 42 ]) is False + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because (List.isEmpty []) is True + List.isEmpty [] + |> Expect.false "Expected the list not to be empty." + + {- + + Expected the list not to be empty. + + -} +-} +false : String -> Bool -> Expectation +false message bool = + if bool then + fail message + else + pass + + +{-| Passes if the arguments are equal lists. + + -- Passes + [1, 2, 3] + |> Expect.equalLists [1, 2, 3] + +Failures resemble code written in pipeline style, so you can tell +which argument is which, and reports which index the lists first +differed at or which list was longer: + + -- Fails + [ 1, 2, 4, 6 ] + |> Expect.equalLists [ 1, 2, 5 ] + + {- + + [1,2,4,6] + first diff at index index 2: +`4`, -`5` + ╷ + │ Expect.equalLists + ╵ + first diff at index index 2: +`5`, -`4` + [1,2,5] + + -} +-} +equalLists : List a -> List a -> Expectation +equalLists expected actual = + if expected == actual then + pass + else + let + result = + List.map2 (,) actual expected + |> List.indexedMap (,) + |> List.filterMap + (\( index, ( a, e ) ) -> + if e == a then + Nothing + else + Just ( index, a, e ) + ) + |> List.head + |> Maybe.map + (\( index, a, e ) -> + [ toString actual + , "first diff at index index " ++ toString index ++ ": +`" ++ toString a ++ "`, -`" ++ toString e ++ "`" + , "╷" + , "│ Expect.equalLists" + , "╵" + , "first diff at index index " ++ toString index ++ ": +`" ++ toString e ++ "`, -`" ++ toString a ++ "`" + , toString expected + ] + |> String.join "\n" + |> fail + ) + in + case result of + Just failure -> + failure + + Nothing -> + case compare (List.length actual) (List.length expected) of + GT -> + reportFailure "Expect.equalLists was longer than" (toString expected) (toString actual) + |> fail + + LT -> + reportFailure "Expect.equalLists was shorter than" (toString expected) (toString actual) + |> fail + + _ -> + pass + + +{-| Passes if the arguments are equal dicts. + + -- Passes + (Dict.fromList [ ( 1, "one" ), ( 2, "two" ) ]) + |> Expect.equalDicts (Dict.fromList [ ( 1, "one" ), ( 2, "two" ) ]) + +Failures resemble code written in pipeline style, so you can tell +which argument is which, and reports which keys were missing from +or added to each dict: + + -- Fails + (Dict.fromList [ ( 1, "one" ), ( 2, "too" ) ]) + |> Expect.equalDicts (Dict.fromList [ ( 1, "one" ), ( 2, "two" ), ( 3, "three" ) ]) + + {- + + Dict.fromList [(1,"one"),(2,"too")] + diff: -[ (2,"two"), (3,"three") ] +[ (2,"too") ] + ╷ + │ Expect.equalDicts + ╵ + diff: +[ (2,"two"), (3,"three") ] -[ (2,"too") ] + Dict.fromList [(1,"one"),(2,"two"),(3,"three")] + + -} +-} +equalDicts : Dict comparable a -> Dict comparable a -> Expectation +equalDicts expected actual = + if Dict.toList expected == Dict.toList actual then + pass + else + let + differ dict k v diffs = + if Dict.get k dict == Just v then + diffs + else + ( k, v ) :: diffs + + missingKeys = + Dict.foldr (differ actual) [] expected + + extraKeys = + Dict.foldr (differ expected) [] actual + in + fail (reportCollectionFailure "Expect.equalDicts" expected actual missingKeys extraKeys) + + +{-| Passes if the arguments are equal sets. + + -- Passes + (Set.fromList [1, 2]) + |> Expect.equalSets (Set.fromList [1, 2]) + +Failures resemble code written in pipeline style, so you can tell +which argument is which, and reports which keys were missing from +or added to each set: + + -- Fails + (Set.fromList [ 1, 2, 4, 6 ]) + |> Expect.equalSets (Set.fromList [ 1, 2, 5 ]) + + {- + + Set.fromList [1,2,4,6] + diff: -[ 5 ] +[ 4, 6 ] + ╷ + │ Expect.equalSets + ╵ + diff: +[ 5 ] -[ 4, 6 ] + Set.fromList [1,2,5] + + -} +-} +equalSets : Set comparable -> Set comparable -> Expectation +equalSets expected actual = + if Set.toList expected == Set.toList actual then + pass + else + let + missingKeys = + Set.diff expected actual + |> Set.toList + + extraKeys = + Set.diff actual expected + |> Set.toList + in + fail (reportCollectionFailure "Expect.equalSets" expected actual missingKeys extraKeys) + + +{-| Always passes. + + import Json.Decode exposing (decodeString, int) + import Test exposing (test) + import Expect + + + test "Json.Decode.int can decode the number 42." <| + \() -> + case decodeString int "42" of + Ok _ -> + Expect.pass + + Err err -> + Expect.fail err +-} +pass : Expectation +pass = + Test.Expectation.Pass + + +{-| Fails with the given message. + + import Json.Decode exposing (decodeString, int) + import Test exposing (test) + import Expect + + + test "Json.Decode.int can decode the number 42." <| + \() -> + case decodeString int "42" of + Ok _ -> + Expect.pass + + Err err -> + Expect.fail err +-} +fail : String -> Expectation +fail = + Test.Expectation.Fail "" + + +{-| Return `Nothing` if the given [`Expectation`](#Expectation) is a [`pass`](#pass). + +If it is a [`fail`](#fail), return a record containing the failure message, +along with the given inputs if it was a fuzz test. (If no inputs were involved, +the record's `given` field will be `""`). + +For example, if a fuzz test generates random integers, this might return +`{ message = "it was supposed to be positive", given = "-1" }` + + getFailure (Expect.fail "this failed") + -- Just { message = "this failed", given = "" } + + getFailure (Expect.pass) + -- Nothing +-} +getFailure : Expectation -> Maybe { given : String, message : String } +getFailure expectation = + case expectation of + Test.Expectation.Pass -> + Nothing + + Test.Expectation.Fail given message -> + Just { given = given, message = message } + + +{-| If the given expectation fails, replace its failure message with a custom one. + + "something" + |> Expect.equal "something else" + |> Expect.onFail "thought those two strings would be the same" +-} +onFail : String -> Expectation -> Expectation +onFail str expectation = + case expectation of + Test.Expectation.Pass -> + expectation + + Test.Expectation.Fail given _ -> + Test.Expectation.Fail given str + + +reportFailure : String -> String -> String -> String +reportFailure comparison expected actual = + [ actual + , "╷" + , "│ " ++ comparison + , "╵" + , expected + ] + |> String.join "\n" + + +reportCollectionFailure : String -> a -> b -> List c -> List d -> String +reportCollectionFailure comparison expected actual missingKeys extraKeys = + [ toString actual + , "diff:" ++ formatDiffs Missing missingKeys ++ formatDiffs Extra extraKeys + , "╷" + , "│ " ++ comparison + , "╵" + , "diff:" ++ formatDiffs Extra missingKeys ++ formatDiffs Missing extraKeys + , toString expected + ] + |> String.join "\n" + + +type Diff + = Extra + | Missing + + +formatDiffs : Diff -> List a -> String +formatDiffs diffType diffs = + if List.isEmpty diffs then + "" + else + let + modifier = + case diffType of + Extra -> + "+" + + Missing -> + "-" + in + diffs + |> List.map toString + |> String.join ", " + |> (\d -> " " ++ modifier ++ "[ " ++ d ++ " ]") + + +compareWith : String -> (a -> b -> Bool) -> b -> a -> Expectation +compareWith label compare expected actual = + if compare actual expected then + pass + else + fail (reportFailure label (toString expected) (toString actual)) + + +{-| Passes if each of the given functions passes when applied to the subject. + +**NOTE:** Passing an empty list is assumed to be a mistake, so `Expect.all []` +will always return a failed expectation no matter what else it is passed. + + Expect.all + [ Expect.greaterThan -2 + , Expect.lessThan 5 + ] + (List.length []) + + -- Passes because (0 > -2) is True and (0 < 5) is also True + +Failures resemble code written in pipeline style, so you can tell +which argument is which: + + -- Fails because (0 > -10) is False + List.length [] + |> Expect.all + [ Expect.greaterThan -2 + , Expect.lessThan -10 + , Expect.equal 0 + ] + + {- + + 0 + ╷ + │ Expect.lessThan + ╵ + -10 + + -} +-} +all : List (subject -> Expectation) -> subject -> Expectation +all list query = + if List.isEmpty list then + fail "Expect.all received an empty list. I assume this was due to a mistake somewhere, so I'm failing this test!" + else + allHelp list query + + +allHelp : List (subject -> Expectation) -> subject -> Expectation +allHelp list query = + case list of + [] -> + pass + + check :: rest -> + case check query of + Test.Expectation.Pass -> + allHelp rest query + + outcome -> + outcome diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Fuzz.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Fuzz.elm new file mode 100644 index 0000000..d271f90 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Fuzz.elm @@ -0,0 +1,802 @@ +module Fuzz exposing (Fuzzer, custom, constant, unit, bool, order, char, float, floatRange, int, tuple, tuple3, tuple4, tuple5, result, string, percentage, map, map2, map3, map4, map5, andMap, andThen, maybe, intRange, list, array, frequency, frequencyOrCrash) + +{-| This is a library of *fuzzers* you can use to supply values to your fuzz +tests. You can typically pick out which ones you need according to their types. + +A `Fuzzer a` knows how to create values of type `a` in two different ways. It +can create them randomly, so that your test's expectations are run against many +values. Fuzzers will often generate edge cases likely to find bugs. If the +fuzzer can make your test fail, it also knows how to "shrink" that failing input +into more minimal examples, some of which might also cause the tests to fail. In +this way, fuzzers can usually find the smallest or simplest input that +reproduces a bug. + +## Common Fuzzers +@docs bool, int, intRange, float, floatRange, percentage, string, maybe, result, list, array + +## Working with Fuzzers +@docs Fuzzer, constant, map, map2, map3,map4, map5, andMap, andThen, frequency, frequencyOrCrash + +## Tuple Fuzzers +Instead of using a tuple, consider using `fuzzN`. +@docs tuple, tuple3, tuple4, tuple5 + +## Uncommon Fuzzers +@docs custom, char, unit, order + +-} + +import Array exposing (Array) +import Char +import Util exposing (..) +import Lazy.List exposing (LazyList) +import Shrink exposing (Shrinker) +import RoseTree exposing (RoseTree(..)) +import Random.Pcg as Random exposing (Generator) +import Fuzz.Internal as Internal exposing (Fuzz(..)) + + +{-| The representation of fuzzers is opaque. Conceptually, a `Fuzzer a` +consists of a way to randomly generate values of type `a`, and a way to shrink +those values. +-} +type alias Fuzzer a = + Internal.Fuzzer a + + +{-| Build a custom `Fuzzer a` by providing a `Generator a` and a `Shrinker a`. +Generators are defined in [`mgold/elm-random-pcg`](http://package.elm-lang.org/packages/mgold/elm-random-pcg/latest), +which is not core's Random module but has a compatible interface. Shrinkers are +defined in [`elm-community/shrink`](http://package.elm-lang.org/packages/elm-community/shrink/latest/). + +Here is an example for a record: + + import Random.Pcg as Random + import Shrink + + type alias Position = + { x : Int, y : Int } + + position : Fuzzer Position + position = + Fuzz.custom + (Random.map2 Position (Random.int -100 100) (Random.int -100 100)) + (\{ x, y } -> Shrink.map Position (Shrink.int x) |> Shrink.andMap (Shrink.int y)) + +Here is an example for a custom union type, assuming there is already a `genName : Generator String` defined: + + type Question + = Name String + | Age Int + + question = + let + generator = + Random.bool |> Random.andThen (\b -> + if b then + Random.map Name genName + else + Random.map Age (Random.int 0 120) + ) + + shrinker question = + case question of + Name n -> + Shrink.string n |> Shrink.map Name + Age i -> + Shrink.int i |> Shrink.map Age + in + Fuzz.custom generator shrinker + +It is not possible to extract the generator and shrinker from an existing fuzzer. +-} +custom : Generator a -> Shrinker a -> Fuzzer a +custom generator shrinker = + let + shrinkTree a = + Rose a (Lazy.List.map shrinkTree (shrinker a)) + in + Internal.Fuzzer + (\noShrink -> + if noShrink then + Gen generator + else + Shrink <| Random.map shrinkTree generator + ) + + +{-| A fuzzer for the unit value. Unit is a type with only one value, commonly +used as a placeholder. +-} +unit : Fuzzer () +unit = + Internal.Fuzzer + (\noShrink -> + if noShrink then + Gen <| Random.constant () + else + Shrink <| Random.constant (RoseTree.singleton ()) + ) + + +{-| A fuzzer for bool values. +-} +bool : Fuzzer Bool +bool = + custom Random.bool Shrink.bool + + +{-| A fuzzer for order values. +-} +order : Fuzzer Order +order = + let + intToOrder i = + if i == 0 then + LT + else if i == 1 then + EQ + else + GT + in + custom (Random.map intToOrder (Random.int 0 2)) Shrink.order + + +{-| A fuzzer for int values. It will never produce `NaN`, `Infinity`, or `-Infinity`. + +It's possible for this fuzzer to generate any 32-bit integer, but it favors +numbers between -50 and 50 and especially zero. +-} +int : Fuzzer Int +int = + let + generator = + Random.frequency + [ ( 3, Random.int -50 50 ) + , ( 0.2, Random.constant 0 ) + , ( 1, Random.int 0 (Random.maxInt - Random.minInt) ) + , ( 1, Random.int (Random.minInt - Random.maxInt) 0 ) + ] + in + custom generator Shrink.int + + +{-| A fuzzer for int values within between a given minimum and maximum value, +inclusive. Shrunken values will also be within the range. + +Remember that [Random.maxInt](http://package.elm-lang.org/packages/elm-lang/core/latest/Random#maxInt) +is the maximum possible int value, so you can do `intRange x Random.maxInt` to get all +the ints x or bigger. +-} +intRange : Int -> Int -> Fuzzer Int +intRange lo hi = + custom + (Random.frequency + [ ( 8, Random.int lo hi ) + , ( 1, Random.constant lo ) + , ( 1, Random.constant hi ) + ] + ) + (Shrink.keepIf (\i -> i >= lo && i <= hi) Shrink.int) + + +{-| A fuzzer for float values. It will never produce `NaN`, `Infinity`, or `-Infinity`. + + +It's possible for this fuzzer to generate any other floating-point value, but it +favors numbers between -50 and 50, numbers between -1 and 1, and especially zero. +-} +float : Fuzzer Float +float = + let + generator = + Random.frequency + [ ( 3, Random.float -50 50 ) + , ( 0.5, Random.constant 0 ) + , ( 1, Random.float -1 1 ) + , ( 1, Random.float 0 (toFloat <| Random.maxInt - Random.minInt) ) + , ( 1, Random.float (toFloat <| Random.minInt - Random.maxInt) 0 ) + ] + in + custom generator Shrink.float + + +{-| A fuzzer for float values within between a given minimum and maximum +value, inclusive. Shrunken values will also be within the range. +-} +floatRange : Float -> Float -> Fuzzer Float +floatRange lo hi = + custom + (Random.frequency + [ ( 8, Random.float lo hi ) + , ( 1, Random.constant lo ) + , ( 1, Random.constant hi ) + ] + ) + (Shrink.keepIf (\i -> i >= lo && i <= hi) Shrink.float) + + +{-| A fuzzer for percentage values. Generates random floats between `0.0` and +`1.0`. It will test zero and one about 10% of the time each. +-} +percentage : Fuzzer Float +percentage = + let + generator = + Random.frequency + [ ( 8, Random.float 0 1 ) + , ( 1, Random.constant 0 ) + , ( 1, Random.constant 1 ) + ] + in + custom generator Shrink.float + + +{-| A fuzzer for char values. Generates random ascii chars disregarding the control +characters. +-} +char : Fuzzer Char +char = + custom charGenerator Shrink.character + + +charGenerator : Generator Char +charGenerator = + (Random.map Char.fromCode (Random.int 32 126)) + + +{-| Generates random printable ASCII strings of up to 1000 characters. + +Shorter strings are more common, especially the empty string. +-} +string : Fuzzer String +string = + let + generator : Generator String + generator = + Random.frequency + [ ( 3, Random.int 1 10 ) + , ( 0.2, Random.constant 0 ) + , ( 1, Random.int 11 50 ) + , ( 1, Random.int 50 1000 ) + ] + |> Random.andThen (lengthString charGenerator) + in + custom generator Shrink.string + + +{-| Given a fuzzer of a type, create a fuzzer of a maybe for that type. +-} +maybe : Fuzzer a -> Fuzzer (Maybe a) +maybe (Internal.Fuzzer baseFuzzer) = + Internal.Fuzzer <| + \noShrink -> + case baseFuzzer noShrink of + Gen gen -> + Gen <| + Random.map2 + (\useNothing val -> + if useNothing then + Nothing + else + Just val + ) + (Random.oneIn 4) + gen + + Shrink genTree -> + Shrink <| + Random.map2 + (\useNothing tree -> + if useNothing then + RoseTree.singleton Nothing + else + RoseTree.map Just tree |> RoseTree.addChild (RoseTree.singleton Nothing) + ) + (Random.oneIn 4) + genTree + + +{-| Given fuzzers for an error type and a success type, create a fuzzer for +a result. +-} +result : Fuzzer error -> Fuzzer value -> Fuzzer (Result error value) +result (Internal.Fuzzer baseFuzzerError) (Internal.Fuzzer baseFuzzerValue) = + Internal.Fuzzer <| + \noShrink -> + case ( baseFuzzerError noShrink, baseFuzzerValue noShrink ) of + ( Gen genErr, Gen genVal ) -> + Gen <| + Random.map3 + (\useError err val -> + if useError then + Err err + else + Ok val + ) + (Random.oneIn 4) + genErr + genVal + + ( Shrink genTreeErr, Shrink genTreeVal ) -> + Shrink <| + Random.map3 + (\useError errorTree valueTree -> + if useError then + RoseTree.map Err errorTree + else + RoseTree.map Ok valueTree + ) + (Random.oneIn 4) + genTreeErr + genTreeVal + + err -> + Debug.crash "This shouldn't happen: Fuzz.result" err + + +{-| Given a fuzzer of a type, create a fuzzer of a list of that type. +Generates random lists of varying length, favoring shorter lists. +-} +list : Fuzzer a -> Fuzzer (List a) +list (Internal.Fuzzer baseFuzzer) = + let + genLength = + Random.frequency + [ ( 1, Random.constant 0 ) + , ( 1, Random.constant 1 ) + , ( 3, Random.int 2 10 ) + , ( 2, Random.int 10 100 ) + , ( 0.5, Random.int 100 400 ) + ] + in + Internal.Fuzzer + (\noShrink -> + case baseFuzzer noShrink of + Gen genVal -> + genLength + |> Random.andThen (\i -> (Random.list i genVal)) + |> Gen + + Shrink genTree -> + genLength + |> Random.andThen (\i -> (Random.list i genTree)) + |> Random.map listShrinkHelp + |> Shrink + ) + + +listShrinkHelp : List (RoseTree a) -> RoseTree (List a) +listShrinkHelp listOfTrees = + {- Shrinking a list of RoseTrees + We need to do two things. First, shrink individual values. Second, shorten the list. + To shrink individual values, we create every list copy of the input list where any + one value is replaced by a shrunken form. + To shorten the length of the list, slide windows of various lengths over it. + In all cases, recurse! The goal is to make a little forward progress and then recurse. + -} + let + n = + List.length listOfTrees + + root = + List.map RoseTree.root listOfTrees + + shrinkOne prefix list = + case list of + [] -> + Lazy.List.empty + + (Rose x shrunkenXs) :: more -> + Lazy.List.map (\childTree -> prefix ++ (childTree :: more) |> listShrinkHelp) shrunkenXs + + shrunkenVals = + Lazy.List.numbers + |> Lazy.List.map (\i -> i - 1) + |> Lazy.List.take n + |> Lazy.List.andThen + (\i -> shrinkOne (List.take i listOfTrees) (List.drop i listOfTrees)) + + shortened = + (if n > 6 then + Lazy.List.iterate (\n -> n // 2) n + |> Lazy.List.takeWhile (\x -> x > 0) + else + Lazy.List.fromList (List.range 1 n) + ) + |> Lazy.List.andThen (\len -> shorter len listOfTrees False) + |> Lazy.List.map listShrinkHelp + + shorter windowSize aList recursing = + -- Tricky: take the whole list if we've recursed down here, but don't let a list shrink to itself + if windowSize > List.length aList || (windowSize == List.length aList && not recursing) then + Lazy.List.empty + else + case aList of + [] -> + Lazy.List.empty + + head :: tail -> + Lazy.List.cons (List.take windowSize aList) (shorter windowSize tail True) + in + Lazy.List.append shortened shrunkenVals + |> Lazy.List.cons (RoseTree.singleton []) + |> Rose root + + +{-| Given a fuzzer of a type, create a fuzzer of an array of that type. +Generates random arrays of varying length, favoring shorter arrays. +-} +array : Fuzzer a -> Fuzzer (Array a) +array fuzzer = + map Array.fromList (list fuzzer) + + +{-| Turn a tuple of fuzzers into a fuzzer of tuples. +-} +tuple : ( Fuzzer a, Fuzzer b ) -> Fuzzer ( a, b ) +tuple ( Internal.Fuzzer baseFuzzerA, Internal.Fuzzer baseFuzzerB ) = + Internal.Fuzzer + (\noShrink -> + case ( baseFuzzerA noShrink, baseFuzzerB noShrink ) of + ( Gen genA, Gen genB ) -> + Gen <| Random.map2 (,) genA genB + + ( Shrink genTreeA, Shrink genTreeB ) -> + Shrink <| Random.map2 tupleShrinkHelp genTreeA genTreeB + + err -> + Debug.crash "This shouldn't happen: Fuzz.tuple" err + ) + + +tupleShrinkHelp : RoseTree a -> RoseTree b -> RoseTree ( a, b ) +tupleShrinkHelp ((Rose root1 children1) as rose1) ((Rose root2 children2) as rose2) = + {- Shrinking a tuple of RoseTrees + Recurse on all tuples created by substituting one element for any of its shrunken values. + + A weakness of this algorithm is that it expects that values can be shrunken independently. + That is, to shrink from (a,b) to (a',b'), we must go through (a',b) or (a,b'). + "No pairs sum to zero" is a pathological predicate that cannot be shrunken this way. + -} + let + root = + ( root1, root2 ) + + shrink1 = + Lazy.List.map (\subtree -> tupleShrinkHelp subtree rose2) children1 + + shrink2 = + Lazy.List.map (\subtree -> tupleShrinkHelp rose1 subtree) children2 + in + shrink2 + |> Lazy.List.append shrink1 + |> Rose root + + +{-| Turn a 3-tuple of fuzzers into a fuzzer of 3-tuples. +-} +tuple3 : ( Fuzzer a, Fuzzer b, Fuzzer c ) -> Fuzzer ( a, b, c ) +tuple3 ( Internal.Fuzzer baseFuzzerA, Internal.Fuzzer baseFuzzerB, Internal.Fuzzer baseFuzzerC ) = + Internal.Fuzzer + (\noShrink -> + case ( baseFuzzerA noShrink, baseFuzzerB noShrink, baseFuzzerC noShrink ) of + ( Gen genA, Gen genB, Gen genC ) -> + Gen <| Random.map3 (,,) genA genB genC + + ( Shrink genTreeA, Shrink genTreeB, Shrink genTreeC ) -> + Shrink <| Random.map3 tupleShrinkHelp3 genTreeA genTreeB genTreeC + + err -> + Debug.crash "This shouldn't happen: Fuzz.tuple3" err + ) + + +tupleShrinkHelp3 : RoseTree a -> RoseTree b -> RoseTree c -> RoseTree ( a, b, c ) +tupleShrinkHelp3 ((Rose root1 children1) as rose1) ((Rose root2 children2) as rose2) ((Rose root3 children3) as rose3) = + let + root = + ( root1, root2, root3 ) + + shrink1 = + Lazy.List.map (\subtree -> tupleShrinkHelp3 subtree rose2 rose3) children1 + + shrink2 = + Lazy.List.map (\subtree -> tupleShrinkHelp3 rose1 subtree rose3) children2 + + shrink3 = + Lazy.List.map (\subtree -> tupleShrinkHelp3 rose1 rose2 subtree) children3 + in + shrink3 + |> Lazy.List.append shrink2 + |> Lazy.List.append shrink1 + |> Rose root + + +{-| Turn a 4-tuple of fuzzers into a fuzzer of 4-tuples. +-} +tuple4 : ( Fuzzer a, Fuzzer b, Fuzzer c, Fuzzer d ) -> Fuzzer ( a, b, c, d ) +tuple4 ( Internal.Fuzzer baseFuzzerA, Internal.Fuzzer baseFuzzerB, Internal.Fuzzer baseFuzzerC, Internal.Fuzzer baseFuzzerD ) = + Internal.Fuzzer + (\noShrink -> + case ( baseFuzzerA noShrink, baseFuzzerB noShrink, baseFuzzerC noShrink, baseFuzzerD noShrink ) of + ( Gen genA, Gen genB, Gen genC, Gen genD ) -> + Gen <| Random.map4 (,,,) genA genB genC genD + + ( Shrink genTreeA, Shrink genTreeB, Shrink genTreeC, Shrink genTreeD ) -> + Shrink <| Random.map4 tupleShrinkHelp4 genTreeA genTreeB genTreeC genTreeD + + err -> + Debug.crash "This shouldn't happen: Fuzz.tuple4" err + ) + + +tupleShrinkHelp4 : RoseTree a -> RoseTree b -> RoseTree c -> RoseTree d -> RoseTree ( a, b, c, d ) +tupleShrinkHelp4 rose1 rose2 rose3 rose4 = + let + root = + ( RoseTree.root rose1, RoseTree.root rose2, RoseTree.root rose3, RoseTree.root rose4 ) + + shrink1 = + Lazy.List.map (\subtree -> tupleShrinkHelp4 subtree rose2 rose3 rose4) (RoseTree.children rose1) + + shrink2 = + Lazy.List.map (\subtree -> tupleShrinkHelp4 rose1 subtree rose3 rose4) (RoseTree.children rose2) + + shrink3 = + Lazy.List.map (\subtree -> tupleShrinkHelp4 rose1 rose2 subtree rose4) (RoseTree.children rose3) + + shrink4 = + Lazy.List.map (\subtree -> tupleShrinkHelp4 rose1 rose2 rose3 subtree) (RoseTree.children rose4) + in + shrink4 + |> Lazy.List.append shrink3 + |> Lazy.List.append shrink2 + |> Lazy.List.append shrink1 + |> Rose root + + +{-| Turn a 5-tuple of fuzzers into a fuzzer of 5-tuples. +-} +tuple5 : ( Fuzzer a, Fuzzer b, Fuzzer c, Fuzzer d, Fuzzer e ) -> Fuzzer ( a, b, c, d, e ) +tuple5 ( Internal.Fuzzer baseFuzzerA, Internal.Fuzzer baseFuzzerB, Internal.Fuzzer baseFuzzerC, Internal.Fuzzer baseFuzzerD, Internal.Fuzzer baseFuzzerE ) = + Internal.Fuzzer + (\noShrink -> + case ( baseFuzzerA noShrink, baseFuzzerB noShrink, baseFuzzerC noShrink, baseFuzzerD noShrink, baseFuzzerE noShrink ) of + ( Gen genA, Gen genB, Gen genC, Gen genD, Gen genE ) -> + Gen <| Random.map5 (,,,,) genA genB genC genD genE + + ( Shrink genTreeA, Shrink genTreeB, Shrink genTreeC, Shrink genTreeD, Shrink genTreeE ) -> + Shrink <| Random.map5 tupleShrinkHelp5 genTreeA genTreeB genTreeC genTreeD genTreeE + + err -> + Debug.crash "This shouldn't happen: Fuzz.tuple5" err + ) + + +tupleShrinkHelp5 : RoseTree a -> RoseTree b -> RoseTree c -> RoseTree d -> RoseTree e -> RoseTree ( a, b, c, d, e ) +tupleShrinkHelp5 rose1 rose2 rose3 rose4 rose5 = + let + root = + ( RoseTree.root rose1, RoseTree.root rose2, RoseTree.root rose3, RoseTree.root rose4, RoseTree.root rose5 ) + + shrink1 = + Lazy.List.map (\subtree -> tupleShrinkHelp5 subtree rose2 rose3 rose4 rose5) (RoseTree.children rose1) + + shrink2 = + Lazy.List.map (\subtree -> tupleShrinkHelp5 rose1 subtree rose3 rose4 rose5) (RoseTree.children rose2) + + shrink3 = + Lazy.List.map (\subtree -> tupleShrinkHelp5 rose1 rose2 subtree rose4 rose5) (RoseTree.children rose3) + + shrink4 = + Lazy.List.map (\subtree -> tupleShrinkHelp5 rose1 rose2 rose3 subtree rose5) (RoseTree.children rose4) + + shrink5 = + Lazy.List.map (\subtree -> tupleShrinkHelp5 rose1 rose2 rose3 rose4 subtree) (RoseTree.children rose5) + in + shrink5 + |> Lazy.List.append shrink4 + |> Lazy.List.append shrink3 + |> Lazy.List.append shrink2 + |> Lazy.List.append shrink1 + |> Rose root + + +{-| Create a fuzzer that only and always returns the value provided, and performs no shrinking. This is hardly random, +and so this function is best used as a helper when creating more complicated fuzzers. +-} +constant : a -> Fuzzer a +constant x = + Internal.Fuzzer + (\noShrink -> + if noShrink then + Gen (Random.constant x) + else + Shrink (Random.constant (RoseTree.singleton x)) + ) + + +{-| Map a function over a fuzzer. This applies to both the generated and the shruken values. +-} +map : (a -> b) -> Fuzzer a -> Fuzzer b +map transform (Internal.Fuzzer baseFuzzer) = + Internal.Fuzzer + (\noShrink -> + case baseFuzzer noShrink of + Gen genVal -> + Gen <| Random.map transform genVal + + Shrink genTree -> + Shrink <| Random.map (RoseTree.map transform) genTree + ) + + +{-| Map over two fuzzers. +-} +map2 : (a -> b -> c) -> Fuzzer a -> Fuzzer b -> Fuzzer c +map2 transform fuzzA fuzzB = + map (\( a, b ) -> transform a b) (tuple ( fuzzA, fuzzB )) + + +{-| Map over three fuzzers. +-} +map3 : (a -> b -> c -> d) -> Fuzzer a -> Fuzzer b -> Fuzzer c -> Fuzzer d +map3 transform fuzzA fuzzB fuzzC = + map (\( a, b, c ) -> transform a b c) (tuple3 ( fuzzA, fuzzB, fuzzC )) + + +{-| Map over four fuzzers. +-} +map4 : (a -> b -> c -> d -> e) -> Fuzzer a -> Fuzzer b -> Fuzzer c -> Fuzzer d -> Fuzzer e +map4 transform fuzzA fuzzB fuzzC fuzzD = + map (\( a, b, c, d ) -> transform a b c d) (tuple4 ( fuzzA, fuzzB, fuzzC, fuzzD )) + + +{-| Map over five fuzzers. +-} +map5 : (a -> b -> c -> d -> e -> f) -> Fuzzer a -> Fuzzer b -> Fuzzer c -> Fuzzer d -> Fuzzer e -> Fuzzer f +map5 transform fuzzA fuzzB fuzzC fuzzD fuzzE = + map (\( a, b, c, d, e ) -> transform a b c d e) (tuple5 ( fuzzA, fuzzB, fuzzC, fuzzD, fuzzE )) + + +{-| Map over many fuzzers. This can act as mapN for N > 5. + +The argument order is meant to accomodate chaining: + + map f aFuzzer + |> andMap anotherFuzzer + |> andMap aThirdFuzzer + +Note that shrinking may be better using mapN. +-} +andMap : Fuzzer a -> Fuzzer (a -> b) -> Fuzzer b +andMap = + map2 (|>) + + +{-| Create a fuzzer based on the result of another fuzzer. +-} +andThen : (a -> Fuzzer b) -> Fuzzer a -> Fuzzer b +andThen transform (Internal.Fuzzer baseFuzzer) = + Internal.Fuzzer + (\noShrink -> + case baseFuzzer noShrink of + Gen genVal -> + Gen <| Random.andThen (transform >> Internal.unpackGenVal) genVal + + Shrink genTree -> + Shrink <| andThenRoseTrees transform genTree + ) + + +andThenRoseTrees : (a -> Fuzzer b) -> Generator (RoseTree a) -> Generator (RoseTree b) +andThenRoseTrees transform genTree = + genTree + |> Random.andThen + (\(Rose root branches) -> + let + genOtherChildren : Generator (LazyList (RoseTree b)) + genOtherChildren = + branches + |> Lazy.List.map (\rt -> RoseTree.map (transform >> Internal.unpackGenTree) rt |> unwindRoseTree) + |> unwindLazyList + |> Random.map (Lazy.List.map RoseTree.flatten) + in + Random.map2 + (\(Rose trueRoot rootsChildren) otherChildren -> + Rose trueRoot (Lazy.List.append rootsChildren otherChildren) + ) + (Internal.unpackGenTree (transform root)) + genOtherChildren + ) + + +unwindRoseTree : RoseTree (Generator a) -> Generator (RoseTree a) +unwindRoseTree (Rose genRoot lazyListOfRoseTreesOfGenerators) = + case Lazy.List.headAndTail lazyListOfRoseTreesOfGenerators of + Nothing -> + Random.map RoseTree.singleton genRoot + + Just ( Rose gen children, moreList ) -> + Random.map4 (\a b c d -> Rose a (Lazy.List.cons (Rose b c) d)) + genRoot + gen + (Lazy.List.map unwindRoseTree children |> unwindLazyList) + (Lazy.List.map unwindRoseTree moreList |> unwindLazyList) + + +unwindLazyList : LazyList (Generator a) -> Generator (LazyList a) +unwindLazyList lazyListOfGenerators = + case Lazy.List.headAndTail lazyListOfGenerators of + Nothing -> + Random.constant Lazy.List.empty + + Just ( head, tail ) -> + Random.map2 Lazy.List.cons head (unwindLazyList tail) + + +{-| Create a new `Fuzzer` by providing a list of probabilistic weights to use +with other fuzzers. + +For example, to create a `Fuzzer` that has a 1/4 chance of generating an int +between -1 and -100, and a 3/4 chance of generating one between 1 and 100, +you could do this: + + Fuzz.frequency + [ ( 1, Fuzz.intRange -100 -1 ) + , ( 3, Fuzz.intRange 1 100 ) + ] + +This returns a `Result` because it can fail in a few ways: + +* If you provide an empy list of frequencies +* If any of the weights are less than 0 +* If the weights sum to 0 + +Any of these will lead to a result of `Err`, with a `String` explaining what +went wrong. +-} +frequency : List ( Float, Fuzzer a ) -> Result String (Fuzzer a) +frequency list = + if List.isEmpty list then + Err "You must provide at least one frequency pair." + else if List.any (\( weight, _ ) -> weight < 0) list then + Err "No frequency weights can be less than 0." + else if List.sum (List.map Tuple.first list) <= 0 then + Err "Frequency weights must sum to more than 0." + else + Ok <| + Internal.Fuzzer <| + \noShrink -> + if noShrink then + list + |> List.map (\( weight, fuzzer ) -> ( weight, Internal.unpackGenVal fuzzer )) + |> Random.frequency + |> Gen + else + list + |> List.map (\( weight, fuzzer ) -> ( weight, Internal.unpackGenTree fuzzer )) + |> Random.frequency + |> Shrink + + +{-| Calls `frequency` and handles `Err` results by crashing with the given +error message. + +This is useful in tests, where a crash will simply cause the test run to fail. +There is no danger to a production system there. +-} +frequencyOrCrash : List ( Float, Fuzzer a ) -> Fuzzer a +frequencyOrCrash = + frequency >> okOrCrash + + +okOrCrash : Result String a -> a +okOrCrash result = + case result of + Ok a -> + a + + Err str -> + Debug.crash str diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Fuzz/Internal.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Fuzz/Internal.elm new file mode 100644 index 0000000..a592f41 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Fuzz/Internal.elm @@ -0,0 +1,58 @@ +module Fuzz.Internal exposing (Fuzzer(Fuzzer), Fuzz(..), unpackGenVal, unpackGenTree) + +import RoseTree exposing (RoseTree) +import Random.Pcg exposing (Generator) + + +{- Fuzzers as opt-in RoseTrees + + In the beginning, a Fuzzer was a record of a random generator and a shrinker. + And it was bad, because that makes it impossible to shrink any value created by + mapping over other values. But at least it was fast, and shrinking worked well. + + On the second branch, we created RoseTrees, where every randomly-generated value + also kept a lazy list of shrunken values, which also keep shrunken forms of + themselves. This allows for advanced maps to be implemented, but it was slow. + + On the third branch, we realized that we shouldn't have to pay for shrinking in + the common case of a passing test. So Fuzzers became a function from a boolean + to either another union type. If the function is passed True, it returns a + Generator of a single value; if False, a Generator of a RoseTree of values. + (This is almost certainly dependent types leaning on Debug.crash.) The root of + the RoseTree must equal the single value. Thus the testing harness "opts-in" to + producing a rosetree, doing so only after the single-value generator has caused + a test to fail. + + These two optimizations make the Fuzzer code rather hard to understand, but + allow it to offer a full mapping API, be fast for passing tests, and provide + shrunken values for failing tests. +-} + + +type Fuzzer a + = Fuzzer (Bool -> Fuzz a) + + +type Fuzz a + = Gen (Generator a) + | Shrink (Generator (RoseTree a)) + + +unpackGenVal : Fuzzer a -> Generator a +unpackGenVal (Fuzzer g) = + case g True of + Gen genVal -> + genVal + + err -> + Debug.crash "This shouldn't happen: Fuzz.Internal.unpackGenVal" err + + +unpackGenTree : Fuzzer a -> Generator (RoseTree a) +unpackGenTree (Fuzzer g) = + case g False of + Shrink genTree -> + genTree + + err -> + Debug.crash "This shouldn't happen: Fuzz.Internal.unpackGenTree" err diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/RoseTree.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/RoseTree.elm new file mode 100644 index 0000000..2cc8553 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/RoseTree.elm @@ -0,0 +1,59 @@ +module RoseTree exposing (..) + +{-| RoseTree implementation in Elm using Lazy Lists. + +This implementation is private to elm-test and has non-essential functions removed. +If you need a complete RoseTree implementation, one can be found on elm-package. +-} + +import Lazy.List as LazyList exposing (LazyList, (:::), (+++)) + + +{-| RoseTree type. +A rosetree is a tree with a root whose children are themselves +rosetrees. +-} +type RoseTree a + = Rose a (LazyList (RoseTree a)) + + +{-| Make a singleton rosetree +-} +singleton : a -> RoseTree a +singleton a = + Rose a LazyList.empty + + +{-| Get the root of a rosetree +-} +root : RoseTree a -> a +root (Rose a _) = + a + + +{-| Get the children of a rosetree +-} +children : RoseTree a -> LazyList (RoseTree a) +children (Rose _ c) = + c + + +{-| Add a child to the rosetree. +-} +addChild : RoseTree a -> RoseTree a -> RoseTree a +addChild child (Rose a c) = + Rose a (child ::: c) + + +{-| Map a function over a rosetree +-} +map : (a -> b) -> RoseTree a -> RoseTree b +map f (Rose a c) = + Rose (f a) (LazyList.map (map f) c) + + +{-| Flatten a rosetree of rosetrees. +-} +flatten : RoseTree (RoseTree a) -> RoseTree a +flatten (Rose (Rose a c) cs) = + Rose a (c +++ LazyList.map flatten cs) diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test.elm new file mode 100644 index 0000000..486f6df --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test.elm @@ -0,0 +1,307 @@ +module Test exposing (Test, FuzzOptions, describe, test, filter, concat, fuzz, fuzz2, fuzz3, fuzz4, fuzz5, fuzzWith) + +{-| A module containing functions for creating and managing tests. + +@docs Test, test + +## Organizing Tests + +@docs describe, concat, filter + +## Fuzz Testing + +@docs fuzz, fuzz2, fuzz3, fuzz4, fuzz5, fuzzWith, FuzzOptions +-} + +import Test.Internal as Internal +import Expect exposing (Expectation) +import Fuzz exposing (Fuzzer) + + +{-| A test which has yet to be evaluated. When evaluated, it produces one +or more [`Expectation`](../Expect#Expectation)s. + +See [`test`](#test) and [`fuzz`](#fuzz) for some ways to create a `Test`. +-} +type alias Test = + Internal.Test + + +{-| Run each of the given tests. + + concat [ testDecoder, testSorting ] +-} +concat : List Test -> Test +concat = + Internal.Batch + + +{-| Remove any test unless its description satisfies the given predicate +function. Nested descriptions added with [`describe`](#describe) are not considered. + + describe "String.reverse" + [ test "has no effect on a palindrome" testGoesHere + , test "reverses a known string" anotherTest + , fuzz string "restores the original string if you run it again" oneMore + ] + |> Test.filter (String.contains "original") + + -- only runs the final test + +You can use this to focus on a specific test or two, silencing the failures of +tests you don't want to work on yet, and then remove the call to `Test.filter` +after you're done working on the tests. +-} +filter : (String -> Bool) -> Test -> Test +filter = + Internal.filter + + +{-| Apply a description to a list of tests. + + import Test exposing (describe, test, fuzz) + import Fuzz exposing (int) + import Expect + + + describe "List" + [ describe "reverse" + [ test "has no effect on an empty list" <| + \() -> + List.reverse [] + |> Expect.toEqual [] + , fuzz int "has no effect on a one-item list" <| + \num -> + List.reverse [ num ] + |> Expect.toEqual [ num ] + ] + ] +-} +describe : String -> List Test -> Test +describe desc = + Internal.Batch >> Internal.Labeled desc + + +{-| Return a [`Test`](#Test) that evaluates a single +[`Expectation`](../Expect#Expectation). + + import Test exposing (fuzz) + import Expect + + + test "the empty list has 0 length" <| + \() -> + List.length [] + |> Expect.toEqual 0 +-} +test : String -> (() -> Expectation) -> Test +test desc thunk = + Internal.Labeled desc (Internal.Test (\_ _ -> [ thunk () ])) + + +{-| Options [`fuzzWith`](#fuzzWith) accepts. Currently there is only one but this +API is designed so that it can accept more in the future. + +### `runs` + +The number of times to run each fuzz test. (Default is 100.) + + import Test exposing (fuzzWith) + import Fuzz exposing (list, int) + import Expect + + + fuzzWith { runs = 350 } (list int) "List.length should always be positive" <| + -- This anonymous function will be run 350 times, each time with a + -- randomly-generated fuzzList value. (It will always be a list of ints + -- because of (list int) above.) + \fuzzList -> + fuzzList + |> List.length + |> Expect.atLeast 0 +-} +type alias FuzzOptions = + { runs : Int } + + +{-| Run a [`fuzz`](#fuzz) test with the given [`FuzzOptions`](#FuzzOptions). + +Note that there is no `fuzzWith2`, but you can always pass more fuzz values in +using [`Fuzz.tuple`](../Fuzz#tuple), [`Fuzz.tuple3`](../Fuzz#tuple3), +for example like this: + + import Test exposing (fuzzWith) + import Fuzz exposing (tuple, list, int) + import Expect + + + fuzzWith { runs = 4200 } + (tuple ( list int, int )) + "List.reverse never influences List.member" <| + \(nums, target) -> + List.member target (List.reverse nums) + |> Expect.toEqual (List.member target nums) +-} +fuzzWith : FuzzOptions -> Fuzzer a -> String -> (a -> Expectation) -> Test +fuzzWith options fuzzer desc getTest = + if options.runs < 1 then + test desc <| + \() -> + Expect.fail ("Fuzz test run count must be at least 1, not " ++ toString options.runs) + else + fuzzWithHelp options (fuzz fuzzer desc getTest) + + +fuzzWithHelp : FuzzOptions -> Test -> Test +fuzzWithHelp options test = + case test of + Internal.Test run -> + Internal.Test (\seed _ -> run seed options.runs) + + Internal.Labeled label subTest -> + Internal.Labeled label (fuzzWithHelp options subTest) + + Internal.Batch tests -> + tests + |> List.map (fuzzWithHelp options) + |> Internal.Batch + + +{-| Take a function that produces a test, and calls it several (usually 100) times, using a randomly-generated input +from a [`Fuzzer`](http://package.elm-lang.org/packages/elm-community/elm-test/latest/Fuzz) each time. This allows you to +test that a property that should always be true is indeed true under a wide variety of conditions. The function also +takes a string describing the test. + +These are called "[fuzz tests](https://en.wikipedia.org/wiki/Fuzz_testing)" because of the randomness. +You may find them elsewhere called [property-based tests](http://blog.jessitron.com/2013/04/property-based-testing-what-is-it.html), +[generative tests](http://www.pivotaltracker.com/community/tracker-blog/generative-testing), or +[QuickCheck-style tests](https://en.wikipedia.org/wiki/QuickCheck). + + import Test exposing (fuzz) + import Fuzz exposing (list, int) + import Expect + + + fuzz (list int) "List.length should always be positive" <| + -- This anonymous function will be run 100 times, each time with a + -- randomly-generated fuzzList value. + \fuzzList -> + fuzzList + |> List.length + |> Expect.atLeast 0 +-} +fuzz : + Fuzzer a + -> String + -> (a -> Expectation) + -> Test +fuzz = + Internal.fuzzTest + + +{-| Run a [fuzz test](#fuzz) using two random inputs. + +This is a convenience function that lets you skip calling [`Fuzz.tuple`](../Fuzz#tuple). + +See [`fuzzWith`](#fuzzWith) for an example of writing this in tuple style. + + import Test exposing (fuzz2) + import Fuzz exposing (list, int) + + + fuzz2 (list int) int "List.reverse never influences List.member" <| + \nums target -> + List.member target (List.reverse nums) + |> Expect.toEqual (List.member target nums) +-} +fuzz2 : + Fuzzer a + -> Fuzzer b + -> String + -> (a -> b -> Expectation) + -> Test +fuzz2 fuzzA fuzzB desc = + let + fuzzer = + Fuzz.tuple ( fuzzA, fuzzB ) + in + uncurry >> fuzz fuzzer desc + + +{-| Run a [fuzz test](#fuzz) using three random inputs. + +This is a convenience function that lets you skip calling [`Fuzz.tuple3`](../Fuzz#tuple3). +-} +fuzz3 : + Fuzzer a + -> Fuzzer b + -> Fuzzer c + -> String + -> (a -> b -> c -> Expectation) + -> Test +fuzz3 fuzzA fuzzB fuzzC desc = + let + fuzzer = + Fuzz.tuple3 ( fuzzA, fuzzB, fuzzC ) + in + uncurry3 >> fuzz fuzzer desc + + +{-| Run a [fuzz test](#fuzz) using four random inputs. + +This is a convenience function that lets you skip calling [`Fuzz.tuple4`](../Fuzz#tuple4). +-} +fuzz4 : + Fuzzer a + -> Fuzzer b + -> Fuzzer c + -> Fuzzer d + -> String + -> (a -> b -> c -> d -> Expectation) + -> Test +fuzz4 fuzzA fuzzB fuzzC fuzzD desc = + let + fuzzer = + Fuzz.tuple4 ( fuzzA, fuzzB, fuzzC, fuzzD ) + in + uncurry4 >> fuzz fuzzer desc + + +{-| Run a [fuzz test](#fuzz) using five random inputs. + +This is a convenience function that lets you skip calling [`Fuzz.tuple5`](../Fuzz#tuple5). +-} +fuzz5 : + Fuzzer a + -> Fuzzer b + -> Fuzzer c + -> Fuzzer d + -> Fuzzer e + -> String + -> (a -> b -> c -> d -> e -> Expectation) + -> Test +fuzz5 fuzzA fuzzB fuzzC fuzzD fuzzE desc = + let + fuzzer = + Fuzz.tuple5 ( fuzzA, fuzzB, fuzzC, fuzzD, fuzzE ) + in + uncurry5 >> fuzz fuzzer desc + + + +-- INTERNAL HELPERS -- + + +uncurry3 : (a -> b -> c -> d) -> ( a, b, c ) -> d +uncurry3 fn ( a, b, c ) = + fn a b c + + +uncurry4 : (a -> b -> c -> d -> e) -> ( a, b, c, d ) -> e +uncurry4 fn ( a, b, c, d ) = + fn a b c d + + +uncurry5 : (a -> b -> c -> d -> e -> f) -> ( a, b, c, d, e ) -> f +uncurry5 fn ( a, b, c, d, e ) = + fn a b c d e diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Expectation.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Expectation.elm new file mode 100644 index 0000000..fdb24b1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Expectation.elm @@ -0,0 +1,16 @@ +module Test.Expectation exposing (Expectation(..), withGiven) + + +type Expectation + = Pass + | Fail String String + + +withGiven : String -> Expectation -> Expectation +withGiven given outcome = + case outcome of + Fail _ message -> + Fail given message + + Pass -> + outcome diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Internal.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Internal.elm new file mode 100644 index 0000000..b46c711 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Internal.elm @@ -0,0 +1,133 @@ +module Test.Internal exposing (Test(..), fuzzTest, filter) + +import Random.Pcg as Random exposing (Generator) +import Test.Expectation exposing (Expectation(..)) +import Dict exposing (Dict) +import Shrink exposing (Shrinker) +import Fuzz exposing (Fuzzer) +import Fuzz.Internal exposing (unpackGenVal, unpackGenTree) +import RoseTree exposing (RoseTree(..)) +import Lazy.List + + +type Test + = Test (Random.Seed -> Int -> List Expectation) + | Labeled String Test + | Batch (List Test) + + +filter : (String -> Bool) -> Test -> Test +filter = + filterHelp False + + +filterHelp : Bool -> (String -> Bool) -> Test -> Test +filterHelp lastCheckPassed isKeepable test = + case test of + Test _ -> + if lastCheckPassed then + test + else + Batch [] + + Labeled desc labeledTest -> + labeledTest + |> filterHelp (isKeepable desc) isKeepable + |> Labeled desc + + Batch tests -> + tests + |> List.map (filterHelp lastCheckPassed isKeepable) + |> Batch + + +fuzzTest : Fuzzer a -> String -> (a -> Expectation) -> Test +fuzzTest fuzzer desc getExpectation = + {- Fuzz test algorithm with opt-in RoseTrees: + Generate a single value by passing the fuzzer True (indicates skip shrinking) + Run the test on that value. If it fails: + Generate the rosetree by passing the fuzzer False *and the same random seed* + Find the new failure by looking at the children for any shrunken values: + If a shrunken value causes a failure, recurse on its children + If no shrunken value replicates the failure, use the root + Whether it passes or fails, do this n times + -} + let + getFailures failures currentSeed remainingRuns = + let + genVal = + unpackGenVal fuzzer + + ( value, nextSeed ) = + Random.step genVal currentSeed + + newFailures = + case getExpectation value of + Pass -> + failures + + failedExpectation -> + let + genTree = + unpackGenTree fuzzer + + ( rosetree, nextSeedAgain ) = + Random.step genTree currentSeed + in + shrinkAndAdd rosetree getExpectation failedExpectation failures + in + if remainingRuns == 1 then + newFailures + else + getFailures newFailures nextSeed (remainingRuns - 1) + + run seed runs = + let + -- Use a Dict so we don't report duplicate inputs. + failures : Dict String Expectation + failures = + getFailures Dict.empty seed runs + in + -- Make sure if we passed, we don't do any more work. + if Dict.isEmpty failures then + [ Pass ] + else + failures + |> Dict.toList + |> List.map formatExpectation + in + Labeled desc (Test run) + + +shrinkAndAdd : RoseTree a -> (a -> Expectation) -> Expectation -> Dict String Expectation -> Dict String Expectation +shrinkAndAdd rootTree getExpectation rootsExpectation dict = + -- Knowing that the root already failed, adds the shrunken failure to the dictionary + let + shrink oldExpectation (Rose root branches) = + case Lazy.List.headAndTail branches of + Just ( (Rose branch _) as rosetree, moreLazyRoseTrees ) -> + -- either way, recurse with the most recent failing expectation, and failing input with its list of shrunken values + case getExpectation branch of + Pass -> + shrink oldExpectation (Rose root moreLazyRoseTrees) + + newExpectation -> + shrink newExpectation rosetree + + Nothing -> + ( root, oldExpectation ) + + ( result, finalExpectation ) = + shrink rootsExpectation rootTree + in + Dict.insert (toString result) finalExpectation dict + + +formatExpectation : ( String, Expectation ) -> Expectation +formatExpectation ( given, expectation ) = + Test.Expectation.withGiven given expectation + + +isFail : Expectation -> Bool +isFail = + (/=) Pass diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Runner.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Runner.elm new file mode 100644 index 0000000..a4da083 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Test/Runner.elm @@ -0,0 +1,149 @@ +module Test.Runner exposing (Runnable, Runner(..), run, fromTest, formatLabels) + +{-| A collection of functions used by authors of test runners. To run your +own tests, you should use these runners; see the `README` for more information. + +## Runner + +@docs Runner, fromTest + +## Runnable + +@docs Runnable, run + +## Formatting + +@docs formatLabels +-} + +import Test exposing (Test) +import Test.Internal as Internal +import Expect exposing (Expectation) +import Random.Pcg +import String + + +{-| An unevaluated test. Run it with [`run`](#run) to evaluate it into a +list of `Expectation`s. +-} +type Runnable + = Thunk (() -> List Expectation) + + +{-| A structured test runner, incorporating: + +* The expectations to run +* The hierarchy of description strings that describe the results +-} +type Runner + = Runnable Runnable + | Labeled String Runner + | Batch (List Runner) + + +{-| Evaluate a [`Runnable`](#Runnable) to get a list of `Expectation`s. +-} +run : Runnable -> List Expectation +run (Thunk fn) = + fn () + + +{-| Convert a `Test` into a `Runner`. + +In order to run any fuzz tests that the `Test` may have, it requires a default run count as well +as an initial `Random.Pcg.Seed`. `100` is a good run count. To obtain a good random seed, pass a +random 32-bit integer to `Random.Pcg.initialSeed`. You can obtain such an integer by running +`Math.floor(Math.random()*0xFFFFFFFF)` in Node. It's typically fine to hard-code this value into +your Elm code; it's easy and makes your tests reproducible. +-} +fromTest : Int -> Random.Pcg.Seed -> Test -> Runner +fromTest runs seed test = + if runs < 1 then + Thunk (\() -> [ Expect.fail ("Test runner run count must be at least 1, not " ++ toString runs) ]) + |> Runnable + else + case test of + Internal.Test run -> + Thunk (\() -> run seed runs) + |> Runnable + + Internal.Labeled label subTest -> + subTest + |> fromTest runs seed + |> Labeled label + + Internal.Batch subTests -> + subTests + |> List.foldl (distributeSeeds runs) ( seed, [] ) + |> Tuple.second + |> Batch + + +distributeSeeds : Int -> Test -> ( Random.Pcg.Seed, List Runner ) -> ( Random.Pcg.Seed, List Runner ) +distributeSeeds runs test ( startingSeed, runners ) = + case test of + Internal.Test run -> + let + ( seed, nextSeed ) = + Random.Pcg.step Random.Pcg.independentSeed startingSeed + in + ( nextSeed, runners ++ [ Runnable (Thunk (\() -> run seed runs)) ] ) + + Internal.Labeled label subTest -> + let + ( nextSeed, nextRunners ) = + distributeSeeds runs subTest ( startingSeed, [] ) + + finalRunners = + List.map (Labeled label) nextRunners + in + ( nextSeed, runners ++ finalRunners ) + + Internal.Batch tests -> + let + ( nextSeed, nextRunners ) = + List.foldl (distributeSeeds runs) ( startingSeed, [] ) tests + in + ( nextSeed, [ Batch (runners ++ nextRunners) ] ) + + +{-| A standard way to format descriptiona and test labels, to keep things +consistent across test runner implementations. + +The HTML, Node, String, and Log runners all use this. + +What it does: + +* drop any labels that are empty strings +* format the first label differently from the others +* reverse the resulting list + + [ "the actual test that failed" + , "nested description failure" + , "top-level description failure" + ] + |> formatLabels ((++) "↓ ") ((++) "✗ ") + + {- + [ "↓ top-level description failure" + , "↓ nested description failure" + , "✗ the actual test that failed" + ] + -} + +-} +formatLabels : + (String -> format) + -> (String -> format) + -> List String + -> List format +formatLabels formatDescription formatTest labels = + case List.filter (not << String.isEmpty) labels of + [] -> + [] + + test :: descriptions -> + descriptions + |> List.map formatDescription + |> (::) (formatTest test) + |> List.reverse diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Util.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Util.elm new file mode 100644 index 0000000..1cbcd51 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/src/Util.elm @@ -0,0 +1,32 @@ +module Util exposing (..) + +{-| This is where I'm sticking Random helper functions I don't want to add to Pcg. +-} + +import Random.Pcg exposing (..) +import Array exposing (Array) +import String + + +rangeLengthList : Int -> Int -> Generator a -> Generator (List a) +rangeLengthList minLength maxLength generator = + (int minLength maxLength) + |> andThen (\len -> list len generator) + + +rangeLengthArray : Int -> Int -> Generator a -> Generator (Array a) +rangeLengthArray minLength maxLength generator = + rangeLengthList minLength maxLength generator + |> map Array.fromList + + +rangeLengthString : Int -> Int -> Generator Char -> Generator String +rangeLengthString minLength maxLength charGenerator = + (int minLength maxLength) + |> andThen (lengthString charGenerator) + + +lengthString : Generator Char -> Int -> Generator String +lengthString charGenerator stringLength = + list stringLength charGenerator + |> map String.fromList diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Main.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Main.elm new file mode 100644 index 0000000..3aafeb6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Main.elm @@ -0,0 +1,22 @@ +module Main exposing (..) + +{-| HOW TO RUN THESE TESTS + +$ npm test + +Note that this always uses an initial seed of 902101337, since it can't do effects. +-} + +import Runner.Log +import Html +import Tests + + +main : Program Never () msg +main = + Html.beginnerProgram + { model = () + , update = \_ _ -> () + , view = \() -> Html.text "Check the console for useful output!" + } + |> Runner.Log.run Tests.all diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/README.md b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/README.md new file mode 100644 index 0000000..d02b5de --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/README.md @@ -0,0 +1,6 @@ +## Running the tests for elm-test itself + +1. `cd` into this directory +2. `npm install` +3. `elm package install --yes` +4. `npm test` diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Runner/Log.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Runner/Log.elm new file mode 100644 index 0000000..84c9187 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Runner/Log.elm @@ -0,0 +1,76 @@ +module Runner.Log exposing (run, runWithOptions) + +{-| # Log Runner + +Runs a test and outputs its results using `Debug.log`, then calls `Debug.crash` +if there are any failures. + +This is not the prettiest runner, but it is simple and cross-platform. For +example, you can use it as a crude Node runner like so: + + $ elm-make LogRunnerExample.elm --output=elm.js + $ node elm.js + +This will log the test results to the console, then exit with exit code 0 +if the tests all passed, and 1 if any failed. + +@docs run, runWithOptions +-} + +import Random.Pcg as Random +import Test exposing (Test) +import Runner.String exposing (Summary) +import String + + +{-| Run the test using the default `Test.Runner.String` options. +-} +run : Test -> a -> a +run test = + Runner.String.run test + |> logOutput + + +{-| Run the test using the provided options. +-} +runWithOptions : Int -> Random.Seed -> Test -> a -> a +runWithOptions runs seed test = + Runner.String.runWithOptions runs seed test + |> logOutput + + +summarize : Summary -> String +summarize { output, passed, failed } = + let + headline = + if failed > 0 then + output ++ "\n\nTEST RUN FAILED" + else + "TEST RUN PASSED" + in + String.join "\n" + [ output + , headline ++ "\n" + , "Passed: " ++ toString passed + , "Failed: " ++ toString failed + ] + + +logOutput : Summary -> a -> a +logOutput summary arg = + let + output = + summarize summary ++ "\n\nExit code" + + _ = + if summary.failed > 0 then + output + |> (flip Debug.log 1) + |> (\_ -> Debug.crash "FAILED TEST RUN") + |> (\_ -> ()) + else + output + |> (flip Debug.log 0) + |> (\_ -> ()) + in + arg diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Runner/String.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Runner/String.elm new file mode 100644 index 0000000..1056a77 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Runner/String.elm @@ -0,0 +1,111 @@ +module Runner.String exposing (Summary, run, runWithOptions) + +{-| # String Runner + +Run a test and present its results as a nicely-formatted String, along with +a count of how many tests passed and failed. + +Note that this always uses an initial seed of 902101337, since it can't do effects. + +@docs Summary, run, runWithOptions +-} + +import Random.Pcg as Random +import Test exposing (Test) +import Expect exposing (Expectation) +import String +import Test.Runner exposing (Runner(..)) + + +{-| The output string, the number of passed tests, +and the number of failed tests. +-} +type alias Summary = + { output : String, passed : Int, failed : Int } + + +toOutput : Summary -> Runner -> Summary +toOutput = + flip (toOutputHelp []) + + +toOutputHelp : List String -> Runner -> Summary -> Summary +toOutputHelp labels runner summary = + case runner of + Runnable runnable -> + Test.Runner.run runnable + |> List.foldl fromExpectation summary + + Labeled label subRunner -> + toOutputHelp (label :: labels) subRunner summary + + Batch runners -> + List.foldl (toOutputHelp labels) summary runners + + +fromExpectation : Expectation -> Summary -> Summary +fromExpectation expectation summary = + case Expect.getFailure expectation of + Nothing -> + { summary | passed = summary.passed + 1 } + + Just { given, message } -> + let + prefix = + if String.isEmpty given then + "" + else + "Given " ++ given ++ "\n\n" + + newOutput = + "\n\n" ++ (prefix ++ indentLines message) ++ "\n" + in + { output = summary.output ++ newOutput + , failed = summary.failed + 1 + , passed = summary.passed + } + + +outputLabels : List String -> String +outputLabels labels = + labels + |> Test.Runner.formatLabels ((++) "↓ ") ((++) "✗ ") + |> String.join "\n" + + +defaultSeed : Random.Seed +defaultSeed = + Random.initialSeed 902101337 + + +defaultRuns : Int +defaultRuns = + 100 + + +indentLines : String -> String +indentLines str = + str + |> String.split "\n" + |> List.map ((++) " ") + |> String.join "\n" + + +{-| Run a test and return a tuple of the output message and the number of +tests that failed. + +Fuzz tests use a default run count of 100, and a fixed initial seed. +-} +run : Test -> Summary +run = + runWithOptions defaultRuns defaultSeed + + +{-| Run a test and return a tuple of the output message and the number of +tests that failed. +-} +runWithOptions : Int -> Random.Seed -> Test -> Summary +runWithOptions runs seed test = + test + |> Test.Runner.fromTest runs seed + |> toOutput { output = "", passed = 0, failed = 0 } diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Tests.elm b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Tests.elm new file mode 100644 index 0000000..2de5a61 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/Tests.elm @@ -0,0 +1,229 @@ +module Tests exposing (all) + +import Test exposing (..) +import Test.Expectation exposing (Expectation(..)) +import Test.Internal as TI +import Fuzz exposing (..) +import Dict +import Set +import String +import Expect +import Fuzz.Internal +import RoseTree +import Random.Pcg as Random + + +all : Test +all = + Test.concat + [ readmeExample, bug39, fuzzerTests, shrinkingTests ] + + +{-| Regression test for https://github.com/elm-community/elm-test/issues/39 +-} +bug39 : Test +bug39 = + fuzz (intRange 1 32) "small slice end" <| + \positiveInt -> + positiveInt + |> Expect.greaterThan 0 + + +readmeExample : Test +readmeExample = + describe "The String module" + [ describe "String.reverse" + [ test "has no effect on a palindrome" <| + \() -> + let + palindrome = + "hannah" + in + Expect.equal palindrome (String.reverse palindrome) + , test "reverses a known string" <| + \() -> + "ABCDEFG" + |> String.reverse + |> Expect.equal "GFEDCBA" + , test "equal lists" <| + \() -> + [ 1, 2, 3 ] + |> Expect.equalLists [ 1, 2, 3 ] + , test "equal dicts" <| + \() -> + (Dict.fromList [ ( 1, "one" ), ( 2, "two" ) ]) + |> Expect.equalDicts (Dict.fromList [ ( 1, "one" ), ( 2, "two" ) ]) + , test "equal sets" <| + \() -> + (Set.fromList [ 1, 2, 3 ]) + |> Expect.equalSets (Set.fromList [ 1, 2, 3 ]) + , fuzz string "restores the original string if you run it again" <| + \randomlyGeneratedString -> + randomlyGeneratedString + |> String.reverse + |> String.reverse + |> Expect.equal randomlyGeneratedString + ] + ] + + +testStringLengthIsPreserved : List String -> Expectation +testStringLengthIsPreserved strings = + strings + |> List.map String.length + |> List.sum + |> Expect.equal (String.length (List.foldl (++) "" strings)) + + +fuzzerTests : Test +fuzzerTests = + describe "Fuzzer methods that use Debug.crash don't call it" + [ describe "FuzzN (uses tupleN) testing string length properties" + [ fuzz2 string string "fuzz2" <| + \a b -> + testStringLengthIsPreserved [ a, b ] + , fuzz3 string string string "fuzz3" <| + \a b c -> + testStringLengthIsPreserved [ a, b, c ] + , fuzz4 string string string string "fuzz4" <| + \a b c d -> + testStringLengthIsPreserved [ a, b, c, d ] + , fuzz5 string string string string string "fuzz5" <| + \a b c d e -> + testStringLengthIsPreserved [ a, b, c, d, e ] + ] + , fuzz + (intRange 1 6) + "intRange" + (Expect.greaterThan 0) + , fuzz + (frequencyOrCrash [ ( 1, intRange 1 6 ), ( 1, intRange 1 20 ) ]) + "Fuzz.frequency(OrCrash)" + (Expect.greaterThan 0) + , fuzz (result string int) "Fuzz.result" <| \r -> Expect.pass + , fuzz (andThen (\i -> intRange 0 (2 ^ i)) (intRange 1 8)) + "Fuzz.andThen" + (Expect.atMost 256) + , describe "Whitebox testing using Fuzz.Internal" + [ fuzz (intRange 0 0xFFFFFFFF) "the same value is generated with and without shrinking" <| + \i -> + let + seed = + Random.initialSeed i + + step gen = + Random.step gen seed + + aFuzzer = + tuple5 + ( tuple ( list int, array float ) + , maybe bool + , result unit char + , tuple3 + ( percentage + , map2 (+) int int + , frequencyOrCrash [ ( 1, constant True ), ( 3, constant False ) ] + ) + , tuple3 ( intRange 0 100, floatRange -51 pi, map abs int ) + ) + + valNoShrink = + aFuzzer |> Fuzz.Internal.unpackGenVal |> step |> Tuple.first + + valWithShrink = + aFuzzer |> Fuzz.Internal.unpackGenTree |> step |> Tuple.first |> RoseTree.root + in + Expect.equal valNoShrink valWithShrink + ] + ] + + +testShrinking : Test -> Test +testShrinking test = + case test of + TI.Test runTest -> + TI.Test + (\seed runs -> + let + expectations = + runTest seed runs + + goodShrink expectation = + case expectation of + Pass -> + Just "Expected this test to fail, but it passed!" + + Fail given outcome -> + let + acceptable = + String.split "|" outcome + in + if List.member given acceptable then + Nothing + else + Just <| "Got shrunken value " ++ given ++ " but expected " ++ String.join " or " acceptable + in + expectations + |> List.filterMap goodShrink + |> List.map Expect.fail + |> (\list -> + if List.isEmpty list then + [ Expect.pass ] + else + list + ) + ) + + TI.Labeled desc labeledTest -> + TI.Labeled desc (testShrinking labeledTest) + + TI.Batch tests -> + TI.Batch (List.map testShrinking tests) + + +shrinkingTests : Test +shrinkingTests = + testShrinking <| + describe "Tests that fail intentionally to test shrinking" + [ fuzz2 int int "Every pair of ints has a zero" <| + \i j -> + (i == 0) + || (j == 0) + |> Expect.true "(1,1)" + , fuzz3 int int int "Every triple of ints has a zero" <| + \i j k -> + (i == 0) + || (j == 0) + || (k == 0) + |> Expect.true "(1,1,1)" + , fuzz4 int int int int "Every 4-tuple of ints has a zero" <| + \i j k l -> + (i == 0) + || (j == 0) + || (k == 0) + || (l == 0) + |> Expect.true "(1,1,1,1)" + , fuzz5 int int int int int "Every 5-tuple of ints has a zero" <| + \i j k l m -> + (i == 0) + || (j == 0) + || (k == 0) + || (l == 0) + || (m == 0) + |> Expect.true "(1,1,1,1,1)" + , fuzz (list int) "All lists are sorted" <| + \aList -> + let + checkPair l = + case l of + a :: b :: more -> + if a > b then + False + else + checkPair (b :: more) + + _ -> + True + in + checkPair aList |> Expect.true "[1,0]|[0,-1]" + ] diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/elm-package.json b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/elm-package.json new file mode 100644 index 0000000..8fa2665 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "2.0.1", + "summary": "tests for elm-test, so you can elm-test while you elm-test", + "repository": "https://github.com/elm-community/elm-test.git", + "license": "BSD-3-Clause", + "source-directories": [ + ".", + "../src" + ], + "exposed-modules": [], + "dependencies": { + "elm-community/lazy-list": "1.0.0 <= v < 2.0.0", + "elm-community/shrink": "2.0.0 <= v < 3.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/html": "2.0.0 <= v < 3.0.0", + "mgold/elm-random-pcg": "4.0.2 <= v < 5.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/package.json b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/package.json new file mode 100644 index 0000000..b113a7b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/package.json @@ -0,0 +1,22 @@ +{ + "name": "elm-test-tests", + "version": "0.0.0", + "description": "tests for elm-test, so you can elm-test while you elm-test", + "main": "elm.js", + "scripts": { + "test": "node run-tests.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/elm-community/elm-test.git" + }, + "author": "Richard Feldman", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/elm-community/elm-test/issues" + }, + "homepage": "https://github.com/elm-community/elm-test#readme", + "devDependencies": { + "node-elm-compiler": "4.1.3" + } +} diff --git a/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/run-tests.js b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/run-tests.js new file mode 100644 index 0000000..7caef0f --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/elm-test/3.1.0/tests/run-tests.js @@ -0,0 +1,19 @@ +var compiler = require("node-elm-compiler") + +testFile = "Main.elm" + +compiler.compileToString([testFile], {}).then(function(str) { + try { + eval(str); + + process.exit(0) + } catch (err) { + console.error(err); + + process.exit(1) + } +}).catch(function(err) { + console.error(err); + + process.exit(1) +}); diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/.gitignore new file mode 100644 index 0000000..5f11fd6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/.gitignore @@ -0,0 +1,2 @@ +# Ignore build or dist files +/elm-stuff diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/CHANGELOG.md b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/CHANGELOG.md new file mode 100644 index 0000000..f8156e5 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/CHANGELOG.md @@ -0,0 +1,25 @@ +### 2.0.0 + +**Breaking Changes:** +- Upgrade for Elm 0.18 +- Removed `maybeNull` in favor of `Json.Decode.nullable` +- Removed `lazy` in favor of `Json.Decode.lazy` +- Renamed `apply` to `andMap` and reversed arguments to `Decoder a -> Decoder (a -> b) -> Decoder b` to make it work nicely with `(|>)` + +**Additions:** +- `fromResult : Result String a -> Decoder a` - convert a `Result` to a `Decoder`, helpful in `andThen` callbacks following the removal of `Json.Decode.customDecoder` +- `Json.Encode.Extra.maybe : (a -> Value) -> Maybe a -> Value` - encode a `Maybe a` given an encoder for `a`. Thanks to @hendore for this addition. + +**Other Stuff:** +- Code style conforms to elm-format + +#### 1.1.0 + +**Additions:** +- `Json.Decode.Extra.sequence` - lets you generate a list of `Decoder a` and attempt to apply them to a JSON list. _Authored by @cobalamin_ + + +#### 1.0.0 + +**Breaking Changes:** +- Upgrade for Elm 0.17 diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/LICENSE b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/LICENSE new file mode 100644 index 0000000..704c6f6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 CircuitHub Inc., Elm Community members + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/README.md b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/README.md new file mode 100644 index 0000000..76b31c6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/README.md @@ -0,0 +1,3 @@ +# json-extra + +Convenience functions for working with JSON diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/docs/andMap.md b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/docs/andMap.md new file mode 100644 index 0000000..a784986 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/docs/andMap.md @@ -0,0 +1,61 @@ +## Json.Decode.Extra.andMap + +Imagine you have a data type for a user + +```elm +import Date (Date) + +type alias User = + { id : Int + , createdAt : Date + , updatedAt : Date + , deletedAt : Maybe Date + , username : Maybe String + , email : Maybe String + , isAdmin : Bool + } +``` + +You can use `andMap` to incrementally apply decoders to your `User` type alias +by using that type alias as a function. Recall that record type aliases are +also functions which accept arguments in the order their fields are declared. In +this case, `User` looks like + +```elm +User : Int -> Date -> Date -> Maybe Date -> Maybe String -> Maybe String -> Bool -> User +``` + +And also recall that Elm functions can be partially applied. We can use these +properties to apply each field of our JSON object to each field in our user one +field at a time. All we need to do is also wrap `User` in a decoder and step +through using `andMap`. + +```elm +userDecoder : Decoder User +userDecoder = + succeed User + |> andMap (field "id" int) + |> andMap (field "createdAt" date) + |> andMap (field "updatedAt" date) + |> andMap (field "deletedAt" (maybe date)) + |> andMap (field "username" (maybe string)) + |> andMap (field "email" (maybe string)) + |> andMap (field "isAdmin" bool) +``` + +This is a shortened form of + +```elm +userDecoder : Decoder User +userDecoder = + succeed User + |> andThen (\f -> map f (field "id" int)) + |> andThen (\f -> map f (field "createdAt" date)) + |> andThen (\f -> map f (field "updatedAt" date)) + |> andThen (\f -> map f (field "deletedAt" (maybe date))) + |> andThen (\f -> map f (field "username" (maybe string))) + |> andThen (\f -> map f (field "email" (maybe string))) + |> andThen (\f -> map f (field "isAdmin" bool)) +``` + +See also: The [docs for `(|:)`](https://github.com/elm-community/json-extra/blob/master/docs/infixAndMap.md) diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/docs/infixAndMap.md b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/docs/infixAndMap.md new file mode 100644 index 0000000..728761b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/docs/infixAndMap.md @@ -0,0 +1,131 @@ +## Json.Decode.Extra.(|:) + + +Infix version of `andMap` that makes for a nice DSL when decoding objects. + +Consider the following type alias for a `Location`: + +```elm +type alias Location = + { id : Int + , name : String + , address : String + } +``` + +We can use `(|:)` to build up a decoder for `Location`: + +```elm +locationDecoder : Decoder Location +locationDecoder = + succeed Location + |: (field "id" int) + |: (field "name" string) + |: (field "address" string) +``` + + + +If you're curious, here's how this works behind the scenes, read on. + +`Location` is a type alias, and type aliases give you a convenience function +that returns an instance of the record in question. Try this out in `elm-repl`: + +```elm +> type alias Location = { id : Int, name: String, address: String } + +> Location + : Int -> String -> String -> Repl.Location + +> Location 1 "The White House" "1600 Pennsylvania Ave" +{ id = 1, name = "The White House", address = "1600 Pennsylvania Ave" } +``` + +In other words, if you call the `Location` function, passing three arguments, +it will return a new `Location` record by filling in each of its fields. (The +argument order is based on the order in which we listed the fields in the +type alias; the first argument sets `id`, the second argument sets `name`, etc.) + +Now try running this through `elm-repl`: + +```elm +> import Json.Decode exposing (succeed, int, string, field) + +> succeed Location + + : Json.Decode.Decoder + (Int -> String -> String -> Repl.Location) +``` + +So `succeed Location` gives us a `Decoder (Int -> String -> String -> Location)`. +That's not what we want! What we want is a `Decoder Location`. All we have so +far is a `Decoder` that wraps not a `Location`, but rather a function that +returns a `Location`. + +What `|: (field "id" int)` does is to take that wrapped function and pass an +argument to it. + +```elm +> import Json.Decode exposing (succeed, int, string, field) + +> (field "id" int) + : Json.Decode.Decoder Int + +> succeed Location |: (field "id" int) + + : Json.Decode.Decoder + (String -> String -> Repl.Location) +``` + +Notice how the wrapped function no longer takes an `Int` as its first argument. +That's because `(|:)` went ahead and supplied one: the `Int` wrapped by the decoder +`(field "id" int)` (which returns a `Decoder Int`). + +Compare: + +```elm +> succeed Location +Decoder (Int -> String -> String -> Location) + +> succeed Location |: (field "id" int) +Decoder (String -> String -> Location) +``` + +We still want a `Decoder Location` and we still don't have it yet. Our decoder +still wraps a function instead of a plain `Location`. However, that function is +now smaller by one argument! + +Let's repeat this pattern to provide the first `String` argument next. + +```elm +> succeed Location +Decoder (Int -> String -> String -> Location) + +> succeed Location |: (field "id" int) +Decoder (String -> String -> Location) + +> succeed Location |: (field "id" int) |: (field "name" string) +Decoder (String -> Location) +``` + +Smaller and smaller! Now we're down from `(Int -> String -> String -> Location)` +to `(String -> Location)`. What happens if we repeat the pattern one more time? + +```elm +> succeed Location +Decoder (Int -> String -> String -> Location) + +> succeed Location |: (field "id" int) +Decoder (String -> String -> Location) + +> succeed Location |: (field "id" int) |: (field "name" string) +Decoder (String -> Location) + +> succeed Location |: (field "id" int) |: (field "name" string) |: (field "address" string) +Decoder Location +``` + +Having now supplied all three arguments to the wrapped function, it has ceased +to be a function. It's now just a plain old `Location`, like we wanted all along. + +We win! diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/elm-package.json new file mode 100644 index 0000000..78da4e5 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "2.0.0", + "summary": "Convenience functions for working with Json", + "repository": "https://github.com/elm-community/json-extra.git", + "license": "MIT", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Json.Decode.Extra", + "Json.Encode.Extra" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/src/Json/Decode/Extra.elm b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/src/Json/Decode/Extra.elm new file mode 100644 index 0000000..bcbec90 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/src/Json/Decode/Extra.elm @@ -0,0 +1,174 @@ +module Json.Decode.Extra exposing (date, andMap, (|:), sequence, set, dict2, withDefault, fromResult) + +{-| Convenience functions for working with Json + +# Date +@docs date + +# Incremental Decoding +@docs andMap, (|:) + +# List +@docs sequence + +# Set +@docs set + +# Dict +@docs dict2 + +# Maybe +@docs withDefault + +# Result +@docs fromResult + +-} + +import Json.Decode exposing (..) +import Date +import Dict exposing (Dict) +import Set exposing (Set) + + +{-| Can be helpful when decoding large objects incrementally. + +See [the `andMap` docs](https://github.com/elm-community/json-extra/blob/2.0.0/docs/andMap.md) +for an explanation of how `andMap` works and how to use it. +-} +andMap : Decoder a -> Decoder (a -> b) -> Decoder b +andMap = + map2 (|>) + + +{-| Infix version of `andMap` that makes for a nice DSL when decoding objects. + +See [the `(|:)` docs](https://github.com/elm-community/json-extra/blob/2.0.0/docs/infixAndMap.md) +for an explanation of how `(|:)` works and how to use it. +-} +(|:) : Decoder (a -> b) -> Decoder a -> Decoder b +(|:) = + flip andMap + + +{-| Extract a date using [`Date.fromString`](http://package.elm-lang.org/packages/elm-lang/core/latest/Date#fromString) +-} +date : Decoder Date.Date +date = + string + |> andThen (Date.fromString >> fromResult) + + +{-| Extract a set. +-} +set : Decoder comparable -> Decoder (Set comparable) +set decoder = + (list decoder) + |> andThen (Set.fromList >> succeed) + + +{-| Extract a dict using separate decoders for keys and values. +-} +dict2 : Decoder comparable -> Decoder v -> Decoder (Dict comparable v) +dict2 keyDecoder valueDecoder = + (dict valueDecoder) + |> andThen (Dict.toList >> (decodeDictFromTuples keyDecoder)) + + +{-| Helper function for dict +-} +decodeDictFromTuples : Decoder comparable -> List ( String, v ) -> Decoder (Dict comparable v) +decodeDictFromTuples keyDecoder tuples = + case tuples of + [] -> + succeed Dict.empty + + ( strKey, value ) :: rest -> + case decodeString keyDecoder strKey of + Ok key -> + (decodeDictFromTuples keyDecoder rest) + |> andThen ((Dict.insert key value) >> succeed) + + Err error -> + fail error + + +{-| Try running the given decoder; if that fails, then succeed with the given +fallback value. + + -- If this field is missing or malformed, it will decode to []. + field "optionalNames" (list string) + |> (withDefault []) + +-} +withDefault : a -> Decoder a -> Decoder a +withDefault fallback decoder = + maybe decoder + |> andThen ((Maybe.withDefault fallback) >> succeed) + + +{-| This function turns a list of decoders into a decoder that returns a list. + +The returned decoder will zip the list of decoders with a list of values, matching each decoder with exactly one value at the same position. This is most often useful in cases when you find yourself needing to dynamically generate a list of decoders based on some data, and decode some other data with this list of decoders. There are other functions that seem similar: + +- `Json.Decode.oneOf`, which will try every decoder for every value in the list, might be too lenient (e.g. a `4.0` will be interpreted as an `Int` just fine). +- `Json.Decode.tuple1-8`, which do something similar, but have a hard-coded length. As opposed to these functions, where you can decode several different types and combine them, you'll need to manually unify all those types in one sum type to use `sequence`. + +Note that this function, unlike `List.map2`'s behaviour, expects the list of decoders to have the same length as the list of values in the JSON. + + type FloatOrInt + = I Int + | F Float + + -- we'd like a list like [I, F, I] from this + -- fairly contrived example, but data like this does exist! + json = "[1, 2.0, 3]" + + intDecoder = Decode.map I Decode.int + floatDecoder = Decode.map F Decode.float + + decoder : Decoder (List FloatOrInt) + decoder = + sequence [ intDecoder, floatDecoder, intDecoder ] + + decoded = Decode.decodeString decoder json + -- Ok ([I 1,F 2,I 3]) : Result String (List FloatOrInt) + +-} +sequence : List (Decoder a) -> Decoder (List a) +sequence decoders = + list value |> andThen (sequenceHelp decoders) + + +{-| Helper function for sequence +-} +sequenceHelp : List (Decoder a) -> List Value -> Decoder (List a) +sequenceHelp decoders jsonValues = + if List.length jsonValues /= List.length decoders then + fail "Number of decoders does not match number of values" + else + List.map2 decodeValue decoders jsonValues + |> List.foldr (Result.map2 (::)) (Ok []) + |> fromResult + + +{-| Transform a result into a decoder + +Sometimes it can be useful to use functions that primarily operate on +`Result` in decoders. An example of this is `Json.Decode.Extra.date`. It +uses the built-in `Date.fromString` to parse a `String` as a `Date`, and +then converts the `Result` from that conversion into a decoder which has +either already succeeded or failed based on the outcome. + + date : Decoder Date + date = + string |> andThen (Date.fromString >> fromResult) +-} +fromResult : Result String a -> Decoder a +fromResult result = + case result of + Ok successValue -> + succeed successValue + + Err errorMessage -> + fail errorMessage diff --git a/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/src/Json/Encode/Extra.elm b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/src/Json/Encode/Extra.elm new file mode 100644 index 0000000..05d4f60 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/json-extra/2.0.0/src/Json/Encode/Extra.elm @@ -0,0 +1,26 @@ +module Json.Encode.Extra exposing (maybe) + +{-| Convenience functions for turning Elm values into Json values. + +# Maybe +@docs maybe + +-} + +import Json.Encode exposing (..) + + +{-| Encode a Maybe value. If the value is `Nothing` it will be encoded as `null` + + maybe int Nothing == Value null + maybe int (Just 50) == Value 50 + +-} +maybe : (a -> Value) -> Maybe a -> Value +maybe encoder value = + case value of + Nothing -> + null + + Just val -> + encoder val diff --git a/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/.gitignore new file mode 100644 index 0000000..4bc8535 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/.gitignore @@ -0,0 +1 @@ +elm-stuff diff --git a/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/README.md b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/README.md new file mode 100644 index 0000000..4d6f52a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/README.md @@ -0,0 +1,5 @@ +# Lazy list implementation in Elm + +Lazy lists are useful for large trees where you will only need one path. They power shrinking in elm-test. + +Prior to 0.18, this repo was elm-lazy-list. Starting with the 0.18 release, the repo is renamed lazy-list and versioning resets to 1.0.0. diff --git a/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/elm-package.json new file mode 100644 index 0000000..5517b41 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "1.0.0", + "summary": "Lazy list implementation in Elm", + "repository": "https://github.com/elm-community/lazy-list.git", + "license": "BSD-3-Clause", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Lazy.List" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/lazy": "2.0.0 <= v < 3.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/src/Lazy/List.elm b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/src/Lazy/List.elm new file mode 100644 index 0000000..02c14fd --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/lazy-list/1.0.0/src/Lazy/List.elm @@ -0,0 +1,748 @@ +module Lazy.List exposing (..) + +{-| Lazy list implementation in Elm. + +# Types +@docs LazyList, LazyListView + +# Constructors +@docs cons, empty, singleton + +# Query operations +@docs isEmpty, head, tail, headAndTail, member, length + +# Conversions +@docs toList, fromList, toArray, fromArray + +# Map-reduce et al. +@docs map, zip, reduce, flatten, append, foldl, foldr + +# Common operations +@docs intersperse, interleave, reverse, cycle, iterate, repeat, take, takeWhile, drop, dropWhile + +# Filtering operations +@docs keepIf, dropIf, filterMap, unique + +# Chaining operations +@docs andMap, andThen + +# Useful math stuff +@docs numbers, sum, product + +# All the maps! +@docs map2, map3, map4, map5 + +# All the zips! +@docs zip3, zip4, zip5 + +# All the Cartesian products! +**Warning:** Calling these functions on large lists and then calling `toList` can easily overflow the stack. Consider +passing the results to `take aConstantNumber`. + +@docs product2, product3, product4, product5 + +# Infix Operators +@docs (:::), (+++) + +-} + +import Array exposing (Array) +import List +import Random exposing (Generator, Seed) +import Lazy exposing (Lazy, lazy, force) + + +{-| Analogous to `List` type. This is the actual implementation type for the +`LazyList` type. This type is exposed to the user if the user so wishes to +do pattern matching or understand how the list type works. It is not +recommended to work with this type directly. Try working solely with the +provided functions in the package. +-} +type LazyListView a + = Nil + | Cons a (LazyList a) + + +{-| Lazy List type. +-} +type alias LazyList a = + Lazy (LazyListView a) + + +{-| Create an empty list. +-} +empty : LazyList a +empty = + lazy <| + \() -> Nil + + +{-| Create a singleton list. +-} +singleton : a -> LazyList a +singleton a = + cons a empty + + +{-| Detect if a list is empty or not. +-} +isEmpty : LazyList a -> Bool +isEmpty list = + case force list of + Nil -> + True + + _ -> + False + + +{-| Add a value to the front of a list. +-} +cons : a -> LazyList a -> LazyList a +cons a list = + lazy <| + \() -> + Cons a list + + +{-| Get the head of a list. +-} +head : LazyList a -> Maybe a +head list = + case force list of + Nil -> + Nothing + + Cons first _ -> + Just first + + +{-| Get the tail of a list. +-} +tail : LazyList a -> Maybe (LazyList a) +tail list = + case force list of + Nil -> + Nothing + + Cons _ rest -> + Just rest + + +{-| Get the head and tail of a list. +-} +headAndTail : LazyList a -> Maybe ( a, LazyList a ) +headAndTail list = + case force list of + Nil -> + Nothing + + Cons first rest -> + Just ( first, rest ) + + +{-| Repeat a value ad infinitum. +Be careful when you use this. The result of this is a truly infinite list. +Do not try calling `reduce` or `toList` on an infinite list as it'll never +finish computing. Make sure you then filter it down to a finite list with `head` +or `take` or something. +-} +repeat : a -> LazyList a +repeat a = + lazy <| + \() -> + Cons a (repeat a) + + +{-| Append a list to another list. +-} +append : LazyList a -> LazyList a -> LazyList a +append list1 list2 = + lazy <| + \() -> + case force list1 of + Nil -> + force list2 + + Cons first rest -> + force (first ::: rest +++ list2) + + +{-| Interleave the elements of a list in another list. The two lists get +interleaved at the end. +-} +interleave : LazyList a -> LazyList a -> LazyList a +interleave list1 list2 = + lazy <| + \() -> + case force list1 of + Nil -> + force list2 + + Cons first1 rest1 -> + case force list2 of + Nil -> + force list1 + + Cons first2 rest2 -> + force (first1 ::: first2 ::: interleave rest1 rest2) + + +{-| Places the given value between all members of the given list. +-} +intersperse : a -> LazyList a -> LazyList a +intersperse a list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + case force rest of + Nil -> + force (first ::: empty) + + Cons second tail -> + case force tail of + Nil -> + force (first ::: a ::: second ::: empty) + + _ -> + force (first ::: a ::: second ::: a ::: intersperse a tail) + + +{-| Take a list and repeat it ad infinitum. This cycles a finite list +by putting the front after the end of the list. This results in a no-op in +the case of an infinite list. +-} +cycle : LazyList a -> LazyList a +cycle list = + list + +++ (lazy <| + \() -> + force (cycle list) + ) + + +{-| Create an infinite list of applications of a function on some value. + +Equivalent to: + + x ::: f x ::: f (f x) ::: f (f (f x)) ::: ... -- etc... +-} +iterate : (a -> a) -> a -> LazyList a +iterate f a = + lazy <| + \() -> + Cons a (iterate f (f a)) + + +{-| The infinite list of counting numbers. + +i.e.: + + 1 ::: 2 ::: 3 ::: 4 ::: 5 ::: ... -- etc... +-} +numbers : LazyList number +numbers = + iterate ((+) 1) 1 + + +{-| Take at most `n` many values from a list. +-} +take : Int -> LazyList a -> LazyList a +take n list = + lazy <| + \() -> + if n <= 0 then + Nil + else + case force list of + Nil -> + Nil + + Cons first rest -> + Cons first (take (n - 1) rest) + + +{-| Take elements from a list as long as the predicate is satisfied. +-} +takeWhile : (a -> Bool) -> LazyList a -> LazyList a +takeWhile predicate list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + if predicate first then + Cons first (takeWhile predicate rest) + else + Nil + + +{-| Drop at most `n` many values from a list. +-} +drop : Int -> LazyList a -> LazyList a +drop n list = + lazy <| + \() -> + if n <= 0 then + force list + else + case force list of + Nil -> + Nil + + Cons first rest -> + force (drop (n - 1) rest) + + +{-| Drop elements from a list as long as the predicate is satisfied. +-} +dropWhile : (a -> Bool) -> LazyList a -> LazyList a +dropWhile predicate list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + if predicate first then + force (dropWhile predicate rest) + else + force list + + +{-| Test if a value is a member of a list. +-} +member : a -> LazyList a -> Bool +member a list = + case force list of + Nil -> + False + + Cons first rest -> + first == a || member a rest + + +{-| Get the length of a lazy list. + +Warning: This will not terminate if the list is infinite. +-} +length : LazyList a -> Int +length = + reduce (\_ n -> n + 1) 0 + + +{-| Remove all duplicates from a list and return a list of distinct elements. +-} +unique : LazyList a -> LazyList a +unique list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + if member first rest then + force (unique rest) + else + Cons first (unique rest) + + +{-| Keep all elements in a list that satisfy the given predicate. +-} +keepIf : (a -> Bool) -> LazyList a -> LazyList a +keepIf predicate list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + if predicate first then + Cons first (keepIf predicate rest) + else + force (keepIf predicate rest) + + +{-| Drop all elements in a list that satisfy the given predicate. +-} +dropIf : (a -> Bool) -> LazyList a -> LazyList a +dropIf predicate = + keepIf (\n -> not (predicate n)) + + +{-| Map a function that may fail over a lazy list, keeping only +the values that were successfully transformed. +-} +filterMap : (a -> Maybe b) -> LazyList a -> LazyList b +filterMap transform list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + case transform first of + Just val -> + Cons val (filterMap transform rest) + + Nothing -> + force (filterMap transform rest) + + +{-| Reduce a list with a given reducer and an initial value. + +Example : + reduce (+) 0 (1 ::: 2 ::: 3 ::: 4 ::: empty) == 10 +-} +reduce : (a -> b -> b) -> b -> LazyList a -> b +reduce reducer b list = + case force list of + Nil -> + b + + Cons first rest -> + reduce reducer (reducer first b) rest + + +{-| Analogous to `List.foldl`. Is an alias for `reduce`. +-} +foldl : (a -> b -> b) -> b -> LazyList a -> b +foldl = + reduce + + +{-| Analogous to `List.foldr`. +-} +foldr : (a -> b -> b) -> b -> LazyList a -> b +foldr reducer b list = + Array.foldr reducer b (toArray list) + + +{-| Get the sum of a list of numbers. +-} +sum : LazyList number -> number +sum = + reduce (+) 0 + + +{-| Get the product of a list of numbers. +-} +product : LazyList number -> number +product = + reduce (*) 1 + + +{-| Flatten a list of lists into a single list by appending all the inner +lists into one big list. +-} +flatten : LazyList (LazyList a) -> LazyList a +flatten list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + force (first +++ flatten rest) + + +{-| Chain list producing operations. Map then flatten. +-} +andThen : (a -> LazyList b) -> LazyList a -> LazyList b +andThen f list = + map f list |> flatten + + +{-| Reverse a list. +-} +reverse : LazyList a -> LazyList a +reverse = + reduce cons empty + + +{-| Map a function to a list. +-} +map : (a -> b) -> LazyList a -> LazyList b +map f list = + lazy <| + \() -> + case force list of + Nil -> + Nil + + Cons first rest -> + Cons (f first) (map f rest) + + +{-| -} +map2 : (a -> b -> c) -> LazyList a -> LazyList b -> LazyList c +map2 f list1 list2 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + case force list2 of + Nil -> + Nil + + Cons first2 rest2 -> + Cons (f first1 first2) (map2 f rest1 rest2) + + +{-| Known as `mapN` in some circles. Allows you to apply `map` in cases +where then number of arguments are greater than 5. + +The argument order is such that it works well with `|>` chains. +-} +andMap : LazyList a -> LazyList (a -> b) -> LazyList b +andMap listVal listFuncs = + map2 (<|) listFuncs listVal + + +{-| -} +map3 : (a -> b -> c -> d) -> LazyList a -> LazyList b -> LazyList c -> LazyList d +map3 f list1 list2 list3 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + case force list2 of + Nil -> + Nil + + Cons first2 rest2 -> + case force list3 of + Nil -> + Nil + + Cons first3 rest3 -> + Cons (f first1 first2 first3) (map3 f rest1 rest2 rest3) + + +{-| -} +map4 : (a -> b -> c -> d -> e) -> LazyList a -> LazyList b -> LazyList c -> LazyList d -> LazyList e +map4 f list1 list2 list3 list4 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + case force list2 of + Nil -> + Nil + + Cons first2 rest2 -> + case force list3 of + Nil -> + Nil + + Cons first3 rest3 -> + case force list4 of + Nil -> + Nil + + Cons first4 rest4 -> + Cons (f first1 first2 first3 first4) (map4 f rest1 rest2 rest3 rest4) + + +{-| -} +map5 : (a -> b -> c -> d -> e -> f) -> LazyList a -> LazyList b -> LazyList c -> LazyList d -> LazyList e -> LazyList f +map5 f list1 list2 list3 list4 list5 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + case force list2 of + Nil -> + Nil + + Cons first2 rest2 -> + case force list3 of + Nil -> + Nil + + Cons first3 rest3 -> + case force list4 of + Nil -> + Nil + + Cons first4 rest4 -> + case force list5 of + Nil -> + Nil + + Cons first5 rest5 -> + Cons + (f first1 first2 first3 first4 first5) + (map5 f rest1 rest2 rest3 rest4 rest5) + + +{-| -} +zip : LazyList a -> LazyList b -> LazyList ( a, b ) +zip = + map2 (,) + + +{-| -} +zip3 : LazyList a -> LazyList b -> LazyList c -> LazyList ( a, b, c ) +zip3 = + map3 (,,) + + +{-| -} +zip4 : LazyList a -> LazyList b -> LazyList c -> LazyList d -> LazyList ( a, b, c, d ) +zip4 = + map4 (,,,) + + +{-| -} +zip5 : LazyList a -> LazyList b -> LazyList c -> LazyList d -> LazyList e -> LazyList ( a, b, c, d, e ) +zip5 = + map5 (,,,,) + + +{-| Create a lazy list containing all possible pairs in the given lazy lists. +-} +product2 : LazyList a -> LazyList b -> LazyList ( a, b ) +product2 list1 list2 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + case force list2 of + Nil -> + Nil + + Cons _ _ -> + force <| map ((,) first1) list2 +++ product2 rest1 list2 + + +{-| Create a lazy list containing all possible triples in the given lazy lists. +-} +product3 : LazyList a -> LazyList b -> LazyList c -> LazyList ( a, b, c ) +product3 list1 list2 list3 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + force <| map (\( b, c ) -> ( first1, b, c )) (product2 list2 list3) +++ product3 rest1 list2 list3 + + +{-| Create a lazy list containing all possible 4-tuples in the given lazy lists. +-} +product4 : LazyList a -> LazyList b -> LazyList c -> LazyList d -> LazyList ( a, b, c, d ) +product4 list1 list2 list3 list4 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + force <| map (\( b, c, d ) -> ( first1, b, c, d )) (product3 list2 list3 list4) +++ product4 rest1 list2 list3 list4 + + +{-| Create a lazy list containing all possible 5-tuples in the given lazy lists. +-} +product5 : LazyList a -> LazyList b -> LazyList c -> LazyList d -> LazyList e -> LazyList ( a, b, c, d, e ) +product5 list1 list2 list3 list4 list5 = + lazy <| + \() -> + case force list1 of + Nil -> + Nil + + Cons first1 rest1 -> + force <| map (\( b, c, d, e ) -> ( first1, b, c, d, e )) (product4 list2 list3 list4 list5) +++ product5 rest1 list2 list3 list4 list5 + + +{-| Convert a lazy list to a normal list. +-} +toList : LazyList a -> List a +toList list = + case force list of + Nil -> + [] + + Cons first rest -> + first :: toList rest + + +{-| Convert a normal list to a lazy list. +-} +fromList : List a -> LazyList a +fromList = + List.foldr cons empty + + +{-| Convert a lazy list to an array. +-} +toArray : LazyList a -> Array a +toArray list = + case force list of + Nil -> + Array.empty + + Cons first rest -> + Array.append (Array.push first Array.empty) (toArray rest) + + +{-| Convert an array to a lazy list. +-} +fromArray : Array a -> LazyList a +fromArray = + Array.foldr cons empty + + + +--------------------- +-- INFIX OPERATORS -- +--------------------- + + +infixr 5 ::: + + +{-| Alias for `cons`. Analogous to `::` for lists. +-} +(:::) : a -> LazyList a -> LazyList a +(:::) = + cons + + +infixr 5 +++ + + +{-| Alias for `append`. Analogous to `++` for lists. +-} +(+++) : LazyList a -> LazyList a -> LazyList a +(+++) = + append diff --git a/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/.gitignore new file mode 100644 index 0000000..4bc8535 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/.gitignore @@ -0,0 +1 @@ +elm-stuff diff --git a/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/README.md b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/README.md new file mode 100644 index 0000000..94fda59 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/README.md @@ -0,0 +1,241 @@ +# Shrinking strategies with elm-community/shrink + +`shrink` is a library for using and creating shrinking strategies. A +shrinking strategy, or shrinker, is a way of taking a value and producing a +list of values which are, some sense, more minimal than the original value. + +Shrinking is heavily used in property-based testing as a way to shrink +failing test cases into a more minimal test case. This is key for being +able to debug code swiftly and easily. Therefore, the main intended use +of this library is to support testing frameworks. You might also use it to +define shrinkers for types you define, in order to test them better. + +Note that `shrink` uses lazy lists instead of lists. This means that `shrink` has a direct dependency on +[elm-community/elm-lazy-list](https://github.com/elm-community/elm-lazy-list). + +```elm +type alias Shrinker a = a -> LazyList a +``` +That is, a shrinker takes a value to shrink, and produces, *lazily*, a list +of shrunken values. + +### Basic Examples + +The following examples show how to use the basic shrinkers and the kinds of +results they produce. Note that we're glossing over the lazy part of this; +pretend there's a `Lazy.List.toList` on the left of each example. + +**Shrink an Int** + +```elm +int 10 == [0,5,7,8,9] +``` + + +**Shrink a String** + +```elm +string "Hello World" == + [""," World","Hellod","llo World","Heo World","HellWorld","Hello rld","Hello Wod","ello World","Hllo World","Helo World","Helo World","Hell World","HelloWorld","Hello orld","Hello Wrld","Hello Wold","Hello Word","Hello Worl","\0ello World","$ello World","6ello World","?ello World","Cello World","Eello World","Fello World","Gello World","H\0llo World","H2llo World","HKllo World","HXllo World","H^llo World","Hallo World","Hcllo World","Hdllo World","He\0lo World","He6lo World","HeQlo World","He^lo World","Heelo World","Hehlo World","Hejlo World","Heklo World","Hel\0o World","Hel6o World","HelQo World","Hel^o World","Heleo World","Helho World","Heljo World","Helko World","Hell\0 World","Hell7 World","HellS World","Hella World","Hellh World","Hellk World","Hellm World","Helln World","Hello\0World","HelloWorld","HelloWorld","HelloWorld","HelloWorld","HelloWorld","Hello \0orld","Hello +orld","Hello Aorld","Hello Lorld","Hello Qorld","Hello Torld","Hello Uorld","Hello Vorld","Hello W\0rld","Hello W7rld","Hello WSrld","Hello Warld","Hello Whrld","Hello Wkrld","Hello Wmrld","Hello Wnrld","Hello Wo\0ld","Hello Wo9ld","Hello WoUld","Hello Wocld","Hello Wojld","Hello Wonld","Hello Wopld","Hello Woqld","Hello Wor\0d","Hello Wor6d","Hello WorQd","Hello Wor^d","Hello Wored","Hello Worhd","Hello Worjd","Hello Workd","Hello Worl\0","Hello Worl2","Hello WorlK","Hello WorlW","Hello Worl]","Hello Worl`","Hello Worlb","Hello Worlc"] +``` + +**Shrink a Maybe Float** + +```elm +maybe float (Just 3.14) == + [Nothing,Just 0,Just 1.57,Just 2.355,Just 2.7475,Just 2.94375,Just 3.041875,Just 3.0909375,Just 3.11546875,Just 3.127734375,Just 3.1338671875,Just 3.1369335937500002,Just 3.138466796875,Just 3.1392333984375,Just 3.1396166992187498,Just 3.1398083496093747] +``` + +**Shrink a List of Bools** + +```elm +list bool [True, False, False, True, False] == + [[],[False,True,False],[True,False,False],[False,False,True,False],[True,False,True,False],[True,False,True,False],[True,False,False,False],[True,False,False,True],[False,False,False,True,False],[True,False,False,False,False]] +``` + + +## Make your own shrinkers + +With `shrink`, it is very easy to make your own shrinkers for your own data +types. + +First of all, let's look at one of the basic shrinkers available in `shrink` +and how it is implemented. + +**Shrinker Bool** + +To shrink a `Bool`, you have to consider the possible values of `Bool`: `True` +and `False`. Intuitively, we understand that `False` is more "minimal" +than `True`. As, such, we would shrink `True` to `False`. As for `False`, +there is no value that is more "minimal" than `False`. As such, we simply +shrink it to the empty list. + +```elm +bool : Shrinker Bool +bool b = case b of + True -> False ::: empty + False -> empty +``` + +*Note that there is no "exact" rule to deciding on whether something is more +"minimal" than another.* The idea is that you want to have one case return +the empty list if possible while other cases move towards the more "minimal" +cases. In this example, we decided that `False` was the more "minimal" case and, +in a sense, moved `True` towards `False` since `False` then returns the empty +list. Obviously, this choice could have been reversed and you would be +justified in doing so. Just remember that *a value should never shrink to itself, +or shrink to something that (through any number of steps) shrinks back to itself.* +This is a recipe for an infinite loop. + +Now that we understand how to make a simple shrinker, let's see how we can use +these simple shrinkers together to make something that can shrink a more +complex data structure. + +**Shrinker Vector** + +Consider the following `Vector` type: + +```elm +type alias Vector = + { x : Float + , y : Float + , z : Float + } +``` + +Our goal is to produce a vector shrinker: + +```elm +vector : Shrinker Vector +``` + +`shrink` provides a basic `Float` shrinker and we can use it in combination +with `map` and `andMap` to make the `Vector` shrinker. + +```elm +vector : Shrinker Vector +vector {x, y, z} = + Vector + `map` float x + `andMap` float y + `andMap` float z +``` + +And voila! Super simple. Let's try this on an even larger structure. + + +**Shrinker Mario** + +Consider the following types: + +```elm +type alias Mario = + { position : Vector + , velocity : Vector + , direction : Direction + } + +type alias Vector = + { x : Float + , y : Float + } + +type Direction + = Left + | Right +``` + +And our goal is to produce a shrinker of Marios. + +```elm +mario : Shrinker Mario +``` + +To do this, we will split the steps. We can notice that we have two distinct +data types we need to shrink: `Vector` and `Direction`. + +For `Vector`, we can use the approach from the previous example: + +```elm +vector : Shrinker Vector +vector {x, y} = + Vector + `map` float x + `andMap` float y +``` + +And for `Direction`, we can apply a similar approach to our `Bool` example: + +```elm +direction : Shrinker Direction +direction dir = case dir of + Left -> empty + Right -> Left ::: empty +``` + +Where `Left` here is considered the "minimal" case. + + +Now, let's put these together: + +```elm +mario : Shrinker Mario +mario m = + Mario + `map` vector m.position + `andMap` vector m.velocity + `andMap` direction m.direction +``` + +And, yay! We now can shrink `Mario`! No mushrooms needed! + +### One more technique + +Sometimes, you want to shrink a data structure but you know intuitively that +it should shrink in a similar fashion to some other data structure. It would +be nice if you could just convert back and from that other data structure and +use its already existing shrinker. + +For example `List` and `Array`. + +In `shrink`, there exists a `List` shrinker: + +```elm +list : Shrinker a -> Shrinker (List a) +``` + +This shrinker is quite involved and does a number of things to shuffle elements, +shrink some elements, preserve others, etc... + +It would be nice if that can be re-used for arrays, because in a high-level +sense, arrays and lists are equivalent. + +This is exactly what `shrink` does and it uses a function called `convert`. + +```elm +convert : (a -> b) -> (b -> a) -> Shrinker a -> Shrinker b +``` + +`convert` converts a shrinker of a's into a shrinker of b's by taking a +two functions to convert to and from b's. + +**IMPORTANT NOTE: Both functions must be perfectly invertible or else this +process may create garbage!** + +By invertible, I mean that `f` and `g` are invertible **if and only if** + +```elm +f (g x) == g (f x) == x +``` + +**for all `x`.** + +Now we can very simply implement a shrinker of arrays as follows: + +```elm +array : Shrinker a -> Shrinker (Array a) +array shrinker = + convert (Array.fromList) (Array.toList) (list shrinker) +``` + +And, ta-da... 0 brain cells were used to get a shrinker on arrays. diff --git a/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/elm-package.json new file mode 100644 index 0000000..96f434c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/elm-package.json @@ -0,0 +1,18 @@ +{ + "version": "2.0.0", + "summary": "Library for authoring shrinking strategies", + "repository": "https://github.com/elm-community/shrink.git", + "license": "BSD-3-Clause", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Shrink" + ], + "dependencies": { + "elm-community/lazy-list": "1.0.0 <= v < 2.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/lazy": "2.0.0 <= v < 3.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/src/Shrink.elm b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/src/Shrink.elm new file mode 100644 index 0000000..2439716 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-community/shrink/2.0.0/src/Shrink.elm @@ -0,0 +1,467 @@ +module Shrink exposing (Shrinker, shrink, noShrink, unit, bool, order, int, atLeastInt, float, atLeastFloat, char, atLeastChar, character, string, maybe, result, list, lazylist, array, tuple, tuple3, tuple4, tuple5, convert, keepIf, dropIf, merge, map, andMap) + +{-| Library containing a collection of basic shrinking strategies and +helper functions to help you construct shrinking strategies. + +# Shrinking Basics +@docs Shrinker, shrink + +# Shrinkers +@docs noShrink, unit, bool, order, int, atLeastInt, float, atLeastFloat, char, atLeastChar, character, string, maybe, result, lazylist, list, array, tuple, tuple3, tuple4, tuple5 + +# Functions on Shrinkers +@docs convert, keepIf, dropIf, merge, map, andMap + +-} + +import Lazy.List exposing (LazyList, (:::), (+++), empty) +import Lazy exposing (Lazy, force, lazy) +import List +import Array exposing (Array) +import Char +import String + + +{-| The shrinker type. +A shrinker is a function that takes a value and returns a list of values that +are in some sense "smaller" than the given value. If there are no such values +conceptually, then the shrinker should just return the empty list. +-} +type alias Shrinker a = + a -> LazyList a + + +{-| Perform shrinking. Takes a predicate that returns `True` if you want +shrinking to continue (e.g. the test failed). Also takes a shrinker and a value +to shrink. It returns the shrunken value, or the input value if no shrunken +values that satisfy the predicate are found. +-} +shrink : (a -> Bool) -> Shrinker a -> a -> a +shrink keepShrinking shrinker originalVal = + let + helper lazyList val = + case force lazyList of + Lazy.List.Nil -> + val + + Lazy.List.Cons head tail -> + if keepShrinking head then + helper (shrinker head) head + else + helper tail val + in + helper (shrinker originalVal) originalVal + + +{-| Perform no shrinking. Equivalent to the empty lazy list. +-} +noShrink : Shrinker a +noShrink _ = + empty + + +{-| Shrink the empty tuple. Equivalent to `noShrink`. +-} +unit : Shrinker () +unit = + noShrink + + +{-| Shrinker of bools. +-} +bool : Shrinker Bool +bool b = + case b of + True -> + False ::: empty + + False -> + empty + + +{-| Shrinker of `Order` values. +-} +order : Shrinker Order +order o = + case o of + GT -> + EQ ::: LT ::: empty + + LT -> + EQ ::: empty + + EQ -> + empty + + +{-| Shrinker of integers. +-} +int : Shrinker Int +int n = + if n < 0 then + -n ::: Lazy.List.map ((*) -1) (seriesInt 0 -n) + else + seriesInt 0 n + + +{-| Construct a shrinker of ints which considers the given int to +be most minimal. +-} +atLeastInt : Int -> Shrinker Int +atLeastInt min n = + if n < 0 && n >= min then + -n ::: Lazy.List.map ((*) -1) (seriesInt 0 -n) + else + seriesInt (max 0 min) n + + +{-| Shrinker of floats. +-} +float : Shrinker Float +float n = + if n < 0 then + -n ::: Lazy.List.map ((*) -1) (seriesFloat 0 -n) + else + seriesFloat 0 n + + +{-| Construct a shrinker of floats which considers the given float to +be most minimal. +-} +atLeastFloat : Float -> Shrinker Float +atLeastFloat min n = + if n < 0 && n >= min then + -n ::: Lazy.List.map ((*) -1) (seriesFloat 0 -n) + else + seriesFloat (max 0 min) n + + +{-| Shrinker of chars. +-} +char : Shrinker Char +char = + convert Char.fromCode Char.toCode int + + +{-| Construct a shrinker of chars which considers the given char to +be most minimal. +-} +atLeastChar : Char -> Shrinker Char +atLeastChar char = + convert Char.fromCode Char.toCode (atLeastInt (Char.toCode char)) + + +{-| Shrinker of chars which considers the empty space as the most +minimal char and omits the control key codes. + +Equivalent to: + + atLeastChar (Char.fromCode 32) +-} +character : Shrinker Char +character = + atLeastChar (Char.fromCode 32) + + +{-| Shrinker of strings. Considers the empty string to be the most +minimal string and the space to be the most minimal char. + +Equivalent to: + + convert String.fromList String.toList (list character) +-} +string : Shrinker String +string = + convert String.fromList String.toList (list character) + + +{-| Maybe shrinker constructor. +Takes a shrinker of values and returns a shrinker of Maybes. +-} +maybe : Shrinker a -> Shrinker (Maybe a) +maybe shrink m = + case m of + Just a -> + Nothing ::: Lazy.List.map Just (shrink a) + + Nothing -> + empty + + +{-| Result shrinker constructor. Takes a shrinker of errors and a shrinker of +values and returns a shrinker of Results. +-} +result : Shrinker error -> Shrinker value -> Shrinker (Result error value) +result shrinkError shrinkValue r = + case r of + Ok value -> + Lazy.List.map Ok (shrinkValue value) + + Err error -> + Lazy.List.map Err (shrinkError error) + + +{-| Lazy List shrinker constructor. Takes a shrinker of values and returns a +shrinker of Lazy Lists. The lazy list being shrunk must be finite. (I mean +really, how do you shrink infinity?) +-} +lazylist : Shrinker a -> Shrinker (LazyList a) +lazylist shrink l = + lazy <| + \() -> + let + n : Int + n = + Lazy.List.length l + + shrinkOne : LazyList a -> LazyList (LazyList a) + shrinkOne l = + lazy <| + \() -> + case force l of + Lazy.List.Nil -> + force empty + + Lazy.List.Cons x xs -> + force + (Lazy.List.map (flip (:::) xs) (shrink x) + +++ Lazy.List.map ((:::) x) (shrinkOne xs) + ) + + removes : Int -> Int -> Shrinker (LazyList a) + removes k n l = + lazy <| + \() -> + if k > n then + force empty + else if Lazy.List.isEmpty l then + force (empty ::: empty) + else + let + first = + Lazy.List.take k l + + rest = + Lazy.List.drop k l + in + force <| + rest + ::: Lazy.List.map ((+++) first) (removes k (n - k) rest) + in + force <| + Lazy.List.andThen (\k -> removes k n l) + (Lazy.List.takeWhile (\x -> x > 0) (Lazy.List.iterate (\n -> n // 2) n)) + +++ shrinkOne l + + +{-| List shrinker constructor. +Takes a shrinker of values and returns a shrinker of Lists. +-} +list : Shrinker a -> Shrinker (List a) +list shrink = + convert Lazy.List.toList Lazy.List.fromList (lazylist shrink) + + +{-| Array shrinker constructor. +Takes a shrinker of values and returns a shrinker of Arrays. +-} +array : Shrinker a -> Shrinker (Array a) +array shrink = + convert Lazy.List.toArray Lazy.List.fromArray (lazylist shrink) + + +{-| 2-Tuple shrinker constructor. +Takes a tuple of shrinkers and returns a shrinker of tuples. +-} +tuple : ( Shrinker a, Shrinker b ) -> Shrinker ( a, b ) +tuple ( shrinkA, shrinkB ) ( a, b ) = + Lazy.List.map ((,) a) (shrinkB b) + +++ Lazy.List.map (flip (,) b) (shrinkA a) + +++ Lazy.List.map2 (,) (shrinkA a) (shrinkB b) + + +{-| 3-Tuple shrinker constructor. +Takes a tuple of shrinkers and returns a shrinker of tuples. +-} +tuple3 : ( Shrinker a, Shrinker b, Shrinker c ) -> Shrinker ( a, b, c ) +tuple3 ( shrinkA, shrinkB, shrinkC ) ( a, b, c ) = + Lazy.List.map (\c -> ( a, b, c )) (shrinkC c) + +++ Lazy.List.map (\b -> ( a, b, c )) (shrinkB b) + +++ Lazy.List.map (\a -> ( a, b, c )) (shrinkA a) + +++ Lazy.List.map2 (\b c -> ( a, b, c )) (shrinkB b) (shrinkC c) + +++ Lazy.List.map2 (\a c -> ( a, b, c )) (shrinkA a) (shrinkC c) + +++ Lazy.List.map2 (\a b -> ( a, b, c )) (shrinkA a) (shrinkB b) + +++ Lazy.List.map3 (,,) (shrinkA a) (shrinkB b) (shrinkC c) + + +{-| 4-Tuple shrinker constructor. +Takes a tuple of shrinkers and returns a shrinker of tuples. +-} +tuple4 : ( Shrinker a, Shrinker b, Shrinker c, Shrinker d ) -> Shrinker ( a, b, c, d ) +tuple4 ( shrinkA, shrinkB, shrinkC, shrinkD ) ( a, b, c, d ) = + Lazy.List.map (\d -> ( a, b, c, d )) (shrinkD d) + +++ Lazy.List.map (\c -> ( a, b, c, d )) (shrinkC c) + +++ Lazy.List.map (\b -> ( a, b, c, d )) (shrinkB b) + +++ Lazy.List.map (\a -> ( a, b, c, d )) (shrinkA a) + +++ Lazy.List.map2 (\c d -> ( a, b, c, d )) (shrinkC c) (shrinkD d) + +++ Lazy.List.map2 (\b d -> ( a, b, c, d )) (shrinkB b) (shrinkD d) + +++ Lazy.List.map2 (\a d -> ( a, b, c, d )) (shrinkA a) (shrinkD d) + +++ Lazy.List.map2 (\b c -> ( a, b, c, d )) (shrinkB b) (shrinkC c) + +++ Lazy.List.map2 (\a c -> ( a, b, c, d )) (shrinkA a) (shrinkC c) + +++ Lazy.List.map2 (\a b -> ( a, b, c, d )) (shrinkA a) (shrinkB b) + +++ Lazy.List.map3 (\b c d -> ( a, b, c, d )) (shrinkB b) (shrinkC c) (shrinkD d) + +++ Lazy.List.map3 (\a c d -> ( a, b, c, d )) (shrinkA a) (shrinkC c) (shrinkD d) + +++ Lazy.List.map3 (\a b d -> ( a, b, c, d )) (shrinkA a) (shrinkB b) (shrinkD d) + +++ Lazy.List.map3 (\a b c -> ( a, b, c, d )) (shrinkA a) (shrinkB b) (shrinkC c) + +++ Lazy.List.map4 (,,,) (shrinkA a) (shrinkB b) (shrinkC c) (shrinkD d) + + +{-| 5-Tuple shrinker constructor. +Takes a tuple of shrinkers and returns a shrinker of tuples. +-} +tuple5 : ( Shrinker a, Shrinker b, Shrinker c, Shrinker d, Shrinker e ) -> Shrinker ( a, b, c, d, e ) +tuple5 ( shrinkA, shrinkB, shrinkC, shrinkD, shrinkE ) ( a, b, c, d, e ) = + Lazy.List.map (\e -> ( a, b, c, d, e )) (shrinkE e) + +++ Lazy.List.map (\d -> ( a, b, c, d, e )) (shrinkD d) + +++ Lazy.List.map (\c -> ( a, b, c, d, e )) (shrinkC c) + +++ Lazy.List.map (\b -> ( a, b, c, d, e )) (shrinkB b) + +++ Lazy.List.map (\a -> ( a, b, c, d, e )) (shrinkA a) + +++ Lazy.List.map2 (\d e -> ( a, b, c, d, e )) (shrinkD d) (shrinkE e) + +++ Lazy.List.map2 (\c e -> ( a, b, c, d, e )) (shrinkC c) (shrinkE e) + +++ Lazy.List.map2 (\b e -> ( a, b, c, d, e )) (shrinkB b) (shrinkE e) + +++ Lazy.List.map2 (\a e -> ( a, b, c, d, e )) (shrinkA a) (shrinkE e) + +++ Lazy.List.map2 (\c d -> ( a, b, c, d, e )) (shrinkC c) (shrinkD d) + +++ Lazy.List.map2 (\b d -> ( a, b, c, d, e )) (shrinkB b) (shrinkD d) + +++ Lazy.List.map2 (\a d -> ( a, b, c, d, e )) (shrinkA a) (shrinkD d) + +++ Lazy.List.map2 (\b c -> ( a, b, c, d, e )) (shrinkB b) (shrinkC c) + +++ Lazy.List.map2 (\a c -> ( a, b, c, d, e )) (shrinkA a) (shrinkC c) + +++ Lazy.List.map2 (\a b -> ( a, b, c, d, e )) (shrinkA a) (shrinkB b) + +++ Lazy.List.map3 (\a b c -> ( a, b, c, d, e )) (shrinkA a) (shrinkB b) (shrinkC c) + +++ Lazy.List.map3 (\a b d -> ( a, b, c, d, e )) (shrinkA a) (shrinkB b) (shrinkD d) + +++ Lazy.List.map3 (\a c d -> ( a, b, c, d, e )) (shrinkA a) (shrinkC c) (shrinkD d) + +++ Lazy.List.map3 (\b c d -> ( a, b, c, d, e )) (shrinkB b) (shrinkC c) (shrinkD d) + +++ Lazy.List.map3 (\a b e -> ( a, b, c, d, e )) (shrinkA a) (shrinkB b) (shrinkE e) + +++ Lazy.List.map3 (\a c e -> ( a, b, c, d, e )) (shrinkA a) (shrinkC c) (shrinkE e) + +++ Lazy.List.map3 (\b c e -> ( a, b, c, d, e )) (shrinkB b) (shrinkC c) (shrinkE e) + +++ Lazy.List.map3 (\a d e -> ( a, b, c, d, e )) (shrinkA a) (shrinkD d) (shrinkE e) + +++ Lazy.List.map3 (\b d e -> ( a, b, c, d, e )) (shrinkB b) (shrinkD d) (shrinkE e) + +++ Lazy.List.map3 (\c d e -> ( a, b, c, d, e )) (shrinkC c) (shrinkD d) (shrinkE e) + +++ Lazy.List.map4 (\b c d e -> ( a, b, c, d, e )) (shrinkB b) (shrinkC c) (shrinkD d) (shrinkE e) + +++ Lazy.List.map4 (\a c d e -> ( a, b, c, d, e )) (shrinkA a) (shrinkC c) (shrinkD d) (shrinkE e) + +++ Lazy.List.map4 (\a b d e -> ( a, b, c, d, e )) (shrinkA a) (shrinkB b) (shrinkD d) (shrinkE e) + +++ Lazy.List.map4 (\a b c d -> ( a, b, c, d, e )) (shrinkA a) (shrinkB b) (shrinkC c) (shrinkD d) + +++ Lazy.List.map5 (,,,,) (shrinkA a) (shrinkB b) (shrinkC c) (shrinkD d) (shrinkE e) + + + +---------------------- +-- HELPER FUNCTIONS -- +---------------------- + + +{-| Convert a Shrinker of a's into a Shrinker of b's using two inverse functions. + +If you use this function as follows: + + shrinkerB = f g shrinkerA + +Make sure that + + `f(g(x)) == x` for all x + +Or else this process will generate garbage. +-} +convert : (a -> b) -> (b -> a) -> Shrinker a -> Shrinker b +convert f g shrink b = + Lazy.List.map f (shrink (g b)) + + +{-| Filter out the results of a shrinker. The resulting shrinker +will only produce shrinks which satisfy the given predicate. +-} +keepIf : (a -> Bool) -> Shrinker a -> Shrinker a +keepIf predicate shrink a = + Lazy.List.keepIf predicate (shrink a) + + +{-| Filter out the results of a shrinker. The resulting shrinker +will only throw away shrinks which satisfy the given predicate. +-} +dropIf : (a -> Bool) -> Shrinker a -> Shrinker a +dropIf predicate = + keepIf (not << predicate) + + +{-| Merge two shrinkers. Generates all the values in the first +shrinker, and then all the non-duplicated values in the second +shrinker. +-} +merge : Shrinker a -> Shrinker a -> Shrinker a +merge shrink1 shrink2 a = + Lazy.List.unique (shrink1 a +++ shrink2 a) + + +{-| Re-export of `Lazy.List.map` +This is useful in order to compose shrinkers, especially when used in +conjunction with `andMap`. For example: + + type alias Vector = + { x : Float + , y : Float + , z : Float + } + + vector : Shrinker Vector + vector {x,y,z} = + Vector + `map` float x + `andMap` float y + `andMap` float z +-} +map : (a -> b) -> LazyList a -> LazyList b +map = + Lazy.List.map + + +{-| Apply a lazy list of functions on a lazy list of values. + +The argument order is so that it is easy to use in `|>` chains. +-} +andMap : LazyList a -> LazyList (a -> b) -> LazyList b +andMap = + Lazy.List.andMap + + + +----------------------- +-- PRIVATE FUNCTIONS -- +----------------------- + + +seriesInt : Int -> Int -> LazyList Int +seriesInt low high = + if low >= high then + empty + else if low == high - 1 then + low ::: empty + else + let + low_ = + low + ((high - low) // 2) + in + low ::: seriesInt low_ high + + +seriesFloat : Float -> Float -> LazyList Float +seriesFloat low high = + if low >= high - 0.0001 then + if high /= 0.000001 then + Lazy.List.singleton (low + 0.000001) + else + empty + else + let + low_ = + low + ((high - low) / 2) + in + low ::: seriesFloat low_ high diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.eslintrc b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.eslintrc new file mode 100644 index 0000000..169879a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.eslintrc @@ -0,0 +1,156 @@ +{ + "parser": "babel-eslint", // https://github.com/babel/babel-eslint + "plugins": [], + "env": { // http://eslint.org/docs/user-guide/configuring.html#specifying-environments + "browser": true, // browser global variables + "node": true // Node.js global variables and Node.js-specific rules + }, + "ecmaFeatures": { + "arrowFunctions": true, + "blockBindings": true, + "classes": true, + "defaultParams": true, + "destructuring": true, + "forOf": true, + "generators": false, + "modules": true, + "objectLiteralComputedProperties": true, + "objectLiteralDuplicateProperties": false, + "objectLiteralShorthandMethods": true, + "objectLiteralShorthandProperties": true, + "spread": true, + "superInFunctions": true, + "templateStrings": true, + }, + "rules": { +/** + * Strict mode + */ + // babel inserts "use strict"; for us + "strict": [2, "never"], // http://eslint.org/docs/rules/strict + +/** + * Variables + */ + "no-shadow": 2, // http://eslint.org/docs/rules/no-shadow + "no-shadow-restricted-names": 2, // http://eslint.org/docs/rules/no-shadow-restricted-names + "no-unused-vars": [2, { // http://eslint.org/docs/rules/no-unused-vars + "vars": "local", + "args": "after-used" + }], + "no-use-before-define": 2, // http://eslint.org/docs/rules/no-use-before-define + +/** + * Possible errors + */ + "no-cond-assign": [2, "always"], // http://eslint.org/docs/rules/no-cond-assign + "no-console": 1, // http://eslint.org/docs/rules/no-console + "no-debugger": 1, // http://eslint.org/docs/rules/no-debugger + "no-alert": 1, // http://eslint.org/docs/rules/no-alert + "no-constant-condition": 1, // http://eslint.org/docs/rules/no-constant-condition + "no-dupe-keys": 2, // http://eslint.org/docs/rules/no-dupe-keys + "no-duplicate-case": 2, // http://eslint.org/docs/rules/no-duplicate-case + "no-empty": 2, // http://eslint.org/docs/rules/no-empty + "no-ex-assign": 2, // http://eslint.org/docs/rules/no-ex-assign + "no-extra-boolean-cast": 0, // http://eslint.org/docs/rules/no-extra-boolean-cast + "no-extra-semi": 2, // http://eslint.org/docs/rules/no-extra-semi + "no-func-assign": 2, // http://eslint.org/docs/rules/no-func-assign + "no-inner-declarations": 2, // http://eslint.org/docs/rules/no-inner-declarations + "no-invalid-regexp": 2, // http://eslint.org/docs/rules/no-invalid-regexp + "no-irregular-whitespace": 2, // http://eslint.org/docs/rules/no-irregular-whitespace + "no-obj-calls": 2, // http://eslint.org/docs/rules/no-obj-calls + "no-sparse-arrays": 2, // http://eslint.org/docs/rules/no-sparse-arrays + "no-unreachable": 2, // http://eslint.org/docs/rules/no-unreachable + "use-isnan": 2, // http://eslint.org/docs/rules/use-isnan + "block-scoped-var": 2, // http://eslint.org/docs/rules/block-scoped-var + +/** + * Best practices + */ + "consistent-return": 2, // http://eslint.org/docs/rules/consistent-return + "curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly + "default-case": 2, // http://eslint.org/docs/rules/default-case + "dot-notation": [2, { // http://eslint.org/docs/rules/dot-notation + "allowKeywords": true + }], + "eqeqeq": 2, // http://eslint.org/docs/rules/eqeqeq + "max-len": [2, 100, 4], + "guard-for-in": 2, // http://eslint.org/docs/rules/guard-for-in + "no-caller": 2, // http://eslint.org/docs/rules/no-caller + "no-else-return": 2, // http://eslint.org/docs/rules/no-else-return + "no-eq-null": 2, // http://eslint.org/docs/rules/no-eq-null + "no-eval": 2, // http://eslint.org/docs/rules/no-eval + "no-extend-native": 2, // http://eslint.org/docs/rules/no-extend-native + "no-extra-bind": 2, // http://eslint.org/docs/rules/no-extra-bind + "no-fallthrough": 2, // http://eslint.org/docs/rules/no-fallthrough + "no-floating-decimal": 2, // http://eslint.org/docs/rules/no-floating-decimal + "no-implied-eval": 2, // http://eslint.org/docs/rules/no-implied-eval + "no-lone-blocks": 2, // http://eslint.org/docs/rules/no-lone-blocks + "no-loop-func": 2, // http://eslint.org/docs/rules/no-loop-func + "no-multi-str": 2, // http://eslint.org/docs/rules/no-multi-str + "no-native-reassign": 2, // http://eslint.org/docs/rules/no-native-reassign + "no-new": 2, // http://eslint.org/docs/rules/no-new + "no-new-func": 2, // http://eslint.org/docs/rules/no-new-func + "no-new-wrappers": 2, // http://eslint.org/docs/rules/no-new-wrappers + "no-octal": 2, // http://eslint.org/docs/rules/no-octal + "no-octal-escape": 2, // http://eslint.org/docs/rules/no-octal-escape + "no-param-reassign": 2, // http://eslint.org/docs/rules/no-param-reassign + "no-proto": 2, // http://eslint.org/docs/rules/no-proto + "no-redeclare": 2, // http://eslint.org/docs/rules/no-redeclare + "no-return-assign": 2, // http://eslint.org/docs/rules/no-return-assign + "no-script-url": 2, // http://eslint.org/docs/rules/no-script-url + "no-self-compare": 2, // http://eslint.org/docs/rules/no-self-compare + "no-sequences": 2, // http://eslint.org/docs/rules/no-sequences + "no-throw-literal": 2, // http://eslint.org/docs/rules/no-throw-literal + "no-with": 2, // http://eslint.org/docs/rules/no-with + "radix": 2, // http://eslint.org/docs/rules/radix + "wrap-iife": [2, "any"], // http://eslint.org/docs/rules/wrap-iife + "yoda": 2, // http://eslint.org/docs/rules/yoda + +/** + * Style + */ + "indent": [2, "tab"], // http://eslint.org/docs/rules/indent + "quotes": [ + 2, "single", "avoid-escape" // http://eslint.org/docs/rules/quotes + ], + "camelcase": [2, { // http://eslint.org/docs/rules/camelcase + "properties": "never" + }], + "comma-spacing": [2, { // http://eslint.org/docs/rules/comma-spacing + "before": false, + "after": true + }], + "comma-style": [2, "last"], // http://eslint.org/docs/rules/comma-style + "eol-last": 2, // http://eslint.org/docs/rules/eol-last + "func-names": 1, // http://eslint.org/docs/rules/func-names + "key-spacing": [2, { // http://eslint.org/docs/rules/key-spacing + "beforeColon": false, + "afterColon": true + }], + "no-multiple-empty-lines": [2, { // http://eslint.org/docs/rules/no-multiple-empty-lines + "max": 2 + }], + "no-nested-ternary": 2, // http://eslint.org/docs/rules/no-nested-ternary + "no-new-object": 2, // http://eslint.org/docs/rules/no-new-object + "no-spaced-func": 2, // http://eslint.org/docs/rules/no-spaced-func + "no-trailing-spaces": 2, // http://eslint.org/docs/rules/no-trailing-spaces + "no-extra-parens": [2, "functions"], // http://eslint.org/docs/rules/no-extra-parens + "no-underscore-dangle": 0, // http://eslint.org/docs/rules/no-underscore-dangle + "padded-blocks": [2, "never"], // http://eslint.org/docs/rules/padded-blocks + "semi": [2, "always"], // http://eslint.org/docs/rules/semi + "semi-spacing": [2, { // http://eslint.org/docs/rules/semi-spacing + "before": false, + "after": true + }], + "space-after-keywords": 2, // http://eslint.org/docs/rules/space-after-keywords + "space-before-blocks": 2, // http://eslint.org/docs/rules/space-before-blocks + "space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren + "space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops + "space-return-throw-case": 2, // http://eslint.org/docs/rules/space-return-throw-case + "spaced-comment": [2, "always", {// http://eslint.org/docs/rules/spaced-comment + "exceptions": ["-", "+"], + "markers": ["=", "!"] // space here to support sprockets directives + }] + } +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.gitignore new file mode 100644 index 0000000..92d5be2 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.gitignore @@ -0,0 +1,2 @@ +elm-stuff +tests/test.js \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.travis.yml b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.travis.yml new file mode 100644 index 0000000..3f65ed0 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/.travis.yml @@ -0,0 +1,8 @@ +sudo: false # force container-based infrastructure +language: node_js +node_js: + - "4.3" +install: + - npm install -g elm@0.17 +script: + - bash tests/run-tests.sh diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/CONTRIBUTING.md b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/CONTRIBUTING.md new file mode 100644 index 0000000..99b54d6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/CONTRIBUTING.md @@ -0,0 +1,41 @@ +# Contributing to the core libraries + +Thanks helping with the development of Elm! This document describes the basic +standards for opening pull requests and making the review process as smooth as +possible. + +## Ground rules + + * Always make pull requests minimal. If it can be split up, it should be split up. + * Use style consistent with the file you are modifying. + * Use descriptive titles for PRs + * Provide all the necessary context for evaluation in the PR. + If there are relevant issues or examples or discussions, add them. + If things can be summarized, summarize them. The easiest PRs are ones + that already address the reviewers questions and concerns. + +## Documentation Fixes + +If you want to fix docs, just open a PR. This is super helpful! + +## Bug Fixes + +If you find an issue or see one you want to work on, go for it! + +The best strategy is often to dive in. Asking for directions usually +does not work. If someone knew the specifics and knew how how to fix +it, it is likely they would have already sent the PR themselves! + +Also, be sure you are testing. + +## Adding New Functions + +We are fairly conservative about adding new functions to core libraries. +If you want to augment the `List` or `Array` library, we recommend creating +small packages called `list-extras` or `array-extras` that have all the +features you want. + +Long term, we will set up a process to review `*-extras` packages to move +stuff into core. By going through packages, it will be much easier to assess +whether a function is pleasant and useful in practice before committing to it +in the core libraries. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/LICENSE b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/LICENSE new file mode 100644 index 0000000..e0419a4 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2014-present, Evan Czaplicki + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Evan Czaplicki nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/README.md b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/README.md new file mode 100644 index 0000000..07c3f6e --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/README.md @@ -0,0 +1,34 @@ +# Elm Core Libraries + +[![Build Status](https://travis-ci.org/elm-lang/core.svg?branch=master)](https://travis-ci.org/elm-lang/core) + +Every Elm project needs the core libraries. They provide basic functionality including: + + * The Basics — addition, subtraction, etc. + * Data Structures — lists, dictionaries, sets, etc. + + +## Default Imports + +All Elm files have some default imports: + +```elm +import Basics exposing (..) +import List exposing ( List, (::) ) +import Maybe exposing ( Maybe( Just, Nothing ) ) +import Result exposing ( Result( Ok, Err ) ) +import String +import Tuple + +import Debug + +import Platform exposing ( Program ) +import Platform.Cmd exposing ( Cmd, (!) ) +import Platform.Sub exposing ( Sub ) +``` + +The intention is to include things that are both extremely useful and very +unlikely to overlap with anything that anyone will ever write in a library. +By keeping the set of default imports small, it also becomes easier to use +whatever version of `map` suits your fancy. Finally, it makes it easier to +figure out where the heck a function is coming from. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/changelog.md b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/changelog.md new file mode 100644 index 0000000..9781f2c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/changelog.md @@ -0,0 +1,143 @@ +# 0.15 + +### Syntax + +New `import` syntax with keyword `exposing`. + +### Module Changes + + * Move `Http` to `elm-http` package and totally redo API + * Remove `WebSocket` module + * Add `Task` module + +### Channels become Mailboxes + +`Graphics.Input` now works with this API (from module `Signal`): + +```elm +type alias Mailbox a = { address : Address a, signal : Signal a } + +mailbox : a -> Mailbox a +``` + +You can then send messages to the `Address` with functions like `Signal.send` +and `Signal.message`, or create forwarding addresses with `Signal.forwardTo`. + +### Text in Collages + +`Graphics.Collage` now has two new functions: + +```elm +text : Text -> Form +outlinedText : LineStyle -> Text -> Form +``` + +These functions render text with the canvas, making things quite a bit faster. +The underlying implementation of `Text` has also been improved dramatically. + +### Miscellaneous + + * Change types of `head`, `tail`, `maximum`, `minimum` by wrapping output in `Maybe` + * Move `leftAligned`, `centered`, `rightAligned` from `Text` to `Graphics.Element` + * Move `asText` from `Text` to `Graphics.Element`, renaming it to `show` in the process + * Remove `Text.plainText` (can be replaced by `Graphics.Element.leftAligned << Text.fromString`) + * Change type of `Keyboard.keysDown` from `Signal (List KeyCode)` to `Signal (Set KeyCode)` + * Remove `Keyboard.directions` + * Rename `Keyboard.lastPressed` to `Keyboard.presses` + + +# 0.14 + +### Syntax + + * Keyword `type` becomes `type alias` + * Keyword `data` becomes `type` + * Remove special list syntax in types, so `[a]` becomes `List a` + + +### Reduce Default Imports + +The set of default imports has been reduced to the following: + +```haskell +import Basics (..) +import Maybe ( Maybe( Just, Nothing ) ) +import Result ( Result( Ok, Err ) ) +import List ( List ) +import Signal ( Signal ) +``` + +### Make JSON parsing easy + + * Added `Json.Decode` and `Json.Encode` libraries + + +### Use more natural names + + * Rename `String.show` to `String.toString` + + * Replace `List.zip` with `List.map2 (,)` + * Replace `List.zipWith f` with `List.map2 f` + + * Rename `Signal.liftN` to `Signal.mapN` + * Rename `Signal.merges` to `Signal.mergeMany` + + +### Simplify Signal Library + + * Revamp `Input` concept as `Signal.Channel` + * Remove `Signal.count` + * Remove `Signal.countIf` + * Remove `Signal.combine` + + +### Randomness Done Right + + * No longer signal-based + * Use a `Generator` to create random values + + + +### Revamp Maybes and Error Handling + + * Add the following functions to `Maybe` + + withDefault : a -> Maybe a -> a + oneOf : List (Maybe a) -> Maybe a + map : (a -> b) -> Maybe a -> Maybe b + andThen : Maybe a -> (a -> Maybe b) -> Maybe b + + * Remove `Maybe.maybe` so `maybe 0 sqrt Nothing` becomes `withDefault 0 (map sqrt Nothing)` + + * Remove `Maybe.isJust` and `Maybe.isNothing` in favor of pattern matching + + * Add `Result` library for proper error handling. This is for cases when + you want a computation to succeed, but if there is a mistake, it should + produce a nice error message. + + * Remove `Either` in favor of `Result` or custom union types + + * Revamp functions that result in a `Maybe`. + + - Remove `Dict.getOrElse` and `Dict.getOrFail` in favor of `withDefault 0 (Dict.get key dict)` + - Remove `Array.getOrElse` and `Array.getOrFail` in favor of `withDefault 0 (Array.get index array)` + - Change `String.toInt : String -> Maybe Int` to `String.toInt : String -> Result String Int` + - Change `String.toFloat : String -> Maybe Float` to `String.toFloat : String -> Result String Float` + + +### Make appending more logical + + * Add the following functions to `Text`: + + empty : Text + append : Text -> Text -> Text + concat : [Text] -> Text + join : Text -> [Text] -> Text + + * Make the following changes in `List`: + - Replace `(++)` with `append` + - Remove `join` + +### Miscellaneous + + * Rename `Text.toText` to `Text.fromString` diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/elm-package.json new file mode 100644 index 0000000..486d9b9 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/elm-package.json @@ -0,0 +1,38 @@ +{ + "version": "5.0.0", + "summary": "Elm's standard libraries", + "repository": "http://github.com/elm-lang/core.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Array", + "Basics", + "Bitwise", + "Char", + "Color", + "Date", + "Debug", + "Dict", + "Json.Decode", + "Json.Encode", + "List", + "Maybe", + "Platform", + "Platform.Cmd", + "Platform.Sub", + "Process", + "Random", + "Regex", + "Result", + "Set", + "String", + "Task", + "Time", + "Tuple" + ], + "native-modules": true, + "dependencies": {}, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Array.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Array.elm new file mode 100644 index 0000000..a5a3233 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Array.elm @@ -0,0 +1,240 @@ +module Array exposing + ( Array + , empty, repeat, initialize, fromList + , isEmpty, length, push, append + , get, set + , slice, toList, toIndexedList + , map, indexedMap, filter, foldl, foldr + ) + +{-| A library for fast immutable arrays. The elements in an array must have the +same type. The arrays are implemented in Relaxed Radix Balanced-Trees for fast +reads, updates, and appends. + +# Arrays +@docs Array + +# Creating Arrays +@docs empty, repeat, initialize, fromList + +# Basics +@docs isEmpty, length, push, append + +# Get and Set +@docs get, set + +# Taking Arrays Apart +@docs slice, toList, toIndexedList + +# Mapping, Filtering, and Folding +@docs map, indexedMap, filter, foldl, foldr +-} + +import Native.Array +import Basics exposing (..) +import Maybe exposing (..) +import List + + +{-| Representation of fast immutable arrays. You can create arrays of integers +(`Array Int`) or strings (`Array String`) or any other type of value you can +dream up. +-} +type Array a = Array + + +{-| Initialize an array. `initialize n f` creates an array of length `n` with +the element at index `i` initialized to the result of `(f i)`. + + initialize 4 identity == fromList [0,1,2,3] + initialize 4 (\n -> n*n) == fromList [0,1,4,9] + initialize 4 (always 0) == fromList [0,0,0,0] +-} +initialize : Int -> (Int -> a) -> Array a +initialize = + Native.Array.initialize + + +{-| Creates an array with a given length, filled with a default element. + + repeat 5 0 == fromList [0,0,0,0,0] + repeat 3 "cat" == fromList ["cat","cat","cat"] + +Notice that `repeat 3 x` is the same as `initialize 3 (always x)`. +-} +repeat : Int -> a -> Array a +repeat n e = + initialize n (always e) + + +{-| Create an array from a list. +-} +fromList : List a -> Array a +fromList = + Native.Array.fromList + + +{-| Create a list of elements from an array. + + toList (fromList [3,5,8]) == [3,5,8] +-} +toList : Array a -> List a +toList = + Native.Array.toList + + +-- TODO: make this a native function. +{-| Create an indexed list from an array. Each element of the array will be +paired with its index. + + toIndexedList (fromList ["cat","dog"]) == [(0,"cat"), (1,"dog")] +-} +toIndexedList : Array a -> List (Int, a) +toIndexedList array = + List.map2 + (,) + (List.range 0 (Native.Array.length array - 1)) + (Native.Array.toList array) + + +{-| Apply a function on every element in an array. + + map sqrt (fromList [1,4,9]) == fromList [1,2,3] +-} +map : (a -> b) -> Array a -> Array b +map = + Native.Array.map + + +{-| Apply a function on every element with its index as first argument. + + indexedMap (*) (fromList [5,5,5]) == fromList [0,5,10] +-} +indexedMap : (Int -> a -> b) -> Array a -> Array b +indexedMap = + Native.Array.indexedMap + + +{-| Reduce an array from the left. Read `foldl` as “fold from the left”. + + foldl (::) [] (fromList [1,2,3]) == [3,2,1] +-} +foldl : (a -> b -> b) -> b -> Array a -> b +foldl = + Native.Array.foldl + + +{-| Reduce an array from the right. Read `foldr` as “fold from the right”. + + foldr (+) 0 (repeat 3 5) == 15 +-} +foldr : (a -> b -> b) -> b -> Array a -> b +foldr = + Native.Array.foldr + + +{-| Keep only elements that satisfy the predicate: + + filter isEven (fromList [1..6]) == (fromList [2,4,6]) +-} +filter : (a -> Bool) -> Array a -> Array a +filter isOkay arr = + let + update x xs = + if isOkay x then + Native.Array.push x xs + else + xs + in + Native.Array.foldl update Native.Array.empty arr + +{-| Return an empty array. + + length empty == 0 +-} +empty : Array a +empty = + Native.Array.empty + + +{-| Push an element to the end of an array. + + push 3 (fromList [1,2]) == fromList [1,2,3] +-} +push : a -> Array a -> Array a +push = + Native.Array.push + + +{-| Return Just the element at the index or Nothing if the index is out of range. + + get 0 (fromList [0,5,3]) == Just 0 + get 2 (fromList [0,5,3]) == Just 3 + get 5 (fromList [0,5,3]) == Nothing + get -1 (fromList [0,5,3]) == Nothing + +-} +get : Int -> Array a -> Maybe a +get i array = + if 0 <= i && i < Native.Array.length array then + Just (Native.Array.get i array) + else + Nothing + + +{-| Set the element at a particular index. Returns an updated array. +If the index is out of range, the array is unaltered. + + set 1 7 (fromList [1,2,3]) == fromList [1,7,3] +-} +set : Int -> a -> Array a -> Array a +set = + Native.Array.set + + +{-| Get a sub-section of an array: `(slice start end array)`. The `start` is a +zero-based index where we will start our slice. The `end` is a zero-based index +that indicates the end of the slice. The slice extracts up to but not including +`end`. + + slice 0 3 (fromList [0,1,2,3,4]) == fromList [0,1,2] + slice 1 4 (fromList [0,1,2,3,4]) == fromList [1,2,3] + +Both the `start` and `end` indexes can be negative, indicating an offset from +the end of the array. + + slice 1 -1 (fromList [0,1,2,3,4]) == fromList [1,2,3] + slice -2 5 (fromList [0,1,2,3,4]) == fromList [3,4] + +This makes it pretty easy to `pop` the last element off of an array: `slice 0 -1 array` +-} +slice : Int -> Int -> Array a -> Array a +slice = + Native.Array.slice + + +{-| Return the length of an array. + + length (fromList [1,2,3]) == 3 +-} +length : Array a -> Int +length = + Native.Array.length + + +{-| Determine if an array is empty. + + isEmpty empty == True +-} +isEmpty : Array a -> Bool +isEmpty array = + length array == 0 + + +{-| Append two arrays to a new one. + + append (repeat 2 42) (repeat 3 81) == fromList [42,42,81,81,81] +-} +append : Array a -> Array a -> Array a +append = + Native.Array.append diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Basics.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Basics.elm new file mode 100644 index 0000000..b1c56e8 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Basics.elm @@ -0,0 +1,655 @@ +module Basics exposing + ( (==), (/=) + , (<), (>), (<=), (>=), max, min, Order (..), compare + , not, (&&), (||), xor + , (+), (-), (*), (/), (^), (//), rem, (%), negate, abs, sqrt, clamp, logBase, e + , pi, cos, sin, tan, acos, asin, atan, atan2 + , round, floor, ceiling, truncate, toFloat + , degrees, radians, turns + , toPolar, fromPolar + , isNaN, isInfinite + , toString, (++) + , identity, always, (<|), (|>), (<<), (>>), flip, curry, uncurry, Never, never + ) + +{-| Tons of useful functions that get imported by default. + +# Equality +@docs (==), (/=) + +# Comparison + +These functions only work on `comparable` types. This includes numbers, +characters, strings, lists of comparable things, and tuples of comparable +things. Note that tuples with 7 or more elements are not comparable; why +are your tuples so big? + +@docs (<), (>), (<=), (>=), max, min, Order, compare + +# Booleans +@docs not, (&&), (||), xor + +# Mathematics +@docs (+), (-), (*), (/), (^), (//), rem, (%), negate, abs, sqrt, clamp, logBase, e + +# Trigonometry +@docs pi, cos, sin, tan, acos, asin, atan, atan2 + +# Number Conversions +@docs round, floor, ceiling, truncate, toFloat + +# Angle Conversions +All angle conversions result in “standard Elm angles” +which happen to be radians. + +@docs degrees, radians, turns + +# Polar Coordinates +@docs toPolar, fromPolar + +# Floating Point Checks +@docs isNaN, isInfinite + +# Strings and Lists +@docs toString, (++) + +# Higher-Order Helpers +@docs identity, always, (<|), (|>), (<<), (>>), flip, curry, uncurry, Never, never + +-} + +import Native.Basics +import Native.Utils + + +{-| Convert radians to standard Elm angles (radians). -} +radians : Float -> Float +radians t = + t + + +{-| Convert degrees to standard Elm angles (radians). -} +degrees : Float -> Float +degrees = + Native.Basics.degrees + + +{-| Convert turns to standard Elm angles (radians). +One turn is equal to 360°. +-} +turns : Float -> Float +turns = + Native.Basics.turns + + +{-| Convert polar coordinates (r,θ) to Cartesian coordinates (x,y). -} +fromPolar : (Float,Float) -> (Float,Float) +fromPolar = + Native.Basics.fromPolar + + +{-| Convert Cartesian coordinates (x,y) to polar coordinates (r,θ). -} +toPolar : (Float,Float) -> (Float,Float) +toPolar = + Native.Basics.toPolar + + +{-|-} +(+) : number -> number -> number +(+) = + Native.Basics.add + + +{-|-} +(-) : number -> number -> number +(-) = + Native.Basics.sub + + +{-|-} +(*) : number -> number -> number +(*) = + Native.Basics.mul + + +{-| Floating point division. -} +(/) : Float -> Float -> Float +(/) = + Native.Basics.floatDiv + + +infixl 6 + +infixl 6 - +infixl 7 * +infixl 7 / +infixr 8 ^ + +infixl 7 // +infixl 7 % + + +{-| Integer division. The remainder is discarded. -} +(//) : Int -> Int -> Int +(//) = + Native.Basics.div + + +{-| Find the remainder after dividing one number by another. + + rem 11 4 == 3 + rem 12 4 == 0 + rem 13 4 == 1 + rem -1 4 == -1 +-} +rem : Int -> Int -> Int +rem = + Native.Basics.rem + + +{-| Perform [modular arithmetic](http://en.wikipedia.org/wiki/Modular_arithmetic). + + 7 % 2 == 1 + -1 % 4 == 3 +-} +(%) : Int -> Int -> Int +(%) = + Native.Basics.mod + + +{-| Exponentiation + + 3^2 == 9 +-} +(^) : number -> number -> number +(^) = + Native.Basics.exp + + +{-|-} +cos : Float -> Float +cos = + Native.Basics.cos + + +{-|-} +sin : Float -> Float +sin = + Native.Basics.sin + + +{-|-} +tan : Float -> Float +tan = + Native.Basics.tan + + +{-|-} +acos : Float -> Float +acos = + Native.Basics.acos + + +{-|-} +asin : Float -> Float +asin = + Native.Basics.asin + + +{-| You probably do not want to use this. It takes `(y/x)` as the +argument, so there is no way to know whether the negative signs comes from +the `y` or `x`. Thus, the resulting angle is always between π/2 and -π/2 +(in quadrants I and IV). You probably want to use `atan2` instead. +-} +atan : Float -> Float +atan = + Native.Basics.atan + + +{-| This helps you find the angle of a Cartesian coordinate. +You will almost certainly want to use this instead of `atan`. +So `atan2 y x` computes *atan(y/x)* but also keeps track of which +quadrant the angle should really be in. The result will be between +π and -π, giving you the full range of angles. +-} +atan2 : Float -> Float -> Float +atan2 = + Native.Basics.atan2 + + +{-| Take the square root of a number. -} +sqrt : Float -> Float +sqrt = + Native.Basics.sqrt + + +{-| Negate a number. + + negate 42 == -42 + negate -42 == 42 + negate 0 == 0 +-} +negate : number -> number +negate = + Native.Basics.negate + + +{-| Take the absolute value of a number. -} +abs : number -> number +abs = + Native.Basics.abs + + +{-| Calculate the logarithm of a number with a given base. + + logBase 10 100 == 2 + logBase 2 256 == 8 +-} +logBase : Float -> Float -> Float +logBase = + Native.Basics.logBase + + +{-| Clamps a number within a given range. With the expression +`clamp 100 200 x` the results are as follows: + + 100 if x < 100 + x if 100 <= x < 200 + 200 if 200 <= x +-} +clamp : number -> number -> number -> number +clamp = + Native.Basics.clamp + + +{-| An approximation of pi. -} +pi : Float +pi = + Native.Basics.pi + + +{-| An approximation of e. -} +e : Float +e = + Native.Basics.e + + +{-| Check if values are “the same”. + +**Note:** Elm uses structural equality on tuples, records, and user-defined +union types. This means the values `(3, 4)` and `(3, 4)` are definitely equal. +This is not true in languages like JavaScript that use reference equality on +objects. + +**Note:** Equality (in the Elm sense) is not possible for certain types. For +example, the functions `(\n -> n + 1)` and `(\n -> 1 + n)` are “the +same” but detecting this in general is [undecidable][]. In a future +release, the compiler will detect when `(==)` is used with problematic +types and provide a helpful error message. This will require quite serious +infrastructure work that makes sense to batch with another big project, so the +stopgap is to crash as quickly as possible. Problematic types include functions +and JavaScript values like `Json.Encode.Value` which could contain functions +if passed through a port. + +[undecidable]: https://en.wikipedia.org/wiki/Undecidable_problem +-} +(==) : a -> a -> Bool +(==) = + Native.Basics.eq + + +{-| Check if values are not “the same”. + +So `(a /= b)` is the same as `(not (a == b))`. +-} +(/=) : a -> a -> Bool +(/=) = + Native.Basics.neq + + +{-|-} +(<) : comparable -> comparable -> Bool +(<) = + Native.Basics.lt + + +{-|-} +(>) : comparable -> comparable -> Bool +(>) = + Native.Basics.gt + + +{-|-} +(<=) : comparable -> comparable -> Bool +(<=) = + Native.Basics.le + + +{-|-} +(>=) : comparable -> comparable -> Bool +(>=) = + Native.Basics.ge + + +infix 4 == +infix 4 /= +infix 4 < +infix 4 > +infix 4 <= +infix 4 >= + + +{-| Compare any two comparable values. Comparable values include `String`, `Char`, +`Int`, `Float`, `Time`, or a list or tuple containing comparable values. +These are also the only values that work as `Dict` keys or `Set` members. +-} +compare : comparable -> comparable -> Order +compare = + Native.Basics.compare + + +{-| Represents the relative ordering of two things. +The relations are less than, equal to, and greater than. +-} +type Order = LT | EQ | GT + + +{-| Find the smaller of two comparables. -} +min : comparable -> comparable -> comparable +min = + Native.Basics.min + + +{-| Find the larger of two comparables. -} +max : comparable -> comparable -> comparable +max = + Native.Basics.max + + +{-| The logical AND operator. `True` if both inputs are `True`. + +**Note:** When used in the infix position, like `(left && right)`, the operator +short-circuits. This means if `left` is `False` we do not bother evaluating `right` +and just return `False` overall. +-} +(&&) : Bool -> Bool -> Bool +(&&) = + Native.Basics.and + + +{-| The logical OR operator. `True` if one or both inputs are `True`. + +**Note:** When used in the infix position, like `(left || right)`, the operator +short-circuits. This means if `left` is `True` we do not bother evaluating `right` +and just return `True` overall. +-} +(||) : Bool -> Bool -> Bool +(||) = + Native.Basics.or + + +infixr 3 && +infixr 2 || + + +{-| The exclusive-or operator. `True` if exactly one input is `True`. -} +xor : Bool -> Bool -> Bool +xor = + Native.Basics.xor + + +{-| Negate a boolean value. + + not True == False + not False == True +-} +not : Bool -> Bool +not = + Native.Basics.not + + +-- Conversions + +{-| Round a number to the nearest integer. -} +round : Float -> Int +round = + Native.Basics.round + + +{-| Truncate a number, rounding towards zero. -} +truncate : Float -> Int +truncate = + Native.Basics.truncate + + +{-| Floor function, rounding down. -} +floor : Float -> Int +floor = + Native.Basics.floor + + +{-| Ceiling function, rounding up. -} +ceiling : Float -> Int +ceiling = + Native.Basics.ceiling + + +{-| Convert an integer into a float. -} +toFloat : Int -> Float +toFloat = + Native.Basics.toFloat + + +{-| Determine whether a float is an undefined or unrepresentable number. +NaN stands for *not a number* and it is [a standardized part of floating point +numbers](http://en.wikipedia.org/wiki/NaN). + + isNaN (0/0) == True + isNaN (sqrt -1) == True + isNaN (1/0) == False -- infinity is a number + isNaN 1 == False +-} +isNaN : Float -> Bool +isNaN = + Native.Basics.isNaN + + +{-| Determine whether a float is positive or negative infinity. + + isInfinite (0/0) == False + isInfinite (sqrt -1) == False + isInfinite (1/0) == True + isInfinite 1 == False + +Notice that NaN is not infinite! For float `n` to be finite implies that +`not (isInfinite n || isNaN n)` evaluates to `True`. +-} +isInfinite : Float -> Bool +isInfinite = + Native.Basics.isInfinite + + +{-| Turn any kind of value into a string. When you view the resulting string +with `Text.fromString` it should look just like the value it came from. + + toString 42 == "42" + toString [1,2] == "[1,2]" + toString "he said, \"hi\"" == "\"he said, \\\"hi\\\"\"" +-} +toString : a -> String +toString = + Native.Utils.toString + + +{-| Put two appendable things together. This includes strings, lists, and text. + + "hello" ++ "world" == "helloworld" + [1,1,2] ++ [3,5,8] == [1,1,2,3,5,8] +-} +(++) : appendable -> appendable -> appendable +(++) = + Native.Utils.append + + +infixr 5 ++ + + +-- Function Helpers + +{-| Function composition, passing results along in the suggested direction. For +example, the following code checks if the square root of a number is odd: + + not << isEven << sqrt + +You can think of this operator as equivalent to the following: + + (g << f) == (\x -> g (f x)) + +So our example expands out to something like this: + + \n -> not (isEven (sqrt n)) +-} +(<<) : (b -> c) -> (a -> b) -> (a -> c) +(<<) g f x = + g (f x) + + +{-| Function composition, passing results along in the suggested direction. For +example, the following code checks if the square root of a number is odd: + + sqrt >> isEven >> not + +This direction of function composition seems less pleasant than `(<<)` which +reads nicely in expressions like: `filter (not << isRegistered) students` +-} +(>>) : (a -> b) -> (b -> c) -> (a -> c) +(>>) f g x = + g (f x) + + +{-| Forward function application `x |> f == f x`. This function is useful +for avoiding parentheses and writing code in a more natural way. +Consider the following code to create a pentagon: + + scale 2 (move (10,10) (filled blue (ngon 5 30))) + +This can also be written as: + + ngon 5 30 + |> filled blue + |> move (10,10) + |> scale 2 +-} +(|>) : a -> (a -> b) -> b +(|>) x f = + f x + + +{-| Backward function application `f <| x == f x`. This function is useful for +avoiding parentheses. Consider the following code to create a text element: + + leftAligned (monospace (fromString "code")) + +This can also be written as: + + leftAligned <| monospace <| fromString "code" +-} +(<|) : (a -> b) -> a -> b +(<|) f x = + f x + + +infixr 9 << +infixl 9 >> +infixr 0 <| +infixl 0 |> + + +{-| Given a value, returns exactly the same value. This is called +[the identity function](http://en.wikipedia.org/wiki/Identity_function). +-} +identity : a -> a +identity x = + x + + +{-| Create a [constant function](http://en.wikipedia.org/wiki/Constant_function), +a function that *always* returns the same value regardless of what input you give. +It is defined as: + + always a b = a + +It totally ignores the second argument, so `always 42` is a function that always +returns 42. When you are dealing with higher-order functions, this comes in +handy more often than you might expect. For example, creating a zeroed out list +of length ten would be: + + map (always 0) [0..9] +-} +always : a -> b -> a +always a _ = + a + + +{-| Flip the order of the first two arguments to a function. -} +flip : (a -> b -> c) -> (b -> a -> c) +flip f b a = + f a b + + +{-| Change how arguments are passed to a function. +This splits paired arguments into two separate arguments. +-} +curry : ((a,b) -> c) -> a -> b -> c +curry f a b = + f (a,b) + + +{-| Change how arguments are passed to a function. +This combines two arguments into a single pair. +-} +uncurry : (a -> b -> c) -> (a,b) -> c +uncurry f (a,b) = + f a b + + +{-| A value that can never happen! For context: + + - The boolean type `Bool` has two values: `True` and `False` + - The unit type `()` has one value: `()` + - The never type `Never` has no values! + +You may see it in the wild in `Html Never` which means this HTML will never +produce any messages. You would need to write an event handler like +`onClick ??? : Attribute Never` but how can we fill in the question marks?! +So there cannot be any event handlers on that HTML. + +You may also see this used with tasks that never fail, like `Task Never ()`. + +The `Never` type is useful for restricting *arguments* to a function. Maybe my +API can only accept HTML without event handlers, so I require `Html Never` and +users can give `Html msg` and everything will go fine. Generally speaking, you +do not want `Never` in your return types though. +-} +type Never = JustOneMore Never + + +{-| A function that can never be called. Seems extremely pointless, but it +*can* come in handy. Imagine you have some HTML that should never produce any +messages. And say you want to use it in some other HTML that *does* produce +messages. You could say: + + import Html exposing (..) + + embedHtml : Html Never -> Html msg + embedHtml staticStuff = + div [] + [ text "hello" + , Html.map never staticStuff + ] + +So the `never` function is basically telling the type system, make sure no one +ever calls me! +-} +never : Never -> a +never (JustOneMore nvr) = + never nvr diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Bitwise.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Bitwise.elm new file mode 100644 index 0000000..14c7a82 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Bitwise.elm @@ -0,0 +1,90 @@ +module Bitwise exposing + ( and, or, xor, complement + , shiftLeftBy, shiftRightBy, shiftRightZfBy + ) + +{-| Library for [bitwise operations](http://en.wikipedia.org/wiki/Bitwise_operation). + +# Basic Operations +@docs and, or, xor, complement + +# Bit Shifts +@docs shiftLeftBy, shiftRightBy, shiftRightZfBy +-} + +import Native.Bitwise + + +{-| Bitwise AND +-} +and : Int -> Int -> Int +and = + Native.Bitwise.and + + +{-| Bitwise OR +-} +or : Int -> Int -> Int +or = + Native.Bitwise.or + + +{-| Bitwise XOR +-} +xor : Int -> Int -> Int +xor = + Native.Bitwise.xor + + +{-| Flip each bit individually, often called bitwise NOT +-} +complement : Int -> Int +complement = + Native.Bitwise.complement + + +{-| Shift bits to the left by a given offset, filling new bits with zeros. +This can be used to multiply numbers by powers of two. + + shiftLeftBy 1 5 == 10 + shiftLeftBy 5 1 == 32 +-} +shiftLeftBy : Int -> Int -> Int +shiftLeftBy = + Native.Bitwise.shiftLeftBy + + +{-| Shift bits to the right by a given offset, filling new bits with +whatever is the topmost bit. This can be used to divide numbers by powers of two. + + shiftRightBy 1 32 == 16 + shiftRightBy 2 32 == 8 + shiftRightBy 1 -32 == -16 + +This is called an [arithmetic right shift][ars], often written (>>), and +sometimes called a sign-propagating right shift because it fills empty spots +with copies of the highest bit. + +[ars]: http://en.wikipedia.org/wiki/Bitwise_operation#Arithmetic_shift +-} +shiftRightBy : Int -> Int -> Int +shiftRightBy = + Native.Bitwise.shiftRightBy + + +{-| Shift bits to the right by a given offset, filling new bits with zeros. + + shiftRightZfBy 1 32 == 16 + shiftRightZfBy 2 32 == 8 + shiftRightZfBy 1 -32 == 2147483632 + +This is called an [logical right shift][lrs], often written (>>>), and +sometimes called a zero-fill right shift because it fills empty spots with +zeros. + +[lrs]: http://en.wikipedia.org/wiki/Bitwise_operation#Logical_shift +-} +shiftRightZfBy : Int -> Int -> Int +shiftRightZfBy = + Native.Bitwise.shiftRightZfBy + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Char.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Char.elm new file mode 100644 index 0000000..288f50b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Char.elm @@ -0,0 +1,103 @@ +module Char exposing + ( isUpper, isLower, isDigit, isOctDigit, isHexDigit + , toUpper, toLower, toLocaleUpper, toLocaleLower + , KeyCode, toCode, fromCode + ) + +{-| Functions for working with characters. Character literals are enclosed in +`'a'` pair of single quotes. + +# Classification +@docs isUpper, isLower, isDigit, isOctDigit, isHexDigit + +# Conversion +@docs toUpper, toLower, toLocaleUpper, toLocaleLower + +# Key Codes +@docs KeyCode, toCode, fromCode + +-} + +import Native.Char +import Basics exposing ((&&), (||), (>=), (<=)) + + +isBetween : Char -> Char -> Char -> Bool +isBetween low high char = + let code = toCode char + in + (code >= toCode low) && (code <= toCode high) + + +{-| True for upper case ASCII letters. -} +isUpper : Char -> Bool +isUpper = + isBetween 'A' 'Z' + + +{-| True for lower case ASCII letters. -} +isLower : Char -> Bool +isLower = + isBetween 'a' 'z' + + +{-| True for ASCII digits `[0-9]`. -} +isDigit : Char -> Bool +isDigit = + isBetween '0' '9' + + +{-| True for ASCII octal digits `[0-7]`. -} +isOctDigit : Char -> Bool +isOctDigit = + isBetween '0' '7' + + +{-| True for ASCII hexadecimal digits `[0-9a-fA-F]`. -} +isHexDigit : Char -> Bool +isHexDigit char = + isDigit char || isBetween 'a' 'f' char || isBetween 'A' 'F' char + + +{-| Convert to upper case. -} +toUpper : Char -> Char +toUpper = + Native.Char.toUpper + + +{-| Convert to lower case. -} +toLower : Char -> Char +toLower = + Native.Char.toLower + + +{-| Convert to upper case, according to any locale-specific case mappings. -} +toLocaleUpper : Char -> Char +toLocaleUpper = + Native.Char.toLocaleUpper + + +{-| Convert to lower case, according to any locale-specific case mappings. -} +toLocaleLower : Char -> Char +toLocaleLower = + Native.Char.toLocaleLower + + +{-| Keyboard keys can be represented as integers. These are called *key codes*. +You can use [`toCode`](#toCode) and [`fromCode`](#fromCode) to convert between +key codes and characters. +-} +type alias KeyCode = Int + + +{-| Convert to key code. +-} +toCode : Char -> KeyCode +toCode = + Native.Char.toCode + + +{-| Convert from key code. -} +fromCode : KeyCode -> Char +fromCode = + Native.Char.fromCode diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Color.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Color.elm new file mode 100644 index 0000000..d150240 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Color.elm @@ -0,0 +1,456 @@ +module Color exposing + ( Color, rgb, rgba, hsl, hsla, greyscale, grayscale, complement + , Gradient, linear, radial + , toRgb, toHsl + , red, orange, yellow, green, blue, purple, brown + , lightRed, lightOrange, lightYellow, lightGreen, lightBlue, lightPurple, lightBrown + , darkRed, darkOrange, darkYellow, darkGreen, darkBlue, darkPurple, darkBrown + , white, lightGrey, grey, darkGrey, lightCharcoal, charcoal, darkCharcoal, black + , lightGray, gray, darkGray + ) + +{-| Library for working with colors. Includes +[RGB](https://en.wikipedia.org/wiki/RGB_color_model) and +[HSL](http://en.wikipedia.org/wiki/HSL_and_HSV) creation, gradients, and +built-in names. + +# Colors +@docs Color + +# Creation +@docs rgb, rgba, hsl, hsla, greyscale, grayscale, complement + +# Gradients +@docs Gradient, linear, radial + +# Extracting Colors +@docs toRgb, toHsl + +# Built-in Colors +These colors come from the [Tango +palette](http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines) +which provides aesthetically reasonable defaults for colors. Each color also +comes with a light and dark version. + +### Standard +@docs red, orange, yellow, green, blue, purple, brown + +### Light +@docs lightRed, lightOrange, lightYellow, lightGreen, lightBlue, lightPurple, lightBrown + +### Dark +@docs darkRed, darkOrange, darkYellow, darkGreen, darkBlue, darkPurple, darkBrown + +### Eight Shades of Grey +These colors are a compatible series of shades of grey, fitting nicely +with the Tango palette. +@docs white, lightGrey, grey, darkGrey, lightCharcoal, charcoal, darkCharcoal, black + +These are identical to the *grey* versions. It seems the spelling is regional, but +that has never helped me remember which one I should be writing. +@docs lightGray, gray, darkGray + +-} + +import Basics exposing (..) + + +{-| Representation of colors. +-} +type Color + = RGBA Int Int Int Float + | HSLA Float Float Float Float + + +{-| Create RGB colors with an alpha component for transparency. +The alpha component is specified with numbers between 0 and 1. -} +rgba : Int -> Int -> Int -> Float -> Color +rgba = + RGBA + + +{-| Create RGB colors from numbers between 0 and 255 inclusive. -} +rgb : Int -> Int -> Int -> Color +rgb r g b = + RGBA r g b 1 + + +{-| Create [HSL colors](http://en.wikipedia.org/wiki/HSL_and_HSV) +with an alpha component for transparency. +-} +hsla : Float -> Float -> Float -> Float -> Color +hsla hue saturation lightness alpha = + HSLA (hue - turns (toFloat (floor (hue / (2*pi))))) saturation lightness alpha + + +{-| Create [HSL colors](http://en.wikipedia.org/wiki/HSL_and_HSV). This gives +you access to colors more like a color wheel, where all hues are arranged in a +circle that you specify with standard Elm angles (radians). + + red = hsl (degrees 0) 1 0.5 + green = hsl (degrees 120) 1 0.5 + blue = hsl (degrees 240) 1 0.5 + + pastelRed = hsl (degrees 0) 0.7 0.7 + +To cycle through all colors, just cycle through degrees. The saturation level +is how vibrant the color is, like a dial between grey and bright colors. The +lightness level is a dial between white and black. +-} +hsl : Float -> Float -> Float -> Color +hsl hue saturation lightness = + hsla hue saturation lightness 1 + + +{-| Produce a gray based on the input. 0 is white, 1 is black. +-} +grayscale : Float -> Color +grayscale p = + HSLA 0 0 (1-p) 1 + + +{-| Produce a gray based on the input. 0 is white, 1 is black. +-} +greyscale : Float -> Color +greyscale p = + HSLA 0 0 (1-p) 1 + + +{-| Produce a “complementary color”. The two colors will +accent each other. This is the same as rotating the hue by 180°. +-} +complement : Color -> Color +complement color = + case color of + HSLA h s l a -> + hsla (h + degrees 180) s l a + + RGBA r g b a -> + let + (h,s,l) = rgbToHsl r g b + in + hsla (h + degrees 180) s l a + + +{-| Extract the components of a color in the HSL format. +-} +toHsl : Color -> { hue:Float, saturation:Float, lightness:Float, alpha:Float } +toHsl color = + case color of + HSLA h s l a -> + { hue=h, saturation=s, lightness=l, alpha=a } + + RGBA r g b a -> + let + (h,s,l) = rgbToHsl r g b + in + { hue=h, saturation=s, lightness=l, alpha=a } + + +{-| Extract the components of a color in the RGB format. +-} +toRgb : Color -> { red:Int, green:Int, blue:Int, alpha:Float } +toRgb color = + case color of + RGBA r g b a -> + { red = r, green = g, blue = b, alpha = a } + + HSLA h s l a -> + let + (r,g,b) = hslToRgb h s l + in + { red = round (255 * r) + , green = round (255 * g) + , blue = round (255 * b) + , alpha = a + } + + +fmod : Float -> Int -> Float +fmod f n = + let + integer = floor f + in + toFloat (integer % n) + f - toFloat integer + + +rgbToHsl : Int -> Int -> Int -> (Float,Float,Float) +rgbToHsl red green blue = + let + r = toFloat red / 255 + g = toFloat green / 255 + b = toFloat blue / 255 + + cMax = max (max r g) b + cMin = min (min r g) b + + c = cMax - cMin + + hue = + degrees 60 * + if cMax == r then + fmod ((g - b) / c) 6 + else if cMax == g then + ((b - r) / c) + 2 + else {- cMax == b -} + ((r - g) / c) + 4 + + lightness = + (cMax + cMin) / 2 + + saturation = + if lightness == 0 then + 0 + else + c / (1 - abs (2 * lightness - 1)) + in + (hue, saturation, lightness) + + +hslToRgb : Float -> Float -> Float -> (Float,Float,Float) +hslToRgb hue saturation lightness = + let + chroma = (1 - abs (2 * lightness - 1)) * saturation + normHue = hue / degrees 60 + + x = chroma * (1 - abs (fmod normHue 2 - 1)) + + (r,g,b) = + if normHue < 0 then (0, 0, 0) + else if normHue < 1 then (chroma, x, 0) + else if normHue < 2 then (x, chroma, 0) + else if normHue < 3 then (0, chroma, x) + else if normHue < 4 then (0, x, chroma) + else if normHue < 5 then (x, 0, chroma) + else if normHue < 6 then (chroma, 0, x) + else (0, 0, 0) + + m = lightness - chroma / 2 + in + (r + m, g + m, b + m) + + +--toV3 : Color -> V3 + +--toV4 : Color -> V4 + +{-| Abstract representation of a color gradient. +-} +type Gradient + = Linear (Float,Float) (Float,Float) (List (Float,Color)) + | Radial (Float,Float) Float (Float,Float) Float (List (Float,Color)) + + +{-| Create a linear gradient. Takes a start and end point and then a series of +“color stops” that indicate how to interpolate between the start and +end points. See [this example](http://elm-lang.org/examples/linear-gradient) for a +more visual explanation. +-} +linear : (Float, Float) -> (Float, Float) -> List (Float,Color) -> Gradient +linear = + Linear + + +{-| Create a radial gradient. First takes a start point and inner radius. Then +takes an end point and outer radius. It then takes a series of “color +stops” that indicate how to interpolate between the inner and outer +circles. See [this example](http://elm-lang.org/examples/radial-gradient) for a +more visual explanation. +-} +radial : (Float,Float) -> Float -> (Float,Float) -> Float -> List (Float,Color) -> Gradient +radial = + Radial + + +-- BUILT-IN COLORS + +{-|-} +lightRed : Color +lightRed = + RGBA 239 41 41 1 + + +{-|-} +red : Color +red = + RGBA 204 0 0 1 + + +{-|-} +darkRed : Color +darkRed = + RGBA 164 0 0 1 + + +{-|-} +lightOrange : Color +lightOrange = + RGBA 252 175 62 1 + + +{-|-} +orange : Color +orange = + RGBA 245 121 0 1 + + +{-|-} +darkOrange : Color +darkOrange = + RGBA 206 92 0 1 + + +{-|-} +lightYellow : Color +lightYellow = + RGBA 255 233 79 1 + + +{-|-} +yellow : Color +yellow = + RGBA 237 212 0 1 + + +{-|-} +darkYellow : Color +darkYellow = + RGBA 196 160 0 1 + + +{-|-} +lightGreen : Color +lightGreen = + RGBA 138 226 52 1 + + +{-|-} +green : Color +green = + RGBA 115 210 22 1 + + +{-|-} +darkGreen : Color +darkGreen = + RGBA 78 154 6 1 + + +{-|-} +lightBlue : Color +lightBlue = + RGBA 114 159 207 1 + + +{-|-} +blue : Color +blue = + RGBA 52 101 164 1 + + +{-|-} +darkBlue : Color +darkBlue = + RGBA 32 74 135 1 + + +{-|-} +lightPurple : Color +lightPurple = + RGBA 173 127 168 1 + + +{-|-} +purple : Color +purple = + RGBA 117 80 123 1 + + +{-|-} +darkPurple : Color +darkPurple = + RGBA 92 53 102 1 + + +{-|-} +lightBrown : Color +lightBrown = + RGBA 233 185 110 1 + + +{-|-} +brown : Color +brown = + RGBA 193 125 17 1 + + +{-|-} +darkBrown : Color +darkBrown = + RGBA 143 89 2 1 + + +{-|-} +black : Color +black = + RGBA 0 0 0 1 + + +{-|-} +white : Color +white = + RGBA 255 255 255 1 + + +{-|-} +lightGrey : Color +lightGrey = + RGBA 238 238 236 1 + + +{-|-} +grey : Color +grey = + RGBA 211 215 207 1 + + +{-|-} +darkGrey : Color +darkGrey = + RGBA 186 189 182 1 + + +{-|-} +lightGray : Color +lightGray = + RGBA 238 238 236 1 + + +{-|-} +gray : Color +gray = + RGBA 211 215 207 1 + + +{-|-} +darkGray : Color +darkGray = + RGBA 186 189 182 1 + + +{-|-} +lightCharcoal : Color +lightCharcoal = + RGBA 136 138 133 1 + + +{-|-} +charcoal : Color +charcoal = + RGBA 85 87 83 1 + + +{-|-} +darkCharcoal : Color +darkCharcoal = + RGBA 46 52 54 1 diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Date.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Date.elm new file mode 100644 index 0000000..0d62982 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Date.elm @@ -0,0 +1,150 @@ +module Date exposing + ( Date, fromString, toTime, fromTime + , year, month, Month(..) + , day, dayOfWeek, Day(..) + , hour, minute, second, millisecond + , now + ) + +{-| Library for working with dates. Email the mailing list if you encounter +issues with internationalization or locale formatting. + +# Dates +@docs Date, now + +# Conversions +@docs fromString, toTime, fromTime + +# Extractions +@docs year, month, Month, day, dayOfWeek, Day, hour, minute, second, millisecond + +-} + +import Native.Date +import Task exposing (Task) +import Time exposing (Time) +import Result exposing (Result) + + + +-- DATES + + +{-| Representation of a date. +-} +type Date = Date + + +{-| Get the `Date` at the moment when this task is run. +-} +now : Task x Date +now = + Task.map fromTime Time.now + + + +-- CONVERSIONS AND EXTRACTIONS + + +{-| Represents the days of the week. +-} +type Day = Mon | Tue | Wed | Thu | Fri | Sat | Sun + + +{-| Represents the month of the year. +-} +type Month + = Jan | Feb | Mar | Apr + | May | Jun | Jul | Aug + | Sep | Oct | Nov | Dec + + +{-| Attempt to read a date from a string. +-} +fromString : String -> Result String Date +fromString = + Native.Date.fromString + + +{-| Convert a `Date` to a time in milliseconds. + +A time is the number of milliseconds since +[the Unix epoch](http://en.wikipedia.org/wiki/Unix_time). +-} +toTime : Date -> Time +toTime = + Native.Date.toTime + + +{-| Convert a time in milliseconds into a `Date`. + +A time is the number of milliseconds since +[the Unix epoch](http://en.wikipedia.org/wiki/Unix_time). +-} +fromTime : Time -> Date +fromTime = + Native.Date.fromTime + + +{-| Extract the year of a given date. Given the date 23 June 1990 at 11:45AM +this returns the integer `1990`. +-} +year : Date -> Int +year = + Native.Date.year + + +{-| Extract the month of a given date. Given the date 23 June 1990 at 11:45AM +this returns the month `Jun` as defined below. +-} +month : Date -> Month +month = + Native.Date.month + + +{-| Extract the day of a given date. Given the date 23 June 1990 at 11:45AM +this returns the integer `23`. +-} +day : Date -> Int +day = + Native.Date.day + + +{-| Extract the day of the week for a given date. Given the date 23 June +1990 at 11:45AM this returns the day `Sat` as defined below. +-} +dayOfWeek : Date -> Day +dayOfWeek = + Native.Date.dayOfWeek + + +{-| Extract the hour of a given date. Given the date 23 June 1990 at 11:45AM +this returns the integer `11`. +-} +hour : Date -> Int +hour = + Native.Date.hour + + +{-| Extract the minute of a given date. Given the date 23 June 1990 at 11:45AM +this returns the integer `45`. +-} +minute : Date -> Int +minute = + Native.Date.minute + + +{-| Extract the second of a given date. Given the date 23 June 1990 at 11:45AM +this returns the integer `0`. +-} +second : Date -> Int +second = + Native.Date.second + + +{-| Extract the millisecond of a given date. Given the date 23 June 1990 at 11:45:30.123AM +this returns the integer `123`. +-} +millisecond : Date -> Int +millisecond = + Native.Date.millisecond diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Debug.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Debug.elm new file mode 100644 index 0000000..49668f5 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Debug.elm @@ -0,0 +1,62 @@ +module Debug exposing + ( log + , crash + ) + +{-| This library is for investigating bugs or performance problems. It should +*not* be used in production code. + +# Debugging +@docs log, crash +-} + +import Native.Debug + + +{-| Log a tagged value on the developer console, and then return the value. + + 1 + log "number" 1 -- equals 2, logs "number: 1" + length (log "start" []) -- equals 0, logs "start: []" + +Notice that `log` is not a pure function! It should *only* be used for +investigating bugs or performance problems. +-} +log : String -> a -> a +log = + Native.Debug.log + + +{-| Crash the program with an error message. This is an uncatchable error, +intended for code that is soon-to-be-implemented. For example, if you are +working with a large ADT and have partially completed a case expression, it may +make sense to do this: + + type Entity = Ship | Fish | Captain | Seagull + + drawEntity entity = + case entity of + Ship -> + ... + + Fish -> + ... + + _ -> + Debug.crash "TODO" + +The Elm compiler recognizes each `Debug.crash` and when you run into it at +runtime, the error will point to the corresponding module name and line number. +For `case` expressions that ends with a wildcard pattern and a crash, it will +also show the value that snuck through. In our example, that'd be `Captain` or +`Seagull`. + +**Use this if** you want to do some testing while you are partway through +writing a function. + +**Do not use this if** you want to do some typical try-catch exception handling. +Use the [`Maybe`](Maybe) or [`Result`](Result) libraries instead. +-} +crash : String -> a +crash = + Native.Debug.crash + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Dict.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Dict.elm new file mode 100644 index 0000000..3c706fc --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Dict.elm @@ -0,0 +1,661 @@ +module Dict exposing + ( Dict + , empty, singleton, insert, update + , isEmpty, get, remove, member, size + , filter + , partition + , foldl, foldr, map + , union, intersect, diff, merge + , keys, values + , toList, fromList + ) + +{-| A dictionary mapping unique keys to values. The keys can be any comparable +type. This includes `Int`, `Float`, `Time`, `Char`, `String`, and tuples or +lists of comparable types. + +Insert, remove, and query operations all take *O(log n)* time. + +# Dictionaries +@docs Dict + +# Build +@docs empty, singleton, insert, update, remove + +# Query +@docs isEmpty, member, get, size + +# Lists +@docs keys, values, toList, fromList + +# Transform +@docs map, foldl, foldr, filter, partition + +# Combine +@docs union, intersect, diff, merge + +-} + + +import Basics exposing (..) +import Maybe exposing (..) +import List exposing (..) +import Native.Debug +import String + + + +-- DICTIONARIES + + +-- BBlack and NBlack should only be used during the deletion +-- algorithm. Any other occurrence is a bug and should fail an assert. +type NColor + = Red + | Black + | BBlack -- Double Black, counts as 2 blacks for the invariant + | NBlack -- Negative Black, counts as -1 blacks for the invariant + + +type LeafColor + = LBlack + | LBBlack -- Double Black, counts as 2 + + +{-| A dictionary of keys and values. So a `(Dict String User)` is a dictionary +that lets you look up a `String` (such as user names) and find the associated +`User`. +-} +type Dict k v + = RBNode_elm_builtin NColor k v (Dict k v) (Dict k v) + | RBEmpty_elm_builtin LeafColor + + +{-| Create an empty dictionary. -} +empty : Dict k v +empty = + RBEmpty_elm_builtin LBlack + + +maxWithDefault : k -> v -> Dict k v -> (k, v) +maxWithDefault k v r = + case r of + RBEmpty_elm_builtin _ -> + (k, v) + + RBNode_elm_builtin _ kr vr _ rr -> + maxWithDefault kr vr rr + + +{-| Get the value associated with a key. If the key is not found, return +`Nothing`. This is useful when you are not sure if a key will be in the +dictionary. + + animals = fromList [ ("Tom", Cat), ("Jerry", Mouse) ] + + get "Tom" animals == Just Cat + get "Jerry" animals == Just Mouse + get "Spike" animals == Nothing + +-} +get : comparable -> Dict comparable v -> Maybe v +get targetKey dict = + case dict of + RBEmpty_elm_builtin _ -> + Nothing + + RBNode_elm_builtin _ key value left right -> + case compare targetKey key of + LT -> + get targetKey left + + EQ -> + Just value + + GT -> + get targetKey right + + +{-| Determine if a key is in a dictionary. -} +member : comparable -> Dict comparable v -> Bool +member key dict = + case get key dict of + Just _ -> + True + + Nothing -> + False + + +{-| Determine the number of key-value pairs in the dictionary. -} +size : Dict k v -> Int +size dict = + sizeHelp 0 dict + + +sizeHelp : Int -> Dict k v -> Int +sizeHelp n dict = + case dict of + RBEmpty_elm_builtin _ -> + n + + RBNode_elm_builtin _ _ _ left right -> + sizeHelp (sizeHelp (n+1) right) left + + +{-| Determine if a dictionary is empty. + + isEmpty empty == True +-} +isEmpty : Dict k v -> Bool +isEmpty dict = + dict == empty + + +{- The actual pattern match here is somewhat lax. If it is given invalid input, +it will do the wrong thing. The expected behavior is: + + red node => black node + black node => same + bblack node => xxx + nblack node => xxx + + black leaf => same + bblack leaf => xxx +-} +ensureBlackRoot : Dict k v -> Dict k v +ensureBlackRoot dict = + case dict of + RBNode_elm_builtin Red key value left right -> + RBNode_elm_builtin Black key value left right + + _ -> + dict + + +{-| Insert a key-value pair into a dictionary. Replaces value when there is +a collision. -} +insert : comparable -> v -> Dict comparable v -> Dict comparable v +insert key value dict = + update key (always (Just value)) dict + + +{-| Remove a key-value pair from a dictionary. If the key is not found, +no changes are made. -} +remove : comparable -> Dict comparable v -> Dict comparable v +remove key dict = + update key (always Nothing) dict + + +type Flag = Insert | Remove | Same + + +{-| Update the value of a dictionary for a specific key with a given function. -} +update : comparable -> (Maybe v -> Maybe v) -> Dict comparable v -> Dict comparable v +update k alter dict = + let + up dict = + case dict of + -- expecting only black nodes, never double black nodes here + RBEmpty_elm_builtin _ -> + case alter Nothing of + Nothing -> + (Same, empty) + + Just v -> + (Insert, RBNode_elm_builtin Red k v empty empty) + + RBNode_elm_builtin clr key value left right -> + case compare k key of + EQ -> + case alter (Just value) of + Nothing -> + (Remove, rem clr left right) + + Just newValue -> + (Same, RBNode_elm_builtin clr key newValue left right) + + LT -> + let (flag, newLeft) = up left in + case flag of + Same -> + (Same, RBNode_elm_builtin clr key value newLeft right) + + Insert -> + (Insert, balance clr key value newLeft right) + + Remove -> + (Remove, bubble clr key value newLeft right) + + GT -> + let (flag, newRight) = up right in + case flag of + Same -> + (Same, RBNode_elm_builtin clr key value left newRight) + + Insert -> + (Insert, balance clr key value left newRight) + + Remove -> + (Remove, bubble clr key value left newRight) + + (flag, updatedDict) = + up dict + in + case flag of + Same -> + updatedDict + + Insert -> + ensureBlackRoot updatedDict + + Remove -> + blacken updatedDict + + +{-| Create a dictionary with one key-value pair. -} +singleton : comparable -> v -> Dict comparable v +singleton key value = + insert key value empty + + + +-- HELPERS + + +isBBlack : Dict k v -> Bool +isBBlack dict = + case dict of + RBNode_elm_builtin BBlack _ _ _ _ -> + True + + RBEmpty_elm_builtin LBBlack -> + True + + _ -> + False + + +moreBlack : NColor -> NColor +moreBlack color = + case color of + Black -> + BBlack + + Red -> + Black + + NBlack -> + Red + + BBlack -> + Native.Debug.crash "Can't make a double black node more black!" + + +lessBlack : NColor -> NColor +lessBlack color = + case color of + BBlack -> + Black + + Black -> + Red + + Red -> + NBlack + + NBlack -> + Native.Debug.crash "Can't make a negative black node less black!" + + +{- The actual pattern match here is somewhat lax. If it is given invalid input, +it will do the wrong thing. The expected behavior is: + + node => less black node + + bblack leaf => black leaf + black leaf => xxx +-} +lessBlackTree : Dict k v -> Dict k v +lessBlackTree dict = + case dict of + RBNode_elm_builtin c k v l r -> + RBNode_elm_builtin (lessBlack c) k v l r + + RBEmpty_elm_builtin _ -> + RBEmpty_elm_builtin LBlack + + +reportRemBug : String -> NColor -> String -> String -> a +reportRemBug msg c lgot rgot = + Native.Debug.crash <| + String.concat + [ "Internal red-black tree invariant violated, expected " + , msg, " and got ", toString c, "/", lgot, "/", rgot + , "\nPlease report this bug to " + ] + + +-- Remove the top node from the tree, may leave behind BBlacks +rem : NColor -> Dict k v -> Dict k v -> Dict k v +rem color left right = + case (left, right) of + (RBEmpty_elm_builtin _, RBEmpty_elm_builtin _) -> + case color of + Red -> + RBEmpty_elm_builtin LBlack + + Black -> + RBEmpty_elm_builtin LBBlack + + _ -> + Native.Debug.crash "cannot have bblack or nblack nodes at this point" + + (RBEmpty_elm_builtin cl, RBNode_elm_builtin cr k v l r) -> + case (color, cl, cr) of + (Black, LBlack, Red) -> + RBNode_elm_builtin Black k v l r + + _ -> + reportRemBug "Black/LBlack/Red" color (toString cl) (toString cr) + + (RBNode_elm_builtin cl k v l r, RBEmpty_elm_builtin cr) -> + case (color, cl, cr) of + (Black, Red, LBlack) -> + RBNode_elm_builtin Black k v l r + + _ -> + reportRemBug "Black/Red/LBlack" color (toString cl) (toString cr) + + -- l and r are both RBNodes + (RBNode_elm_builtin cl kl vl ll rl, RBNode_elm_builtin _ _ _ _ _) -> + let + (k, v) = + maxWithDefault kl vl rl + + newLeft = + removeMax cl kl vl ll rl + in + bubble color k v newLeft right + + +-- Kills a BBlack or moves it upward, may leave behind NBlack +bubble : NColor -> k -> v -> Dict k v -> Dict k v -> Dict k v +bubble c k v l r = + if isBBlack l || isBBlack r then + balance (moreBlack c) k v (lessBlackTree l) (lessBlackTree r) + + else + RBNode_elm_builtin c k v l r + + +-- Removes rightmost node, may leave root as BBlack +removeMax : NColor -> k -> v -> Dict k v -> Dict k v -> Dict k v +removeMax c k v l r = + case r of + RBEmpty_elm_builtin _ -> + rem c l r + + RBNode_elm_builtin cr kr vr lr rr -> + bubble c k v l (removeMax cr kr vr lr rr) + + +-- generalized tree balancing act +balance : NColor -> k -> v -> Dict k v -> Dict k v -> Dict k v +balance c k v l r = + let + tree = + RBNode_elm_builtin c k v l r + in + if blackish tree then + balanceHelp tree + + else + tree + + +blackish : Dict k v -> Bool +blackish t = + case t of + RBNode_elm_builtin c _ _ _ _ -> + c == Black || c == BBlack + + RBEmpty_elm_builtin _ -> + True + + +balanceHelp : Dict k v -> Dict k v +balanceHelp tree = + case tree of + -- double red: left, left + RBNode_elm_builtin col zk zv (RBNode_elm_builtin Red yk yv (RBNode_elm_builtin Red xk xv a b) c) d -> + balancedTree col xk xv yk yv zk zv a b c d + + -- double red: left, right + RBNode_elm_builtin col zk zv (RBNode_elm_builtin Red xk xv a (RBNode_elm_builtin Red yk yv b c)) d -> + balancedTree col xk xv yk yv zk zv a b c d + + -- double red: right, left + RBNode_elm_builtin col xk xv a (RBNode_elm_builtin Red zk zv (RBNode_elm_builtin Red yk yv b c) d) -> + balancedTree col xk xv yk yv zk zv a b c d + + -- double red: right, right + RBNode_elm_builtin col xk xv a (RBNode_elm_builtin Red yk yv b (RBNode_elm_builtin Red zk zv c d)) -> + balancedTree col xk xv yk yv zk zv a b c d + + -- handle double blacks + RBNode_elm_builtin BBlack xk xv a (RBNode_elm_builtin NBlack zk zv (RBNode_elm_builtin Black yk yv b c) (RBNode_elm_builtin Black _ _ _ _ as d)) -> + RBNode_elm_builtin Black yk yv (RBNode_elm_builtin Black xk xv a b) (balance Black zk zv c (redden d)) + + RBNode_elm_builtin BBlack zk zv (RBNode_elm_builtin NBlack xk xv (RBNode_elm_builtin Black _ _ _ _ as a) (RBNode_elm_builtin Black yk yv b c)) d -> + RBNode_elm_builtin Black yk yv (balance Black xk xv (redden a) b) (RBNode_elm_builtin Black zk zv c d) + + _ -> + tree + + +balancedTree : NColor -> k -> v -> k -> v -> k -> v -> Dict k v -> Dict k v -> Dict k v -> Dict k v -> Dict k v +balancedTree col xk xv yk yv zk zv a b c d = + RBNode_elm_builtin + (lessBlack col) + yk + yv + (RBNode_elm_builtin Black xk xv a b) + (RBNode_elm_builtin Black zk zv c d) + + +-- make the top node black +blacken : Dict k v -> Dict k v +blacken t = + case t of + RBEmpty_elm_builtin _ -> + RBEmpty_elm_builtin LBlack + + RBNode_elm_builtin _ k v l r -> + RBNode_elm_builtin Black k v l r + + +-- make the top node red +redden : Dict k v -> Dict k v +redden t = + case t of + RBEmpty_elm_builtin _ -> + Native.Debug.crash "can't make a Leaf red" + + RBNode_elm_builtin _ k v l r -> + RBNode_elm_builtin Red k v l r + + + +-- COMBINE + + +{-| Combine two dictionaries. If there is a collision, preference is given +to the first dictionary. +-} +union : Dict comparable v -> Dict comparable v -> Dict comparable v +union t1 t2 = + foldl insert t2 t1 + + +{-| Keep a key-value pair when its key appears in the second dictionary. +Preference is given to values in the first dictionary. +-} +intersect : Dict comparable v -> Dict comparable v -> Dict comparable v +intersect t1 t2 = + filter (\k _ -> member k t2) t1 + + +{-| Keep a key-value pair when its key does not appear in the second dictionary. +-} +diff : Dict comparable v -> Dict comparable v -> Dict comparable v +diff t1 t2 = + foldl (\k v t -> remove k t) t1 t2 + + +{-| The most general way of combining two dictionaries. You provide three +accumulators for when a given key appears: + + 1. Only in the left dictionary. + 2. In both dictionaries. + 3. Only in the right dictionary. + +You then traverse all the keys from lowest to highest, building up whatever +you want. +-} +merge + : (comparable -> a -> result -> result) + -> (comparable -> a -> b -> result -> result) + -> (comparable -> b -> result -> result) + -> Dict comparable a + -> Dict comparable b + -> result + -> result +merge leftStep bothStep rightStep leftDict rightDict initialResult = + let + stepState rKey rValue (list, result) = + case list of + [] -> + (list, rightStep rKey rValue result) + + (lKey, lValue) :: rest -> + if lKey < rKey then + stepState rKey rValue (rest, leftStep lKey lValue result) + + else if lKey > rKey then + (list, rightStep rKey rValue result) + + else + (rest, bothStep lKey lValue rValue result) + + (leftovers, intermediateResult) = + foldl stepState (toList leftDict, initialResult) rightDict + in + List.foldl (\(k,v) result -> leftStep k v result) intermediateResult leftovers + + + +-- TRANSFORM + + +{-| Apply a function to all values in a dictionary. +-} +map : (comparable -> a -> b) -> Dict comparable a -> Dict comparable b +map f dict = + case dict of + RBEmpty_elm_builtin _ -> + RBEmpty_elm_builtin LBlack + + RBNode_elm_builtin clr key value left right -> + RBNode_elm_builtin clr key (f key value) (map f left) (map f right) + + +{-| Fold over the key-value pairs in a dictionary, in order from lowest +key to highest key. +-} +foldl : (comparable -> v -> b -> b) -> b -> Dict comparable v -> b +foldl f acc dict = + case dict of + RBEmpty_elm_builtin _ -> + acc + + RBNode_elm_builtin _ key value left right -> + foldl f (f key value (foldl f acc left)) right + + +{-| Fold over the key-value pairs in a dictionary, in order from highest +key to lowest key. +-} +foldr : (comparable -> v -> b -> b) -> b -> Dict comparable v -> b +foldr f acc t = + case t of + RBEmpty_elm_builtin _ -> + acc + + RBNode_elm_builtin _ key value left right -> + foldr f (f key value (foldr f acc right)) left + + +{-| Keep a key-value pair when it satisfies a predicate. -} +filter : (comparable -> v -> Bool) -> Dict comparable v -> Dict comparable v +filter predicate dictionary = + let + add key value dict = + if predicate key value then + insert key value dict + + else + dict + in + foldl add empty dictionary + + +{-| Partition a dictionary according to a predicate. The first dictionary +contains all key-value pairs which satisfy the predicate, and the second +contains the rest. +-} +partition : (comparable -> v -> Bool) -> Dict comparable v -> (Dict comparable v, Dict comparable v) +partition predicate dict = + let + add key value (t1, t2) = + if predicate key value then + (insert key value t1, t2) + + else + (t1, insert key value t2) + in + foldl add (empty, empty) dict + + + +-- LISTS + + +{-| Get all of the keys in a dictionary, sorted from lowest to highest. + + keys (fromList [(0,"Alice"),(1,"Bob")]) == [0,1] +-} +keys : Dict comparable v -> List comparable +keys dict = + foldr (\key value keyList -> key :: keyList) [] dict + + +{-| Get all of the values in a dictionary, in the order of their keys. + + values (fromList [(0,"Alice"),(1,"Bob")]) == ["Alice", "Bob"] +-} +values : Dict comparable v -> List v +values dict = + foldr (\key value valueList -> value :: valueList) [] dict + + +{-| Convert a dictionary into an association list of key-value pairs, sorted by keys. -} +toList : Dict comparable v -> List (comparable,v) +toList dict = + foldr (\key value list -> (key,value) :: list) [] dict + + +{-| Convert an association list into a dictionary. -} +fromList : List (comparable,v) -> Dict comparable v +fromList assocs = + List.foldl (\(key,value) dict -> insert key value dict) empty assocs diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Json/Decode.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Json/Decode.elm new file mode 100644 index 0000000..342e3d0 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Json/Decode.elm @@ -0,0 +1,520 @@ +module Json.Decode exposing + ( Decoder, string, bool, int, float + , nullable, list, array, dict, keyValuePairs + , field, at, index + , maybe, oneOf + , decodeString, decodeValue, Value + , map, map2, map3, map4, map5, map6, map7, map8 + , lazy, value, null, succeed, fail, andThen + ) + +{-| Turn JSON values into Elm values. Definitely check out this [intro to +JSON decoders][guide] to get a feel for how this library works! + +[guide]: https://guide.elm-lang.org/interop/json.html + +# Primitives +@docs Decoder, string, bool, int, float + +# Data Structures +@docs nullable, list, array, dict, keyValuePairs + +# Object Primitives +@docs field, at, index + +# Inconsistent Structure +@docs maybe, oneOf + +# Run Decoders +@docs decodeString, decodeValue, Value + +# Mapping + +**Note:** If you run out of map functions, take a look at [elm-decode-pipeline][pipe] +which makes it easier to handle large objects, but produces lower quality type +errors. + +[pipe]: http://package.elm-lang.org/packages/NoRedInk/elm-decode-pipeline/latest + +@docs map, map2, map3, map4, map5, map6, map7, map8 + +# Fancy Decoding +@docs lazy, value, null, succeed, fail, andThen +-} + + +import Array exposing (Array) +import Dict exposing (Dict) +import Json.Encode as JsEncode +import List +import Maybe exposing (Maybe(..)) +import Result exposing (Result(..)) +import Native.Json + + + +-- PRIMITIVES + + +{-| A value that knows how to decode JSON values. +-} +type Decoder a = Decoder + + +{-| Decode a JSON string into an Elm `String`. + + decodeString string "true" == Err ... + decodeString string "42" == Err ... + decodeString string "3.14" == Err ... + decodeString string "\"hello\"" == Ok "hello" + decodeString string "{ \"hello\": 42 }" == Err ... +-} +string : Decoder String +string = + Native.Json.decodePrimitive "string" + + +{-| Decode a JSON boolean into an Elm `Bool`. + + decodeString bool "true" == Ok True + decodeString bool "42" == Err ... + decodeString bool "3.14" == Err ... + decodeString bool "\"hello\"" == Err ... + decodeString bool "{ \"hello\": 42 }" == Err ... +-} +bool : Decoder Bool +bool = + Native.Json.decodePrimitive "bool" + + +{-| Decode a JSON number into an Elm `Int`. + + decodeString int "true" == Err ... + decodeString int "42" == Ok 42 + decodeString int "3.14" == Err ... + decodeString int "\"hello\"" == Err ... + decodeString int "{ \"hello\": 42 }" == Err ... +-} +int : Decoder Int +int = + Native.Json.decodePrimitive "int" + + +{-| Decode a JSON number into an Elm `Float`. + + decodeString float "true" == Err .. + decodeString float "42" == Ok 42 + decodeString float "3.14" == Ok 3.14 + decodeString float "\"hello\"" == Err ... + decodeString float "{ \"hello\": 42 }" == Err ... +-} +float : Decoder Float +float = + Native.Json.decodePrimitive "float" + + + +-- DATA STRUCTURES + + +{-| Decode a nullable JSON value into an Elm value. + + decodeString (nullable int) "13" == Ok (Just 13) + decodeString (nullable int) "42" == Ok (Just 42) + decodeString (nullable int) "null" == Ok Nothing + decodeString (nullable int) "true" == Err .. +-} +nullable : Decoder a -> Decoder (Maybe a) +nullable decoder = + oneOf + [ null Nothing + , map Just decoder + ] + + +{-| Decode a JSON array into an Elm `List`. + + decodeString (list int) "[1,2,3]" == Ok [1,2,3] + decodeString (list bool) "[true,false]" == Ok [True,False] +-} +list : Decoder a -> Decoder (List a) +list decoder = + Native.Json.decodeContainer "list" decoder + + +{-| Decode a JSON array into an Elm `Array`. + + decodeString (array int) "[1,2,3]" == Ok (Array.fromList [1,2,3]) + decodeString (array bool) "[true,false]" == Ok (Array.fromList [True,False]) +-} +array : Decoder a -> Decoder (Array a) +array decoder = + Native.Json.decodeContainer "array" decoder + + +{-| Decode a JSON object into an Elm `Dict`. + + decodeString (dict int) "{ \"alice\": 42, \"bob\": 99 }" + == Dict.fromList [("alice", 42), ("bob", 99)] +-} +dict : Decoder a -> Decoder (Dict String a) +dict decoder = + map Dict.fromList (keyValuePairs decoder) + + +{-| Decode a JSON object into an Elm `List` of pairs. + + decodeString (keyValuePairs int) "{ \"alice\": 42, \"bob\": 99 }" + == [("alice", 42), ("bob", 99)] +-} +keyValuePairs : Decoder a -> Decoder (List (String, a)) +keyValuePairs = + Native.Json.decodeKeyValuePairs + + + +-- OBJECT PRIMITIVES + + +{-| Decode a JSON object, requiring a particular field. + + decodeString (field "x" int) "{ \"x\": 3 }" == Ok 3 + decodeString (field "x" int) "{ \"x\": 3, \"y\": 4 }" == Ok 3 + decodeString (field "x" int) "{ \"x\": true }" == Err ... + decodeString (field "x" int) "{ \"y\": 4 }" == Err ... + + decodeString (field "name" string) "{ \"name\": \"tom\" }" == Ok "tom" + +The object *can* have other fields. Lots of them! The only thing this decoder +cares about is if `x` is present and that the value there is an `Int`. + +Check out [`map2`](#map2) to see how to decode multiple fields! +-} +field : String -> Decoder a -> Decoder a +field = + Native.Json.decodeField + + +{-| Decode a nested JSON object, requiring certain fields. + + json = """{ "person": { "name": "tom", "age": 42 } }""" + + decodeString (at ["person", "name"] string) json == Ok "tom" + decodeString (at ["person", "age" ] int ) json == Ok "42 + +This is really just a shorthand for saying things like: + + field "person" (field "name" string) == at ["person","name"] string +-} +at : List String -> Decoder a -> Decoder a +at fields decoder = + List.foldr field decoder fields + + +{-| Decode a JSON array, requiring a particular index. + + json = """[ "alice", "bob", "chuck" ]""" + + decodeString (index 0 string) json == Ok "alice" + decodeString (index 1 string) json == Ok "bob" + decodeString (index 2 string) json == Ok "chuck" + decodeString (index 3 string) json == Err ... +-} +index : Int -> Decoder a -> Decoder a +index = + Native.Json.decodeIndex + + + +-- WEIRD STRUCTURE + + +{-| Helpful for dealing with optional fields. Here are a few slightly different +examples: + + json = """{ "name": "tom", "age": 42 }""" + + decodeString (maybe (field "age" int )) json == Ok (Just 42) + decodeString (maybe (field "name" int )) json == Ok Nothing + decodeString (maybe (field "height" float)) json == Ok Nothing + + decodeString (field "age" (maybe int )) json == Ok (Just 42) + decodeString (field "name" (maybe int )) json == Ok Nothing + decodeString (field "height" (maybe float)) json == Err ... + +Notice the last example! It is saying we *must* have a field named `height` and +the content *may* be a float. There is no `height` field, so the decoder fails. + +Point is, `maybe` will make exactly what it contains conditional. For optional +fields, this means you probably want it *outside* a use of `field` or `at`. +-} +maybe : Decoder a -> Decoder (Maybe a) +maybe decoder = + Native.Json.decodeContainer "maybe" decoder + + +{-| Try a bunch of different decoders. This can be useful if the JSON may come +in a couple different formats. For example, say you want to read an array of +numbers, but some of them are `null`. + + import String + + badInt : Decoder Int + badInt = + oneOf [ int, null 0 ] + + -- decodeString (list badInt) "[1,2,null,4]" == Ok [1,2,0,4] + +Why would someone generate JSON like this? Questions like this are not good +for your health. The point is that you can use `oneOf` to handle situations +like this! + +You could also use `oneOf` to help version your data. Try the latest format, +then a few older ones that you still support. You could use `andThen` to be +even more particular if you wanted. +-} +oneOf : List (Decoder a) -> Decoder a +oneOf = + Native.Json.oneOf + + + +-- MAPPING + + +{-| Transform a decoder. Maybe you just want to know the length of a string: + + import String + + stringLength : Decoder Int + stringLength = + map String.length string + +It is often helpful to use `map` with `oneOf`, like when defining `nullable`: + + nullable : Decoder a -> Decoder (Maybe a) + nullable decoder = + oneOf + [ null Nothing + , map Just decoder + ] +-} +map : (a -> value) -> Decoder a -> Decoder value +map = + Native.Json.map1 + + +{-| Try two decoders and then combine the result. We can use this to decode +objects with many fields: + + type alias Point = { x : Float, y : Float } + + point : Decoder Point + point = + map2 Point + (field "x" float) + (field "y" float) + + -- decodeString point """{ "x": 3, "y": 4 }""" == Ok { x = 3, y = 4 } + +It tries each individual decoder and puts the result together with the `Point` +constructor. +-} +map2 : (a -> b -> value) -> Decoder a -> Decoder b -> Decoder value +map2 = + Native.Json.map2 + + +{-| Try three decoders and then combine the result. We can use this to decode +objects with many fields: + + type alias Person = { name : String, age : Int, height : Float } + + person : Decoder Person + person = + map3 Person + (at ["name"] string) + (at ["info","age"] int) + (at ["info","height"] float) + + -- json = """{ "name": "tom", "info": { "age": 42, "height": 1.8 } }""" + -- decodeString point json == Ok { name = "tom", age = 42, height = 1.8 } + +Like `map2` it tries each decoder in order and then give the results to the +`Person` constructor. That can be any function though! +-} +map3 : (a -> b -> c -> value) -> Decoder a -> Decoder b -> Decoder c -> Decoder value +map3 = + Native.Json.map3 + + +{-|-} +map4 : (a -> b -> c -> d -> value) -> Decoder a -> Decoder b -> Decoder c -> Decoder d -> Decoder value +map4 = + Native.Json.map4 + + +{-|-} +map5 : (a -> b -> c -> d -> e -> value) -> Decoder a -> Decoder b -> Decoder c -> Decoder d -> Decoder e -> Decoder value +map5 = + Native.Json.map5 + + +{-|-} +map6 : (a -> b -> c -> d -> e -> f -> value) -> Decoder a -> Decoder b -> Decoder c -> Decoder d -> Decoder e -> Decoder f -> Decoder value +map6 = + Native.Json.map6 + + +{-|-} +map7 : (a -> b -> c -> d -> e -> f -> g -> value) -> Decoder a -> Decoder b -> Decoder c -> Decoder d -> Decoder e -> Decoder f -> Decoder g -> Decoder value +map7 = + Native.Json.map7 + + +{-|-} +map8 : (a -> b -> c -> d -> e -> f -> g -> h -> value) -> Decoder a -> Decoder b -> Decoder c -> Decoder d -> Decoder e -> Decoder f -> Decoder g -> Decoder h -> Decoder value +map8 = + Native.Json.map8 + + + +-- RUN DECODERS + + +{-| Parse the given string into a JSON value and then run the `Decoder` on it. +This will fail if the string is not well-formed JSON or if the `Decoder` +fails for some reason. + + decodeString int "4" == Ok 4 + decodeString int "1 + 2" == Err ... +-} +decodeString : Decoder a -> String -> Result String a +decodeString = + Native.Json.runOnString + + +{-| Run a `Decoder` on some JSON `Value`. You can send these JSON values +through ports, so that is probably the main time you would use this function. +-} +decodeValue : Decoder a -> Value -> Result String a +decodeValue = + Native.Json.run + + +{-| A JSON value. +-} +type alias Value = JsEncode.Value + + + +-- FANCY PRIMITIVES + + +{-| Ignore the JSON and produce a certain Elm value. + + decodeString (succeed 42) "true" == Ok 42 + decodeString (succeed 42) "[1,2,3]" == Ok 42 + decodeString (succeed 42) "hello" == Err ... -- this is not a valid JSON string + +This is handy when used with `oneOf` or `andThen`. +-} +succeed : a -> Decoder a +succeed = + Native.Json.succeed + + +{-| Ignore the JSON and make the decoder fail. This is handy when used with +`oneOf` or `andThen` where you want to give a custom error message in some +case. + +See the [`andThen`](#andThen) docs for an example. +-} +fail : String -> Decoder a +fail = + Native.Json.fail + + +{-| Create decoders that depend on previous results. If you are creating +versioned data, you might do something like this: + + info : Decoder Info + info = + field "version" int + |> andThen infoHelp + + infoHelp : Int -> Decoder Info + infoHelp version = + case version of + 4 -> + infoDecoder4 + + 3 -> + infoDecoder3 + + _ -> + fail <| + "Trying to decode info, but version " + ++ toString version ++ " is not supported." + + -- infoDecoder4 : Decoder Info + -- infoDecoder3 : Decoder Info +-} +andThen : (a -> Decoder b) -> Decoder a -> Decoder b +andThen = + Native.Json.andThen + + +{-| Sometimes you have JSON with recursive structure, like nested comments. +You can use `lazy` to make sure your decoder unrolls lazily. + + type alias Comment = + { message : String + , responses : Responses + } + + type Responses = Responses (List Comment) + + comment : Decoder Comment + comment = + object Comment + |> required "message" string + |> required "responses" (map Responses (list (lazy (\_ -> comment)))) + +If we had said `list comment` instead, we would start expanding the value +infinitely. What is a `comment`? It is a decoder for objects where the +`responses` field contains comments. What is a `comment` though? Etc. + +By using `list (lazy (\_ -> comment))` we make sure the decoder only expands +to be as deep as the JSON we are given. You can read more about recursive data +structures [here][]. + +[here]: https://github.com/elm-lang/elm-compiler/blob/master/hints/recursive-alias.md +-} +lazy : (() -> Decoder a) -> Decoder a +lazy thunk = + andThen thunk (succeed ()) + + +{-| Do not do anything with a JSON value, just bring it into Elm as a `Value`. +This can be useful if you have particularly crazy data that you would like to +deal with later. Or if you are going to send it out a port and do not care +about its structure. +-} +value : Decoder Value +value = + Native.Json.decodePrimitive "value" + + +{-| Decode a `null` value into some Elm value. + + decodeString (null False) "null" == Ok False + decodeString (null 42) "null" == Ok 42 + decodeString (null 42) "42" == Err .. + decodeString (null 42) "false" == Err .. + +So if you ever see a `null`, this will return whatever value you specified. +-} +null : a -> Decoder a +null = + Native.Json.decodeNull diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Json/Encode.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Json/Encode.elm new file mode 100644 index 0000000..29e6fc9 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Json/Encode.elm @@ -0,0 +1,102 @@ +module Json.Encode exposing + ( Value + , encode + , string, int, float, bool, null + , list, array + , object + ) + +{-| Library for turning Elm values into Json values. + +# Encoding +@docs encode, Value + +# Primitives +@docs string, int, float, bool, null + +# Arrays +@docs list, array + +# Objects +@docs object +-} + +import Array exposing (Array) +import Native.Json + + +{-| Represents a JavaScript value. +-} +type Value = Value + + +{-| Convert a `Value` into a prettified string. The first argument specifies +the amount of indentation in the resulting string. + + person = + object + [ ("name", string "Tom") + , ("age", int 42) + ] + + compact = encode 0 person + -- {"name":"Tom","age":42} + + readable = encode 4 person + -- { + -- "name": "Tom", + -- "age": 42 + -- } +-} +encode : Int -> Value -> String +encode = + Native.Json.encode + + +{-|-} +string : String -> Value +string = + Native.Json.identity + + +{-|-} +int : Int -> Value +int = + Native.Json.identity + + +{-| Encode a Float. `Infinity` and `NaN` are encoded as `null`. +-} +float : Float -> Value +float = + Native.Json.identity + + +{-|-} +bool : Bool -> Value +bool = + Native.Json.identity + + +{-|-} +null : Value +null = + Native.Json.encodeNull + + +{-|-} +object : List (String, Value) -> Value +object = + Native.Json.encodeObject + + +{-|-} +array : Array Value -> Value +array = + Native.Json.encodeArray + + +{-|-} +list : List Value -> Value +list = + Native.Json.encodeList diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/List.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/List.elm new file mode 100644 index 0000000..e3c8fb9 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/List.elm @@ -0,0 +1,603 @@ +module List exposing + ( isEmpty, length, reverse, member + , head, tail, filter, take, drop + , repeat, range, (::), append, concat, intersperse + , partition, unzip + , map, map2, map3, map4, map5 + , filterMap, concatMap, indexedMap + , foldr, foldl + , sum, product, maximum, minimum, all, any, scanl + , sort, sortBy, sortWith + ) + +{-| A library for manipulating lists of values. Every value in a +list must have the same type. + +# Basics +@docs isEmpty, length, reverse, member + +# Sub-lists +@docs head, tail, filter, take, drop + +# Putting Lists Together +@docs repeat, range, (::), append, concat, intersperse + +# Taking Lists Apart +@docs partition, unzip + +# Mapping +@docs map, map2, map3, map4, map5 + +If you can think of a legitimate use of `mapN` where `N` is 6 or more, please +let us know on [the list](https://groups.google.com/forum/#!forum/elm-discuss). +The current sentiment is that it is already quite error prone once you get to +4 and possibly should be approached another way. + +# Special Maps +@docs filterMap, concatMap, indexedMap + +# Folding +@docs foldr, foldl + +# Special Folds +@docs sum, product, maximum, minimum, all, any, scanl + +# Sorting +@docs sort, sortBy, sortWith + +-} + +import Basics exposing (..) +import Maybe +import Maybe exposing ( Maybe(Just,Nothing) ) +import Native.List + + +{-| Add an element to the front of a list. Pronounced *cons*. + + 1 :: [2,3] == [1,2,3] + 1 :: [] == [1] +-} +(::) : a -> List a -> List a +(::) = + Native.List.cons + + +infixr 5 :: + + +{-| Extract the first element of a list. + + head [1,2,3] == Just 1 + head [] == Nothing +-} +head : List a -> Maybe a +head list = + case list of + x :: xs -> + Just x + + [] -> + Nothing + + +{-| Extract the rest of the list. + + tail [1,2,3] == Just [2,3] + tail [] == Nothing +-} +tail : List a -> Maybe (List a) +tail list = + case list of + x :: xs -> + Just xs + + [] -> + Nothing + + +{-| Determine if a list is empty. + + isEmpty [] == True +-} +isEmpty : List a -> Bool +isEmpty xs = + case xs of + [] -> + True + + _ -> + False + + +{-| Figure out whether a list contains a value. + + member 9 [1,2,3,4] == False + member 4 [1,2,3,4] == True +-} +member : a -> List a -> Bool +member x xs = + any (\a -> a == x) xs + + +{-| Apply a function to every element of a list. + + map sqrt [1,4,9] == [1,2,3] + + map not [True,False,True] == [False,True,False] +-} +map : (a -> b) -> List a -> List b +map f xs = + foldr (\x acc -> f x :: acc) [] xs + + +{-| Same as `map` but the function is also applied to the index of each +element (starting at zero). + + indexedMap (,) ["Tom","Sue","Bob"] == [ (0,"Tom"), (1,"Sue"), (2,"Bob") ] +-} +indexedMap : (Int -> a -> b) -> List a -> List b +indexedMap f xs = + map2 f (range 0 (length xs - 1)) xs + + +{-| Reduce a list from the left. + + foldl (::) [] [1,2,3] == [3,2,1] +-} +foldl : (a -> b -> b) -> b -> List a -> b +foldl func acc list = + case list of + [] -> + acc + + x :: xs -> + foldl func (func x acc) xs + + +{-| Reduce a list from the right. + + foldr (+) 0 [1,2,3] == 6 +-} +foldr : (a -> b -> b) -> b -> List a -> b +foldr = + Native.List.foldr + + +{-| Reduce a list from the left, building up all of the intermediate results into a list. + + scanl (+) 0 [1,2,3,4] == [0,1,3,6,10] +-} +scanl : (a -> b -> b) -> b -> List a -> List b +scanl f b xs = + let + scan1 x accAcc = + case accAcc of + acc :: _ -> + f x acc :: accAcc + + [] -> + [] -- impossible + in + reverse (foldl scan1 [b] xs) + + +{-| Keep only elements that satisfy the predicate. + + filter isEven [1..6] == [2,4,6] +-} +filter : (a -> Bool) -> List a -> List a +filter pred xs = + let + conditionalCons front back = + if pred front then + front :: back + + else + back + in + foldr conditionalCons [] xs + + +{-| Apply a function that may succeed to all values in the list, but only keep +the successes. + + onlyTeens = + filterMap isTeen [3, 15, 12, 18, 24] == [15, 18] + + isTeen : Int -> Maybe Int + isTeen n = + if 13 <= n && n <= 19 then + Just n + + else + Nothing +-} +filterMap : (a -> Maybe b) -> List a -> List b +filterMap f xs = + foldr (maybeCons f) [] xs + + +maybeCons : (a -> Maybe b) -> a -> List b -> List b +maybeCons f mx xs = + case f mx of + Just x -> + x :: xs + + Nothing -> + xs + + +{-| Determine the length of a list. + + length [1,2,3] == 3 +-} +length : List a -> Int +length xs = + foldl (\_ i -> i + 1) 0 xs + + +{-| Reverse a list. + + reverse [1..4] == [4,3,2,1] +-} +reverse : List a -> List a +reverse list = + foldl (::) [] list + + +{-| Determine if all elements satisfy the predicate. + + all isEven [2,4] == True + all isEven [2,3] == False + all isEven [] == True +-} +all : (a -> Bool) -> List a -> Bool +all isOkay list = + not (any (not << isOkay) list) + + +{-| Determine if any elements satisfy the predicate. + + any isEven [2,3] == True + any isEven [1,3] == False + any isEven [] == False +-} +any : (a -> Bool) -> List a -> Bool +any isOkay list = + case list of + [] -> + False + + x :: xs -> + -- note: (isOkay x || any isOkay xs) would not get TCO + if isOkay x then + True + + else + any isOkay xs + + +{-| Put two lists together. + + append [1,1,2] [3,5,8] == [1,1,2,3,5,8] + append ['a','b'] ['c'] == ['a','b','c'] + +You can also use [the `(++)` operator](Basics#++) to append lists. +-} +append : List a -> List a -> List a +append xs ys = + case ys of + [] -> + xs + + _ -> + foldr (::) ys xs + + +{-| Concatenate a bunch of lists into a single list: + + concat [[1,2],[3],[4,5]] == [1,2,3,4,5] +-} +concat : List (List a) -> List a +concat lists = + foldr append [] lists + + +{-| Map a given function onto a list and flatten the resulting lists. + + concatMap f xs == concat (map f xs) +-} +concatMap : (a -> List b) -> List a -> List b +concatMap f list = + concat (map f list) + + +{-| Get the sum of the list elements. + + sum [1..4] == 10 +-} +sum : List number -> number +sum numbers = + foldl (+) 0 numbers + + +{-| Get the product of the list elements. + + product [1..4] == 24 +-} +product : List number -> number +product numbers = + foldl (*) 1 numbers + + +{-| Find the maximum element in a non-empty list. + + maximum [1,4,2] == Just 4 + maximum [] == Nothing +-} +maximum : List comparable -> Maybe comparable +maximum list = + case list of + x :: xs -> + Just (foldl max x xs) + + _ -> + Nothing + + +{-| Find the minimum element in a non-empty list. + + minimum [3,2,1] == Just 1 + minimum [] == Nothing +-} +minimum : List comparable -> Maybe comparable +minimum list = + case list of + x :: xs -> + Just (foldl min x xs) + + _ -> + Nothing + + +{-| Partition a list based on a predicate. The first list contains all values +that satisfy the predicate, and the second list contains all the value that do +not. + + partition (\x -> x < 3) [0..5] == ([0,1,2], [3,4,5]) + partition isEven [0..5] == ([0,2,4], [1,3,5]) +-} +partition : (a -> Bool) -> List a -> (List a, List a) +partition pred list = + let + step x (trues, falses) = + if pred x then + (x :: trues, falses) + + else + (trues, x :: falses) + in + foldr step ([],[]) list + + +{-| Combine two lists, combining them with the given function. +If one list is longer, the extra elements are dropped. + + map2 (+) [1,2,3] [1,2,3,4] == [2,4,6] + + map2 (,) [1,2,3] ['a','b'] == [ (1,'a'), (2,'b') ] + + pairs : List a -> List b -> List (a,b) + pairs lefts rights = + map2 (,) lefts rights +-} +map2 : (a -> b -> result) -> List a -> List b -> List result +map2 = + Native.List.map2 + + +{-|-} +map3 : (a -> b -> c -> result) -> List a -> List b -> List c -> List result +map3 = + Native.List.map3 + + +{-|-} +map4 : (a -> b -> c -> d -> result) -> List a -> List b -> List c -> List d -> List result +map4 = + Native.List.map4 + + +{-|-} +map5 : (a -> b -> c -> d -> e -> result) -> List a -> List b -> List c -> List d -> List e -> List result +map5 = + Native.List.map5 + + +{-| Decompose a list of tuples into a tuple of lists. + + unzip [(0, True), (17, False), (1337, True)] == ([0,17,1337], [True,False,True]) +-} +unzip : List (a,b) -> (List a, List b) +unzip pairs = + let + step (x,y) (xs,ys) = + (x :: xs, y :: ys) + in + foldr step ([], []) pairs + + +{-| Places the given value between all members of the given list. + + intersperse "on" ["turtles","turtles","turtles"] == ["turtles","on","turtles","on","turtles"] +-} +intersperse : a -> List a -> List a +intersperse sep xs = + case xs of + [] -> + [] + + hd :: tl -> + let + step x rest = + sep :: x :: rest + + spersed = + foldr step [] tl + in + hd :: spersed + + +{-| Take the first *n* members of a list. + + take 2 [1,2,3,4] == [1,2] +-} +take : Int -> List a -> List a +take n list = + takeFast 0 n list + + +takeFast : Int -> Int -> List a -> List a +takeFast ctr n list = + if n <= 0 then + [] + else + case ( n, list ) of + ( _, [] ) -> + list + + ( 1, x :: _ ) -> + [ x ] + + ( 2, x :: y :: _ ) -> + [ x, y ] + + ( 3, x :: y :: z :: _ ) -> + [ x, y, z ] + + ( _, x :: y :: z :: w :: tl ) -> + if ctr > 1000 then + x :: y :: z :: w :: takeTailRec (n - 4) tl + else + x :: y :: z :: w :: takeFast (ctr + 1) (n - 4) tl + + _ -> + list + +takeTailRec : Int -> List a -> List a +takeTailRec n list = + reverse (takeReverse n list []) + + +takeReverse : Int -> List a -> List a -> List a +takeReverse n list taken = + if n <= 0 then + taken + else + case list of + [] -> + taken + + x :: xs -> + takeReverse (n - 1) xs (x :: taken) + + +{-| Drop the first *n* members of a list. + + drop 2 [1,2,3,4] == [3,4] +-} +drop : Int -> List a -> List a +drop n list = + if n <= 0 then + list + + else + case list of + [] -> + list + + x :: xs -> + drop (n-1) xs + + +{-| Create a list with *n* copies of a value: + + repeat 3 (0,0) == [(0,0),(0,0),(0,0)] +-} +repeat : Int -> a -> List a +repeat n value = + repeatHelp [] n value + + +repeatHelp : List a -> Int -> a -> List a +repeatHelp result n value = + if n <= 0 then + result + + else + repeatHelp (value :: result) (n-1) value + + +{-| Create a list of numbers, every element increasing by one. +You give the lowest and highest number that should be in the list. + + range 3 6 == [3, 4, 5, 6] + range 3 3 == [3] + range 6 3 == [] +-} +range : Int -> Int -> List Int +range lo hi = + rangeHelp lo hi [] + + +rangeHelp : Int -> Int -> List Int -> List Int +rangeHelp lo hi list = + if lo <= hi then + rangeHelp lo (hi - 1) (hi :: list) + + else + list + + +{-| Sort values from lowest to highest + + sort [3,1,5] == [1,3,5] +-} +sort : List comparable -> List comparable +sort xs = + sortBy identity xs + + +{-| Sort values by a derived property. + + alice = { name="Alice", height=1.62 } + bob = { name="Bob" , height=1.85 } + chuck = { name="Chuck", height=1.76 } + + sortBy .name [chuck,alice,bob] == [alice,bob,chuck] + sortBy .height [chuck,alice,bob] == [alice,chuck,bob] + + sortBy String.length ["mouse","cat"] == ["cat","mouse"] +-} +sortBy : (a -> comparable) -> List a -> List a +sortBy = + Native.List.sortBy + + +{-| Sort values with a custom comparison function. + + sortWith flippedComparison [1..5] == [5,4,3,2,1] + + flippedComparison a b = + case compare a b of + LT -> GT + EQ -> EQ + GT -> LT + +This is also the most general sort function, allowing you +to define any other: `sort == sortWith compare` +-} +sortWith : (a -> a -> Order) -> List a -> List a +sortWith = + Native.List.sortWith diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Maybe.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Maybe.elm new file mode 100644 index 0000000..337a246 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Maybe.elm @@ -0,0 +1,157 @@ +module Maybe exposing + ( Maybe(Just,Nothing) + , andThen + , map, map2, map3, map4, map5 + , withDefault + ) + +{-| This library fills a bunch of important niches in Elm. A `Maybe` can help +you with optional arguments, error handling, and records with optional fields. + +# Definition +@docs Maybe + +# Common Helpers +@docs withDefault, map, map2, map3, map4, map5 + +# Chaining Maybes +@docs andThen +-} + +{-| Represent values that may or may not exist. It can be useful if you have a +record field that is only filled in sometimes. Or if a function takes a value +sometimes, but does not absolutely need it. + + -- A person, but maybe we do not know their age. + type alias Person = + { name : String + , age : Maybe Int + } + + tom = { name = "Tom", age = Just 42 } + sue = { name = "Sue", age = Nothing } +-} +type Maybe a + = Just a + | Nothing + + +{-| Provide a default value, turning an optional value into a normal +value. This comes in handy when paired with functions like +[`Dict.get`](Dict#get) which gives back a `Maybe`. + + withDefault 100 (Just 42) -- 42 + withDefault 100 Nothing -- 100 + + withDefault "unknown" (Dict.get "Tom" Dict.empty) -- "unknown" + +-} +withDefault : a -> Maybe a -> a +withDefault default maybe = + case maybe of + Just value -> value + Nothing -> default + + +{-| Transform a `Maybe` value with a given function: + + map sqrt (Just 9) == Just 3 + map sqrt Nothing == Nothing +-} +map : (a -> b) -> Maybe a -> Maybe b +map f maybe = + case maybe of + Just value -> Just (f value) + Nothing -> Nothing + + +{-| Apply a function if all the arguments are `Just` a value. + + map2 (+) (Just 3) (Just 4) == Just 7 + map2 (+) (Just 3) Nothing == Nothing + map2 (+) Nothing (Just 4) == Nothing +-} +map2 : (a -> b -> value) -> Maybe a -> Maybe b -> Maybe value +map2 func ma mb = + case (ma,mb) of + (Just a, Just b) -> + Just (func a b) + + _ -> + Nothing + + +{-|-} +map3 : (a -> b -> c -> value) -> Maybe a -> Maybe b -> Maybe c -> Maybe value +map3 func ma mb mc = + case (ma,mb,mc) of + (Just a, Just b, Just c) -> + Just (func a b c) + + _ -> + Nothing + + +{-|-} +map4 : (a -> b -> c -> d -> value) -> Maybe a -> Maybe b -> Maybe c -> Maybe d -> Maybe value +map4 func ma mb mc md = + case (ma,mb,mc,md) of + (Just a, Just b, Just c, Just d) -> + Just (func a b c d) + + _ -> + Nothing + + +{-|-} +map5 : (a -> b -> c -> d -> e -> value) -> Maybe a -> Maybe b -> Maybe c -> Maybe d -> Maybe e -> Maybe value +map5 func ma mb mc md me = + case (ma,mb,mc,md,me) of + (Just a, Just b, Just c, Just d, Just e) -> + Just (func a b c d e) + + _ -> + Nothing + + +{-| Chain together many computations that may fail. It is helpful to see its +definition: + + andThen : (a -> Maybe b) -> Maybe a -> Maybe b + andThen callback maybe = + case maybe of + Just value -> + callback value + + Nothing -> + Nothing + +This means we only continue with the callback if things are going well. For +example, say you need to use (`head : List Int -> Maybe Int`) to get the +first month from a `List` and then make sure it is between 1 and 12: + + toValidMonth : Int -> Maybe Int + toValidMonth month = + if month >= 1 && month <= 12 then + Just month + else + Nothing + + getFirstMonth : List Int -> Maybe Int + getFirstMonth months = + head months + |> andThen toValidMonth + +If `head` fails and results in `Nothing` (because the `List` was `empty`), +this entire chain of operations will short-circuit and result in `Nothing`. +If `toValidMonth` results in `Nothing`, again the chain of computations +will result in `Nothing`. +-} +andThen : (a -> Maybe b) -> Maybe a -> Maybe b +andThen callback maybeValue = + case maybeValue of + Just value -> + callback value + + Nothing -> + Nothing diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Array.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Array.js new file mode 100644 index 0000000..7ddd42d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Array.js @@ -0,0 +1,967 @@ +//import Native.List // + +var _elm_lang$core$Native_Array = function() { + +// A RRB-Tree has two distinct data types. +// Leaf -> "height" is always 0 +// "table" is an array of elements +// Node -> "height" is always greater than 0 +// "table" is an array of child nodes +// "lengths" is an array of accumulated lengths of the child nodes + +// M is the maximal table size. 32 seems fast. E is the allowed increase +// of search steps when concatting to find an index. Lower values will +// decrease balancing, but will increase search steps. +var M = 32; +var E = 2; + +// An empty array. +var empty = { + ctor: '_Array', + height: 0, + table: [] +}; + + +function get(i, array) +{ + if (i < 0 || i >= length(array)) + { + throw new Error( + 'Index ' + i + ' is out of range. Check the length of ' + + 'your array first or use getMaybe or getWithDefault.'); + } + return unsafeGet(i, array); +} + + +function unsafeGet(i, array) +{ + for (var x = array.height; x > 0; x--) + { + var slot = i >> (x * 5); + while (array.lengths[slot] <= i) + { + slot++; + } + if (slot > 0) + { + i -= array.lengths[slot - 1]; + } + array = array.table[slot]; + } + return array.table[i]; +} + + +// Sets the value at the index i. Only the nodes leading to i will get +// copied and updated. +function set(i, item, array) +{ + if (i < 0 || length(array) <= i) + { + return array; + } + return unsafeSet(i, item, array); +} + + +function unsafeSet(i, item, array) +{ + array = nodeCopy(array); + + if (array.height === 0) + { + array.table[i] = item; + } + else + { + var slot = getSlot(i, array); + if (slot > 0) + { + i -= array.lengths[slot - 1]; + } + array.table[slot] = unsafeSet(i, item, array.table[slot]); + } + return array; +} + + +function initialize(len, f) +{ + if (len <= 0) + { + return empty; + } + var h = Math.floor( Math.log(len) / Math.log(M) ); + return initialize_(f, h, 0, len); +} + +function initialize_(f, h, from, to) +{ + if (h === 0) + { + var table = new Array((to - from) % (M + 1)); + for (var i = 0; i < table.length; i++) + { + table[i] = f(from + i); + } + return { + ctor: '_Array', + height: 0, + table: table + }; + } + + var step = Math.pow(M, h); + var table = new Array(Math.ceil((to - from) / step)); + var lengths = new Array(table.length); + for (var i = 0; i < table.length; i++) + { + table[i] = initialize_(f, h - 1, from + (i * step), Math.min(from + ((i + 1) * step), to)); + lengths[i] = length(table[i]) + (i > 0 ? lengths[i-1] : 0); + } + return { + ctor: '_Array', + height: h, + table: table, + lengths: lengths + }; +} + +function fromList(list) +{ + if (list.ctor === '[]') + { + return empty; + } + + // Allocate M sized blocks (table) and write list elements to it. + var table = new Array(M); + var nodes = []; + var i = 0; + + while (list.ctor !== '[]') + { + table[i] = list._0; + list = list._1; + i++; + + // table is full, so we can push a leaf containing it into the + // next node. + if (i === M) + { + var leaf = { + ctor: '_Array', + height: 0, + table: table + }; + fromListPush(leaf, nodes); + table = new Array(M); + i = 0; + } + } + + // Maybe there is something left on the table. + if (i > 0) + { + var leaf = { + ctor: '_Array', + height: 0, + table: table.splice(0, i) + }; + fromListPush(leaf, nodes); + } + + // Go through all of the nodes and eventually push them into higher nodes. + for (var h = 0; h < nodes.length - 1; h++) + { + if (nodes[h].table.length > 0) + { + fromListPush(nodes[h], nodes); + } + } + + var head = nodes[nodes.length - 1]; + if (head.height > 0 && head.table.length === 1) + { + return head.table[0]; + } + else + { + return head; + } +} + +// Push a node into a higher node as a child. +function fromListPush(toPush, nodes) +{ + var h = toPush.height; + + // Maybe the node on this height does not exist. + if (nodes.length === h) + { + var node = { + ctor: '_Array', + height: h + 1, + table: [], + lengths: [] + }; + nodes.push(node); + } + + nodes[h].table.push(toPush); + var len = length(toPush); + if (nodes[h].lengths.length > 0) + { + len += nodes[h].lengths[nodes[h].lengths.length - 1]; + } + nodes[h].lengths.push(len); + + if (nodes[h].table.length === M) + { + fromListPush(nodes[h], nodes); + nodes[h] = { + ctor: '_Array', + height: h + 1, + table: [], + lengths: [] + }; + } +} + +// Pushes an item via push_ to the bottom right of a tree. +function push(item, a) +{ + var pushed = push_(item, a); + if (pushed !== null) + { + return pushed; + } + + var newTree = create(item, a.height); + return siblise(a, newTree); +} + +// Recursively tries to push an item to the bottom-right most +// tree possible. If there is no space left for the item, +// null will be returned. +function push_(item, a) +{ + // Handle resursion stop at leaf level. + if (a.height === 0) + { + if (a.table.length < M) + { + var newA = { + ctor: '_Array', + height: 0, + table: a.table.slice() + }; + newA.table.push(item); + return newA; + } + else + { + return null; + } + } + + // Recursively push + var pushed = push_(item, botRight(a)); + + // There was space in the bottom right tree, so the slot will + // be updated. + if (pushed !== null) + { + var newA = nodeCopy(a); + newA.table[newA.table.length - 1] = pushed; + newA.lengths[newA.lengths.length - 1]++; + return newA; + } + + // When there was no space left, check if there is space left + // for a new slot with a tree which contains only the item + // at the bottom. + if (a.table.length < M) + { + var newSlot = create(item, a.height - 1); + var newA = nodeCopy(a); + newA.table.push(newSlot); + newA.lengths.push(newA.lengths[newA.lengths.length - 1] + length(newSlot)); + return newA; + } + else + { + return null; + } +} + +// Converts an array into a list of elements. +function toList(a) +{ + return toList_(_elm_lang$core$Native_List.Nil, a); +} + +function toList_(list, a) +{ + for (var i = a.table.length - 1; i >= 0; i--) + { + list = + a.height === 0 + ? _elm_lang$core$Native_List.Cons(a.table[i], list) + : toList_(list, a.table[i]); + } + return list; +} + +// Maps a function over the elements of an array. +function map(f, a) +{ + var newA = { + ctor: '_Array', + height: a.height, + table: new Array(a.table.length) + }; + if (a.height > 0) + { + newA.lengths = a.lengths; + } + for (var i = 0; i < a.table.length; i++) + { + newA.table[i] = + a.height === 0 + ? f(a.table[i]) + : map(f, a.table[i]); + } + return newA; +} + +// Maps a function over the elements with their index as first argument. +function indexedMap(f, a) +{ + return indexedMap_(f, a, 0); +} + +function indexedMap_(f, a, from) +{ + var newA = { + ctor: '_Array', + height: a.height, + table: new Array(a.table.length) + }; + if (a.height > 0) + { + newA.lengths = a.lengths; + } + for (var i = 0; i < a.table.length; i++) + { + newA.table[i] = + a.height === 0 + ? A2(f, from + i, a.table[i]) + : indexedMap_(f, a.table[i], i == 0 ? from : from + a.lengths[i - 1]); + } + return newA; +} + +function foldl(f, b, a) +{ + if (a.height === 0) + { + for (var i = 0; i < a.table.length; i++) + { + b = A2(f, a.table[i], b); + } + } + else + { + for (var i = 0; i < a.table.length; i++) + { + b = foldl(f, b, a.table[i]); + } + } + return b; +} + +function foldr(f, b, a) +{ + if (a.height === 0) + { + for (var i = a.table.length; i--; ) + { + b = A2(f, a.table[i], b); + } + } + else + { + for (var i = a.table.length; i--; ) + { + b = foldr(f, b, a.table[i]); + } + } + return b; +} + +// TODO: currently, it slices the right, then the left. This can be +// optimized. +function slice(from, to, a) +{ + if (from < 0) + { + from += length(a); + } + if (to < 0) + { + to += length(a); + } + return sliceLeft(from, sliceRight(to, a)); +} + +function sliceRight(to, a) +{ + if (to === length(a)) + { + return a; + } + + // Handle leaf level. + if (a.height === 0) + { + var newA = { ctor:'_Array', height:0 }; + newA.table = a.table.slice(0, to); + return newA; + } + + // Slice the right recursively. + var right = getSlot(to, a); + var sliced = sliceRight(to - (right > 0 ? a.lengths[right - 1] : 0), a.table[right]); + + // Maybe the a node is not even needed, as sliced contains the whole slice. + if (right === 0) + { + return sliced; + } + + // Create new node. + var newA = { + ctor: '_Array', + height: a.height, + table: a.table.slice(0, right), + lengths: a.lengths.slice(0, right) + }; + if (sliced.table.length > 0) + { + newA.table[right] = sliced; + newA.lengths[right] = length(sliced) + (right > 0 ? newA.lengths[right - 1] : 0); + } + return newA; +} + +function sliceLeft(from, a) +{ + if (from === 0) + { + return a; + } + + // Handle leaf level. + if (a.height === 0) + { + var newA = { ctor:'_Array', height:0 }; + newA.table = a.table.slice(from, a.table.length + 1); + return newA; + } + + // Slice the left recursively. + var left = getSlot(from, a); + var sliced = sliceLeft(from - (left > 0 ? a.lengths[left - 1] : 0), a.table[left]); + + // Maybe the a node is not even needed, as sliced contains the whole slice. + if (left === a.table.length - 1) + { + return sliced; + } + + // Create new node. + var newA = { + ctor: '_Array', + height: a.height, + table: a.table.slice(left, a.table.length + 1), + lengths: new Array(a.table.length - left) + }; + newA.table[0] = sliced; + var len = 0; + for (var i = 0; i < newA.table.length; i++) + { + len += length(newA.table[i]); + newA.lengths[i] = len; + } + + return newA; +} + +// Appends two trees. +function append(a,b) +{ + if (a.table.length === 0) + { + return b; + } + if (b.table.length === 0) + { + return a; + } + + var c = append_(a, b); + + // Check if both nodes can be crunshed together. + if (c[0].table.length + c[1].table.length <= M) + { + if (c[0].table.length === 0) + { + return c[1]; + } + if (c[1].table.length === 0) + { + return c[0]; + } + + // Adjust .table and .lengths + c[0].table = c[0].table.concat(c[1].table); + if (c[0].height > 0) + { + var len = length(c[0]); + for (var i = 0; i < c[1].lengths.length; i++) + { + c[1].lengths[i] += len; + } + c[0].lengths = c[0].lengths.concat(c[1].lengths); + } + + return c[0]; + } + + if (c[0].height > 0) + { + var toRemove = calcToRemove(a, b); + if (toRemove > E) + { + c = shuffle(c[0], c[1], toRemove); + } + } + + return siblise(c[0], c[1]); +} + +// Returns an array of two nodes; right and left. One node _may_ be empty. +function append_(a, b) +{ + if (a.height === 0 && b.height === 0) + { + return [a, b]; + } + + if (a.height !== 1 || b.height !== 1) + { + if (a.height === b.height) + { + a = nodeCopy(a); + b = nodeCopy(b); + var appended = append_(botRight(a), botLeft(b)); + + insertRight(a, appended[1]); + insertLeft(b, appended[0]); + } + else if (a.height > b.height) + { + a = nodeCopy(a); + var appended = append_(botRight(a), b); + + insertRight(a, appended[0]); + b = parentise(appended[1], appended[1].height + 1); + } + else + { + b = nodeCopy(b); + var appended = append_(a, botLeft(b)); + + var left = appended[0].table.length === 0 ? 0 : 1; + var right = left === 0 ? 1 : 0; + insertLeft(b, appended[left]); + a = parentise(appended[right], appended[right].height + 1); + } + } + + // Check if balancing is needed and return based on that. + if (a.table.length === 0 || b.table.length === 0) + { + return [a, b]; + } + + var toRemove = calcToRemove(a, b); + if (toRemove <= E) + { + return [a, b]; + } + return shuffle(a, b, toRemove); +} + +// Helperfunctions for append_. Replaces a child node at the side of the parent. +function insertRight(parent, node) +{ + var index = parent.table.length - 1; + parent.table[index] = node; + parent.lengths[index] = length(node); + parent.lengths[index] += index > 0 ? parent.lengths[index - 1] : 0; +} + +function insertLeft(parent, node) +{ + if (node.table.length > 0) + { + parent.table[0] = node; + parent.lengths[0] = length(node); + + var len = length(parent.table[0]); + for (var i = 1; i < parent.lengths.length; i++) + { + len += length(parent.table[i]); + parent.lengths[i] = len; + } + } + else + { + parent.table.shift(); + for (var i = 1; i < parent.lengths.length; i++) + { + parent.lengths[i] = parent.lengths[i] - parent.lengths[0]; + } + parent.lengths.shift(); + } +} + +// Returns the extra search steps for E. Refer to the paper. +function calcToRemove(a, b) +{ + var subLengths = 0; + for (var i = 0; i < a.table.length; i++) + { + subLengths += a.table[i].table.length; + } + for (var i = 0; i < b.table.length; i++) + { + subLengths += b.table[i].table.length; + } + + var toRemove = a.table.length + b.table.length; + return toRemove - (Math.floor((subLengths - 1) / M) + 1); +} + +// get2, set2 and saveSlot are helpers for accessing elements over two arrays. +function get2(a, b, index) +{ + return index < a.length + ? a[index] + : b[index - a.length]; +} + +function set2(a, b, index, value) +{ + if (index < a.length) + { + a[index] = value; + } + else + { + b[index - a.length] = value; + } +} + +function saveSlot(a, b, index, slot) +{ + set2(a.table, b.table, index, slot); + + var l = (index === 0 || index === a.lengths.length) + ? 0 + : get2(a.lengths, a.lengths, index - 1); + + set2(a.lengths, b.lengths, index, l + length(slot)); +} + +// Creates a node or leaf with a given length at their arrays for perfomance. +// Is only used by shuffle. +function createNode(h, length) +{ + if (length < 0) + { + length = 0; + } + var a = { + ctor: '_Array', + height: h, + table: new Array(length) + }; + if (h > 0) + { + a.lengths = new Array(length); + } + return a; +} + +// Returns an array of two balanced nodes. +function shuffle(a, b, toRemove) +{ + var newA = createNode(a.height, Math.min(M, a.table.length + b.table.length - toRemove)); + var newB = createNode(a.height, newA.table.length - (a.table.length + b.table.length - toRemove)); + + // Skip the slots with size M. More precise: copy the slot references + // to the new node + var read = 0; + while (get2(a.table, b.table, read).table.length % M === 0) + { + set2(newA.table, newB.table, read, get2(a.table, b.table, read)); + set2(newA.lengths, newB.lengths, read, get2(a.lengths, b.lengths, read)); + read++; + } + + // Pulling items from left to right, caching in a slot before writing + // it into the new nodes. + var write = read; + var slot = new createNode(a.height - 1, 0); + var from = 0; + + // If the current slot is still containing data, then there will be at + // least one more write, so we do not break this loop yet. + while (read - write - (slot.table.length > 0 ? 1 : 0) < toRemove) + { + // Find out the max possible items for copying. + var source = get2(a.table, b.table, read); + var to = Math.min(M - slot.table.length, source.table.length); + + // Copy and adjust size table. + slot.table = slot.table.concat(source.table.slice(from, to)); + if (slot.height > 0) + { + var len = slot.lengths.length; + for (var i = len; i < len + to - from; i++) + { + slot.lengths[i] = length(slot.table[i]); + slot.lengths[i] += (i > 0 ? slot.lengths[i - 1] : 0); + } + } + + from += to; + + // Only proceed to next slots[i] if the current one was + // fully copied. + if (source.table.length <= to) + { + read++; from = 0; + } + + // Only create a new slot if the current one is filled up. + if (slot.table.length === M) + { + saveSlot(newA, newB, write, slot); + slot = createNode(a.height - 1, 0); + write++; + } + } + + // Cleanup after the loop. Copy the last slot into the new nodes. + if (slot.table.length > 0) + { + saveSlot(newA, newB, write, slot); + write++; + } + + // Shift the untouched slots to the left + while (read < a.table.length + b.table.length ) + { + saveSlot(newA, newB, write, get2(a.table, b.table, read)); + read++; + write++; + } + + return [newA, newB]; +} + +// Navigation functions +function botRight(a) +{ + return a.table[a.table.length - 1]; +} +function botLeft(a) +{ + return a.table[0]; +} + +// Copies a node for updating. Note that you should not use this if +// only updating only one of "table" or "lengths" for performance reasons. +function nodeCopy(a) +{ + var newA = { + ctor: '_Array', + height: a.height, + table: a.table.slice() + }; + if (a.height > 0) + { + newA.lengths = a.lengths.slice(); + } + return newA; +} + +// Returns how many items are in the tree. +function length(array) +{ + if (array.height === 0) + { + return array.table.length; + } + else + { + return array.lengths[array.lengths.length - 1]; + } +} + +// Calculates in which slot of "table" the item probably is, then +// find the exact slot via forward searching in "lengths". Returns the index. +function getSlot(i, a) +{ + var slot = i >> (5 * a.height); + while (a.lengths[slot] <= i) + { + slot++; + } + return slot; +} + +// Recursively creates a tree with a given height containing +// only the given item. +function create(item, h) +{ + if (h === 0) + { + return { + ctor: '_Array', + height: 0, + table: [item] + }; + } + return { + ctor: '_Array', + height: h, + table: [create(item, h - 1)], + lengths: [1] + }; +} + +// Recursively creates a tree that contains the given tree. +function parentise(tree, h) +{ + if (h === tree.height) + { + return tree; + } + + return { + ctor: '_Array', + height: h, + table: [parentise(tree, h - 1)], + lengths: [length(tree)] + }; +} + +// Emphasizes blood brotherhood beneath two trees. +function siblise(a, b) +{ + return { + ctor: '_Array', + height: a.height + 1, + table: [a, b], + lengths: [length(a), length(a) + length(b)] + }; +} + +function toJSArray(a) +{ + var jsArray = new Array(length(a)); + toJSArray_(jsArray, 0, a); + return jsArray; +} + +function toJSArray_(jsArray, i, a) +{ + for (var t = 0; t < a.table.length; t++) + { + if (a.height === 0) + { + jsArray[i + t] = a.table[t]; + } + else + { + var inc = t === 0 ? 0 : a.lengths[t - 1]; + toJSArray_(jsArray, i + inc, a.table[t]); + } + } +} + +function fromJSArray(jsArray) +{ + if (jsArray.length === 0) + { + return empty; + } + var h = Math.floor(Math.log(jsArray.length) / Math.log(M)); + return fromJSArray_(jsArray, h, 0, jsArray.length); +} + +function fromJSArray_(jsArray, h, from, to) +{ + if (h === 0) + { + return { + ctor: '_Array', + height: 0, + table: jsArray.slice(from, to) + }; + } + + var step = Math.pow(M, h); + var table = new Array(Math.ceil((to - from) / step)); + var lengths = new Array(table.length); + for (var i = 0; i < table.length; i++) + { + table[i] = fromJSArray_(jsArray, h - 1, from + (i * step), Math.min(from + ((i + 1) * step), to)); + lengths[i] = length(table[i]) + (i > 0 ? lengths[i - 1] : 0); + } + return { + ctor: '_Array', + height: h, + table: table, + lengths: lengths + }; +} + +return { + empty: empty, + fromList: fromList, + toList: toList, + initialize: F2(initialize), + append: F2(append), + push: F2(push), + slice: F3(slice), + get: F2(get), + set: F3(set), + map: F2(map), + indexedMap: F2(indexedMap), + foldl: F3(foldl), + foldr: F3(foldr), + length: length, + + toJSArray: toJSArray, + fromJSArray: fromJSArray +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Basics.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Basics.js new file mode 100644 index 0000000..1d97bf3 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Basics.js @@ -0,0 +1,141 @@ +//import Native.Utils // + +var _elm_lang$core$Native_Basics = function() { + +function div(a, b) +{ + return (a / b) | 0; +} +function rem(a, b) +{ + return a % b; +} +function mod(a, b) +{ + if (b === 0) + { + throw new Error('Cannot perform mod 0. Division by zero error.'); + } + var r = a % b; + var m = a === 0 ? 0 : (b > 0 ? (a >= 0 ? r : r + b) : -mod(-a, -b)); + + return m === b ? 0 : m; +} +function logBase(base, n) +{ + return Math.log(n) / Math.log(base); +} +function negate(n) +{ + return -n; +} +function abs(n) +{ + return n < 0 ? -n : n; +} + +function min(a, b) +{ + return _elm_lang$core$Native_Utils.cmp(a, b) < 0 ? a : b; +} +function max(a, b) +{ + return _elm_lang$core$Native_Utils.cmp(a, b) > 0 ? a : b; +} +function clamp(lo, hi, n) +{ + return _elm_lang$core$Native_Utils.cmp(n, lo) < 0 + ? lo + : _elm_lang$core$Native_Utils.cmp(n, hi) > 0 + ? hi + : n; +} + +var ord = ['LT', 'EQ', 'GT']; + +function compare(x, y) +{ + return { ctor: ord[_elm_lang$core$Native_Utils.cmp(x, y) + 1] }; +} + +function xor(a, b) +{ + return a !== b; +} +function not(b) +{ + return !b; +} +function isInfinite(n) +{ + return n === Infinity || n === -Infinity; +} + +function truncate(n) +{ + return n | 0; +} + +function degrees(d) +{ + return d * Math.PI / 180; +} +function turns(t) +{ + return 2 * Math.PI * t; +} +function fromPolar(point) +{ + var r = point._0; + var t = point._1; + return _elm_lang$core$Native_Utils.Tuple2(r * Math.cos(t), r * Math.sin(t)); +} +function toPolar(point) +{ + var x = point._0; + var y = point._1; + return _elm_lang$core$Native_Utils.Tuple2(Math.sqrt(x * x + y * y), Math.atan2(y, x)); +} + +return { + div: F2(div), + rem: F2(rem), + mod: F2(mod), + + pi: Math.PI, + e: Math.E, + cos: Math.cos, + sin: Math.sin, + tan: Math.tan, + acos: Math.acos, + asin: Math.asin, + atan: Math.atan, + atan2: F2(Math.atan2), + + degrees: degrees, + turns: turns, + fromPolar: fromPolar, + toPolar: toPolar, + + sqrt: Math.sqrt, + logBase: F2(logBase), + negate: negate, + abs: abs, + min: F2(min), + max: F2(max), + clamp: F3(clamp), + compare: F2(compare), + + xor: F2(xor), + not: not, + + truncate: truncate, + ceiling: Math.ceil, + floor: Math.floor, + round: Math.round, + toFloat: function(x) { return x; }, + isNaN: isNaN, + isInfinite: isInfinite +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Bitwise.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Bitwise.js new file mode 100644 index 0000000..a597f82 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Bitwise.js @@ -0,0 +1,13 @@ +var _elm_lang$core$Native_Bitwise = function() { + +return { + and: F2(function and(a, b) { return a & b; }), + or: F2(function or(a, b) { return a | b; }), + xor: F2(function xor(a, b) { return a ^ b; }), + complement: function complement(a) { return ~a; }, + shiftLeftBy: F2(function(offset, a) { return a << offset; }), + shiftRightBy: F2(function(offset, a) { return a >> offset; }), + shiftRightZfBy: F2(function(offset, a) { return a >>> offset; }) +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Char.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Char.js new file mode 100644 index 0000000..56c2957 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Char.js @@ -0,0 +1,14 @@ +//import Native.Utils // + +var _elm_lang$core$Native_Char = function() { + +return { + fromCode: function(c) { return _elm_lang$core$Native_Utils.chr(String.fromCharCode(c)); }, + toCode: function(c) { return c.charCodeAt(0); }, + toUpper: function(c) { return _elm_lang$core$Native_Utils.chr(c.toUpperCase()); }, + toLower: function(c) { return _elm_lang$core$Native_Utils.chr(c.toLowerCase()); }, + toLocaleUpper: function(c) { return _elm_lang$core$Native_Utils.chr(c.toLocaleUpperCase()); }, + toLocaleLower: function(c) { return _elm_lang$core$Native_Utils.chr(c.toLocaleLowerCase()); } +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Date.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Date.js new file mode 100644 index 0000000..cb64193 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Date.js @@ -0,0 +1,33 @@ +//import Result // + +var _elm_lang$core$Native_Date = function() { + +function fromString(str) +{ + var date = new Date(str); + return isNaN(date.getTime()) + ? _elm_lang$core$Result$Err('Unable to parse \'' + str + '\' as a date. Dates must be in the ISO 8601 format.') + : _elm_lang$core$Result$Ok(date); +} + +var dayTable = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var monthTable = + ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + + +return { + fromString: fromString, + year: function(d) { return d.getFullYear(); }, + month: function(d) { return { ctor: monthTable[d.getMonth()] }; }, + day: function(d) { return d.getDate(); }, + hour: function(d) { return d.getHours(); }, + minute: function(d) { return d.getMinutes(); }, + second: function(d) { return d.getSeconds(); }, + millisecond: function(d) { return d.getMilliseconds(); }, + toTime: function(d) { return d.getTime(); }, + fromTime: function(t) { return new Date(t); }, + dayOfWeek: function(d) { return { ctor: dayTable[d.getDay()] }; } +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Debug.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Debug.js new file mode 100644 index 0000000..15ce1dc --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Debug.js @@ -0,0 +1,30 @@ +//import Native.Utils // + +var _elm_lang$core$Native_Debug = function() { + +function log(tag, value) +{ + var msg = tag + ': ' + _elm_lang$core$Native_Utils.toString(value); + var process = process || {}; + if (process.stdout) + { + process.stdout.write(msg); + } + else + { + console.log(msg); + } + return value; +} + +function crash(message) +{ + throw new Error(message); +} + +return { + crash: crash, + log: F2(log) +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Json.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Json.js new file mode 100644 index 0000000..b21d82a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Json.js @@ -0,0 +1,580 @@ +//import Maybe, Native.Array, Native.List, Native.Utils, Result // + +var _elm_lang$core$Native_Json = function() { + + +// CORE DECODERS + +function succeed(msg) +{ + return { + ctor: '', + tag: 'succeed', + msg: msg + }; +} + +function fail(msg) +{ + return { + ctor: '', + tag: 'fail', + msg: msg + }; +} + +function decodePrimitive(tag) +{ + return { + ctor: '', + tag: tag + }; +} + +function decodeContainer(tag, decoder) +{ + return { + ctor: '', + tag: tag, + decoder: decoder + }; +} + +function decodeNull(value) +{ + return { + ctor: '', + tag: 'null', + value: value + }; +} + +function decodeField(field, decoder) +{ + return { + ctor: '', + tag: 'field', + field: field, + decoder: decoder + }; +} + +function decodeIndex(index, decoder) +{ + return { + ctor: '', + tag: 'index', + index: index, + decoder: decoder + }; +} + +function decodeKeyValuePairs(decoder) +{ + return { + ctor: '', + tag: 'key-value', + decoder: decoder + }; +} + +function mapMany(f, decoders) +{ + return { + ctor: '', + tag: 'map-many', + func: f, + decoders: decoders + }; +} + +function andThen(callback, decoder) +{ + return { + ctor: '', + tag: 'andThen', + decoder: decoder, + callback: callback + }; +} + +function oneOf(decoders) +{ + return { + ctor: '', + tag: 'oneOf', + decoders: decoders + }; +} + + +// DECODING OBJECTS + +function map1(f, d1) +{ + return mapMany(f, [d1]); +} + +function map2(f, d1, d2) +{ + return mapMany(f, [d1, d2]); +} + +function map3(f, d1, d2, d3) +{ + return mapMany(f, [d1, d2, d3]); +} + +function map4(f, d1, d2, d3, d4) +{ + return mapMany(f, [d1, d2, d3, d4]); +} + +function map5(f, d1, d2, d3, d4, d5) +{ + return mapMany(f, [d1, d2, d3, d4, d5]); +} + +function map6(f, d1, d2, d3, d4, d5, d6) +{ + return mapMany(f, [d1, d2, d3, d4, d5, d6]); +} + +function map7(f, d1, d2, d3, d4, d5, d6, d7) +{ + return mapMany(f, [d1, d2, d3, d4, d5, d6, d7]); +} + +function map8(f, d1, d2, d3, d4, d5, d6, d7, d8) +{ + return mapMany(f, [d1, d2, d3, d4, d5, d6, d7, d8]); +} + + +// DECODE HELPERS + +function ok(value) +{ + return { tag: 'ok', value: value }; +} + +function badPrimitive(type, value) +{ + return { tag: 'primitive', type: type, value: value }; +} + +function badIndex(index, nestedProblems) +{ + return { tag: 'index', index: index, rest: nestedProblems }; +} + +function badField(field, nestedProblems) +{ + return { tag: 'field', field: field, rest: nestedProblems }; +} + +function badIndex(index, nestedProblems) +{ + return { tag: 'index', index: index, rest: nestedProblems }; +} + +function badOneOf(problems) +{ + return { tag: 'oneOf', problems: problems }; +} + +function bad(msg) +{ + return { tag: 'fail', msg: msg }; +} + +function badToString(problem) +{ + var context = '_'; + while (problem) + { + switch (problem.tag) + { + case 'primitive': + return 'Expecting ' + problem.type + + (context === '_' ? '' : ' at ' + context) + + ' but instead got: ' + jsToString(problem.value); + + case 'index': + context += '[' + problem.index + ']'; + problem = problem.rest; + break; + + case 'field': + context += '.' + problem.field; + problem = problem.rest; + break; + + case 'index': + context += '[' + problem.index + ']'; + problem = problem.rest; + break; + + case 'oneOf': + var problems = problem.problems; + for (var i = 0; i < problems.length; i++) + { + problems[i] = badToString(problems[i]); + } + return 'I ran into the following problems' + + (context === '_' ? '' : ' at ' + context) + + ':\n\n' + problems.join('\n'); + + case 'fail': + return 'I ran into a `fail` decoder' + + (context === '_' ? '' : ' at ' + context) + + ': ' + problem.msg; + } + } +} + +function jsToString(value) +{ + return value === undefined + ? 'undefined' + : JSON.stringify(value); +} + + +// DECODE + +function runOnString(decoder, string) +{ + var json; + try + { + json = JSON.parse(string); + } + catch (e) + { + return _elm_lang$core$Result$Err('Given an invalid JSON: ' + e.message); + } + return run(decoder, json); +} + +function run(decoder, value) +{ + var result = runHelp(decoder, value); + return (result.tag === 'ok') + ? _elm_lang$core$Result$Ok(result.value) + : _elm_lang$core$Result$Err(badToString(result)); +} + +function runHelp(decoder, value) +{ + switch (decoder.tag) + { + case 'bool': + return (typeof value === 'boolean') + ? ok(value) + : badPrimitive('a Bool', value); + + case 'int': + if (typeof value !== 'number') { + return badPrimitive('an Int', value); + } + + if (-2147483647 < value && value < 2147483647 && (value | 0) === value) { + return ok(value); + } + + if (isFinite(value) && !(value % 1)) { + return ok(value); + } + + return badPrimitive('an Int', value); + + case 'float': + return (typeof value === 'number') + ? ok(value) + : badPrimitive('a Float', value); + + case 'string': + return (typeof value === 'string') + ? ok(value) + : (value instanceof String) + ? ok(value + '') + : badPrimitive('a String', value); + + case 'null': + return (value === null) + ? ok(decoder.value) + : badPrimitive('null', value); + + case 'value': + return ok(value); + + case 'list': + if (!(value instanceof Array)) + { + return badPrimitive('a List', value); + } + + var list = _elm_lang$core$Native_List.Nil; + for (var i = value.length; i--; ) + { + var result = runHelp(decoder.decoder, value[i]); + if (result.tag !== 'ok') + { + return badIndex(i, result) + } + list = _elm_lang$core$Native_List.Cons(result.value, list); + } + return ok(list); + + case 'array': + if (!(value instanceof Array)) + { + return badPrimitive('an Array', value); + } + + var len = value.length; + var array = new Array(len); + for (var i = len; i--; ) + { + var result = runHelp(decoder.decoder, value[i]); + if (result.tag !== 'ok') + { + return badIndex(i, result); + } + array[i] = result.value; + } + return ok(_elm_lang$core$Native_Array.fromJSArray(array)); + + case 'maybe': + var result = runHelp(decoder.decoder, value); + return (result.tag === 'ok') + ? ok(_elm_lang$core$Maybe$Just(result.value)) + : ok(_elm_lang$core$Maybe$Nothing); + + case 'field': + var field = decoder.field; + if (typeof value !== 'object' || value === null || !(field in value)) + { + return badPrimitive('an object with a field named `' + field + '`', value); + } + + var result = runHelp(decoder.decoder, value[field]); + return (result.tag === 'ok') ? result : badField(field, result); + + case 'index': + var index = decoder.index; + if (!(value instanceof Array)) + { + return badPrimitive('an array', value); + } + if (index >= value.length) + { + return badPrimitive('a longer array. Need index ' + index + ' but there are only ' + value.length + ' entries', value); + } + + var result = runHelp(decoder.decoder, value[index]); + return (result.tag === 'ok') ? result : badIndex(index, result); + + case 'key-value': + if (typeof value !== 'object' || value === null || value instanceof Array) + { + return badPrimitive('an object', value); + } + + var keyValuePairs = _elm_lang$core$Native_List.Nil; + for (var key in value) + { + var result = runHelp(decoder.decoder, value[key]); + if (result.tag !== 'ok') + { + return badField(key, result); + } + var pair = _elm_lang$core$Native_Utils.Tuple2(key, result.value); + keyValuePairs = _elm_lang$core$Native_List.Cons(pair, keyValuePairs); + } + return ok(keyValuePairs); + + case 'map-many': + var answer = decoder.func; + var decoders = decoder.decoders; + for (var i = 0; i < decoders.length; i++) + { + var result = runHelp(decoders[i], value); + if (result.tag !== 'ok') + { + return result; + } + answer = answer(result.value); + } + return ok(answer); + + case 'andThen': + var result = runHelp(decoder.decoder, value); + return (result.tag !== 'ok') + ? result + : runHelp(decoder.callback(result.value), value); + + case 'oneOf': + var errors = []; + var temp = decoder.decoders; + while (temp.ctor !== '[]') + { + var result = runHelp(temp._0, value); + + if (result.tag === 'ok') + { + return result; + } + + errors.push(result); + + temp = temp._1; + } + return badOneOf(errors); + + case 'fail': + return bad(decoder.msg); + + case 'succeed': + return ok(decoder.msg); + } +} + + +// EQUALITY + +function equality(a, b) +{ + if (a === b) + { + return true; + } + + if (a.tag !== b.tag) + { + return false; + } + + switch (a.tag) + { + case 'succeed': + case 'fail': + return a.msg === b.msg; + + case 'bool': + case 'int': + case 'float': + case 'string': + case 'value': + return true; + + case 'null': + return a.value === b.value; + + case 'list': + case 'array': + case 'maybe': + case 'key-value': + return equality(a.decoder, b.decoder); + + case 'field': + return a.field === b.field && equality(a.decoder, b.decoder); + + case 'index': + return a.index === b.index && equality(a.decoder, b.decoder); + + case 'map-many': + if (a.func !== b.func) + { + return false; + } + return listEquality(a.decoders, b.decoders); + + case 'andThen': + return a.callback === b.callback && equality(a.decoder, b.decoder); + + case 'oneOf': + return listEquality(a.decoders, b.decoders); + } +} + +function listEquality(aDecoders, bDecoders) +{ + var len = aDecoders.length; + if (len !== bDecoders.length) + { + return false; + } + for (var i = 0; i < len; i++) + { + if (!equality(aDecoders[i], bDecoders[i])) + { + return false; + } + } + return true; +} + + +// ENCODE + +function encode(indentLevel, value) +{ + return JSON.stringify(value, null, indentLevel); +} + +function identity(value) +{ + return value; +} + +function encodeObject(keyValuePairs) +{ + var obj = {}; + while (keyValuePairs.ctor !== '[]') + { + var pair = keyValuePairs._0; + obj[pair._0] = pair._1; + keyValuePairs = keyValuePairs._1; + } + return obj; +} + +return { + encode: F2(encode), + runOnString: F2(runOnString), + run: F2(run), + + decodeNull: decodeNull, + decodePrimitive: decodePrimitive, + decodeContainer: F2(decodeContainer), + + decodeField: F2(decodeField), + decodeIndex: F2(decodeIndex), + + map1: F2(map1), + map2: F3(map2), + map3: F4(map3), + map4: F5(map4), + map5: F6(map5), + map6: F7(map6), + map7: F8(map7), + map8: F9(map8), + decodeKeyValuePairs: decodeKeyValuePairs, + + andThen: F2(andThen), + fail: fail, + succeed: succeed, + oneOf: oneOf, + + identity: identity, + encodeNull: null, + encodeArray: _elm_lang$core$Native_Array.toJSArray, + encodeList: _elm_lang$core$Native_List.toArray, + encodeObject: encodeObject, + + equality: equality +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/List.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/List.js new file mode 100644 index 0000000..ccefb9c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/List.js @@ -0,0 +1,137 @@ +//import Native.Utils // + +var _elm_lang$core$Native_List = function() { + +var Nil = { ctor: '[]' }; + +function Cons(hd, tl) +{ + return { ctor: '::', _0: hd, _1: tl }; +} + +function fromArray(arr) +{ + var out = Nil; + for (var i = arr.length; i--; ) + { + out = Cons(arr[i], out); + } + return out; +} + +function toArray(xs) +{ + var out = []; + while (xs.ctor !== '[]') + { + out.push(xs._0); + xs = xs._1; + } + return out; +} + +function foldr(f, b, xs) +{ + var arr = toArray(xs); + var acc = b; + for (var i = arr.length; i--; ) + { + acc = A2(f, arr[i], acc); + } + return acc; +} + +function map2(f, xs, ys) +{ + var arr = []; + while (xs.ctor !== '[]' && ys.ctor !== '[]') + { + arr.push(A2(f, xs._0, ys._0)); + xs = xs._1; + ys = ys._1; + } + return fromArray(arr); +} + +function map3(f, xs, ys, zs) +{ + var arr = []; + while (xs.ctor !== '[]' && ys.ctor !== '[]' && zs.ctor !== '[]') + { + arr.push(A3(f, xs._0, ys._0, zs._0)); + xs = xs._1; + ys = ys._1; + zs = zs._1; + } + return fromArray(arr); +} + +function map4(f, ws, xs, ys, zs) +{ + var arr = []; + while ( ws.ctor !== '[]' + && xs.ctor !== '[]' + && ys.ctor !== '[]' + && zs.ctor !== '[]') + { + arr.push(A4(f, ws._0, xs._0, ys._0, zs._0)); + ws = ws._1; + xs = xs._1; + ys = ys._1; + zs = zs._1; + } + return fromArray(arr); +} + +function map5(f, vs, ws, xs, ys, zs) +{ + var arr = []; + while ( vs.ctor !== '[]' + && ws.ctor !== '[]' + && xs.ctor !== '[]' + && ys.ctor !== '[]' + && zs.ctor !== '[]') + { + arr.push(A5(f, vs._0, ws._0, xs._0, ys._0, zs._0)); + vs = vs._1; + ws = ws._1; + xs = xs._1; + ys = ys._1; + zs = zs._1; + } + return fromArray(arr); +} + +function sortBy(f, xs) +{ + return fromArray(toArray(xs).sort(function(a, b) { + return _elm_lang$core$Native_Utils.cmp(f(a), f(b)); + })); +} + +function sortWith(f, xs) +{ + return fromArray(toArray(xs).sort(function(a, b) { + var ord = f(a)(b).ctor; + return ord === 'EQ' ? 0 : ord === 'LT' ? -1 : 1; + })); +} + +return { + Nil: Nil, + Cons: Cons, + cons: F2(Cons), + toArray: toArray, + fromArray: fromArray, + + foldr: F3(foldr), + + map2: F3(map2), + map3: F4(map3), + map4: F5(map4), + map5: F6(map5), + sortBy: F2(sortBy), + sortWith: F2(sortWith) +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Platform.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Platform.js new file mode 100644 index 0000000..f34b812 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Platform.js @@ -0,0 +1,560 @@ +//import // + +var _elm_lang$core$Native_Platform = function() { + + +// PROGRAMS + +function program(impl) +{ + return function(flagDecoder) + { + return function(object, moduleName) + { + object['worker'] = function worker(flags) + { + if (typeof flags !== 'undefined') + { + throw new Error( + 'The `' + moduleName + '` module does not need flags.\n' + + 'Call ' + moduleName + '.worker() with no arguments and you should be all set!' + ); + } + + return initialize( + impl.init, + impl.update, + impl.subscriptions, + renderer + ); + }; + }; + }; +} + +function programWithFlags(impl) +{ + return function(flagDecoder) + { + return function(object, moduleName) + { + object['worker'] = function worker(flags) + { + if (typeof flagDecoder === 'undefined') + { + throw new Error( + 'Are you trying to sneak a Never value into Elm? Trickster!\n' + + 'It looks like ' + moduleName + '.main is defined with `programWithFlags` but has type `Program Never`.\n' + + 'Use `program` instead if you do not want flags.' + ); + } + + var result = A2(_elm_lang$core$Native_Json.run, flagDecoder, flags); + if (result.ctor === 'Err') + { + throw new Error( + moduleName + '.worker(...) was called with an unexpected argument.\n' + + 'I tried to convert it to an Elm value, but ran into this problem:\n\n' + + result._0 + ); + } + + return initialize( + impl.init(result._0), + impl.update, + impl.subscriptions, + renderer + ); + }; + }; + }; +} + +function renderer(enqueue, _) +{ + return function(_) {}; +} + + +// HTML TO PROGRAM + +function htmlToProgram(vnode) +{ + var emptyBag = batch(_elm_lang$core$Native_List.Nil); + var noChange = _elm_lang$core$Native_Utils.Tuple2( + _elm_lang$core$Native_Utils.Tuple0, + emptyBag + ); + + return _elm_lang$virtual_dom$VirtualDom$program({ + init: noChange, + view: function(model) { return main; }, + update: F2(function(msg, model) { return noChange; }), + subscriptions: function (model) { return emptyBag; } + }); +} + + +// INITIALIZE A PROGRAM + +function initialize(init, update, subscriptions, renderer) +{ + // ambient state + var managers = {}; + var updateView; + + // init and update state in main process + var initApp = _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { + var model = init._0; + updateView = renderer(enqueue, model); + var cmds = init._1; + var subs = subscriptions(model); + dispatchEffects(managers, cmds, subs); + callback(_elm_lang$core$Native_Scheduler.succeed(model)); + }); + + function onMessage(msg, model) + { + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { + var results = A2(update, msg, model); + model = results._0; + updateView(model); + var cmds = results._1; + var subs = subscriptions(model); + dispatchEffects(managers, cmds, subs); + callback(_elm_lang$core$Native_Scheduler.succeed(model)); + }); + } + + var mainProcess = spawnLoop(initApp, onMessage); + + function enqueue(msg) + { + _elm_lang$core$Native_Scheduler.rawSend(mainProcess, msg); + } + + var ports = setupEffects(managers, enqueue); + + return ports ? { ports: ports } : {}; +} + + +// EFFECT MANAGERS + +var effectManagers = {}; + +function setupEffects(managers, callback) +{ + var ports; + + // setup all necessary effect managers + for (var key in effectManagers) + { + var manager = effectManagers[key]; + + if (manager.isForeign) + { + ports = ports || {}; + ports[key] = manager.tag === 'cmd' + ? setupOutgoingPort(key) + : setupIncomingPort(key, callback); + } + + managers[key] = makeManager(manager, callback); + } + + return ports; +} + +function makeManager(info, callback) +{ + var router = { + main: callback, + self: undefined + }; + + var tag = info.tag; + var onEffects = info.onEffects; + var onSelfMsg = info.onSelfMsg; + + function onMessage(msg, state) + { + if (msg.ctor === 'self') + { + return A3(onSelfMsg, router, msg._0, state); + } + + var fx = msg._0; + switch (tag) + { + case 'cmd': + return A3(onEffects, router, fx.cmds, state); + + case 'sub': + return A3(onEffects, router, fx.subs, state); + + case 'fx': + return A4(onEffects, router, fx.cmds, fx.subs, state); + } + } + + var process = spawnLoop(info.init, onMessage); + router.self = process; + return process; +} + +function sendToApp(router, msg) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + router.main(msg); + callback(_elm_lang$core$Native_Scheduler.succeed(_elm_lang$core$Native_Utils.Tuple0)); + }); +} + +function sendToSelf(router, msg) +{ + return A2(_elm_lang$core$Native_Scheduler.send, router.self, { + ctor: 'self', + _0: msg + }); +} + + +// HELPER for STATEFUL LOOPS + +function spawnLoop(init, onMessage) +{ + var andThen = _elm_lang$core$Native_Scheduler.andThen; + + function loop(state) + { + var handleMsg = _elm_lang$core$Native_Scheduler.receive(function(msg) { + return onMessage(msg, state); + }); + return A2(andThen, loop, handleMsg); + } + + var task = A2(andThen, loop, init); + + return _elm_lang$core$Native_Scheduler.rawSpawn(task); +} + + +// BAGS + +function leaf(home) +{ + return function(value) + { + return { + type: 'leaf', + home: home, + value: value + }; + }; +} + +function batch(list) +{ + return { + type: 'node', + branches: list + }; +} + +function map(tagger, bag) +{ + return { + type: 'map', + tagger: tagger, + tree: bag + } +} + + +// PIPE BAGS INTO EFFECT MANAGERS + +function dispatchEffects(managers, cmdBag, subBag) +{ + var effectsDict = {}; + gatherEffects(true, cmdBag, effectsDict, null); + gatherEffects(false, subBag, effectsDict, null); + + for (var home in managers) + { + var fx = home in effectsDict + ? effectsDict[home] + : { + cmds: _elm_lang$core$Native_List.Nil, + subs: _elm_lang$core$Native_List.Nil + }; + + _elm_lang$core$Native_Scheduler.rawSend(managers[home], { ctor: 'fx', _0: fx }); + } +} + +function gatherEffects(isCmd, bag, effectsDict, taggers) +{ + switch (bag.type) + { + case 'leaf': + var home = bag.home; + var effect = toEffect(isCmd, home, taggers, bag.value); + effectsDict[home] = insert(isCmd, effect, effectsDict[home]); + return; + + case 'node': + var list = bag.branches; + while (list.ctor !== '[]') + { + gatherEffects(isCmd, list._0, effectsDict, taggers); + list = list._1; + } + return; + + case 'map': + gatherEffects(isCmd, bag.tree, effectsDict, { + tagger: bag.tagger, + rest: taggers + }); + return; + } +} + +function toEffect(isCmd, home, taggers, value) +{ + function applyTaggers(x) + { + var temp = taggers; + while (temp) + { + x = temp.tagger(x); + temp = temp.rest; + } + return x; + } + + var map = isCmd + ? effectManagers[home].cmdMap + : effectManagers[home].subMap; + + return A2(map, applyTaggers, value) +} + +function insert(isCmd, newEffect, effects) +{ + effects = effects || { + cmds: _elm_lang$core$Native_List.Nil, + subs: _elm_lang$core$Native_List.Nil + }; + if (isCmd) + { + effects.cmds = _elm_lang$core$Native_List.Cons(newEffect, effects.cmds); + return effects; + } + effects.subs = _elm_lang$core$Native_List.Cons(newEffect, effects.subs); + return effects; +} + + +// PORTS + +function checkPortName(name) +{ + if (name in effectManagers) + { + throw new Error('There can only be one port named `' + name + '`, but your program has multiple.'); + } +} + + +// OUTGOING PORTS + +function outgoingPort(name, converter) +{ + checkPortName(name); + effectManagers[name] = { + tag: 'cmd', + cmdMap: outgoingPortMap, + converter: converter, + isForeign: true + }; + return leaf(name); +} + +var outgoingPortMap = F2(function cmdMap(tagger, value) { + return value; +}); + +function setupOutgoingPort(name) +{ + var subs = []; + var converter = effectManagers[name].converter; + + // CREATE MANAGER + + var init = _elm_lang$core$Native_Scheduler.succeed(null); + + function onEffects(router, cmdList, state) + { + while (cmdList.ctor !== '[]') + { + // grab a separate reference to subs in case unsubscribe is called + var currentSubs = subs; + var value = converter(cmdList._0); + for (var i = 0; i < currentSubs.length; i++) + { + currentSubs[i](value); + } + cmdList = cmdList._1; + } + return init; + } + + effectManagers[name].init = init; + effectManagers[name].onEffects = F3(onEffects); + + // PUBLIC API + + function subscribe(callback) + { + subs.push(callback); + } + + function unsubscribe(callback) + { + // copy subs into a new array in case unsubscribe is called within a + // subscribed callback + subs = subs.slice(); + var index = subs.indexOf(callback); + if (index >= 0) + { + subs.splice(index, 1); + } + } + + return { + subscribe: subscribe, + unsubscribe: unsubscribe + }; +} + + +// INCOMING PORTS + +function incomingPort(name, converter) +{ + checkPortName(name); + effectManagers[name] = { + tag: 'sub', + subMap: incomingPortMap, + converter: converter, + isForeign: true + }; + return leaf(name); +} + +var incomingPortMap = F2(function subMap(tagger, finalTagger) +{ + return function(value) + { + return tagger(finalTagger(value)); + }; +}); + +function setupIncomingPort(name, callback) +{ + var sentBeforeInit = []; + var subs = _elm_lang$core$Native_List.Nil; + var converter = effectManagers[name].converter; + var currentOnEffects = preInitOnEffects; + var currentSend = preInitSend; + + // CREATE MANAGER + + var init = _elm_lang$core$Native_Scheduler.succeed(null); + + function preInitOnEffects(router, subList, state) + { + var postInitResult = postInitOnEffects(router, subList, state); + + for(var i = 0; i < sentBeforeInit.length; i++) + { + postInitSend(sentBeforeInit[i]); + } + + sentBeforeInit = null; // to release objects held in queue + currentSend = postInitSend; + currentOnEffects = postInitOnEffects; + return postInitResult; + } + + function postInitOnEffects(router, subList, state) + { + subs = subList; + return init; + } + + function onEffects(router, subList, state) + { + return currentOnEffects(router, subList, state); + } + + effectManagers[name].init = init; + effectManagers[name].onEffects = F3(onEffects); + + // PUBLIC API + + function preInitSend(value) + { + sentBeforeInit.push(value); + } + + function postInitSend(incomingValue) + { + var result = A2(_elm_lang$core$Json_Decode$decodeValue, converter, incomingValue); + if (result.ctor === 'Err') + { + throw new Error('Trying to send an unexpected type of value through port `' + name + '`:\n' + result._0); + } + + var value = result._0; + var temp = subs; + while (temp.ctor !== '[]') + { + callback(temp._0(value)); + temp = temp._1; + } + } + + function send(incomingValue) + { + currentSend(incomingValue); + } + + return { send: send }; +} + +return { + // routers + sendToApp: F2(sendToApp), + sendToSelf: F2(sendToSelf), + + // global setup + effectManagers: effectManagers, + outgoingPort: outgoingPort, + incomingPort: incomingPort, + + htmlToProgram: htmlToProgram, + program: program, + programWithFlags: programWithFlags, + initialize: initialize, + + // effect bags + leaf: leaf, + batch: batch, + map: F2(map) +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Regex.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Regex.js new file mode 100644 index 0000000..d3cc0dd --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Regex.js @@ -0,0 +1,119 @@ +//import Maybe, Native.List // + +var _elm_lang$core$Native_Regex = function() { + +function escape(str) +{ + return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); +} +function caseInsensitive(re) +{ + return new RegExp(re.source, 'gi'); +} +function regex(raw) +{ + return new RegExp(raw, 'g'); +} + +function contains(re, string) +{ + return string.match(re) !== null; +} + +function find(n, re, str) +{ + n = n.ctor === 'All' ? Infinity : n._0; + var out = []; + var number = 0; + var string = str; + var lastIndex = re.lastIndex; + var prevLastIndex = -1; + var result; + while (number++ < n && (result = re.exec(string))) + { + if (prevLastIndex === re.lastIndex) break; + var i = result.length - 1; + var subs = new Array(i); + while (i > 0) + { + var submatch = result[i]; + subs[--i] = submatch === undefined + ? _elm_lang$core$Maybe$Nothing + : _elm_lang$core$Maybe$Just(submatch); + } + out.push({ + match: result[0], + submatches: _elm_lang$core$Native_List.fromArray(subs), + index: result.index, + number: number + }); + prevLastIndex = re.lastIndex; + } + re.lastIndex = lastIndex; + return _elm_lang$core$Native_List.fromArray(out); +} + +function replace(n, re, replacer, string) +{ + n = n.ctor === 'All' ? Infinity : n._0; + var count = 0; + function jsReplacer(match) + { + if (count++ >= n) + { + return match; + } + var i = arguments.length - 3; + var submatches = new Array(i); + while (i > 0) + { + var submatch = arguments[i]; + submatches[--i] = submatch === undefined + ? _elm_lang$core$Maybe$Nothing + : _elm_lang$core$Maybe$Just(submatch); + } + return replacer({ + match: match, + submatches: _elm_lang$core$Native_List.fromArray(submatches), + index: arguments[arguments.length - 2], + number: count + }); + } + return string.replace(re, jsReplacer); +} + +function split(n, re, str) +{ + n = n.ctor === 'All' ? Infinity : n._0; + if (n === Infinity) + { + return _elm_lang$core$Native_List.fromArray(str.split(re)); + } + var string = str; + var result; + var out = []; + var start = re.lastIndex; + var restoreLastIndex = re.lastIndex; + while (n--) + { + if (!(result = re.exec(string))) break; + out.push(string.slice(start, result.index)); + start = re.lastIndex; + } + out.push(string.slice(start)); + re.lastIndex = restoreLastIndex; + return _elm_lang$core$Native_List.fromArray(out); +} + +return { + regex: regex, + caseInsensitive: caseInsensitive, + escape: escape, + + contains: F2(contains), + find: F3(find), + replace: F4(replace), + split: F3(split) +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Scheduler.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Scheduler.js new file mode 100644 index 0000000..00f8259 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Scheduler.js @@ -0,0 +1,281 @@ +//import Native.Utils // + +var _elm_lang$core$Native_Scheduler = function() { + +var MAX_STEPS = 10000; + + +// TASKS + +function succeed(value) +{ + return { + ctor: '_Task_succeed', + value: value + }; +} + +function fail(error) +{ + return { + ctor: '_Task_fail', + value: error + }; +} + +function nativeBinding(callback) +{ + return { + ctor: '_Task_nativeBinding', + callback: callback, + cancel: null + }; +} + +function andThen(callback, task) +{ + return { + ctor: '_Task_andThen', + callback: callback, + task: task + }; +} + +function onError(callback, task) +{ + return { + ctor: '_Task_onError', + callback: callback, + task: task + }; +} + +function receive(callback) +{ + return { + ctor: '_Task_receive', + callback: callback + }; +} + + +// PROCESSES + +function rawSpawn(task) +{ + var process = { + ctor: '_Process', + id: _elm_lang$core$Native_Utils.guid(), + root: task, + stack: null, + mailbox: [] + }; + + enqueue(process); + + return process; +} + +function spawn(task) +{ + return nativeBinding(function(callback) { + var process = rawSpawn(task); + callback(succeed(process)); + }); +} + +function rawSend(process, msg) +{ + process.mailbox.push(msg); + enqueue(process); +} + +function send(process, msg) +{ + return nativeBinding(function(callback) { + rawSend(process, msg); + callback(succeed(_elm_lang$core$Native_Utils.Tuple0)); + }); +} + +function kill(process) +{ + return nativeBinding(function(callback) { + var root = process.root; + if (root.ctor === '_Task_nativeBinding' && root.cancel) + { + root.cancel(); + } + + process.root = null; + + callback(succeed(_elm_lang$core$Native_Utils.Tuple0)); + }); +} + +function sleep(time) +{ + return nativeBinding(function(callback) { + var id = setTimeout(function() { + callback(succeed(_elm_lang$core$Native_Utils.Tuple0)); + }, time); + + return function() { clearTimeout(id); }; + }); +} + + +// STEP PROCESSES + +function step(numSteps, process) +{ + while (numSteps < MAX_STEPS) + { + var ctor = process.root.ctor; + + if (ctor === '_Task_succeed') + { + while (process.stack && process.stack.ctor === '_Task_onError') + { + process.stack = process.stack.rest; + } + if (process.stack === null) + { + break; + } + process.root = process.stack.callback(process.root.value); + process.stack = process.stack.rest; + ++numSteps; + continue; + } + + if (ctor === '_Task_fail') + { + while (process.stack && process.stack.ctor === '_Task_andThen') + { + process.stack = process.stack.rest; + } + if (process.stack === null) + { + break; + } + process.root = process.stack.callback(process.root.value); + process.stack = process.stack.rest; + ++numSteps; + continue; + } + + if (ctor === '_Task_andThen') + { + process.stack = { + ctor: '_Task_andThen', + callback: process.root.callback, + rest: process.stack + }; + process.root = process.root.task; + ++numSteps; + continue; + } + + if (ctor === '_Task_onError') + { + process.stack = { + ctor: '_Task_onError', + callback: process.root.callback, + rest: process.stack + }; + process.root = process.root.task; + ++numSteps; + continue; + } + + if (ctor === '_Task_nativeBinding') + { + process.root.cancel = process.root.callback(function(newRoot) { + process.root = newRoot; + enqueue(process); + }); + + break; + } + + if (ctor === '_Task_receive') + { + var mailbox = process.mailbox; + if (mailbox.length === 0) + { + break; + } + + process.root = process.root.callback(mailbox.shift()); + ++numSteps; + continue; + } + + throw new Error(ctor); + } + + if (numSteps < MAX_STEPS) + { + return numSteps + 1; + } + enqueue(process); + + return numSteps; +} + + +// WORK QUEUE + +var working = false; +var workQueue = []; + +function enqueue(process) +{ + workQueue.push(process); + + if (!working) + { + setTimeout(work, 0); + working = true; + } +} + +function work() +{ + var numSteps = 0; + var process; + while (numSteps < MAX_STEPS && (process = workQueue.shift())) + { + if (process.root) + { + numSteps = step(numSteps, process); + } + } + if (!process) + { + working = false; + return; + } + setTimeout(work, 0); +} + + +return { + succeed: succeed, + fail: fail, + nativeBinding: nativeBinding, + andThen: F2(andThen), + onError: F2(onError), + receive: receive, + + spawn: spawn, + kill: kill, + sleep: sleep, + send: F2(send), + + rawSpawn: rawSpawn, + rawSend: rawSend +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/String.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/String.js new file mode 100644 index 0000000..9ef216a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/String.js @@ -0,0 +1,335 @@ +//import Maybe, Native.List, Native.Utils, Result // + +var _elm_lang$core$Native_String = function() { + +function isEmpty(str) +{ + return str.length === 0; +} +function cons(chr, str) +{ + return chr + str; +} +function uncons(str) +{ + var hd = str[0]; + if (hd) + { + return _elm_lang$core$Maybe$Just(_elm_lang$core$Native_Utils.Tuple2(_elm_lang$core$Native_Utils.chr(hd), str.slice(1))); + } + return _elm_lang$core$Maybe$Nothing; +} +function append(a, b) +{ + return a + b; +} +function concat(strs) +{ + return _elm_lang$core$Native_List.toArray(strs).join(''); +} +function length(str) +{ + return str.length; +} +function map(f, str) +{ + var out = str.split(''); + for (var i = out.length; i--; ) + { + out[i] = f(_elm_lang$core$Native_Utils.chr(out[i])); + } + return out.join(''); +} +function filter(pred, str) +{ + return str.split('').map(_elm_lang$core$Native_Utils.chr).filter(pred).join(''); +} +function reverse(str) +{ + return str.split('').reverse().join(''); +} +function foldl(f, b, str) +{ + var len = str.length; + for (var i = 0; i < len; ++i) + { + b = A2(f, _elm_lang$core$Native_Utils.chr(str[i]), b); + } + return b; +} +function foldr(f, b, str) +{ + for (var i = str.length; i--; ) + { + b = A2(f, _elm_lang$core$Native_Utils.chr(str[i]), b); + } + return b; +} +function split(sep, str) +{ + return _elm_lang$core$Native_List.fromArray(str.split(sep)); +} +function join(sep, strs) +{ + return _elm_lang$core$Native_List.toArray(strs).join(sep); +} +function repeat(n, str) +{ + var result = ''; + while (n > 0) + { + if (n & 1) + { + result += str; + } + n >>= 1, str += str; + } + return result; +} +function slice(start, end, str) +{ + return str.slice(start, end); +} +function left(n, str) +{ + return n < 1 ? '' : str.slice(0, n); +} +function right(n, str) +{ + return n < 1 ? '' : str.slice(-n); +} +function dropLeft(n, str) +{ + return n < 1 ? str : str.slice(n); +} +function dropRight(n, str) +{ + return n < 1 ? str : str.slice(0, -n); +} +function pad(n, chr, str) +{ + var half = (n - str.length) / 2; + return repeat(Math.ceil(half), chr) + str + repeat(half | 0, chr); +} +function padRight(n, chr, str) +{ + return str + repeat(n - str.length, chr); +} +function padLeft(n, chr, str) +{ + return repeat(n - str.length, chr) + str; +} + +function trim(str) +{ + return str.trim(); +} +function trimLeft(str) +{ + return str.replace(/^\s+/, ''); +} +function trimRight(str) +{ + return str.replace(/\s+$/, ''); +} + +function words(str) +{ + return _elm_lang$core$Native_List.fromArray(str.trim().split(/\s+/g)); +} +function lines(str) +{ + return _elm_lang$core$Native_List.fromArray(str.split(/\r\n|\r|\n/g)); +} + +function toUpper(str) +{ + return str.toUpperCase(); +} +function toLower(str) +{ + return str.toLowerCase(); +} + +function any(pred, str) +{ + for (var i = str.length; i--; ) + { + if (pred(_elm_lang$core$Native_Utils.chr(str[i]))) + { + return true; + } + } + return false; +} +function all(pred, str) +{ + for (var i = str.length; i--; ) + { + if (!pred(_elm_lang$core$Native_Utils.chr(str[i]))) + { + return false; + } + } + return true; +} + +function contains(sub, str) +{ + return str.indexOf(sub) > -1; +} +function startsWith(sub, str) +{ + return str.indexOf(sub) === 0; +} +function endsWith(sub, str) +{ + return str.length >= sub.length && + str.lastIndexOf(sub) === str.length - sub.length; +} +function indexes(sub, str) +{ + var subLen = sub.length; + + if (subLen < 1) + { + return _elm_lang$core$Native_List.Nil; + } + + var i = 0; + var is = []; + + while ((i = str.indexOf(sub, i)) > -1) + { + is.push(i); + i = i + subLen; + } + + return _elm_lang$core$Native_List.fromArray(is); +} + +function toInt(s) +{ + var len = s.length; + if (len === 0) + { + return _elm_lang$core$Result$Err("could not convert string '" + s + "' to an Int" ); + } + var start = 0; + if (s[0] === '-') + { + if (len === 1) + { + return _elm_lang$core$Result$Err("could not convert string '" + s + "' to an Int" ); + } + start = 1; + } + for (var i = start; i < len; ++i) + { + var c = s[i]; + if (c < '0' || '9' < c) + { + return _elm_lang$core$Result$Err("could not convert string '" + s + "' to an Int" ); + } + } + return _elm_lang$core$Result$Ok(parseInt(s, 10)); +} + +function toFloat(s) +{ + var len = s.length; + if (len === 0) + { + return _elm_lang$core$Result$Err("could not convert string '" + s + "' to a Float" ); + } + var start = 0; + if (s[0] === '-') + { + if (len === 1) + { + return _elm_lang$core$Result$Err("could not convert string '" + s + "' to a Float" ); + } + start = 1; + } + var dotCount = 0; + for (var i = start; i < len; ++i) + { + var c = s[i]; + if ('0' <= c && c <= '9') + { + continue; + } + if (c === '.') + { + dotCount += 1; + if (dotCount <= 1) + { + continue; + } + } + return _elm_lang$core$Result$Err("could not convert string '" + s + "' to a Float" ); + } + return _elm_lang$core$Result$Ok(parseFloat(s)); +} + +function toList(str) +{ + return _elm_lang$core$Native_List.fromArray(str.split('').map(_elm_lang$core$Native_Utils.chr)); +} +function fromList(chars) +{ + return _elm_lang$core$Native_List.toArray(chars).join(''); +} + +return { + isEmpty: isEmpty, + cons: F2(cons), + uncons: uncons, + append: F2(append), + concat: concat, + length: length, + map: F2(map), + filter: F2(filter), + reverse: reverse, + foldl: F3(foldl), + foldr: F3(foldr), + + split: F2(split), + join: F2(join), + repeat: F2(repeat), + + slice: F3(slice), + left: F2(left), + right: F2(right), + dropLeft: F2(dropLeft), + dropRight: F2(dropRight), + + pad: F3(pad), + padLeft: F3(padLeft), + padRight: F3(padRight), + + trim: trim, + trimLeft: trimLeft, + trimRight: trimRight, + + words: words, + lines: lines, + + toUpper: toUpper, + toLower: toLower, + + any: F2(any), + all: F2(all), + + contains: F2(contains), + startsWith: F2(startsWith), + endsWith: F2(endsWith), + indexes: F2(indexes), + + toInt: toInt, + toFloat: toFloat, + toList: toList, + fromList: fromList +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Time.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Time.js new file mode 100644 index 0000000..6b665ea --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Time.js @@ -0,0 +1,27 @@ +//import Native.Scheduler // + +var _elm_lang$core$Native_Time = function() { + +var now = _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) +{ + callback(_elm_lang$core$Native_Scheduler.succeed(Date.now())); +}); + +function setInterval_(interval, task) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + var id = setInterval(function() { + _elm_lang$core$Native_Scheduler.rawSpawn(task); + }, interval); + + return function() { clearInterval(id); }; + }); +} + +return { + now: now, + setInterval_: F2(setInterval_) +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Utils.js b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Utils.js new file mode 100644 index 0000000..2b08159 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Native/Utils.js @@ -0,0 +1,489 @@ +//import // + +var _elm_lang$core$Native_Utils = function() { + +// COMPARISONS + +function eq(x, y) +{ + var stack = []; + var isEqual = eqHelp(x, y, 0, stack); + var pair; + while (isEqual && (pair = stack.pop())) + { + isEqual = eqHelp(pair.x, pair.y, 0, stack); + } + return isEqual; +} + + +function eqHelp(x, y, depth, stack) +{ + if (depth > 100) + { + stack.push({ x: x, y: y }); + return true; + } + + if (x === y) + { + return true; + } + + if (typeof x !== 'object') + { + if (typeof x === 'function') + { + throw new Error( + 'Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense.' + + ' Read more about this at http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#==' + + ' which describes why it is this way and what the better version will look like.' + ); + } + return false; + } + + if (x === null || y === null) + { + return false + } + + if (x instanceof Date) + { + return x.getTime() === y.getTime(); + } + + if (!('ctor' in x)) + { + for (var key in x) + { + if (!eqHelp(x[key], y[key], depth + 1, stack)) + { + return false; + } + } + return true; + } + + // convert Dicts and Sets to lists + if (x.ctor === 'RBNode_elm_builtin' || x.ctor === 'RBEmpty_elm_builtin') + { + x = _elm_lang$core$Dict$toList(x); + y = _elm_lang$core$Dict$toList(y); + } + if (x.ctor === 'Set_elm_builtin') + { + x = _elm_lang$core$Set$toList(x); + y = _elm_lang$core$Set$toList(y); + } + + // check if lists are equal without recursion + if (x.ctor === '::') + { + var a = x; + var b = y; + while (a.ctor === '::' && b.ctor === '::') + { + if (!eqHelp(a._0, b._0, depth + 1, stack)) + { + return false; + } + a = a._1; + b = b._1; + } + return a.ctor === b.ctor; + } + + // check if Arrays are equal + if (x.ctor === '_Array') + { + var xs = _elm_lang$core$Native_Array.toJSArray(x); + var ys = _elm_lang$core$Native_Array.toJSArray(y); + if (xs.length !== ys.length) + { + return false; + } + for (var i = 0; i < xs.length; i++) + { + if (!eqHelp(xs[i], ys[i], depth + 1, stack)) + { + return false; + } + } + return true; + } + + if (!eqHelp(x.ctor, y.ctor, depth + 1, stack)) + { + return false; + } + + for (var key in x) + { + if (!eqHelp(x[key], y[key], depth + 1, stack)) + { + return false; + } + } + return true; +} + +// Code in Generate/JavaScript.hs, Basics.js, and List.js depends on +// the particular integer values assigned to LT, EQ, and GT. + +var LT = -1, EQ = 0, GT = 1; + +function cmp(x, y) +{ + if (typeof x !== 'object') + { + return x === y ? EQ : x < y ? LT : GT; + } + + if (x instanceof String) + { + var a = x.valueOf(); + var b = y.valueOf(); + return a === b ? EQ : a < b ? LT : GT; + } + + if (x.ctor === '::' || x.ctor === '[]') + { + while (x.ctor === '::' && y.ctor === '::') + { + var ord = cmp(x._0, y._0); + if (ord !== EQ) + { + return ord; + } + x = x._1; + y = y._1; + } + return x.ctor === y.ctor ? EQ : x.ctor === '[]' ? LT : GT; + } + + if (x.ctor.slice(0, 6) === '_Tuple') + { + var ord; + var n = x.ctor.slice(6) - 0; + var err = 'cannot compare tuples with more than 6 elements.'; + if (n === 0) return EQ; + if (n >= 1) { ord = cmp(x._0, y._0); if (ord !== EQ) return ord; + if (n >= 2) { ord = cmp(x._1, y._1); if (ord !== EQ) return ord; + if (n >= 3) { ord = cmp(x._2, y._2); if (ord !== EQ) return ord; + if (n >= 4) { ord = cmp(x._3, y._3); if (ord !== EQ) return ord; + if (n >= 5) { ord = cmp(x._4, y._4); if (ord !== EQ) return ord; + if (n >= 6) { ord = cmp(x._5, y._5); if (ord !== EQ) return ord; + if (n >= 7) throw new Error('Comparison error: ' + err); } } } } } } + return EQ; + } + + throw new Error( + 'Comparison error: comparison is only defined on ints, ' + + 'floats, times, chars, strings, lists of comparable values, ' + + 'and tuples of comparable values.' + ); +} + + +// COMMON VALUES + +var Tuple0 = { + ctor: '_Tuple0' +}; + +function Tuple2(x, y) +{ + return { + ctor: '_Tuple2', + _0: x, + _1: y + }; +} + +function chr(c) +{ + return new String(c); +} + + +// GUID + +var count = 0; +function guid(_) +{ + return count++; +} + + +// RECORDS + +function update(oldRecord, updatedFields) +{ + var newRecord = {}; + + for (var key in oldRecord) + { + newRecord[key] = oldRecord[key]; + } + + for (var key in updatedFields) + { + newRecord[key] = updatedFields[key]; + } + + return newRecord; +} + + +//// LIST STUFF //// + +var Nil = { ctor: '[]' }; + +function Cons(hd, tl) +{ + return { + ctor: '::', + _0: hd, + _1: tl + }; +} + +function append(xs, ys) +{ + // append Strings + if (typeof xs === 'string') + { + return xs + ys; + } + + // append Lists + if (xs.ctor === '[]') + { + return ys; + } + var root = Cons(xs._0, Nil); + var curr = root; + xs = xs._1; + while (xs.ctor !== '[]') + { + curr._1 = Cons(xs._0, Nil); + xs = xs._1; + curr = curr._1; + } + curr._1 = ys; + return root; +} + + +// CRASHES + +function crash(moduleName, region) +{ + return function(message) { + throw new Error( + 'Ran into a `Debug.crash` in module `' + moduleName + '` ' + regionToString(region) + '\n' + + 'The message provided by the code author is:\n\n ' + + message + ); + }; +} + +function crashCase(moduleName, region, value) +{ + return function(message) { + throw new Error( + 'Ran into a `Debug.crash` in module `' + moduleName + '`\n\n' + + 'This was caused by the `case` expression ' + regionToString(region) + '.\n' + + 'One of the branches ended with a crash and the following value got through:\n\n ' + toString(value) + '\n\n' + + 'The message provided by the code author is:\n\n ' + + message + ); + }; +} + +function regionToString(region) +{ + if (region.start.line == region.end.line) + { + return 'on line ' + region.start.line; + } + return 'between lines ' + region.start.line + ' and ' + region.end.line; +} + + +// TO STRING + +function toString(v) +{ + var type = typeof v; + if (type === 'function') + { + var name = v.func ? v.func.name : v.name; + return ''; + } + + if (type === 'boolean') + { + return v ? 'True' : 'False'; + } + + if (type === 'number') + { + return v + ''; + } + + if (v instanceof String) + { + return '\'' + addSlashes(v, true) + '\''; + } + + if (type === 'string') + { + return '"' + addSlashes(v, false) + '"'; + } + + if (v === null) + { + return 'null'; + } + + if (type === 'object' && 'ctor' in v) + { + var ctorStarter = v.ctor.substring(0, 5); + + if (ctorStarter === '_Tupl') + { + var output = []; + for (var k in v) + { + if (k === 'ctor') continue; + output.push(toString(v[k])); + } + return '(' + output.join(',') + ')'; + } + + if (ctorStarter === '_Task') + { + return '' + } + + if (v.ctor === '_Array') + { + var list = _elm_lang$core$Array$toList(v); + return 'Array.fromList ' + toString(list); + } + + if (v.ctor === '') + { + return ''; + } + + if (v.ctor === '_Process') + { + return ''; + } + + if (v.ctor === '::') + { + var output = '[' + toString(v._0); + v = v._1; + while (v.ctor === '::') + { + output += ',' + toString(v._0); + v = v._1; + } + return output + ']'; + } + + if (v.ctor === '[]') + { + return '[]'; + } + + if (v.ctor === 'Set_elm_builtin') + { + return 'Set.fromList ' + toString(_elm_lang$core$Set$toList(v)); + } + + if (v.ctor === 'RBNode_elm_builtin' || v.ctor === 'RBEmpty_elm_builtin') + { + return 'Dict.fromList ' + toString(_elm_lang$core$Dict$toList(v)); + } + + var output = ''; + for (var i in v) + { + if (i === 'ctor') continue; + var str = toString(v[i]); + var c0 = str[0]; + var parenless = c0 === '{' || c0 === '(' || c0 === '<' || c0 === '"' || str.indexOf(' ') < 0; + output += ' ' + (parenless ? str : '(' + str + ')'); + } + return v.ctor + output; + } + + if (type === 'object') + { + if (v instanceof Date) + { + return '<' + v.toString() + '>'; + } + + if (v.elm_web_socket) + { + return ''; + } + + var output = []; + for (var k in v) + { + output.push(k + ' = ' + toString(v[k])); + } + if (output.length === 0) + { + return '{}'; + } + return '{ ' + output.join(', ') + ' }'; + } + + return ''; +} + +function addSlashes(str, isChar) +{ + var s = str.replace(/\\/g, '\\\\') + .replace(/\n/g, '\\n') + .replace(/\t/g, '\\t') + .replace(/\r/g, '\\r') + .replace(/\v/g, '\\v') + .replace(/\0/g, '\\0'); + if (isChar) + { + return s.replace(/\'/g, '\\\''); + } + else + { + return s.replace(/\"/g, '\\"'); + } +} + + +return { + eq: eq, + cmp: cmp, + Tuple0: Tuple0, + Tuple2: Tuple2, + chr: chr, + update: update, + guid: guid, + + append: F2(append), + + crash: crash, + crashCase: crashCase, + + toString: toString +}; + +}(); \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform.elm new file mode 100644 index 0000000..b156ce0 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform.elm @@ -0,0 +1,145 @@ +module Platform exposing + ( Program, program, programWithFlags + , Task, ProcessId + , Router, sendToApp, sendToSelf + ) + +{-| + +# Programs +@docs Program, program, programWithFlags + +# Platform Internals + +## Tasks and Processes +@docs Task, ProcessId + +## Effect Manager Helpers + +An extremely tiny portion of library authors should ever write effect managers. +Fundamentally, Elm needs maybe 10 of them total. I get that people are smart, +curious, etc. but that is not a substitute for a legitimate reason to make an +effect manager. Do you have an *organic need* this fills? Or are you just +curious? Public discussions of your explorations should be framed accordingly. + +@docs Router, sendToApp, sendToSelf +-} + +import Basics exposing (Never) +import Native.Platform +import Native.Scheduler +import Platform.Cmd exposing (Cmd) +import Platform.Sub exposing (Sub) + + + +-- PROGRAMS + + +{-| A `Program` describes how to manage your Elm app. + +You can create [headless][] programs with the [`program`](#program) and +[`programWithFlags`](#programWithFlags) functions. Similar functions exist in +[`Html.App`][app] that let you specify a view. + +[headless]: https://en.wikipedia.org/wiki/Headless_software +[app]: http://package.elm-lang.org/packages/elm-lang/html/latest/Html-App + +Honestly, it is totally normal if this seems crazy at first. The best way to +understand is to work through [guide.elm-lang.org](http://guide.elm-lang.org/). +It makes way more sense in context! +-} +type Program flags model msg = Program + + +{-| Create a [headless][] program. This is great if you want to use Elm as the +“brain” for something else. You can still communicate with JS via +ports and manage your model, you just do not have to specify a `view`. + +[headless]: https://en.wikipedia.org/wiki/Headless_software + +Initializing a headless program from JavaScript looks like this: + +```javascript +var app = Elm.MyThing.worker(); +``` +-} +program + : { init : (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , subscriptions : model -> Sub msg + } + -> Program Never model msg +program = + Native.Platform.program + + +{-| Same as [`program`](#program), but you can provide flags. Initializing a +headless program (with flags) from JavaScript looks like this: + +```javascript +var app = Elm.MyThing.worker({ user: 'Tom', token: 1234 }); +``` + +Whatever argument you provide to `worker` will get converted to an Elm value, +allowing you to configure your Elm program however you want from JavaScript! +-} +programWithFlags + : { init : flags -> (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , subscriptions : model -> Sub msg + } + -> Program flags model msg +programWithFlags = + Native.Platform.programWithFlags + + + +-- TASKS and PROCESSES + +{-| Head over to the documentation for the [`Task`](Task) module for more +information on this. It is only defined here because it is a platform +primitive. +-} +type Task err ok = Task + + +{-| Head over to the documentation for the [`Process`](Process) module for +information on this. It is only defined here because it is a platform +primitive. +-} +type ProcessId = ProcessId + + + +-- EFFECT MANAGER INTERNALS + + +{-| An effect manager has access to a “router” that routes messages between +the main app and your individual effect manager. +-} +type Router appMsg selfMsg = + Router + + +{-| Send the router a message for the main loop of your app. This message will +be handled by the overall `update` function, just like events from `Html`. +-} +sendToApp : Router msg a -> msg -> Task x () +sendToApp = + Native.Platform.sendToApp + + +{-| Send the router a message for your effect manager. This message will +be routed to the `onSelfMsg` function, where you can update the state of your +effect manager as necessary. + +As an example, the effect manager for web sockets +-} +sendToSelf : Router a msg -> msg -> Task x () +sendToSelf = + Native.Platform.sendToSelf + + +hack = + Native.Scheduler.succeed diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform/Cmd.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform/Cmd.elm new file mode 100644 index 0000000..a4ae4ed --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform/Cmd.elm @@ -0,0 +1,67 @@ +module Platform.Cmd exposing + ( Cmd + , map + , batch + , none + , (!) + ) + +{-| + +# Effects + +Elm has **managed effects**, meaning that things like HTTP requests or writing +to disk are all treated as *data* in Elm. When this data is given to the Elm +runtime system, it can do some “query optimization” before actually performing +the effect. Perhaps unexpectedly, this managed effects idea is the heart of why +Elm is so nice for testing, reuse, reproducibility, etc. + +There are two kinds of managed effects you will use in your programs: commands +and subscriptions. + +@docs Cmd, map, batch, none, (!) + +-} + +import Native.Platform + + +{-| A command is a way of telling Elm, “Hey, I want you to do this thing!” +So if you want to send an HTTP request, you would need to command Elm to do it. +Or if you wanted to ask for geolocation, you would need to command Elm to go +get it. + +Every `Cmd` specifies (1) which effects you need access to and (2) the type of +messages that will come back into your application. + +**Note:** Do not worry if this seems confusing at first! As with every Elm user +ever, commands will make more sense as you work through [the Elm Architecture +Tutorial](http://guide.elm-lang.org/architecture/index.html) and see how they +fit into a real application! +-} +type Cmd msg = Cmd + + +{-|-} +map : (a -> msg) -> Cmd a -> Cmd msg +map = + Native.Platform.map + + +{-|-} +batch : List (Cmd msg) -> Cmd msg +batch = + Native.Platform.batch + + +{-|-} +none : Cmd msg +none = + batch [] + + +{-|-} +(!) : model -> List (Cmd msg) -> (model, Cmd msg) +(!) model commands = + (model, batch commands) + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform/Sub.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform/Sub.elm new file mode 100644 index 0000000..03f2f81 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Platform/Sub.elm @@ -0,0 +1,52 @@ +module Platform.Sub exposing + ( Sub + , map + , batch + , none + ) + +{-| + +@docs Sub, map, batch, none +-} + +import Native.Platform + + +{-| A subscription is a way of telling Elm, “Hey, let me know if anything +interesting happens over there!” So if you want to listen for messages on a web +socket, you would tell Elm to create a subscription. If you want to get clock +ticks, you would tell Elm to subscribe to that. The cool thing here is that +this means *Elm* manages all the details of subscriptions instead of *you*. +So if a web socket goes down, *you* do not need to manually reconnect with an +exponential backoff strategy, *Elm* does this all for you behind the scenes! + +Every `Sub` specifies (1) which effects you need access to and (2) the type of +messages that will come back into your application. + +**Note:** Do not worry if this seems confusing at first! As with every Elm user +ever, subscriptions will make more sense as you work through [the Elm Architecture +Tutorial](http://guide.elm-lang.org/architecture/index.html) and see how they fit +into a real application! +-} +type Sub msg = Sub + + +{-|-} +map : (a -> msg) -> Sub a -> Sub msg +map = + Native.Platform.map + + +{-|-} +batch : List (Sub msg) -> Sub msg +batch = + Native.Platform.batch + + +{-|-} +none : Sub msg +none = + batch [] + + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Process.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Process.elm new file mode 100644 index 0000000..0ef59af --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Process.elm @@ -0,0 +1,106 @@ +module Process exposing + ( Id + , spawn + , sleep + , kill + ) + +{-| + +# Processes +@docs Id, spawn, sleep, kill + +## Future Plans + +Right now, this library is pretty sparse. For example, there is no public API +for processes to communicate with each other. This is a really important +ability, but it is also something that is extraordinarily easy to get wrong! + +I think the trend will be towards an Erlang style of concurrency, where every +process has an “event queue” that anyone can send messages to. I currently +think the API will be extended to be more like this: + + type Id exit msg + + spawn : Task exit a -> Task x (Id exit Never) + + kill : Id exit msg -> Task x () + + send : Id exit msg -> msg -> Task x () + +A process `Id` will have two type variables to make sure all communication is +valid. The `exit` type describes the messages that are produced if the process +fails because of user code. So if processes are linked and trapping errors, +they will need to handle this. The `msg` type just describes what kind of +messages this process can be sent by strangers. + +We shall see though! This is just a draft that does not cover nearly everything +it needs to, so the long-term vision for concurrency in Elm will be rolling out +slowly as I get more data and experience. + +I ask that people bullish on compiling to node.js keep this in mind. I think we +can do better than the hopelessly bad concurrency model of node.js, and I hope +the Elm community will be supportive of being more ambitious, even if it takes +longer. That’s kind of what Elm is all about. +-} + +import Basics exposing (Never) +import Native.Scheduler +import Platform +import Task exposing (Task) +import Time exposing (Time) + + +{-| A light-weight process that runs concurrently. You can use `spawn` to +get a bunch of different tasks running in different processes. The Elm runtime +will interleave their progress. So if a task is taking too long, we will pause +it at an `andThen` and switch over to other stuff. + +**Note:** We make a distinction between *concurrency* which means interleaving +different sequences and *parallelism* which means running different +sequences at the exact same time. For example, a +[time-sharing system](https://en.wikipedia.org/wiki/Time-sharing) is definitely +concurrent, but not necessarily parallel. So even though JS runs within a +single OS-level thread, Elm can still run things concurrently. +-} +type alias Id = + Platform.ProcessId + + +{-| Run a task in its own light-weight process. In the following example, +`task1` and `task2` will be interleaved. If `task1` makes a long HTTP request +or is just taking a long time, we can hop over to `task2` and do some work +there. + + spawn task1 + |> Task.andThen (\_ -> spawn task2) + +**Note:** This creates a relatively restricted kind of `Process` because it +cannot receive any messages. More flexibility for user-defined processes will +come in a later release! +-} +spawn : Task x a -> Task y Id +spawn = + Native.Scheduler.spawn + + +{-| Block progress on the current process for a given amount of time. The +JavaScript equivalent of this is [`setTimeout`][setTimeout] which lets you +delay work until later. + +[setTimeout]: https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout +-} +sleep : Time -> Task x () +sleep = + Native.Scheduler.sleep + + +{-| Sometimes you `spawn` a process, but later decide it would be a waste to +have it keep running and doing stuff. The `kill` function will force a process +to bail on whatever task it is running. So if there is an HTTP request in +flight, it will also abort the request. +-} +kill : Id -> Task x () +kill = + Native.Scheduler.kill + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Random.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Random.elm new file mode 100644 index 0000000..d506433 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Random.elm @@ -0,0 +1,532 @@ +effect module Random where { command = MyCmd } exposing + ( Generator, Seed + , bool, int, float + , list, pair + , map, map2, map3, map4, map5 + , andThen + , minInt, maxInt + , generate + , step, initialSeed + ) + +{-| This library helps you generate pseudo-random values. + +This library is all about building [`generators`](#Generator) for whatever +type of values you need. There are a bunch of primitive generators like +[`bool`](#bool) and [`int`](#int) that you can build up into fancier +generators with functions like [`list`](#list) and [`map`](#map). + +It may be helpful to [read about JSON decoders][json] because they work very +similarly. + +[json]: https://evancz.gitbooks.io/an-introduction-to-elm/content/interop/json.html + +> *Note:* This is an implementation of the Portable Combined Generator of +L'Ecuyer for 32-bit computers. It is almost a direct translation from the +[System.Random](http://hackage.haskell.org/package/random-1.0.1.1/docs/System-Random.html) +module. It has a period of roughly 2.30584e18. + +# Generators +@docs Generator + +# Primitive Generators +@docs bool, int, float + +# Data Structure Generators +@docs pair, list + +# Custom Generators +@docs map, map2, map3, map4, map5, andThen + +# Generate Values +@docs generate + +# Generate Values Manually +@docs step, Seed, initialSeed + +# Constants +@docs maxInt, minInt + +-} + +import Basics exposing (..) +import List exposing ((::)) +import Platform +import Platform.Cmd exposing (Cmd) +import Task exposing (Task) +import Time +import Tuple + + + +-- PRIMITIVE GENERATORS + + +{-| Create a generator that produces boolean values. The following example +simulates a coin flip that may land heads or tails. + + type Flip = Heads | Tails + + coinFlip : Generator Flip + coinFlip = + map (\b -> if b then Heads else Tails) bool +-} +bool : Generator Bool +bool = + map ((==) 1) (int 0 1) + + +{-| Generate 32-bit integers in a given range. + + int 0 10 -- an integer between zero and ten + int -5 5 -- an integer between -5 and 5 + + int minInt maxInt -- an integer in the widest range feasible + +This function *can* produce values outside of the range [[`minInt`](#minInt), +[`maxInt`](#maxInt)] but sufficient randomness is not guaranteed. +-} +int : Int -> Int -> Generator Int +int a b = + Generator <| \(Seed seed) -> + let + (lo,hi) = + if a < b then (a,b) else (b,a) + + k = hi - lo + 1 + -- 2^31 - 87 + base = 2147483561 + n = iLogBase base k + + f n acc state = + case n of + 0 -> (acc, state) + _ -> + let + (x, nextState) = seed.next state + in + f (n - 1) (x + acc * base) nextState + + (v, nextState) = + f n 1 seed.state + in + ( lo + v % k + , Seed { seed | state = nextState } + ) + + +iLogBase : Int -> Int -> Int +iLogBase b i = + if i < b then + 1 + else + 1 + iLogBase b (i // b) + + +{-| The maximum value for randomly generated 32-bit ints: 2147483647 -} +maxInt : Int +maxInt = + 2147483647 + + +{-| The minimum value for randomly generated 32-bit ints: -2147483648 -} +minInt : Int +minInt = + -2147483648 + + +{-| Generate floats in a given range. The following example is a generator +that produces decimals between 0 and 1. + + probability : Generator Float + probability = + float 0 1 +-} +float : Float -> Float -> Generator Float +float a b = + Generator <| \seed -> + let + (lo, hi) = + if a < b then (a,b) else (b,a) + + (number, newSeed) = + step (int minInt maxInt) seed + + negativeOneToOne = + toFloat number / toFloat (maxInt - minInt) + + scaled = + (lo+hi)/2 + ((hi-lo) * negativeOneToOne) + in + (scaled, newSeed) + + + +-- DATA STRUCTURES + + +{-| Create a pair of random values. A common use of this might be to generate +a point in a certain 2D space. Imagine we have a collage that is 400 pixels +wide and 200 pixels tall. + + randomPoint : Generator (Int,Int) + randomPoint = + pair (int -200 200) (int -100 100) + +-} +pair : Generator a -> Generator b -> Generator (a,b) +pair genA genB = + map2 (,) genA genB + + +{-| Create a list of random values. + + floatList : Generator (List Float) + floatList = + list 10 (float 0 1) + + intList : Generator (List Int) + intList = + list 5 (int 0 100) + + intPairs : Generator (List (Int, Int)) + intPairs = + list 10 <| pair (int 0 100) (int 0 100) +-} +list : Int -> Generator a -> Generator (List a) +list n (Generator generate) = + Generator <| \seed -> + listHelp [] n generate seed + + +listHelp : List a -> Int -> (Seed -> (a,Seed)) -> Seed -> (List a, Seed) +listHelp list n generate seed = + if n < 1 then + (List.reverse list, seed) + + else + let + (value, newSeed) = + generate seed + in + listHelp (value :: list) (n-1) generate newSeed + + + +-- CUSTOM GENERATORS + + +{-| Transform the values produced by a generator. The following examples show +how to generate booleans and letters based on a basic integer generator. + + bool : Generator Bool + bool = + map ((==) 1) (int 0 1) + + lowercaseLetter : Generator Char + lowercaseLetter = + map (\n -> Char.fromCode (n + 97)) (int 0 25) + + uppercaseLetter : Generator Char + uppercaseLetter = + map (\n -> Char.fromCode (n + 65)) (int 0 25) + +-} +map : (a -> b) -> Generator a -> Generator b +map func (Generator genA) = + Generator <| \seed0 -> + let + (a, seed1) = genA seed0 + in + (func a, seed1) + + +{-| Combine two generators. + +This function is used to define things like [`pair`](#pair) where you want to +put two generators together. + + pair : Generator a -> Generator b -> Generator (a,b) + pair genA genB = + map2 (,) genA genB + +-} +map2 : (a -> b -> c) -> Generator a -> Generator b -> Generator c +map2 func (Generator genA) (Generator genB) = + Generator <| \seed0 -> + let + (a, seed1) = genA seed0 + (b, seed2) = genB seed1 + in + (func a b, seed2) + + +{-| Combine three generators. This could be used to produce random colors. + + import Color + + rgb : Generator Color.Color + rgb = + map3 Color.rgb (int 0 255) (int 0 255) (int 0 255) + + hsl : Generator Color.Color + hsl = + map3 Color.hsl (map degrees (int 0 360)) (float 0 1) (float 0 1) +-} +map3 : (a -> b -> c -> d) -> Generator a -> Generator b -> Generator c -> Generator d +map3 func (Generator genA) (Generator genB) (Generator genC) = + Generator <| \seed0 -> + let + (a, seed1) = genA seed0 + (b, seed2) = genB seed1 + (c, seed3) = genC seed2 + in + (func a b c, seed3) + + +{-| Combine four generators. +-} +map4 : (a -> b -> c -> d -> e) -> Generator a -> Generator b -> Generator c -> Generator d -> Generator e +map4 func (Generator genA) (Generator genB) (Generator genC) (Generator genD) = + Generator <| \seed0 -> + let + (a, seed1) = genA seed0 + (b, seed2) = genB seed1 + (c, seed3) = genC seed2 + (d, seed4) = genD seed3 + in + (func a b c d, seed4) + + +{-| Combine five generators. +-} +map5 : (a -> b -> c -> d -> e -> f) -> Generator a -> Generator b -> Generator c -> Generator d -> Generator e -> Generator f +map5 func (Generator genA) (Generator genB) (Generator genC) (Generator genD) (Generator genE) = + Generator <| \seed0 -> + let + (a, seed1) = genA seed0 + (b, seed2) = genB seed1 + (c, seed3) = genC seed2 + (d, seed4) = genD seed3 + (e, seed5) = genE seed4 + in + (func a b c d e, seed5) + + +{-| Chain random operations, threading through the seed. In the following +example, we will generate a random letter by putting together uppercase and +lowercase letters. + + letter : Generator Char + letter = + bool + |> andThen upperOrLower + + upperOrLower : Bool -> Generator Char + upperOrLower b = + if b then uppercaseLetter else lowercaseLetter + + -- bool : Generator Bool + -- uppercaseLetter : Generator Char + -- lowercaseLetter : Generator Char +-} +andThen : (a -> Generator b) -> Generator a -> Generator b +andThen callback (Generator generate) = + Generator <| \seed -> + let + (result, newSeed) = + generate seed + + (Generator genB) = + callback result + in + genB newSeed + + + +-- IMPLEMENTATION + + +{-| A `Generator` is like a recipe for generating certain random values. So a +`Generator Int` describes how to generate integers and a `Generator String` +describes how to generate strings. + +To actually *run* a generator and produce the random values, you need to use +functions like [`generate`](#generate) and [`initialSeed`](#initialSeed). +-} +type Generator a = + Generator (Seed -> (a, Seed)) + + +type State = State Int Int + + +{-| A `Seed` is the source of randomness in this whole system. Whenever +you want to use a generator, you need to pair it with a seed. +-} +type Seed = + Seed + { state : State + , next : State -> (Int, State) + , split : State -> (State, State) + , range : State -> (Int,Int) + } + + +{-| Generate a random value as specified by a given `Generator`. + +In the following example, we are trying to generate a number between 0 and 100 +with the `int 0 100` generator. Each time we call `step` we need to provide a +seed. This will produce a random number and a *new* seed to use if we want to +run other generators later. + +So here it is done right, where we get a new seed from each `step` call and +thread that through. + + seed0 = initialSeed 31415 + + -- step (int 0 100) seed0 ==> (42, seed1) + -- step (int 0 100) seed1 ==> (31, seed2) + -- step (int 0 100) seed2 ==> (99, seed3) + +Notice that we use different seeds on each line. This is important! If you use +the same seed, you get the same results. + + -- step (int 0 100) seed0 ==> (42, seed1) + -- step (int 0 100) seed0 ==> (42, seed1) + -- step (int 0 100) seed0 ==> (42, seed1) +-} +step : Generator a -> Seed -> (a, Seed) +step (Generator generator) seed = + generator seed + + +{-| Create a “seed” of randomness which makes it possible to +generate random values. If you use the same seed many times, it will result +in the same thing every time! A good way to get an unexpected seed is to use +the current time. +-} +initialSeed : Int -> Seed +initialSeed n = + Seed + { state = initState n + , next = next + , split = split + , range = range + } + + +{-| Produce the initial generator state. Distinct arguments should be likely +to produce distinct generator states. +-} +initState : Int -> State +initState seed = + let + s = max seed -seed + q = s // (magicNum6-1) + s1 = s % (magicNum6-1) + s2 = q % (magicNum7-1) + in + State (s1+1) (s2+1) + + +magicNum0 = 40014 +magicNum1 = 53668 +magicNum2 = 12211 +magicNum3 = 52774 +magicNum4 = 40692 +magicNum5 = 3791 +magicNum6 = 2147483563 +magicNum7 = 2147483399 +magicNum8 = 2147483562 + + +next : State -> (Int, State) +next (State state1 state2) = + -- Div always rounds down and so random numbers are biased + -- ideally we would use division that rounds towards zero so + -- that in the negative case it rounds up and in the positive case + -- it rounds down. Thus half the time it rounds up and half the time it + -- rounds down + let + k1 = state1 // magicNum1 + rawState1 = magicNum0 * (state1 - k1 * magicNum1) - k1 * magicNum2 + newState1 = if rawState1 < 0 then rawState1 + magicNum6 else rawState1 + k2 = state2 // magicNum3 + rawState2 = magicNum4 * (state2 - k2 * magicNum3) - k2 * magicNum5 + newState2 = if rawState2 < 0 then rawState2 + magicNum7 else rawState2 + z = newState1 - newState2 + newZ = if z < 1 then z + magicNum8 else z + in + (newZ, State newState1 newState2) + + +split : State -> (State, State) +split (State s1 s2 as std) = + let + new_s1 = + if s1 == magicNum6-1 then 1 else s1 + 1 + + new_s2 = + if s2 == 1 then magicNum7-1 else s2 - 1 + + (State t1 t2) = + Tuple.second (next std) + in + (State new_s1 t2, State t1 new_s2) + + +range : State -> (Int,Int) +range _ = + (0, magicNum8) + + + +-- MANAGER + + +{-| Create a command that will generate random values. + +Read more about how to use this in your programs in [The Elm Architecture +tutorial][arch] which has a section specifically [about random values][rand]. + +[arch]: https://evancz.gitbooks.io/an-introduction-to-elm/content/architecture/index.html +[rand]: https://evancz.gitbooks.io/an-introduction-to-elm/content/architecture/effects/random.html +-} +generate : (a -> msg) -> Generator a -> Cmd msg +generate tagger generator = + command (Generate (map tagger generator)) + + +type MyCmd msg = Generate (Generator msg) + + +cmdMap : (a -> b) -> MyCmd a -> MyCmd b +cmdMap func (Generate generator) = + Generate (map func generator) + + +init : Task Never Seed +init = + Time.now + |> Task.andThen (\t -> Task.succeed (initialSeed (round t))) + + +onEffects : Platform.Router msg Never -> List (MyCmd msg) -> Seed -> Task Never Seed +onEffects router commands seed = + case commands of + [] -> + Task.succeed seed + + Generate generator :: rest -> + let + (value, newSeed) = + step generator seed + in + Platform.sendToApp router value + |> Task.andThen (\_ -> onEffects router rest newSeed) + + +onSelfMsg : Platform.Router msg Never -> Never -> Seed -> Task Never Seed +onSelfMsg _ _ seed = + Task.succeed seed diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Regex.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Regex.elm new file mode 100644 index 0000000..2d58ecf --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Regex.elm @@ -0,0 +1,148 @@ +module Regex exposing + ( Regex + , regex, escape, caseInsensitive + , HowMany(..), Match + , contains, find, replace, split + ) + +{-| A library for working with regular expressions. It uses [the +same kind of regular expressions accepted by JavaScript](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions). + +# Create +@docs Regex, regex, escape, caseInsensitive + +# Helpful Data Structures + +These data structures are needed to help define functions like [`find`](#find) +and [`replace`](#replace). + +@docs HowMany, Match + +# Use +@docs contains, find, replace, split + +-} + +import Maybe exposing (Maybe) +import Native.Regex + + +{-| A regular expression, describing a certain set of strings. +-} +type Regex = Regex + + +{-| Escape strings to be regular expressions, making all special characters +safe. So `regex (escape "^a+")` will match exactly `"^a+"` instead of a series +of `a`’s that start at the beginning of the line. +-} +escape : String -> String +escape = + Native.Regex.escape + + +{-| Create a Regex that matches patterns [as specified in JavaScript](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions#Writing_a_Regular_Expression_Pattern). + +Be careful to escape backslashes properly! For example, `"\w"` is escaping the +letter `w` which is probably not what you want. You probably want `"\\w"` +instead, which escapes the backslash. +-} +regex : String -> Regex +regex = + Native.Regex.regex + + + +{-| Make a regex case insensitive -} +caseInsensitive : Regex -> Regex +caseInsensitive = + Native.Regex.caseInsensitive + + +{-| Check to see if a Regex is contained in a string. + + contains (regex "123") "12345" == True + contains (regex "b+") "aabbcc" == True + + contains (regex "789") "12345" == False + contains (regex "z+") "aabbcc" == False +-} +contains : Regex -> String -> Bool +contains = + Native.Regex.contains + + +{-| A `Match` represents all of the details about a particular match in a string. +Here are details on each field: + + * `match` — the full string of the match. + * `submatches` — a regex might have [subpatterns, surrounded by + parentheses](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions#Using_Parenthesized_Substring_Matches). + If there are N subpatterns, there will be N elements in the `submatches` list. + Each submatch in this list is a `Maybe` because not all subpatterns may trigger. + For example, `(regex "(a+)|(b+)")` will either match many `a`’s or + many `b`’s, but never both. + * `index` — the index of the match in the original string. + * `number` — if you find many matches, you can think of each one + as being labeled with a `number` starting at one. So the first time you + find a match, that is match `number` one. Second time is match `number` two. + This is useful when paired with `replace All` if replacement is dependent on how + many times a pattern has appeared before. +-} +type alias Match = + { match : String + , submatches : List (Maybe String) + , index : Int + , number : Int + } + + +{-| `HowMany` is used to specify how many matches you want to make. So +`replace All` would replace every match, but `replace (AtMost 2)` would +replace at most two matches (i.e. zero, one, two, but never three or more). +-} +type HowMany = All | AtMost Int + + +{-| Find matches in a string: + + findTwoCommas = find (AtMost 2) (regex ",") + + -- map .index (findTwoCommas "a,b,c,d,e") == [1,3] + -- map .index (findTwoCommas "a b c d e") == [] + + places = find All (regex "[oi]n a (\\w+)") "I am on a boat in a lake." + + -- map .match places == ["on a boat", "in a lake"] + -- map .submatches places == [ [Just "boat"], [Just "lake"] ] +-} +find : HowMany -> Regex -> String -> List Match +find = + Native.Regex.find + + +{-| Replace matches. The function from `Match` to `String` lets +you use the details of a specific match when making replacements. + + devowel = replace All (regex "[aeiou]") (\_ -> "") + + -- devowel "The quick brown fox" == "Th qck brwn fx" + + reverseWords = replace All (regex "\\w+") (\{match} -> String.reverse match) + + -- reverseWords "deliver mined parts" == "reviled denim strap" +-} +replace : HowMany -> Regex -> (Match -> String) -> String -> String +replace = + Native.Regex.replace + + +{-| Split a string, using the regex as the separator. + + split (AtMost 1) (regex ",") "tom,99,90,85" == ["tom","99,90,85"] + + split All (regex ",") "a,b,c,d" == ["a","b","c","d"] +-} +split : HowMany -> Regex -> String -> List String +split = + Native.Regex.split diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Result.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Result.elm new file mode 100644 index 0000000..61c678c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Result.elm @@ -0,0 +1,210 @@ +module Result exposing + ( Result(..) + , withDefault + , map, map2, map3, map4, map5 + , andThen + , toMaybe, fromMaybe, mapError + ) + +{-| A `Result` is the result of a computation that may fail. This is a great +way to manage errors in Elm. + +# Type and Constructors +@docs Result + +# Mapping +@docs map, map2, map3, map4, map5 + +# Chaining +@docs andThen + +# Handling Errors +@docs withDefault, toMaybe, fromMaybe, mapError +-} + +import Maybe exposing ( Maybe(Just, Nothing) ) + + +{-| A `Result` is either `Ok` meaning the computation succeeded, or it is an +`Err` meaning that there was some failure. +-} +type Result error value + = Ok value + | Err error + + +{-| If the result is `Ok` return the value, but if the result is an `Err` then +return a given default value. The following examples try to parse integers. + + Result.withDefault 0 (String.toInt "123") == 123 + Result.withDefault 0 (String.toInt "abc") == 0 +-} +withDefault : a -> Result x a -> a +withDefault def result = + case result of + Ok a -> + a + + Err _ -> + def + + +{-| Apply a function to a result. If the result is `Ok`, it will be converted. +If the result is an `Err`, the same error value will propagate through. + + map sqrt (Ok 4.0) == Ok 2.0 + map sqrt (Err "bad input") == Err "bad input" +-} +map : (a -> value) -> Result x a -> Result x value +map func ra = + case ra of + Ok a -> Ok (func a) + Err e -> Err e + + +{-| Apply a function to two results, if both results are `Ok`. If not, +the first argument which is an `Err` will propagate through. + + map2 (+) (String.toInt "1") (String.toInt "2") == Ok 3 + map2 (+) (String.toInt "1") (String.toInt "y") == Err "could not convert string 'y' to an Int" + map2 (+) (String.toInt "x") (String.toInt "y") == Err "could not convert string 'x' to an Int" +-} +map2 : (a -> b -> value) -> Result x a -> Result x b -> Result x value +map2 func ra rb = + case (ra,rb) of + (Ok a, Ok b) -> Ok (func a b) + (Err x, _) -> Err x + (_, Err x) -> Err x + + +{-|-} +map3 : (a -> b -> c -> value) -> Result x a -> Result x b -> Result x c -> Result x value +map3 func ra rb rc = + case (ra,rb,rc) of + (Ok a, Ok b, Ok c) -> Ok (func a b c) + (Err x, _, _) -> Err x + (_, Err x, _) -> Err x + (_, _, Err x) -> Err x + + +{-|-} +map4 : (a -> b -> c -> d -> value) -> Result x a -> Result x b -> Result x c -> Result x d -> Result x value +map4 func ra rb rc rd = + case (ra,rb,rc,rd) of + (Ok a, Ok b, Ok c, Ok d) -> Ok (func a b c d) + (Err x, _, _, _) -> Err x + (_, Err x, _, _) -> Err x + (_, _, Err x, _) -> Err x + (_, _, _, Err x) -> Err x + + +{-|-} +map5 : (a -> b -> c -> d -> e -> value) -> Result x a -> Result x b -> Result x c -> Result x d -> Result x e -> Result x value +map5 func ra rb rc rd re = + case (ra,rb,rc,rd,re) of + (Ok a, Ok b, Ok c, Ok d, Ok e) -> Ok (func a b c d e) + (Err x, _, _, _, _) -> Err x + (_, Err x, _, _, _) -> Err x + (_, _, Err x, _, _) -> Err x + (_, _, _, Err x, _) -> Err x + (_, _, _, _, Err x) -> Err x + + +{-| Chain together a sequence of computations that may fail. It is helpful +to see its definition: + + andThen : (a -> Result e b) -> Result e a -> Result e b + andThen callback result = + case result of + Ok value -> callback value + Err msg -> Err msg + +This means we only continue with the callback if things are going well. For +example, say you need to use (`toInt : String -> Result String Int`) to parse +a month and make sure it is between 1 and 12: + + toValidMonth : Int -> Result String Int + toValidMonth month = + if month >= 1 && month <= 12 + then Ok month + else Err "months must be between 1 and 12" + + toMonth : String -> Result String Int + toMonth rawString = + toInt rawString + |> andThen toValidMonth + + -- toMonth "4" == Ok 4 + -- toMonth "9" == Ok 9 + -- toMonth "a" == Err "cannot parse to an Int" + -- toMonth "0" == Err "months must be between 1 and 12" + +This allows us to come out of a chain of operations with quite a specific error +message. It is often best to create a custom type that explicitly represents +the exact ways your computation may fail. This way it is easy to handle in your +code. +-} +andThen : (a -> Result x b) -> Result x a -> Result x b +andThen callback result = + case result of + Ok value -> + callback value + + Err msg -> + Err msg + + +{-| Transform an `Err` value. For example, say the errors we get have too much +information: + + parseInt : String -> Result ParseError Int + + type alias ParseError = + { message : String + , code : Int + , position : (Int,Int) + } + + mapError .message (parseInt "123") == Ok 123 + mapError .message (parseInt "abc") == Err "char 'a' is not a number" +-} +mapError : (x -> y) -> Result x a -> Result y a +mapError f result = + case result of + Ok v -> + Ok v + + Err e -> + Err (f e) + + +{-| Convert to a simpler `Maybe` if the actual error message is not needed or +you need to interact with some code that primarily uses maybes. + + parseInt : String -> Result ParseError Int + + maybeParseInt : String -> Maybe Int + maybeParseInt string = + toMaybe (parseInt string) +-} +toMaybe : Result x a -> Maybe a +toMaybe result = + case result of + Ok v -> Just v + Err _ -> Nothing + + +{-| Convert from a simple `Maybe` to interact with some code that primarily +uses `Results`. + + parseInt : String -> Maybe Int + + resultParseInt : String -> Result String Int + resultParseInt string = + fromMaybe ("error parsing string: " ++ toString string) (parseInt string) +-} +fromMaybe : x -> Maybe a -> Result x a +fromMaybe err maybe = + case maybe of + Just v -> Ok v + Nothing -> Err err diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Set.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Set.elm new file mode 100644 index 0000000..9b1914a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Set.elm @@ -0,0 +1,168 @@ +module Set exposing + ( Set + , empty, singleton, insert, remove + , isEmpty, member, size + , foldl, foldr, map + , filter, partition + , union, intersect, diff + , toList, fromList + ) + +{-| A set of unique values. The values can be any comparable type. This +includes `Int`, `Float`, `Time`, `Char`, `String`, and tuples or lists +of comparable types. + +Insert, remove, and query operations all take *O(log n)* time. + +# Sets +@docs Set + +# Build +@docs empty, singleton, insert, remove + +# Query +@docs isEmpty, member, size + +# Combine +@docs union, intersect, diff + +# Lists +@docs toList, fromList + +# Transform +@docs map, foldl, foldr, filter, partition + +-} + +import Basics exposing ((<|)) +import Dict as Dict +import List as List + + +{-| Represents a set of unique values. So `(Set Int)` is a set of integers and +`(Set String)` is a set of strings. +-} +type Set t = + Set_elm_builtin (Dict.Dict t ()) + + +{-| Create an empty set. +-} +empty : Set a +empty = + Set_elm_builtin Dict.empty + + +{-| Create a set with one value. +-} +singleton : comparable -> Set comparable +singleton k = + Set_elm_builtin <| Dict.singleton k () + + +{-| Insert a value into a set. +-} +insert : comparable -> Set comparable -> Set comparable +insert k (Set_elm_builtin d) = + Set_elm_builtin <| Dict.insert k () d + + +{-| Remove a value from a set. If the value is not found, no changes are made. +-} +remove : comparable -> Set comparable -> Set comparable +remove k (Set_elm_builtin d) = + Set_elm_builtin <| Dict.remove k d + + +{-| Determine if a set is empty. +-} +isEmpty : Set a -> Bool +isEmpty (Set_elm_builtin d) = + Dict.isEmpty d + + +{-| Determine if a value is in a set. +-} +member : comparable -> Set comparable -> Bool +member k (Set_elm_builtin d) = + Dict.member k d + + +{-| Determine the number of elements in a set. +-} +size : Set a -> Int +size (Set_elm_builtin d) = + Dict.size d + + +{-| Get the union of two sets. Keep all values. +-} +union : Set comparable -> Set comparable -> Set comparable +union (Set_elm_builtin d1) (Set_elm_builtin d2) = + Set_elm_builtin <| Dict.union d1 d2 + + +{-| Get the intersection of two sets. Keeps values that appear in both sets. +-} +intersect : Set comparable -> Set comparable -> Set comparable +intersect (Set_elm_builtin d1) (Set_elm_builtin d2) = + Set_elm_builtin <| Dict.intersect d1 d2 + + +{-| Get the difference between the first set and the second. Keeps values +that do not appear in the second set. +-} +diff : Set comparable -> Set comparable -> Set comparable +diff (Set_elm_builtin d1) (Set_elm_builtin d2) = + Set_elm_builtin <| Dict.diff d1 d2 + + +{-| Convert a set into a list, sorted from lowest to highest. +-} +toList : Set comparable -> List comparable +toList (Set_elm_builtin d) = + Dict.keys d + + +{-| Convert a list into a set, removing any duplicates. +-} +fromList : List comparable -> Set comparable +fromList xs = List.foldl insert empty xs + + +{-| Fold over the values in a set, in order from lowest to highest. +-} +foldl : (comparable -> b -> b) -> b -> Set comparable -> b +foldl f b (Set_elm_builtin d) = + Dict.foldl (\k _ b -> f k b) b d + + +{-| Fold over the values in a set, in order from highest to lowest. +-} +foldr : (comparable -> b -> b) -> b -> Set comparable -> b +foldr f b (Set_elm_builtin d) = + Dict.foldr (\k _ b -> f k b) b d + + +{-| Map a function onto a set, creating a new set with no duplicates. +-} +map : (comparable -> comparable2) -> Set comparable -> Set comparable2 +map f s = fromList (List.map f (toList s)) + + +{-| Create a new set consisting only of elements which satisfy a predicate. +-} +filter : (comparable -> Bool) -> Set comparable -> Set comparable +filter p (Set_elm_builtin d) = + Set_elm_builtin <| Dict.filter (\k _ -> p k) d + + +{-| Create two new sets; the first consisting of elements which satisfy a +predicate, the second consisting of elements which do not. +-} +partition : (comparable -> Bool) -> Set comparable -> (Set comparable, Set comparable) +partition p (Set_elm_builtin d) = + let + (p1, p2) = Dict.partition (\k _ -> p k) d + in + (Set_elm_builtin p1, Set_elm_builtin p2) diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/String.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/String.elm new file mode 100644 index 0000000..a648e8d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/String.elm @@ -0,0 +1,464 @@ +module String exposing + ( isEmpty, length, reverse, repeat + , cons, uncons, fromChar, append, concat, split, join, words, lines + , slice, left, right, dropLeft, dropRight + , contains, startsWith, endsWith, indexes, indices + , toInt, toFloat, toList, fromList + , toUpper, toLower, pad, padLeft, padRight, trim, trimLeft, trimRight + , map, filter, foldl, foldr, any, all + ) + +{-| A built-in representation for efficient string manipulation. String literals +are enclosed in `"double quotes"`. Strings are *not* lists of characters. + +# Basics +@docs isEmpty, length, reverse, repeat + +# Building and Splitting +@docs cons, uncons, fromChar, append, concat, split, join, words, lines + +# Get Substrings +@docs slice, left, right, dropLeft, dropRight + +# Check for Substrings +@docs contains, startsWith, endsWith, indexes, indices + +# Conversions +@docs toInt, toFloat, toList, fromList + +# Formatting +Cosmetic operations such as padding with extra characters or trimming whitespace. + +@docs toUpper, toLower, + pad, padLeft, padRight, + trim, trimLeft, trimRight + +# Higher-Order Functions +@docs map, filter, foldl, foldr, any, all +-} + +import Native.String +import Char +import Maybe exposing (Maybe) +import Result exposing (Result) + + +{-| Determine if a string is empty. + + isEmpty "" == True + isEmpty "the world" == False +-} +isEmpty : String -> Bool +isEmpty = + Native.String.isEmpty + + +{-| Add a character to the beginning of a string. + + cons 'T' "he truth is out there" == "The truth is out there" +-} +cons : Char -> String -> String +cons = + Native.String.cons + + +{-| Create a string from a given character. + + fromChar 'a' == "a" +-} +fromChar : Char -> String +fromChar char = + cons char "" + + +{-| Split a non-empty string into its head and tail. This lets you +pattern match on strings exactly as you would with lists. + + uncons "abc" == Just ('a',"bc") + uncons "" == Nothing +-} +uncons : String -> Maybe (Char, String) +uncons = + Native.String.uncons + + +{-| Append two strings. You can also use [the `(++)` operator](Basics#++) +to do this. + + append "butter" "fly" == "butterfly" +-} +append : String -> String -> String +append = + Native.String.append + + +{-| Concatenate many strings into one. + + concat ["never","the","less"] == "nevertheless" +-} +concat : List String -> String +concat = + Native.String.concat + + +{-| Get the length of a string. + + length "innumerable" == 11 + length "" == 0 + +-} +length : String -> Int +length = + Native.String.length + + +{-| Transform every character in a string + + map (\c -> if c == '/' then '.' else c) "a/b/c" == "a.b.c" +-} +map : (Char -> Char) -> String -> String +map = + Native.String.map + + +{-| Keep only the characters that satisfy the predicate. + + filter isDigit "R2-D2" == "22" +-} +filter : (Char -> Bool) -> String -> String +filter = + Native.String.filter + + +{-| Reverse a string. + + reverse "stressed" == "desserts" +-} +reverse : String -> String +reverse = + Native.String.reverse + + +{-| Reduce a string from the left. + + foldl cons "" "time" == "emit" +-} +foldl : (Char -> b -> b) -> b -> String -> b +foldl = + Native.String.foldl + + +{-| Reduce a string from the right. + + foldr cons "" "time" == "time" +-} +foldr : (Char -> b -> b) -> b -> String -> b +foldr = + Native.String.foldr + + +{-| Split a string using a given separator. + + split "," "cat,dog,cow" == ["cat","dog","cow"] + split "/" "home/evan/Desktop/" == ["home","evan","Desktop", ""] + +Use [`Regex.split`](Regex#split) if you need something more flexible. +-} +split : String -> String -> List String +split = + Native.String.split + + +{-| Put many strings together with a given separator. + + join "a" ["H","w","ii","n"] == "Hawaiian" + join " " ["cat","dog","cow"] == "cat dog cow" + join "/" ["home","evan","Desktop"] == "home/evan/Desktop" +-} +join : String -> List String -> String +join = + Native.String.join + + +{-| Repeat a string *n* times. + + repeat 3 "ha" == "hahaha" +-} +repeat : Int -> String -> String +repeat = + Native.String.repeat + + +{-| Take a substring given a start and end index. Negative indexes +are taken starting from the *end* of the list. + + slice 7 9 "snakes on a plane!" == "on" + slice 0 6 "snakes on a plane!" == "snakes" + slice 0 -7 "snakes on a plane!" == "snakes on a" + slice -6 -1 "snakes on a plane!" == "plane" +-} +slice : Int -> Int -> String -> String +slice = + Native.String.slice + + +{-| Take *n* characters from the left side of a string. + + left 2 "Mulder" == "Mu" +-} +left : Int -> String -> String +left = + Native.String.left + + +{-| Take *n* characters from the right side of a string. + + right 2 "Scully" == "ly" +-} +right : Int -> String -> String +right = + Native.String.right + + +{-| Drop *n* characters from the left side of a string. + + dropLeft 2 "The Lone Gunmen" == "e Lone Gunmen" +-} +dropLeft : Int -> String -> String +dropLeft = + Native.String.dropLeft + + +{-| Drop *n* characters from the right side of a string. + + dropRight 2 "Cigarette Smoking Man" == "Cigarette Smoking M" +-} +dropRight : Int -> String -> String +dropRight = + Native.String.dropRight + + +{-| Pad a string on both sides until it has a given length. + + pad 5 ' ' "1" == " 1 " + pad 5 ' ' "11" == " 11 " + pad 5 ' ' "121" == " 121 " +-} +pad : Int -> Char -> String -> String +pad = + Native.String.pad + + +{-| Pad a string on the left until it has a given length. + + padLeft 5 '.' "1" == "....1" + padLeft 5 '.' "11" == "...11" + padLeft 5 '.' "121" == "..121" +-} +padLeft : Int -> Char -> String -> String +padLeft = + Native.String.padLeft + + +{-| Pad a string on the right until it has a given length. + + padRight 5 '.' "1" == "1...." + padRight 5 '.' "11" == "11..." + padRight 5 '.' "121" == "121.." +-} +padRight : Int -> Char -> String -> String +padRight = + Native.String.padRight + + +{-| Get rid of whitespace on both sides of a string. + + trim " hats \n" == "hats" +-} +trim : String -> String +trim = + Native.String.trim + + +{-| Get rid of whitespace on the left of a string. + + trimLeft " hats \n" == "hats \n" +-} +trimLeft : String -> String +trimLeft = + Native.String.trimLeft + + +{-| Get rid of whitespace on the right of a string. + + trimRight " hats \n" == " hats" +-} +trimRight : String -> String +trimRight = + Native.String.trimRight + + +{-| Break a string into words, splitting on chunks of whitespace. + + words "How are \t you? \n Good?" == ["How","are","you?","Good?"] +-} +words : String -> List String +words = + Native.String.words + + +{-| Break a string into lines, splitting on newlines. + + lines "How are you?\nGood?" == ["How are you?", "Good?"] +-} +lines : String -> List String +lines = + Native.String.lines + + +{-| Convert a string to all upper case. Useful for case-insensitive comparisons +and VIRTUAL YELLING. + + toUpper "skinner" == "SKINNER" +-} +toUpper : String -> String +toUpper = + Native.String.toUpper + + +{-| Convert a string to all lower case. Useful for case-insensitive comparisons. + + toLower "X-FILES" == "x-files" +-} +toLower : String -> String +toLower = + Native.String.toLower + + +{-| Determine whether *any* characters satisfy a predicate. + + any isDigit "90210" == True + any isDigit "R2-D2" == True + any isDigit "heart" == False +-} +any : (Char -> Bool) -> String -> Bool +any = + Native.String.any + + +{-| Determine whether *all* characters satisfy a predicate. + + all isDigit "90210" == True + all isDigit "R2-D2" == False + all isDigit "heart" == False +-} +all : (Char -> Bool) -> String -> Bool +all = + Native.String.all + + +{-| See if the second string contains the first one. + + contains "the" "theory" == True + contains "hat" "theory" == False + contains "THE" "theory" == False + +Use [`Regex.contains`](Regex#contains) if you need something more flexible. +-} +contains : String -> String -> Bool +contains = + Native.String.contains + + +{-| See if the second string starts with the first one. + + startsWith "the" "theory" == True + startsWith "ory" "theory" == False +-} +startsWith : String -> String -> Bool +startsWith = + Native.String.startsWith + + +{-| See if the second string ends with the first one. + + endsWith "the" "theory" == False + endsWith "ory" "theory" == True +-} +endsWith : String -> String -> Bool +endsWith = + Native.String.endsWith + + +{-| Get all of the indexes for a substring in another string. + + indexes "i" "Mississippi" == [1,4,7,10] + indexes "ss" "Mississippi" == [2,5] + indexes "needle" "haystack" == [] +-} +indexes : String -> String -> List Int +indexes = + Native.String.indexes + + +{-| Alias for `indexes`. -} +indices : String -> String -> List Int +indices = + Native.String.indexes + + +{-| Try to convert a string into an int, failing on improperly formatted strings. + + String.toInt "123" == Ok 123 + String.toInt "-42" == Ok -42 + String.toInt "3.1" == Err "could not convert string '3.1' to an Int" + String.toInt "31a" == Err "could not convert string '31a' to an Int" + +If you are extracting a number from some raw user input, you will typically +want to use [`Result.withDefault`](Result#withDefault) to handle bad data: + + Result.withDefault 0 (String.toInt "42") == 42 + Result.withDefault 0 (String.toInt "ab") == 0 +-} +toInt : String -> Result String Int +toInt = + Native.String.toInt + + +{-| Try to convert a string into a float, failing on improperly formatted strings. + + String.toFloat "123" == Ok 123.0 + String.toFloat "-42" == Ok -42.0 + String.toFloat "3.1" == Ok 3.1 + String.toFloat "31a" == Err "could not convert string '31a' to a Float" + +If you are extracting a number from some raw user input, you will typically +want to use [`Result.withDefault`](Result#withDefault) to handle bad data: + + Result.withDefault 0 (String.toFloat "42.5") == 42.5 + Result.withDefault 0 (String.toFloat "cats") == 0 +-} +toFloat : String -> Result String Float +toFloat = + Native.String.toFloat + + +{-| Convert a string to a list of characters. + + toList "abc" == ['a','b','c'] +-} +toList : String -> List Char +toList = + Native.String.toList + + +{-| Convert a list of characters into a String. Can be useful if you +want to create a string primarily by consing, perhaps for decoding +something. + + fromList ['a','b','c'] == "abc" +-} +fromList : List Char -> String +fromList = + Native.String.fromList + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Task.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Task.elm new file mode 100644 index 0000000..64e9642 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Task.elm @@ -0,0 +1,278 @@ +effect module Task where { command = MyCmd } exposing + ( Task + , succeed, fail + , map, map2, map3, map4, map5 + , sequence + , andThen + , onError, mapError + , perform, attempt + ) + +{-| Tasks make it easy to describe asynchronous operations that may fail, like +HTTP requests or writing to a database. For more information, see the [Elm +documentation on Tasks](http://guide.elm-lang.org/error_handling/task.html). + +# Basics +@docs Task, succeed, fail + +# Mapping +@docs map, map2, map3, map4, map5 + +# Chaining +@docs andThen, sequence + +# Errors +@docs onError, mapError + +# Commands +@docs perform, attempt + +-} + +import Basics exposing (Never, (|>), (<<)) +import List exposing ((::)) +import Maybe exposing (Maybe(Just,Nothing)) +import Native.Scheduler +import Platform +import Platform.Cmd exposing (Cmd) +import Result exposing (Result(Ok,Err)) + + + +{-| Represents asynchronous effects that may fail. It is useful for stuff like +HTTP. + +For example, maybe we have a task with the type (`Task String User`). This means +that when we perform the task, it will either fail with a `String` message or +succeed with a `User`. So this could represent a task that is asking a server +for a certain user. +-} +type alias Task err ok = + Platform.Task err ok + + + +-- BASICS + + +{-| A task that succeeds immediately when run. + + succeed 42 -- results in 42 +-} +succeed : a -> Task x a +succeed = + Native.Scheduler.succeed + + +{-| A task that fails immediately when run. + + fail "file not found" : Task String a +-} +fail : x -> Task x a +fail = + Native.Scheduler.fail + + + +-- MAPPING + + +{-| Transform a task. + + map sqrt (succeed 9) -- succeed 3 +-} +map : (a -> b) -> Task x a -> Task x b +map func taskA = + taskA + |> andThen (\a -> succeed (func a)) + + +{-| Put the results of two tasks together. If either task fails, the whole +thing fails. It also runs in order so the first task will be completely +finished before the second task starts. + + map2 (+) (succeed 9) (succeed 3) -- succeed 12 +-} +map2 : (a -> b -> result) -> Task x a -> Task x b -> Task x result +map2 func taskA taskB = + taskA + |> andThen (\a -> taskB + |> andThen (\b -> succeed (func a b))) + + +{-|-} +map3 : (a -> b -> c -> result) -> Task x a -> Task x b -> Task x c -> Task x result +map3 func taskA taskB taskC = + taskA + |> andThen (\a -> taskB + |> andThen (\b -> taskC + |> andThen (\c -> succeed (func a b c)))) + + +{-|-} +map4 : (a -> b -> c -> d -> result) -> Task x a -> Task x b -> Task x c -> Task x d -> Task x result +map4 func taskA taskB taskC taskD = + taskA + |> andThen (\a -> taskB + |> andThen (\b -> taskC + |> andThen (\c -> taskD + |> andThen (\d -> succeed (func a b c d))))) + + +{-|-} +map5 : (a -> b -> c -> d -> e -> result) -> Task x a -> Task x b -> Task x c -> Task x d -> Task x e -> Task x result +map5 func taskA taskB taskC taskD taskE = + taskA + |> andThen (\a -> taskB + |> andThen (\b -> taskC + |> andThen (\c -> taskD + |> andThen (\d -> taskE + |> andThen (\e -> succeed (func a b c d e)))))) + + +{-| Start with a list of tasks, and turn them into a single task that returns a +list. The tasks will be run in order one-by-one and if any task fails the whole +sequence fails. + + sequence [ succeed 1, succeed 2 ] -- succeed [ 1, 2 ] + +This can be useful if you need to make a bunch of HTTP requests one-by-one. +-} +sequence : List (Task x a) -> Task x (List a) +sequence tasks = + case tasks of + [] -> + succeed [] + + task :: remainingTasks -> + map2 (::) task (sequence remainingTasks) + + + +-- CHAINING + + +{-| Chain together a task and a callback. The first task will run, and if it is +successful, you give the result to the callback resulting in another task. This +task then gets run. + + succeed 2 + |> andThen (\n -> succeed (n + 2)) + -- succeed 4 + +This is useful for chaining tasks together. Maybe you need to get a user from +your servers *and then* lookup their picture once you know their name. +-} +andThen : (a -> Task x b) -> Task x a -> Task x b +andThen = + Native.Scheduler.andThen + + +-- ERRORS + +{-| Recover from a failure in a task. If the given task fails, we use the +callback to recover. + + fail "file not found" + |> onError (\msg -> succeed 42) + -- succeed 42 + + succeed 9 + |> onError (\msg -> succeed 42) + -- succeed 9 +-} +onError : (x -> Task y a) -> Task x a -> Task y a +onError = + Native.Scheduler.onError + + +{-| Transform the error value. This can be useful if you need a bunch of error +types to match up. + + type Error = Http Http.Error | WebGL WebGL.Error + + getResources : Task Error Resource + getResources = + sequence [ mapError Http serverTask, mapError WebGL textureTask ] +-} +mapError : (x -> y) -> Task x a -> Task y a +mapError convert task = + task + |> onError (fail << convert) + + + +-- COMMANDS + + +type MyCmd msg = + Perform (Task Never msg) + + +{-| The only way to *do* things in Elm is to give commands to the Elm runtime. +So we describe some complex behavior with a `Task` and then command the runtime +to `perform` that task. For example, getting the current time looks like this: + + import Task + import Time exposing (Time) + + type Msg = Click | NewTime Time + + update : Msg -> Model -> Model + update msg model = + case msg of + Click -> + ( model, Task.perform NewTime Time.now ) + + NewTime time -> + ... +-} +perform : (a -> msg) -> Task Never a -> Cmd msg +perform toMessage task = + command (Perform (map toMessage task)) + + +{-| Command the Elm runtime to attempt a task that might fail! +-} +attempt : (Result x a -> msg) -> Task x a -> Cmd msg +attempt resultToMessage task = + command (Perform ( + task + |> andThen (succeed << resultToMessage << Ok) + |> onError (succeed << resultToMessage << Err) + )) + + +cmdMap : (a -> b) -> MyCmd a -> MyCmd b +cmdMap tagger (Perform task) = + Perform (map tagger task) + + + +-- MANAGER + + +init : Task Never () +init = + succeed () + + +onEffects : Platform.Router msg Never -> List (MyCmd msg) -> () -> Task Never () +onEffects router commands state = + map + (\_ -> ()) + (sequence (List.map (spawnCmd router) commands)) + + +onSelfMsg : Platform.Router msg Never -> Never -> () -> Task Never () +onSelfMsg _ _ _ = + succeed () + + +spawnCmd : Platform.Router msg Never -> MyCmd msg -> Task x () +spawnCmd router (Perform task) = + Native.Scheduler.spawn ( + task + |> andThen (Platform.sendToApp router) + ) + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Time.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Time.elm new file mode 100644 index 0000000..b50cdfe --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Time.elm @@ -0,0 +1,243 @@ +effect module Time where { subscription = MySub } exposing + ( Time + , now, every + , millisecond, second, minute, hour + , inMilliseconds, inSeconds, inMinutes, inHours + ) + +{-| Library for working with time. + +# Time +@docs Time, now, every + +# Units +@docs millisecond, second, minute, hour, + inMilliseconds, inSeconds, inMinutes, inHours + +-} + + +import Basics exposing (..) +import Dict +import List exposing ((::)) +import Maybe exposing (Maybe(..)) +import Native.Scheduler +import Native.Time +import Platform +import Platform.Sub exposing (Sub) +import Task exposing (Task) + + + +-- TIMES + + +{-| Type alias to make it clearer when you are working with time values. +Using the `Time` helpers like `second` and `inSeconds` instead of raw numbers +is very highly recommended. +-} +type alias Time = Float + + +{-| Get the `Time` at the moment when this task is run. +-} +now : Task x Time +now = + Native.Time.now + + +{-| Subscribe to the current time. First you provide an interval describing how +frequently you want updates. Second, you give a tagger that turns a time into a +message for your `update` function. So if you want to hear about the current +time every second, you would say something like this: + + type Msg = Tick Time | ... + + subscriptions model = + every second Tick + +Check out the [Elm Architecture Tutorial][arch] for more info on how +subscriptions work. + +[arch]: https://github.com/evancz/elm-architecture-tutorial/ + +**Note:** this function is not for animation! You need to use something based +on `requestAnimationFrame` to get smooth animations. This is based on +`setInterval` which is better for recurring tasks like “check on something +every 30 seconds”. +-} +every : Time -> (Time -> msg) -> Sub msg +every interval tagger = + subscription (Every interval tagger) + + + +-- UNITS + + +{-| Units of time, making it easier to specify things like a half-second +`(500 * millisecond)` without remembering Elm’s underlying units of time. +-} +millisecond : Time +millisecond = + 1 + + +{-|-} +second : Time +second = + 1000 * millisecond + + +{-|-} +minute : Time +minute = + 60 * second + + +{-|-} +hour : Time +hour = + 60 * minute + + +{-|-} +inMilliseconds : Time -> Float +inMilliseconds t = + t + + +{-|-} +inSeconds : Time -> Float +inSeconds t = + t / second + + +{-|-} +inMinutes : Time -> Float +inMinutes t = + t / minute + + +{-|-} +inHours : Time -> Float +inHours t = + t / hour + + + +-- SUBSCRIPTIONS + + +type MySub msg = + Every Time (Time -> msg) + + +subMap : (a -> b) -> MySub a -> MySub b +subMap f (Every interval tagger) = + Every interval (f << tagger) + + + +-- EFFECT MANAGER + + +type alias State msg = + { taggers : Taggers msg + , processes : Processes + } + + +type alias Processes = + Dict.Dict Time Platform.ProcessId + + +type alias Taggers msg = + Dict.Dict Time (List (Time -> msg)) + + +init : Task Never (State msg) +init = + Task.succeed (State Dict.empty Dict.empty) + + +onEffects : Platform.Router msg Time -> List (MySub msg) -> State msg -> Task Never (State msg) +onEffects router subs {processes} = + let + newTaggers = + List.foldl addMySub Dict.empty subs + + leftStep interval taggers (spawnList, existingDict, killTask) = + (interval :: spawnList, existingDict, killTask) + + bothStep interval taggers id (spawnList, existingDict, killTask) = + (spawnList, Dict.insert interval id existingDict, killTask) + + rightStep _ id (spawnList, existingDict, killTask) = + ( spawnList + , existingDict + , Native.Scheduler.kill id + |> Task.andThen (\_ -> killTask) + ) + + (spawnList, existingDict, killTask) = + Dict.merge + leftStep + bothStep + rightStep + newTaggers + processes + ([], Dict.empty, Task.succeed ()) + in + killTask + |> Task.andThen (\_ -> spawnHelp router spawnList existingDict) + |> Task.andThen (\newProcesses -> Task.succeed (State newTaggers newProcesses)) + + +addMySub : MySub msg -> Taggers msg -> Taggers msg +addMySub (Every interval tagger) state = + case Dict.get interval state of + Nothing -> + Dict.insert interval [tagger] state + + Just taggers -> + Dict.insert interval (tagger :: taggers) state + + +spawnHelp : Platform.Router msg Time -> List Time -> Processes -> Task.Task x Processes +spawnHelp router intervals processes = + case intervals of + [] -> + Task.succeed processes + + interval :: rest -> + let + spawnTimer = + Native.Scheduler.spawn (setInterval interval (Platform.sendToSelf router interval)) + + spawnRest id = + spawnHelp router rest (Dict.insert interval id processes) + in + spawnTimer + |> Task.andThen spawnRest + + +onSelfMsg : Platform.Router msg Time -> Time -> State msg -> Task Never (State msg) +onSelfMsg router interval state = + case Dict.get interval state.taggers of + Nothing -> + Task.succeed state + + Just taggers -> + let + tellTaggers time = + Task.sequence (List.map (\tagger -> Platform.sendToApp router (tagger time)) taggers) + in + now + |> Task.andThen tellTaggers + |> Task.andThen (\_ -> Task.succeed state) + + +setInterval : Time -> Task Never () -> Task x Never +setInterval = + Native.Time.setInterval_ diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Tuple.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Tuple.elm new file mode 100644 index 0000000..ab4c401 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/src/Tuple.elm @@ -0,0 +1,61 @@ +module Tuple exposing + ( first, second + , mapFirst, mapSecond + ) + +{-| Some helpers for working with 2-tuples. + +**Note:** For larger chunks of data, it is best to switch to using records. So +instead of representing a 3D point as `(3,4,5)` and wondering why there are no +helper functions, represent it as `{ x = 3, y = 4, z = 5 }` and use all the +built-in syntax for records. + +@docs first, second, mapFirst, mapSecond + +-} + + + +{-| Extract the first value from a tuple. + + first (3, 4) == 3 + first ("john", "doe") == "john" +-} +first : (a1, a2) -> a1 +first (x,_) = + x + + +{-| Extract the second value from a tuple. + + second (3, 4) == 4 + second ("john", "doe") == "doe" +-} +second : (a1, a2) -> a2 +second (_,y) = + y + + +{-| Transform the first value in a tuple. + + import String + + mapFirst String.reverse ("stressed", 16) == ("desserts", 16) + mapFirst String.length ("stressed", 16) == (8, 16) +-} +mapFirst : (a -> b) -> (a, a2) -> (b, a2) +mapFirst func (x,y) = + (func x, y) + + +{-| Transform the second value in a tuple. + + import String + + mapSecond sqrt ("stressed", 16) == ("stressed", 4) + mapSecond (\x -> x + 1) ("stressed", 16) == ("stressed", 17) +-} +mapSecond : (a -> b) -> (a1, a) -> (a1, b) +mapSecond func (x,y) = + (x, func y) + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test.elm new file mode 100644 index 0000000..17e1bf9 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test.elm @@ -0,0 +1,40 @@ +module Main exposing (..) + +import Basics exposing (..) +import ElmTest exposing (..) + +import Test.Array as Array +import Test.Basics as Basics +import Test.Bitwise as Bitwise +import Test.Char as Char +import Test.CodeGen as CodeGen +import Test.Dict as Dict +import Test.Equality as Equality +import Test.Json as Json +import Test.List as List +import Test.Result as Result +import Test.Set as Set +import Test.String as String +import Test.Regex as Regex + +tests : Test +tests = + suite "Elm Standard Library Tests" + [ Array.tests + , Basics.tests + , Bitwise.tests + , Char.tests + , CodeGen.tests + , Dict.tests + , Equality.tests + , Json.tests + , List.tests + , Result.tests + , Set.tests + , String.tests + , Regex.tests + ] + + +main = + runSuite tests diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Array.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Array.elm new file mode 100644 index 0000000..c907f05 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Array.elm @@ -0,0 +1,90 @@ +module Test.Array exposing (tests) + +import Array +import Basics exposing (..) +import List +import List exposing ((::)) +import Maybe exposing (..) +import Native.Array + +import ElmTest exposing (..) + +mergeSplit : Int -> Array.Array a -> Array.Array a +mergeSplit n arr = + let left = Array.slice 0 n arr + right = Array.slice n (Array.length arr) arr + in Array.append left right + +holeArray : Array.Array Int +holeArray = List.foldl mergeSplit (Array.fromList [0..100]) [0..100] + +mapArray: Array.Array a -> Array.Array a +mapArray array = + Array.indexedMap (\i el -> + case (Array.get i array) of + Just x -> x + Nothing -> el + ) array + +tests : Test +tests = + let creationTests = suite "Creation" + [ test "empty" <| assertEqual Array.empty (Array.fromList []) + , test "initialize" <| assertEqual (Array.initialize 4 identity) (Array.fromList [0,1,2,3]) + , test "initialize 2" <| assertEqual (Array.initialize 4 (\n -> n*n)) (Array.fromList [0,1,4,9]) + , test "initialize 3" <| assertEqual (Array.initialize 4 (always 0)) (Array.fromList [0,0,0,0]) + , test "initialize Empty" <| assertEqual (Array.initialize 0 identity) Array.empty + , test "initialize 4" <| assertEqual (Array.initialize 2 (always 0)) (Array.fromList [0,0]) + , test "initialize negative" <| assertEqual (Array.initialize -1 identity) Array.empty + , test "repeat" <| assertEqual (Array.repeat 5 40) (Array.fromList [40,40,40,40,40]) + , test "repeat 2" <| assertEqual (Array.repeat 5 0) (Array.fromList [0,0,0,0,0]) + , test "repeat 3" <| assertEqual (Array.repeat 3 "cat") (Array.fromList ["cat","cat","cat"]) + , test "fromList" <| assertEqual (Array.fromList []) Array.empty + ] + basicsTests = suite "Basics" + [ test "length" <| assertEqual 3 (Array.length (Array.fromList [1,2,3])) + , test "length - Long" <| assertEqual 10000 (Array.length (Array.repeat 10000 0)) + , test "push" <| assertEqual (Array.fromList [1,2,3]) (Array.push 3 (Array.fromList [1,2])) + , test "append" <| assertEqual [42,42,81,81,81] (Array.toList (Array.append (Array.repeat 2 42) (Array.repeat 3 81))) + , test "appendEmpty 1" <| assertEqual [1..33] (Array.toList (Array.append Array.empty (Array.fromList [1..33]))) + , test "appendEmpty 2" <| assertEqual [1..33] (Array.toList (Array.append (Array.fromList [1..33]) Array.empty)) + , test "appendSmall 1" <| assertEqual [1..33] (Array.toList (Array.append (Array.fromList [1..30]) (Array.fromList [31..33]))) + , test "appendSmall 2" <| assertEqual [1..33] (Array.toList (Array.append (Array.fromList [1..3]) (Array.fromList [4..33]))) + , test "appendAndSlice" <| assertEqual [0..100] (Array.toList holeArray) + ] + getAndSetTests = suite "Get and Set" + [ test "get" <| assertEqual (Just 2) (Array.get 1 (Array.fromList [3,2,1])) + , test "get 2" <| assertEqual Nothing (Array.get 5 (Array.fromList [3,2,1])) + , test "get 3" <| assertEqual Nothing (Array.get -1 (Array.fromList [3,2,1])) + , test "set" <| assertEqual (Array.fromList [1,7,3]) (Array.set 1 7 (Array.fromList [1,2,3])) + ] + takingArraysApartTests = suite "Taking Arrays Apart" + [ test "toList" <| assertEqual [3,5,8] (Array.toList (Array.fromList [3,5,8])) + , test "toIndexedList" <| assertEqual [(0,"cat"), (1,"dog")] (Array.toIndexedList (Array.fromList ["cat","dog"])) + , test "slice 1" <| assertEqual (Array.fromList [0,1,2]) (Array.slice 0 3 (Array.fromList [0,1,2,3,4])) + , test "slice 2" <| assertEqual (Array.fromList [1,2,3]) (Array.slice 1 4 (Array.fromList [0,1,2,3,4])) + , test "slice 3" <| assertEqual (Array.fromList [1,2,3]) (Array.slice 1 -1 (Array.fromList [0,1,2,3,4])) + , test "slice 4" <| assertEqual (Array.fromList [2]) (Array.slice -3 -2 (Array.fromList [0,1,2,3,4])) + , test "slice 5" <| assertEqual 63 (Array.length <| Array.slice 65 (65 + 63) <| Array.fromList [1..200]) + ] + mappingAndFoldingTests = suite "Mapping and Folding" + [ test "map" <| assertEqual (Array.fromList [1,2,3]) (Array.map sqrt (Array.fromList [1,4,9])) + , test "indexedMap 1" <| assertEqual (Array.fromList [0,5,10]) (Array.indexedMap (*) (Array.fromList [5,5,5])) + , test "indexedMap 2" <| assertEqual [0..99] (Array.toList (Array.indexedMap always (Array.repeat 100 0))) + , test "large indexed map" <| assertEqual [0..32768 - 1] (Array.toList <| mapArray <| Array.initialize 32768 identity) + , test "foldl 1" <| assertEqual [3,2,1] (Array.foldl (::) [] (Array.fromList [1,2,3])) + , test "foldl 2" <| assertEqual 33 (Array.foldl (+) 0 (Array.repeat 33 1)) + , test "foldr 1" <| assertEqual 15 (Array.foldr (+) 0 (Array.repeat 3 5)) + , test "foldr 2" <| assertEqual [1,2,3] (Array.foldr (::) [] (Array.fromList [1,2,3])) + , test "foldr 3" <| assertEqual 53 (Array.foldr (-) 54 (Array.fromList [10,11])) + , test "filter" <| assertEqual (Array.fromList [2,4,6]) (Array.filter (\x -> x % 2 == 0) (Array.fromList [1..6])) + ] + + nativeTests = suite "Conversion to JS Arrays" + [ test "jsArrays" <| assertEqual (Array.fromList [1..1100]) (Native.Array.fromJSArray (Native.Array.toJSArray (Array.fromList [1..1100]))) + ] + in + suite "Array" + [ creationTests, basicsTests, getAndSetTests + , takingArraysApartTests, mappingAndFoldingTests, nativeTests + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Basics.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Basics.elm new file mode 100644 index 0000000..6e4869c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Basics.elm @@ -0,0 +1,158 @@ +module Test.Basics exposing (tests) + +import Array +import Basics exposing (..) +import Date +import Set +import Dict +import ElmTest exposing (..) + +tests : Test +tests = + let comparison = + suite "Comparison" + [ test "max" <| assertEqual 42 (max 32 42) + , test "min" <| assertEqual 42 (min 91 42) + , test "clamp low" <| assertEqual 10 (clamp 10 20 5) + , test "clamp mid" <| assertEqual 15 (clamp 10 20 15) + , test "clamp high" <| assertEqual 20 (clamp 10 20 25) + , test "5 < 6" <| assertEqual True (5 < 6) + , test "6 < 5" <| assertEqual False (6 < 5) + , test "6 < 6" <| assertEqual False (6 < 6) + , test "5 > 6" <| assertEqual False (5 > 6) + , test "6 > 5" <| assertEqual True (6 > 5) + , test "6 > 6" <| assertEqual False (6 > 6) + , test "5 <= 6" <| assertEqual True (5 <= 6) + , test "6 <= 5" <| assertEqual False (6 <= 5) + , test "6 <= 6" <| assertEqual True (6 <= 6) + , test "compare \"A\" \"B\"" <| assertEqual LT (compare "A" "B") + , test "compare 'f' 'f'" <| assertEqual EQ (compare 'f' 'f') + , test "compare (1, 2, 3, 4, 5, 6) (0, 1, 2, 3, 4, 5)" <| assertEqual GT (compare (1, 2, 3, 4, 5, 6) (0, 1, 2, 3, 4, 5)) + , test "compare ['a'] ['b']" <| assertEqual LT (compare ['a'] ['b']) + , test "array equality" <| assertEqual (Array.fromList [1,1,1,1]) (Array.repeat 4 1) + , test "set equality" <| assertEqual (Set.fromList [1,2]) (Set.fromList [2,1]) + , test "dict equality" <| assertEqual (Dict.fromList [(1,1),(2,2)]) (Dict.fromList [(2,2),(1,1)]) + , test "char equality" <| assertNotEqual '0' '饑' + , test "date equality" <| assertEqual (Date.fromString "2/7/1992") (Date.fromString "2/7/1992") + , test "date equality" <| assertNotEqual (Date.fromString "11/16/1995") (Date.fromString "2/7/1992") + ] + toStringTests = suite "toString Tests" + [ test "toString Int" <| assertEqual "42" (toString 42) + , test "toString Float" <| assertEqual "42.52" (toString 42.52) + , test "toString Char" <| assertEqual "'c'" (toString 'c') + , test "toString Char single quote" <| assertEqual "'\\''" (toString '\'') + , test "toString Char double quote" <| assertEqual "'\"'" (toString '"') + , test "toString String single quote" <| assertEqual "\"not 'escaped'\"" (toString "not 'escaped'") + , test "toString String double quote" <| assertEqual "\"are \\\"escaped\\\"\"" (toString "are \"escaped\"") + ] + trigTests = suite "Trigonometry Tests" + [ test "radians 0" <| assertEqual 0 (radians 0) + , test "radians positive" <| assertEqual 5 (radians 5) + , test "radians negative" <| assertEqual -5 (radians -5) + , test "degrees 0" <| assertEqual 0 (degrees 0) + , test "degrees 90" <| assert (abs (1.57 - degrees 90) < 0.01) -- This should test to enough precision to know if anything's breaking + , test "degrees -145" <| assert (abs (-2.53 - degrees -145) < 0.01) -- This should test to enough precision to know if anything's breaking + , test "turns 0" <| assertEqual 0 (turns 0) + , test "turns 8" <| assert (abs (50.26 - turns 8) < 0.01) -- This should test to enough precision to know if anything's breaking + , test "turns -133" <| assert (abs (-835.66 - turns -133) < 0.01) -- This should test to enough precision to know if anything's breaking + , test "fromPolar (0, 0)" <| assertEqual (0, 0) (fromPolar (0, 0)) + , test "fromPolar (1, 0)" <| assertEqual (1, 0) (fromPolar (1, 0)) + , test "fromPolar (0, 1)" <| assertEqual (0, 0) (fromPolar (0, 1)) + , test "fromPolar (1, 1)" <| assert (let (x, y) = fromPolar (1, 1) in 0.54 - x < 0.01 && 0.84 - y < 0.01) + , test "toPolar (0, 0)" <| assertEqual (0, 0) (toPolar (0, 0)) + , test "toPolar (1, 0)" <| assertEqual (1, 0) (toPolar (1, 0)) + , test "toPolar (0, 1)" <| assert (let (r, theta) = toPolar (0, 1) in r == 1 && abs (1.57 - theta) < 0.01) + , test "toPolar (1, 1)" <| assert (let (r, theta) = toPolar (1, 1) in abs (1.41 - r) < 0.01 && abs (0.78 - theta) < 0.01) + , test "cos" <| assertEqual 1 (cos 0) + , test "sin" <| assertEqual 0 (sin 0) + , test "tan" <| assert (abs (12.67 - tan 17.2) < 0.01) + , test "acos" <| assert (abs (3.14 - acos -1) < 0.01) + , test "asin" <| assert (abs (0.30 - asin 0.3) < 0.01) + , test "atan" <| assert (abs (1.57 - atan 4567.8) < 0.01) + , test "atan2" <| assert (abs (1.55 - atan2 36 0.65) < 0.01) + , test "pi" <| assert (abs (3.14 - pi) < 0.01) + ] + basicMathTests = suite "Basic Math Tests" + [ test "add float" <| assertEqual 159 (155.6 + 3.4) + , test "add int" <| assertEqual 17 ((round 10) + (round 7)) + , test "subtract float" <| assertEqual -6.3 (1 - 7.3) + , test "subtract int" <| assertEqual 1130 ((round 9432) - (round 8302)) + , test "multiply float" <| assertEqual 432 (96 * 4.5) + , test "multiply int" <| assertEqual 90 ((round 10) * (round 9)) + , test "divide float" <| assertEqual 13.175 (527 / 40) + , test "divide int" <| assertEqual 23 (70 // 3) + , test "7 `rem` 2" <| assertEqual 1 (7 `rem` 2) + , test "-1 `rem` 4" <| assertEqual -1 (-1 `rem` 4) + , test "7 % 2" <| assertEqual 1 (7 % 2) + , test "-1 % 4" <| assertEqual 3 (-1 % 4) + , test "3^2" <| assertEqual 9 (3^2) + , test "sqrt" <| assertEqual 9 (sqrt 81) + , test "negate 42" <| assertEqual -42 (negate 42) + , test "negate -42" <| assertEqual 42 (negate -42) + , test "negate 0" <| assertEqual 0 (negate 0) + , test "abs -25" <| assertEqual 25 (abs -25) + , test "abs 76" <| assertEqual 76 (abs 76) + , test "logBase 10 100" <| assertEqual 2 (logBase 10 100) + , test "logBase 2 256" <| assertEqual 8 (logBase 2 256) + , test "e" <| assert (abs (2.72 - e) < 0.01) + ] + booleanTests = suite "Boolean Tests" + [ test "False && False" <| assertEqual False (False && False) + , test "False && True" <| assertEqual False (False && True) + , test "True && False" <| assertEqual False (True && False) + , test "True && True" <| assertEqual True (True && True) + , test "False || False" <| assertEqual False (False || False) + , test "False || True" <| assertEqual True (False || True) + , test "True || False" <| assertEqual True (True || False) + , test "True || True" <| assertEqual True (True || True) + , test "xor False False" <| assertEqual False (xor False False) + , test "xor False True" <| assertEqual True (xor False True) + , test "xor True False" <| assertEqual True (xor True False) + , test "xor True True" <| assertEqual False (xor True True) + , test "not True" <| assertEqual False (not True) + , test "not False" <| assertEqual True (not False) + ] + conversionTests = suite "Conversion Tests" + [ test "round 0.6" <| assertEqual 1 (round 0.6) + , test "round 0.4" <| assertEqual 0 (round 0.4) + , test "round 0.5" <| assertEqual 1 (round 0.5) + , test "truncate -2367.9267" <| assertEqual -2367 (truncate -2367.9267) + , test "floor -2367.9267" <| assertEqual -2368 (floor -2367.9267) + , test "ceiling 37.2" <| assertEqual 38 (ceiling 37.2) + , test "toFloat 25" <| assertEqual 25 (toFloat 25) + ] + miscTests = suite "Miscellaneous Tests" + [ test "isNaN (0/0)" <| assertEqual True (isNaN (0/0)) + , test "isNaN (sqrt -1)" <| assertEqual True (isNaN (sqrt -1)) + , test "isNaN (1/0)" <| assertEqual False (isNaN (1/0)) + , test "isNaN 1" <| assertEqual False (isNaN 1) + , test "isInfinite (0/0)" <| assertEqual False (isInfinite (0/0)) + , test "isInfinite (sqrt -1)" <| assertEqual False (isInfinite (sqrt -1)) + , test "isInfinite (1/0)" <| assertEqual True (isInfinite (1/0)) + , test "isInfinite 1" <| assertEqual False (isInfinite 1) + , test "\"hello\" ++ \"world\"" <| assertEqual "helloworld" ("hello" ++ "world") + , test "[1, 1, 2] ++ [3, 5, 8]" <| assertEqual [1, 1, 2, 3, 5, 8] ([1, 1, 2] ++ [3, 5, 8]) + , test "fst (1, 2)" <| assertEqual 1 (fst (1, 2)) + , test "snd (1, 2)" <| assertEqual 2 (snd (1, 2)) + ] + higherOrderTests = suite "Higher Order Helpers Tests" + [ test "identity 'c'" <| assertEqual 'c' (identity 'c') + , test "always 42 ()" <| assertEqual 42 (always 42 ()) + , test "<|" <| assertEqual 9 (identity <| 3 + 6) + , test "|>" <| assertEqual 9 (3 + 6 |> identity) + , test "<<" <| assertEqual True (not << xor True <| True) + , test ">>" <| assertEqual True (True |> xor True >> not) + , test "flip" <| assertEqual 10 ((flip (//)) 2 20) + , test "curry" <| assertEqual 1 ((curry (\(a, b) -> a + b)) -5 6) + , test "uncurry" <| assertEqual 1 ((uncurry (+)) (-5, 6)) + ] + in + suite "Basics" + [ comparison + , toStringTests + , trigTests + , basicMathTests + , booleanTests + , miscTests + , higherOrderTests + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Bitwise.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Bitwise.elm new file mode 100644 index 0000000..881b255 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Bitwise.elm @@ -0,0 +1,50 @@ +module Test.Bitwise exposing (tests) + +import Basics exposing (..) +import Bitwise + +import ElmTest exposing (..) + +tests : Test +tests = + suite "Bitwise" + [ suite "and" + [ test "and with 32 bit integers" <| assertEqual 1 (Bitwise.and 5 3) + , test "and with 0 as first argument" <| assertEqual 0 (Bitwise.and 0 1450) + , test "and with 0 as second argument" <| assertEqual 0 (Bitwise.and 274 0) + , test "and with -1 as first argument" <| assertEqual 2671 (Bitwise.and -1 2671) + , test "and with -1 as second argument" <| assertEqual 96 (Bitwise.and 96 -1) + ] + , suite "or" + [ test "or with 32 bit integers" <| assertEqual 15 (Bitwise.or 9 14) + , test "or with 0 as first argument" <| assertEqual 843 (Bitwise.or 0 843) + , test "or with 0 as second argument" <| assertEqual 19 (Bitwise.or 19 0) + , test "or with -1 as first argument" <| assertEqual -1 (Bitwise.or -1 2360) + , test "or with -1 as second argument" <| assertEqual -1 (Bitwise.or 3 -1) + ] + , suite "xor" + [ test "xor with 32 bit integers" <| assertEqual 604 (Bitwise.xor 580 24) + , test "xor with 0 as first argument" <| assertEqual 56 (Bitwise.xor 0 56) + , test "xor with 0 as second argument" <| assertEqual -268 (Bitwise.xor -268 0) + , test "xor with -1 as first argument" <| assertEqual -25 (Bitwise.xor -1 24) + , test "xor with -1 as second argument" <| assertEqual 25601 (Bitwise.xor -25602 -1) + ] + , suite "complement" + [ test "complement a positive" <| assertEqual -9 (Bitwise.complement 8) + , test "complement a negative" <| assertEqual 278 (Bitwise.complement -279) + ] + , suite "shiftLeft" + [ test "8 `shiftLeft` 1 == 16" <| assertEqual 16 (Bitwise.shiftLeft 8 1) + , test "8 `shiftLeft` 2 == 32" <| assertEqual 32 (Bitwise.shiftLeft 8 2) + ] + , suite "shiftRight" + [ test "32 `shiftRight` 1 == 16" <| assertEqual 16 (Bitwise.shiftRight 32 1) + , test "32 `shiftRight` 2 == 8" <| assertEqual 8 (Bitwise.shiftRight 32 2) + , test "-32 `shiftRight` 1 == -16" <| assertEqual -16 (Bitwise.shiftRight -32 1) + ] + , suite "shiftRightLogical" + [ test "32 `shiftRightLogical` 1 == 16" <| assertEqual 16 (Bitwise.shiftRightLogical 32 1) + , test "32 `shiftRightLogical` 2 == 8" <| assertEqual 8 (Bitwise.shiftRightLogical 32 2) + , test "-32 `shiftRightLogical` 1 == 2147483632" <| assertEqual 2147483632 (Bitwise.shiftRightLogical -32 1) + ] + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Char.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Char.elm new file mode 100644 index 0000000..96c4764 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Char.elm @@ -0,0 +1,93 @@ +module Test.Char exposing (tests) + +import Basics exposing (..) +import Char exposing (..) +import List + +import ElmTest exposing (..) + + +lower = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' ] +upper = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] +dec = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ] +oct = List.take 8 dec +hexLower = List.take 6 lower +hexUpper = List.take 6 upper +hex = List.append hexLower hexUpper |> List.append dec + +lowerCodes = [97..(97 + List.length lower - 1)] +upperCodes = [65..(65 + List.length upper - 1)] +decCodes = [48..(48 + List.length dec - 1)] + +oneOf : List a -> a -> Bool +oneOf = flip List.member + + +tests : Test +tests = suite "Char" + [ suite "toCode" + [ test "a-z" <| assertEqual (lowerCodes) (List.map toCode lower) + , test "A-Z" <| assertEqual (upperCodes) (List.map toCode upper) + , test "0-9" <| assertEqual (decCodes) (List.map toCode dec) + ] + + , suite "fromCode" + [ test "a-z" <| assertEqual (lower) (List.map fromCode lowerCodes) + , test "A-Z" <| assertEqual (upper) (List.map fromCode upperCodes) + , test "0-9" <| assertEqual (dec) (List.map fromCode decCodes) + ] + + , suite "toLocaleLower" + [ test "a-z" <| assertEqual (lower) (List.map toLocaleLower lower) + , test "A-Z" <| assertEqual (lower) (List.map toLocaleLower upper) + , test "0-9" <| assertEqual (dec) (List.map toLocaleLower dec) + ] + + , suite "toLocaleUpper" + [ test "a-z" <| assertEqual (upper) (List.map toLocaleUpper lower) + , test "A-Z" <| assertEqual (upper) (List.map toLocaleUpper upper) + , test "0-9" <| assertEqual (dec) (List.map toLocaleUpper dec) + ] + + , suite "toLower" + [ test "a-z" <| assertEqual (lower) (List.map toLower lower) + , test "A-Z" <| assertEqual (lower) (List.map toLower upper) + , test "0-9" <| assertEqual (dec) (List.map toLower dec) + ] + + , suite "toUpper" + [ test "a-z" <| assertEqual (upper) (List.map toUpper lower) + , test "A-Z" <| assertEqual (upper) (List.map toUpper upper) + , test "0-9" <| assertEqual (dec) (List.map toUpper dec) + ] + + , suite "isLower" + [ test "a-z" <| assertEqual (True) (List.all isLower lower) + , test "A-Z" <| assertEqual (False) (List.any isLower upper) + , test "0-9" <| assertEqual (False) (List.any isLower dec) + ] + + , suite "isUpper" + [ test "a-z" <| assertEqual (False) (List.any isUpper lower) + , test "A-Z" <| assertEqual (True) (List.all isUpper upper) + , test "0-9" <| assertEqual (False) (List.any isUpper dec) + ] + + , suite "isDigit" + [ test "a-z" <| assertEqual (False) (List.any isDigit lower) + , test "A-Z" <| assertEqual (False) (List.any isDigit upper) + , test "0-9" <| assertEqual (True) (List.all isDigit dec) + ] + + , suite "isHexDigit" + [ test "a-z" <| assertEqual (List.map (oneOf hex) lower) (List.map isHexDigit lower) + , test "A-Z" <| assertEqual (List.map (oneOf hex) upper) (List.map isHexDigit upper) + , test "0-9" <| assertEqual (True) (List.all isHexDigit dec) + ] + + , suite "isOctDigit" + [ test "a-z" <| assertEqual (False) (List.any isOctDigit lower) + , test "A-Z" <| assertEqual (False) (List.any isOctDigit upper) + , test "0-9" <| assertEqual (List.map (oneOf oct) dec) (List.map isOctDigit dec) + ] + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/CodeGen.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/CodeGen.elm new file mode 100644 index 0000000..3bc190a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/CodeGen.elm @@ -0,0 +1,59 @@ +module Test.CodeGen exposing (tests) + +import Basics exposing (..) +import ElmTest exposing (..) + +import Maybe +import Maybe exposing (..) + + +type Wrapper a = Wrapper a + + +casePrime m' = + case m' of + Just x -> x + Nothing -> 0 + +patternPrime = + case Just 42 of + Just x' -> x' + Nothing -> 0 + +letQualified = + let (Wrapper x) = Wrapper 42 + in x + +caseQualified = + case Just 42 of + Maybe.Just x -> x + Nothing -> 0 + +caseScope : String +caseScope = + case "Not this one!" of + string -> + case "Hi" of + string -> string + +tests : Test +tests = + let primes = + suite "Primes" + [ test "case" <| assertEqual 42 (casePrime (Just 42)) + , test "pattern" <| assertEqual 42 patternPrime + ] + qualifiedPatterns = + suite "Qualified Patterns" + [ test "let" <| assertEqual 42 letQualified + , test "case" <| assertEqual 42 caseQualified + ] + scope = + suite "Scoping" + [ test "case" <| assertEqual "Hi" caseScope ] + in + suite "CodeGen" + [ primes + , qualifiedPatterns + , scope + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Dict.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Dict.elm new file mode 100644 index 0000000..3e97c86 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Dict.elm @@ -0,0 +1,79 @@ +module Test.Dict exposing (tests) + +import Basics exposing (..) +import Dict +import List +import Maybe exposing (..) + +import ElmTest exposing (..) + +animals : Dict.Dict String String +animals = Dict.fromList [ ("Tom", "cat"), ("Jerry", "mouse") ] + +tests : Test +tests = + let buildTests = suite "build Tests" + [ test "empty" <| assertEqual (Dict.fromList []) (Dict.empty) + , test "singleton" <| assertEqual (Dict.fromList [("k","v")]) (Dict.singleton "k" "v") + , test "insert" <| assertEqual (Dict.fromList [("k","v")]) (Dict.insert "k" "v" Dict.empty) + , test "insert replace" <| assertEqual (Dict.fromList [("k","vv")]) (Dict.insert "k" "vv" (Dict.singleton "k" "v")) + , test "update" <| assertEqual (Dict.fromList [("k","vv")]) (Dict.update "k" (\v->Just "vv") (Dict.singleton "k" "v")) + , test "update Nothing" <| assertEqual Dict.empty (Dict.update "k" (\v->Nothing) (Dict.singleton "k" "v")) + , test "remove" <| assertEqual Dict.empty (Dict.remove "k" (Dict.singleton "k" "v")) + , test "remove not found" <| assertEqual (Dict.singleton "k" "v") (Dict.remove "kk" (Dict.singleton "k" "v")) + ] + queryTests = suite "query Tests" + [ test "member 1" <| assertEqual True (Dict.member "Tom" animals) + , test "member 2" <| assertEqual False (Dict.member "Spike" animals) + , test "get 1" <| assertEqual (Just "cat") (Dict.get "Tom" animals) + , test "get 2" <| assertEqual Nothing (Dict.get "Spike" animals) + , test "size of empty dictionary" <| assertEqual 0 (Dict.size Dict.empty) + , test "size of example dictionary" <| assertEqual 2 (Dict.size animals) + ] + combineTests = suite "combine Tests" + [ test "union" <| assertEqual animals (Dict.union (Dict.singleton "Jerry" "mouse") (Dict.singleton "Tom" "cat")) + , test "union collison" <| assertEqual (Dict.singleton "Tom" "cat") (Dict.union (Dict.singleton "Tom" "cat") (Dict.singleton "Tom" "mouse")) + , test "intersect" <| assertEqual (Dict.singleton "Tom" "cat") (Dict.intersect animals (Dict.singleton "Tom" "cat")) + , test "diff" <| assertEqual (Dict.singleton "Jerry" "mouse") (Dict.diff animals (Dict.singleton "Tom" "cat")) + ] + transformTests = suite "transform Tests" + [ test "filter" <| assertEqual (Dict.singleton "Tom" "cat") (Dict.filter (\k v -> k == "Tom") animals) + , test "partition" <| assertEqual (Dict.singleton "Tom" "cat", Dict.singleton "Jerry" "mouse") (Dict.partition (\k v -> k == "Tom") animals) + ] + mergeTests = + let + insertBoth key leftVal rightVal dict = + Dict.insert key (leftVal ++ rightVal) dict + s1 = + Dict.empty |> Dict.insert "u1" [ 1 ] + s2 = + Dict.empty |> Dict.insert "u2" [ 2 ] + s23 = + Dict.empty |> Dict.insert "u2" [ 3 ] + b1 = + List.map (\i -> (i, [i])) [1..10] |> Dict.fromList + b2 = + List.map (\i -> (i, [i])) [5..15] |> Dict.fromList + bExpected = + [(1,[1]),(2,[2]),(3,[3]),(4,[4]),(5,[5,5]),(6,[6,6]),(7,[7,7]),(8,[8,8]),(9,[9,9]),(10,[10,10]),(11,[11]),(12,[12]),(13,[13]),(14,[14]),(15,[15])] + in + suite "merge Tests" + [ test "merge empties" <| assertEqual (Dict.empty) + (Dict.merge Dict.insert insertBoth Dict.insert Dict.empty Dict.empty Dict.empty) + , test "merge singletons in order" <| assertEqual [("u1", [1]), ("u2", [2])] + ((Dict.merge Dict.insert insertBoth Dict.insert s1 s2 Dict.empty) |> Dict.toList) + , test "merge singletons out of order" <| assertEqual [("u1", [1]), ("u2", [2])] + ((Dict.merge Dict.insert insertBoth Dict.insert s2 s1 Dict.empty) |> Dict.toList) + , test "merge with duplicate key" <| assertEqual [("u2", [2, 3])] + ((Dict.merge Dict.insert insertBoth Dict.insert s2 s23 Dict.empty) |> Dict.toList) + , test "partially overlapping" <| assertEqual bExpected + ((Dict.merge Dict.insert insertBoth Dict.insert b1 b2 Dict.empty) |> Dict.toList) + ] + in + suite "Dict Tests" + [ buildTests + , queryTests + , combineTests + , transformTests + , mergeTests + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Equality.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Equality.elm new file mode 100644 index 0000000..3f3bfd7 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Equality.elm @@ -0,0 +1,28 @@ +module Test.Equality exposing (tests) + +import Basics exposing (..) +import Maybe exposing (..) + +import ElmTest exposing (..) + +type Different + = A String + | B (List Int) + +tests : Test +tests = + let diffTests = suite "ADT equality" + [ test "As eq" <| assert (A "a" == A "a") + , test "Bs eq" <| assert (B [1] == B [1]) + , test "A left neq" <| assert (A "a" /= B [1]) + , test "A left neq" <| assert (B [1] /= A "a") + ] + recordTests = suite "Record equality" + [ test "empty same" <| assert ({} == {}) + , test "ctor same" <| assert ({field = Just 3} == {field = Just 3}) + , test "ctor same, special case" <| assert ({ctor = Just 3} == {ctor = Just 3}) + , test "ctor diff" <| assert ({field = Just 3} /= {field = Nothing}) + , test "ctor diff, special case" <| assert ({ctor = Just 3} /= {ctor = Nothing}) + ] + in + suite "Equality Tests" [diffTests, recordTests] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Json.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Json.elm new file mode 100644 index 0000000..907a567 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Json.elm @@ -0,0 +1,83 @@ +module Test.Json exposing (tests) + +import Basics exposing (..) +import Result exposing (..) +import Json.Decode as Json exposing ((:=)) +import String + +import ElmTest exposing (..) + + +tests : Test +tests = + suite "Json decode" + [ intTests + , customTests + ] + + +intTests : Test +intTests = + let + testInt val str = + case Json.decodeString Json.int str of + Ok _ -> + assertEqual val True + + Err _ -> + assertEqual val False + in + suite "Json decode int" + [ test "whole int" <| testInt True "4" + , test "-whole int" <| testInt True "-4" + , test "whole float" <| testInt True "4.0" + , test "-whole float" <| testInt True "-4.0" + , test "large int" <| testInt True "1801439850948" + , test "-large int" <| testInt True "-1801439850948" + , test "float" <| testInt False "4.2" + , test "-float" <| testInt False "-4.2" + , test "Infinity" <| testInt False "Infinity" + , test "-Infinity" <| testInt False "-Infinity" + , test "NaN" <| testInt False "NaN" + , test "-NaN" <| testInt False "-NaN" + , test "true" <| testInt False "true" + , test "false" <| testInt False "false" + , test "string" <| testInt False "\"string\"" + , test "object" <| testInt False "{}" + , test "null" <| testInt False "null" + , test "undefined" <| testInt False "undefined" + , test "Decoder expects object finds array, was crashing runtime." <| + assertEqual + (Err "Expecting an object but instead got: []") + (Json.decodeString (Json.dict Json.float) "[]") + ] + + +customTests : Test +customTests = + let + jsonString = + """{ "foo": "bar" }""" + + customErrorMessage = + "I want to see this message!" + + myDecoder = + Json.customDecoder ("foo" := Json.string) (\_ -> Err customErrorMessage) + + assertion = + case Json.decodeString myDecoder jsonString of + Ok _ -> + fail "expected `customDecoder` to produce a value of type Err, but got Ok" + + Err message -> + if String.contains customErrorMessage message then + pass + + else + fail <| + "expected `customDecoder` to preserve user's error message '" + ++ customErrorMessage ++ "', but instead got: " ++ message + in + test "customDecoder preserves user error messages" assertion + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/List.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/List.elm new file mode 100644 index 0000000..cbebfdb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/List.elm @@ -0,0 +1,165 @@ +module Test.List exposing (tests) + +import ElmTest exposing (..) + +import Basics exposing (..) +import Maybe exposing (Maybe(Nothing, Just)) +import List exposing (..) + + +tests : Test +tests = suite "List Tests" + [ testListOfN 0 + , testListOfN 1 + , testListOfN 2 + , testListOfN 5000 + ] + + +testListOfN : Int -> Test +testListOfN n = + let xs = [1..n] + xsOpp = [(-n)..(-1)] + xsNeg = foldl (::) [] xsOpp -- assume foldl and (::) work + zs = [0..n] + sumSeq k = k * (k + 1) // 2 + xsSum = sumSeq n + mid = n // 2 + in + suite (toString n ++ " elements") + [ suite "foldl" + [ test "order" <| assertEqual (n) (foldl (\x acc -> x) 0 xs) + , test "total" <| assertEqual (xsSum) (foldl (+) 0 xs) + ] + + , suite "foldr" + [ test "order" <| assertEqual (min 1 n) (foldr (\x acc -> x) 0 xs) + , test "total" <| assertEqual (xsSum) (foldl (+) 0 xs) + ] + + , suite "map" + [ test "identity" <| assertEqual (xs) (map identity xs) + , test "linear" <| assertEqual ([2..(n + 1)]) (map ((+) 1) xs) + ] + + , test "isEmpty" <| assertEqual (n == 0) (isEmpty xs) + + , test "length" <| assertEqual (n) (length xs) + + , test "reverse" <| assertEqual (xsOpp) (reverse xsNeg) + + , suite "member" + [ test "positive" <| assertEqual (True) (member n zs) + , test "negative" <| assertEqual (False) (member (n + 1) xs) + ] + + , test "head" <| + if n == 0 + then assertEqual (Nothing) (head xs) + else assertEqual (Just 1) (head xs) + + , suite "filter" + [ test "none" <| assertEqual ([]) (filter (\x -> x > n) xs) + , test "one" <| assertEqual ([n]) (filter (\z -> z == n) zs) + , test "all" <| assertEqual (xs) (filter (\x -> x <= n) xs) + ] + + , suite "take" + [ test "none" <| assertEqual ([]) (take 0 xs) + , test "some" <| assertEqual ([0..(n - 1)]) (take n zs) + , test "all" <| assertEqual (xs) (take n xs) + , test "all+" <| assertEqual (xs) (take (n + 1) xs) + ] + + , suite "drop" + [ test "none" <| assertEqual (xs) (drop 0 xs) + , test "some" <| assertEqual ([n]) (drop n zs) + , test "all" <| assertEqual ([]) (drop n xs) + , test "all+" <| assertEqual ([]) (drop (n + 1) xs) + ] + + , test "repeat" <| assertEqual (map (\x -> -1) xs) (repeat n -1) + + , test "append" <| assertEqual (xsSum * 2) (append xs xs |> foldl (+) 0) + + , test "(::)" <| assertEqual (append [-1] xs) (-1 :: xs) + + , test "concat" <| assertEqual (append xs (append zs xs)) (concat [xs, zs, xs]) + + , test "intersperse" <| assertEqual + (min -(n - 1) 0, xsSum) + (intersperse -1 xs |> foldl (\x (c1, c2) -> (c2, c1 + x)) (0, 0)) + + , suite "partition" + [ test "left" <| assertEqual (xs, []) (partition (\x -> x > 0) xs) + , test "right" <| assertEqual ([], xs) (partition (\x -> x < 0) xs) + , test "split" <| assertEqual ([mid + 1..n], [1..mid]) (partition (\x -> x > mid) xs) + ] + + , suite "map2" + [ test "same length" <| assertEqual (map ((*) 2) xs) (map2 (+) xs xs) + , test "long first" <| assertEqual (map (\x -> x * 2 - 1) xs) (map2 (+) zs xs) + , test "short first" <| assertEqual (map (\x -> x * 2 - 1) xs) (map2 (+) xs zs) + ] + + , test "unzip" <| assertEqual (xsNeg, xs) (map (\x -> (-x, x)) xs |> unzip) + + , suite "filterMap" + [ test "none" <| assertEqual ([]) (filterMap (\x -> Nothing) xs) + , test "all" <| assertEqual (xsNeg) (filterMap (\x -> Just -x) xs) + , let halve x = + if x % 2 == 0 + then Just (x // 2) + else Nothing + in + test "some" <| assertEqual ([1..mid]) (filterMap halve xs) + ] + + , suite "concatMap" + [ test "none" <| assertEqual ([]) (concatMap (\x -> []) xs) + , test "all" <| assertEqual (xsNeg) (concatMap (\x -> [-x]) xs) + ] + + , test "indexedMap" <| assertEqual (map2 (,) zs xsNeg) (indexedMap (\i x -> (i, -x)) xs) + + , test "sum" <| assertEqual (xsSum) (sum xs) + + , test "product" <| assertEqual (0) (product zs) + + , test "maximum" <| + if n == 0 + then assertEqual (Nothing) (maximum xs) + else assertEqual (Just n) (maximum xs) + + , test "minimum" <| + if n == 0 + then assertEqual (Nothing) (minimum xs) + else assertEqual (Just 1) (minimum xs) + + , suite "all" + [ test "false" <| assertEqual (False) (all (\z -> z < n) zs) + , test "true" <| assertEqual (True) (all (\x -> x <= n) xs) + ] + + , suite "any" + [ test "false" <| assertEqual (False) (any (\x -> x > n) xs) + , test "true" <| assertEqual (True) (any (\z -> z >= n) zs) + ] + + , suite "sort" + [ test "sorted" <| assertEqual (xs) (sort xs) + , test "unsorted" <| assertEqual (xsOpp) (sort xsNeg) + ] + + , suite "sortBy" + [ test "sorted" <| assertEqual (xsNeg) (sortBy negate xsNeg) + , test "unsorted" <| assertEqual (xsNeg) (sortBy negate xsOpp) + ] + + , suite "sortWith" + [ test "sorted" <| assertEqual (xsNeg) (sortWith (flip compare) xsNeg) + , test "unsorted" <| assertEqual (xsNeg) (sortWith (flip compare) xsOpp) + ] + + , test "scanl" <| assertEqual (0 :: map sumSeq xs) (scanl (+) 0 xs) + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Regex.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Regex.elm new file mode 100644 index 0000000..81a18ed --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Regex.elm @@ -0,0 +1,46 @@ +module Test.Regex exposing (tests) + +import Basics exposing (..) + +import Regex exposing (..) + +import ElmTest exposing (..) + + +tests : Test +tests = + let simpleTests = suite "Simple Stuff" + [ test "split All" <| assertEqual ["a", "b"] (split All (regex ",") "a,b") + , test "split" <| assertEqual ["a","b,c"] (split (AtMost 1) (regex ",") "a,b,c") + , test "split idempotent" <| + let + findComma = regex "," + in + assertEqual + (split (AtMost 1) findComma "a,b,c,d,e") + (split (AtMost 1) findComma "a,b,c,d,e") + + , test "find All" <| assertEqual + ([Match "a" [] 0 1, Match "b" [] 1 2]) + (find All (regex ".") "ab") + , test "find All" <| assertEqual + ([Match "" [] 0 1]) + (find All (regex ".*") "") + + , test "replace AtMost 0" <| assertEqual "The quick brown fox" + (replace (AtMost 0) (regex "[aeiou]") (\_ -> "") "The quick brown fox") + + , test "replace AtMost 1" <| assertEqual "Th quick brown fox" + (replace (AtMost 1) (regex "[aeiou]") (\_ -> "") "The quick brown fox") + + , test "replace AtMost 2" <| assertEqual "Th qick brown fox" + (replace (AtMost 2) (regex "[aeiou]") (\_ -> "") "The quick brown fox") + + , test "replace All" <| assertEqual "Th qck brwn fx" + (replace All (regex "[aeiou]") (\_ -> "") "The quick brown fox") + + , test "replace using index" <| assertEqual "a1b3c" + (replace All (regex ",") (\match -> toString match.index) "a,b,c") + ] + in + suite "Regex" [ simpleTests ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Result.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Result.elm new file mode 100644 index 0000000..fdab503 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Result.elm @@ -0,0 +1,60 @@ +module Test.Result exposing (tests) + +import Basics exposing (..) +import Result +import Result exposing (Result(..)) +import String + +import ElmTest exposing (..) + +isEven n = + if n % 2 == 0 + then Ok n + else Err "number is odd" + +add3 a b c = + a + b + c + +add4 a b c d = + a + b + c + d + +add5 a b c d e = + a + b + c + d + e + +tests : Test +tests = + let mapTests = suite "map Tests" + [ + test "map Ok" <| assertEqual (Ok 3) (Result.map ((+) 1) (Ok 2)), + test "map Err" <| assertEqual (Err "error") (Result.map ((+) 1) (Err "error")) + ] + mapNTests = suite "mapN Tests" + [ + test "map2 Ok" <| assertEqual (Ok 3) (Result.map2 (+) (Ok 1) (Ok 2)), + test "map2 Err" <| assertEqual (Err "x") (Result.map2 (+) (Ok 1) (Err "x")), + + test "map3 Ok" <| assertEqual (Ok 6) (Result.map3 add3 (Ok 1) (Ok 2) (Ok 3)), + test "map3 Err" <| assertEqual (Err "x") (Result.map3 add3 (Ok 1) (Ok 2) (Err "x")), + + test "map4 Ok" <| assertEqual (Ok 10) (Result.map4 add4 (Ok 1) (Ok 2) (Ok 3) (Ok 4)), + test "map4 Err" <| assertEqual (Err "x") (Result.map4 add4 (Ok 1) (Ok 2) (Ok 3) (Err "x")), + + test "map5 Ok" <| assertEqual (Ok 15) (Result.map5 add5 (Ok 1) (Ok 2) (Ok 3) (Ok 4) (Ok 5)), + test "map5 Err" <| assertEqual (Err "x") (Result.map5 add5 (Ok 1) (Ok 2) (Ok 3) (Ok 4) (Err "x")) + ] + andThenTests = suite "andThen Tests" + [ + test "andThen Ok" <| assertEqual (Ok 42) ((String.toInt "42") `Result.andThen` isEven), + test "andThen first Err" <| assertEqual + (Err "could not convert string '4.2' to an Int") + (String.toInt "4.2" `Result.andThen` isEven), + test "andThen second Err" <| assertEqual + (Err "number is odd") + (String.toInt "41" `Result.andThen` isEven) + ] + in + suite "Result Tests" + [ mapTests + , mapNTests + , andThenTests + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Set.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Set.elm new file mode 100644 index 0000000..1edcc23 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/Set.elm @@ -0,0 +1,29 @@ +module Test.Set exposing (tests) + +import Basics exposing (..) + +import Set +import Set exposing (Set) +import List + +import ElmTest exposing (..) + +set : Set Int +set = Set.fromList [1..100] + +setPart1 : Set Int +setPart1 = Set.fromList [1..50] + +setPart2 : Set Int +setPart2 = Set.fromList [51..100] + +pred : Int -> Bool +pred x = x <= 50 + +tests : Test +tests = + let + queryTests = suite "query Tests" [test "size of set of 100 elements" <| assertEqual 100 (Set.size set)] + filterTests = suite "filter Tests" [test "Simple filter" <| assertEqual setPart1 <| Set.filter pred set] + partitionTests = suite "partition Tests" [test "Simple partition" <| assertEqual (setPart1, setPart2) <| Set.partition pred set] + in suite "Set Tests" [queryTests, partitionTests, filterTests] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/String.elm b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/String.elm new file mode 100644 index 0000000..c800c43 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/Test/String.elm @@ -0,0 +1,41 @@ +module Test.String exposing (tests) + +import Basics exposing (..) + +import List +import Maybe exposing (..) +import String + +import ElmTest exposing (..) + +tests : Test +tests = + let simpleTests = suite "Simple Stuff" + [ test "is empty" <| assert (String.isEmpty "") + , test "is not empty" <| assert (not (String.isEmpty ("the world"))) + , test "length" <| assertEqual 11 (String.length "innumerable") + , test "endsWith" (assert <| String.endsWith "ship" "spaceship") + , test "reverse" <| assertEqual "desserts" (String.reverse "stressed") + , test "repeat" <| assertEqual "hahaha" (String.repeat 3 "ha") + , test "indexes" <| assertEqual [ 0, 2 ] (String.indexes "a" "aha") + , test "empty indexes" <| assertEqual [] (String.indexes "" "aha") + ] + + combiningTests = suite "Combining Strings" + [ test "uncons non-empty" <| assertEqual (Just ('a',"bc")) (String.uncons "abc") + , test "uncons empty" <| assertEqual Nothing (String.uncons "") + , test "append 1" <| assertEqual "butterfly" (String.append "butter" "fly") + , test "append 2" <| assertEqual "butter" (String.append "butter" "") + , test "append 3" <| assertEqual "butter" (String.append "" "butter") + , test "concat" <| assertEqual "nevertheless" (String.concat ["never","the","less"]) + , test "split commas" <| assertEqual ["cat","dog","cow"] (String.split "," "cat,dog,cow") + , test "split slashes"<| assertEqual ["home","steve","Desktop", ""] (String.split "/" "home/steve/Desktop/") + , test "join spaces" <| assertEqual "cat dog cow" (String.join " " ["cat","dog","cow"]) + , test "join slashes" <| assertEqual "home/steve/Desktop" (String.join "/" ["home","steve","Desktop"]) + , test "slice 1" <| assertEqual "c" (String.slice 2 3 "abcd") + , test "slice 2" <| assertEqual "abc" (String.slice 0 3 "abcd") + , test "slice 3" <| assertEqual "abc" (String.slice 0 -1 "abcd") + , test "slice 4" <| assertEqual "cd" (String.slice -2 4 "abcd") + ] + in + suite "String" [ simpleTests, combiningTests ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/elm-package.json new file mode 100644 index 0000000..a72dbe5 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/elm-package.json @@ -0,0 +1,16 @@ +{ + "version": "1.1.1", + "summary": "Tests for Elm's standard libraries", + "repository": "http://github.com/elm-lang/core.git", + "license": "BSD3", + "source-directories": [ + ".", + "../src" + ], + "exposed-modules": [ ], + "native-modules": true, + "dependencies": { + "elm-community/elm-test": "1.0.0 <= v < 2.0.0" + }, + "elm-version": "0.17.0 <= v < 0.18.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/run-tests.sh b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/run-tests.sh new file mode 100644 index 0000000..c96557b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/core/5.0.0/tests/run-tests.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +cd "$(dirname "$0")" +set -e + + +elm-package install -y + +VERSION_DIR="$(ls elm-stuff/packages/elm-lang/core/)" +CORE_PACKAGE_DIR="elm-stuff/packages/elm-lang/core/$VERSION_DIR" +CORE_GIT_DIR="$(dirname $PWD)" + +echo "Linking $CORE_PACKAGE_DIR to $CORE_GIT_DIR" +rm -rf $CORE_PACKAGE_DIR +ln -s $CORE_GIT_DIR $CORE_PACKAGE_DIR + +elm-make --yes --output test.js Test.elm +node test.js diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/.gitignore b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/.gitignore new file mode 100644 index 0000000..e185314 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/.gitignore @@ -0,0 +1 @@ +elm-stuff \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/LICENSE b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/LICENSE new file mode 100644 index 0000000..24bdd38 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2016, Evan Czaplicki + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Evan Czaplicki nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/README.md b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/README.md new file mode 100644 index 0000000..7d542d8 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/README.md @@ -0,0 +1,7 @@ +# Mess with the DOM + +Sometimes you want to manually set the **focus** to a particular input field. + +Other times you want to be able to control how things **scroll**. + +This library makes it possible to do these kinds of operations as tasks. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/assets/boundaries.acorn b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/assets/boundaries.acorn new file mode 100644 index 0000000..e7b58a0 Binary files /dev/null and b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/assets/boundaries.acorn differ diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/assets/boundaries.png b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/assets/boundaries.png new file mode 100644 index 0000000..c0e282d Binary files /dev/null and b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/assets/boundaries.png differ diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/elm-package.json new file mode 100644 index 0000000..0b054d3 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "1.1.1", + "summary": "DOM helpers for managing focus and scrolling.", + "repository": "http://github.com/elm-lang/dom.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Dom", + "Dom.Scroll", + "Dom.LowLevel" + ], + "native-modules": true, + "dependencies": { + "elm-lang/core": "4.0.0 <= v < 6.0.0" + }, + "elm-version": "0.17.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom.elm b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom.elm new file mode 100644 index 0000000..df2d005 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom.elm @@ -0,0 +1,69 @@ +module Dom exposing + ( focus, blur, Id + , Error(..) + ) + +{-| + +# Focus +@docs focus, blur, Id + +# Errors +@docs Error + +-} + +import Native.Dom +import Task exposing (Task) + + + +-- ERRORS + + +{-| All the functions here look up DOM nodes by ID. If you ask for an ID that +is not currently attached to the DOM, you will get this error! +-} +type Error = NotFound String + + + +-- FOCUS + + +{-| A unique identifier for a particular DOM node. When you create +`
    ` you would refer to it with the `Id` `"my-thing"`. +-} +type alias Id = + String + + +{-| On a website, there can only be one thing in focus at a time. A text field, +a check box, etc. This function tells the Elm runtime to move the focus to a +particular DOM node. + + Dom.focus "my-thing" + +This is roughly the same as saying `document.getElementById(id).focus()`. + +NOTE: setting focus can silently fail if the element is invisible. This could be captured as an error by checking to see +if document.activeElement actually got updated to the element we selected. https://jsbin.com/xeletez/edit?html,js,output +-} +focus : Id -> Task Error () +focus = + Native.Dom.focus + + +{-| On a website, there can only be one thing in focus at a time. A text field, +a check box, etc. Sometimes you want that thing to no longer be in focus. This +is called “blur” for reasons that are unclear to almost everybody. +So this function tells a particular DOM node to lose focus. + + Dom.blur "my-thing" + +This is roughly the same as saying `document.getElementById(id).blur()`. +-} +blur : Id -> Task Error () +blur = + Native.Dom.blur + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/LowLevel.elm b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/LowLevel.elm new file mode 100644 index 0000000..47cd6bd --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/LowLevel.elm @@ -0,0 +1,37 @@ +module Dom.LowLevel exposing + ( onDocument + , onWindow + ) + +{-| This is not for general use. It backs libraries like `elm-lang/mouse` and +`elm-lang/window` which should cover your needs in most cases. In the rare +case that those packages do not seem to cover your scenario, first bring it up +with the community. Ask around and learn stuff first! Only get into these +functions after that. + +# Global Event Listeners +@docs onDocument, onWindow + +-} + +import Json.Decode as Json +import Native.Dom +import Task exposing (Task) + + +{-| Add an event handler on the `document`. The resulting task will never end, +and when you kill the process it is on, it will detach the relevant JavaScript +event listener. +-} +onDocument : String -> Json.Decoder msg -> (msg -> Task Never ()) -> Task Never Never +onDocument = + Native.Dom.onDocument + + +{-| Add an event handler on `window`. The resulting task will never end, and +when you kill the process it is on, it will detach the relevant JavaScript +event listener. +-} +onWindow : String -> Json.Decoder msg -> (msg -> Task Never ()) -> Task Never Never +onWindow = + Native.Dom.onWindow diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/Scroll.elm b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/Scroll.elm new file mode 100644 index 0000000..efb760a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/Scroll.elm @@ -0,0 +1,119 @@ +module Dom.Scroll exposing + ( toTop, toBottom, y, toY + , toLeft, toRight, x, toX + ) + +{-| When you set `overflow-y: scroll` on an element, a scroll bar will appear +when the content overflows the available space. When that happens, you may want +to modify the scroll position yourself. For example, maybe you have a chat room +that autoscrolls as new messages come in. This module provides functions like +`Dom.Scroll.toBottom` that let you do that kind of thing. + +# Vertical +@docs toTop, toBottom, y, toY + +# Horizontal +@docs toLeft, toRight, x, toX + +-} + +import Dom exposing (Error, Id) +import Dom.Size as Size +import Native.Dom +import Task exposing (Task) + + + +-- VERTICAL + + +{-| Find the node with the given `Id` and scroll it to the top. + +So `toTop id` is the same as `toY id 0`. +-} +toTop : Id -> Task Error () +toTop id = + toY id 0 + + +{-| Find the node with the given `Id` and scroll it to the bottom. +-} +toBottom : Id -> Task Error () +toBottom = + Native.Dom.toBottom + + +{-| How much this element is scrolled vertically. + +Say you have a node that does not fit in its container. A scroll bar shows up. +Initially you are at the top, which means `y` is `0`. If you scroll down 300 +pixels, `y` will be `300`. + +This is roughly the same as saying [`document.getElementById(id).scrollTop`][docs]. + +[docs]: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop +-} +y : Id -> Task Error Float +y = + Native.Dom.getScrollTop + + +{-| Set the vertical scroll to whatever offset you want. + +Imagine you have a chat room and you want to control how it scrolls. Say the +full chat is 400 pixels long, but it is in a box that limits the visible height +to 100 pixels. + + - If we say `toY "chat" 0` it will scroll to the very top. + - If we say `toY "chat" 300` it will be at the bottom. + +If we provide values outside that range, they just get clamped, so +`toY "chat" 900` is also scrolled to the bottom. +-} +toY : Id -> Float -> Task Error () +toY = + Native.Dom.setScrollTop + + + +-- HORIZONTAL + + +{-| Find the node with the given `Id` and scroll it to the far left. + +So `toLeft id` is the same as `toX id 0`. +-} +toLeft : Id -> Task Error () +toLeft id = + toX id 0 + + +{-| Find the node with the given `Id` and scroll it to the far right. +-} +toRight : Id -> Task Error () +toRight = + Native.Dom.toRight + + +{-| How much this element is scrolled horizontally. + +Say you have a node that does not fit in its container. A scroll bar shows up. +Initially you are at the far left, which means `x` is `0`. If you scroll right +300 pixels, `x` will be `300`. + +This is roughly the same as saying [`document.getElementById(id).scrollLeft`][docs]. + +[docs]: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft +-} +x : Id -> Task Error Float +x = + Native.Dom.getScrollLeft + + +{-| Set the horizontal scroll to whatever offset you want. + +It works just like `toY`, so check out those docs for a more complete example. +-} +toX : Id -> Float -> Task Error () +toX = + Native.Dom.setScrollLeft diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/Size.elm b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/Size.elm new file mode 100644 index 0000000..49d49cb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Dom/Size.elm @@ -0,0 +1,59 @@ +module Dom.Size exposing ( height, width, Boundary ) + +{-| Figuring out the size of a node is actually pretty tricky. Nodes have +padding, borders, and margins. You can also scroll the content in a node in +many situations. Here it is as a picture: + + + +This module lets you choose one of these boundaries and then measure its size. + +# Sizes +@docs width, height, Boundary + +-} + +import Dom exposing (Error, Id) +import Native.Dom +import Task exposing (Task) + + +{-| Get the height of a node, measured along a certain boundary. + +If the node has the `hidden` attribute or the `display: none` style, this +will be zero. +-} +height : Boundary -> Id -> Task Error Float +height = + Native.Dom.height + + +{-| Get the width of a node, measured along a certain boundary. + +If the node has the `hidden` attribute or the `display: none` style, this +will be zero. +-} +width : Boundary -> Id -> Task Error Float +width = + Native.Dom.width + + +{-| Check out [this diagram][diagram] to understand what all of these +boundaries refer to. + +If you happen to know the JavaScript equivalents by heart, maybe this will help you: + + - `scrollHeight` is the same as `height Content` + - `clientHeight` is the same as `height VisibleContent` + - `offsetHeight` is the same as `height VisibleContentWithBorders` + - `getBoundingClientRect().height` is the same as `height VisibleContentWithBordersAndMargins` + +But again, look at [the diagram][diagram]. It makes this easier! + +[diagram]: +-} +type Boundary + = Content + | VisibleContent + | VisibleContentWithBorders + | VisibleContentWithBordersAndMargins \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Native/Dom.js b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Native/Dom.js new file mode 100644 index 0000000..2fee3f0 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/dom/1.1.1/src/Native/Dom.js @@ -0,0 +1,182 @@ +var _elm_lang$dom$Native_Dom = function() { + +var fakeNode = { + addEventListener: function() {}, + removeEventListener: function() {} +}; + +var onDocument = on(typeof document !== 'undefined' ? document : fakeNode); +var onWindow = on(typeof window !== 'undefined' ? window : fakeNode); + +function on(node) +{ + return function(eventName, decoder, toTask) + { + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { + + function performTask(event) + { + var result = A2(_elm_lang$core$Json_Decode$decodeValue, decoder, event); + if (result.ctor === 'Ok') + { + _elm_lang$core$Native_Scheduler.rawSpawn(toTask(result._0)); + } + } + + node.addEventListener(eventName, performTask); + + return function() + { + node.removeEventListener(eventName, performTask); + }; + }); + }; +} + +var rAF = typeof requestAnimationFrame !== 'undefined' + ? requestAnimationFrame + : function(callback) { callback(); }; + +function withNode(id, doStuff) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + rAF(function() + { + var node = document.getElementById(id); + if (node === null) + { + callback(_elm_lang$core$Native_Scheduler.fail({ ctor: 'NotFound', _0: id })); + return; + } + callback(_elm_lang$core$Native_Scheduler.succeed(doStuff(node))); + }); + }); +} + + +// FOCUS + +function focus(id) +{ + return withNode(id, function(node) { + node.focus(); + return _elm_lang$core$Native_Utils.Tuple0; + }); +} + +function blur(id) +{ + return withNode(id, function(node) { + node.blur(); + return _elm_lang$core$Native_Utils.Tuple0; + }); +} + + +// SCROLLING + +function getScrollTop(id) +{ + return withNode(id, function(node) { + return node.scrollTop; + }); +} + +function setScrollTop(id, desiredScrollTop) +{ + return withNode(id, function(node) { + node.scrollTop = desiredScrollTop; + return _elm_lang$core$Native_Utils.Tuple0; + }); +} + +function toBottom(id) +{ + return withNode(id, function(node) { + node.scrollTop = node.scrollHeight; + return _elm_lang$core$Native_Utils.Tuple0; + }); +} + +function getScrollLeft(id) +{ + return withNode(id, function(node) { + return node.scrollLeft; + }); +} + +function setScrollLeft(id, desiredScrollLeft) +{ + return withNode(id, function(node) { + node.scrollLeft = desiredScrollLeft; + return _elm_lang$core$Native_Utils.Tuple0; + }); +} + +function toRight(id) +{ + return withNode(id, function(node) { + node.scrollLeft = node.scrollWidth; + return _elm_lang$core$Native_Utils.Tuple0; + }); +} + + +// SIZE + +function width(options, id) +{ + return withNode(id, function(node) { + switch (options.ctor) + { + case 'Content': + return node.scrollWidth; + case 'VisibleContent': + return node.clientWidth; + case 'VisibleContentWithBorders': + return node.offsetWidth; + case 'VisibleContentWithBordersAndMargins': + var rect = node.getBoundingClientRect(); + return rect.right - rect.left; + } + }); +} + +function height(options, id) +{ + return withNode(id, function(node) { + switch (options.ctor) + { + case 'Content': + return node.scrollHeight; + case 'VisibleContent': + return node.clientHeight; + case 'VisibleContentWithBorders': + return node.offsetHeight; + case 'VisibleContentWithBordersAndMargins': + var rect = node.getBoundingClientRect(); + return rect.bottom - rect.top; + } + }); +} + +return { + onDocument: F3(onDocument), + onWindow: F3(onWindow), + + focus: focus, + blur: blur, + + getScrollTop: getScrollTop, + setScrollTop: F2(setScrollTop), + getScrollLeft: getScrollLeft, + setScrollLeft: F2(setScrollLeft), + toBottom: toBottom, + toRight: toRight, + + height: F2(height), + width: F2(width) +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/.gitignore new file mode 100644 index 0000000..e185314 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/.gitignore @@ -0,0 +1 @@ +elm-stuff \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/LICENSE b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/LICENSE new file mode 100644 index 0000000..e0419a4 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2014-present, Evan Czaplicki + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Evan Czaplicki nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/README.md b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/README.md new file mode 100644 index 0000000..baed9a7 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/README.md @@ -0,0 +1,5 @@ +# HTML for Elm + +The core HTML library for Elm. It is backed by [elm-lang/virtual-dom](http://package.elm-lang.org/packages/elm-lang/virtual-dom/latest/) which handles the dirty details of rendering things quickly. + +The best way to learn how to use this library is to read [guide.elm-lang.org](http://guide.elm-lang.org/), particularly the section on [The Elm Architecture](http://guide.elm-lang.org/architecture/index.html). diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/elm-package.json new file mode 100644 index 0000000..952aed5 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/elm-package.json @@ -0,0 +1,21 @@ +{ + "version": "2.0.0", + "summary": "Fast HTML, rendered with virtual DOM diffing", + "repository": "https://github.com/elm-lang/html.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Html", + "Html.Attributes", + "Html.Events", + "Html.Keyed", + "Html.Lazy" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/virtual-dom": "2.0.0 <= v < 3.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/properties-vs-attributes.md b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/properties-vs-attributes.md new file mode 100644 index 0000000..41f7565 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/properties-vs-attributes.md @@ -0,0 +1,15 @@ +# Properties vs. Attributes + +When you are working with HTML, you can have DOM nodes like `
    `. And you can add *attributes* to those DOM nodes, like ``. + +When you are creating DOM nodes in JavaScript, there are two ways to add attributes like this: + + 1. **Attributes** — You can use the `setAttribute` function. So adding a class attribute would look like this: `domNode.setAttribute('class', 'user-info')`. + + 2. **Properties** — JavaScript often exposes an alternate way to set these attributes. Another way to add a class attribute would be like this: `domNode.className = 'user-info'` + +Notice that the attribute is called `class` but the property is called `className`. This is because `class` is a reserved word in JavaScript. Point is, **attributes and properties do not always match up.** + +It is actually a bit crazier than that though. **Sometimes an attribute exists, but there is no corresponding property.** For example, as of this writing the `webkit-playsinline` can be added with `setAttribute`, but there is no corresponding property. And with SVG, you cannot use properties at all, you must to use `setAttributeNS` for everything. + +With all the corner cases here, it makes sense to have access to both approaches. \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html.elm b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html.elm new file mode 100644 index 0000000..b872a3b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html.elm @@ -0,0 +1,923 @@ +module Html exposing + ( Html, Attribute + , text, node, map + , beginnerProgram, program, programWithFlags + , h1, h2, h3, h4, h5, h6 + , div, p, hr, pre, blockquote + , span, a, code, em, strong, i, b, u, sub, sup, br + , ol, ul, li, dl, dt, dd + , img, iframe, canvas, math + , form, input, textarea, button, select, option + , section, nav, article, aside, header, footer, address, main_, body + , figure, figcaption + , table, caption, colgroup, col, tbody, thead, tfoot, tr, td, th + , fieldset, legend, label, datalist, optgroup, keygen, output, progress, meter + , audio, video, source, track + , embed, object, param + , ins, del + , small, cite, dfn, abbr, time, var, samp, kbd, s, q + , mark, ruby, rt, rp, bdi, bdo, wbr + , details, summary, menuitem, menu + ) + +{-| This file is organized roughly in order of popularity. The tags which you'd +expect to use frequently will be closer to the top. + +# Primitives +@docs Html, Attribute, text, node, map + +# Programs +@docs beginnerProgram, program, programWithFlags + +# Tags + +## Headers +@docs h1, h2, h3, h4, h5, h6 + +## Grouping Content +@docs div, p, hr, pre, blockquote + +## Text +@docs span, a, code, em, strong, i, b, u, sub, sup, br + +## Lists +@docs ol, ul, li, dl, dt, dd + +## Emdedded Content +@docs img, iframe, canvas, math + +## Inputs +@docs form, input, textarea, button, select, option + +## Sections +@docs section, nav, article, aside, header, footer, address, main_, body + +## Figures +@docs figure, figcaption + +## Tables +@docs table, caption, colgroup, col, tbody, thead, tfoot, tr, td, th + + +## Less Common Elements + +### Less Common Inputs +@docs fieldset, legend, label, datalist, optgroup, keygen, output, progress, meter + +### Audio and Video +@docs audio, video, source, track + +### Embedded Objects +@docs embed, object, param + +### Text Edits +@docs ins, del + +### Semantic Text +@docs small, cite, dfn, abbr, time, var, samp, kbd, s, q + +### Less Common Text Tags +@docs mark, ruby, rt, rp, bdi, bdo, wbr + +## Interactive Elements +@docs details, summary, menuitem, menu + +-} + +import VirtualDom + + + +-- CORE TYPES + + +{-| The core building block used to build up HTML. Here we create an `Html` +value with no attributes and one child: + + hello : Html msg + hello = + div [] [ text "Hello!" ] +-} +type alias Html msg = VirtualDom.Node msg + + +{-| Set attributes on your `Html`. Learn more in the +[`Html.Attributes`](Html-Attributes) module. +-} +type alias Attribute msg = VirtualDom.Property msg + + + +-- PRIMITIVES + + +{-| General way to create HTML nodes. It is used to define all of the helper +functions in this library. + + div : List (Attribute msg) -> List (Html msg) -> Html msg + div attributes children = + node "div" attributes children + +You can use this to create custom nodes if you need to create something that +is not covered by the helper functions in this library. +-} +node : String -> List (Attribute msg) -> List (Html msg) -> Html msg +node = + VirtualDom.node + + +{-| Just put plain text in the DOM. It will escape the string so that it appears +exactly as you specify. + + text "Hello World!" +-} +text : String -> Html msg +text = + VirtualDom.text + + + +-- NESTING VIEWS + + +{-| Transform the messages produced by some `Html`. In the following example, +we have `viewButton` that produces `()` messages, and we transform those values +into `Msg` values in `view`. + + type Msg = Left | Right + + view : model -> Html Msg + view model = + div [] + [ map (\_ -> Left) (viewButton "Left") + , map (\_ -> Right) (viewButton "Right") + ] + + viewButton : String -> Html () + viewButton name = + button [ onClick () ] [ text name ] + +This should not come in handy too often. Definitely read [this][reuse] before +deciding if this is what you want. + +[reuse]: https://guide.elm-lang.org/reuse/ +-} +map : (a -> msg) -> Html a -> Html msg +map = + VirtualDom.map + + + +-- CREATING PROGRAMS + + +{-| Create a [`Program`][program] that describes how your whole app works. + +Read about [The Elm Architecture][tea] to learn how to use this. Just do it. +The additional context is very worthwhile! (Honestly, it is best to just read +that guide from front to back instead of muddling around and reading it +piecemeal.) + +[program]: http://package.elm-lang.org/packages/elm-lang/core/latest/Platform#Program +[tea]: https://guide.elm-lang.org/architecture/ +-} +beginnerProgram + : { model : model + , view : model -> Html msg + , update : msg -> model -> model + } + -> Program Never model msg +beginnerProgram {model, view, update} = + program + { init = model ! [] + , update = \msg model -> update msg model ! [] + , view = view + , subscriptions = \_ -> Sub.none + } + + +{-| Create a [`Program`][program] that describes how your whole app works. + +Read about [The Elm Architecture][tea] to learn how to use this. Just do it. +Commands and subscriptions make way more sense when you work up to them +gradually and see them in context with examples. + +[program]: http://package.elm-lang.org/packages/elm-lang/core/latest/Platform#Program +[tea]: https://guide.elm-lang.org/architecture/ +-} +program + : { init : (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , subscriptions : model -> Sub msg + , view : model -> Html msg + } + -> Program Never model msg +program = + VirtualDom.program + + +{-| Create a [`Program`][program] that describes how your whole app works. + +It works just like `program` but you can provide “flags” from +JavaScript to configure your application. Read more about that [here][]. + +[program]: http://package.elm-lang.org/packages/elm-lang/core/latest/Platform#Program +[here]: https://guide.elm-lang.org/interop/javascript.html +-} +programWithFlags + : { init : flags -> (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , subscriptions : model -> Sub msg + , view : model -> Html msg + } + -> Program flags model msg +programWithFlags = + VirtualDom.programWithFlags + + + +-- SECTIONS + + +{-| Represents the content of an HTML document. There is only one `body` +element in a document. +-} +body : List (Attribute msg) -> List (Html msg) -> Html msg +body = + node "body" + + +{-| Defines a section in a document. +-} +section : List (Attribute msg) -> List (Html msg) -> Html msg +section = + node "section" + + +{-| Defines a section that contains only navigation links. +-} +nav : List (Attribute msg) -> List (Html msg) -> Html msg +nav = + node "nav" + + +{-| Defines self-contained content that could exist independently of the rest +of the content. +-} +article : List (Attribute msg) -> List (Html msg) -> Html msg +article = + node "article" + + +{-| Defines some content loosely related to the page content. If it is removed, +the remaining content still makes sense. +-} +aside : List (Attribute msg) -> List (Html msg) -> Html msg +aside = + node "aside" + + +{-|-} +h1 : List (Attribute msg) -> List (Html msg) -> Html msg +h1 = + node "h1" + + +{-|-} +h2 : List (Attribute msg) -> List (Html msg) -> Html msg +h2 = + node "h2" + + +{-|-} +h3 : List (Attribute msg) -> List (Html msg) -> Html msg +h3 = + node "h3" + + +{-|-} +h4 : List (Attribute msg) -> List (Html msg) -> Html msg +h4 = + node "h4" + + +{-|-} +h5 : List (Attribute msg) -> List (Html msg) -> Html msg +h5 = + node "h5" + + +{-|-} +h6 : List (Attribute msg) -> List (Html msg) -> Html msg +h6 = + node "h6" + + +{-| Defines the header of a page or section. It often contains a logo, the +title of the web site, and a navigational table of content. +-} +header : List (Attribute msg) -> List (Html msg) -> Html msg +header = + node "header" + + +{-| Defines the footer for a page or section. It often contains a copyright +notice, some links to legal information, or addresses to give feedback. +-} +footer : List (Attribute msg) -> List (Html msg) -> Html msg +footer = + node "footer" + + +{-| Defines a section containing contact information. -} +address : List (Attribute msg) -> List (Html msg) -> Html msg +address = + node "address" + + +{-| Defines the main or important content in the document. There is only one +`main` element in the document. +-} +main_ : List (Attribute msg) -> List (Html msg) -> Html msg +main_ = + node "main" + + +-- GROUPING CONTENT + +{-| Defines a portion that should be displayed as a paragraph. -} +p : List (Attribute msg) -> List (Html msg) -> Html msg +p = + node "p" + + +{-| Represents a thematic break between paragraphs of a section or article or +any longer content. +-} +hr : List (Attribute msg) -> List (Html msg) -> Html msg +hr = + node "hr" + + +{-| Indicates that its content is preformatted and that this format must be +preserved. +-} +pre : List (Attribute msg) -> List (Html msg) -> Html msg +pre = + node "pre" + + +{-| Represents a content that is quoted from another source. -} +blockquote : List (Attribute msg) -> List (Html msg) -> Html msg +blockquote = + node "blockquote" + + +{-| Defines an ordered list of items. -} +ol : List (Attribute msg) -> List (Html msg) -> Html msg +ol = + node "ol" + + +{-| Defines an unordered list of items. -} +ul : List (Attribute msg) -> List (Html msg) -> Html msg +ul = + node "ul" + + +{-| Defines a item of an enumeration list. -} +li : List (Attribute msg) -> List (Html msg) -> Html msg +li = + node "li" + + +{-| Defines a definition list, that is, a list of terms and their associated +definitions. +-} +dl : List (Attribute msg) -> List (Html msg) -> Html msg +dl = + node "dl" + + +{-| Represents a term defined by the next `dd`. -} +dt : List (Attribute msg) -> List (Html msg) -> Html msg +dt = + node "dt" + + +{-| Represents the definition of the terms immediately listed before it. -} +dd : List (Attribute msg) -> List (Html msg) -> Html msg +dd = + node "dd" + + +{-| Represents a figure illustrated as part of the document. -} +figure : List (Attribute msg) -> List (Html msg) -> Html msg +figure = + node "figure" + + +{-| Represents the legend of a figure. -} +figcaption : List (Attribute msg) -> List (Html msg) -> Html msg +figcaption = + node "figcaption" + + +{-| Represents a generic container with no special meaning. -} +div : List (Attribute msg) -> List (Html msg) -> Html msg +div = + node "div" + + +-- TEXT LEVEL SEMANTIC + +{-| Represents a hyperlink, linking to another resource. -} +a : List (Attribute msg) -> List (Html msg) -> Html msg +a = + node "a" + + +{-| Represents emphasized text, like a stress accent. -} +em : List (Attribute msg) -> List (Html msg) -> Html msg +em = + node "em" + + +{-| Represents especially important text. -} +strong : List (Attribute msg) -> List (Html msg) -> Html msg +strong = + node "strong" + + +{-| Represents a side comment, that is, text like a disclaimer or a +copyright, which is not essential to the comprehension of the document. +-} +small : List (Attribute msg) -> List (Html msg) -> Html msg +small = + node "small" + + +{-| Represents content that is no longer accurate or relevant. -} +s : List (Attribute msg) -> List (Html msg) -> Html msg +s = + node "s" + + +{-| Represents the title of a work. -} +cite : List (Attribute msg) -> List (Html msg) -> Html msg +cite = + node "cite" + + +{-| Represents an inline quotation. -} +q : List (Attribute msg) -> List (Html msg) -> Html msg +q = + node "q" + + +{-| Represents a term whose definition is contained in its nearest ancestor +content. +-} +dfn : List (Attribute msg) -> List (Html msg) -> Html msg +dfn = + node "dfn" + + +{-| Represents an abbreviation or an acronym; the expansion of the +abbreviation can be represented in the title attribute. +-} +abbr : List (Attribute msg) -> List (Html msg) -> Html msg +abbr = + node "abbr" + + +{-| Represents a date and time value; the machine-readable equivalent can be +represented in the datetime attribute. +-} +time : List (Attribute msg) -> List (Html msg) -> Html msg +time = + node "time" + + +{-| Represents computer code. -} +code : List (Attribute msg) -> List (Html msg) -> Html msg +code = + node "code" + + +{-| Represents a variable. Specific cases where it should be used include an +actual mathematical expression or programming context, an identifier +representing a constant, a symbol identifying a physical quantity, a function +parameter, or a mere placeholder in prose. +-} +var : List (Attribute msg) -> List (Html msg) -> Html msg +var = + node "var" + + +{-| Represents the output of a program or a computer. -} +samp : List (Attribute msg) -> List (Html msg) -> Html msg +samp = + node "samp" + + +{-| Represents user input, often from the keyboard, but not necessarily; it +may represent other input, like transcribed voice commands. +-} +kbd : List (Attribute msg) -> List (Html msg) -> Html msg +kbd = + node "kbd" + + +{-| Represent a subscript. -} +sub : List (Attribute msg) -> List (Html msg) -> Html msg +sub = + node "sub" + + +{-| Represent a superscript. -} +sup : List (Attribute msg) -> List (Html msg) -> Html msg +sup = + node "sup" + + +{-| Represents some text in an alternate voice or mood, or at least of +different quality, such as a taxonomic designation, a technical term, an +idiomatic phrase, a thought, or a ship name. +-} +i : List (Attribute msg) -> List (Html msg) -> Html msg +i = + node "i" + + +{-| Represents a text which to which attention is drawn for utilitarian +purposes. It doesn't convey extra importance and doesn't imply an alternate +voice. +-} +b : List (Attribute msg) -> List (Html msg) -> Html msg +b = + node "b" + + +{-| Represents a non-textual annoatation for which the conventional +presentation is underlining, such labeling the text as being misspelt or +labeling a proper name in Chinese text. +-} +u : List (Attribute msg) -> List (Html msg) -> Html msg +u = + node "u" + + +{-| Represents text highlighted for reference purposes, that is for its +relevance in another context. +-} +mark : List (Attribute msg) -> List (Html msg) -> Html msg +mark = + node "mark" + + +{-| Represents content to be marked with ruby annotations, short runs of text +presented alongside the text. This is often used in conjunction with East Asian +language where the annotations act as a guide for pronunciation, like the +Japanese furigana. +-} +ruby : List (Attribute msg) -> List (Html msg) -> Html msg +ruby = + node "ruby" + + +{-| Represents the text of a ruby annotation. -} +rt : List (Attribute msg) -> List (Html msg) -> Html msg +rt = + node "rt" + + +{-| Represents parenthesis around a ruby annotation, used to display the +annotation in an alternate way by browsers not supporting the standard display +for annotations. +-} +rp : List (Attribute msg) -> List (Html msg) -> Html msg +rp = + node "rp" + + +{-| Represents text that must be isolated from its surrounding for +bidirectional text formatting. It allows embedding a span of text with a +different, or unknown, directionality. +-} +bdi : List (Attribute msg) -> List (Html msg) -> Html msg +bdi = + node "bdi" + + +{-| Represents the directionality of its children, in order to explicitly +override the Unicode bidirectional algorithm. +-} +bdo : List (Attribute msg) -> List (Html msg) -> Html msg +bdo = + node "bdo" + + +{-| Represents text with no specific meaning. This has to be used when no other +text-semantic element conveys an adequate meaning, which, in this case, is +often brought by global attributes like `class`, `lang`, or `dir`. +-} +span : List (Attribute msg) -> List (Html msg) -> Html msg +span = + node "span" + + +{-| Represents a line break. -} +br : List (Attribute msg) -> List (Html msg) -> Html msg +br = + node "br" + + +{-| Represents a line break opportunity, that is a suggested point for +wrapping text in order to improve readability of text split on several lines. +-} +wbr : List (Attribute msg) -> List (Html msg) -> Html msg +wbr = + node "wbr" + + +-- EDITS + +{-| Defines an addition to the document. -} +ins : List (Attribute msg) -> List (Html msg) -> Html msg +ins = + node "ins" + + +{-| Defines a removal from the document. -} +del : List (Attribute msg) -> List (Html msg) -> Html msg +del = + node "del" + + +-- EMBEDDED CONTENT + +{-| Represents an image. -} +img : List (Attribute msg) -> List (Html msg) -> Html msg +img = + node "img" + + +{-| Embedded an HTML document. -} +iframe : List (Attribute msg) -> List (Html msg) -> Html msg +iframe = + node "iframe" + + +{-| Represents a integration point for an external, often non-HTML, +application or interactive content. +-} +embed : List (Attribute msg) -> List (Html msg) -> Html msg +embed = + node "embed" + + +{-| Represents an external resource, which is treated as an image, an HTML +sub-document, or an external resource to be processed by a plug-in. +-} +object : List (Attribute msg) -> List (Html msg) -> Html msg +object = + node "object" + + +{-| Defines parameters for use by plug-ins invoked by `object` elements. -} +param : List (Attribute msg) -> List (Html msg) -> Html msg +param = + node "param" + + +{-| Represents a video, the associated audio and captions, and controls. -} +video : List (Attribute msg) -> List (Html msg) -> Html msg +video = + node "video" + + +{-| Represents a sound or audio stream. -} +audio : List (Attribute msg) -> List (Html msg) -> Html msg +audio = + node "audio" + + +{-| Allows authors to specify alternative media resources for media elements +like `video` or `audio`. +-} +source : List (Attribute msg) -> List (Html msg) -> Html msg +source = + node "source" + + +{-| Allows authors to specify timed text track for media elements like `video` +or `audio`. +-} +track : List (Attribute msg) -> List (Html msg) -> Html msg +track = + node "track" + + +{-| Represents a bitmap area for graphics rendering. -} +canvas : List (Attribute msg) -> List (Html msg) -> Html msg +canvas = + node "canvas" + + +{-| Defines a mathematical formula. -} +math : List (Attribute msg) -> List (Html msg) -> Html msg +math = + node "math" + + +-- TABULAR DATA + +{-| Represents data with more than one dimension. -} +table : List (Attribute msg) -> List (Html msg) -> Html msg +table = + node "table" + + +{-| Represents the title of a table. -} +caption : List (Attribute msg) -> List (Html msg) -> Html msg +caption = + node "caption" + + +{-| Represents a set of one or more columns of a table. -} +colgroup : List (Attribute msg) -> List (Html msg) -> Html msg +colgroup = + node "colgroup" + + +{-| Represents a column of a table. -} +col : List (Attribute msg) -> List (Html msg) -> Html msg +col = + node "col" + + +{-| Represents the block of rows that describes the concrete data of a table. +-} +tbody : List (Attribute msg) -> List (Html msg) -> Html msg +tbody = + node "tbody" + + +{-| Represents the block of rows that describes the column labels of a table. +-} +thead : List (Attribute msg) -> List (Html msg) -> Html msg +thead = + node "thead" + + +{-| Represents the block of rows that describes the column summaries of a table. +-} +tfoot : List (Attribute msg) -> List (Html msg) -> Html msg +tfoot = + node "tfoot" + + +{-| Represents a row of cells in a table. -} +tr : List (Attribute msg) -> List (Html msg) -> Html msg +tr = + node "tr" + + +{-| Represents a data cell in a table. -} +td : List (Attribute msg) -> List (Html msg) -> Html msg +td = + node "td" + + +{-| Represents a header cell in a table. -} +th : List (Attribute msg) -> List (Html msg) -> Html msg +th = + node "th" + + +-- FORMS + +{-| Represents a form, consisting of controls, that can be submitted to a +server for processing. +-} +form : List (Attribute msg) -> List (Html msg) -> Html msg +form = + node "form" + + +{-| Represents a set of controls. -} +fieldset : List (Attribute msg) -> List (Html msg) -> Html msg +fieldset = + node "fieldset" + + +{-| Represents the caption for a `fieldset`. -} +legend : List (Attribute msg) -> List (Html msg) -> Html msg +legend = + node "legend" + + +{-| Represents the caption of a form control. -} +label : List (Attribute msg) -> List (Html msg) -> Html msg +label = + node "label" + + +{-| Represents a typed data field allowing the user to edit the data. -} +input : List (Attribute msg) -> List (Html msg) -> Html msg +input = + node "input" + + +{-| Represents a button. -} +button : List (Attribute msg) -> List (Html msg) -> Html msg +button = + node "button" + + +{-| Represents a control allowing selection among a set of options. -} +select : List (Attribute msg) -> List (Html msg) -> Html msg +select = + node "select" + + +{-| Represents a set of predefined options for other controls. -} +datalist : List (Attribute msg) -> List (Html msg) -> Html msg +datalist = + node "datalist" + + +{-| Represents a set of options, logically grouped. -} +optgroup : List (Attribute msg) -> List (Html msg) -> Html msg +optgroup = + node "optgroup" + + +{-| Represents an option in a `select` element or a suggestion of a `datalist` +element. +-} +option : List (Attribute msg) -> List (Html msg) -> Html msg +option = + node "option" + + +{-| Represents a multiline text edit control. -} +textarea : List (Attribute msg) -> List (Html msg) -> Html msg +textarea = + node "textarea" + + +{-| Represents a key-pair generator control. -} +keygen : List (Attribute msg) -> List (Html msg) -> Html msg +keygen = + node "keygen" + + +{-| Represents the result of a calculation. -} +output : List (Attribute msg) -> List (Html msg) -> Html msg +output = + node "output" + + +{-| Represents the completion progress of a task. -} +progress : List (Attribute msg) -> List (Html msg) -> Html msg +progress = + node "progress" + + +{-| Represents a scalar measurement (or a fractional value), within a known +range. +-} +meter : List (Attribute msg) -> List (Html msg) -> Html msg +meter = + node "meter" + + +-- INTERACTIVE ELEMENTS + +{-| Represents a widget from which the user can obtain additional information +or controls. +-} +details : List (Attribute msg) -> List (Html msg) -> Html msg +details = + node "details" + + +{-| Represents a summary, caption, or legend for a given `details`. -} +summary : List (Attribute msg) -> List (Html msg) -> Html msg +summary = + node "summary" + + +{-| Represents a command that the user can invoke. -} +menuitem : List (Attribute msg) -> List (Html msg) -> Html msg +menuitem = + node "menuitem" + + +{-| Represents a list of commands. -} +menu : List (Attribute msg) -> List (Html msg) -> Html msg +menu = + node "menu" + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Attributes.elm b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Attributes.elm new file mode 100644 index 0000000..4cdba44 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Attributes.elm @@ -0,0 +1,1009 @@ +module Html.Attributes exposing + ( style, property, attribute, map + , class, classList, id, title, hidden + , type_, value, defaultValue, checked, placeholder, selected + , accept, acceptCharset, action, autocomplete, autofocus + , disabled, enctype, formaction, list, maxlength, minlength, method, multiple + , name, novalidate, pattern, readonly, required, size, for, form + , max, min, step + , cols, rows, wrap + , href, target, download, downloadAs, hreflang, media, ping, rel + , ismap, usemap, shape, coords + , src, height, width, alt + , autoplay, controls, loop, preload, poster, default, kind, srclang + , sandbox, seamless, srcdoc + , reversed, start + , align, colspan, rowspan, headers, scope + , async, charset, content, defer, httpEquiv, language, scoped + , accesskey, contenteditable, contextmenu, dir, draggable, dropzone + , itemprop, lang, spellcheck, tabindex + , challenge, keytype + , cite, datetime, pubdate, manifest + ) + +{-| Helper functions for HTML attributes. They are organized roughly by +category. Each attribute is labeled with the HTML tags it can be used with, so +just search the page for `video` if you want video stuff. + +If you cannot find what you are looking for, go to the [Custom +Attributes](#custom-attributes) section to learn how to create new helpers. + +# Primitives +@docs style, property, attribute, map + +# Super Common Attributes +@docs class, classList, id, title, hidden + +# Inputs +@docs type_, value, defaultValue, checked, placeholder, selected + +## Input Helpers +@docs accept, acceptCharset, action, autocomplete, autofocus, + disabled, enctype, formaction, list, maxlength, minlength, method, multiple, + name, novalidate, pattern, readonly, required, size, for, form + +## Input Ranges +@docs max, min, step + +## Input Text Areas +@docs cols, rows, wrap + + +# Links and Areas +@docs href, target, download, downloadAs, hreflang, media, ping, rel + +## Maps +@docs ismap, usemap, shape, coords + + +# Embedded Content +@docs src, height, width, alt + +## Audio and Video +@docs autoplay, controls, loop, preload, poster, default, kind, srclang + +## iframes +@docs sandbox, seamless, srcdoc + +# Ordered Lists +@docs reversed, start + +# Tables +@docs align, colspan, rowspan, headers, scope + +# Header Stuff +@docs async, charset, content, defer, httpEquiv, language, scoped + +# Less Common Global Attributes +Attributes that can be attached to any HTML tag but are less commonly used. +@docs accesskey, contenteditable, contextmenu, dir, draggable, dropzone, + itemprop, lang, spellcheck, tabindex + +# Key Generation +@docs challenge, keytype + +# Miscellaneous +@docs cite, datetime, pubdate, manifest + +-} + +import Html exposing (Attribute) +import Json.Encode as Json +import VirtualDom + + +-- This library does not include low, high, or optimum because the idea of a +-- `meter` is just too crazy. + + + +-- PRIMITIVES + + +{-| Specify a list of styles. + + myStyle : Attribute msg + myStyle = + style + [ ("backgroundColor", "red") + , ("height", "90px") + , ("width", "100%") + ] + + greeting : Html msg + greeting = + div [ myStyle ] [ text "Hello!" ] + +There is no `Html.Styles` module because best practices for working with HTML +suggest that this should primarily be specified in CSS files. So the general +recommendation is to use this function lightly. +-} +style : List (String, String) -> Attribute msg +style = + VirtualDom.style + + +{-| This function makes it easier to build a space-separated class attribute. +Each class can easily be added and removed depending on the boolean value it +is paired with. For example, maybe we want a way to view notices: + + viewNotice : Notice -> Html msg + viewNotice notice = + div + [ classList + [ ("notice", True) + , ("notice-important", notice.isImportant) + , ("notice-seen", notice.isSeen) + ] + ] + [ text notice.content ] +-} +classList : List (String, Bool) -> Attribute msg +classList list = + list + |> List.filter Tuple.second + |> List.map Tuple.first + |> String.join " " + |> class + + + +-- CUSTOM ATTRIBUTES + + +{-| Create *properties*, like saying `domNode.className = 'greeting'` in +JavaScript. + + import Json.Encode as Encode + + class : String -> Attribute msg + class name = + property "className" (Encode.string name) + +Read more about the difference between properties and attributes [here][]. + +[here]: https://github.com/elm-lang/html/blob/master/properties-vs-attributes.md +-} +property : String -> Json.Value -> Attribute msg +property = + VirtualDom.property + + +stringProperty : String -> String -> Attribute msg +stringProperty name string = + property name (Json.string string) + + +boolProperty : String -> Bool -> Attribute msg +boolProperty name bool = + property name (Json.bool bool) + + +{-| Create *attributes*, like saying `domNode.setAttribute('class', 'greeting')` +in JavaScript. + + class : String -> Attribute msg + class name = + attribute "class" name + +Read more about the difference between properties and attributes [here][]. + +[here]: https://github.com/elm-lang/html/blob/master/properties-vs-attributes.md +-} +attribute : String -> String -> Attribute msg +attribute = + VirtualDom.attribute + + +{-| Transform the messages produced by an `Attribute`. +-} +map : (a -> msg) -> Attribute a -> Attribute msg +map = + VirtualDom.mapProperty + + + +-- GLOBAL ATTRIBUTES + + +{-| Often used with CSS to style elements with common properties. -} +class : String -> Attribute msg +class name = + stringProperty "className" name + + +{-| Indicates the relevance of an element. -} +hidden : Bool -> Attribute msg +hidden bool = + boolProperty "hidden" bool + + +{-| Often used with CSS to style a specific element. The value of this +attribute must be unique. +-} +id : String -> Attribute msg +id name = + stringProperty "id" name + + +{-| Text to be displayed in a tooltip when hovering over the element. -} +title : String -> Attribute msg +title name = + stringProperty "title" name + + + +-- LESS COMMON GLOBAL ATTRIBUTES + + +{-| Defines a keyboard shortcut to activate or add focus to the element. -} +accesskey : Char -> Attribute msg +accesskey char = + stringProperty "accessKey" (String.fromChar char) + + +{-| Indicates whether the element's content is editable. -} +contenteditable : Bool -> Attribute msg +contenteditable bool = + boolProperty "contentEditable" bool + + +{-| Defines the ID of a `menu` element which will serve as the element's +context menu. +-} +contextmenu : String -> Attribute msg +contextmenu value = + attribute "contextmenu" value + + +{-| Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl +(Right-To-Left). +-} +dir : String -> Attribute msg +dir value = + stringProperty "dir" value + + +{-| Defines whether the element can be dragged. -} +draggable : String -> Attribute msg +draggable value = + attribute "draggable" value + + +{-| Indicates that the element accept the dropping of content on it. -} +dropzone : String -> Attribute msg +dropzone value = + stringProperty "dropzone" value + + +{-|-} +itemprop : String -> Attribute msg +itemprop value = + attribute "itemprop" value + + +{-| Defines the language used in the element. -} +lang : String -> Attribute msg +lang value = + stringProperty "lang" value + + +{-| Indicates whether spell checking is allowed for the element. -} +spellcheck : Bool -> Attribute msg +spellcheck bool = + boolProperty "spellcheck" bool + + +{-| Overrides the browser's default tab order and follows the one specified +instead. +-} +tabindex : Int -> Attribute msg +tabindex n = + attribute "tabIndex" (toString n) + + + +-- HEADER STUFF + + +{-| Indicates that the `script` should be executed asynchronously. -} +async : Bool -> Attribute msg +async bool = + boolProperty "async" bool + + +{-| Declares the character encoding of the page or script. Common values include: + + * UTF-8 - Character encoding for Unicode + * ISO-8859-1 - Character encoding for the Latin alphabet + +For `meta` and `script`. +-} +charset : String -> Attribute msg +charset value = + attribute "charset" value + + +{-| A value associated with http-equiv or name depending on the context. For +`meta`. +-} +content : String -> Attribute msg +content value = + stringProperty "content" value + + +{-| Indicates that a `script` should be executed after the page has been +parsed. +-} +defer : Bool -> Attribute msg +defer bool = + boolProperty "defer" bool + + +{-| This attribute is an indicator that is paired with the `content` attribute, +indicating what that content means. `httpEquiv` can take on three different +values: content-type, default-style, or refresh. For `meta`. +-} +httpEquiv : String -> Attribute msg +httpEquiv value = + stringProperty "httpEquiv" value + + +{-| Defines the script language used in a `script`. -} +language : String -> Attribute msg +language value = + stringProperty "language" value + + +{-| Indicates that a `style` should only apply to its parent and all of the +parents children. +-} +scoped : Bool -> Attribute msg +scoped bool = + boolProperty "scoped" bool + + + +-- EMBEDDED CONTENT + + +{-| The URL of the embeddable content. For `audio`, `embed`, `iframe`, `img`, +`input`, `script`, `source`, `track`, and `video`. +-} +src : String -> Attribute msg +src value = + stringProperty "src" value + + +{-| Declare the height of a `canvas`, `embed`, `iframe`, `img`, `input`, +`object`, or `video`. +-} +height : Int -> Attribute msg +height value = + attribute "height" (toString value) + + +{-| Declare the width of a `canvas`, `embed`, `iframe`, `img`, `input`, +`object`, or `video`. +-} +width : Int -> Attribute msg +width value = + attribute "width" (toString value) + + +{-| Alternative text in case an image can't be displayed. Works with `img`, +`area`, and `input`. +-} +alt : String -> Attribute msg +alt value = + stringProperty "alt" value + + + +-- AUDIO and VIDEO + + +{-| The `audio` or `video` should play as soon as possible. -} +autoplay : Bool -> Attribute msg +autoplay bool = + boolProperty "autoplay" bool + + +{-| Indicates whether the browser should show playback controls for the `audio` +or `video`. +-} +controls : Bool -> Attribute msg +controls bool = + boolProperty "controls" bool + + +{-| Indicates whether the `audio` or `video` should start playing from the +start when it's finished. +-} +loop : Bool -> Attribute msg +loop bool = + boolProperty "loop" bool + + +{-| Control how much of an `audio` or `video` resource should be preloaded. -} +preload : String -> Attribute msg +preload value = + stringProperty "preload" value + + +{-| A URL indicating a poster frame to show until the user plays or seeks the +`video`. +-} +poster : String -> Attribute msg +poster value = + stringProperty "poster" value + + +{-| Indicates that the `track` should be enabled unless the user's preferences +indicate something different. +-} +default : Bool -> Attribute msg +default bool = + boolProperty "default" bool + + +{-| Specifies the kind of text `track`. -} +kind : String -> Attribute msg +kind value = + stringProperty "kind" value + + +{-- TODO: maybe reintroduce once there's a better way to disambiguate imports +{-| Specifies a user-readable title of the text `track`. -} +label : String -> Attribute msg +label value = + stringProperty "label" value +--} + +{-| A two letter language code indicating the language of the `track` text data. +-} +srclang : String -> Attribute msg +srclang value = + stringProperty "srclang" value + + + +-- IFRAMES + + +{-| A space separated list of security restrictions you'd like to lift for an +`iframe`. +-} +sandbox : String -> Attribute msg +sandbox value = + stringProperty "sandbox" value + + +{-| Make an `iframe` look like part of the containing document. -} +seamless : Bool -> Attribute msg +seamless bool = + boolProperty "seamless" bool + + +{-| An HTML document that will be displayed as the body of an `iframe`. It will +override the content of the `src` attribute if it has been specified. +-} +srcdoc : String -> Attribute msg +srcdoc value = + stringProperty "srcdoc" value + + + +-- INPUT + + +{-| Defines the type of a `button`, `input`, `embed`, `object`, `script`, +`source`, `style`, or `menu`. +-} +type_ : String -> Attribute msg +type_ value = + stringProperty "type" value + + +{-| Defines a default value which will be displayed in a `button`, `option`, +`input`, `li`, `meter`, `progress`, or `param`. +-} +value : String -> Attribute msg +value value = + stringProperty "value" value + + +{-| Defines an initial value which will be displayed in an `input` when that +`input` is added to the DOM. Unlike `value`, altering `defaultValue` after the +`input` element has been added to the DOM has no effect. +-} +defaultValue : String -> Attribute msg +defaultValue value = + stringProperty "defaultValue" value + + +{-| Indicates whether an `input` of type checkbox is checked. -} +checked : Bool -> Attribute msg +checked bool = + boolProperty "checked" bool + + +{-| Provides a hint to the user of what can be entered into an `input` or +`textarea`. +-} +placeholder : String -> Attribute msg +placeholder value = + stringProperty "placeholder" value + + +{-| Defines which `option` will be selected on page load. -} +selected : Bool -> Attribute msg +selected bool = + boolProperty "selected" bool + + + +-- INPUT HELPERS + + +{-| List of types the server accepts, typically a file type. +For `form` and `input`. +-} +accept : String -> Attribute msg +accept value = + stringProperty "accept" value + + +{-| List of supported charsets in a `form`. +-} +acceptCharset : String -> Attribute msg +acceptCharset value = + stringProperty "acceptCharset" value + + +{-| The URI of a program that processes the information submitted via a `form`. +-} +action : String -> Attribute msg +action value = + stringProperty "action" value + + +{-| Indicates whether a `form` or an `input` can have their values automatically +completed by the browser. +-} +autocomplete : Bool -> Attribute msg +autocomplete bool = + stringProperty "autocomplete" (if bool then "on" else "off") + + +{-| The element should be automatically focused after the page loaded. +For `button`, `input`, `keygen`, `select`, and `textarea`. +-} +autofocus : Bool -> Attribute msg +autofocus bool = + boolProperty "autofocus" bool + + +{-| Indicates whether the user can interact with a `button`, `fieldset`, +`input`, `keygen`, `optgroup`, `option`, `select` or `textarea`. +-} +disabled : Bool -> Attribute msg +disabled bool = + boolProperty "disabled" bool + + +{-| How `form` data should be encoded when submitted with the POST method. +Options include: application/x-www-form-urlencoded, multipart/form-data, and +text/plain. +-} +enctype : String -> Attribute msg +enctype value = + stringProperty "enctype" value + + +{-| Indicates the action of an `input` or `button`. This overrides the action +defined in the surrounding `form`. +-} +formaction : String -> Attribute msg +formaction value = + attribute "formAction" value + + +{-| Associates an `input` with a `datalist` tag. The datalist gives some +pre-defined options to suggest to the user as they interact with an input. +The value of the list attribute must match the id of a `datalist` node. +For `input`. +-} +list : String -> Attribute msg +list value = + attribute "list" value + + +{-| Defines the minimum number of characters allowed in an `input` or +`textarea`. +-} +minlength : Int -> Attribute msg +minlength n = + attribute "minLength" (toString n) + + +{-| Defines the maximum number of characters allowed in an `input` or +`textarea`. +-} +maxlength : Int -> Attribute msg +maxlength n = + attribute "maxlength" (toString n) + + +{-| Defines which HTTP method to use when submitting a `form`. Can be GET +(default) or POST. +-} +method : String -> Attribute msg +method value = + stringProperty "method" value + + +{-| Indicates whether multiple values can be entered in an `input` of type +email or file. Can also indicate that you can `select` many options. +-} +multiple : Bool -> Attribute msg +multiple bool = + boolProperty "multiple" bool + + +{-| Name of the element. For example used by the server to identify the fields +in form submits. For `button`, `form`, `fieldset`, `iframe`, `input`, `keygen`, +`object`, `output`, `select`, `textarea`, `map`, `meta`, and `param`. +-} +name : String -> Attribute msg +name value = + stringProperty "name" value + + +{-| This attribute indicates that a `form` shouldn't be validated when +submitted. +-} +novalidate : Bool -> Attribute msg +novalidate bool = + boolProperty "noValidate" bool + + +{-| Defines a regular expression which an `input`'s value will be validated +against. +-} +pattern : String -> Attribute msg +pattern value = + stringProperty "pattern" value + + +{-| Indicates whether an `input` or `textarea` can be edited. -} +readonly : Bool -> Attribute msg +readonly bool = + boolProperty "readOnly" bool + + +{-| Indicates whether this element is required to fill out or not. +For `input`, `select`, and `textarea`. +-} +required : Bool -> Attribute msg +required bool = + boolProperty "required" bool + + +{-| For `input` specifies the width of an input in characters. + +For `select` specifies the number of visible options in a drop-down list. +-} +size : Int -> Attribute msg +size n = + attribute "size" (toString n) + + +{-| The element ID described by this `label` or the element IDs that are used +for an `output`. +-} +for : String -> Attribute msg +for value = + stringProperty "htmlFor" value + + +{-| Indicates the element ID of the `form` that owns this particular `button`, +`fieldset`, `input`, `keygen`, `label`, `meter`, `object`, `output`, +`progress`, `select`, or `textarea`. +-} +form : String -> Attribute msg +form value = + attribute "form" value + + + +-- RANGES + + +{-| Indicates the maximum value allowed. When using an input of type number or +date, the max value must be a number or date. For `input`, `meter`, and `progress`. +-} +max : String -> Attribute msg +max value = + stringProperty "max" value + + +{-| Indicates the minimum value allowed. When using an input of type number or +date, the min value must be a number or date. For `input` and `meter`. +-} +min : String -> Attribute msg +min value = + stringProperty "min" value + + +{-| Add a step size to an `input`. Use `step "any"` to allow any floating-point +number to be used in the input. +-} +step : String -> Attribute msg +step n = + stringProperty "step" n + + +-------------------------- + + +{-| Defines the number of columns in a `textarea`. -} +cols : Int -> Attribute msg +cols n = + attribute "cols" (toString n) + + +{-| Defines the number of rows in a `textarea`. -} +rows : Int -> Attribute msg +rows n = + attribute "rows" (toString n) + + +{-| Indicates whether the text should be wrapped in a `textarea`. Possible +values are "hard" and "soft". +-} +wrap : String -> Attribute msg +wrap value = + stringProperty "wrap" value + + + +-- MAPS + + +{-| When an `img` is a descendent of an `a` tag, the `ismap` attribute +indicates that the click location should be added to the parent `a`'s href as +a query string. +-} +ismap : Bool -> Attribute msg +ismap value = + boolProperty "isMap" value + + +{-| Specify the hash name reference of a `map` that should be used for an `img` +or `object`. A hash name reference is a hash symbol followed by the element's name or id. +E.g. `"#planet-map"`. +-} +usemap : String -> Attribute msg +usemap value = + stringProperty "useMap" value + + +{-| Declare the shape of the clickable area in an `a` or `area`. Valid values +include: default, rect, circle, poly. This attribute can be paired with +`coords` to create more particular shapes. +-} +shape : String -> Attribute msg +shape value = + stringProperty "shape" value + + +{-| A set of values specifying the coordinates of the hot-spot region in an +`area`. Needs to be paired with a `shape` attribute to be meaningful. +-} +coords : String -> Attribute msg +coords value = + stringProperty "coords" value + + + +-- KEY GEN + + +{-| A challenge string that is submitted along with the public key in a `keygen`. +-} +challenge : String -> Attribute msg +challenge value = + attribute "challenge" value + + +{-| Specifies the type of key generated by a `keygen`. Possible values are: +rsa, dsa, and ec. +-} +keytype : String -> Attribute msg +keytype value = + stringProperty "keytype" value + + + +-- REAL STUFF + + +{-| Specifies the horizontal alignment of a `caption`, `col`, `colgroup`, +`hr`, `iframe`, `img`, `table`, `tbody`, `td`, `tfoot`, `th`, `thead`, or +`tr`. +-} +align : String -> Attribute msg +align value = + stringProperty "align" value + + +{-| Contains a URI which points to the source of the quote or change in a +`blockquote`, `del`, `ins`, or `q`. +-} +cite : String -> Attribute msg +cite value = + stringProperty "cite" value + + + + +-- LINKS AND AREAS + + +{-| The URL of a linked resource, such as `a`, `area`, `base`, or `link`. -} +href : String -> Attribute msg +href value = + stringProperty "href" value + + +{-| Specify where the results of clicking an `a`, `area`, `base`, or `form` +should appear. Possible special values include: + + * _blank — a new window or tab + * _self — the same frame (this is default) + * _parent — the parent frame + * _top — the full body of the window + +You can also give the name of any `frame` you have created. +-} +target : String -> Attribute msg +target value = + stringProperty "target" value + + +{-| Indicates that clicking an `a` and `area` will download the resource +directly. +-} +download : Bool -> Attribute msg +download bool = + boolProperty "download" bool + + +{-| Indicates that clicking an `a` and `area` will download the resource +directly, and that the downloaded resource with have the given filename. +-} +downloadAs : String -> Attribute msg +downloadAs value = + stringProperty "download" value + + +{-| Two-letter language code of the linked resource of an `a`, `area`, or `link`. +-} +hreflang : String -> Attribute msg +hreflang value = + stringProperty "hreflang" value + + +{-| Specifies a hint of the target media of a `a`, `area`, `link`, `source`, +or `style`. +-} +media : String -> Attribute msg +media value = + attribute "media" value + + +{-| Specify a URL to send a short POST request to when the user clicks on an +`a` or `area`. Useful for monitoring and tracking. +-} +ping : String -> Attribute msg +ping value = + stringProperty "ping" value + + +{-| Specifies the relationship of the target object to the link object. +For `a`, `area`, `link`. +-} +rel : String -> Attribute msg +rel value = + attribute "rel" value + + + +-- CRAZY STUFF + + +{-| Indicates the date and time associated with the element. +For `del`, `ins`, `time`. +-} +datetime : String -> Attribute msg +datetime value = + attribute "datetime" value + + +{-| Indicates whether this date and time is the date of the nearest `article` +ancestor element. For `time`. +-} +pubdate : String -> Attribute msg +pubdate value = + attribute "pubdate" value + + + +-- ORDERED LISTS + + +{-| Indicates whether an ordered list `ol` should be displayed in a descending +order instead of a ascending. +-} +reversed : Bool -> Attribute msg +reversed bool = + boolProperty "reversed" bool + + +{-| Defines the first number of an ordered list if you want it to be something +besides 1. +-} +start : Int -> Attribute msg +start n = + stringProperty "start" (toString n) + + + +-- TABLES + + +{-| The colspan attribute defines the number of columns a cell should span. +For `td` and `th`. +-} +colspan : Int -> Attribute msg +colspan n = + attribute "colspan" (toString n) + + +{-| A space separated list of element IDs indicating which `th` elements are +headers for this cell. For `td` and `th`. +-} +headers : String -> Attribute msg +headers value = + stringProperty "headers" value + + +{-| Defines the number of rows a table cell should span over. +For `td` and `th`. +-} +rowspan : Int -> Attribute msg +rowspan n = + attribute "rowspan" (toString n) + + +{-| Specifies the scope of a header cell `th`. Possible values are: col, row, +colgroup, rowgroup. +-} +scope : String -> Attribute msg +scope value = + stringProperty "scope" value + + +{-| Specifies the URL of the cache manifest for an `html` tag. -} +manifest : String -> Attribute msg +manifest value = + attribute "manifest" value + + +{-- TODO: maybe reintroduce once there's a better way to disambiguate imports +{-| The number of columns a `col` or `colgroup` should span. -} +span : Int -> Attribute msg +span n = + stringProperty "span" (toString n) +--} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Events.elm b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Events.elm new file mode 100644 index 0000000..ff5c1fe --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Events.elm @@ -0,0 +1,269 @@ +module Html.Events exposing + ( onClick, onDoubleClick + , onMouseDown, onMouseUp + , onMouseEnter, onMouseLeave + , onMouseOver, onMouseOut + , onInput, onCheck, onSubmit + , onBlur, onFocus + , on, onWithOptions, Options, defaultOptions + , targetValue, targetChecked, keyCode + ) + +{-| +It is often helpful to create an [Union Type][] so you can have many different kinds +of events as seen in the [TodoMVC][] example. + +[Union Type]: http://elm-lang.org/learn/Union-Types.elm +[TodoMVC]: https://github.com/evancz/elm-todomvc/blob/master/Todo.elm + +# Mouse Helpers +@docs onClick, onDoubleClick, + onMouseDown, onMouseUp, + onMouseEnter, onMouseLeave, + onMouseOver, onMouseOut + +# Form Helpers +@docs onInput, onCheck, onSubmit + +# Focus Helpers +@docs onBlur, onFocus + +# Custom Event Handlers +@docs on, onWithOptions, Options, defaultOptions + +# Custom Decoders +@docs targetValue, targetChecked, keyCode +-} + +import Html exposing (Attribute) +import Json.Decode as Json +import VirtualDom + + + +-- MOUSE EVENTS + + +{-|-} +onClick : msg -> Attribute msg +onClick msg = + on "click" (Json.succeed msg) + + +{-|-} +onDoubleClick : msg -> Attribute msg +onDoubleClick msg = + on "dblclick" (Json.succeed msg) + + +{-|-} +onMouseDown : msg -> Attribute msg +onMouseDown msg = + on "mousedown" (Json.succeed msg) + + +{-|-} +onMouseUp : msg -> Attribute msg +onMouseUp msg = + on "mouseup" (Json.succeed msg) + + +{-|-} +onMouseEnter : msg -> Attribute msg +onMouseEnter msg = + on "mouseenter" (Json.succeed msg) + + +{-|-} +onMouseLeave : msg -> Attribute msg +onMouseLeave msg = + on "mouseleave" (Json.succeed msg) + + +{-|-} +onMouseOver : msg -> Attribute msg +onMouseOver msg = + on "mouseover" (Json.succeed msg) + + +{-|-} +onMouseOut : msg -> Attribute msg +onMouseOut msg = + on "mouseout" (Json.succeed msg) + + + +-- FORM EVENTS + + +{-| Capture [input](https://developer.mozilla.org/en-US/docs/Web/Events/input) +events for things like text fields or text areas. + +It grabs the **string** value at `event.target.value`, so it will not work if +you need some other type of information. For example, if you want to track +inputs on a range slider, make a custom handler with [`on`](#on). + +For more details on how `onInput` works, check out [targetValue](#targetValue). +-} +onInput : (String -> msg) -> Attribute msg +onInput tagger = + on "input" (Json.map tagger targetValue) + + +{-| Capture [change](https://developer.mozilla.org/en-US/docs/Web/Events/change) +events on checkboxes. It will grab the boolean value from `event.target.checked` +on any input event. + +Check out [targetChecked](#targetChecked) for more details on how this works. +-} +onCheck : (Bool -> msg) -> Attribute msg +onCheck tagger = + on "change" (Json.map tagger targetChecked) + + +{-| Capture a [submit](https://developer.mozilla.org/en-US/docs/Web/Events/submit) +event with [`preventDefault`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) +in order to prevent the form from changing the page’s location. If you need +different behavior, use `onWithOptions` to create a customized version of +`onSubmit`. +-} +onSubmit : msg -> Attribute msg +onSubmit msg = + onWithOptions "submit" onSubmitOptions (Json.succeed msg) + + +onSubmitOptions : Options +onSubmitOptions = + { defaultOptions | preventDefault = True } + + +-- FOCUS EVENTS + + +{-|-} +onBlur : msg -> Attribute msg +onBlur msg = + on "blur" (Json.succeed msg) + + +{-|-} +onFocus : msg -> Attribute msg +onFocus msg = + on "focus" (Json.succeed msg) + + + +-- CUSTOM EVENTS + + +{-| Create a custom event listener. Normally this will not be necessary, but +you have the power! Here is how `onClick` is defined for example: + + import Json.Decode as Json + + onClick : msg -> Attribute msg + onClick message = + on "click" (Json.succeed message) + +The first argument is the event name in the same format as with JavaScript's +[`addEventListener`][aEL] function. + +The second argument is a JSON decoder. Read more about these [here][decoder]. +When an event occurs, the decoder tries to turn the event object into an Elm +value. If successful, the value is routed to your `update` function. In the +case of `onClick` we always just succeed with the given `message`. + +If this is confusing, work through the [Elm Architecture Tutorial][tutorial]. +It really does help! + +[aEL]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener +[decoder]: http://package.elm-lang.org/packages/elm-lang/core/latest/Json-Decode +[tutorial]: https://github.com/evancz/elm-architecture-tutorial/ +-} +on : String -> Json.Decoder msg -> Attribute msg +on = + VirtualDom.on + + +{-| Same as `on` but you can set a few options. +-} +onWithOptions : String -> Options -> Json.Decoder msg -> Attribute msg +onWithOptions = + VirtualDom.onWithOptions + + +{-| Options for an event listener. If `stopPropagation` is true, it means the +event stops traveling through the DOM so it will not trigger any other event +listeners. If `preventDefault` is true, any built-in browser behavior related +to the event is prevented. For example, this is used with touch events when you +want to treat them as gestures of your own, not as scrolls. +-} +type alias Options = + { stopPropagation : Bool + , preventDefault : Bool + } + + +{-| Everything is `False` by default. + + defaultOptions = + { stopPropagation = False + , preventDefault = False + } +-} +defaultOptions : Options +defaultOptions = + VirtualDom.defaultOptions + + + +-- COMMON DECODERS + + +{-| A `Json.Decoder` for grabbing `event.target.value`. We use this to define +`onInput` as follows: + + import Json.Decode as Json + + onInput : (String -> msg) -> Attribute msg + onInput tagger = + on "input" (Json.map tagger targetValue) + +You probably will never need this, but hopefully it gives some insights into +how to make custom event handlers. +-} +targetValue : Json.Decoder String +targetValue = + Json.at ["target", "value"] Json.string + + +{-| A `Json.Decoder` for grabbing `event.target.checked`. We use this to define +`onCheck` as follows: + + import Json.Decode as Json + + onCheck : (Bool -> msg) -> Attribute msg + onCheck tagger = + on "input" (Json.map tagger targetChecked) +-} +targetChecked : Json.Decoder Bool +targetChecked = + Json.at ["target", "checked"] Json.bool + + +{-| A `Json.Decoder` for grabbing `event.keyCode`. This helps you define +keyboard listeners like this: + + import Json.Decode as Json + + onKeyUp : (Int -> msg) -> Attribute msg + onKeyUp tagger = + on "keyup" (Json.map tagger keyCode) + +**Note:** It looks like the spec is moving away from `event.keyCode` and +towards `event.key`. Once this is supported in more browsers, we may add +helpers here for `onKeyUp`, `onKeyDown`, `onKeyPress`, etc. +-} +keyCode : Json.Decoder Int +keyCode = + Json.field "keyCode" Json.int diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Keyed.elm b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Keyed.elm new file mode 100644 index 0000000..debd710 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Keyed.elm @@ -0,0 +1,48 @@ +module Html.Keyed exposing + ( node + , ol + , ul + ) +{-| A keyed node helps optimize cases where children are getting added, moved, +removed, etc. Common examples include: + + - The user can delete items from a list. + - The user can create new items in a list. + - You can sort a list based on name or date or whatever. + +When you use a keyed node, every child is paired with a string identifier. This +makes it possible for the underlying diffing algorithm to reuse nodes more +efficiently. + +# Keyed Nodes +@docs node + +# Commonly Keyed Nodes +@docs ol, ul +-} + + +import Html exposing (Attribute, Html) +import VirtualDom + + +{-| Works just like `Html.node`, but you add a unique identifier to each child +node. You want this when you have a list of nodes that is changing: adding +nodes, removing nodes, etc. In these cases, the unique identifiers help make +the DOM modifications more efficient. +-} +node : String -> List (Attribute msg) -> List ( String, Html msg ) -> Html msg +node = + VirtualDom.keyedNode + + +{-|-} +ol : List (Attribute msg) -> List ( String, Html msg ) -> Html msg +ol = + node "ol" + + +{-|-} +ul : List (Attribute msg) -> List ( String, Html msg ) -> Html msg +ul = + node "ul" diff --git a/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Lazy.elm b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Lazy.elm new file mode 100644 index 0000000..f027ffc --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/html/2.0.0/src/Html/Lazy.elm @@ -0,0 +1,48 @@ +module Html.Lazy exposing + ( lazy, lazy2, lazy3 + ) + +{-| Since all Elm functions are pure we have a guarantee that the same input +will always result in the same output. This module gives us tools to be lazy +about building `Html` that utilize this fact. + +Rather than immediately applying functions to their arguments, the `lazy` +functions just bundle the function and arguments up for later. When diffing +the old and new virtual DOM, it checks to see if all the arguments are equal. +If so, it skips calling the function! + +This is a really cheap test and often makes things a lot faster, but definitely +benchmark to be sure! + +@docs lazy, lazy2, lazy3 +-} + +import Html exposing (Html) +import VirtualDom + + +{-| A performance optimization that delays the building of virtual DOM nodes. + +Calling `(view model)` will definitely build some virtual DOM, perhaps a lot of +it. Calling `(lazy view model)` delays the call until later. During diffing, we +can check to see if `model` is referentially equal to the previous value used, +and if so, we just stop. No need to build up the tree structure and diff it, +we know if the input to `view` is the same, the output must be the same! +-} +lazy : (a -> Html msg) -> a -> Html msg +lazy = + VirtualDom.lazy + + +{-| Same as `lazy` but checks on two arguments. +-} +lazy2 : (a -> b -> Html msg) -> a -> b -> Html msg +lazy2 = + VirtualDom.lazy2 + + +{-| Same as `lazy` but checks on three arguments. +-} +lazy3 : (a -> b -> c -> Html msg) -> a -> b -> c -> Html msg +lazy3 = + VirtualDom.lazy3 diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/.gitignore new file mode 100644 index 0000000..e185314 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/.gitignore @@ -0,0 +1 @@ +elm-stuff \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/LICENSE b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/LICENSE new file mode 100644 index 0000000..737f64b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2016-present, Evan Czaplicki + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Evan Czaplicki nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/README.md b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/README.md new file mode 100644 index 0000000..a042adb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/README.md @@ -0,0 +1,57 @@ +# HTTP in Elm + +Make HTTP requests in Elm. + +```elm +import Http +import Json.Decode as Decode + + +-- GET A STRING + +getWarAndPeace : Http.Request String +getWarAndPeace = + Http.getString "https://example.com/books/war-and-peace" + + +-- GET JSON + +getMetadata : Http.Request Metadata +getMetadata = + Http.get "https://example.com/books/war-and-peace/metadata" decodeMetadata + +type alias Metadata = + { author : String + , pages : Int + } + +decodeMetadata : Decode.Decoder Metadata +decodeMetadata = + Decode.map2 Metadata + (Decode.field "author" Decode.string) + (Decode.field "pages" Decode.int) + + +-- SEND REQUESTS + +type Msg + = LoadMetadata (Result Http.Error Metadata) + +send : Cmd Msg +send = + Http.send LoadMetadata getMetadata +``` + + +## Examples + + - GET requests - [demo and code](http://elm-lang.org/examples/http) + - Download progress - [demo](https://hirafuji.com.br/elm/http-progress-example/) and [code](https://gist.github.com/pablohirafuji/fa373d07c42016756d5bca28962008c4) + + +## Learn More + +To understand how HTTP works in Elm, check out: + + - [The HTTP example in the guide](https://guide.elm-lang.org/architecture/effects/http.html) to see a simple usage with some explanation. + - [The Elm Architecture](https://guide.elm-lang.org/architecture/) to understand how HTTP fits into Elm in a more complete way. This will explain concepts like `Cmd` and `Sub` that appear in this package. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/elm-package.json new file mode 100644 index 0000000..7c6b4ae --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/elm-package.json @@ -0,0 +1,18 @@ +{ + "version": "1.0.0", + "summary": "Make HTTP requests (download progress, rate-limit, debounce, throttle)", + "repository": "https://github.com/elm-lang/http.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Http", + "Http.Progress" + ], + "native-modules": true, + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/rate-limit.md b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/rate-limit.md new file mode 100644 index 0000000..ebe049a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/rate-limit.md @@ -0,0 +1,40 @@ +## Custom Rate-Limiting Strategies + +This package has `Http.RateLimit` which helps you rate-limit the HTTP requests you make. Instead of sending one request per keystroke, you filter it down because not all requests are important. + +The `Http.RateLimit` module comes with a `debounce` strategy that covers the common case, but you may want to define a custom strategy with other characteristics. Maybe you want to send the first request. Maybe you want to send when the previous request is done instead of using timers. Etc. + +If so, you can define a custom strategy with `Http.RateLimit.customStrategy`. For example, you would define `throttle` like this: + +```elm +import Http.RateLimit as Limit + +throttle : Time -> Limit.Strategy +throttle ms = + Limit.customStrategy <| \timeNow event state -> + case event of + Limit.New _ -> + -- wait after a new request + [ Limit.WakeUpIn ms ] + + Limit.Done _ -> + -- we do not care when requests finish + [] + + Limit.WakeUp -> + case state.next of + Nothing -> + -- do nothing if there is no pending request + [] + + Just req -> + -- send if enough time has passed since the previous request + case state.prev of + Nothing -> + [ Limit.Send req.id ] + + Just prev -> + if timeNow - prev.time >= ms then [ Limit.Send req.id ] else [] +``` + +It would be nice to have some useful strategies defined in a separate package so folks can experiment and find names and implementations that work well for specific scenarios. \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http.elm b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http.elm new file mode 100644 index 0000000..d3ccf27 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http.elm @@ -0,0 +1,411 @@ +module Http exposing + ( Request, send, Error(..) + , getString, get + , post + , request + , Header, header + , Body, emptyBody, jsonBody, stringBody, multipartBody, Part, stringPart + , Expect, expectString, expectJson, expectStringResponse, Response + , encodeUri, decodeUri, toTask + ) + +{-| Create and send HTTP requests. + +# Send Requests +@docs Request, send, Error + +# GET +@docs getString, get + +# POST +@docs post + +# Custom Requests +@docs request + +## Headers +@docs Header, header + +## Request Bodies +@docs Body, emptyBody, jsonBody, stringBody, multipartBody, Part, stringPart + +## Responses +@docs Expect, expectString, expectJson, expectStringResponse, Response + +# Low-Level +@docs encodeUri, decodeUri, toTask + +-} + +import Dict exposing (Dict) +import Http.Internal +import Json.Decode as Decode +import Json.Encode as Encode +import Maybe exposing (Maybe(..)) +import Native.Http +import Platform.Cmd as Cmd exposing (Cmd) +import Result exposing (Result(..)) +import Task exposing (Task) +import Time exposing (Time) + + + +-- REQUESTS + + +{-| Describes an HTTP request. +-} +type alias Request a = + Http.Internal.Request a + + +{-| Send a `Request`. We could get the text of “War and Peace” like this: + + import Http + + type Msg = Click | NewBook (Result Http.Error String) + + update : Msg -> Model -> Model + update msg model = + case msg of + Click -> + ( model, getWarAndPeace ) + + NewBook (Ok book) -> + ... + + NewBook (Err _) -> + ... + + getWarAndPeace : Cmd Msg + getWarAndPeace = + Http.send NewBook <| + Http.getString "https://example.com/books/war-and-peace.md" +-} +send : (Result Error a -> msg) -> Request a -> Cmd msg +send resultToMessage request = + Task.attempt resultToMessage (toTask request) + + +{-| Convert a `Request` into a `Task`. This is only really useful if you want +to chain together a bunch of requests (or any other tasks) in a single command. +-} +toTask : Request a -> Task Error a +toTask (Http.Internal.Request request) = + Native.Http.toTask request Nothing + + +{-| A `Request` can fail in a couple ways: + + - `BadUrl` means you did not provide a valid URL. + - `Timeout` means it took too long to get a response. + - `NetworkError` means the user turned off their wifi, went in a cave, etc. + - `BadStatus` means you got a response back, but the [status code][sc] + indicates failure. + - `BadPayload` means you got a response back with a nice status code, but + the body of the response was something unexpected. The `String` in this + case is a debugging message that explains what went wrong with your JSON + decoder or whatever. + +[sc]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html +-} +type Error + = BadUrl String + | Timeout + | NetworkError + | BadStatus (Response String) + | BadPayload String (Response String) + + + +-- GET + + +{-| Create a `GET` request and interpret the response body as a `String`. + + import Http + + getWarAndPeace : Http.Request String + getWarAndPeace = + Http.getString "https://example.com/books/war-and-peace" +-} +getString : String -> Request String +getString url = + request + { method = "GET" + , headers = [] + , url = url + , body = emptyBody + , expect = expectString + , timeout = Nothing + , withCredentials = False + } + + +{-| Create a `GET` request and try to decode the response body from JSON to +some Elm value. + + import Http + import Json.Decode exposing (list, string) + + getBooks : Http.Request (List String) + getBooks = + Http.get "https://example.com/books" (list string) + +You can learn more about how JSON decoders work [here][] in the guide. + +[here]: https://guide.elm-lang.org/interop/json.html +-} +get : String -> Decode.Decoder a -> Request a +get url decoder = + request + { method = "GET" + , headers = [] + , url = url + , body = emptyBody + , expect = expectJson decoder + , timeout = Nothing + , withCredentials = False + } + + + +-- POST + + +{-| Create a `POST` request and try to decode the response body from JSON to +an Elm value. For example, if we want to send a POST without any data in the +request body, it would be like this: + + import Http + import Json.Decode exposing (list, string) + + postBooks : Http.Request (List String) + postBooks = + Http.post "https://example.com/books" Http.emptyBody (list string) + +See [`jsonBody`](#jsonBody) to learn how to have a more interesting request +body. And check out [this section][here] of the guide to learn more about +JSON decoders. + +[here]: https://guide.elm-lang.org/interop/json.html + +-} +post : String -> Body -> Decode.Decoder a -> Request a +post url body decoder = + request + { method = "POST" + , headers = [] + , url = url + , body = body + , expect = expectJson decoder + , timeout = Nothing + , withCredentials = False + } + + + +-- CUSTOM REQUESTS + + +{-| Create a custom request. For example, a custom PUT request would look like +this: + + put : String -> Body -> Request () + put url body = + request + { method = "PUT" + , headers = [] + , url = url + , body = body + , expect = expectStringResponse (\_ -> Ok ()) + , timeout = Nothing + , withCredentials = False + } +-} +request + : { method : String + , headers : List Header + , url : String + , body : Body + , expect : Expect a + , timeout : Maybe Time + , withCredentials : Bool + } + -> Request a +request = + Http.Internal.Request + + + +-- HEADERS + + +{-| An HTTP header for configuring requests. See a bunch of common headers +[here][]. + +[here]: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields +-} +type alias Header = Http.Internal.Header + + +{-| Create a `Header`. + + header "If-Modified-Since" "Sat 29 Oct 1994 19:43:31 GMT" + header "Max-Forwards" "10" + header "X-Requested-With" "XMLHttpRequest" + +**Note:** In the future, we may split this out into an `Http.Headers` module +and provide helpers for cases that are common on the client-side. If this +sounds nice to you, open an issue [here][] describing the helper you want and +why you need it. + +[here]: https://github.com/elm-lang/http/issues +-} +header : String -> String -> Header +header = + Http.Internal.Header + + + +-- BODY + + +{-| Represents the body of a `Request`. +-} +type alias Body = Http.Internal.Body + + +{-| Create an empty body for your `Request`. This is useful for GET requests +and POST requests where you are not sending any data. +-} +emptyBody : Body +emptyBody = + Http.Internal.EmptyBody + + +{-| Put some JSON value in the body of your `Request`. This will automatically +add the `Content-Type: application/json` header. +-} +jsonBody : Encode.Value -> Body +jsonBody value = + Http.Internal.StringBody "application/json" (Encode.encode 0 value) + + +{-| Put some string in the body of your `Request`. Defining `jsonBody` looks +like this: + + import Json.Encode as Encode + + jsonBody : Encode.Value -> Body + jsonBody value = + stringBody "application/json" (Encode.encode 0 value) + +Notice that the first argument is a [MIME type][mime] so we know to add +`Content-Type: application/json` to our request headers. Make sure your +MIME type matches your data. Some servers are strict about this! + +[mime]: https://en.wikipedia.org/wiki/Media_type +-} +stringBody : String -> String -> Body +stringBody = + Http.Internal.StringBody + + +{-| Create multi-part bodies for your `Request`, automatically adding the +`Content-Type: multipart/form-data` header. +-} +multipartBody : List Part -> Body +multipartBody = + Native.Http.multipart + + +{-| Contents of a multi-part body. Right now it only supports strings, but we +will support blobs and files when we get an API for them in Elm. +-} +type Part + = StringPart String String + + +{-| A named chunk of string data. + + body = + multipartBody + [ stringPart "user" "tom" + , stringPart "payload" "42" + ] +-} +stringPart : String -> String -> Part +stringPart = + StringPart + + + +-- RESPONSES + + +{-| Logic for interpreting a response body. +-} +type alias Expect a = + Http.Internal.Expect a + + +{-| Expect the response body to be a `String`. +-} +expectString : Expect String +expectString = + expectStringResponse (\response -> Ok response.body) + + +{-| Expect the response body to be JSON. You provide a `Decoder` to turn that +JSON into an Elm value. If the body cannot be parsed as JSON or if the JSON +does not match the decoder, the request will resolve to a `BadPayload` error. +-} +expectJson : Decode.Decoder a -> Expect a +expectJson decoder = + expectStringResponse (\response -> Decode.decodeString decoder response.body) + + +{-| Maybe you want the whole `Response`: status code, headers, body, etc. This +lets you get all of that information. From there you can use functions like +`Json.Decode.decodeString` to interpret it as JSON or whatever else you want. +-} +expectStringResponse : (Response String -> Result String a) -> Expect a +expectStringResponse = + Native.Http.expectStringResponse + + +{-| The response from a `Request`. +-} +type alias Response body = + { url : String + , status : { code : Int, message : String } + , headers : Dict String String + , body : body + } + + + +-- LOW-LEVEL + + +{-| Use this to escape query parameters. Converts characters like `/` to `%2F` +so that it does not clash with normal URL + +It work just like `encodeURIComponent` in JavaScript. +-} +encodeUri : String -> String +encodeUri = + Native.Http.encodeUri + + +{-| Use this to unescape query parameters. It converts things like `%2F` to +`/`. It can fail in some cases. For example, there is no way to unescape `%` +because it could never appear alone in a properly escaped string. + +It works just like `decodeURIComponent` in JavaScript. +-} +decodeUri : String -> Maybe String +decodeUri = + Native.Http.decodeUri + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http/Internal.elm b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http/Internal.elm new file mode 100644 index 0000000..b547302 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http/Internal.elm @@ -0,0 +1,45 @@ +module Http.Internal exposing + ( Request(..) + , RawRequest + , Expect + , Body(..) + , Header(..) + , map + ) + + +import Native.Http +import Time exposing (Time) + + + +type Request a = Request (RawRequest a) + + +type alias RawRequest a = + { method : String + , headers : List Header + , url : String + , body : Body + , expect : Expect a + , timeout : Maybe Time + , withCredentials : Bool + } + + +type Expect a = Expect + + +type Body + = EmptyBody + | StringBody String String + | FormDataBody + + + +type Header = Header String String + + +map : (a -> b) -> RawRequest a -> RawRequest b +map func request = + { request | expect = Native.Http.mapExpect func request.expect } diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http/Progress.elm b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http/Progress.elm new file mode 100644 index 0000000..c0b2a78 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Http/Progress.elm @@ -0,0 +1,200 @@ +effect module Http.Progress where { subscription = MySub } exposing + ( Progress(..) + , track + ) + +{-| Track the progress of an HTTP request. This can be useful if you are +requesting a large amount of data and want to show the user a progress bar +or something. + +Here is an example usage: [demo][] and [code][]. + +[demo]: https://hirafuji.com.br/elm/http-progress-example/ +[code]: https://gist.github.com/pablohirafuji/fa373d07c42016756d5bca28962008c4 + +**Note:** If you stop tracking progress, you cancel the request. + +# Progress +@docs Progress, track + +-} + + +import Dict +import Http +import Http.Internal exposing ( Request(Request) ) +import Task exposing (Task) +import Platform exposing (Router) +import Process + + + +-- PROGRESS + + +{-| The progress of an HTTP request. + +You start with `None`. As data starts to come in, you will see `Some`. The +`bytesExpected` field will match the `Content-Length` header, indicating how +long the response body is in bytes (8-bits). The `bytes` field indicates how +many bytes have been loaded so far, so if you want progress as a percentage, +you would say: + + Some { bytes, bytesExpected } -> + toFloat bytes / toFloat bytesExpected + +You will end up with `Fail` or `Done` depending on the success of the request. +-} +type Progress data + = None + | Some { bytes : Int, bytesExpected : Int} + | Fail Http.Error + | Done data + + + +-- TRACK + + +{-| Create a subscription that tracks the progress of an HTTP request. + +See it in action in this example: [demo][] and [code][]. + +[demo]: https://hirafuji.com.br/elm/http-progress-example/ +[code]: https://gist.github.com/pablohirafuji/fa373d07c42016756d5bca28962008c4 +-} +track : String -> (Progress data -> msg) -> Http.Request data -> Sub msg +track id toMessage (Request request) = + subscription <| Track id <| + { request = Http.Internal.map (Done >> toMessage) request + , toProgress = Some >> toMessage + , toError = Fail >> toMessage + } + + +type alias TrackedRequest msg = + { request : Http.Internal.RawRequest msg + , toProgress : { bytes : Int, bytesExpected : Int } -> msg + , toError : Http.Error -> msg + } + + +map : (a -> b) -> TrackedRequest a -> TrackedRequest b +map func { request, toProgress, toError } = + { request = Http.Internal.map func request + , toProgress = toProgress >> func + , toError = toError >> func + } + + + +-- SUBSCRIPTIONS + + +type MySub msg = + Track String (TrackedRequest msg) + + +subMap : (a -> b) -> MySub a -> MySub b +subMap func (Track id trackedRequest) = + Track id (map func trackedRequest) + + + +-- EFFECT MANAGER + + +type alias State = + Dict.Dict String Process.Id + + +init : Task Never State +init = + Task.succeed Dict.empty + + + +-- APP MESSAGES + + +onEffects : Platform.Router msg Never -> List (MySub msg) -> State -> Task Never State +onEffects router subs state = + let + subDict = + collectSubs subs + + leftStep id process (dead, ongoing, new) = + ( Process.kill process :: dead + , ongoing + , new + ) + + bothStep id process _ (dead, ongoing, new) = + ( dead + , Dict.insert id process ongoing + , new + ) + + rightStep id trackedRequest (dead, ongoing, new) = + ( dead + , ongoing + , (id, trackedRequest) :: new + ) + + (dead, ongoing, new) = + Dict.merge leftStep bothStep rightStep state subDict ([], Dict.empty, []) + in + Task.sequence dead + |> Task.andThen (\_ -> spawnRequests router new ongoing) + + +spawnRequests : Router msg Never -> List (String, TrackedRequest msg) -> State -> Task Never State +spawnRequests router trackedRequests state = + case trackedRequests of + [] -> + Task.succeed state + + (id, trackedRequest) :: others -> + Process.spawn (toTask router trackedRequest) + |> Task.andThen (\process -> spawnRequests router others (Dict.insert id process state)) + + +toTask : Router msg Never -> TrackedRequest msg -> Task Never () +toTask router { request, toProgress, toError } = + Native.Http.toTask request (Just (Platform.sendToApp router << toProgress)) + |> Task.andThen (Platform.sendToApp router) + |> Task.onError (Platform.sendToApp router << toError) + + + +-- COLLECT SUBS AS DICT + + +type alias SubDict msg = + Dict.Dict String (TrackedRequest msg) + + +collectSubs : List (MySub msg) -> SubDict msg +collectSubs subs = + List.foldl addSub Dict.empty subs + + +addSub : MySub msg -> SubDict msg -> SubDict msg +addSub (Track id trackedRequest) subDict = + let + request = + trackedRequest.request + + uid = + id ++ request.method ++ request.url + in + Dict.insert uid trackedRequest subDict + + + +-- SELF MESSAGES + + +onSelfMsg : Platform.Router msg Never -> Never -> State -> Task Never State +onSelfMsg router _ state = + Task.succeed state diff --git a/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Native/Http.js b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Native/Http.js new file mode 100644 index 0000000..9f14772 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/http/1.0.0/src/Native/Http.js @@ -0,0 +1,238 @@ +var _elm_lang$http$Native_Http = function() { + + +// ENCODING AND DECODING + +function encodeUri(string) +{ + return encodeURIComponent(string); +} + +function decodeUri(string) +{ + try + { + return _elm_lang$core$Maybe$Just(decodeURIComponent(string)); + } + catch(e) + { + return _elm_lang$core$Maybe$Nothing; + } +} + + +// SEND REQUEST + +function toTask(request, maybeProgress) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + var xhr = new XMLHttpRequest(); + + configureProgress(xhr, maybeProgress); + + xhr.addEventListener('error', function() { + callback(_elm_lang$core$Native_Scheduler.fail({ ctor: 'NetworkError' })); + }); + xhr.addEventListener('timeout', function() { + callback(_elm_lang$core$Native_Scheduler.fail({ ctor: 'Timeout' })); + }); + xhr.addEventListener('load', function() { + callback(handleResponse(xhr, request.expect.responseToResult)); + }); + + try + { + xhr.open(request.method, request.url, true); + } + catch (e) + { + return callback(_elm_lang$core$Native_Scheduler.fail({ ctor: 'BadUrl', _0: request.url })); + } + + configureRequest(xhr, request); + send(xhr, request.body); + + return function() { xhr.abort(); }; + }); +} + +function configureProgress(xhr, maybeProgress) +{ + if (maybeProgress.ctor === 'Nothing') + { + return; + } + + xhr.addEventListener('progress', function(event) { + if (!event.lengthComputable) + { + return; + } + _elm_lang$core$Native_Scheduler.rawSpawn(maybeProgress._0({ + bytes: event.loaded, + bytesExpected: event.total + })); + }); +} + +function configureRequest(xhr, request) +{ + function setHeader(pair) + { + xhr.setRequestHeader(pair._0, pair._1); + } + + A2(_elm_lang$core$List$map, setHeader, request.headers); + xhr.responseType = request.expect.responseType; + xhr.withCredentials = request.withCredentials; + + if (request.timeout.ctor === 'Just') + { + xhr.timeout = request.timeout._0; + } +} + +function send(xhr, body) +{ + switch (body.ctor) + { + case 'EmptyBody': + xhr.send(); + return; + + case 'StringBody': + xhr.setRequestHeader('Content-Type', body._0); + xhr.send(body._1); + return; + + case 'FormDataBody': + xhr.send(body._0); + return; + } +} + + +// RESPONSES + +function handleResponse(xhr, responseToResult) +{ + var response = toResponse(xhr); + + if (xhr.status < 200 || 300 <= xhr.status) + { + response.body = xhr.responseText; + return _elm_lang$core$Native_Scheduler.fail({ + ctor: 'BadStatus', + _0: response + }); + } + + var result = responseToResult(response); + + if (result.ctor === 'Ok') + { + return _elm_lang$core$Native_Scheduler.succeed(result._0); + } + else + { + response.body = xhr.responseText; + return _elm_lang$core$Native_Scheduler.fail({ + ctor: 'BadPayload', + _0: result._0, + _1: response + }); + } +} + +function toResponse(xhr) +{ + return { + status: { code: xhr.status, message: xhr.statusText }, + headers: parseHeaders(xhr.getAllResponseHeaders()), + url: xhr.responseURL, + body: xhr.response + }; +} + +function parseHeaders(rawHeaders) +{ + var headers = _elm_lang$core$Dict$empty; + + if (!rawHeaders) + { + return headers; + } + + var headerPairs = rawHeaders.split('\u000d\u000a'); + for (var i = headerPairs.length; i--; ) + { + var headerPair = headerPairs[i]; + var index = headerPair.indexOf('\u003a\u0020'); + if (index > 0) + { + var key = headerPair.substring(0, index); + var value = headerPair.substring(index + 2); + + headers = A3(_elm_lang$core$Dict$update, key, function(oldValue) { + if (oldValue.ctor === 'Just') + { + return _elm_lang$core$Maybe$Just(value + ', ' + oldValue._0); + } + return _elm_lang$core$Maybe$Just(value); + }, headers); + } + } + + return headers; +} + + +// EXPECTORS + +function expectStringResponse(responseToResult) +{ + return { + responseType: 'text', + responseToResult: responseToResult + }; +} + +function mapExpect(func, expect) +{ + return { + responseType: expect.responseType, + responseToResult: function(response) { + var convertedResponse = expect.responseToResult(response); + return A2(_elm_lang$core$Result$map, func, convertedResponse); + } + }; +} + + +// BODY + +function multipart(parts) +{ + var formData = new FormData(); + + while (parts.ctor !== '[]') + { + var part = parts._0; + formData.append(part._0, part._1); + parts = parts._1; + } + + return { ctor: 'FormDataBody', _0: formData }; +} + +return { + toTask: F2(toTask), + expectStringResponse: expectStringResponse, + mapExpect: F2(mapExpect), + multipart: multipart, + encodeUri: encodeUri, + decodeUri: decodeUri +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/.gitignore b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/.gitignore new file mode 100644 index 0000000..6b449ba --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/.gitignore @@ -0,0 +1,3 @@ +elm-stuff/ +*~ +*.html diff --git a/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/LICENSE b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/LICENSE new file mode 100644 index 0000000..272172d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2013, Max New +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + +3. Neither the name of the author nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/README.md b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/README.md new file mode 100644 index 0000000..cedf2f3 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/README.md @@ -0,0 +1,69 @@ +# Laziness in Elm + +This package provides the basic primitives for working with laziness in Elm. + + +# Motivating Example + +Maybe you have 100 different graphs you want to show at various times, each +requiring a decent amount of computation. Here are a couple ways to handle +this: + + 1. Compute everything up front. This will introduce a delay on startup, but + it should be quite fast after that. Depending on how much memory is needed + to store each graph, you may be paying a lot there as well. + + 2. Compute each graph whenever you need it. This minimizes startup cost and + uses a minimal amount of memory, but when you are flipping between two + graphs you may be running the same computations again and again. + + 3. Compute each graph whenever you need it and save the result. Again, this + makes startup as fast as possible fast, but since we save the result, + flipping between graphs becomes much quicker. As we look at more graphs + we will need to use more and more memory though. + +All of these strategies are useful in general, but the details of your +particular problem will mean that one of these ways provides the best +experience. This library makes it super easy to use strategy #3. + + +# Pitfalls + +**Laziness + Time** — +Over time, laziness can become a bad strategy. As a very simple example, think +of a timer that counts down from 10 minutes, decrementing every second. Each +step is very cheap to compute. You subtract one from the current time and store +the new time in memory, so each step has a constant cost and memory usage is +constant. Great! If you are lazy, you say “here is how you would subtract +one” and store that *entire computation* in memory. This means our memory +usage grows linearly as each second passes. When we finally need the result, we +might have 10 minutes of computation to run all at once. In the best case, this +introduces a delay that no one *really* notices. In the worst case, this +computation is actually too big to run all at once and crashes. Just like with +dishes or homework, being lazy over time can be quite destructive. + +**Laziness + Concurrency** — +When you add concurrency into the mix, you need to be even more careful with +laziness. As an example, say we are running expensive computations on three +worker threads, and the results are sent to a fourth thread just for rendering. +If our three worker threads are doing their work lazily, they +“finish” super quick and pass the entire workload onto the render +thread. All the work we put into designing this concurrent system is wasted, +everything is run sequentially on the render thread! It is just like working on +a team with lazy people. You have to pay the cost of coordinating with them, +but you end up doing all the work anyway. You are better off making things +single threaded! + + +## Learn More + +One of the most delightful uses of laziness is to create infinite streams of +values. Hopefully we can get a set of interesting challenges together so +you can run through them and get comfortable. + +For a deeper dive, Chris Okasaki's book *Purely Functional Data Structures* +and [thesis](http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf) +have interesting examples of data structures that get great +benefits from laziness, and hopefully it will provide some inspiration for the +problems you face in practice. + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/elm-package.json new file mode 100644 index 0000000..3543a47 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "2.0.0", + "summary": "Basic primitives for working with laziness", + "repository": "http://github.com/elm-lang/lazy.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Lazy" + ], + "native-modules": true, + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/src/Lazy.elm b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/src/Lazy.elm new file mode 100644 index 0000000..008e512 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/src/Lazy.elm @@ -0,0 +1,164 @@ +module Lazy exposing + ( Lazy + , force, lazy + , map, map2, map3, map4, map5 + , apply, andThen + ) + +{-| This library lets you delay a computation until later. + +# Basics +@docs Lazy, lazy, force + +# Mapping +@docs map, map2, map3, map4, map5 + +# Chaining +@docs apply, andThen +-} + +import Native.Lazy + + + +-- PRIMITIVES + + +{-| A wrapper around a value that will be lazily evaluated. -} +type Lazy a = + Lazy (() -> a) + + +{-| Delay the evaluation of a value until later. For example, maybe we will +need to generate a very long list and find its sum, but we do not want to do +it unless it is absolutely necessary. + + lazySum : Lazy Int + lazySum = + lazy (\() -> sum [1..1000000]) + +Now we only pay for `lazySum` if we actually need it. +-} +lazy : (() -> a) -> Lazy a +lazy thunk = + Lazy (Native.Lazy.memoize thunk) + + +{-| Force the evaluation of a lazy value. This means we only pay for the +computation when we need it. Here is a rather contrived example. + + lazySum : Lazy Int + lazySum = + lazy (\() -> List.sum [1..1000000]) + + sums : (Int, Int, Int) + sums = + (force lazySum, force lazySum, force lazySum) + +We are forcing this computation three times. The cool thing is that the first +time you `force` a value, the result is stored. This means you pay the cost on +the first one, but all the rest are very cheap, basically just looking up a +value in memory. +-} +force : Lazy a -> a +force (Lazy thunk) = + thunk () + + + +-- COMPOSING LAZINESS + + +{-| Lazily apply a function to a lazy value. + + lazySum : Lazy Int + lazySum = + map List.sum (lazy (\() -> [1..1000000])) + +The resulting lazy value will create a big list and sum it up when it is +finally forced. +-} +map : (a -> b) -> Lazy a -> Lazy b +map f a = + lazy (\() -> f (force a)) + + +{-| Lazily apply a function to two lazy values. + + lazySum : Lazy Int + lazySum = + lazy (\() -> List.sum [1..1000000]) + + lazySumPair : Lazy (Int, Int) + lazySumPair = + map2 (,) lazySum lazySum + +-} +map2 : (a -> b -> result) -> Lazy a -> Lazy b -> Lazy result +map2 f a b = + lazy (\() -> f (force a) (force b)) + + +{-|-} +map3 : (a -> b -> c -> result) -> Lazy a -> Lazy b -> Lazy c -> Lazy result +map3 f a b c = + lazy (\() -> f (force a) (force b) (force c)) + + +{-|-} +map4 : (a -> b -> c -> d -> result) -> Lazy a -> Lazy b -> Lazy c -> Lazy d -> Lazy result +map4 f a b c d = + lazy (\() -> f (force a) (force b) (force c) (force d)) + + +{-|-} +map5 : (a -> b -> c -> d -> e -> result) -> Lazy a -> Lazy b -> Lazy c -> Lazy d -> Lazy e -> Lazy result +map5 f a b c d e = + lazy (\() -> f (force a) (force b) (force c) (force d) (force e)) + + +{-| Lazily apply a lazy function to a lazy value. This is pretty rare on its +own, but it lets you map as high as you want. + + map3 f a b == f `map` a `apply` b `apply` c + +It is not the most beautiful, but it is equivalent and will let you create +`map9` quite easily if you really need it. +-} +apply : Lazy (a -> b) -> Lazy a -> Lazy b +apply f x = + lazy (\() -> (force f) (force x)) + + +{-| Lazily chain together lazy computations, for when you have a series of +steps that all need to be performed lazily. This can be nice when you need to +pattern match on a value, for example, when appending lazy lists: + + type List a = Empty | Node a (Lazy (List a)) + + cons : a -> Lazy (List a) -> Lazy (List a) + cons first rest = + Lazy.map (Node first) rest + + append : Lazy (List a) -> Lazy (List a) -> Lazy (List a) + append lazyList1 lazyList2 = + let + appendHelp list1 = + case list1 of + Empty -> + lazyList2 + + Node first rest -> + cons first (append rest list2)) + in + lazyList1 + |> Lazy.andThen appendHelp + + +By using `andThen` we ensure that neither `lazyList1` or `lazyList2` are forced +before they are needed. So as written, the `append` function delays the pattern +matching until later. +-} +andThen : (a -> Lazy b) -> Lazy a -> Lazy b +andThen callback a = + lazy (\() -> force (callback (force a))) diff --git a/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/src/Native/Lazy.js b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/src/Native/Lazy.js new file mode 100644 index 0000000..73fa1b0 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/lazy/2.0.0/src/Native/Lazy.js @@ -0,0 +1,20 @@ +var _elm_lang$lazy$Native_Lazy = function() { + +function memoize(thunk) +{ + var value; + var isForced = false; + return function(tuple0) { + if (!isForced) { + value = thunk(tuple0); + isForced = true; + } + return value; + }; +} + +return { + memoize: memoize +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/.gitignore b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/.gitignore new file mode 100644 index 0000000..e185314 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/.gitignore @@ -0,0 +1 @@ +elm-stuff \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/LICENSE b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/LICENSE new file mode 100644 index 0000000..24bdd38 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2016, Evan Czaplicki + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Evan Czaplicki nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/README.md b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/README.md new file mode 100644 index 0000000..a340762 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/README.md @@ -0,0 +1,21 @@ +# Navigation + +Normally when the address bar changes, the browser sends some HTTP requests to load new pages. + +This library lets you capture navigation and handle it yourself. No need to kick off a request to your servers. + + +## Examples + +Check out the `examples/` directory of this repo. The `README` there will give you more information. + + +## Context + +You want your website to load quickly, especially if many users will be on mobile phones. You also want to send as little data as possible to users, especially if they have slow internet connections or data caps. + +> For some reason, this general goal is called “Single Page Apps” or SPAs in the JavaScript world. It is odd in that the essence is that you want to manage multiple pages intelligently, and maybe “asset management” would have been clearer, but that ship has sailed. + +One important trick is to use the browser cache as much as possible. Ideally, when a user navigates to a new page, they do not make *any* HTTP requests. They have it all already. In a good case, you have most of the JS code you need already, and you just ask for a tiny bit more. + +Normally, browser navigation causes an HTTP request for some HTML. That HTML may then fetch some JavaScript and images and other stuff. By capturing navigation events (like this library does) you can skip that first HTTP request and figure out a way to get only the assets you are missing. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/elm-package.json new file mode 100644 index 0000000..2c9c2be --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "2.0.1", + "summary": "Manage browser navigation yourself (a.k.a. SPA routing, browser history)", + "repository": "http://github.com/elm-lang/navigation.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Navigation" + ], + "native-modules": true, + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/dom": "1.1.1 <= v < 2.0.0", + "elm-lang/html": "2.0.0 <= v < 3.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/Example.elm b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/Example.elm new file mode 100644 index 0000000..64bd131 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/Example.elm @@ -0,0 +1,78 @@ +import Html exposing (..) +import Html.Attributes exposing (..) +import Html.Events exposing (..) +import Navigation + + + +main = + Navigation.program UrlChange + { init = init + , view = view + , update = update + , subscriptions = (\_ -> Sub.none) + } + + + +-- MODEL + + +type alias Model = + { history : List Navigation.Location + } + + +init : Navigation.Location -> ( Model, Cmd Msg ) +init location = + ( Model [ location ] + , Cmd.none + ) + + + +-- UPDATE + + +type Msg + = UrlChange Navigation.Location + + +{- We are just storing the location in our history in this example, but +normally, you would use a package like evancz/url-parser to parse the path +or hash into nicely structured Elm values. + + + +-} +update : Msg -> Model -> (Model, Cmd Msg) +update msg model = + case msg of + UrlChange location -> + ( { model | history = location :: model.history } + , Cmd.none + ) + + + +-- VIEW + + +view : Model -> Html msg +view model = + div [] + [ h1 [] [ text "Pages" ] + , ul [] (List.map viewLink [ "bears", "cats", "dogs", "elephants", "fish" ]) + , h1 [] [ text "History" ] + , ul [] (List.map viewLocation model.history) + ] + + +viewLink : String -> Html msg +viewLink name = + li [] [ a [ href ("#" ++ name) ] [ text name ] ] + + +viewLocation : Navigation.Location -> Html msg +viewLocation location = + li [] [ text (location.pathname ++ location.hash) ] \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/README.md b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/README.md new file mode 100644 index 0000000..0d498d3 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/README.md @@ -0,0 +1,12 @@ +# Run the Examples + +To run the examples in this folder, follow the following steps: + +```bash +git clone https://github.com/elm-lang/navigation.git +cd navigation +cd examples +elm-reactor +``` + +This will navigate into the `examples/` directory and start `elm-reactor`. From here, go to [http://localhost:8000](http://localhost:8000) and start clicking on `.elm` files to see them in action. \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/elm-package.json new file mode 100644 index 0000000..70a372b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/examples/elm-package.json @@ -0,0 +1,18 @@ +{ + "version": "1.0.0", + "summary": "Examples of using the elm-lang/navigation library", + "repository": "http://github.com/user/project.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Navigation" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/html": "2.0.0 <= v < 3.0.0", + "elm-lang/navigation": "2.0.0 <= v < 3.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/src/Native/Navigation.js b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/src/Native/Navigation.js new file mode 100644 index 0000000..b4d920f --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/src/Native/Navigation.js @@ -0,0 +1,60 @@ +var _elm_lang$navigation$Native_Navigation = function() { + +function go(n) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + if (n !== 0) + { + history.go(n); + } + callback(_elm_lang$core$Native_Scheduler.succeed(_elm_lang$core$Native_Utils.Tuple0)); + }); +} + +function pushState(url) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + history.pushState({}, '', url); + callback(_elm_lang$core$Native_Scheduler.succeed(getLocation())); + }); +} + +function replaceState(url) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + history.replaceState({}, '', url); + callback(_elm_lang$core$Native_Scheduler.succeed(getLocation())); + }); +} + +function getLocation() +{ + var location = document.location; + + return { + href: location.href, + host: location.host, + hostname: location.hostname, + protocol: location.protocol, + origin: location.origin, + port_: location.port, + pathname: location.pathname, + search: location.search, + hash: location.hash, + username: location.username, + password: location.password + }; +} + + +return { + go: go, + pushState: pushState, + replaceState: replaceState, + getLocation: getLocation +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/src/Navigation.elm b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/src/Navigation.elm new file mode 100644 index 0000000..72b75c1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/navigation/2.0.1/src/Navigation.elm @@ -0,0 +1,318 @@ +effect module Navigation where { command = MyCmd, subscription = MySub } exposing + ( back, forward + , newUrl, modifyUrl + , program, programWithFlags + , Location + ) + +{-| This is a library for managing browser navigation yourself. + +The core functionality is the ability to “navigate” to new URLs, +changing the address bar of the browser *without* the browser kicking off a +request to your servers. Instead, you manage the changes yourself in Elm. + + +# Change the URL +@docs newUrl, modifyUrl + +# Navigation +@docs back, forward + +# Programs with Locations +@docs program, programWithFlags, Location + +-} + + +import Dom.LowLevel exposing (onWindow) +import Html exposing (Html) +import Json.Decode as Json +import Native.Navigation +import Process +import Task exposing (Task) + + + +-- PROGRAMS + + +{-| Same as [`Html.program`][doc], but your `update` function gets messages +whenever the URL changes. + +[doc]: http://package.elm-lang.org/packages/elm-lang/html/latest/Html#program + +The first difference is the `Location -> msg` argument. This converts a +[`Location`](#location) into a message whenever the URL changes. That message +is fed into your `update` function just like any other one. + +The second difference is that the `init` function takes `Location` as an +argument. This lets you use the URL on the first frame. + +**Note:** A location message is produced every time the URL changes. This +includes things exposed by this library, like `back` and `newUrl`, as well as +whenever the user clicks the back or forward buttons of the browsers. So if +the URL changes, you will hear about it in your `update` function. +-} +program + : (Location -> msg) + -> + { init : Location -> (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , view : model -> Html msg + , subscriptions : model -> Sub msg + } + -> Program Never model msg +program locationToMessage stuff = + let + subs model = + Sub.batch + [ subscription (Monitor locationToMessage) + , stuff.subscriptions model + ] + + init = + stuff.init (Native.Navigation.getLocation ()) + in + Html.program + { init = init + , view = stuff.view + , update = stuff.update + , subscriptions = subs + } + + +{-| Works the same as [`program`](#program), but it can also handle flags. +See [`Html.programWithFlags`][doc] for more information. + +[doc]: http://package.elm-lang.org/packages/elm-lang/html/latest/Html#programWithFlags +-} +programWithFlags + : (Location -> msg) + -> + { init : flags -> Location -> (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , view : model -> Html msg + , subscriptions : model -> Sub msg + } + -> Program flags model msg +programWithFlags locationToMessage stuff = + let + subs model = + Sub.batch + [ subscription (Monitor locationToMessage) + , stuff.subscriptions model + ] + + init flags = + stuff.init flags (Native.Navigation.getLocation ()) + in + Html.programWithFlags + { init = init + , view = stuff.view + , update = stuff.update + , subscriptions = subs + } + + + +-- TIME TRAVEL + + +{-| Go back some number of pages. So `back 1` goes back one page, and `back 2` +goes back two pages. + +**Note:** You only manage the browser history that *you* created. Think of this +library as letting you have access to a small part of the overall history. So +if you go back farther than the history you own, you will just go back to some +other website! +-} +back : Int -> Cmd msg +back n = + command (Jump -n) + + +{-| Go forward some number of pages. So `forward 1` goes forward one page, and +`forward 2` goes forward two pages. If there are no more pages in the future, +this will do nothing. + +**Note:** You only manage the browser history that *you* created. Think of this +library as letting you have access to a small part of the overall history. So +if you go forward farther than the history you own, the user will end up on +whatever website they visited next! +-} +forward : Int -> Cmd msg +forward n = + command (Jump n) + + + +-- CHANGE HISTORY + + +{-| Step to a new URL. This will add a new entry to the browser history. + +**Note:** If the user has gone `back` a few pages, there will be “future +pages” that the user can go `forward` to. Adding a new URL in that +scenario will clear out any future pages. It is like going back in time and +making a different choice. +-} +newUrl : String -> Cmd msg +newUrl url = + command (New url) + + +{-| Modify the current URL. This *will not* add a new entry to the browser +history. It just changes the one you are on right now. +-} +modifyUrl : String -> Cmd msg +modifyUrl url = + command (Modify url) + + + +-- LOCATION + + +{-| A bunch of information about the address bar. + +**Note 1:** Almost everyone will want to use a URL parsing library like +[`evancz/url-parser`][parse] to turn a `Location` into something more useful +in your `update` function. + +[parse]: https://github.com/evancz/url-parser + +**Note 2:** These fields correspond exactly with the fields of `document.location` +as described [here](https://developer.mozilla.org/en-US/docs/Web/API/Location). +-} +type alias Location = + { href : String + , host : String + , hostname : String + , protocol : String + , origin : String + , port_ : String + , pathname : String + , search : String + , hash : String + , username : String + , password : String + } + + + +-- EFFECT MANAGER + + +type MyCmd msg + = Jump Int + | New String + | Modify String + + +cmdMap : (a -> b) -> MyCmd a -> MyCmd b +cmdMap _ myCmd = + case myCmd of + Jump n -> + Jump n + + New url -> + New url + + Modify url -> + Modify url + + +type MySub msg = + Monitor (Location -> msg) + + +subMap : (a -> b) -> MySub a -> MySub b +subMap func (Monitor tagger) = + Monitor (tagger >> func) + + +(&>) task1 task2 = + Task.andThen (\_ -> task2) task1 + + +type alias State msg = + { subs : List (MySub msg) + , process : Maybe Process.Id + } + + +init : Task Never (State msg) +init = + Task.succeed (State [] Nothing) + + +onSelfMsg : Platform.Router msg Location -> Location -> State msg -> Task Never (State msg) +onSelfMsg router location state = + notify router state.subs location + &> Task.succeed state + + +onEffects : Platform.Router msg Location -> List (MyCmd msg) -> List (MySub msg) -> State msg -> Task Never (State msg) +onEffects router cmds subs {process} = + let + stepState = + case (subs, process) of + ([], Just pid) -> + Process.kill pid + &> Task.succeed (State subs Nothing) + + (_ :: _, Nothing) -> + Task.map (State subs << Just) (spawnPopState router) + + (_, _) -> + Task.succeed (State subs process) + + in + Task.sequence (List.map (cmdHelp router subs) cmds) + &> stepState + + +cmdHelp : Platform.Router msg Location -> List (MySub msg) -> MyCmd msg -> Task Never () +cmdHelp router subs cmd = + case cmd of + Jump n -> + go n + + New url -> + pushState url + |> Task.andThen (notify router subs) + + Modify url -> + replaceState url + |> Task.andThen (notify router subs) + + +notify : Platform.Router msg Location -> List (MySub msg) -> Location -> Task x () +notify router subs location = + let + send (Monitor tagger) = + Platform.sendToApp router (tagger location) + in + Task.sequence (List.map send subs) + &> Task.succeed () + + +spawnPopState : Platform.Router msg Location -> Task x Process.Id +spawnPopState router = + Process.spawn <| onWindow "popstate" Json.value <| \_ -> + Platform.sendToSelf router (Native.Navigation.getLocation ()) + + +go : Int -> Task x () +go = + Native.Navigation.go + + +pushState : String -> Task x Location +pushState = + Native.Navigation.pushState + + +replaceState : String -> Task x Location +replaceState = + Native.Navigation.replaceState diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/.gitignore b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/.gitignore new file mode 100644 index 0000000..f6a4e83 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/.gitignore @@ -0,0 +1,3 @@ +node_modules +elm-stuff +tests/build diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/.travis.yml b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/.travis.yml new file mode 100644 index 0000000..d16a59a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/.travis.yml @@ -0,0 +1,8 @@ +sudo: false +language: none +install: + - npm install --global elm@0.16.0 + - npm install + +script: + - ./tests/run-tests.sh \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/LICENSE b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/LICENSE new file mode 100644 index 0000000..0edfd04 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2016-present, Evan Czaplicki + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Evan Czaplicki nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/README.md b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/README.md new file mode 100644 index 0000000..0ff727c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/README.md @@ -0,0 +1,5 @@ +# Virtual DOM for Elm + +A virtual DOM implementation that backs Elm's core libraries for [HTML](http://package.elm-lang.org/packages/elm-lang/html/latest/) and [SVG](http://package.elm-lang.org/packages/elm-lang/svg/latest/). You should almost certainly use those higher-level libraries directly. + +It is pretty fast! You can read about that [here](http://elm-lang.org/blog/blazing-fast-html-round-two). diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/elm-package.json new file mode 100644 index 0000000..db4849c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "2.0.2", + "summary": "Core virtual DOM implementation, basis for HTML and SVG libraries", + "repository": "https://github.com/elm-lang/virtual-dom.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "VirtualDom" + ], + "native-modules": true, + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/Native/Debug.js b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/Native/Debug.js new file mode 100644 index 0000000..729f171 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/Native/Debug.js @@ -0,0 +1,280 @@ +var _elm_lang$virtual_dom$Native_Debug = function() { + + +// IMPORT / EXPORT + +function unsafeCoerce(value) +{ + return value; +} + +var upload = _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) +{ + var element = document.createElement('input'); + element.setAttribute('type', 'file'); + element.setAttribute('accept', 'text/json'); + element.style.display = 'none'; + element.addEventListener('change', function(event) + { + var fileReader = new FileReader(); + fileReader.onload = function(e) + { + callback(_elm_lang$core$Native_Scheduler.succeed(e.target.result)); + }; + fileReader.readAsText(event.target.files[0]); + document.body.removeChild(element); + }); + document.body.appendChild(element); + element.click(); +}); + +function download(historyLength, json) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + var fileName = 'history-' + historyLength + '.txt'; + var jsonString = JSON.stringify(json); + var mime = 'text/plain;charset=utf-8'; + var done = _elm_lang$core$Native_Scheduler.succeed(_elm_lang$core$Native_Utils.Tuple0); + + // for IE10+ + if (navigator.msSaveBlob) + { + navigator.msSaveBlob(new Blob([jsonString], {type: mime}), fileName); + return callback(done); + } + + // for HTML5 + var element = document.createElement('a'); + element.setAttribute('href', 'data:' + mime + ',' + encodeURIComponent(jsonString)); + element.setAttribute('download', fileName); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + callback(done); + }); +} + + +// POPOUT + +function messageToString(value) +{ + switch (typeof value) + { + case 'boolean': + return value ? 'True' : 'False'; + case 'number': + return value + ''; + case 'string': + return '"' + addSlashes(value, false) + '"'; + } + if (value instanceof String) + { + return '\'' + addSlashes(value, true) + '\''; + } + if (typeof value !== 'object' || value === null || !('ctor' in value)) + { + return '…'; + } + + var ctorStarter = value.ctor.substring(0, 5); + if (ctorStarter === '_Tupl' || ctorStarter === '_Task') + { + return '…' + } + if (['_Array', '', '_Process', '::', '[]', 'Set_elm_builtin', 'RBNode_elm_builtin', 'RBEmpty_elm_builtin'].indexOf(value.ctor) >= 0) + { + return '…'; + } + + var keys = Object.keys(value); + switch (keys.length) + { + case 1: + return value.ctor; + case 2: + return value.ctor + ' ' + messageToString(value._0); + default: + return value.ctor + ' … ' + messageToString(value[keys[keys.length - 1]]); + } +} + + +function primitive(str) +{ + return { ctor: 'Primitive', _0: str }; +} + + +function init(value) +{ + var type = typeof value; + + if (type === 'boolean') + { + return { + ctor: 'Constructor', + _0: _elm_lang$core$Maybe$Just(value ? 'True' : 'False'), + _1: true, + _2: _elm_lang$core$Native_List.Nil + }; + } + + if (type === 'number') + { + return primitive(value + ''); + } + + if (type === 'string') + { + return { ctor: 'S', _0: '"' + addSlashes(value, false) + '"' }; + } + + if (value instanceof String) + { + return { ctor: 'S', _0: "'" + addSlashes(value, true) + "'" }; + } + + if (value instanceof Date) + { + return primitive('<' + value.toString() + '>'); + } + + if (value === null) + { + return primitive('XXX'); + } + + if (type === 'object' && 'ctor' in value) + { + var ctor = value.ctor; + + if (ctor === '::' || ctor === '[]') + { + return { + ctor: 'Sequence', + _0: {ctor: 'ListSeq'}, + _1: true, + _2: A2(_elm_lang$core$List$map, init, value) + }; + } + + if (ctor === 'Set_elm_builtin') + { + return { + ctor: 'Sequence', + _0: {ctor: 'SetSeq'}, + _1: true, + _2: A3(_elm_lang$core$Set$foldr, initCons, _elm_lang$core$Native_List.Nil, value) + }; + } + + if (ctor === 'RBNode_elm_builtin' || ctor == 'RBEmpty_elm_builtin') + { + return { + ctor: 'Dictionary', + _0: true, + _1: A3(_elm_lang$core$Dict$foldr, initKeyValueCons, _elm_lang$core$Native_List.Nil, value) + }; + } + + if (ctor === '_Array') + { + return { + ctor: 'Sequence', + _0: {ctor: 'ArraySeq'}, + _1: true, + _2: A3(_elm_lang$core$Array$foldr, initCons, _elm_lang$core$Native_List.Nil, value) + }; + } + + var ctorStarter = value.ctor.substring(0, 5); + if (ctorStarter === '_Task') + { + return primitive(''); + } + + if (ctor === '') + { + return primitive(ctor); + } + + if (ctor === '_Process') + { + return primitive(''); + } + + var list = _elm_lang$core$Native_List.Nil; + for (var i in value) + { + if (i === 'ctor') continue; + list = _elm_lang$core$Native_List.Cons(init(value[i]), list); + } + return { + ctor: 'Constructor', + _0: ctorStarter === '_Tupl' ? _elm_lang$core$Maybe$Nothing : _elm_lang$core$Maybe$Just(ctor), + _1: true, + _2: _elm_lang$core$List$reverse(list) + }; + } + + if (type === 'object') + { + var dict = _elm_lang$core$Dict$empty; + for (var i in value) + { + dict = A3(_elm_lang$core$Dict$insert, i, init(value[i]), dict); + } + return { ctor: 'Record', _0: true, _1: dict }; + } + + return primitive('XXX'); +} + +var initCons = F2(initConsHelp); + +function initConsHelp(value, list) +{ + return _elm_lang$core$Native_List.Cons(init(value), list); +} + +var initKeyValueCons = F3(initKeyValueConsHelp); + +function initKeyValueConsHelp(key, value, list) +{ + return _elm_lang$core$Native_List.Cons( + _elm_lang$core$Native_Utils.Tuple2(init(key), init(value)), + list + ); +} + +function addSlashes(str, isChar) +{ + var s = str.replace(/\\/g, '\\\\') + .replace(/\n/g, '\\n') + .replace(/\t/g, '\\t') + .replace(/\r/g, '\\r') + .replace(/\v/g, '\\v') + .replace(/\0/g, '\\0'); + if (isChar) + { + return s.replace(/\'/g, '\\\''); + } + else + { + return s.replace(/\"/g, '\\"'); + } +} + + +return { + upload: upload, + download: F2(download), + unsafeCoerce: unsafeCoerce, + messageToString: messageToString, + init: init +} + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/Native/VirtualDom.js b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/Native/VirtualDom.js new file mode 100644 index 0000000..38adffb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/Native/VirtualDom.js @@ -0,0 +1,1881 @@ +var _elm_lang$virtual_dom$VirtualDom_Debug$wrap; +var _elm_lang$virtual_dom$VirtualDom_Debug$wrapWithFlags; + +var _elm_lang$virtual_dom$Native_VirtualDom = function() { + +var STYLE_KEY = 'STYLE'; +var EVENT_KEY = 'EVENT'; +var ATTR_KEY = 'ATTR'; +var ATTR_NS_KEY = 'ATTR_NS'; + +var localDoc = typeof document !== 'undefined' ? document : {}; + + +//////////// VIRTUAL DOM NODES //////////// + + +function text(string) +{ + return { + type: 'text', + text: string + }; +} + + +function node(tag) +{ + return F2(function(factList, kidList) { + return nodeHelp(tag, factList, kidList); + }); +} + + +function nodeHelp(tag, factList, kidList) +{ + var organized = organizeFacts(factList); + var namespace = organized.namespace; + var facts = organized.facts; + + var children = []; + var descendantsCount = 0; + while (kidList.ctor !== '[]') + { + var kid = kidList._0; + descendantsCount += (kid.descendantsCount || 0); + children.push(kid); + kidList = kidList._1; + } + descendantsCount += children.length; + + return { + type: 'node', + tag: tag, + facts: facts, + children: children, + namespace: namespace, + descendantsCount: descendantsCount + }; +} + + +function keyedNode(tag, factList, kidList) +{ + var organized = organizeFacts(factList); + var namespace = organized.namespace; + var facts = organized.facts; + + var children = []; + var descendantsCount = 0; + while (kidList.ctor !== '[]') + { + var kid = kidList._0; + descendantsCount += (kid._1.descendantsCount || 0); + children.push(kid); + kidList = kidList._1; + } + descendantsCount += children.length; + + return { + type: 'keyed-node', + tag: tag, + facts: facts, + children: children, + namespace: namespace, + descendantsCount: descendantsCount + }; +} + + +function custom(factList, model, impl) +{ + var facts = organizeFacts(factList).facts; + + return { + type: 'custom', + facts: facts, + model: model, + impl: impl + }; +} + + +function map(tagger, node) +{ + return { + type: 'tagger', + tagger: tagger, + node: node, + descendantsCount: 1 + (node.descendantsCount || 0) + }; +} + + +function thunk(func, args, thunk) +{ + return { + type: 'thunk', + func: func, + args: args, + thunk: thunk, + node: undefined + }; +} + +function lazy(fn, a) +{ + return thunk(fn, [a], function() { + return fn(a); + }); +} + +function lazy2(fn, a, b) +{ + return thunk(fn, [a,b], function() { + return A2(fn, a, b); + }); +} + +function lazy3(fn, a, b, c) +{ + return thunk(fn, [a,b,c], function() { + return A3(fn, a, b, c); + }); +} + + + +// FACTS + + +function organizeFacts(factList) +{ + var namespace, facts = {}; + + while (factList.ctor !== '[]') + { + var entry = factList._0; + var key = entry.key; + + if (key === ATTR_KEY || key === ATTR_NS_KEY || key === EVENT_KEY) + { + var subFacts = facts[key] || {}; + subFacts[entry.realKey] = entry.value; + facts[key] = subFacts; + } + else if (key === STYLE_KEY) + { + var styles = facts[key] || {}; + var styleList = entry.value; + while (styleList.ctor !== '[]') + { + var style = styleList._0; + styles[style._0] = style._1; + styleList = styleList._1; + } + facts[key] = styles; + } + else if (key === 'namespace') + { + namespace = entry.value; + } + else if (key === 'className') + { + var classes = facts[key]; + facts[key] = typeof classes === 'undefined' + ? entry.value + : classes + ' ' + entry.value; + } + else + { + facts[key] = entry.value; + } + factList = factList._1; + } + + return { + facts: facts, + namespace: namespace + }; +} + + + +//////////// PROPERTIES AND ATTRIBUTES //////////// + + +function style(value) +{ + return { + key: STYLE_KEY, + value: value + }; +} + + +function property(key, value) +{ + return { + key: key, + value: value + }; +} + + +function attribute(key, value) +{ + return { + key: ATTR_KEY, + realKey: key, + value: value + }; +} + + +function attributeNS(namespace, key, value) +{ + return { + key: ATTR_NS_KEY, + realKey: key, + value: { + value: value, + namespace: namespace + } + }; +} + + +function on(name, options, decoder) +{ + return { + key: EVENT_KEY, + realKey: name, + value: { + options: options, + decoder: decoder + } + }; +} + + +function equalEvents(a, b) +{ + if (!a.options === b.options) + { + if (a.stopPropagation !== b.stopPropagation || a.preventDefault !== b.preventDefault) + { + return false; + } + } + return _elm_lang$core$Native_Json.equality(a.decoder, b.decoder); +} + + +function mapProperty(func, property) +{ + if (property.key !== EVENT_KEY) + { + return property; + } + return on( + property.realKey, + property.value.options, + A2(_elm_lang$core$Json_Decode$map, func, property.value.decoder) + ); +} + + +//////////// RENDER //////////// + + +function render(vNode, eventNode) +{ + switch (vNode.type) + { + case 'thunk': + if (!vNode.node) + { + vNode.node = vNode.thunk(); + } + return render(vNode.node, eventNode); + + case 'tagger': + var subNode = vNode.node; + var tagger = vNode.tagger; + + while (subNode.type === 'tagger') + { + typeof tagger !== 'object' + ? tagger = [tagger, subNode.tagger] + : tagger.push(subNode.tagger); + + subNode = subNode.node; + } + + var subEventRoot = { tagger: tagger, parent: eventNode }; + var domNode = render(subNode, subEventRoot); + domNode.elm_event_node_ref = subEventRoot; + return domNode; + + case 'text': + return localDoc.createTextNode(vNode.text); + + case 'node': + var domNode = vNode.namespace + ? localDoc.createElementNS(vNode.namespace, vNode.tag) + : localDoc.createElement(vNode.tag); + + applyFacts(domNode, eventNode, vNode.facts); + + var children = vNode.children; + + for (var i = 0; i < children.length; i++) + { + domNode.appendChild(render(children[i], eventNode)); + } + + return domNode; + + case 'keyed-node': + var domNode = vNode.namespace + ? localDoc.createElementNS(vNode.namespace, vNode.tag) + : localDoc.createElement(vNode.tag); + + applyFacts(domNode, eventNode, vNode.facts); + + var children = vNode.children; + + for (var i = 0; i < children.length; i++) + { + domNode.appendChild(render(children[i]._1, eventNode)); + } + + return domNode; + + case 'custom': + var domNode = vNode.impl.render(vNode.model); + applyFacts(domNode, eventNode, vNode.facts); + return domNode; + } +} + + + +//////////// APPLY FACTS //////////// + + +function applyFacts(domNode, eventNode, facts) +{ + for (var key in facts) + { + var value = facts[key]; + + switch (key) + { + case STYLE_KEY: + applyStyles(domNode, value); + break; + + case EVENT_KEY: + applyEvents(domNode, eventNode, value); + break; + + case ATTR_KEY: + applyAttrs(domNode, value); + break; + + case ATTR_NS_KEY: + applyAttrsNS(domNode, value); + break; + + case 'value': + if (domNode[key] !== value) + { + domNode[key] = value; + } + break; + + default: + domNode[key] = value; + break; + } + } +} + +function applyStyles(domNode, styles) +{ + var domNodeStyle = domNode.style; + + for (var key in styles) + { + domNodeStyle[key] = styles[key]; + } +} + +function applyEvents(domNode, eventNode, events) +{ + var allHandlers = domNode.elm_handlers || {}; + + for (var key in events) + { + var handler = allHandlers[key]; + var value = events[key]; + + if (typeof value === 'undefined') + { + domNode.removeEventListener(key, handler); + allHandlers[key] = undefined; + } + else if (typeof handler === 'undefined') + { + var handler = makeEventHandler(eventNode, value); + domNode.addEventListener(key, handler); + allHandlers[key] = handler; + } + else + { + handler.info = value; + } + } + + domNode.elm_handlers = allHandlers; +} + +function makeEventHandler(eventNode, info) +{ + function eventHandler(event) + { + var info = eventHandler.info; + + var value = A2(_elm_lang$core$Native_Json.run, info.decoder, event); + + if (value.ctor === 'Ok') + { + var options = info.options; + if (options.stopPropagation) + { + event.stopPropagation(); + } + if (options.preventDefault) + { + event.preventDefault(); + } + + var message = value._0; + + var currentEventNode = eventNode; + while (currentEventNode) + { + var tagger = currentEventNode.tagger; + if (typeof tagger === 'function') + { + message = tagger(message); + } + else + { + for (var i = tagger.length; i--; ) + { + message = tagger[i](message); + } + } + currentEventNode = currentEventNode.parent; + } + } + }; + + eventHandler.info = info; + + return eventHandler; +} + +function applyAttrs(domNode, attrs) +{ + for (var key in attrs) + { + var value = attrs[key]; + if (typeof value === 'undefined') + { + domNode.removeAttribute(key); + } + else + { + domNode.setAttribute(key, value); + } + } +} + +function applyAttrsNS(domNode, nsAttrs) +{ + for (var key in nsAttrs) + { + var pair = nsAttrs[key]; + var namespace = pair.namespace; + var value = pair.value; + + if (typeof value === 'undefined') + { + domNode.removeAttributeNS(namespace, key); + } + else + { + domNode.setAttributeNS(namespace, key, value); + } + } +} + + + +//////////// DIFF //////////// + + +function diff(a, b) +{ + var patches = []; + diffHelp(a, b, patches, 0); + return patches; +} + + +function makePatch(type, index, data) +{ + return { + index: index, + type: type, + data: data, + domNode: undefined, + eventNode: undefined + }; +} + + +function diffHelp(a, b, patches, index) +{ + if (a === b) + { + return; + } + + var aType = a.type; + var bType = b.type; + + // Bail if you run into different types of nodes. Implies that the + // structure has changed significantly and it's not worth a diff. + if (aType !== bType) + { + patches.push(makePatch('p-redraw', index, b)); + return; + } + + // Now we know that both nodes are the same type. + switch (bType) + { + case 'thunk': + var aArgs = a.args; + var bArgs = b.args; + var i = aArgs.length; + var same = a.func === b.func && i === bArgs.length; + while (same && i--) + { + same = aArgs[i] === bArgs[i]; + } + if (same) + { + b.node = a.node; + return; + } + b.node = b.thunk(); + var subPatches = []; + diffHelp(a.node, b.node, subPatches, 0); + if (subPatches.length > 0) + { + patches.push(makePatch('p-thunk', index, subPatches)); + } + return; + + case 'tagger': + // gather nested taggers + var aTaggers = a.tagger; + var bTaggers = b.tagger; + var nesting = false; + + var aSubNode = a.node; + while (aSubNode.type === 'tagger') + { + nesting = true; + + typeof aTaggers !== 'object' + ? aTaggers = [aTaggers, aSubNode.tagger] + : aTaggers.push(aSubNode.tagger); + + aSubNode = aSubNode.node; + } + + var bSubNode = b.node; + while (bSubNode.type === 'tagger') + { + nesting = true; + + typeof bTaggers !== 'object' + ? bTaggers = [bTaggers, bSubNode.tagger] + : bTaggers.push(bSubNode.tagger); + + bSubNode = bSubNode.node; + } + + // Just bail if different numbers of taggers. This implies the + // structure of the virtual DOM has changed. + if (nesting && aTaggers.length !== bTaggers.length) + { + patches.push(makePatch('p-redraw', index, b)); + return; + } + + // check if taggers are "the same" + if (nesting ? !pairwiseRefEqual(aTaggers, bTaggers) : aTaggers !== bTaggers) + { + patches.push(makePatch('p-tagger', index, bTaggers)); + } + + // diff everything below the taggers + diffHelp(aSubNode, bSubNode, patches, index + 1); + return; + + case 'text': + if (a.text !== b.text) + { + patches.push(makePatch('p-text', index, b.text)); + return; + } + + return; + + case 'node': + // Bail if obvious indicators have changed. Implies more serious + // structural changes such that it's not worth it to diff. + if (a.tag !== b.tag || a.namespace !== b.namespace) + { + patches.push(makePatch('p-redraw', index, b)); + return; + } + + var factsDiff = diffFacts(a.facts, b.facts); + + if (typeof factsDiff !== 'undefined') + { + patches.push(makePatch('p-facts', index, factsDiff)); + } + + diffChildren(a, b, patches, index); + return; + + case 'keyed-node': + // Bail if obvious indicators have changed. Implies more serious + // structural changes such that it's not worth it to diff. + if (a.tag !== b.tag || a.namespace !== b.namespace) + { + patches.push(makePatch('p-redraw', index, b)); + return; + } + + var factsDiff = diffFacts(a.facts, b.facts); + + if (typeof factsDiff !== 'undefined') + { + patches.push(makePatch('p-facts', index, factsDiff)); + } + + diffKeyedChildren(a, b, patches, index); + return; + + case 'custom': + if (a.impl !== b.impl) + { + patches.push(makePatch('p-redraw', index, b)); + return; + } + + var factsDiff = diffFacts(a.facts, b.facts); + if (typeof factsDiff !== 'undefined') + { + patches.push(makePatch('p-facts', index, factsDiff)); + } + + var patch = b.impl.diff(a,b); + if (patch) + { + patches.push(makePatch('p-custom', index, patch)); + return; + } + + return; + } +} + + +// assumes the incoming arrays are the same length +function pairwiseRefEqual(as, bs) +{ + for (var i = 0; i < as.length; i++) + { + if (as[i] !== bs[i]) + { + return false; + } + } + + return true; +} + + +// TODO Instead of creating a new diff object, it's possible to just test if +// there *is* a diff. During the actual patch, do the diff again and make the +// modifications directly. This way, there's no new allocations. Worth it? +function diffFacts(a, b, category) +{ + var diff; + + // look for changes and removals + for (var aKey in a) + { + if (aKey === STYLE_KEY || aKey === EVENT_KEY || aKey === ATTR_KEY || aKey === ATTR_NS_KEY) + { + var subDiff = diffFacts(a[aKey], b[aKey] || {}, aKey); + if (subDiff) + { + diff = diff || {}; + diff[aKey] = subDiff; + } + continue; + } + + // remove if not in the new facts + if (!(aKey in b)) + { + diff = diff || {}; + diff[aKey] = + (typeof category === 'undefined') + ? (typeof a[aKey] === 'string' ? '' : null) + : + (category === STYLE_KEY) + ? '' + : + (category === EVENT_KEY || category === ATTR_KEY) + ? undefined + : + { namespace: a[aKey].namespace, value: undefined }; + + continue; + } + + var aValue = a[aKey]; + var bValue = b[aKey]; + + // reference equal, so don't worry about it + if (aValue === bValue && aKey !== 'value' + || category === EVENT_KEY && equalEvents(aValue, bValue)) + { + continue; + } + + diff = diff || {}; + diff[aKey] = bValue; + } + + // add new stuff + for (var bKey in b) + { + if (!(bKey in a)) + { + diff = diff || {}; + diff[bKey] = b[bKey]; + } + } + + return diff; +} + + +function diffChildren(aParent, bParent, patches, rootIndex) +{ + var aChildren = aParent.children; + var bChildren = bParent.children; + + var aLen = aChildren.length; + var bLen = bChildren.length; + + // FIGURE OUT IF THERE ARE INSERTS OR REMOVALS + + if (aLen > bLen) + { + patches.push(makePatch('p-remove-last', rootIndex, aLen - bLen)); + } + else if (aLen < bLen) + { + patches.push(makePatch('p-append', rootIndex, bChildren.slice(aLen))); + } + + // PAIRWISE DIFF EVERYTHING ELSE + + var index = rootIndex; + var minLen = aLen < bLen ? aLen : bLen; + for (var i = 0; i < minLen; i++) + { + index++; + var aChild = aChildren[i]; + diffHelp(aChild, bChildren[i], patches, index); + index += aChild.descendantsCount || 0; + } +} + + + +//////////// KEYED DIFF //////////// + + +function diffKeyedChildren(aParent, bParent, patches, rootIndex) +{ + var localPatches = []; + + var changes = {}; // Dict String Entry + var inserts = []; // Array { index : Int, entry : Entry } + // type Entry = { tag : String, vnode : VNode, index : Int, data : _ } + + var aChildren = aParent.children; + var bChildren = bParent.children; + var aLen = aChildren.length; + var bLen = bChildren.length; + var aIndex = 0; + var bIndex = 0; + + var index = rootIndex; + + while (aIndex < aLen && bIndex < bLen) + { + var a = aChildren[aIndex]; + var b = bChildren[bIndex]; + + var aKey = a._0; + var bKey = b._0; + var aNode = a._1; + var bNode = b._1; + + // check if keys match + + if (aKey === bKey) + { + index++; + diffHelp(aNode, bNode, localPatches, index); + index += aNode.descendantsCount || 0; + + aIndex++; + bIndex++; + continue; + } + + // look ahead 1 to detect insertions and removals. + + var aLookAhead = aIndex + 1 < aLen; + var bLookAhead = bIndex + 1 < bLen; + + if (aLookAhead) + { + var aNext = aChildren[aIndex + 1]; + var aNextKey = aNext._0; + var aNextNode = aNext._1; + var oldMatch = bKey === aNextKey; + } + + if (bLookAhead) + { + var bNext = bChildren[bIndex + 1]; + var bNextKey = bNext._0; + var bNextNode = bNext._1; + var newMatch = aKey === bNextKey; + } + + + // swap a and b + if (aLookAhead && bLookAhead && newMatch && oldMatch) + { + index++; + diffHelp(aNode, bNextNode, localPatches, index); + insertNode(changes, localPatches, aKey, bNode, bIndex, inserts); + index += aNode.descendantsCount || 0; + + index++; + removeNode(changes, localPatches, aKey, aNextNode, index); + index += aNextNode.descendantsCount || 0; + + aIndex += 2; + bIndex += 2; + continue; + } + + // insert b + if (bLookAhead && newMatch) + { + index++; + insertNode(changes, localPatches, bKey, bNode, bIndex, inserts); + diffHelp(aNode, bNextNode, localPatches, index); + index += aNode.descendantsCount || 0; + + aIndex += 1; + bIndex += 2; + continue; + } + + // remove a + if (aLookAhead && oldMatch) + { + index++; + removeNode(changes, localPatches, aKey, aNode, index); + index += aNode.descendantsCount || 0; + + index++; + diffHelp(aNextNode, bNode, localPatches, index); + index += aNextNode.descendantsCount || 0; + + aIndex += 2; + bIndex += 1; + continue; + } + + // remove a, insert b + if (aLookAhead && bLookAhead && aNextKey === bNextKey) + { + index++; + removeNode(changes, localPatches, aKey, aNode, index); + insertNode(changes, localPatches, bKey, bNode, bIndex, inserts); + index += aNode.descendantsCount || 0; + + index++; + diffHelp(aNextNode, bNextNode, localPatches, index); + index += aNextNode.descendantsCount || 0; + + aIndex += 2; + bIndex += 2; + continue; + } + + break; + } + + // eat up any remaining nodes with removeNode and insertNode + + while (aIndex < aLen) + { + index++; + var a = aChildren[aIndex]; + var aNode = a._1; + removeNode(changes, localPatches, a._0, aNode, index); + index += aNode.descendantsCount || 0; + aIndex++; + } + + var endInserts; + while (bIndex < bLen) + { + endInserts = endInserts || []; + var b = bChildren[bIndex]; + insertNode(changes, localPatches, b._0, b._1, undefined, endInserts); + bIndex++; + } + + if (localPatches.length > 0 || inserts.length > 0 || typeof endInserts !== 'undefined') + { + patches.push(makePatch('p-reorder', rootIndex, { + patches: localPatches, + inserts: inserts, + endInserts: endInserts + })); + } +} + + + +//////////// CHANGES FROM KEYED DIFF //////////// + + +var POSTFIX = '_elmW6BL'; + + +function insertNode(changes, localPatches, key, vnode, bIndex, inserts) +{ + var entry = changes[key]; + + // never seen this key before + if (typeof entry === 'undefined') + { + entry = { + tag: 'insert', + vnode: vnode, + index: bIndex, + data: undefined + }; + + inserts.push({ index: bIndex, entry: entry }); + changes[key] = entry; + + return; + } + + // this key was removed earlier, a match! + if (entry.tag === 'remove') + { + inserts.push({ index: bIndex, entry: entry }); + + entry.tag = 'move'; + var subPatches = []; + diffHelp(entry.vnode, vnode, subPatches, entry.index); + entry.index = bIndex; + entry.data.data = { + patches: subPatches, + entry: entry + }; + + return; + } + + // this key has already been inserted or moved, a duplicate! + insertNode(changes, localPatches, key + POSTFIX, vnode, bIndex, inserts); +} + + +function removeNode(changes, localPatches, key, vnode, index) +{ + var entry = changes[key]; + + // never seen this key before + if (typeof entry === 'undefined') + { + var patch = makePatch('p-remove', index, undefined); + localPatches.push(patch); + + changes[key] = { + tag: 'remove', + vnode: vnode, + index: index, + data: patch + }; + + return; + } + + // this key was inserted earlier, a match! + if (entry.tag === 'insert') + { + entry.tag = 'move'; + var subPatches = []; + diffHelp(vnode, entry.vnode, subPatches, index); + + var patch = makePatch('p-remove', index, { + patches: subPatches, + entry: entry + }); + localPatches.push(patch); + + return; + } + + // this key has already been removed or moved, a duplicate! + removeNode(changes, localPatches, key + POSTFIX, vnode, index); +} + + + +//////////// ADD DOM NODES //////////// +// +// Each DOM node has an "index" assigned in order of traversal. It is important +// to minimize our crawl over the actual DOM, so these indexes (along with the +// descendantsCount of virtual nodes) let us skip touching entire subtrees of +// the DOM if we know there are no patches there. + + +function addDomNodes(domNode, vNode, patches, eventNode) +{ + addDomNodesHelp(domNode, vNode, patches, 0, 0, vNode.descendantsCount, eventNode); +} + + +// assumes `patches` is non-empty and indexes increase monotonically. +function addDomNodesHelp(domNode, vNode, patches, i, low, high, eventNode) +{ + var patch = patches[i]; + var index = patch.index; + + while (index === low) + { + var patchType = patch.type; + + if (patchType === 'p-thunk') + { + addDomNodes(domNode, vNode.node, patch.data, eventNode); + } + else if (patchType === 'p-reorder') + { + patch.domNode = domNode; + patch.eventNode = eventNode; + + var subPatches = patch.data.patches; + if (subPatches.length > 0) + { + addDomNodesHelp(domNode, vNode, subPatches, 0, low, high, eventNode); + } + } + else if (patchType === 'p-remove') + { + patch.domNode = domNode; + patch.eventNode = eventNode; + + var data = patch.data; + if (typeof data !== 'undefined') + { + data.entry.data = domNode; + var subPatches = data.patches; + if (subPatches.length > 0) + { + addDomNodesHelp(domNode, vNode, subPatches, 0, low, high, eventNode); + } + } + } + else + { + patch.domNode = domNode; + patch.eventNode = eventNode; + } + + i++; + + if (!(patch = patches[i]) || (index = patch.index) > high) + { + return i; + } + } + + switch (vNode.type) + { + case 'tagger': + var subNode = vNode.node; + + while (subNode.type === "tagger") + { + subNode = subNode.node; + } + + return addDomNodesHelp(domNode, subNode, patches, i, low + 1, high, domNode.elm_event_node_ref); + + case 'node': + var vChildren = vNode.children; + var childNodes = domNode.childNodes; + for (var j = 0; j < vChildren.length; j++) + { + low++; + var vChild = vChildren[j]; + var nextLow = low + (vChild.descendantsCount || 0); + if (low <= index && index <= nextLow) + { + i = addDomNodesHelp(childNodes[j], vChild, patches, i, low, nextLow, eventNode); + if (!(patch = patches[i]) || (index = patch.index) > high) + { + return i; + } + } + low = nextLow; + } + return i; + + case 'keyed-node': + var vChildren = vNode.children; + var childNodes = domNode.childNodes; + for (var j = 0; j < vChildren.length; j++) + { + low++; + var vChild = vChildren[j]._1; + var nextLow = low + (vChild.descendantsCount || 0); + if (low <= index && index <= nextLow) + { + i = addDomNodesHelp(childNodes[j], vChild, patches, i, low, nextLow, eventNode); + if (!(patch = patches[i]) || (index = patch.index) > high) + { + return i; + } + } + low = nextLow; + } + return i; + + case 'text': + case 'thunk': + throw new Error('should never traverse `text` or `thunk` nodes like this'); + } +} + + + +//////////// APPLY PATCHES //////////// + + +function applyPatches(rootDomNode, oldVirtualNode, patches, eventNode) +{ + if (patches.length === 0) + { + return rootDomNode; + } + + addDomNodes(rootDomNode, oldVirtualNode, patches, eventNode); + return applyPatchesHelp(rootDomNode, patches); +} + +function applyPatchesHelp(rootDomNode, patches) +{ + for (var i = 0; i < patches.length; i++) + { + var patch = patches[i]; + var localDomNode = patch.domNode + var newNode = applyPatch(localDomNode, patch); + if (localDomNode === rootDomNode) + { + rootDomNode = newNode; + } + } + return rootDomNode; +} + +function applyPatch(domNode, patch) +{ + switch (patch.type) + { + case 'p-redraw': + return applyPatchRedraw(domNode, patch.data, patch.eventNode); + + case 'p-facts': + applyFacts(domNode, patch.eventNode, patch.data); + return domNode; + + case 'p-text': + domNode.replaceData(0, domNode.length, patch.data); + return domNode; + + case 'p-thunk': + return applyPatchesHelp(domNode, patch.data); + + case 'p-tagger': + if (typeof domNode.elm_event_node_ref !== 'undefined') + { + domNode.elm_event_node_ref.tagger = patch.data; + } + else + { + domNode.elm_event_node_ref = { tagger: patch.data, parent: patch.eventNode }; + } + return domNode; + + case 'p-remove-last': + var i = patch.data; + while (i--) + { + domNode.removeChild(domNode.lastChild); + } + return domNode; + + case 'p-append': + var newNodes = patch.data; + for (var i = 0; i < newNodes.length; i++) + { + domNode.appendChild(render(newNodes[i], patch.eventNode)); + } + return domNode; + + case 'p-remove': + var data = patch.data; + if (typeof data === 'undefined') + { + domNode.parentNode.removeChild(domNode); + return domNode; + } + var entry = data.entry; + if (typeof entry.index !== 'undefined') + { + domNode.parentNode.removeChild(domNode); + } + entry.data = applyPatchesHelp(domNode, data.patches); + return domNode; + + case 'p-reorder': + return applyPatchReorder(domNode, patch); + + case 'p-custom': + var impl = patch.data; + return impl.applyPatch(domNode, impl.data); + + default: + throw new Error('Ran into an unknown patch!'); + } +} + + +function applyPatchRedraw(domNode, vNode, eventNode) +{ + var parentNode = domNode.parentNode; + var newNode = render(vNode, eventNode); + + if (typeof newNode.elm_event_node_ref === 'undefined') + { + newNode.elm_event_node_ref = domNode.elm_event_node_ref; + } + + if (parentNode && newNode !== domNode) + { + parentNode.replaceChild(newNode, domNode); + } + return newNode; +} + + +function applyPatchReorder(domNode, patch) +{ + var data = patch.data; + + // remove end inserts + var frag = applyPatchReorderEndInsertsHelp(data.endInserts, patch); + + // removals + domNode = applyPatchesHelp(domNode, data.patches); + + // inserts + var inserts = data.inserts; + for (var i = 0; i < inserts.length; i++) + { + var insert = inserts[i]; + var entry = insert.entry; + var node = entry.tag === 'move' + ? entry.data + : render(entry.vnode, patch.eventNode); + domNode.insertBefore(node, domNode.childNodes[insert.index]); + } + + // add end inserts + if (typeof frag !== 'undefined') + { + domNode.appendChild(frag); + } + + return domNode; +} + + +function applyPatchReorderEndInsertsHelp(endInserts, patch) +{ + if (typeof endInserts === 'undefined') + { + return; + } + + var frag = localDoc.createDocumentFragment(); + for (var i = 0; i < endInserts.length; i++) + { + var insert = endInserts[i]; + var entry = insert.entry; + frag.appendChild(entry.tag === 'move' + ? entry.data + : render(entry.vnode, patch.eventNode) + ); + } + return frag; +} + + +// PROGRAMS + +var program = makeProgram(checkNoFlags); +var programWithFlags = makeProgram(checkYesFlags); + +function makeProgram(flagChecker) +{ + return F2(function(debugWrap, impl) + { + return function(flagDecoder) + { + return function(object, moduleName, debugMetadata) + { + var checker = flagChecker(flagDecoder, moduleName); + if (typeof debugMetadata === 'undefined') + { + normalSetup(impl, object, moduleName, checker); + } + else + { + debugSetup(A2(debugWrap, debugMetadata, impl), object, moduleName, checker); + } + }; + }; + }); +} + +function staticProgram(vNode) +{ + var nothing = _elm_lang$core$Native_Utils.Tuple2( + _elm_lang$core$Native_Utils.Tuple0, + _elm_lang$core$Platform_Cmd$none + ); + return A2(program, _elm_lang$virtual_dom$VirtualDom_Debug$wrap, { + init: nothing, + view: function() { return vNode; }, + update: F2(function() { return nothing; }), + subscriptions: function() { return _elm_lang$core$Platform_Sub$none; } + })(); +} + + +// FLAG CHECKERS + +function checkNoFlags(flagDecoder, moduleName) +{ + return function(init, flags, domNode) + { + if (typeof flags === 'undefined') + { + return init; + } + + var errorMessage = + 'The `' + moduleName + '` module does not need flags.\n' + + 'Initialize it with no arguments and you should be all set!'; + + crash(errorMessage, domNode); + }; +} + +function checkYesFlags(flagDecoder, moduleName) +{ + return function(init, flags, domNode) + { + if (typeof flagDecoder === 'undefined') + { + var errorMessage = + 'Are you trying to sneak a Never value into Elm? Trickster!\n' + + 'It looks like ' + moduleName + '.main is defined with `programWithFlags` but has type `Program Never`.\n' + + 'Use `program` instead if you do not want flags.' + + crash(errorMessage, domNode); + } + + var result = A2(_elm_lang$core$Native_Json.run, flagDecoder, flags); + if (result.ctor === 'Ok') + { + return init(result._0); + } + + var errorMessage = + 'Trying to initialize the `' + moduleName + '` module with an unexpected flag.\n' + + 'I tried to convert it to an Elm value, but ran into this problem:\n\n' + + result._0; + + crash(errorMessage, domNode); + }; +} + +function crash(errorMessage, domNode) +{ + if (domNode) + { + domNode.innerHTML = + '
    ' + + '

    Oops! Something went wrong when starting your Elm program.

    ' + + '
    ' + errorMessage + '
    ' + + '
    '; + } + + throw new Error(errorMessage); +} + + +// NORMAL SETUP + +function normalSetup(impl, object, moduleName, flagChecker) +{ + object['embed'] = function embed(node, flags) + { + while (node.lastChild) + { + node.removeChild(node.lastChild); + } + + return _elm_lang$core$Native_Platform.initialize( + flagChecker(impl.init, flags, node), + impl.update, + impl.subscriptions, + normalRenderer(node, impl.view) + ); + }; + + object['fullscreen'] = function fullscreen(flags) + { + return _elm_lang$core$Native_Platform.initialize( + flagChecker(impl.init, flags, document.body), + impl.update, + impl.subscriptions, + normalRenderer(document.body, impl.view) + ); + }; +} + +function normalRenderer(parentNode, view) +{ + return function(tagger, initialModel) + { + var eventNode = { tagger: tagger, parent: undefined }; + var initialVirtualNode = view(initialModel); + var domNode = render(initialVirtualNode, eventNode); + parentNode.appendChild(domNode); + return makeStepper(domNode, view, initialVirtualNode, eventNode); + }; +} + + +// STEPPER + +var rAF = + typeof requestAnimationFrame !== 'undefined' + ? requestAnimationFrame + : function(callback) { callback(); }; + +function makeStepper(domNode, view, initialVirtualNode, eventNode) +{ + var state = 'NO_REQUEST'; + var currNode = initialVirtualNode; + var nextModel; + + function updateIfNeeded() + { + switch (state) + { + case 'NO_REQUEST': + throw new Error( + 'Unexpected draw callback.\n' + + 'Please report this to .' + ); + + case 'PENDING_REQUEST': + rAF(updateIfNeeded); + state = 'EXTRA_REQUEST'; + + var nextNode = view(nextModel); + var patches = diff(currNode, nextNode); + domNode = applyPatches(domNode, currNode, patches, eventNode); + currNode = nextNode; + + return; + + case 'EXTRA_REQUEST': + state = 'NO_REQUEST'; + return; + } + } + + return function stepper(model) + { + if (state === 'NO_REQUEST') + { + rAF(updateIfNeeded); + } + state = 'PENDING_REQUEST'; + nextModel = model; + }; +} + + +// DEBUG SETUP + +function debugSetup(impl, object, moduleName, flagChecker) +{ + object['fullscreen'] = function fullscreen(flags) + { + var popoutRef = { doc: undefined }; + return _elm_lang$core$Native_Platform.initialize( + flagChecker(impl.init, flags, document.body), + impl.update(scrollTask(popoutRef)), + impl.subscriptions, + debugRenderer(moduleName, document.body, popoutRef, impl.view, impl.viewIn, impl.viewOut) + ); + }; + + object['embed'] = function fullscreen(node, flags) + { + var popoutRef = { doc: undefined }; + return _elm_lang$core$Native_Platform.initialize( + flagChecker(impl.init, flags, node), + impl.update(scrollTask(popoutRef)), + impl.subscriptions, + debugRenderer(moduleName, node, popoutRef, impl.view, impl.viewIn, impl.viewOut) + ); + }; +} + +function scrollTask(popoutRef) +{ + return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) + { + var doc = popoutRef.doc; + if (doc) + { + var msgs = doc.getElementsByClassName('debugger-sidebar-messages')[0]; + if (msgs) + { + msgs.scrollTop = msgs.scrollHeight; + } + } + callback(_elm_lang$core$Native_Scheduler.succeed(_elm_lang$core$Native_Utils.Tuple0)); + }); +} + + +function debugRenderer(moduleName, parentNode, popoutRef, view, viewIn, viewOut) +{ + return function(tagger, initialModel) + { + var appEventNode = { tagger: tagger, parent: undefined }; + var eventNode = { tagger: tagger, parent: undefined }; + + // make normal stepper + var appVirtualNode = view(initialModel); + var appNode = render(appVirtualNode, appEventNode); + parentNode.appendChild(appNode); + var appStepper = makeStepper(appNode, view, appVirtualNode, appEventNode); + + // make overlay stepper + var overVirtualNode = viewIn(initialModel)._1; + var overNode = render(overVirtualNode, eventNode); + parentNode.appendChild(overNode); + var wrappedViewIn = wrapViewIn(appEventNode, overNode, viewIn); + var overStepper = makeStepper(overNode, wrappedViewIn, overVirtualNode, eventNode); + + // make debugger stepper + var debugStepper = makeDebugStepper(initialModel, viewOut, eventNode, parentNode, moduleName, popoutRef); + + return function stepper(model) + { + appStepper(model); + overStepper(model); + debugStepper(model); + } + }; +} + +function makeDebugStepper(initialModel, view, eventNode, parentNode, moduleName, popoutRef) +{ + var curr; + var domNode; + + return function stepper(model) + { + if (!model.isDebuggerOpen) + { + return; + } + + if (!popoutRef.doc) + { + curr = view(model); + domNode = openDebugWindow(moduleName, popoutRef, curr, eventNode); + return; + } + + // switch to document of popout + localDoc = popoutRef.doc; + + var next = view(model); + var patches = diff(curr, next); + domNode = applyPatches(domNode, curr, patches, eventNode); + curr = next; + + // switch back to normal document + localDoc = document; + }; +} + +function openDebugWindow(moduleName, popoutRef, virtualNode, eventNode) +{ + var w = 900; + var h = 360; + var x = screen.width - w; + var y = screen.height - h; + var debugWindow = window.open('', '', 'width=' + w + ',height=' + h + ',left=' + x + ',top=' + y); + + // switch to window document + localDoc = debugWindow.document; + + popoutRef.doc = localDoc; + localDoc.title = 'Debugger - ' + moduleName; + localDoc.body.style.margin = '0'; + localDoc.body.style.padding = '0'; + var domNode = render(virtualNode, eventNode); + localDoc.body.appendChild(domNode); + + localDoc.addEventListener('keydown', function(event) { + if (event.metaKey && event.which === 82) + { + window.location.reload(); + } + if (event.which === 38) + { + eventNode.tagger({ ctor: 'Up' }); + event.preventDefault(); + } + if (event.which === 40) + { + eventNode.tagger({ ctor: 'Down' }); + event.preventDefault(); + } + }); + + function close() + { + popoutRef.doc = undefined; + debugWindow.close(); + } + window.addEventListener('unload', close); + debugWindow.addEventListener('unload', function() { + popoutRef.doc = undefined; + window.removeEventListener('unload', close); + eventNode.tagger({ ctor: 'Close' }); + }); + + // switch back to the normal document + localDoc = document; + + return domNode; +} + + +// BLOCK EVENTS + +function wrapViewIn(appEventNode, overlayNode, viewIn) +{ + var ignorer = makeIgnorer(overlayNode); + var blocking = 'Normal'; + var overflow; + + var normalTagger = appEventNode.tagger; + var blockTagger = function() {}; + + return function(model) + { + var tuple = viewIn(model); + var newBlocking = tuple._0.ctor; + appEventNode.tagger = newBlocking === 'Normal' ? normalTagger : blockTagger; + if (blocking !== newBlocking) + { + traverse('removeEventListener', ignorer, blocking); + traverse('addEventListener', ignorer, newBlocking); + + if (blocking === 'Normal') + { + overflow = document.body.style.overflow; + document.body.style.overflow = 'hidden'; + } + + if (newBlocking === 'Normal') + { + document.body.style.overflow = overflow; + } + + blocking = newBlocking; + } + return tuple._1; + } +} + +function traverse(verbEventListener, ignorer, blocking) +{ + switch(blocking) + { + case 'Normal': + return; + + case 'Pause': + return traverseHelp(verbEventListener, ignorer, mostEvents); + + case 'Message': + return traverseHelp(verbEventListener, ignorer, allEvents); + } +} + +function traverseHelp(verbEventListener, handler, eventNames) +{ + for (var i = 0; i < eventNames.length; i++) + { + document.body[verbEventListener](eventNames[i], handler, true); + } +} + +function makeIgnorer(overlayNode) +{ + return function(event) + { + if (event.type === 'keydown' && event.metaKey && event.which === 82) + { + return; + } + + var isScroll = event.type === 'scroll' || event.type === 'wheel'; + + var node = event.target; + while (node !== null) + { + if (node.className === 'elm-overlay-message-details' && isScroll) + { + return; + } + + if (node === overlayNode && !isScroll) + { + return; + } + node = node.parentNode; + } + + event.stopPropagation(); + event.preventDefault(); + } +} + +var mostEvents = [ + 'click', 'dblclick', 'mousemove', + 'mouseup', 'mousedown', 'mouseenter', 'mouseleave', + 'touchstart', 'touchend', 'touchcancel', 'touchmove', + 'pointerdown', 'pointerup', 'pointerover', 'pointerout', + 'pointerenter', 'pointerleave', 'pointermove', 'pointercancel', + 'dragstart', 'drag', 'dragend', 'dragenter', 'dragover', 'dragleave', 'drop', + 'keyup', 'keydown', 'keypress', + 'input', 'change', + 'focus', 'blur' +]; + +var allEvents = mostEvents.concat('wheel', 'scroll'); + + +return { + node: node, + text: text, + custom: custom, + map: F2(map), + + on: F3(on), + style: style, + property: F2(property), + attribute: F2(attribute), + attributeNS: F3(attributeNS), + mapProperty: F2(mapProperty), + + lazy: F2(lazy), + lazy2: F3(lazy2), + lazy3: F4(lazy3), + keyedNode: F3(keyedNode), + + program: program, + programWithFlags: programWithFlags, + staticProgram: staticProgram +}; + +}(); diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom.elm new file mode 100644 index 0000000..ac28926 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom.elm @@ -0,0 +1,331 @@ +module VirtualDom exposing + ( Node + , text, node + , Property, property, attribute, attributeNS, mapProperty + , style + , on, onWithOptions, Options, defaultOptions + , map + , lazy, lazy2, lazy3 + , keyedNode + , program, programWithFlags + ) + +{-| API to the core diffing algorithm. Can serve as a foundation for libraries +that expose more helper functions for HTML or SVG. + +# Create +@docs Node, text, node + +# Declare Properties and Attributes +@docs Property, property, attribute, attributeNS, mapProperty + +# Styles +@docs style + +# Events +@docs on, onWithOptions, Options, defaultOptions + +# Routing Messages +@docs map + +# Optimizations +@docs lazy, lazy2, lazy3, keyedNode + +# Programs +@docs program, programWithFlags + +-} + +import Json.Decode as Json +import Native.VirtualDom +import VirtualDom.Debug as Debug + + +{-| An immutable chunk of data representing a DOM node. This can be HTML or SVG. +-} +type Node msg = Node + + +{-| Create a DOM node with a tag name, a list of HTML properties that can +include styles and event listeners, a list of CSS properties like `color`, and +a list of child nodes. + + import Json.Encode as Json + + hello : Node msg + hello = + node "div" [] [ text "Hello!" ] + + greeting : Node msg + greeting = + node "div" + [ property "id" (Json.string "greeting") ] + [ text "Hello!" ] +-} +node : String -> List (Property msg) -> List (Node msg) -> Node msg +node = + Native.VirtualDom.node + + +{-| Just put plain text in the DOM. It will escape the string so that it appears +exactly as you specify. + + text "Hello World!" +-} +text : String -> Node msg +text = + Native.VirtualDom.text + + +{-| This function is useful when nesting components with [the Elm +Architecture](https://github.com/evancz/elm-architecture-tutorial/). It lets +you transform the messages produced by a subtree. + +Say you have a node named `button` that produces `()` values when it is +clicked. To get your model updating properly, you will probably want to tag +this `()` value like this: + + type Msg = Click | ... + + update msg model = + case msg of + Click -> + ... + + view model = + map (\_ -> Click) button + +So now all the events produced by `button` will be transformed to be of type +`Msg` so they can be handled by your update function! +-} +map : (a -> msg) -> Node a -> Node msg +map = + Native.VirtualDom.map + + + +-- PROPERTIES + + +{-| When using HTML and JS, there are two ways to specify parts of a DOM node. + + 1. Attributes — You can set things in HTML itself. So the `class` + in `
    ` is called an *attribute*. + + 2. Properties — You can also set things in JS. So the `className` + in `div.className = 'greeting'` is called a *property*. + +So the `class` attribute corresponds to the `className` property. At first +glance, perhaps this distinction is defensible, but it gets much crazier. +*There is not always a one-to-one mapping between attributes and properties!* +Yes, that is a true fact. Sometimes an attribute exists, but there is no +corresponding property. Sometimes changing an attribute does not change the +underlying property. For example, as of this writing, the `webkit-playsinline` +attribute can be used in HTML, but there is no corresponding property! +-} +type Property msg = Property + + +{-| Create arbitrary *properties*. + + import JavaScript.Encode as Json + + greeting : Html + greeting = + node "div" [ property "className" (Json.string "greeting") ] [ + text "Hello!" + ] + +Notice that you must give the *property* name, so we use `className` as it +would be in JavaScript, not `class` as it would appear in HTML. +-} +property : String -> Json.Value -> Property msg +property = + Native.VirtualDom.property + + +{-| Create arbitrary HTML *attributes*. Maps onto JavaScript’s `setAttribute` +function under the hood. + + greeting : Html + greeting = + node "div" [ attribute "class" "greeting" ] [ + text "Hello!" + ] + +Notice that you must give the *attribute* name, so we use `class` as it would +be in HTML, not `className` as it would appear in JS. +-} +attribute : String -> String -> Property msg +attribute = + Native.VirtualDom.attribute + + +{-| Would you believe that there is another way to do this?! This corresponds +to JavaScript's `setAttributeNS` function under the hood. It is doing pretty +much the same thing as `attribute` but you are able to have "namespaced" +attributes. This is used in some SVG stuff at least. +-} +attributeNS : String -> String -> String -> Property msg +attributeNS = + Native.VirtualDom.attributeNS + + +{-| Transform the messages produced by a `Property`. +-} +mapProperty : (a -> b) -> Property a -> Property b +mapProperty = + Native.VirtualDom.mapProperty + + +{-| Specify a list of styles. + + myStyle : Property msg + myStyle = + style + [ ("backgroundColor", "red") + , ("height", "90px") + , ("width", "100%") + ] + + greeting : Node msg + greeting = + node "div" [ myStyle ] [ text "Hello!" ] + +-} +style : List (String, String) -> Property msg +style = + Native.VirtualDom.style + + + +-- EVENTS + + +{-| Create a custom event listener. + + import Json.Decode as Json + + onClick : msg -> Property msg + onClick msg = + on "click" (Json.succeed msg) + +You first specify the name of the event in the same format as with JavaScript’s +`addEventListener`. Next you give a JSON decoder, which lets you pull +information out of the event object. If the decoder succeeds, it will produce +a message and route it to your `update` function. +-} +on : String -> Json.Decoder msg -> Property msg +on eventName decoder = + onWithOptions eventName defaultOptions decoder + + +{-| Same as `on` but you can set a few options. +-} +onWithOptions : String -> Options -> Json.Decoder msg -> Property msg +onWithOptions = + Native.VirtualDom.on + + +{-| Options for an event listener. If `stopPropagation` is true, it means the +event stops traveling through the DOM so it will not trigger any other event +listeners. If `preventDefault` is true, any built-in browser behavior related +to the event is prevented. For example, this is used with touch events when you +want to treat them as gestures of your own, not as scrolls. +-} +type alias Options = + { stopPropagation : Bool + , preventDefault : Bool + } + + +{-| Everything is `False` by default. + + defaultOptions = + { stopPropagation = False + , preventDefault = False + } +-} +defaultOptions : Options +defaultOptions = + { stopPropagation = False + , preventDefault = False + } + + + +-- OPTIMIZATION + + +{-| A performance optimization that delays the building of virtual DOM nodes. + +Calling `(view model)` will definitely build some virtual DOM, perhaps a lot of +it. Calling `(lazy view model)` delays the call until later. During diffing, we +can check to see if `model` is referentially equal to the previous value used, +and if so, we just stop. No need to build up the tree structure and diff it, +we know if the input to `view` is the same, the output must be the same! +-} +lazy : (a -> Node msg) -> a -> Node msg +lazy = + Native.VirtualDom.lazy + + +{-| Same as `lazy` but checks on two arguments. +-} +lazy2 : (a -> b -> Node msg) -> a -> b -> Node msg +lazy2 = + Native.VirtualDom.lazy2 + + +{-| Same as `lazy` but checks on three arguments. +-} +lazy3 : (a -> b -> c -> Node msg) -> a -> b -> c -> Node msg +lazy3 = + Native.VirtualDom.lazy3 + + +{-| Works just like `node`, but you add a unique identifier to each child +node. You want this when you have a list of nodes that is changing: adding +nodes, removing nodes, etc. In these cases, the unique identifiers help make +the DOM modifications more efficient. +-} +keyedNode : String -> List (Property msg) -> List ( String, Node msg ) -> Node msg +keyedNode = + Native.VirtualDom.keyedNode + + + +-- PROGRAMS + + +{-| Check out the docs for [`Html.App.program`][prog]. +It works exactly the same way. + +[prog]: http://package.elm-lang.org/packages/elm-lang/html/latest/Html-App#program +-} +program + : { init : (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , subscriptions : model -> Sub msg + , view : model -> Node msg + } + -> Program Never model msg +program impl = + Native.VirtualDom.program Debug.wrap impl + + +{-| Check out the docs for [`Html.App.programWithFlags`][prog]. +It works exactly the same way. + +[prog]: http://package.elm-lang.org/packages/elm-lang/html/latest/Html-App#programWithFlags +-} +programWithFlags + : { init : flags -> (model, Cmd msg) + , update : msg -> model -> (model, Cmd msg) + , subscriptions : model -> Sub msg + , view : model -> Node msg + } + -> Program flags model msg +programWithFlags impl = + Native.VirtualDom.programWithFlags Debug.wrapWithFlags impl + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Debug.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Debug.elm new file mode 100644 index 0000000..ba7afe5 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Debug.elm @@ -0,0 +1,567 @@ +module VirtualDom.Debug exposing (wrap, wrapWithFlags) + +import Json.Decode as Decode +import Json.Encode as Encode +import Task exposing (Task) +import Native.Debug +import Native.VirtualDom +import VirtualDom.Expando as Expando exposing (Expando) +import VirtualDom.Helpers as VDom exposing (Node) +import VirtualDom.History as History exposing (History) +import VirtualDom.Metadata as Metadata exposing (Metadata) +import VirtualDom.Overlay as Overlay +import VirtualDom.Report as Report + + + +-- WRAP PROGRAMS + + +wrap metadata { init, update, subscriptions, view } = + { init = wrapInit metadata init + , view = wrapView view + , update = wrapUpdate update + , viewIn = viewIn + , viewOut = viewOut + , subscriptions = wrapSubs subscriptions + } + + +wrapWithFlags metadata { init, update, subscriptions, view } = + { init = \flags -> wrapInit metadata (init flags) + , view = wrapView view + , update = wrapUpdate update + , viewIn = viewIn + , viewOut = viewOut + , subscriptions = wrapSubs subscriptions + } + + + +-- MODEL + + +type alias Model model msg = + { history : History model msg + , state : State model + , expando : Expando + , metadata : Result Metadata.Error Metadata + , overlay : Overlay.State + , isDebuggerOpen : Bool + } + + +type State model + = Running model + | Paused Int model model + + +wrapInit : Encode.Value -> ( model, Cmd msg ) -> ( Model model msg, Cmd (Msg msg) ) +wrapInit metadata ( userModel, userCommands ) = + { history = History.empty userModel + , state = Running userModel + , expando = Expando.init userModel + , metadata = Metadata.decode metadata + , overlay = Overlay.none + , isDebuggerOpen = False + } + ! [ Cmd.map UserMsg userCommands ] + + + +-- UPDATE + + +type Msg msg + = NoOp + | UserMsg msg + | ExpandoMsg Expando.Msg + | Resume + | Jump Int + | Open + | Close + | Up + | Down + | Import + | Export + | Upload String + | OverlayMsg Overlay.Msg + + +type alias UserUpdate model msg = + msg -> model -> ( model, Cmd msg ) + + +wrapUpdate + : UserUpdate model msg + -> Task Never () + -> Msg msg + -> Model model msg + -> (Model model msg, Cmd (Msg msg)) +wrapUpdate userUpdate scrollTask msg model = + case msg of + NoOp -> + model ! [] + + UserMsg userMsg -> + updateUserMsg userUpdate scrollTask userMsg model + + ExpandoMsg eMsg -> + { model + | expando = Expando.update eMsg model.expando + } + ! [] + + Resume -> + case model.state of + Running _ -> + model ! [] + + Paused _ _ userModel -> + { model + | state = Running userModel + , expando = Expando.merge userModel model.expando + } + ! [ runIf model.isDebuggerOpen scrollTask ] + + Jump index -> + let + (indexModel, indexMsg) = + History.get userUpdate index model.history + in + { model + | state = Paused index indexModel (getLatestModel model.state) + , expando = Expando.merge indexModel model.expando + } + ! [] + + Open -> + { model | isDebuggerOpen = True } ! [] + + Close -> + { model | isDebuggerOpen = False } ! [] + + Up -> + let + index = + case model.state of + Paused index _ _ -> + index + + Running _ -> + History.size model.history + in + if index > 0 then + wrapUpdate userUpdate scrollTask (Jump (index - 1)) model + else + model ! [] + + Down -> + case model.state of + Running _ -> + model ! [] + + Paused index _ userModel -> + if index == History.size model.history - 1 then + wrapUpdate userUpdate scrollTask Resume model + else + wrapUpdate userUpdate scrollTask (Jump (index + 1)) model + + Import -> + withGoodMetadata model <| \_ -> + model ! [ upload ] + + Export -> + withGoodMetadata model <| \metadata -> + model ! [ download metadata model.history ] + + Upload jsonString -> + withGoodMetadata model <| \metadata -> + case Overlay.assessImport metadata jsonString of + Err newOverlay -> + { model | overlay = newOverlay } ! [] + + Ok rawHistory -> + loadNewHistory rawHistory userUpdate model + + OverlayMsg overlayMsg -> + case Overlay.close overlayMsg model.overlay of + Nothing -> + { model | overlay = Overlay.none } ! [] + + Just rawHistory -> + loadNewHistory rawHistory userUpdate model + + + +-- COMMANDS + + +upload : Cmd (Msg msg) +upload = + Task.perform Upload Native.Debug.upload + + +download : Metadata -> History model msg -> Cmd (Msg msg) +download metadata history = + let + historyLength = + History.size history + + json = + Encode.object + [ ("metadata", Metadata.encode metadata) + , ("history", History.encode history) + ] + in + Task.perform (\_ -> NoOp) (Native.Debug.download historyLength json) + + + +-- UPDATE OVERLAY + + +withGoodMetadata + : Model model msg + -> (Metadata -> (Model model msg, Cmd (Msg msg))) + -> (Model model msg, Cmd (Msg msg)) +withGoodMetadata model func = + case model.metadata of + Ok metadata -> + func metadata + + Err error -> + { model | overlay = Overlay.badMetadata error } ! [] + + +loadNewHistory + : Encode.Value + -> UserUpdate model msg + -> Model model msg + -> ( Model model msg, Cmd (Msg msg) ) +loadNewHistory rawHistory userUpdate model = + let + initialUserModel = + History.initialModel model.history + + pureUserUpdate msg userModel = + Tuple.first (userUpdate msg userModel) + + decoder = + History.decoder initialUserModel pureUserUpdate + in + case Decode.decodeValue decoder rawHistory of + Err _ -> + { model | overlay = Overlay.corruptImport } ! [] + + Ok (latestUserModel, newHistory) -> + { model + | history = newHistory + , state = Running latestUserModel + , expando = Expando.init latestUserModel + , overlay = Overlay.none + } + ! [] + + + +-- UPDATE - USER MESSAGES + + +updateUserMsg + : UserUpdate model msg + -> Task Never () + -> msg + -> Model model msg + -> (Model model msg, Cmd (Msg msg)) +updateUserMsg userUpdate scrollTask userMsg ({ history, state, expando } as model) = + let + userModel = + getLatestModel state + + newHistory = + History.add userMsg userModel history + + (newUserModel, userCmds) = + userUpdate userMsg userModel + + commands = + Cmd.map UserMsg userCmds + in + case state of + Running _ -> + { model + | history = newHistory + , state = Running newUserModel + , expando = Expando.merge newUserModel expando + } + ! [ commands, runIf model.isDebuggerOpen scrollTask ] + + Paused index indexModel _ -> + { model + | history = newHistory + , state = Paused index indexModel newUserModel + } + ! [ commands ] + + +runIf : Bool -> Task Never () -> Cmd (Msg msg) +runIf bool task = + if bool then + Task.perform (always NoOp) task + else + Cmd.none + + +getLatestModel : State model -> model +getLatestModel state = + case state of + Running model -> + model + + Paused _ _ model -> + model + + + +-- SUBSCRIPTIONS + + +wrapSubs : (model -> Sub msg) -> Model model msg -> Sub (Msg msg) +wrapSubs userSubscriptions {state} = + getLatestModel state + |> userSubscriptions + |> Sub.map UserMsg + + + +-- VIEW + + +wrapView : (model -> Node msg) -> Model model msg -> Node (Msg msg) +wrapView userView { state } = + let + currentModel = + case state of + Running model -> + model + + Paused _ oldModel _ -> + oldModel + in + VDom.map UserMsg (userView currentModel) + + + +-- SMALL DEBUG VIEW + + +viewIn : Model model msg -> ( Overlay.Block, Node (Msg msg) ) +viewIn { history, state, overlay, isDebuggerOpen } = + let + isPaused = + case state of + Running _ -> + False + + Paused _ _ _ -> + True + in + Overlay.view overlayConfig isPaused isDebuggerOpen (History.size history) overlay + + +overlayConfig : Overlay.Config (Msg msg) +overlayConfig = + { resume = Resume + , open = Open + , importHistory = Import + , exportHistory = Export + , wrap = OverlayMsg + } + + + +-- BIG DEBUG VIEW + + +viewOut : Model model msg -> Node (Msg msg) +viewOut { history, state, expando } = + VDom.div + [ VDom.id "debugger" ] + [ styles + , viewSidebar state history + , VDom.map ExpandoMsg <| + VDom.div [ VDom.id "values" ] [ Expando.view Nothing expando ] + ] + + +viewSidebar : State model -> History model msg -> Node (Msg msg) +viewSidebar state history = + let + maybeIndex = + case state of + Running _ -> + Nothing + + Paused index _ _ -> + Just index + in + VDom.div [ VDom.class "debugger-sidebar" ] + [ VDom.map Jump (History.view maybeIndex history) + , playButton maybeIndex + ] + + +playButton : Maybe Int -> Node (Msg msg) +playButton maybeIndex = + VDom.div [ VDom.class "debugger-sidebar-controls" ] + [ viewResumeButton maybeIndex + , VDom.div [ VDom.class "debugger-sidebar-controls-import-export" ] + [ button Import "Import" + , VDom.text " / " + , button Export "Export" + ] + ] + + +button msg label = + VDom.span + [ VDom.onClick msg + , VDom.style [("cursor","pointer")] + ] + [ VDom.text label ] + + +viewResumeButton maybeIndex = + case maybeIndex of + Nothing -> + VDom.text "" + + Just _ -> + resumeButton + + +resumeButton = + VDom.div + [ VDom.onClick Resume + , VDom.class "debugger-sidebar-controls-resume" + ] + [ VDom.text "Resume" + ] + + + +-- STYLE + + +styles : Node msg +styles = + VDom.node "style" [] [ VDom.text """ + +html { + overflow: hidden; + height: 100%; +} + +body { + height: 100%; + overflow: auto; +} + +#debugger { + width: 100% + height: 100%; + font-family: monospace; +} + +#values { + display: block; + float: left; + height: 100%; + width: calc(100% - 30ch); + margin: 0; + overflow: auto; + cursor: default; +} + +.debugger-sidebar { + display: block; + float: left; + width: 30ch; + height: 100%; + color: white; + background-color: rgb(61, 61, 61); +} + +.debugger-sidebar-controls { + width: 100%; + text-align: center; + background-color: rgb(50, 50, 50); +} + +.debugger-sidebar-controls-import-export { + width: 100%; + height: 24px; + line-height: 24px; + font-size: 12px; +} + +.debugger-sidebar-controls-resume { + width: 100%; + height: 30px; + line-height: 30px; + cursor: pointer; +} + +.debugger-sidebar-controls-resume:hover { + background-color: rgb(41, 41, 41); +} + +.debugger-sidebar-messages { + width: 100%; + overflow-y: auto; + height: calc(100% - 24px); +} + +.debugger-sidebar-messages-paused { + width: 100%; + overflow-y: auto; + height: calc(100% - 54px); +} + +.messages-entry { + cursor: pointer; + width: 100%; +} + +.messages-entry:hover { + background-color: rgb(41, 41, 41); +} + +.messages-entry-selected, .messages-entry-selected:hover { + background-color: rgb(10, 10, 10); +} + +.messages-entry-content { + width: calc(100% - 7ch); + padding-top: 4px; + padding-bottom: 4px; + padding-left: 1ch; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: inline-block; +} + +.messages-entry-index { + color: #666; + width: 5ch; + padding-top: 4px; + padding-bottom: 4px; + padding-right: 1ch; + text-align: right; + display: block; + float: right; +} + +""" ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Expando.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Expando.elm new file mode 100644 index 0000000..88b5857 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Expando.elm @@ -0,0 +1,659 @@ +module VirtualDom.Expando exposing + ( Expando + , init + , merge + , Msg, update + , view + ) + + +import Dict exposing (Dict) +import Json.Decode as Json +import Native.Debug +import VirtualDom.Helpers as VDom exposing (Node, text, div, span, class, onClick) + + + +-- MODEL + + +type Expando + = S String + | Primitive String + | Sequence SeqType Bool (List Expando) + | Dictionary Bool (List (Expando, Expando)) + | Record Bool (Dict String Expando) + | Constructor (Maybe String) Bool (List Expando) + + +type SeqType = ListSeq | SetSeq | ArraySeq + + +seqTypeToString : Int -> SeqType -> String +seqTypeToString n seqType = + case seqType of + ListSeq -> + "List(" ++ toString n ++ ")" + + SetSeq -> + "Set(" ++ toString n ++ ")" + + ArraySeq -> + "Array(" ++ toString n ++ ")" + + + +-- INITIALIZE + + +init : a -> Expando +init value = + initHelp True (Native.Debug.init value) + + +initHelp : Bool -> Expando -> Expando +initHelp isOuter expando = + case expando of + S _ -> + expando + + Primitive _ -> + expando + + Sequence seqType isClosed items -> + if isOuter then + Sequence seqType False (List.map (initHelp False) items) + else if List.length items <= 8 then + Sequence seqType False items + else + expando + + Dictionary isClosed keyValuePairs -> + if isOuter then + Dictionary False (List.map (\(k,v) -> (k, initHelp False v)) keyValuePairs) + else if List.length keyValuePairs <= 8 then + Dictionary False keyValuePairs + else + expando + + Record isClosed entries -> + if isOuter then + Record False (Dict.map (\_ v -> initHelp False v) entries) + else if Dict.size entries <= 4 then + Record False entries + else + expando + + Constructor maybeName isClosed args -> + if isOuter then + Constructor maybeName False (List.map (initHelp False) args) + else if List.length args <= 4 then + Constructor maybeName False args + else + expando + + + +-- PRESERVE OLD EXPANDO STATE (open/closed) + + +merge : a -> Expando -> Expando +merge value expando = + mergeHelp expando (Native.Debug.init value) + + +mergeHelp : Expando -> Expando -> Expando +mergeHelp old new = + case ( old, new ) of + ( _, S _ ) -> + new + + ( _, Primitive _ ) -> + new + + ( Sequence _ isClosed oldValues, Sequence seqType _ newValues ) -> + Sequence seqType isClosed (mergeListHelp oldValues newValues) + + ( Dictionary isClosed _, Dictionary _ keyValuePairs ) -> + Dictionary isClosed keyValuePairs + + ( Record isClosed oldDict, Record _ newDict ) -> + Record isClosed <| Dict.map (mergeDictHelp oldDict) newDict + + ( Constructor _ isClosed oldValues, Constructor maybeName _ newValues ) -> + Constructor maybeName isClosed (mergeListHelp oldValues newValues) + + _ -> + new + + +mergeListHelp : List Expando -> List Expando -> List Expando +mergeListHelp olds news = + case (olds, news) of + ( [], _ ) -> + news + + ( _, [] ) -> + news + + ( x :: xs, y :: ys ) -> + mergeHelp x y :: mergeListHelp xs ys + + +mergeDictHelp : Dict String Expando -> String -> Expando -> Expando +mergeDictHelp oldDict key value = + case Dict.get key oldDict of + Nothing -> + value + + Just oldValue -> + mergeHelp oldValue value + + + +-- UPDATE + + +type Msg + = Toggle + | Index Redirect Int Msg + | Field String Msg + + +type Redirect = None | Key | Value + + +update : Msg -> Expando -> Expando +update msg value = + case value of + S _ -> + Debug.crash "No messages for primitives" + + Primitive _ -> + Debug.crash "No messages for primitives" + + Sequence seqType isClosed valueList -> + case msg of + Toggle -> + Sequence seqType (not isClosed) valueList + + Index None index subMsg -> + Sequence seqType isClosed <| + updateIndex index (update subMsg) valueList + + Index _ _ _ -> + Debug.crash "No redirected indexes on sequences" + + Field _ _ -> + Debug.crash "No field on sequences" + + Dictionary isClosed keyValuePairs -> + case msg of + Toggle -> + Dictionary (not isClosed) keyValuePairs + + Index redirect index subMsg -> + case redirect of + None -> + Debug.crash "must have redirect for dictionaries" + + Key -> + Dictionary isClosed <| + updateIndex index (\(k,v) -> (update subMsg k, v)) keyValuePairs + + Value -> + Dictionary isClosed <| + updateIndex index (\(k,v) -> (k, update subMsg v)) keyValuePairs + + Field _ _ -> + Debug.crash "no field for dictionaries" + + Record isClosed valueDict -> + case msg of + Toggle -> + Record (not isClosed) valueDict + + Index _ _ _ -> + Debug.crash "No index for records" + + Field field subMsg -> + Record isClosed (Dict.update field (updateField subMsg) valueDict) + + Constructor maybeName isClosed valueList -> + case msg of + Toggle -> + Constructor maybeName (not isClosed) valueList + + Index None index subMsg -> + Constructor maybeName isClosed <| + updateIndex index (update subMsg) valueList + + Index _ _ _ -> + Debug.crash "No redirected indexes on sequences" + + Field _ _ -> + Debug.crash "No field for constructors" + + +updateIndex : Int -> (a -> a) -> List a -> List a +updateIndex n func list = + case list of + [] -> + [] + + x :: xs -> + if n <= 0 then + func x :: xs + else + x :: updateIndex (n-1) func xs + + +updateField : Msg -> Maybe Expando -> Maybe Expando +updateField msg maybeExpando = + case maybeExpando of + Nothing -> + Debug.crash "key does not exist" + + Just expando -> + Just (update msg expando) + + + +-- VIEW + + +view : Maybe String -> Expando -> Node Msg +view maybeKey expando = + case expando of + S stringRep -> + div [ leftPad maybeKey ] (lineStarter maybeKey Nothing [span [red] [text stringRep]]) + + Primitive stringRep -> + div [ leftPad maybeKey ] (lineStarter maybeKey Nothing [span [blue] [text stringRep]]) + + Sequence seqType isClosed valueList -> + viewSequence maybeKey seqType isClosed valueList + + Dictionary isClosed keyValuePairs -> + viewDictionary maybeKey isClosed keyValuePairs + + Record isClosed valueDict -> + viewRecord maybeKey isClosed valueDict + + Constructor maybeName isClosed valueList -> + viewConstructor maybeKey maybeName isClosed valueList + + + +-- VIEW SEQUENCE + + +viewSequence : Maybe String -> SeqType -> Bool -> List Expando -> Node Msg +viewSequence maybeKey seqType isClosed valueList = + let + starter = + seqTypeToString (List.length valueList) seqType + in + div [ leftPad maybeKey ] + [ div [ onClick Toggle ] (lineStarter maybeKey (Just isClosed) [text starter]) + , if isClosed then text "" else viewSequenceOpen valueList + ] + + +viewSequenceOpen : List Expando -> Node Msg +viewSequenceOpen values = + div [] (List.indexedMap viewConstructorEntry values) + + + +-- VIEW DICTIONARY + + +viewDictionary : Maybe String -> Bool -> List (Expando, Expando) -> Node Msg +viewDictionary maybeKey isClosed keyValuePairs = + let + starter = + "Dict(" ++ toString (List.length keyValuePairs) ++ ")" + in + div [ leftPad maybeKey ] + [ div [ onClick Toggle ] (lineStarter maybeKey (Just isClosed) [text starter]) + , if isClosed then text "" else viewDictionaryOpen keyValuePairs + ] + + +viewDictionaryOpen : List (Expando, Expando) -> Node Msg +viewDictionaryOpen keyValuePairs = + div [] (List.indexedMap viewDictionaryEntry keyValuePairs) + + +viewDictionaryEntry : Int -> (Expando, Expando) -> Node Msg +viewDictionaryEntry index (key, value) = + case key of + S stringRep -> + VDom.map (Index Value index) (view (Just stringRep) value) + + Primitive stringRep -> + VDom.map (Index Value index) (view (Just stringRep) value) + + _ -> + div [] + [ VDom.map (Index Key index) (view (Just "key") key) + , VDom.map (Index Value index) (view (Just "value") value) + ] + + + +-- VIEW RECORD + + +viewRecord : Maybe String -> Bool -> Dict String Expando -> Node Msg +viewRecord maybeKey isClosed record = + let + (start, middle, end) = + if isClosed then + ( Tuple.second (viewTinyRecord record), text "", text "" ) + else + ( [ text "{" ], viewRecordOpen record, div [leftPad (Just ())] [text "}"] ) + in + div [ leftPad maybeKey ] + [ div [ onClick Toggle ] (lineStarter maybeKey (Just isClosed) start) + , middle + , end + ] + + +viewRecordOpen : Dict String Expando -> Node Msg +viewRecordOpen record = + div [] (List.map viewRecordEntry (Dict.toList record)) + + +viewRecordEntry : (String, Expando) -> Node Msg +viewRecordEntry (field, value) = + VDom.map (Field field) (view (Just field) value) + + + +-- VIEW CONSTRUCTOR + + +viewConstructor : Maybe String -> Maybe String -> Bool -> List Expando -> Node Msg +viewConstructor maybeKey maybeName isClosed valueList = + let + tinyArgs = + List.map (Tuple.second << viewExtraTiny) valueList + + description = + case (maybeName, tinyArgs) of + (Nothing, []) -> + [ text "()" ] + + (Nothing, x :: xs) -> + text "( " + :: span [] x + :: List.foldr (\args rest -> text ", " :: span [] args :: rest) [text " )"] xs + + (Just name, []) -> + [ text name ] + + (Just name, x :: xs) -> + text (name ++ " ") + :: span [] x + :: List.foldr (\args rest -> text " " :: span [] args :: rest) [] xs + + (maybeIsClosed, openHtml) = + case valueList of + [] -> + ( Nothing, div [] [] ) + + [entry] -> + case entry of + S _ -> + ( Nothing, div [] [] ) + + Primitive _ -> + ( Nothing, div [] [] ) + + Sequence _ _ subValueList -> + ( Just isClosed + , if isClosed then div [] [] else VDom.map (Index None 0) (viewSequenceOpen subValueList) + ) + + Dictionary _ keyValuePairs -> + ( Just isClosed + , if isClosed then div [] [] else VDom.map (Index None 0) (viewDictionaryOpen keyValuePairs) + ) + + Record _ record -> + ( Just isClosed + , if isClosed then div [] [] else VDom.map (Index None 0) (viewRecordOpen record) + ) + + Constructor _ _ subValueList -> + ( Just isClosed + , if isClosed then div [] [] else VDom.map (Index None 0) (viewConstructorOpen subValueList) + ) + + _ -> + ( Just isClosed + , if isClosed then div [] [] else viewConstructorOpen valueList + ) + in + div [ leftPad maybeKey ] + [ div [ onClick Toggle ] (lineStarter maybeKey maybeIsClosed description) + , openHtml + ] + + +viewConstructorOpen : List Expando -> Node Msg +viewConstructorOpen valueList = + div [] (List.indexedMap viewConstructorEntry valueList) + + +viewConstructorEntry : Int -> Expando -> Node Msg +viewConstructorEntry index value = + VDom.map (Index None index) (view (Just (toString index)) value) + + + +-- VIEW TINY + + +viewTiny : Expando -> ( Int, List (Node msg) ) +viewTiny value = + case value of + S stringRep -> + let + str = + elideMiddle stringRep + in + ( String.length str + , [ span [red] [text str] ] + ) + + Primitive stringRep -> + ( String.length stringRep + , [ span [blue] [text stringRep] ] + ) + + Sequence seqType _ valueList -> + viewTinyHelp <| + seqTypeToString (List.length valueList) seqType + + Dictionary _ keyValuePairs -> + viewTinyHelp <| + "Dict(" ++ toString (List.length keyValuePairs) ++ ")" + + Record _ record -> + viewTinyRecord record + + Constructor maybeName _ [] -> + viewTinyHelp <| + Maybe.withDefault "Unit" maybeName + + Constructor maybeName _ valueList -> + viewTinyHelp <| + case maybeName of + Nothing -> + "Tuple(" ++ toString (List.length valueList) ++ ")" + + Just name -> + name ++ " …" + + +viewTinyHelp : String -> ( Int, List (Node msg) ) +viewTinyHelp str = + ( String.length str, [text str] ) + + +elideMiddle : String -> String +elideMiddle str = + if String.length str <= 18 then + str + + else + String.left 8 str ++ "..." ++ String.right 8 str + + + +-- VIEW TINY RECORDS + + +viewTinyRecord : Dict String Expando -> ( Int, List (Node msg) ) +viewTinyRecord record = + if Dict.isEmpty record then + ( 2, [text "{}"] ) + + else + viewTinyRecordHelp 0 "{ " (Dict.toList record) + + +viewTinyRecordHelp : Int -> String -> List (String, Expando) -> ( Int, List (Node msg) ) +viewTinyRecordHelp length starter entries = + case entries of + [] -> + ( length + 2, [ text " }" ] ) + + (field, value) :: rest -> + let + fieldLen = + String.length field + + (valueLen, valueNodes) = + viewExtraTiny value + + newLength = + length + fieldLen + valueLen + 5 + in + if newLength > 60 then + ( length + 4, [text ", … }"] ) + + else + let + ( finalLength, otherNodes ) = + viewTinyRecordHelp newLength ", " rest + in + ( finalLength + , text starter + :: span [purple] [text field] + :: text " = " + :: span [] valueNodes + :: otherNodes + ) + + +viewExtraTiny : Expando -> ( Int, List (Node msg) ) +viewExtraTiny value = + case value of + Record _ record -> + viewExtraTinyRecord 0 "{" (Dict.keys record) + + _ -> + viewTiny value + + +viewExtraTinyRecord : Int -> String -> List String -> ( Int, List (Node msg) ) +viewExtraTinyRecord length starter entries = + case entries of + [] -> + ( length + 1, [text "}"] ) + + field :: rest -> + let + nextLength = + length + String.length field + 1 + in + if nextLength > 18 then + ( length + 2, [text "…}"]) + + else + let + (finalLength, otherNodes) = + viewExtraTinyRecord nextLength "," rest + in + ( finalLength + , text starter :: span [purple] [text field] :: otherNodes + ) + + + +-- VIEW HELPERS + + +lineStarter : Maybe String -> Maybe Bool -> List (Node msg) -> List (Node msg) +lineStarter maybeKey maybeIsClosed description = + let + arrow = + case maybeIsClosed of + Nothing -> + makeArrow "" + + Just True -> + makeArrow "▸" + + Just False -> + makeArrow "▾" + in + case maybeKey of + Nothing -> + arrow :: description + + Just key -> + arrow :: span [purple] [text key] :: text " = " :: description + + +makeArrow : String -> Node msg +makeArrow arrow = + span + [ VDom.style + [ ("color", "#777") + , ("padding-left", "2ch") + , ("width", "2ch") + , ("display", "inline-block") + ] + ] + [ text arrow ] + + +leftPad : Maybe a -> VDom.Property msg +leftPad maybeKey = + case maybeKey of + Nothing -> + VDom.style [] + + Just _ -> + VDom.style [("padding-left", "4ch")] + + +red : VDom.Property msg +red = + VDom.style [("color", "rgb(196, 26, 22)")] + + +blue : VDom.Property msg +blue = + VDom.style [("color", "rgb(28, 0, 207)")] + + +purple : VDom.Property msg +purple = + VDom.style [("color", "rgb(136, 19, 145)")] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Helpers.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Helpers.elm new file mode 100644 index 0000000..104e23b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Helpers.elm @@ -0,0 +1,137 @@ +module VirtualDom.Helpers exposing + ( Node + , text, node, div, span, a, h1 + , Property, property, attribute + , class, id, href + , style + , on, onWithOptions, Options, defaultOptions + , onClick + , map + , lazy, lazy2, lazy3 + , keyedNode + ) + + +import Json.Decode as Decode +import Json.Encode as Encode +import Native.VirtualDom + + +type Node msg = Node + + +node : String -> List (Property msg) -> List (Node msg) -> Node msg +node = + Native.VirtualDom.node + + +text : String -> Node msg +text = + Native.VirtualDom.text + + +div : List (Property msg) -> List (Node msg) -> Node msg +div = + node "div" + + +span : List (Property msg) -> List (Node msg) -> Node msg +span = + node "span" + + +a : List (Property msg) -> List (Node msg) -> Node msg +a = + node "a" + + +h1 : List (Property msg) -> List (Node msg) -> Node msg +h1 = + node "h1" + + +map : (a -> msg) -> Node a -> Node msg +map = + Native.VirtualDom.map + + +type Property msg = Property + + +property : String -> Decode.Value -> Property msg +property = + Native.VirtualDom.property + + +attribute : String -> String -> Property msg +attribute = + Native.VirtualDom.attribute + + +class : String -> Property msg +class name = + property "className" (Encode.string name) + + +href : String -> Property msg +href name = + property "href" (Encode.string name) + + +id : String -> Property msg +id = + attribute "id" + + +style : List (String, String) -> Property msg +style = + Native.VirtualDom.style + + +on : String -> Decode.Decoder msg -> Property msg +on eventName decoder = + onWithOptions eventName defaultOptions decoder + + +onClick : msg -> Property msg +onClick msg = + on "click" (Decode.succeed msg) + + +onWithOptions : String -> Options -> Decode.Decoder msg -> Property msg +onWithOptions = + Native.VirtualDom.on + + +type alias Options = + { stopPropagation : Bool + , preventDefault : Bool + } + + +defaultOptions : Options +defaultOptions = + { stopPropagation = False + , preventDefault = False + } + + +lazy : (a -> Node msg) -> a -> Node msg +lazy = + Native.VirtualDom.lazy + + +lazy2 : (a -> b -> Node msg) -> a -> b -> Node msg +lazy2 = + Native.VirtualDom.lazy2 + + +lazy3 : (a -> b -> c -> Node msg) -> a -> b -> c -> Node msg +lazy3 = + Native.VirtualDom.lazy3 + + +keyedNode : String -> List (Property msg) -> List ( String, Node msg ) -> Node msg +keyedNode = + Native.VirtualDom.keyedNode + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/History.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/History.elm new file mode 100644 index 0000000..f3a769a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/History.elm @@ -0,0 +1,287 @@ +module VirtualDom.History exposing + ( History + , empty + , size + , initialModel + , add + , get + , view + , decoder + , encode + ) + + +import Array exposing (Array) +import Json.Decode as Decode +import Json.Encode as Encode +import Native.Debug +import VirtualDom.Helpers as VDom exposing (Node) +import VirtualDom.Metadata as Metadata + + + +-- CONSTANTS + + +maxSnapshotSize : Int +maxSnapshotSize = + 64 + + + +-- HISTORY + + +type alias History model msg = + { snapshots : Array (Snapshot model msg) + , recent : RecentHistory model msg + , numMessages : Int + } + + +type alias RecentHistory model msg = + { model : model + , messages : List msg + , numMessages : Int + } + + +type alias Snapshot model msg = + { model : model + , messages : Array msg + } + + +empty : model -> History model msg +empty model = + History Array.empty (RecentHistory model [] 0) 0 + + +size : History model msg -> Int +size history = + history.numMessages + + +initialModel : History model msg -> model +initialModel { snapshots, recent } = + case Array.get 0 snapshots of + Just { model } -> + model + + Nothing -> + recent.model + + + +-- JSON + + +decoder : model -> (msg -> model -> model) -> Decode.Decoder (model, History model msg) +decoder initialModel update = + let + addMessage rawMsg (model, history) = + let + msg = + jsToElm rawMsg + in + (update msg model, add msg model history) + + updateModel rawMsgs = + List.foldl addMessage (initialModel, empty initialModel) rawMsgs + in + Decode.map updateModel (Decode.list Decode.value) + + +jsToElm : Encode.Value -> a +jsToElm = + Native.Debug.unsafeCoerce + + +encode : History model msg -> Encode.Value +encode { snapshots, recent } = + let + recentJson = + List.map elmToJs (List.reverse recent.messages) + in + Encode.list <| Array.foldr encodeHelp recentJson snapshots + + +encodeHelp : Snapshot model msg -> List Encode.Value -> List Encode.Value +encodeHelp snapshot allMessages = + Array.foldl (\elm msgs -> elmToJs elm :: msgs) allMessages snapshot.messages + + +elmToJs : a -> Encode.Value +elmToJs = + Native.Debug.unsafeCoerce + + + +-- ADD MESSAGES + + +add : msg -> model -> History model msg -> History model msg +add msg model { snapshots, recent, numMessages } = + case addRecent msg model recent of + (Just snapshot, newRecent) -> + History (Array.push snapshot snapshots) newRecent (numMessages + 1) + + (Nothing, newRecent) -> + History snapshots newRecent (numMessages + 1) + + +addRecent + : msg + -> model + -> RecentHistory model msg + -> ( Maybe (Snapshot model msg), RecentHistory model msg ) +addRecent msg newModel { model, messages, numMessages } = + if numMessages == maxSnapshotSize then + ( Just (Snapshot model (Array.fromList messages)) + , RecentHistory newModel [msg] 1 + ) + + else + ( Nothing + , RecentHistory model (msg :: messages) (numMessages + 1) + ) + + + +-- GET SUMMARY + + +get : (msg -> model -> (model, a)) -> Int -> History model msg -> ( model, msg ) +get update index { snapshots, recent, numMessages } = + let + snapshotMax = + numMessages - recent.numMessages + in + if index >= snapshotMax then + undone <| + List.foldr (getHelp update) (Stepping (index - snapshotMax) recent.model) recent.messages + + else + case Array.get (index // maxSnapshotSize) snapshots of + Nothing -> + Debug.crash "UI should only let you ask for real indexes!" + + Just { model, messages } -> + undone <| + Array.foldr (getHelp update) (Stepping (rem index maxSnapshotSize) model) messages + + +type GetResult model msg + = Stepping Int model + | Done msg model + + +getHelp : (msg -> model -> (model, a)) -> msg -> GetResult model msg -> GetResult model msg +getHelp update msg getResult = + case getResult of + Done _ _ -> + getResult + + Stepping n model -> + if n == 0 then + Done msg (Tuple.first (update msg model)) + + else + Stepping (n - 1) (Tuple.first (update msg model)) + + +undone : GetResult model msg -> ( model, msg ) +undone getResult = + case getResult of + Done msg model -> + ( model, msg ) + + Stepping _ _ -> + Debug.crash "Bug in History.get" + + + +-- VIEW + + +view : Maybe Int -> History model msg -> Node Int +view maybeIndex { snapshots, recent, numMessages } = + let + (index, className) = + case maybeIndex of + Nothing -> + ( -1, "debugger-sidebar-messages" ) + Just i -> + ( i, "debugger-sidebar-messages-paused" ) + + oldStuff = + VDom.lazy2 viewSnapshots index snapshots + + newStuff = + Tuple.second <| List.foldl (consMsg index) (numMessages - 1, []) recent.messages + in + VDom.div [ VDom.class className ] (oldStuff :: newStuff) + + + +-- VIEW SNAPSHOTS + + +viewSnapshots : Int -> Array (Snapshot model msg) -> Node Int +viewSnapshots currentIndex snapshots = + let + highIndex = + maxSnapshotSize * Array.length snapshots + in + VDom.div [] <| Tuple.second <| + Array.foldr (consSnapshot currentIndex) (highIndex, []) snapshots + + +consSnapshot : Int -> Snapshot model msg -> ( Int, List (Node Int) ) -> ( Int, List (Node Int) ) +consSnapshot currentIndex snapshot (index, rest) = + let + nextIndex = + index - maxSnapshotSize + + currentIndexHelp = + if nextIndex <= currentIndex && currentIndex < index then currentIndex else -1 + in + ( index - maxSnapshotSize + , VDom.lazy3 viewSnapshot currentIndexHelp index snapshot :: rest + ) + + +viewSnapshot : Int -> Int -> Snapshot model msg -> Node Int +viewSnapshot currentIndex index { messages } = + VDom.div [] <| Tuple.second <| + Array.foldl (consMsg currentIndex) (index - 1, []) messages + + + +-- VIEW MESSAGE + + +consMsg : Int -> msg -> ( Int, List (Node Int) ) -> ( Int, List (Node Int) ) +consMsg currentIndex msg (index, rest) = + ( index - 1 + , VDom.lazy3 viewMessage currentIndex index msg :: rest + ) + + +viewMessage : Int -> Int -> msg -> Node Int +viewMessage currentIndex index msg = + let + className = + if currentIndex == index then + "messages-entry messages-entry-selected" + + else + "messages-entry" + in + VDom.div + [ VDom.class className + , VDom.on "click" (Decode.succeed index) + ] + [ VDom.span [VDom.class "messages-entry-content"] [ VDom.text (Native.Debug.messageToString msg) ] + , VDom.span [VDom.class "messages-entry-index"] [ VDom.text (toString index) ] + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Metadata.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Metadata.elm new file mode 100644 index 0000000..74e7316 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Metadata.elm @@ -0,0 +1,326 @@ +module VirtualDom.Metadata exposing + ( Metadata + , check + , decode, decoder, encode + , Error, ProblemType, Problem(..) + ) + + +import Array exposing (Array) +import Dict exposing (Dict) +import Json.Decode as Decode +import Json.Encode as Encode +import VirtualDom.Report as Report exposing (Report) + + + +-- METADATA + + +type alias Metadata = + { versions : Versions + , types : Types + } + + + +-- VERSIONS + + +type alias Versions = + { elm : String + } + + + +-- TYPES + + +type alias Types = + { message : String + , aliases : Dict String Alias + , unions : Dict String Union + } + + +type alias Alias = + { args : List String + , tipe : String + } + + +type alias Union = + { args : List String + , tags : Dict String (List String) + } + + + +-- PORTABILITY + + +isPortable : Metadata -> Maybe Error +isPortable {types} = + let + badAliases = + Dict.foldl collectBadAliases [] types.aliases + in + case Dict.foldl collectBadUnions badAliases types.unions of + [] -> + Nothing + + problems -> + Just (Error types.message problems) + + +type alias Error = + { message : String + , problems : List ProblemType + } + + +type alias ProblemType = + { name : String + , problems : List Problem + } + + +type Problem + = Function + | Decoder + | Task + | Process + | Socket + | Request + | Program + | VirtualDom + + +collectBadAliases : String -> Alias -> List ProblemType -> List ProblemType +collectBadAliases name {tipe} list = + case findProblems tipe of + [] -> + list + + problems -> + ProblemType name problems :: list + + +collectBadUnions : String -> Union -> List ProblemType -> List ProblemType +collectBadUnions name {tags} list = + case List.concatMap findProblems (List.concat (Dict.values tags)) of + [] -> + list + + problems -> + ProblemType name problems :: list + + +findProblems : String -> List Problem +findProblems tipe = + List.filterMap (hasProblem tipe) problemTable + + +hasProblem : String -> (Problem, String) -> Maybe Problem +hasProblem tipe (problem, token) = + if String.contains token tipe then Just problem else Nothing + + +problemTable : List (Problem, String) +problemTable = + [ ( Function, "->" ) + , ( Decoder, "Json.Decode.Decoder" ) + , ( Task, "Task.Task" ) + , ( Process, "Process.Id" ) + , ( Socket, "WebSocket.LowLevel.WebSocket" ) + , ( Request, "Http.Request" ) + , ( Program, "Platform.Program" ) + , ( VirtualDom, "VirtualDom.Node" ) + , ( VirtualDom, "VirtualDom.Attribute" ) + ] + + + +-- CHECK + + +check : Metadata -> Metadata -> Report +check old new = + if old.versions.elm /= new.versions.elm then + Report.VersionChanged old.versions.elm new.versions.elm + + else + checkTypes old.types new.types + + +checkTypes : Types -> Types -> Report +checkTypes old new = + if old.message /= new.message then + Report.MessageChanged old.message new.message + + else + [] + |> Dict.merge ignore checkAlias ignore old.aliases new.aliases + |> Dict.merge ignore checkUnion ignore old.unions new.unions + |> Report.SomethingChanged + + +ignore : String -> value -> a -> a +ignore key value report = + report + + + +-- CHECK ALIASES + + +checkAlias : String -> Alias -> Alias -> List Report.Change -> List Report.Change +checkAlias name old new changes = + if old.tipe == new.tipe && old.args == new.args then + changes + + else + Report.AliasChange name :: changes + + + +-- CHECK UNIONS + + +checkUnion : String -> Union -> Union -> List Report.Change -> List Report.Change +checkUnion name old new changes = + let + tagChanges = + Dict.merge removeTag checkTag addTag old.tags new.tags <| + Report.emptyTagChanges (old.args == new.args) + in + if Report.hasTagChanges tagChanges then + changes + + else + Report.UnionChange name tagChanges :: changes + + +removeTag : String -> a -> Report.TagChanges -> Report.TagChanges +removeTag tag _ changes = + { changes | removed = tag :: changes.removed } + + +addTag : String -> a -> Report.TagChanges -> Report.TagChanges +addTag tag _ changes = + { changes | added = tag :: changes.added } + + +checkTag : String -> a -> a -> Report.TagChanges -> Report.TagChanges +checkTag tag old new changes = + if old == new then + changes + + else + { changes | changed = tag :: changes.changed } + + + +-- JSON DECODE + + +decode : Encode.Value -> Result Error Metadata +decode value = + case Decode.decodeValue decoder value of + Err _ -> + Debug.crash "Compiler is generating bad metadata. Report this at ." + + Ok metadata -> + case isPortable metadata of + Nothing -> + Ok metadata + + Just error -> + Err error + + +decoder : Decode.Decoder Metadata +decoder = + Decode.map2 Metadata + (Decode.field "versions" decodeVersions) + (Decode.field "types" decodeTypes) + + +decodeVersions : Decode.Decoder Versions +decodeVersions = + Decode.map Versions + (Decode.field "elm" Decode.string) + + +decodeTypes : Decode.Decoder Types +decodeTypes = + Decode.map3 Types + (Decode.field "message" Decode.string) + (Decode.field "aliases" (Decode.dict decodeAlias)) + (Decode.field "unions" (Decode.dict decodeUnion)) + + +decodeUnion : Decode.Decoder Union +decodeUnion = + Decode.map2 Union + (Decode.field "args" (Decode.list Decode.string)) + (Decode.field "tags" (Decode.dict (Decode.list Decode.string))) + + +decodeAlias : Decode.Decoder Alias +decodeAlias = + Decode.map2 Alias + (Decode.field "args" (Decode.list Decode.string)) + (Decode.field "type" (Decode.string)) + + + +-- JSON ENCODE + + +encode : Metadata -> Encode.Value +encode { versions, types } = + Encode.object + [ ("versions", encodeVersions versions) + , ("types", encodeTypes types) + ] + + +encodeVersions : Versions -> Encode.Value +encodeVersions { elm } = + Encode.object [("elm", Encode.string elm)] + + +encodeTypes : Types -> Encode.Value +encodeTypes { message, unions, aliases } = + Encode.object + [ ("message", Encode.string message) + , ("aliases", encodeDict encodeAlias aliases) + , ("unions", encodeDict encodeUnion unions) + ] + + +encodeAlias : Alias -> Encode.Value +encodeAlias { args, tipe } = + Encode.object + [ ("args", Encode.list (List.map Encode.string args)) + , ("type", Encode.string tipe) + ] + + +encodeUnion : Union -> Encode.Value +encodeUnion { args, tags } = + Encode.object + [ ("args", Encode.list (List.map Encode.string args)) + , ("tags", encodeDict (Encode.list << List.map Encode.string) tags) + ] + + +encodeDict : (a -> Encode.Value) -> Dict String a -> Encode.Value +encodeDict f dict = + dict + |> Dict.map (\key value -> f value) + |> Dict.toList + |> Encode.object + + diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Overlay.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Overlay.elm new file mode 100644 index 0000000..9e6bd2e --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Overlay.elm @@ -0,0 +1,541 @@ +module VirtualDom.Overlay exposing + ( State, none, corruptImport, badMetadata + , Msg, close, assessImport + , isBlocking + , Config + , Block + , view + , viewImportExport + ) + +import Json.Decode as Decode +import Json.Encode as Encode +import VirtualDom.Helpers exposing (..) +import VirtualDom.Metadata as Metadata exposing (Metadata) +import VirtualDom.Report as Report exposing (Report) + + + +type State + = None + | BadMetadata Metadata.Error + | BadImport Report + | RiskyImport Report Encode.Value + + +none : State +none = + None + + +corruptImport : State +corruptImport = + BadImport Report.CorruptHistory + + +badMetadata : Metadata.Error -> State +badMetadata = + BadMetadata + + +isBlocking : State -> Bool +isBlocking state = + case state of + None -> + False + + _ -> + True + + + +-- UPDATE + + +type Msg = Cancel | Proceed + + +close : Msg -> State -> Maybe Encode.Value +close msg state = + case state of + None -> + Nothing + + BadMetadata _ -> + Nothing + + BadImport _ -> + Nothing + + RiskyImport _ rawHistory -> + case msg of + Cancel -> + Nothing + + Proceed -> + Just rawHistory + + +assessImport : Metadata -> String -> Result State Encode.Value +assessImport metadata jsonString = + case Decode.decodeString uploadDecoder jsonString of + Err _ -> + Err corruptImport + + Ok (foreignMetadata, rawHistory) -> + let + report = + Metadata.check foreignMetadata metadata + in + case Report.evaluate report of + Report.Impossible -> + Err (BadImport report) + + Report.Risky -> + Err (RiskyImport report rawHistory) + + Report.Fine -> + Ok rawHistory + + +uploadDecoder : Decode.Decoder (Metadata, Encode.Value) +uploadDecoder = + Decode.map2 (,) + (Decode.field "metadata" Metadata.decoder) + (Decode.field "history" Decode.value) + + + +-- VIEW + + +type alias Config msg = + { resume : msg + , open : msg + , importHistory : msg + , exportHistory : msg + , wrap : Msg -> msg + } + + +type Block = Normal | Pause | Message + + +view : Config msg -> Bool -> Bool -> Int -> State -> ( Block, Node msg ) +view config isPaused isOpen numMsgs state = + let + (block, nodes) = + viewHelp config isPaused isOpen numMsgs state + in + ( block + , div [ class "elm-overlay" ] (styles :: nodes) + ) + + +viewHelp : Config msg -> Bool -> Bool -> Int -> State -> ( Block, List (Node msg) ) +viewHelp config isPaused isOpen numMsgs state = + case state of + None -> + let + miniControls = + if isOpen then [] else [ viewMiniControls config numMsgs ] + in + ( if isPaused then Pause else Normal + , if isPaused && not isOpen then + viewResume config :: miniControls + else + miniControls + ) + + BadMetadata badMetadata -> + viewMessage config + "Cannot use Import or Export" + (viewBadMetadata badMetadata) + (Accept "Ok") + + BadImport report -> + viewMessage config + "Cannot Import History" + (viewReport True report) + (Accept "Ok") + + RiskyImport report _ -> + viewMessage config + "Warning" + (viewReport False report) + (Choose "Cancel" "Import Anyway") + + +viewResume config = + div [ class "elm-overlay-resume", onClick config.resume ] + [ div [class "elm-overlay-resume-words"] [text "Click to Resume"] ] + + + +-- VIEW MESSAGE + + +viewMessage : Config msg -> String -> List (Node msg) -> Buttons -> ( Block, List (Node msg) ) +viewMessage config title details buttons = + ( Message + , [ div [ class "elm-overlay-message" ] + [ div [ class "elm-overlay-message-title" ] [ text title ] + , div [ class "elm-overlay-message-details" ] details + , map config.wrap (viewButtons buttons) + ] + ] + ) + + +viewReport : Bool -> Report -> List (Node msg) +viewReport isBad report = + case report of + Report.CorruptHistory -> + [ text "Looks like this history file is corrupt. I cannot understand it." + ] + + Report.VersionChanged old new -> + [ text <| + "This history was created with Elm " + ++ old ++ ", but you are using Elm " + ++ new ++ " right now." + ] + + Report.MessageChanged old new -> + [ text <| + "To import some other history, the overall message type must" + ++ " be the same. The old history has " + , viewCode old + , text " messages, but the new program works with " + , viewCode new + , text " messages." + ] + + Report.SomethingChanged changes -> + [ node "p" [] [ text (if isBad then explanationBad else explanationRisky) ] + , node "ul" [] (List.map viewChange changes) + ] + + +explanationBad : String +explanationBad = """ +The messages in this history do not match the messages handled by your +program. I noticed changes in the following types: +""" + +explanationRisky : String +explanationRisky = """ +This history seems old. It will work with this program, but some +messages have been added since the history was created: +""" + + +viewCode : String -> Node msg +viewCode name = + node "code" [] [ text name ] + + +viewChange : Report.Change -> Node msg +viewChange change = + node "li" [] <| + case change of + Report.AliasChange name -> + [ span [ class "elm-overlay-message-details-type" ] [ viewCode name ] + ] + + Report.UnionChange name { removed, changed, added, argsMatch } -> + [ span [ class "elm-overlay-message-details-type" ] [ viewCode name ] + , node "ul" [] + [ viewMention removed "Removed " + , viewMention changed "Changed " + , viewMention added "Added " + ] + , if argsMatch then + text "" + else + text "This may be due to the fact that the type variable names changed." + ] + + +viewMention : List String -> String -> Node msg +viewMention tags verbed = + case List.map viewCode (List.reverse tags) of + [] -> + text "" + + [tag] -> + node "li" [] + [ text verbed, tag, text "." ] + + [tag2, tag1] -> + node "li" [] + [ text verbed, tag1, text " and ", tag2, text "." ] + + lastTag :: otherTags -> + node "li" [] <| + text verbed + :: List.intersperse (text ", ") (List.reverse otherTags) + ++ [ text ", and ", lastTag, text "." ] + + +viewBadMetadata : Metadata.Error -> List (Node msg) +viewBadMetadata {message, problems} = + [ node "p" [] + [ text "The " + , viewCode message + , text " type of your program cannot be reliably serialized for history files." + ] + , node "p" [] [ text "Functions cannot be serialized, nor can values that contain functions. This is a problem in these places:" ] + , node "ul" [] (List.map viewProblemType problems) + , node "p" [] + [ text goodNews1 + , a [ href "https://guide.elm-lang.org/types/union_types.html" ] [ text "union types" ] + , text ", in your messages. From there, your " + , viewCode "update" + , text goodNews2 + ] + ] + + +goodNews1 = """ +The good news is that having values like this in your message type is not +so great in the long run. You are better off using simpler data, like +""" + + +goodNews2 = """ +function can pattern match on that data and call whatever functions, JSON +decoders, etc. you need. This makes the code much more explicit and easy to +follow for other readers (or you in a few months!) +""" + + +viewProblemType : Metadata.ProblemType -> Node msg +viewProblemType { name, problems } = + node "li" [] + [ viewCode name + , text (" can contain " ++ addCommas (List.map problemToString problems) ++ ".") + ] + + +problemToString : Metadata.Problem -> String +problemToString problem = + case problem of + Metadata.Function -> + "functions" + + Metadata.Decoder -> + "JSON decoders" + + Metadata.Task -> + "tasks" + + Metadata.Process -> + "processes" + + Metadata.Socket -> + "web sockets" + + Metadata.Request -> + "HTTP requests" + + Metadata.Program -> + "programs" + + Metadata.VirtualDom -> + "virtual DOM values" + + +addCommas : List String -> String +addCommas items = + case items of + [] -> + "" + + [item] -> + item + + [item1, item2] -> + item1 ++ " and " ++ item2 + + lastItem :: otherItems -> + String.join ", " (otherItems ++ [ " and " ++ lastItem ]) + + + +-- VIEW MESSAGE BUTTONS + + +type Buttons + = Accept String + | Choose String String + + +viewButtons : Buttons -> Node Msg +viewButtons buttons = + div [ class "elm-overlay-message-buttons" ] <| + case buttons of + Accept proceed -> + [ node "button" [ onClick Proceed ] [ text proceed ] + ] + + Choose cancel proceed -> + [ node "button" [ onClick Cancel ] [ text cancel ] + , node "button" [ onClick Proceed ] [ text proceed ] + ] + + + +-- VIEW MINI CONTROLS + + +viewMiniControls : Config msg -> Int -> Node msg +viewMiniControls config numMsgs = + div + [ class "elm-mini-controls" + ] + [ div + [ onClick config.open + , class "elm-mini-controls-button" + ] + [ text ("Explore History (" ++ toString numMsgs ++ ")") + ] + , viewImportExport + [class "elm-mini-controls-import-export"] + config.importHistory + config.exportHistory + ] + + +viewImportExport : List (Property msg) -> msg -> msg -> Node msg +viewImportExport props importMsg exportMsg = + div + props + [ button importMsg "Import" + , text " / " + , button exportMsg "Export" + ] + + +button : msg -> String -> Node msg +button msg label = + span [ onClick msg, style [("cursor","pointer")] ] [ text label ] + + + +-- STYLE + + +styles : Node msg +styles = + node "style" [] [ text """ + +.elm-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + color: white; + pointer-events: none; + font-family: 'Trebuchet MS', 'Lucida Grande', 'Bitstream Vera Sans', 'Helvetica Neue', sans-serif; +} + +.elm-overlay-resume { + width: 100%; + height: 100%; + cursor: pointer; + text-align: center; + pointer-events: auto; + background-color: rgba(200, 200, 200, 0.7); +} + +.elm-overlay-resume-words { + position: absolute; + top: calc(50% - 40px); + font-size: 80px; + line-height: 80px; + height: 80px; + width: 100%; +} + +.elm-mini-controls { + position: fixed; + bottom: 0; + right: 6px; + border-radius: 4px; + background-color: rgb(61, 61, 61); + font-family: monospace; + pointer-events: auto; +} + +.elm-mini-controls-button { + padding: 6px; + cursor: pointer; + text-align: center; + min-width: 24ch; +} + +.elm-mini-controls-import-export { + padding: 4px 0; + font-size: 0.8em; + text-align: center; + background-color: rgb(50, 50, 50); +} + +.elm-overlay-message { + position: absolute; + width: 600px; + height: 100%; + padding-left: calc(50% - 300px); + padding-right: calc(50% - 300px); + background-color: rgba(200, 200, 200, 0.7); + pointer-events: auto; +} + +.elm-overlay-message-title { + font-size: 36px; + height: 80px; + background-color: rgb(50, 50, 50); + padding-left: 22px; + vertical-align: middle; + line-height: 80px; +} + +.elm-overlay-message-details { + padding: 8px 20px; + overflow-y: auto; + max-height: calc(100% - 156px); + background-color: rgb(61, 61, 61); +} + +.elm-overlay-message-details-type { + font-size: 1.5em; +} + +.elm-overlay-message-details ul { + list-style-type: none; + padding-left: 20px; +} + +.elm-overlay-message-details ul ul { + list-style-type: disc; + padding-left: 2em; +} + +.elm-overlay-message-details li { + margin: 8px 0; +} + +.elm-overlay-message-buttons { + height: 60px; + line-height: 60px; + text-align: right; + background-color: rgb(50, 50, 50); +} + +.elm-overlay-message-buttons button { + margin-right: 20px; +} + +""" ] \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Report.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Report.elm new file mode 100644 index 0000000..89b4e07 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/src/VirtualDom/Report.elm @@ -0,0 +1,99 @@ +module VirtualDom.Report exposing + ( Report(..) + , Change(..) + , TagChanges + , emptyTagChanges + , hasTagChanges + , Status(..), evaluate + ) + + + +-- REPORTS + + +type Report + = CorruptHistory + | VersionChanged String String + | MessageChanged String String + | SomethingChanged (List Change) + + +type Change + = AliasChange String + | UnionChange String TagChanges + + +type alias TagChanges = + { removed : List String + , changed : List String + , added : List String + , argsMatch : Bool + } + + +emptyTagChanges : Bool -> TagChanges +emptyTagChanges argsMatch = + TagChanges [] [] [] argsMatch + + +hasTagChanges : TagChanges -> Bool +hasTagChanges tagChanges = + tagChanges == TagChanges [] [] [] True + + +type Status = Impossible | Risky | Fine + + +evaluate : Report -> Status +evaluate report = + case report of + CorruptHistory -> + Impossible + + VersionChanged _ _ -> + Impossible + + MessageChanged _ _ -> + Impossible + + SomethingChanged changes -> + worstCase Fine (List.map evaluateChange changes) + + +worstCase : Status -> List Status -> Status +worstCase status statusList = + case statusList of + [] -> + status + + Impossible :: _ -> + Impossible + + Risky :: rest -> + worstCase Risky rest + + Fine :: rest -> + worstCase status rest + + +evaluateChange : Change -> Status +evaluateChange change = + case change of + AliasChange _ -> + Impossible + + UnionChange _ { removed, changed, added, argsMatch } -> + if not argsMatch || some changed || some removed then + Impossible + + else if some added then + Risky + + else + Fine + + +some : List a -> Bool +some list = + not (List.isEmpty list) diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/Native/TestHelpers.js b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/Native/TestHelpers.js new file mode 100644 index 0000000..6b1ebbb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/Native/TestHelpers.js @@ -0,0 +1,35 @@ +Elm.Native.TestHelpers = {}; +Elm.Native.TestHelpers.make = function(localRuntime) +{ + localRuntime.Native = localRuntime.Native || {}; + localRuntime.Native.TestHelpers = localRuntime.Native.TestHelpers || {}; + if (localRuntime.Native.TestHelpers.values) + { + return localRuntime.Native.TestHelpers.values; + } + + var VirtualDom = Elm.Native.VirtualDom.make(localRuntime); + + function unsafeRecordCallCount(f) { + function wrapper(a) { + wrapper.__elm_test_call_count += 1; + return f(a); + } + wrapper.__elm_test_call_count = 0; + return wrapper; + } + + function unsafeQueryCallCount(f) { + if (f.__elm_test_call_count === undefined) { + return -1; + } + return f.__elm_test_call_count; + } + + Elm.Native.TestHelpers.values = { + unsafeRecordCallCount: unsafeRecordCallCount, + unsafeQueryCallCount: unsafeQueryCallCount, + updateAndReplace: F3(VirtualDom.updateAndReplace) + }; + return localRuntime.Native.TestHelpers.values = Elm.Native.TestHelpers.values; +}; \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestCases/Lazy.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestCases/Lazy.elm new file mode 100644 index 0000000..09e362a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestCases/Lazy.elm @@ -0,0 +1,72 @@ +module TestCases.Lazy where + +import VirtualDom exposing (Node, lazy) +import ElmTest.Assertion exposing (assertEqual) +import ElmTest.Test exposing (Test, suite, test) + +import TestHelpers exposing (renderDom, updateDom, unsafeRecordCallCount, unsafeQueryCallCount) + +renderRecord : { x: String, y: String } -> Node +renderRecord r = + VirtualDom.text <| "The values: " ++ r.x ++ ", " ++ r.y + + +renderPrimitive : Int -> Node +renderPrimitive x = + VirtualDom.text <| "The value: " ++ (toString x) + + +testLazyIdenticalRecord = + test "isn't called again with identical record" <| + let record = { x = "a", y = "b" } + wrappedRender = unsafeRecordCallCount renderRecord + v1 = renderDom <| lazy wrappedRender record + v2 = updateDom v1 <| lazy wrappedRender record + v3 = updateDom v2 <| lazy wrappedRender record + in + assertEqual 1 <| unsafeQueryCallCount wrappedRender + + +testLazyIdenticalPrimitive = + test "isn't called again with identical primitive" <| + let wrappedRender = unsafeRecordCallCount renderPrimitive + v1 = renderDom <| lazy wrappedRender 5 + v2 = updateDom v1 <| lazy wrappedRender 5 + v3 = updateDom v2 <| lazy wrappedRender 5 + in + assertEqual 1 <| unsafeQueryCallCount wrappedRender + + +testLazyRecordMutationOfIdenticalValue = + test "isn't called again with record mutation of identical value" <| + let record = { x = "a", y = "b" } + wrappedRender = unsafeRecordCallCount renderRecord + v1 = renderDom <| lazy wrappedRender record + v2 = updateDom v1 <| lazy wrappedRender { record | x = "a" } + v3 = updateDom v2 <| lazy wrappedRender { record | x = "a", y = "b" } + in + assertEqual 1 <| unsafeQueryCallCount wrappedRender + + +testNotLazyDifferentRecord = + test "is called again with an equivalent but different record" <| + let wrappedRender = unsafeRecordCallCount renderRecord + v1 = renderDom <| lazy wrappedRender { x = "a", y = "b" } + v2 = updateDom v1 <| lazy wrappedRender { x = "a", y = "b" } + v3 = updateDom v2 <| lazy wrappedRender { x = "a", y = "b" } + in + assertEqual 3 <| unsafeQueryCallCount wrappedRender + + +tests : Test +tests = + suite + "Lazy" + [ + testLazyIdenticalRecord, + testLazyIdenticalPrimitive, + -- Re-enable this test when core supports checking + -- record update values for identity before copying: + -- testLazyRecordMutationOfIdenticalValue, + testNotLazyDifferentRecord + ] diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestHelpers.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestHelpers.elm new file mode 100644 index 0000000..2fe24cf --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestHelpers.elm @@ -0,0 +1,34 @@ +module TestHelpers where + +import VirtualDom exposing (Node) + +import Native.TestHelpers +import Native.VirtualDom + +unsafeRecordCallCount : (a -> b) -> (a -> b) +unsafeRecordCallCount = + Native.TestHelpers.unsafeRecordCallCount + +unsafeQueryCallCount : (a -> b) -> Int +unsafeQueryCallCount = + Native.TestHelpers.unsafeQueryCallCount + +type OpaqueDom = OpaqueDom + +render : Node -> OpaqueDom +render = + Native.VirtualDom.render + +updateAndReplace : OpaqueDom -> Node -> Node -> OpaqueDom +updateAndReplace = + Native.TestHelpers.updateAndReplace + + +renderDom : Node -> (OpaqueDom, Node) +renderDom vdom = + (render vdom, vdom) + + +updateDom : (OpaqueDom, Node) -> Node -> (OpaqueDom, Node) +updateDom (oldDom, oldVDom) newVDom = + (updateAndReplace oldDom oldVDom newVDom, newVDom) diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestMain.elm b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestMain.elm new file mode 100644 index 0000000..ea59abf --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/TestMain.elm @@ -0,0 +1,18 @@ + +import ElmTest.Runner.Console exposing (runDisplay) +import ElmTest.Test exposing (Test, suite) +import Console exposing (IO) +import Task exposing (Task) + +import TestCases.Lazy + +tests : Test +tests = + suite + "VirtualDom Library Tests" + [ + TestCases.Lazy.tests + ] + +port runner : Signal (Task x ()) +port runner = Console.run (runDisplay tests) diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/elm-package.json b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/elm-package.json new file mode 100644 index 0000000..5041954 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/elm-package.json @@ -0,0 +1,18 @@ +{ + "version": "1.0.0", + "summary": "Test for VirtualDom", + "license": "BSD3", + "repository": "https://github.com/evancz/virtual-dom.git", + "exposed-modules": [], + "source-directories": [ + ".", + "build/virtual-dom/" + ], + "native-modules": true, + "dependencies": { + "elm-lang/core": "2.0.0 <= v < 4.0.0", + "laszlopandy/elm-console": "1.0.0 <= v < 2.0.0", + "deadfoxygrandpa/elm-test": "1.0.3 <= v < 2.0.0" + }, + "elm-version": "0.16.0 <= v < 0.17.0" +} \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/run-tests.sh b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/run-tests.sh new file mode 100644 index 0000000..98e4f2e --- /dev/null +++ b/app/templates/client/elm-stuff/packages/elm-lang/virtual-dom/2.0.2/tests/run-tests.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +cd "$(dirname "$0")" + +mkdir -p build/virtual-dom/Native +cp ../src/VirtualDom.elm build/virtual-dom/ +$(npm bin)/browserify ../src/wrapper.js -o build/VirtualDom.browser.js + +set +e +diff -u ../src/Native/VirtualDom.js build/VirtualDom.browser.js +if [ $? != 0 ]; then + echo "ERROR:" + echo "src/Native/VirtualDom.js has local modifications or is out of date. Please run rebuild.sh" + exit 1 +fi +set -e + +$(npm bin)/browserify --no-browser-field ../src/wrapper.js -o build/virtual-dom/Native/VirtualDom.js + +elm-make --yes --output build/test.js TestMain.elm +echo "Elm.worker(Elm.Main);" >> build/test.js +node build/test.js \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.dir-locals.el b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.dir-locals.el new file mode 100644 index 0000000..feb15b1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.dir-locals.el @@ -0,0 +1,4 @@ +;;; Directory Local Variables +;;; For more information see (info "(emacs) Directory Variables") + +((nil (eval setq compilation-directory (magit-toplevel)))) diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.gitignore b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.gitignore new file mode 100644 index 0000000..6eb9d53 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.gitignore @@ -0,0 +1,3 @@ +elm-stuff/ +/test/tests.js +/TAGS diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.travis.yml b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.travis.yml new file mode 100644 index 0000000..7ed1807 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "0.12" +install: + - npm install -g elm elm-test +script: + - make diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/CHANGELOG.md b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/CHANGELOG.md new file mode 100644 index 0000000..43bb0ab --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/CHANGELOG.md @@ -0,0 +1,17 @@ +# Changelog + +## 4.0.0 + +Changes inline with the Elm 0.18 release. + +* The order the arguments for `andThen` are flipped. + +## 3.0.0 + +Changes inline with the Elm 0.18 release. + +* `apply` was renamed to `andMap`, and the argument order was flipped for easier chaining with `|>`. This follows the new Elm 0.18 convention. +* `($)` and `(*)` were moved to `RemoteData.Infix`. +* `pure` became `succeed`, to fall in line with Elm core. +* `mapFailure` became `mapError`, to fall in line with Elm core. +* `fromTask` no longer exists, following changes to the underling `Task` API. diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/LICENSE b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/LICENSE new file mode 100644 index 0000000..6b2beff --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Kris Andrew Jenkins + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/Makefile b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/Makefile new file mode 100644 index 0000000..1fc2421 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/Makefile @@ -0,0 +1,7 @@ +all: tests.js + +tests.js: FORCE $(shell find src -type f -name '*.elm' -o -name '*.js') + elm-make --yes --warn + @$(MAKE) -C test + +FORCE: diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/README.md b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/README.md new file mode 100644 index 0000000..b2efcfe --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/README.md @@ -0,0 +1,34 @@ +# RemoteData for Elm + +[![Build Status](https://travis-ci.org/krisajenkins/remotedata.svg?branch=master)](https://travis-ci.org/krisajenkins/remotedata) + +Tools for fetching data from remote sources (incl. HTTP). For a full discussion +of what this package does and why it exists, [read this post](http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html). + + +## Installation + +From your top-level directory - the one with `elm-package.json` in - call: + +``` + +$ elm package install krisajenkins/remotedata +``` + +## Documentation + +[See the Elm package for full usage docs](http://package.elm-lang.org/packages/krisajenkins/remotedata/latest). + +## Building & Testing + +``` +make +``` + +...will run the whole build and test suite. + +## License + +Copyright © 2015-2016 Kris Jenkins + +Distributed under the MIT license. diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/elm-package.json b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/elm-package.json new file mode 100644 index 0000000..12f7a0d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/elm-package.json @@ -0,0 +1,18 @@ +{ + "version": "4.0.1", + "summary": "Tools for fetching data from remote sources (incl. HTTP).", + "repository": "https://github.com/krisajenkins/remotedata.git", + "license": "MIT", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "RemoteData", + "RemoteData.Infix" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/http": "1.0.0 <= v < 2.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/src/RemoteData.elm b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/src/RemoteData.elm new file mode 100644 index 0000000..d3fe0bd --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/src/RemoteData.elm @@ -0,0 +1,466 @@ +module RemoteData + exposing + ( RemoteData(..) + , WebData + , fromResult + , toMaybe + , andThen + , withDefault + , asCmd + , append + , map + , andMap + , succeed + , isSuccess + , isFailure + , isLoading + , isNotAsked + , mapError + , mapBoth + , update + , prism + ) + +{-| A datatype representing fetched data. + +If you find yourself continually using `Maybe (Result Error a)` to +represent loaded data, or you have a habit of shuffling errors away to +where they can be quietly ignored, consider using this. It makes it +easier to represent the real state of a remote data fetch and handle +it properly. + + +For more on the motivation, take a look at the blog post [How Elm Slays A UI Antipattern](http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html). + + +To use the datatype, let's look at an example that loads `News` from a feed. + +First you add to your model, wrapping the data you want in `WebData`: + + +``` elm +type alias Model = + { news : WebData News } +``` + +Then add in a message that will deliver the response: + +``` elm +type alias Msg + = NewsResponse (WebData News) +``` + +Now we can create an HTTP get: + +``` elm +getNews : Cmd Msg +getNews = + Http.send (NewsResponse << RemoteData.fromResult) <| + Http.get "/news" decodeNews +``` + +We trigger it in our `init` function: + +``` elm +init : ( Model, Cmd Msg) +init = + ( { news = Loading } + , getNews + ) +``` + +We handle it in our `update` function: + +``` elm +update msg model = + case msg of + NewsResponse response -> + ( { model | news = response } + , Cmd.none + ) +``` + + +Most of this you'd already have in your app, and the changes are just +wrapping the datatype in `Webdata`, and updating the `Http.send` call +to add in `RemoteData.fromResult`. + +Now we get to where we really want to be, rendering the data and +handling the different states in the UI gracefully: + + +``` elm +view : Model -> Html msg +view model = + case model.news of + NotAsked -> text "Initialising." + + Loading -> text "Loading." + + Failure err -> text ("Error: " ++ toString err) + + Success news -> viewNews news + + +viewNews : News -> Html msg +viewNews news = + div [] + [h1 [] [text "Here is the news."] + , ...] +``` + +And that's it. A more accurate model of what's happening leads to a better UI. + +@docs RemoteData +@docs WebData +@docs map +@docs andMap +@docs succeed +@docs mapError +@docs mapBoth +@docs andThen +@docs withDefault +@docs fromResult +@docs toMaybe +@docs asCmd +@docs append +@docs isSuccess +@docs isFailure +@docs isLoading +@docs isNotAsked +@docs update +@docs prism + +-} + +import Http +import Task exposing (Task) + + +{-| Frequently when you're fetching data from an API, you want to represent four different states: + * `NotAsked` - We haven't asked for the data yet. + * `Loading` - We've asked, but haven't got an answer yet. + * `Failure` - We asked, but something went wrong. Here's the error. + * `Success` - Everything worked, and here's the data. +-} +type RemoteData e a + = NotAsked + | Loading + | Failure e + | Success a + + +{-| While `RemoteData` can model any type of error, the most common +one you'll actually encounter is when you fetch data from a REST +interface, and get back `RemoteData Http.Error a`. Because that case +is so common, `WebData` is provided as a useful alias. +-} +type alias WebData a = + RemoteData Http.Error a + + +{-| Map a function into the `Success` value. +-} +map : (a -> b) -> RemoteData e a -> RemoteData e b +map f data = + case data of + Success value -> + Success (f value) + + Loading -> + Loading + + NotAsked -> + NotAsked + + Failure error -> + Failure error + + +{-| Map a function into the `Failure` value. +-} +mapError : (e -> f) -> RemoteData e a -> RemoteData f a +mapError f data = + case data of + Success x -> + Success x + + Failure e -> + Failure (f e) + + Loading -> + Loading + + NotAsked -> + NotAsked + + +{-| Map function into both the `Success` and `Failure` value. +-} +mapBoth : (a -> b) -> (e -> f) -> RemoteData e a -> RemoteData f b +mapBoth successFn errorFn data = + case data of + Success x -> + Success (successFn x) + + Failure e -> + Failure (errorFn e) + + Loading -> + Loading + + NotAsked -> + NotAsked + + +{-| Chain together RemoteData function calls. +-} +andThen : (a -> RemoteData e b) -> RemoteData e a -> RemoteData e b +andThen f data = + case data of + Success a -> + f a + + Failure e -> + Failure e + + NotAsked -> + NotAsked + + Loading -> + Loading + + +{-| Return the `Success` value, or the default. +-} +withDefault : a -> RemoteData e a -> a +withDefault default data = + case data of + Success x -> + x + + _ -> + default + + +{-| Convert a web `Task`, probably produced from elm-http, to a `Cmd (RemoteData e a)`. +-} +asCmd : Task e a -> Cmd (RemoteData e a) +asCmd = + Task.attempt fromResult + + +{-| Convert a `Result Error`, probably produced from elm-http, to a RemoteData value. +-} +fromResult : Result e a -> RemoteData e a +fromResult result = + case result of + Err e -> + Failure e + + Ok x -> + Success x + + +{-| Convert a `RemoteData e a` to a `Maybe a` +-} +toMaybe : RemoteData e a -> Maybe a +toMaybe = + map Just >> withDefault Nothing + + +{-| Append - join two `RemoteData` values together as though +they were one. + +If either value is `NotAsked`, the result is `NotAsked`. +If either value is `Loading`, the result is `Loading`. +If both values are `Failure`, the left one wins. +-} +append : RemoteData e a -> RemoteData e b -> RemoteData e ( a, b ) +append a b = + map (,) a + |> andMap b + + +{-| Put the results of two RemoteData calls together. + +For example, if you were fetching three datasets, `a`, `b` and `c`, +and wanted to end up with a tuple of all three, you could say: + +``` elm +merge3 : + RemoteData e a + -> RemoteData e b + -> RemoteData e c + -> RemoteData e ( a, b, c ) +merge3 a b c = + map (,,) a + |> andMap b + |> andMap c +``` + +The final tuple succeeds only if all its children succeeded. It is +still `Loading` if _any_ of its children are still `Loading`. And if +any child fails, the error is the leftmost `Failure` value. + +Note that this provides a general pattern for `map2`, `map3`, .., +`mapN`. If you find yourself wanting `map5`, just use: + +``` elm +foo f a b c d e = + map f a + |> andMap b + |> andMap c + |> andMap d + |> andMap e +``` + +It's a general recipe that doesn't require us to ever have the +discussion, "Could you just add `map7`? Could you just add `map8`? +Could you just...". + +Category theory points: This is `apply` with the arguments flipped. +-} +andMap : RemoteData e a -> RemoteData e (a -> b) -> RemoteData e b +andMap wrappedValue wrappedFunction = + case ( wrappedFunction, wrappedValue ) of + ( Success f, Success value ) -> + Success (f value) + + ( Failure error, _ ) -> + Failure error + + ( _, Failure error ) -> + Failure error + + ( Loading, _ ) -> + Loading + + ( _, Loading ) -> + Loading + + ( NotAsked, _ ) -> + NotAsked + + ( _, NotAsked ) -> + NotAsked + + +{-| Lift an ordinary value into the realm of RemoteData. + +Category theory points: This is `pure`. +-} +succeed : a -> RemoteData e a +succeed = + Success + + +{-| State-checking predicate. Returns true if we've successfully loaded some data. +-} +isSuccess : RemoteData e a -> Bool +isSuccess data = + case data of + Success x -> + True + + _ -> + False + + +{-| State-checking predicate. Returns true if we've failed to load some data. +-} +isFailure : RemoteData e a -> Bool +isFailure data = + case data of + Failure x -> + True + + _ -> + False + + +{-| State-checking predicate. Returns true if we're loading. +-} +isLoading : RemoteData e a -> Bool +isLoading data = + case data of + Loading -> + True + + _ -> + False + + +{-| State-checking predicate. Returns true if we haven't asked for data yet. +-} +isNotAsked : RemoteData e a -> Bool +isNotAsked data = + case data of + NotAsked -> + True + + _ -> + False + + +{-| Apply an Elm update function - `Model -> (Model, Cmd Msg)` - to any `Successful`-ly loaded data. + +It's quite common in Elm to want to run a model-update function, over +some remote data, but only once it's actually been loaded. + +For example, we might want to handle UI messages changing the users +settings, but that only makes sense once those settings have been +returned from the server. + +This function makes it more convenient to reach inside a +`RemoteData.Success` value and apply an update. If the data is not +`Success a`, it is returned unchanged with a `Cmd.none`. + +-} +update : (a -> ( b, Cmd c )) -> RemoteData e a -> ( RemoteData e b, Cmd c ) +update f remoteData = + case remoteData of + Success data -> + let + ( first, second ) = + f data + in + ( Success first, second ) + + NotAsked -> + ( NotAsked, Cmd.none ) + + Loading -> + ( Loading, Cmd.none ) + + Failure error -> + ( Failure error, Cmd.none ) + + +{-| A monocle-compatible Prism. + +If you use Monocle, you'll want this, otherwise you can ignore it. + +The type signature is actually: + +``` elm +prism : Prism (RemoteData e a) a +``` + +...but we use the more verbose type here to avoid introducing a dependency on Monocle. +-} +prism : + { getOption : RemoteData e a -> Maybe a + , reverseGet : a -> RemoteData e a + } +prism = + { reverseGet = Success + , getOption = + \data -> + case data of + Success value -> + Just value + + _ -> + Nothing + } diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/src/RemoteData/Infix.elm b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/src/RemoteData/Infix.elm new file mode 100644 index 0000000..c0dbea6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/src/RemoteData/Infix.elm @@ -0,0 +1,36 @@ +module RemoteData.Infix + exposing + ( (<$>) + , (<*>) + ) + +{-| Convenience infix operators, for those that like them. + +Allows you do define a "merge three values into a tuple" function as: + +``` elm +merge3 a b c = + (,,) <$> a <*> b <*> c +``` + +@docs (<$>) +@docs (<*>) +-} + +import RemoteData exposing (RemoteData) + + +{-| Infix form of map. For those who like their applicative functors Haskell-style. +-} +(<$>) : (a -> b) -> RemoteData e a -> RemoteData e b +(<$>) = + RemoteData.map + + +{-| Infix form of (flip andMap). For those who like their applicative functors Haskell-style. + + +-} +(<*>) : RemoteData e (a -> b) -> RemoteData e a -> RemoteData e b +(<*>) = + flip RemoteData.andMap diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/Main.elm b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/Main.elm new file mode 100644 index 0000000..0af1437 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/Main.elm @@ -0,0 +1,16 @@ +module Main exposing (..) + +import Legacy.ElmTest exposing (..) +import RemoteDataTest + + +tests : Test +tests = + suite "All" + [ RemoteDataTest.tests + ] + + +main : Program Never () msg +main = + runSuite tests diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/Makefile b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/Makefile new file mode 100644 index 0000000..862fcb6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/Makefile @@ -0,0 +1,7 @@ +all: tests.js + +tests.js: FORCE + elm-make Main.elm --yes --warn --output=$@ + @node $@ + +FORCE: diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/RemoteDataTest.elm b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/RemoteDataTest.elm new file mode 100644 index 0000000..207af2d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/RemoteDataTest.elm @@ -0,0 +1,38 @@ +module RemoteDataTest exposing (tests) + +import Legacy.ElmTest exposing (..) +import RemoteData exposing (..) + + +tests : Test +tests = + suite "RemoteData" + [ mapTests + , prismTests + ] + + +mapTests : Test +mapTests = + let + check ( input, output ) = + assertEqual output + (map ((*) 3) input) + in + suite "map" + <| List.map defaultTest + <| List.map check + [ ( Success 2, Success 6 ) + , ( NotAsked, NotAsked ) + , ( Loading, Loading ) + , ( Failure "error", Failure "error" ) + ] + + +prismTests : Test +prismTests = + suite "webDataPrism" + <| List.map defaultTest + [ assertEqual (Just 5) + (prism.getOption (prism.reverseGet 5)) + ] diff --git a/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/elm-package.json b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/elm-package.json new file mode 100644 index 0000000..1796ee1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/krisajenkins/remotedata/4.0.1/test/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "2.2.1", + "summary": "Tools for fetching data from remote sources (incl. HTTP).", + "repository": "https://github.com/krisajenkins/remotedata.git", + "license": "MIT", + "source-directories": [ + "../src", + "." + ], + "exposed-modules": [ + "RemoteData" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/http": "1.0.0 <= v < 2.0.0", + "rtfeldman/legacy-elm-test": "3.0.0 <= v < 4.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/.gitignore b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/.gitignore new file mode 100644 index 0000000..4bc8535 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/.gitignore @@ -0,0 +1 @@ +elm-stuff diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/.travis.yml b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/.travis.yml new file mode 100644 index 0000000..36ec413 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "node" +install: + - npm install -g elm + - npm install -g elm-test +script: sh ./scripts/test.sh diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/CHANGELOG.md b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/CHANGELOG.md new file mode 100644 index 0000000..bfaf2c8 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/CHANGELOG.md @@ -0,0 +1,69 @@ +### 4.0.0 + +A lot has happened since 3.0.0! The API is smaller, and more focused and I'm +excited about that. In particular, `BodyReader` and its friends have been +removed. Since this is the official upgrade for Elm 0.18, the new +`elm-lang/http` package has a lot of influence. The new `Http` package includes +a much more cohesive experience for declaring expectations of response bodies. +[See the `Http.Expect` type in `elm-lang/http`](http://package.elm-lang.org/packages/elm-lang/http/1.0.0/Http#Expect). +This feature is even reminiscent of `BodyReader`! + +Since we have this as a part of the platform now, all of the `BodyReader`- +related features are gone. For these you'll just "use the platform", as they +say, and make use of `withExpect` in your builder pipelines. In the future +we may include fancier, custom `Expect` formulations for your convenience. + +Secondly, you'll now have the option to convert a `RequestBuilder a` into an +`Http.Request a` or send it directly using `HttpBuilder.send`, which has the +same signature as `Http.send`. This helps to keep your builder pipelines clean +while also leaving you the option to get out an `Http.Request` if you need. + +Long story short, `HttpBuilder` is _just_ about building requests, just like +when it started out. The platform covers the rest. + +Here's the list of all changes: + +#### Removals +- `url`: use `withQueryParams` instead to add query params to your url +- `withBody`: use one of the more specific `with*Body` functions instead +- `withMultipartBody`: string multipart bodies are the only type supported by + `elm-lang/http` currently, sojust use `withMultipartStringBody` instead +- `withMimeType`: the first parameter to `withStringBody` will set your MIME + type automatically. Alternatively, set a header with `withHeader` +- `withCacheBuster`: since we're giving up control of the send process, we can't + chain on a `Task` to get the current time +- `withZeroStatusAllowed`: we don't control the send process. You can handle + this yourself under the `Http.BadStatus` error when you deal with errors in + your send msg tagger. +- `BodyReader`: see intro +- `stringReader`: see intro +- `jsonReader`: see intro +- `unitReader`: see intro +- `Error`: since we don't control the send process we don't need this +- `Response`: same as `Error` +- `toSettings`: `Http.Settings` doesn't exist anymore, it was moved under + `Http.Request` +- `Request`: since we expect you'll need to import `Http` now anyway, you can + just import this from `Http` +- `Settings`: see `toSettings` + + +#### Breaking Changes +- `RequestBuilder` -> `RequestBuilder a`, where the type parameter is the + expected type of the returned payload. +- `get`, `post`, etc. return `RequestBuilder ()`. The default is to make no + attempt to decode anything, so it is `()`. You can use `withExpect` to attach + an `Http.Expect MyType`, which will turn it into a `RequestBuilder MyType`. +- `toRequest` returns an `Http.Request a` +- `send` wraps `Http.send`, [read up on it to see how it works](http://package.elm-lang.org/packages/elm-lang/http/1.0.0/Http#send). + + +#### Additions +- `withExpect`: attach an `Http.Expect` to the request +- `withQueryParams`: decorate the URL with query params + +A sincere thank you to @evancz, @rtfeldman, @bogdanp, and @knewter for time and +discussions that helped me make the decisions that led to these changes! + +And a shoutout to @prikhi for taking the time to update the existing API for +0.18 and publishing it as [priki/elm-http-builder](http://package.elm-lang.org/packages/prikhi/elm-http-builder/latest). diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/CODE_OF_CONDUCT.md b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..3acf1ed --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource@lukewestby.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/LICENSE b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/LICENSE new file mode 100644 index 0000000..85aa5dd --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Luke Westby + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/README.md b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/README.md new file mode 100644 index 0000000..c28e675 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/README.md @@ -0,0 +1,60 @@ +# elm-http-builder + +[![ICARE](https://icarebadge.com/ICARE-white.png)](https://icarebadge.com) +[![Build Status](https://travis-ci.org/lukewestby/elm-http-builder.svg?branch=master)](https://travis-ci.org/lukewestby/elm-http-builder) + +Chainable functions for building HTTP requests. + +**Need help? Join the #http-builder channel in the [Elm Slack](https://elmlang.herokuapp.com)!** + + +> Thanks to @fredcy, @rileylark, and @etaque for the original discussion of the + API, and to @knewter for pairing and discussion on the 0.18 upgrade. + +## Example + +```elm +import Time +import Http +import HttpBuilder exposing (..) +import Json.Decode as Decode +import Json.Encode as Encode + + +itemsDecoder : Decode.Decoder (List String) +itemsDecoder = + Decode.list Decode.string + + +itemEncoder : String -> Encode.Value +itemEncoder item = + Encode.object + [ ("item", Encode.string item) ] + + +handleRequestComplete : Result Http.Error (List String) -> Msg +handleRequestComplete result = + -- Handle the result + +{-| addItem will send a post request to +`"http://example.com/api/items?hello=world"` with the given JSON body, a +custom header, and cookies included. It'll try to decode with `itemsDecoder`. +-} +addItem : String -> Cmd Msg +addItem item = + HttpBuilder.post "http://example.com/api/items" + |> withQueryParams [ ("hello", "world") ] + |> withHeader "X-My-Header" "Some Header Value" + |> withJsonBody (itemEncoder item) + |> withTimeout (10 * Time.second) + |> withExpect (Http.expectJson itemsDecoder) + |> withCredentials + |> send handleRequestComplete +``` + +## Contributing + +I'm happy to receive any feedback and ideas for about additional features. Any +input and pull requests are very welcome and encouraged. If you'd like to help +or have ideas, get in touch with me at @luke_dot_js on Twitter or @luke in the +elmlang Slack! diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/elm-package.json new file mode 100644 index 0000000..521a035 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "4.0.0", + "summary": "Extra functions for more easily building HTTP requests", + "repository": "https://github.com/lukewestby/elm-http-builder.git", + "license": "MIT", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "HttpBuilder" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/http": "1.0.0 <= v < 2.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/scripts/test.sh b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/scripts/test.sh new file mode 100644 index 0000000..32eeb84 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/scripts/test.sh @@ -0,0 +1 @@ +sh ./scripts/unit_tests.sh diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/scripts/unit_tests.sh b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/scripts/unit_tests.sh new file mode 100644 index 0000000..76186af --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/scripts/unit_tests.sh @@ -0,0 +1,3 @@ +cd ./tests/unit +elm-package install -y +elm-test ./Main.elm diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/src/HttpBuilder.elm b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/src/HttpBuilder.elm new file mode 100644 index 0000000..de02d1c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/src/HttpBuilder.elm @@ -0,0 +1,335 @@ +module HttpBuilder + exposing + ( RequestBuilder + , get + , post + , put + , patch + , delete + , options + , trace + , head + , withHeader + , withHeaders + , withStringBody + , withJsonBody + , withMultipartStringBody + , withUrlEncodedBody + , withTimeout + , withCredentials + , withQueryParams + , withExpect + , toRequest + , send + ) + +{-| Extra helpers for more easily building Http requests that require greater +configuration than what is provided by `elm-http` out of the box. + +# Start a request +@docs RequestBuilder, get, post, put, patch, delete, options, trace, head + +# Configure request properties +@docs withHeader, withHeaders, withStringBody, withJsonBody, withMultipartStringBody, withUrlEncodedBody, withTimeout, withCredentials, withQueryParams, withExpect + +# Make the request +@docs toRequest, send +-} + +-- where + +import String +import Task exposing (Task) +import Maybe exposing (Maybe(..)) +import Time exposing (Time) +import Json.Decode as Decode +import Json.Encode as Encode +import Dict exposing (Dict) +import Result exposing (Result(Ok, Err)) +import Http + + +type alias RequestDetails a = + { method : String + , headers : List Http.Header + , url : String + , body : Http.Body + , expect : Http.Expect a + , timeout : Maybe Time + , withCredentials : Bool + , queryParams : List ( String, String ) + } + + +{-| A type for chaining request configuration +-} +type RequestBuilder a + = RequestBuilder (RequestDetails a) + + +requestWithMethodAndUrl : String -> String -> RequestBuilder () +requestWithMethodAndUrl method url = + RequestBuilder + { method = method + , url = url + , headers = [] + , body = Http.emptyBody + , expect = Http.expectStringResponse (\_ -> Ok ()) + , timeout = Nothing + , withCredentials = False + , queryParams = [] + } + + +map : (RequestDetails a -> RequestDetails b) -> RequestBuilder a -> RequestBuilder b +map fn (RequestBuilder details) = + RequestBuilder <| fn details + + +{-| Start building a GET request with a given URL + + get "https://example.com/api/items/1" +-} +get : String -> RequestBuilder () +get = + requestWithMethodAndUrl "GET" + + +{-| Start building a POST request with a given URL + + post "https://example.com/api/items" +-} +post : String -> RequestBuilder () +post = + requestWithMethodAndUrl "POST" + + +{-| Start building a PUT request with a given URL + + put "https://example.com/api/items/1" +-} +put : String -> RequestBuilder () +put = + requestWithMethodAndUrl "PUT" + + +{-| Start building a PATCH request with a given URL + + patch "https://example.com/api/items/1" +-} +patch : String -> RequestBuilder () +patch = + requestWithMethodAndUrl "PATCH" + + +{-| Start building a DELETE request with a given URL + + delete "https://example.com/api/items/1" +-} +delete : String -> RequestBuilder () +delete = + requestWithMethodAndUrl "DELETE" + + +{-| Start building a OPTIONS request with a given URL + + options "https://example.com/api/items/1" +-} +options : String -> RequestBuilder () +options = + requestWithMethodAndUrl "OPTIONS" + + +{-| Start building a TRACE request with a given URL + + trace "https://example.com/api/items/1" +-} +trace : String -> RequestBuilder () +trace = + requestWithMethodAndUrl "TRACE" + + +{-| Start building a HEAD request with a given URL + + head "https://example.com/api/items/1" +-} +head : String -> RequestBuilder () +head = + requestWithMethodAndUrl "HEAD" + + +{-| Add a single header to a request + + get "https://example.com/api/items/1" + |> withHeader "Content-Type" "application/json" +-} +withHeader : String -> String -> RequestBuilder a -> RequestBuilder a +withHeader key value = + map <| \details -> { details | headers = (Http.header key value) :: details.headers } + + +{-| Add many headers to a request + + get "https://example.com/api/items/1" + |> withHeaders [("Content-Type", "application/json"), ("Accept", "application/json")] +-} +withHeaders : List ( String, String ) -> RequestBuilder a -> RequestBuilder a +withHeaders headerPairs = + map <| + \details -> + { details + | headers = (List.map (uncurry Http.header) headerPairs) ++ details.headers + } + + +withBody : Http.Body -> RequestBuilder a -> RequestBuilder a +withBody body = + map <| \details -> { details | body = body } + + +{-| Convenience function for adding a string body to a request + + post "https://example.com/api/items/1" + |> withStringBody "application/json" """{ "sortBy": "coolness", "take": 10 }""" +-} +withStringBody : String -> String -> RequestBuilder a -> RequestBuilder a +withStringBody contentType value = + withBody <| Http.stringBody contentType value + + +{-| Convenience function for adding a JSON body to a request + + params = Json.Encode.object + [ ("sortBy", Json.Encode.string "coolness") + , ("take", Json.Encode.int 10) + ] + + post "https://example.com/api/items/1" + |> withJsonBody params +-} +withJsonBody : Encode.Value -> RequestBuilder a -> RequestBuilder a +withJsonBody value = + withBody <| Http.jsonBody value + + +{-| Convience function for adding multipart bodies composed of String, String +key-value pairs. Since `Http.stringData` is currently the only `Http.Data` +creator having this function removes the need to use the `Http.Data` type in +your type signatures. + + post "https://example.com/api/items/1" + |> withMultipartStringBody [("user", JS.encode user)] +-} +withMultipartStringBody : List ( String, String ) -> RequestBuilder a -> RequestBuilder a +withMultipartStringBody partPairs = + map <| + \details -> + { details + | body = Http.multipartBody <| List.map (uncurry Http.stringPart) partPairs + } + + +{-| Convenience function for adding url encoded bodies + + post "https://example.com/api/whatever" + |> withUrlEncodedBody [("user", "Luke"), ("pwd", "secret")] +-} +withUrlEncodedBody : List ( String, String ) -> RequestBuilder a -> RequestBuilder a +withUrlEncodedBody = + joinUrlEncoded >> withStringBody "application/x-www-form-urlencoded" + + +{-| Set the `timeout` setting on the request + + get "https://example.com/api/items/1" + |> withTimeout (10 * Time.second) +-} +withTimeout : Time -> RequestBuilder a -> RequestBuilder a +withTimeout timeout = + map <| \details -> { details | timeout = Just timeout } + + +{-| Set the `withCredentials` flag on the request to True. Works via +[`XMLHttpRequest#withCredentials`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials) + + get "https://example.com/api/items/1" + |> withCredentials +-} +withCredentials : RequestBuilder a -> RequestBuilder a +withCredentials = + map <| \details -> { details | withCredentials = True } + + +{-| Choose an `Expect` for the request + + get "https://example.com/api/items/1" + |> withExpect (Http.expectJson itemsDecoder) +-} +withExpect : Http.Expect b -> RequestBuilder a -> RequestBuilder b +withExpect expect = + map <| \details -> { details | expect = expect } + + +{-| Add some query params to the url for the request + + get "https://example.com/api/items/1" + |> withQueryParams [("hello", "world"), ("foo", "bar")] + |> withQueryParams [("baz", "qux")] + -- sends a request to https://example.com/api/items/1?hello=world&foo=bar&baz=qux +-} +withQueryParams : List ( String, String ) -> RequestBuilder a -> RequestBuilder a +withQueryParams queryParams = + map <| \details -> { details | queryParams = details.queryParams ++ queryParams } + + +{-| Extract the Http.Request component of the builder, for introspection and +testing +-} +toRequest : RequestBuilder a -> Http.Request a +toRequest (RequestBuilder details) = + let + encodedParams = + joinUrlEncoded details.queryParams + + fullUrl = + if String.isEmpty encodedParams then + details.url + else + details.url ++ "?" ++ encodedParams + in + Http.request + { method = details.method + , url = fullUrl + , headers = details.headers + , body = details.body + , expect = details.expect + , timeout = details.timeout + , withCredentials = details.withCredentials + } + + +{-| Send the request using Http.send +-} +send : (Result Http.Error a -> msg) -> RequestBuilder a -> Cmd msg +send tagger builder = + Http.send tagger <| toRequest builder + + +joinUrlEncoded : List ( String, String ) -> String +joinUrlEncoded args = + String.join "&" (List.map queryPair args) + + +queryPair : ( String, String ) -> String +queryPair ( key, value ) = + queryEscape key ++ "=" ++ queryEscape value + + +queryEscape : String -> String +queryEscape = + Http.encodeUri >> replace "%20" "+" + + +replace : String -> String -> String -> String +replace old new = + String.split old >> String.join new diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/.gitignore b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/.gitignore new file mode 100644 index 0000000..b772d0c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/.gitignore @@ -0,0 +1,2 @@ +/elm-stuff/ +/tests.js diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Main.elm b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Main.elm new file mode 100644 index 0000000..afc5c3c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Main.elm @@ -0,0 +1,14 @@ +port module Main exposing (..) + +import Test +import Test.Runner.Node as Runner exposing (TestProgram) +import Tests +import Json.Encode exposing (Value) + + +port emit : ( String, Value ) -> Cmd msg + + +main : TestProgram +main = + Runner.run emit Tests.all diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Native/Polyfills.js b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Native/Polyfills.js new file mode 100644 index 0000000..9fa4533 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Native/Polyfills.js @@ -0,0 +1,13 @@ +var _user$project$Native_Polyfills = (function () { + global.FormData = function () { this._data = []; }; + Object.defineProperty(global.FormData.prototype, 'append', { + value: function () { + this._data.push(Array.prototype.slice.call(arguments)); + }, + enumerable: false, + }); + + return { + enabled: true, + }; +}()); diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Tests.elm b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Tests.elm new file mode 100644 index 0000000..b8835d9 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/Tests.elm @@ -0,0 +1,110 @@ +module Tests exposing (..) + +import Time +import Http exposing (Request) +import Json.Decode as Decode +import Json.Encode as Encode +import Test exposing (Test, test, describe) +import Expect +import HttpBuilder exposing (..) +import Native.Polyfills + + +polyfillsEnabled : Bool +polyfillsEnabled = + Native.Polyfills.enabled + + +testDecoder : Decode.Decoder String +testDecoder = + Decode.at [ "hello" ] Decode.string + + +alwaysEmptyOk : a -> Result x () +alwaysEmptyOk _ = + Ok () + + +expectNothing : Http.Expect () +expectNothing = + Http.expectStringResponse alwaysEmptyOk + + +requestWithBody : Http.Body -> Request () +requestWithBody body = + Http.request + { method = "POST" + , url = "example.com" + , expect = expectNothing + , timeout = Nothing + , withCredentials = False + , headers = [] + , body = body + } + + +all : Test +all = + describe "HttpBuilder" + [ test "polyfills are set up" <| + \() -> polyfillsEnabled |> Expect.equal True + , test "Request Building" <| + \() -> + let + actual = + get "http://example.com" + |> withHeader "Test" "Header" + |> withHeaders [ ( "OtherTest", "Header" ) ] + |> withStringBody "text/plain" """{ "test": "body" }""" + |> withTimeout (10 * Time.second) + |> withCredentials + |> withQueryParams [ ( "hello", "world" ) ] + |> withExpect expectNothing + |> toRequest + + expected = + Http.request + { method = "GET" + , url = "http://example.com?hello=world" + , body = Http.stringBody "text/plain" """{ "test": "body" }""" + , timeout = Just (10 * Time.second) + , expect = expectNothing + , withCredentials = True + , headers = + [ Http.header "OtherTest" "Header" + , Http.header "Test" "Header" + ] + } + in + Expect.equal expected actual + , describe "with*Body functions" + [ test "withStringBody applies string directly" <| + \() -> + post "example.com" + |> withStringBody "text/plain" "hello" + |> withExpect expectNothing + |> toRequest + |> Expect.equal (requestWithBody (Http.stringBody "text/plain" "hello")) + , test "withJsonBody applies a Json.Value as a string" <| + \() -> + post "example.com" + |> withJsonBody (Encode.string "hello") + |> withExpect expectNothing + |> toRequest + |> Expect.equal (requestWithBody (Http.jsonBody (Encode.string "hello"))) + , test "withUrlEncodedBody encodes pairs as url components" <| + \() -> + post "example.com" + |> withUrlEncodedBody [ ( "hello", "w orld" ) ] + |> withExpect expectNothing + |> toRequest + |> Expect.equal (requestWithBody (Http.stringBody "application/x-www-form-urlencoded" "hello=w+orld")) + , test "withMultipartStringBody passes through to Http.multipart" <| + \() -> + post "example.com" + |> withMultipartStringBody [ ( "hello", "world" ) ] + |> withExpect expectNothing + |> toRequest + |> Expect.equal (requestWithBody (Http.multipartBody [ Http.stringPart "hello" "world" ])) + ] + ] diff --git a/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/elm-package.json b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/elm-package.json new file mode 100644 index 0000000..9827f23 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/lukewestby/elm-http-builder/4.0.0/tests/unit/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "1.0.0", + "summary": "Sample Elm Test", + "repository": "https://github.com/user/project.git", + "license": "BSD-3-Clause", + "source-directories": [ + ".", + "../../src" + ], + "exposed-modules": [], + "native-modules": true, + "dependencies": { + "elm-community/elm-test": "3.0.0 <= v < 4.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/http": "1.0.0 <= v < 2.0.0", + "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/.gitignore b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/.gitignore new file mode 100644 index 0000000..0103004 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/.gitignore @@ -0,0 +1,8 @@ +elm-stuff +elm.js +index.html +documentation.json + +test/dieharder/elm*.txt +test/dieharder/generate_files.js +test/dieharder/raw_out.js diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/LICENSE b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/LICENSE new file mode 100644 index 0000000..f15e904 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2015-2016, Max Goldstein + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Max Goldstein nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/README.md b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/README.md new file mode 100644 index 0000000..9bdb3ea --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/README.md @@ -0,0 +1,47 @@ +# Random.Pcg for Elm + +> "The generation of random numbers is too important to be left to chance." – Robert R. Coveyou + +An alternate random number generator built around four principles: + +* **Statistical Quality.** If you use any seed less than 53,668 and generate one bool, it will be `True` – if you're +using core's `Random` module. More sophisticated statistical tests spot patterns in the "random" numbers almost +immediately. Would you want to trust the accuracy of your [fuzz +tests](http://package.elm-lang.org/packages/elm-community/elm-test/latest/) to such a flawed algorithm? This library +produces far less predictable and biased output, especially if you use thousands of random numbers. See +`test/dieharder` for more details. + +* **Useful features.** This library exports `constant` and `andMap`, which are conspicuously absent from core, along +with other helpful functions for composing generators. Particularly interesting is `independentSeed`, which allows for +lazy lists and isolated components to generate as much randomness as they need, when they need it. + +* **Performace.** This library will generate floats about 3.5 times faster than core, and ints do not regress. These +figures stand to improve pending some optimizations to the compiler. You can see the [full +benchmark results](https://github.com/mgold/elm-random-pcg/issues/5#issuecomment-236398261). + +* **Compatibility.** This library is a drop-in replacement for core's Random module. Specifically, you +can replace `import Random` with `import Random.Pcg as Random` and everything will continue to work. (The one exception is third party +libraries like [elm-random-extra](http://package.elm-lang.org/packages/NoRedInk/elm-random-extra/latest/Random-Extra).) + +This is an implementation of [PCG](http://www.pcg-random.org/) by M. E. O'Neil. The generator is **not cryptographically +secure**. + +Please report bugs, feature requests, and other issues [on GitHub](https://github.com/mgold/elm-random-pcg/issues/new). + +## Changelog (major versions only) +### 4.0.0 +* Upgraded for 0.18. +* Argument order of `andThen` flipped. + +### 3.0.0 +* Change implementation to use the RXS-M-SH variant of PCG. Now much faster and not much worse statistically. +* Remove `initialSeed2`, since there are now only 32 bits of state. +* `Random.Pcg.Interop.fission` has been changed to a (core) generator of (PCG) seeds. +* Add `generate` to match core 4.x API. Implemented by Richard Feldman. + +### 2.0.0 +* Upgraded for 0.17. +* `generate` renamed `step` to match core 4.x API. +* Module renamed `Random.Pcg` from `Random.PCG`. +* `split` has been removed; use `independentSeed`. +* `minInt` and `maxInt` values changed to match core. diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/elm-package.json b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/elm-package.json new file mode 100644 index 0000000..60cffa1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "4.0.2", + "summary": "A faster, more featureful, statistically better, & compatible random generator", + "repository": "https://github.com/mgold/elm-random-pcg.git", + "license": "BSD3", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Random.Pcg", + "Random.Pcg.Interop" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/src/Random/Pcg.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/src/Random/Pcg.elm new file mode 100644 index 0000000..3c19158 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/src/Random/Pcg.elm @@ -0,0 +1,853 @@ +module Random.Pcg exposing (Generator, Seed, bool, int, float, oneIn, sample, pair, list, maybe, choice, choices, frequency, map, map2, map3, map4, map5, andMap, filter, constant, andThen, minInt, maxInt, step, generate, initialSeed, independentSeed, fastForward, toJson, fromJson) + +{-| Generate psuedo-random numbers and values, by constructing +[generators](#Generator) for them. There are a bunch of basic generators like +[`bool`](#bool) and [`int`](#int) that you can build up into fancier generators +with functions like [`list`](#list) and [`map`](#map). + +You run a `Generator` by calling the [`step`](#step) function, which +also takes a random [`Seed`](#Seed), and passes back a new seed. You should +never use the same seed twice because you will get the same result! If you need +random values over time, you should store the most recent seed in your model. +Alternatively, use [`generate`](#generate) to obtain random values from the Elm +runtime. + +This is an implementation of [PCG](http://www.pcg-random.org/) by M. E. O'Neil, +and is not cryptographically secure. + +# Getting Started +@docs initialSeed, step, generate + +# Basic Generators +@docs Generator, bool, int, float, oneIn, sample + +# Combining Generators +@docs pair, list, maybe, choice, choices, frequency + +# Custom Generators +@docs constant, map, map2, map3, map4, map5, andMap, andThen, filter + +# Working With Seeds +@docs Seed, independentSeed, fastForward, toJson, fromJson + +# Constants +@docs minInt, maxInt +-} + +import Bitwise +import Json.Encode +import Json.Decode +import Task +import Tuple +import Time + + +{-| A `Generator` is like a recipe for generating certain random values. So a +`Generator Int` describes how to generate integers and a `Generator String` +describes how to generate strings. +-} +type Generator a + = Generator (Seed -> ( a, Seed )) + + +{-| Generate a random value as specified by a given `Generator`, using a `Seed` +and returning a new one. + +In the following example, we are trying to generate numbers between 0 and 100 +with the `int 0 100` generator. Each time we call `generate` we need to provide +a seed. This will produce a random number and a *new* seed to use if we want to +run other generators later. + + (x, seed1) = step (int 0 100) seed0 + (y, seed2) = step (int 0 100) seed1 + (z, seed3) = step (int 0 100) seed2 + [x, y, z] -- [85, 0, 38] + +Notice that we use different seeds on each line. This is important! If you reuse +the same seed, you get the same results. + + (x, _) = step (int 0 100) seed0 + (y, _) = step (int 0 100) seed0 + (z, _) = step (int 0 100) seed0 + [x,y,z] -- [85, 85, 85] + +As you can see, threading seeds through many calls to `step` is tedious and +error-prone. That's why this library includes many functions to build more +complicated generators, allowing you to call `step` only a small number of +times. + +Our example is best written as: + + (xs, newSeed) = step (list 3 <| int 0 100) seed0 + xs -- [85, 0, 38] + +-} +step : Generator a -> Seed -> ( a, Seed ) +step (Generator generator) seed = + generator seed + + +{-| Create a Command that will generate random values according to the supplied +`Generator`. + +Think of this function as an alternative to `step`, since they both provide a +way to actually get the random values that you want. This function frees you +from worrying about seeds entirely, but as a tradeoff, you get your random +values asynchronously, in their own Message. Additionally, due to constraints on +third-party packages, it's possible that multiple commands sent at the same +moment will return the same values. + +You can also think of this function as an alternative to `independentSeed`, +since they both allow you to use randomness in deeply nested components. In the +case of this function, it's through sending Commands up the chain that you have +to set up anyway. +-} +generate : (a -> msg) -> Generator a -> Cmd msg +generate toMsg generator = + Time.now + |> Task.map (round >> initialSeed >> step generator >> Tuple.first) + |> Task.perform toMsg + + +{-| A `Seed` is the source of randomness in the whole system. It hides the +current state of the random number generator. + +Generators, not seeds, are the primary data structure for generating random +values. Generators are much easier to chain and combine than functions that take +and return seeds. Creating and managing seeds should happen "high up" in your +program. +-} +type Seed + = Seed Int Int + + +{-| Initialize the state of the random number generator. The input should be +a randomly chosen 32-bit integer. You can generate and copy random integers to +create a reproducible psuedo-random generator. + + $ node + > Math.floor(Math.random()*0xFFFFFFFF) + 227852860 + + -- Elm + seed0 : Seed + seed0 = initialSeed 227852860 + +Alternatively, you can generate the random integers on page load and pass them +through a port. The program will be different every time. + + -- Elm + port randomSeed : Int + + seed0 : Seed + seed0 = initialSeed randomSeed + + -- JS + Elm.ModuleName.fullscreen( + { randomSeed: Math.floor(Math.random()*0xFFFFFFFF) }) + +Either way, you should initialize a random seed only once. After that, whenever +you use a seed, you'll get another one back. +-} +initialSeed : Int -> Seed +initialSeed x = + let + (Seed state1 incr) = + next (Seed 0 1013904223) + + state2 = + state1 + x |> Bitwise.shiftRightZfBy 0 + in + next (Seed state2 incr) + + + +{-- +The magic constants 1013904223 and 1664525 are from Numerical Recipes. They are +inlined for performance. +--} + + +next : Seed -> Seed +next (Seed state0 incr) = + Seed ((state0 * 1664525) + incr |> Bitwise.shiftRightZfBy 0) incr + + + +-- obtain a psuedorandom 32-bit integer + + +peel : Seed -> Int +peel (Seed state _) = + -- This is the RXS-M-SH version of PCG, see section 6.3.4 of the paper + -- and line 184 of pcg_variants.h in the 0.94 C implementation + let + word = + ((state |> Bitwise.shiftRightZfBy ((state |> Bitwise.shiftRightZfBy 28) + 4)) |> Bitwise.xor state) * 277803737 + in + Bitwise.xor (word |> Bitwise.shiftRightZfBy 22) word + |> Bitwise.shiftRightZfBy 0 + + +{-| Generate 32-bit integers in a given range, inclusive. + + int 0 10 -- an integer between zero and ten + int -5 5 -- an integer between -5 and 5 + + int minInt maxInt -- an integer in the widest range feasible + +This function *can* produce values outside of the range [[`minInt`](#minInt), +[`maxInt`](#maxInt)] but sufficient randomness is not guaranteed. + +*Performance note:* This function will be ~1.5x faster if the range (i.e. `max - min + 1`) is a power of two. The +effect will only be noticable if you are generating tens of thousands of random integers. + +-} +int : Int -> Int -> Generator Int +int a b = + Generator <| + \seed0 -> + let + ( lo, hi ) = + if a < b then + ( a, b ) + else + ( b, a ) + + range = + hi - lo + 1 + in + -- fast path for power of 2 + if (range |> Bitwise.and (range - 1)) == 0 then + ( (peel seed0 |> Bitwise.and (range - 1) |> Bitwise.shiftRightZfBy 0) + lo, next seed0 ) + else + let + threshhold = + -- essentially: period % max + rem (-range |> Bitwise.shiftRightZfBy 0) range |> Bitwise.shiftRightZfBy 0 + + accountForBias : Seed -> ( Int, Seed ) + accountForBias seed = + let + x = + peel seed + + seedN = + next seed + in + if x < threshhold then + -- in practice this recurses almost never + accountForBias seedN + else + ( rem x range + lo, seedN ) + in + accountForBias seed0 + + +bit53 = + 9007199254740992.0 + + +bit27 = + 134217728.0 + + +{-| Generate floats in a given range. The following example is a generator +that produces numbers between 0 and 1. + + probability : Generator Float + probability = + float 0 1 +-} +float : Float -> Float -> Generator Float +float min max = + Generator <| + \seed0 -> + let + -- Get 64 bits of randomness + seed1 = + next seed0 + + n0 = + peel seed0 + + n1 = + peel seed1 + + -- Get a uniformly distributed IEEE-754 double between 0.0 and 1.0 + hi = + toFloat (n0 |> Bitwise.and 0x03FFFFFF) * 1.0 + + lo = + toFloat (n1 |> Bitwise.and 0x07FFFFFF) * 1.0 + + val = + ((hi * bit27) + lo) / bit53 + + -- Scale it into our range + range = + abs (max - min) + + scaled = + val * range + min + in + ( scaled, next seed1 ) + + +{-| Create a generator that produces boolean values with equal probability. This +example simulates flipping three coins and checking if they're all heads. + + threeHeads : Generator Bool + threeHeads = + map3 (\a b c -> a && b && c) bool bool bool +-} +bool : Generator Bool +bool = + map ((==) 1) (int 0 1) + + +{-| The maximum value for randomly generated 32-bit ints. +-} +maxInt : Int +maxInt = + 2147483647 + + +{-| The minimum value for randomly generated 32-bit ints. +-} +minInt : Int +minInt = + -2147483648 + + +{-| Create a pair of random values. A common use of this might be to generate +a point in a certain 2D space. Imagine we have a collage that is 400 pixels +wide and 200 pixels tall. + + randomPoint : Generator (Int,Int) + randomPoint = + pair (int -200 200) (int -100 100) + +-} +pair : Generator a -> Generator b -> Generator ( a, b ) +pair genA genB = + map2 (,) genA genB + + +{-| Create a list of random values of a given length. + + floatList : Generator (List Float) + floatList = + list 10 (float 0 1) + + intList : Generator (List Int) + intList = + list 5 (int 0 100) + + intPairs : Generator (List (Int, Int)) + intPairs = + list 10 <| pair (int 0 100) (int 0 100) +-} +list : Int -> Generator a -> Generator (List a) +list n (Generator generate) = + Generator <| + \seed -> + listHelp [] n generate seed + + +listHelp : List a -> Int -> (Seed -> ( a, Seed )) -> Seed -> ( List a, Seed ) +listHelp list n generate seed = + if n < 1 then + ( list, seed ) + else + let + ( value, newSeed ) = + generate seed + in + listHelp (value :: list) (n - 1) generate newSeed + + +{-| Create a generator that always produces the value provided. This is useful +when creating complicated chained generators and you need to handle a simple +case. It's also useful for the base case of recursive generators. +-} +constant : a -> Generator a +constant value = + Generator (\seed -> ( value, seed )) + + +{-| Transform the values produced by a generator using a stateless function as a +callback. + +These examples show how to generate letters based on a basic integer generator. + + lowercaseLetter : Generator Char + lowercaseLetter = + map (\n -> Char.fromCode (n + 97)) (int 0 25) + + uppercaseLetter : Generator Char + uppercaseLetter = + map (\n -> Char.fromCode (n + 65)) (int 0 25) + +-} +map : (a -> b) -> Generator a -> Generator b +map func (Generator genA) = + Generator <| + \seed0 -> + let + ( a, seed1 ) = + genA seed0 + in + ( func a, seed1 ) + + +{-| Combine two generators. This is useful when you have a function with two +arguments that both need to be given random inputs. + + pointInCircle : Float -> Generator (Float, Float) + pointInCircle radius = + let + r = float 0 radius + theta = map degrees (float 0 360) + in + map2 (curry fromPolar) r theta + +-} +map2 : (a -> b -> c) -> Generator a -> Generator b -> Generator c +map2 func (Generator genA) (Generator genB) = + Generator <| + \seed0 -> + let + ( a, seed1 ) = + genA seed0 + + ( b, seed2 ) = + genB seed1 + in + ( func a b, seed2 ) + + +{-| Combine three generators. This could be used to produce random colors. + + rgb : Generator Color.Color + rgb = + map3 Color.rgb (int 0 255) (int 0 255) (int 0 255) + + hsl : Generator Color.Color + hsl = + map3 Color.hsl (map degrees (float 0 360)) (float 0 1) (float 0 1) +-} +map3 : (a -> b -> c -> d) -> Generator a -> Generator b -> Generator c -> Generator d +map3 func (Generator genA) (Generator genB) (Generator genC) = + Generator <| + \seed0 -> + let + ( a, seed1 ) = + genA seed0 + + ( b, seed2 ) = + genB seed1 + + ( c, seed3 ) = + genC seed2 + in + ( func a b c, seed3 ) + + +{-| Combine four generators. This could be used to produce random transparent +colors. + + rgba : Generator Color.Color + rgba = + map4 Color.rgba (int 0 255) (int 0 255) (int 0 255) (float 0 1) +-} +map4 : (a -> b -> c -> d -> e) -> Generator a -> Generator b -> Generator c -> Generator d -> Generator e +map4 func (Generator genA) (Generator genB) (Generator genC) (Generator genD) = + Generator <| + \seed0 -> + let + ( a, seed1 ) = + genA seed0 + + ( b, seed2 ) = + genB seed1 + + ( c, seed3 ) = + genC seed2 + + ( d, seed4 ) = + genD seed3 + in + ( func a b c d, seed4 ) + + +{-| Combine five generators. +-} +map5 : (a -> b -> c -> d -> e -> f) -> Generator a -> Generator b -> Generator c -> Generator d -> Generator e -> Generator f +map5 func (Generator genA) (Generator genB) (Generator genC) (Generator genD) (Generator genE) = + Generator <| + \seed0 -> + let + ( a, seed1 ) = + genA seed0 + + ( b, seed2 ) = + genB seed1 + + ( c, seed3 ) = + genC seed2 + + ( d, seed4 ) = + genD seed3 + + ( e, seed5 ) = + genE seed4 + in + ( func a b c d e, seed5 ) + + +{-| Map over any number of generators. + + randomPerson : Generator Person + randomPerson = + person `map` genFirstName + `andMap` genLastName + `andMap` genBirthday + `andMap` genPhoneNumber + `andMap` genAddress + `andMap` genEmail +-} +andMap : Generator (a -> b) -> Generator a -> Generator b +andMap = + map2 (<|) + + +{-| Chain random operations by providing a callback that accepts a +randomly-generated value. The random value can be used to drive more randomness. + +This example shows how we can use `andThen` to generate a list of random values +*and* random length. Then we use `map` to apply a stateless function to that +list. Assume we already have `genName : Generator String` defined. + + authors : Generator String + authors = + int 1 5 -- number of authors + |> andThen (\i -> list i genName) + |> map (\ns -> + case ns of + [n] -> + "Author: " ++ n + n::ns -> + "Authors: " ++ String.join ", " ns ++ " and " ++ n + [] -> + "This can't happen" + ) + +If you find yourself calling `constant` in every branch of the callback, you can +probably use `map` instead. +-} +andThen : (a -> Generator b) -> Generator a -> Generator b +andThen callback (Generator generateA) = + Generator <| + \seed -> + let + ( result, newSeed ) = + generateA seed + + (Generator generateB) = + callback result + in + generateB newSeed + + +{-| Filter a generator so that all generated values satisfy the given predicate. + + evens : Generator Int + evens = + filter (\i -> i % 2 == 0) (int minInt maxInt) + +**Warning:** If the predicate is unsatisfiable, the generator will not terminate, your +application will hang with an infinite loop, and you will be sad. You should +also avoid predicates that are merely very difficult to satisfy. + + badCrashingGenerator = + filter (\_ -> False) anotherGenerator + + verySlowGenerator = + filter (\i -> i % 2000 == 0) (int minInt maxInt) +-} +filter : (a -> Bool) -> Generator a -> Generator a +filter predicate generator = + Generator (retry generator predicate) + + +retry : Generator a -> (a -> Bool) -> Seed -> ( a, Seed ) +retry generator predicate seed = + let + ( candidate, newSeed ) = + step generator seed + in + if predicate candidate then + ( candidate, newSeed ) + else + retry generator predicate newSeed + + +{-| Produce `True` one-in-n times on average. + +Do not pass a value less then one to this function. + + flippedHeads = oneIn 2 + rolled6 = oneIn 6 + criticalHit = oneIn 20 +-} +oneIn : Int -> Generator Bool +oneIn n = + map ((==) 1) (int 1 n) + + +{-| Given a list, choose an element uniformly at random. `Nothing` is only +produced if the list is empty. + + type Direction = North | South | East | West + + direction : Generator Direction + direction = + sample [North, South, East, West] + |> map (Maybe.withDefault North) + +-} +sample : List a -> Generator (Maybe a) +sample = + let + find k ys = + case ys of + [] -> + Nothing + + z :: zs -> + if k == 0 then + Just z + else + find (k - 1) zs + in + \xs -> map (\i -> find i xs) (int 0 (List.length xs - 1)) + + +{-| Choose between two values with equal probability. + + type Flip = Heads | Tails + + coinFlip : Generator Flip + coinFlip = + choice Heads Tails +-} +choice : a -> a -> Generator a +choice x y = + map + (\b -> + if b then + x + else + y + ) + bool + + +{-| Create a generator that chooses a generator from a list of generators +with equal probability. + +**Warning:** Do not pass an empty list or your program will crash! In practice +this is usually not a problem since you pass a list literal. +-} +choices : List (Generator a) -> Generator a +choices gens = + frequency <| List.map (\g -> ( 1, g )) gens + + +{-| Create a generator that chooses a generator from a list of generators +based on the provided weight. The likelihood of a given generator being +chosen is its weight divided by the total weight (which doesn't have to equal 1). + +**Warning:** Do not pass an empty list or your program will crash! In practice +this is usually not a problem since you pass a list literal. +-} +frequency : List ( Float, Generator a ) -> Generator a +frequency pairs = + let + total = + List.sum <| List.map (Tuple.first >> abs) pairs + + pick choices n = + case choices of + ( k, g ) :: rest -> + if n <= k then + g + else + pick rest (n - k) + + _ -> + Debug.crash "Empty list passed to Random.Pcg.frequency!" + in + float 0 total |> andThen (pick pairs) + + +{-| Produce `Just` a value on `True`, and `Nothing` on `False`. + +You can use `bool` or `oneIn n` for the first argument. +-} +maybe : Generator Bool -> Generator a -> Generator (Maybe a) +maybe genBool genA = + genBool + |> andThen + (\b -> + if b then + map Just genA + else + constant Nothing + ) + + +{-| A generator that produces a seed that is independent of any other seed in +the program. These seeds will generate their own unqiue sequences of random +values. They are useful when you need an unknown amount of randomness *later* +but can request only a fixed amount of randomness *now*. + +Let's say you write a component that uses some randomness to initialize itself +and then never needs randomness again. You can easily write a `Generator +Component` by mapping over the generators it needs. But if component requires +randomness after initialization, it should keep its own independent seed, which +it can get by mapping over *this* generator. + + type alias Component = { seed : Seed } + + genComponent : Generator Component + genComponent = map Component independentSeed + +If you have a lot of components, you can initialize them like so: + + genComponents : List (Seed -> a) -> Generator (List a) + genComponents constructors = + list (List.length constructors) independentSeed + |> map (List.map2 (<|) constructors) + +The independent seeds are extremely likely to be distinct for all practical +purposes. However, it is not proven that there are no pathological cases. +-} +independentSeed : Generator Seed +independentSeed = + Generator <| + \seed0 -> + let + gen = + int 0 0xFFFFFFFF + + ( ( state, b, c ), seed1 ) = + step (map3 (,,) gen gen gen) seed0 + + {-- + Although it probably doesn't hold water theoretically, xor two + random numbers to make an increment less likely to be + pathological. Then make sure that it's odd, which is required. + Finally step it once before use. + --} + incr = + (Bitwise.xor b c) |> Bitwise.or 1 + in + ( seed1, next <| Seed state incr ) + + +mul32 : Int -> Int -> Int +mul32 a b = + -- multiply 32-bit integers without overflow + let + ah = + (a |> Bitwise.shiftRightZfBy 16) |> Bitwise.and 0xFFFF + + al = + Bitwise.and a 0xFFFF + + bh = + (b |> Bitwise.shiftRightZfBy 16) |> Bitwise.and 0xFFFF + + bl = + Bitwise.and b 0xFFFF + in + -- The Bitwise.or could probably be replaced with shiftRightZfBy but I'm not positive? + (al * bl) + (((ah * bl + al * bh) |> Bitwise.shiftLeftBy 16) |> Bitwise.shiftRightZfBy 0) |> Bitwise.or 0 + + +{-| Fast forward a seed the given number of steps, which may be negative (the +seed will be "rewound"). This allows a single seed to serve as a random-access +lookup table of random numbers. (To be sure no one else uses the seed, use +`step independentSeed` to split off your own.) + + diceRollTable : Int -> Int + diceRollTable i = + fastForward i mySeed |> step (int 1 6) |> Tuple.first +-} +fastForward : Int -> Seed -> Seed +fastForward delta0 (Seed state0 incr) = + let + helper : Int -> Int -> Int -> Int -> Int -> Bool -> ( Int, Int ) + helper accMult accPlus curMult curPlus delta repeat = + let + ( accMult_, accPlus_ ) = + if Bitwise.and delta 1 == 1 then + ( mul32 accMult curMult + , mul32 accPlus curMult + curPlus |> Bitwise.shiftRightZfBy 0 + ) + else + ( accMult, accPlus ) + + curPlus_ = + mul32 (curMult + 1) curPlus + + curMult_ = + mul32 curMult curMult + + newDelta = + -- divide by 2 + delta |> Bitwise.shiftRightZfBy 1 + in + if newDelta == 0 then + if delta0 < 0 && repeat then + -- if passed a negative number, negate everything once + helper accMult_ accPlus_ curMult_ curPlus_ -1 False + else + ( accMult_, accPlus_ ) + else + helper accMult_ accPlus_ curMult_ curPlus_ newDelta repeat + + ( accMultFinal, accPlusFinal ) = + -- magic constant same as in next + helper 1 0 1664525 incr delta0 True + in + Seed (mul32 accMultFinal state0 + accPlusFinal |> Bitwise.shiftRightZfBy 0) incr + + +{-| Serialize a seed as a [JSON +value](http://package.elm-lang.org/packages/elm-lang/core/latest/Json-Encode#Value) +to be sent out a port, stored in local storage, and so on. The seed can be +recovered using `fromJson`. + +Do not inspect or change the resulting JSON value. +-} +toJson : Seed -> Json.Encode.Value +toJson (Seed state incr) = + Json.Encode.list [ Json.Encode.int state, Json.Encode.int incr ] + + +{-| A JSON decoder that can recover seeds encoded using `toJson`. Alternatively, +pass an integer to create a seed using `initialSeed`. + + Json.Decode.decodeValue fromJson (toJson mySeed) == Ok mySeed +-} +fromJson : Json.Decode.Decoder Seed +fromJson = + Json.Decode.oneOf + [ Json.Decode.map2 Seed + (Json.Decode.index 0 Json.Decode.int) + (Json.Decode.index 1 Json.Decode.int) + , Json.Decode.map initialSeed Json.Decode.int + ] diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/src/Random/Pcg/Interop.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/src/Random/Pcg/Interop.elm new file mode 100644 index 0000000..0397aeb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/src/Random/Pcg/Interop.elm @@ -0,0 +1,29 @@ +module Random.Pcg.Interop exposing (fission) + +{-| Provides a function to create a PCG seed from a seed in the core library. +This is useful for library writers who need a splittable or most robust PRNG but +don't want to require client code to use the PCG implementation. + +```elm +import Random +import Random.Pcg +import Random.Pcg.Interop as Random.Pcg +``` + +@docs fission +-} + +import Random +import Random.Pcg + + +{-| Use the core library's random seed to produce a PCG random seed. + +It seems that the package website doesn't show modules in type annotations, so here it is in full: + + fission : Random.Generator (Random.Pcg.Seed) + +-} +fission : Random.Generator (Random.Pcg.Seed) +fission = + Random.int 0 0xFFFFFFFF |> Random.map Random.Pcg.initialSeed diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/README.md b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/README.md new file mode 100644 index 0000000..669d1fb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/README.md @@ -0,0 +1,4 @@ +# Random.Pcg Tests + +The tests in this directory are one-off simple programs to confirm that certain functions aren't obviously wrong. +Heavyweight statistical tests are under `dieharder`. Benchmarks (using a 0.16 benchmarking lib) are in `benchmark`. diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Bench/Native.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Bench/Native.elm new file mode 100644 index 0000000..58bd9c2 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Bench/Native.elm @@ -0,0 +1,26 @@ +module Bench.Native exposing (..) + +import Native.Benchmark + + +type Benchmark + = Benchmark + + +type BenchmarkSuite + = BenchmarkSuite + + +bench : String -> (() -> a) -> Benchmark +bench = + Native.Benchmark.bench + + +suite : String -> List (Benchmark) -> BenchmarkSuite +suite = + Native.Benchmark.suite + + +run : List (BenchmarkSuite) -> b -> b +run = + Native.Benchmark.run diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Bencher.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Bencher.elm new file mode 100644 index 0000000..a8dc6c1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Bencher.elm @@ -0,0 +1,45 @@ +module Main exposing (main) + +import Html +import Html.App +import Bench.Native as Benchmark +import Bench.Native exposing (Benchmark, BenchmarkSuite, bench, suite) +import Random.Pcg as Ran + + +main : Program Never +main = + Html.App.beginnerProgram + { model = () + , update = \_ _ -> () + , view = \() -> Html.text "Done!" + } + |> Benchmark.run [ mySuite ] + + +seed : Ran.Seed +seed = + Ran.initialSeed 141053960 + + +n = + 1000 + + +mySuite : BenchmarkSuite +mySuite = + suite + "Random number suite" + [ bench "flip a coin" (\_ -> Ran.step Ran.bool seed) + , bench ("flip " ++ toString n ++ " coins") (\_ -> Ran.step (Ran.list n Ran.bool) seed) + , bench "generate an integer 0-4094" (\_ -> Ran.step (Ran.int 0 4094) seed) + , bench "generate an integer 0-4095" (\_ -> Ran.step (Ran.int 0 4095) seed) + , bench "generate an integer 0-4096" (\_ -> Ran.step (Ran.int 0 4096) seed) + , bench "generate a massive integer" (\_ -> Ran.step (Ran.int 0 4294967295) seed) + , bench "generate a percentage" (\_ -> Ran.step (Ran.float 0 1) seed) + , bench ("generate " ++ toString n ++ " percentages") (\_ -> Ran.step (Ran.list n (Ran.float 0 1)) seed) + , bench "generate a float 0-4094" (\_ -> Ran.step (Ran.float 0 4094) seed) + , bench "generate a float 0-4095" (\_ -> Ran.step (Ran.float 0 4095) seed) + , bench "generate a float 0-4096" (\_ -> Ran.step (Ran.float 0 4096) seed) + , bench "generate a massive float" (\_ -> Ran.step (Ran.float 0 4294967295) seed) + ] diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Native/Benchmark.js b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Native/Benchmark.js new file mode 100644 index 0000000..1b10a42 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/Native/Benchmark.js @@ -0,0 +1,44 @@ +var _user$project$Native_Benchmark = (function () { + function bench(name, fn) { + return { + name: name, + fn: fn + } + } + + function suite(name, fnList) { + var fns = _elm_lang$core$Native_List.toArray(fnList), + suite = new Benchmark.Suite(name), + i, curr; + + for (i = 0; i < fns.length; i++) { + curr = fns[i]; + suite = suite.add(curr.name, curr.fn); + } + + return suite; + } + + function run(suiteList, program) { + var suites = _elm_lang$core$Native_List.toArray(suiteList), + i; + + for (i = 0; i < suites.length; i++) { + suites[i].on('start', function () { + console.log('Starting ' + this.name + ' suite.'); + }).on('cycle', function (event) { + console.log(String(event.target)); + }).on('complete', function () { + console.log('Done with ' + this.name + ' suite.'); + }).run(); + } + + return program; + } + + return { + bench: F2(bench), + suite: F2(suite), + run: F2(run) + }; +})() diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/README.md b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/README.md new file mode 100644 index 0000000..6c8183a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/README.md @@ -0,0 +1,14 @@ +# Benchmarks for Random.Pcg + +These benchmarks are possible thanks to Robin Heggelund Hansen's work benchmarking [collections-ng](https://github.com/Skinney/collections-ng). + +To run them yourself, first download the vendor files (you only need to do this once): +``` +mkdir vendor +cd vendor +wget https://cdn.jsdelivr.net/lodash/4.13.1/lodash.min.js +wget https://cdn.jsdelivr.net/benchmarkjs/2.1.0/benchmark.js +``` + +Then adjust the import of `Random` in `Bencher.elm` to control which library is being benchmarked. Finally run `sh prep-bench.sh` then +`elm-reactor` in this directory and open `run-benchmarks.html`. diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/elm-package.json b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/elm-package.json new file mode 100644 index 0000000..c11d3a8 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "0.0.1", + "summary": "Benchmarking suite for Random.Pcg", + "repository": "https://github.com/user/project.git", + "license": "BSD3", + "source-directories": [ + ".", + "../../src" + ], + "exposed-modules": [], + "native-modules": true, + "dependencies": { + "elm-lang/core": "4.0.0 <= v < 5.0.0", + "elm-lang/html": "1.1.0 <= v < 2.0.0" + }, + "elm-version": "0.17.0 <= v < 0.18.0" +} diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/prep-bench.sh b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/prep-bench.sh new file mode 100644 index 0000000..d3abcfc --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/prep-bench.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +elm-make --yes --output bench.js Bencher.elm diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/run-benchmarks.html b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/run-benchmarks.html new file mode 100644 index 0000000..0b249bb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/benchmark/run-benchmarks.html @@ -0,0 +1,7 @@ + +Main + + + +Check console for output... diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/bounds.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/bounds.elm new file mode 100644 index 0000000..79b8ac4 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/bounds.elm @@ -0,0 +1,40 @@ +module Bounds exposing (..) + +{-| Demonstrate that, after creating ten million floats between 0 and 1, all +indeed fall inside that range. If you try this test with core (4.x) Random, it +will produce at least one value less than zero! This could have catastrophic +effects if you take the log or square root of this value, although more likely +it will just propogate NaN through your program. +-} + +import Random.Pcg as Random +import Html +import Html.App + + +n = + 10000000 + + +seed0 : Random.Seed +seed0 = + Random.initialSeed 628318530 + + +samples : List Float +samples = + Random.step (Random.list n (Random.float 0 1)) seed0 |> fst + + +range : ( Maybe Float, Maybe Float ) +range = + ( List.minimum samples, List.maximum samples ) + + +main : Program Never +main = + Html.App.beginnerProgram + { model = () + , update = \_ _ -> () + , view = \() -> Html.text <| toString <| range + } diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/Dieharder.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/Dieharder.elm new file mode 100644 index 0000000..e4a0755 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/Dieharder.elm @@ -0,0 +1,58 @@ +import String +import Task exposing (Task) +import Random.Pcg as Random + +import Console exposing (IO) + +name = "elm-random-pcg" + +n = 2e6 |> round +seed0 = 42 +bound = {lo = 0, hi = 0xFFFFFFFF} + +header : IO () +header = + Console.putStr <| "# " ++ name ++ "\n# seed: " ++ toString seed0 ++ "\ntype: d\ncount: " ++ + toString (12*n) ++ "\nnumbit: 32" + +body : List Int -> IO () +body ints = + Console.putStr "\n" + `Console.seq` + Console.putStr (List.map (toString >> String.padLeft 10 ' ') ints |> String.join "\n") + +core : Random.Seed -> (List Int, Random.Seed) +core seed = + let gen = Random.list n (Random.int bound.lo bound.hi) + in Random.step gen seed + +run1 : Random.Seed -> IO Random.Seed +run1 seed = + let (ints, seed2) = core seed + in body ints |> Console.map (\_ -> seed2) + +job : IO () +job = + header + `Console.seq` + run1 (Random.initialSeed seed0) + `Console.andThen` run1 + `Console.andThen` run1 + `Console.andThen` run1 + + `Console.andThen` run1 + `Console.andThen` run1 + `Console.andThen` run1 + + `Console.andThen` run1 + `Console.andThen` run1 + `Console.andThen` run1 + + `Console.andThen` run1 + `Console.andThen` run1 + `Console.seq` + Console.exit 0 + + +port io : Signal (Task x ()) +port io = Console.run job diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/README.md b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/README.md new file mode 100644 index 0000000..e64cdfa --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/README.md @@ -0,0 +1,27 @@ +# Dieharder tests for Random.Pcg + +**These tests rely on a library that has not been update for 0.17.** + +The purpose of testing the random number generator is twofold: one, show the deficiencies in the core implementation; +two, show the correctness of the Pcg implementation *in Elm*. Because we are testing the Elm implementation, not the Pcg +algorithm, we must feed dieharder a file of already-generated random numbers. I've seen sources recommending 10 million +random numbers; these tests use 24 million, but even so the files are "rewound", as many as 2500 times on later tests. + +For the original 19 diehard tests, the core fails 9 tests while Pcg fails none. (One test resulted in "weak" but further +investigation resulted in passing; we expect this on one test in 100). On the entire battery, core passes 29, fails 75, +and is weak in 10. Pcg passes 82, fails 24, and is weak in 8. Some of Pcg's strength may be attributed to its 64 bits of +state, compared to core's 32, but this does not excuse failing the less-comprehensive diehard tests. Conversely, many of +the failures can be attributed to reusing pre-generated random numbers. + +The source Elm is `Dieharder.elm`. Because the tests require more random numbers than can be stored in memory, they +output chunks of 2 million at a time. In order to reuse the code, `compile.sh` rewrites the file to change the Random +implementation. It also writes out the `.txt` data files, and then runs dieharder, logging the results. + +The result log files have been committed to version control; I would have liked to commit the data files but they're +huge, and only take a few minutes to generate. You are free to alter the random seed in the Elm code, and rerun the +tests with `sh compile` (which takes several hours to complete). That said, I encourage you to run it long enough to see +core fail the birthday test, after only five or six seconds of scrutiny. (The `dieharder` tool is available through most +package managers. Once the data files are generated, try `time dieharder -g 202 -f elm-core-random.txt -d 0`.) + +The Pcg paper uses the TestU01 (e.g. BigCrush) suite; I'm using dieharder since it was easier to get to work +reading from a file. diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/compile.sh b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/compile.sh new file mode 100644 index 0000000..b581fdc --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/compile.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -e + +if [ ! -f elm-core-random.txt ]; then + sed -i.bak 's/import Random.Pcg as Random/import Random/g' Dieharder.elm + sed -i.bak 's/elm-random-pcg/elm-core-random/g' Dieharder.elm + elm make Dieharder.elm --output=raw_out.js + sh elm-io.sh raw_out.js generate_files.js + echo "Generating elm-core-random.txt..." + node generate_files.js > elm-core-random.txt + dieharder -g 202 -f elm-core-random.txt -a | tee dieharder-core.log +fi + +if [ ! -f elm-random-pcg.txt ]; then + sed -i.bak 's/import Random$/import Random.Pcg as Random/g' Dieharder.elm + sed -i.bak 's/elm-core-random/elm-random-pcg/g' Dieharder.elm + elm make Dieharder.elm --output=raw_out.js + sh elm-io.sh raw_out.js generate_files.js + echo "Generating elm-random-pcg.txt..." + node generate_files.js > elm-random-pcg.txt + dieharder -g 202 -f elm-random-pcg.txt -a | tee dieharder-pcg.log +fi + diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/dieharder-core.log b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/dieharder-core.log new file mode 100644 index 0000000..b7e98d1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/dieharder-core.log @@ -0,0 +1,125 @@ +#=============================================================================# +# dieharder version 3.31.1 Copyright 2003 Robert G. Brown # +#=============================================================================# + rng_name | filename |rands/second| + file_input| elm-core-random.txt| 3.27e+06 | +#=============================================================================# + test_name |ntup| tsamples |psamples| p-value |Assessment +#=============================================================================# + diehard_birthdays| 0| 100| 100|0.00000000| FAILED + diehard_operm5| 0| 1000000| 100|0.05356326| PASSED + diehard_rank_32x32| 0| 40000| 100|0.00000000| FAILED + diehard_rank_6x8| 0| 100000| 100|0.00000000| FAILED + diehard_bitstream| 0| 2097152| 100|0.00000000| FAILED + diehard_opso| 0| 2097152| 100|0.00000000| FAILED + diehard_oqso| 0| 2097152| 100|0.00000000| FAILED + diehard_dna| 0| 2097152| 100|0.00000000| FAILED +diehard_count_1s_str| 0| 256000| 100|0.00000000| FAILED +diehard_count_1s_byt| 0| 256000| 100|0.00000000| FAILED + diehard_parking_lot| 0| 12000| 100|0.01724230| PASSED + diehard_2dsphere| 2| 8000| 100|0.48535178| PASSED + diehard_3dsphere| 3| 4000| 100|0.99316867| PASSED + diehard_squeeze| 0| 100000| 100|0.02666573| PASSED + diehard_sums| 0| 100| 100|0.02941253| PASSED + diehard_runs| 0| 100000| 100|0.41280843| PASSED + diehard_runs| 0| 100000| 100|0.55749090| PASSED + diehard_craps| 0| 200000| 100|0.45469862| PASSED + diehard_craps| 0| 200000| 100|0.04078717| PASSED + marsaglia_tsang_gcd| 0| 10000000| 100|0.00000000| FAILED + marsaglia_tsang_gcd| 0| 10000000| 100|0.00000000| FAILED + sts_monobit| 1| 100000| 100|0.00000000| FAILED + sts_runs| 2| 100000| 100|0.00000000| FAILED + sts_serial| 1| 100000| 100|0.00000000| FAILED + sts_serial| 2| 100000| 100|0.00000000| FAILED + sts_serial| 3| 100000| 100|0.00000000| FAILED + sts_serial| 3| 100000| 100|0.00000000| FAILED + sts_serial| 4| 100000| 100|0.00000000| FAILED + sts_serial| 4| 100000| 100|0.00000000| FAILED + sts_serial| 5| 100000| 100|0.00000000| FAILED + sts_serial| 5| 100000| 100|0.00000000| FAILED + sts_serial| 6| 100000| 100|0.00000000| FAILED + sts_serial| 6| 100000| 100|0.00000000| FAILED + sts_serial| 7| 100000| 100|0.00000000| FAILED + sts_serial| 7| 100000| 100|0.00000000| FAILED + sts_serial| 8| 100000| 100|0.00000000| FAILED + sts_serial| 8| 100000| 100|0.00000000| FAILED + sts_serial| 9| 100000| 100|0.00000000| FAILED + sts_serial| 9| 100000| 100|0.00000000| FAILED + sts_serial| 10| 100000| 100|0.00000000| FAILED + sts_serial| 10| 100000| 100|0.00000000| FAILED + sts_serial| 11| 100000| 100|0.00000000| FAILED + sts_serial| 11| 100000| 100|0.00000000| FAILED + sts_serial| 12| 100000| 100|0.00000000| FAILED + sts_serial| 12| 100000| 100|0.00000010| FAILED + sts_serial| 13| 100000| 100|0.00000000| FAILED + sts_serial| 13| 100000| 100|0.00000000| FAILED + sts_serial| 14| 100000| 100|0.00000000| FAILED + sts_serial| 14| 100000| 100|0.00000038| FAILED + sts_serial| 15| 100000| 100|0.00000000| FAILED + sts_serial| 15| 100000| 100|0.00000000| FAILED + sts_serial| 16| 100000| 100|0.00000000| FAILED + sts_serial| 16| 100000| 100|0.00000000| FAILED + rgb_bitdist| 1| 100000| 100|0.00000000| FAILED + rgb_bitdist| 2| 100000| 100|0.00000000| FAILED + rgb_bitdist| 3| 100000| 100|0.00000000| FAILED + rgb_bitdist| 4| 100000| 100|0.00000000| FAILED + rgb_bitdist| 5| 100000| 100|0.00000000| FAILED + rgb_bitdist| 6| 100000| 100|0.00000000| FAILED + rgb_bitdist| 7| 100000| 100|0.00000000| FAILED + rgb_bitdist| 8| 100000| 100|0.00000000| FAILED + rgb_bitdist| 9| 100000| 100|0.00000000| FAILED + rgb_bitdist| 10| 100000| 100|0.00000000| FAILED + rgb_bitdist| 11| 100000| 100|0.00000000| FAILED + rgb_bitdist| 12| 100000| 100|0.00000000| FAILED +rgb_minimum_distance| 2| 10000| 1000|0.47013583| PASSED +rgb_minimum_distance| 3| 10000| 1000|0.77934333| PASSED +rgb_minimum_distance| 4| 10000| 1000|0.54794813| PASSED +rgb_minimum_distance| 5| 10000| 1000|0.99156515| PASSED + rgb_permutations| 2| 100000| 100|0.89980884| PASSED + rgb_permutations| 3| 100000| 100|0.04354697| PASSED + rgb_permutations| 4| 100000| 100|0.14571738| PASSED + rgb_permutations| 5| 100000| 100|0.32536424| PASSED + rgb_lagged_sum| 0| 1000000| 100|0.00663993| PASSED + rgb_lagged_sum| 1| 1000000| 100|0.00020140| WEAK + rgb_lagged_sum| 2| 1000000| 100|0.00006518| WEAK + rgb_lagged_sum| 3| 1000000| 100|0.00000055| FAILED + rgb_lagged_sum| 4| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 5| 1000000| 100|0.00000003| FAILED + rgb_lagged_sum| 6| 1000000| 100|0.00000161| WEAK + rgb_lagged_sum| 7| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 8| 1000000| 100|0.00118209| WEAK + rgb_lagged_sum| 9| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 10| 1000000| 100|0.00053280| WEAK + rgb_lagged_sum| 11| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 12| 1000000| 100|0.02674952| PASSED + rgb_lagged_sum| 13| 1000000| 100|0.02706912| PASSED + rgb_lagged_sum| 14| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 15| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 16| 1000000| 100|0.00013698| WEAK + rgb_lagged_sum| 17| 1000000| 100|0.00000057| FAILED + rgb_lagged_sum| 18| 1000000| 100|0.00957788| PASSED + rgb_lagged_sum| 19| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 20| 1000000| 100|0.00753618| PASSED + rgb_lagged_sum| 21| 1000000| 100|0.00957386| PASSED + rgb_lagged_sum| 22| 1000000| 100|0.00551566| PASSED + rgb_lagged_sum| 23| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 24| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 25| 1000000| 100|0.00014768| WEAK + rgb_lagged_sum| 26| 1000000| 100|0.00002738| WEAK + rgb_lagged_sum| 27| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 28| 1000000| 100|0.01922808| PASSED + rgb_lagged_sum| 29| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 30| 1000000| 100|0.00001202| WEAK + rgb_lagged_sum| 31| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 32| 1000000| 100|0.00133960| WEAK + rgb_kstest_test| 0| 10000| 1000|0.75951059| PASSED + dab_bytedistrib| 0| 51200000| 1|0.00000000| FAILED + dab_dct| 256| 50000| 1|0.00000000| FAILED +Preparing to run test 207. ntuple = 0 + dab_filltree| 32| 15000000| 1|0.08974874| PASSED + dab_filltree| 32| 15000000| 1|0.03229887| PASSED +Preparing to run test 208. ntuple = 0 + dab_filltree2| 0| 5000000| 1|0.00000000| FAILED + dab_filltree2| 1| 5000000| 1|0.00000000| FAILED +Preparing to run test 209. ntuple = 0 + dab_monobit2| 12| 65000000| 1|1.00000000| FAILED diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/dieharder-pcg.log b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/dieharder-pcg.log new file mode 100644 index 0000000..7ed1eab --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/dieharder-pcg.log @@ -0,0 +1,125 @@ +#=============================================================================# +# dieharder version 3.31.1 Copyright 2003 Robert G. Brown # +#=============================================================================# + rng_name | filename |rands/second| + file_input| elm-random-pcg.txt| 3.12e+06 | +#=============================================================================# + test_name |ntup| tsamples |psamples| p-value |Assessment +#=============================================================================# + diehard_birthdays| 0| 100| 100|0.17903810| PASSED + diehard_operm5| 0| 1000000| 100|0.11333998| PASSED + diehard_rank_32x32| 0| 40000| 100|0.00000000| FAILED + diehard_rank_6x8| 0| 100000| 100|0.00211094| WEAK + diehard_bitstream| 0| 2097152| 100|0.57209488| PASSED + diehard_opso| 0| 2097152| 100|0.00002845| WEAK + diehard_oqso| 0| 2097152| 100|0.35436250| PASSED + diehard_dna| 0| 2097152| 100|0.00000000| FAILED +diehard_count_1s_str| 0| 256000| 100|0.00000000| FAILED +diehard_count_1s_byt| 0| 256000| 100|0.90651549| PASSED + diehard_parking_lot| 0| 12000| 100|0.77403241| PASSED + diehard_2dsphere| 2| 8000| 100|0.63408870| PASSED + diehard_3dsphere| 3| 4000| 100|0.23623252| PASSED + diehard_squeeze| 0| 100000| 100|0.32444613| PASSED + diehard_sums| 0| 100| 100|0.11909796| PASSED + diehard_runs| 0| 100000| 100|0.95140057| PASSED + diehard_runs| 0| 100000| 100|0.08355388| PASSED + diehard_craps| 0| 200000| 100|0.61971328| PASSED + diehard_craps| 0| 200000| 100|0.02974917| PASSED + marsaglia_tsang_gcd| 0| 10000000| 100|0.00000000| FAILED + marsaglia_tsang_gcd| 0| 10000000| 100|0.00000000| FAILED + sts_monobit| 1| 100000| 100|0.94237384| PASSED + sts_runs| 2| 100000| 100|0.57915623| PASSED + sts_serial| 1| 100000| 100|0.44781254| PASSED + sts_serial| 2| 100000| 100|0.02303365| PASSED + sts_serial| 3| 100000| 100|0.00296507| WEAK + sts_serial| 3| 100000| 100|0.09883487| PASSED + sts_serial| 4| 100000| 100|0.00244949| WEAK + sts_serial| 4| 100000| 100|0.23109578| PASSED + sts_serial| 5| 100000| 100|0.00000165| WEAK + sts_serial| 5| 100000| 100|0.00285289| WEAK + sts_serial| 6| 100000| 100|0.00000001| FAILED + sts_serial| 6| 100000| 100|0.07012349| PASSED + sts_serial| 7| 100000| 100|0.01075079| PASSED + sts_serial| 7| 100000| 100|0.17951869| PASSED + sts_serial| 8| 100000| 100|0.03321345| PASSED + sts_serial| 8| 100000| 100|0.86758035| PASSED + sts_serial| 9| 100000| 100|0.03966751| PASSED + sts_serial| 9| 100000| 100|0.44854609| PASSED + sts_serial| 10| 100000| 100|0.16742386| PASSED + sts_serial| 10| 100000| 100|0.67773864| PASSED + sts_serial| 11| 100000| 100|0.44413706| PASSED + sts_serial| 11| 100000| 100|0.79991904| PASSED + sts_serial| 12| 100000| 100|0.09943149| PASSED + sts_serial| 12| 100000| 100|0.51642267| PASSED + sts_serial| 13| 100000| 100|0.07546053| PASSED + sts_serial| 13| 100000| 100|0.76438386| PASSED + sts_serial| 14| 100000| 100|0.82827288| PASSED + sts_serial| 14| 100000| 100|0.01703445| PASSED + sts_serial| 15| 100000| 100|0.80744724| PASSED + sts_serial| 15| 100000| 100|0.82231311| PASSED + sts_serial| 16| 100000| 100|0.67183047| PASSED + sts_serial| 16| 100000| 100|0.15834108| PASSED + rgb_bitdist| 1| 100000| 100|0.00000000| FAILED + rgb_bitdist| 2| 100000| 100|0.00000000| FAILED + rgb_bitdist| 3| 100000| 100|0.00000000| FAILED + rgb_bitdist| 4| 100000| 100|0.00000000| FAILED + rgb_bitdist| 5| 100000| 100|0.00000000| FAILED + rgb_bitdist| 6| 100000| 100|0.00000003| FAILED + rgb_bitdist| 7| 100000| 100|0.00038018| WEAK + rgb_bitdist| 8| 100000| 100|0.02375596| PASSED + rgb_bitdist| 9| 100000| 100|0.96622951| PASSED + rgb_bitdist| 10| 100000| 100|0.99649741| WEAK + rgb_bitdist| 11| 100000| 100|0.00000000| FAILED + rgb_bitdist| 12| 100000| 100|0.97315671| PASSED +rgb_minimum_distance| 2| 10000| 1000|0.82785224| PASSED +rgb_minimum_distance| 3| 10000| 1000|0.52346349| PASSED +rgb_minimum_distance| 4| 10000| 1000|0.43045429| PASSED +rgb_minimum_distance| 5| 10000| 1000|0.27085806| PASSED + rgb_permutations| 2| 100000| 100|0.07890134| PASSED + rgb_permutations| 3| 100000| 100|0.34783088| PASSED + rgb_permutations| 4| 100000| 100|0.89656610| PASSED + rgb_permutations| 5| 100000| 100|0.00200469| WEAK + rgb_lagged_sum| 0| 1000000| 100|0.08937655| PASSED + rgb_lagged_sum| 1| 1000000| 100|0.00000054| FAILED + rgb_lagged_sum| 2| 1000000| 100|0.00000001| FAILED + rgb_lagged_sum| 3| 1000000| 100|0.00000002| FAILED + rgb_lagged_sum| 4| 1000000| 100|0.00000001| FAILED + rgb_lagged_sum| 5| 1000000| 100|0.00001219| WEAK + rgb_lagged_sum| 6| 1000000| 100|0.00893551| PASSED + rgb_lagged_sum| 7| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 8| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 9| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 10| 1000000| 100|0.36907595| PASSED + rgb_lagged_sum| 11| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 12| 1000000| 100|0.00096001| WEAK + rgb_lagged_sum| 13| 1000000| 100|0.02707787| PASSED + rgb_lagged_sum| 14| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 15| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 16| 1000000| 100|0.00042074| WEAK + rgb_lagged_sum| 17| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 18| 1000000| 100|0.07318108| PASSED + rgb_lagged_sum| 19| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 20| 1000000| 100|0.00000024| FAILED + rgb_lagged_sum| 21| 1000000| 100|0.12403535| PASSED + rgb_lagged_sum| 22| 1000000| 100|0.00019279| WEAK + rgb_lagged_sum| 23| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 24| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 25| 1000000| 100|0.00018065| WEAK + rgb_lagged_sum| 26| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 27| 1000000| 100|0.00001610| WEAK + rgb_lagged_sum| 28| 1000000| 100|0.09665346| PASSED + rgb_lagged_sum| 29| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 30| 1000000| 100|0.00712462| PASSED + rgb_lagged_sum| 31| 1000000| 100|0.00000000| FAILED + rgb_lagged_sum| 32| 1000000| 100|0.00003423| WEAK + rgb_kstest_test| 0| 10000| 1000|0.82100195| PASSED + dab_bytedistrib| 0| 51200000| 1|0.00000000| FAILED + dab_dct| 256| 50000| 1|0.04253760| PASSED +Preparing to run test 207. ntuple = 0 + dab_filltree| 32| 15000000| 1|0.18641090| PASSED + dab_filltree| 32| 15000000| 1|0.48486964| PASSED +Preparing to run test 208. ntuple = 0 + dab_filltree2| 0| 5000000| 1|0.00000000| FAILED + dab_filltree2| 1| 5000000| 1|0.00000000| FAILED +Preparing to run test 209. ntuple = 0 + dab_monobit2| 12| 65000000| 1|1.00000000| FAILED diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/elm-io.sh b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/elm-io.sh new file mode 100644 index 0000000..476fb98 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/elm-io.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Script for use with the Console library to allow Elm to run on Node. + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +read -d '' handler <<- EOF +(function(){ + if (typeof Elm === "undefined") { throw "elm-io config error: Elm is not defined. Make sure you call elm-io with a real Elm output file"} + if (typeof Elm.Main === "undefined" ) { throw "Elm.Main is not defined, make sure your module is named Main." }; + var worker = Elm.worker(Elm.Main); +})(); +EOF + +cat $1 > $2 +echo "$handler" >> $2 diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/elm-package.json b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/elm-package.json new file mode 100644 index 0000000..8df629e --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/dieharder/elm-package.json @@ -0,0 +1,15 @@ +{ + "version": "0.0.1", + "summary": "Dieharder tests for elm-random-pcg", + "repository": "https://github.com/user/project.git", + "license": "BSD3", + "source-directories": [ + ".", "../../src" + ], + "exposed-modules": [], + "dependencies": { + "elm-lang/core": "3.0.0 <= v < 4.0.0", + "laszlopandy/elm-console": "1.0.3 <= v < 2.0.0" + }, + "elm-version": "0.16.0 <= v < 0.17.0" +} diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/elm-package.json b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/elm-package.json new file mode 100644 index 0000000..2331821 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/elm-package.json @@ -0,0 +1,15 @@ +{ + "version": "0.0.1", + "summary": "Miscellaneous tests for elm-pcg-random", + "repository": "https://github.com/user/project.git", + "license": "BSD3", + "source-directories": [ + ".", "../src" + ], + "exposed-modules": [], + "dependencies": { + "elm-lang/core": "4.0.3 <= v < 5.0.0", + "elm-lang/html": "1.1.0 <= v < 2.0.0" + }, + "elm-version": "0.17.1 <= v < 0.18.0" +} diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/fastForward.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/fastForward.elm new file mode 100644 index 0000000..94f261e --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/fastForward.elm @@ -0,0 +1,61 @@ +module FastForwardTest exposing (..) + +{-| Compares the outputs of seeds created using the ordinary sequential stepping method, +and those created using the `fastForward` function. Note that we compare output, not the +seeds themselves, because somestimes the states get confused between signed and unsigned-- +this has no effect on the psuedo-random output. (Edit July 2016: not sure if that's true +anymore...) +-} + +import Random.Pcg as Random +import Html +import Html.App + + +n = + 100000 + + +seed0 : Random.Seed +seed0 = + Random.initialSeed 628318530 + + +stepped : List Random.Seed +stepped = + List.scanl + (\_ oldSeed -> Random.step Random.bool oldSeed |> snd) + seed0 + [1..n] + + +fastForwarded : List Random.Seed +fastForwarded = + List.map + (\i -> Random.fastForward i seed0) + [0..n] + + +gen = + Random.int 1 10000 + + +generate seed = + Random.step gen seed |> fst + + +bools = + List.map2 + (\seed1 seed2 -> generate seed1 == generate seed2) + stepped + fastForwarded + |> List.all identity + + +main : Program Never +main = + Html.App.beginnerProgram + { model = () + , update = \_ _ -> () + , view = \() -> Html.text <| toString <| bools + } diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/filterTest.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/filterTest.elm new file mode 100644 index 0000000..96737a6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/filterTest.elm @@ -0,0 +1,35 @@ +module FilterTest exposing (..) + +import Html exposing (Html) +import Random.Pcg as Random + + +{-| This test checks that very difficult-to-satisfy filters do not result in a stack +overflow (just run slowly). The test will take several seconds to run! +-} +main : Html Never +main = + let + -- Try 'predicate i = False' to verify that the test hangs instead of + -- crashing with a stack overflow (indicating that tail recursion has + -- been properly optimized into a loop, which in this case happens to + -- be infinite). + predicate i = + i % 1000000 == 0 + + divisibleNumberGenerator = + Random.filter predicate (Random.int Random.minInt Random.maxInt) + + listGenerator = + Random.list 10 divisibleNumberGenerator + + initialSeed = + Random.initialSeed 1234 + + generatedList = + fst (Random.step listGenerator initialSeed) + in + -- You can verify that everything is working by observing that the generated + -- sum is in fact divisible by the chosen divisor (e.g. for a divisor of + -- 1000000 the sum should always have six trailing zeros) + Html.text (toString (List.sum generatedList)) diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/independentSeedTest.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/independentSeedTest.elm new file mode 100644 index 0000000..21cc1be --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/independentSeedTest.elm @@ -0,0 +1,40 @@ +module IndependentSeedTest exposing (..) + +import Html exposing (Html) +import Random.Pcg as Random exposing (Generator) +import Debug + + +{-| This test ensures that the 'independentSeed' generator actually produces +valid random seeds that can be stepped properly to produce distinct values. If +there is an error in 'independentSeed', at some point a seed such as 'Seed 0 +0' will be produced which when stepped will yield itself, resulting in an +infinite loop within 'filter' (since it will internally just keep generating +the same value over and over again). +-} +main : Html Never +main = + let + initialSeed = + Random.initialSeed 1234 + + seedListGenerator = + Random.list 1000 Random.independentSeed + + randomSeeds = + fst (Random.step seedListGenerator initialSeed) + + isDivisible i = + let + _ = + Debug.log "i" i + in + i /= 0 && i % 10 == 0 + + divisibleNumberGenerator = + Random.filter isDivisible (Random.int Random.minInt Random.maxInt) + + divisibleNumbers = + List.map (Random.step divisibleNumberGenerator >> fst) randomSeeds + in + Html.text (toString (List.sum divisibleNumbers)) diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/listTest.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/listTest.elm new file mode 100644 index 0000000..5d4e8bb --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/listTest.elm @@ -0,0 +1,60 @@ +module ListTest exposing (..) + +{-| The central limit theorem states that if you sample any distribution and take the mean, and do that many times, +those means will be on a standard distribution. + +That's exactly what this test does, using an independent seed. Judging how "good" the distribution is versus how good it +"should" be is beyond the scope of this example. This test is really to show that independent seeds aren't *trivially* +wrong. +-} + +import Dict exposing (Dict) +import Random.Pcg as Random +import Html +import Html.App + + +seed0 : Random.Seed +seed0 = + Random.initialSeed 628318530 |> Random.step Random.independentSeed |> snd + + +gen = + Random.int 1 6 + |> Random.list 15 + |> Random.map mean + |> Random.map (\x -> round (10 * x)) + |> Random.list 800 + |> Random.map toMultiSet + + +mean : List Int -> Float +mean xs = + toFloat (List.sum xs) / toFloat (List.length xs) + + +toMultiSet : List Int -> Dict Int Int +toMultiSet list = + let + helper xs d = + case xs of + [] -> + d + + x :: xs -> + helper xs <| Dict.insert x (Dict.get x d |> Maybe.withDefault 0 |> (+) 1) d + in + helper list Dict.empty + + +generated = + Random.step gen seed0 |> fst + + +main : Program Never +main = + Html.App.beginnerProgram + { model = () + , update = \_ _ -> () + , view = \() -> Html.text <| toString <| generated + } diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/README.md b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/README.md new file mode 100644 index 0000000..2d013b2 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/README.md @@ -0,0 +1,7 @@ +# Port test + +``` +elm make Test.elm --output=elm.js +``` + +This shows how to hook up ports to the random number generator to produce different values each time. diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/Test.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/Test.elm new file mode 100644 index 0000000..18e79d1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/Test.elm @@ -0,0 +1,13 @@ +module Test where + +import Graphics.Element exposing (show) +import Random.Pcg as Random + +port randomSeed : (Int, Int) + +seed0 : Random.Seed +seed0 = (uncurry Random.initialSeed2) randomSeed + +gen = Random.list 32 (Random.int 1 6) + +main = show <| fst <| Random.generate gen seed0 diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/elm-package.json b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/elm-package.json new file mode 100644 index 0000000..208b14c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/port/elm-package.json @@ -0,0 +1,14 @@ +{ + "version": "1.0.0", + "summary": "helpful summary of your project, less than 80 characters", + "repository": "https://github.com/user/project.git", + "license": "BSD3", + "source-directories": [ + ".", "../../src/" + ], + "exposed-modules": [], + "dependencies": { + "elm-lang/core": "3.0.0 <= v < 4.0.0" + }, + "elm-version": "0.16.0 <= v < 0.17.0" +} diff --git a/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/rewind.elm b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/rewind.elm new file mode 100644 index 0000000..f42a94d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/mgold/elm-random-pcg/4.0.2/test/rewind.elm @@ -0,0 +1,34 @@ +module RewindTest exposing (..) + +{-| Demonstrates that `fastForward` may also be used to rewind. We create a seed, fastForward it, then rewind it to get +back the original seed. +-} + +import Random.Pcg as Random +import Html +import Html.App + + +n = + 31 + + +seed0 = + Random.initialSeed 628318 + + +seed1 = + Random.fastForward n seed0 + + +seed2 = + Random.fastForward -n seed1 + + +main : Program Never +main = + Html.App.beginnerProgram + { model = () + , update = \_ _ -> () + , view = \() -> Html.text <| toString [ seed0, seed1, seed2 ] + } diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/.gitignore b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/.gitignore new file mode 100644 index 0000000..3a4d19b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/.gitignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules +elm-stuff diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/.travis.yml b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/.travis.yml new file mode 100644 index 0000000..0c2dd40 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/.travis.yml @@ -0,0 +1,43 @@ +sudo: false + +cache: + directories: + - test/elm-stuff/build-artifacts + - sysconfcpus + +os: + - linux + - osx + +env: + matrix: + - ELM_VERSION=0.18.0 TARGET_NODE_VERSION=node + - ELM_VERSION=0.18.0 TARGET_NODE_VERSION=0.12 + +before_install: + - if [ ${TRAVIS_OS_NAME} == "osx" ]; + then brew update; brew install nvm; mkdir ~/.nvm; export NVM_DIR=~/.nvm; source $(brew --prefix nvm)/nvm.sh; + fi + - | # epic build time improvement - see https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142 + if [ ! -d sysconfcpus/bin ]; + then + git clone https://github.com/obmarg/libsysconfcpus.git; + cd libsysconfcpus; + ./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus; + make && make install; + cd ..; + fi + +install: + - nvm install $TARGET_NODE_VERSION + - nvm use $TARGET_NODE_VERSION + - node --version + - npm --version + - npm install -g elm@$ELM_VERSION + - mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old + - echo "#\!/bin/bash\\n\\necho \"Running elm-make with sysconfcpus -n 2\"\\n\\n$TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make-old \"\$@\"" > $(npm config get prefix)/bin/elm-make + - chmod +x $(npm config get prefix)/bin/elm-make + - npm install + +script: + - npm test diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/LICENSE b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/LICENSE new file mode 100644 index 0000000..b409242 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2015, Richard Feldman +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of node-test-runner nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/README.md b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/README.md new file mode 100644 index 0000000..ea4babf --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/README.md @@ -0,0 +1,47 @@ +# node-test-runner [![Version](https://img.shields.io/npm/v/elm-test.svg)](https://www.npmjs.com/package/elm-test) [![Travis build Status](https://travis-ci.org/rtfeldman/node-test-runner.svg?branch=master)](http://travis-ci.org/rtfeldman/node-test-runner) [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/fixcy4ko78di0l31/branch/master?svg=true)](https://ci.appveyor.com/project/rtfeldman/node-test-runner/branch/master) + +Runs [elm-test](https://github.com/elm-community/elm-test) suites from Node.js + +## Installation + +```bash +npm install -g elm-test +``` + +## Usage + +```bash +elm-test init # Adds the elm-test dependency and creates Main.elm and Tests.elm +elm-test # Runs the tests +``` + +Then add your tests to Tests.elm. + + +### Configuration + +The `--compiler` flag can be used to use a version of the Elm compiler that +has not been install globally. + +``` +npm install elm +elm-test --compiler ./node_modules/.bin/elm-make +``` + + +### Travis CI + +If you want to run your tests on Travis CI, here's a good starter `.travis.yml`: + +```yml +language: node_js +node_js: + - "5" +install: + - npm install -g elm + - npm install -g elm-test + - elm-package install -y + - pushd tests && elm-package install -y && popd +script: + - elm-test +``` diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/appveyor.yml b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/appveyor.yml new file mode 100644 index 0000000..10a3bdf --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/appveyor.yml @@ -0,0 +1,25 @@ +environment: + ELM_VERSION: "0.18.0" + matrix: + - nodejs_version: "5.0" + - nodejs_version: "0.12" + - nodejs_version: "0.11.13" + +platform: + - x86 + - x64 + +matrix: + fast_finish: true + +install: + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:Platform + - node --version + - npm --version + - npm install -g elm@%ELM_VERSION% + - npm install + +test_script: + - npm test + +build: off diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/bin/elm-test b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/bin/elm-test new file mode 100644 index 0000000..51ae68c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/bin/elm-test @@ -0,0 +1,322 @@ +#!/usr/bin/env node + +var processTitle = "elm-test"; + +process.title = processTitle; + +var compile = require("node-elm-compiler").compile, + fs = require("fs-extra"), + chalk = require("chalk"), + path = require("path"), + temp = require("temp").track(), // Automatically cleans up temp files. + util = require("util"), + _ = require("lodash"), + spawn = require("cross-spawn"), + minimist = require("minimist"), + firstline = require("firstline"), + findUp = require("find-up"), + chokidar = require("chokidar"); + +var elm = { + 'elm-package': 'elm-package' +}; +var args = minimist(process.argv.slice(2), { + alias: { + 'help': 'h', + 'yes': 'y', + 'seed': 's', + 'compiler': 'c', + 'report': 'r', + 'watch': 'w' + }, + boolean: [ 'yes', 'warn', 'version', 'help', 'watch' ], + string: [ 'compiler', 'seed', 'report' ] +}); + +if (args.help) { + console.log("Usage: elm-test init [--yes] # Create example tests\n"); + console.log("Usage: elm-test TESTFILE [--compiler /path/to/compiler] # Run TESTFILE\n"); + console.log("Usage: elm-test [--compiler /path/to/compiler] # Run tests/Main.elm\n"); + console.log("Usage: elm-test [--seed integer] # Run with initial fuzzer seed\n"); + console.log("Usage: elm-test [--report json or chalk (default)] # Print results to stdout in given format\n"); + console.log("Usage: elm-test [--watch] # Run tests on file changes\n"); + process.exit(1); +} + +if (args.version) { + console.log(require(path.join(__dirname, "..", "package.json")).version); + process.exit(0); +} + +var report = "chalk"; +if (args.report !== undefined) { + report = args.report; +} + + +checkNodeVersion(); + +function checkNodeVersion() { + var nodeVersionString = process.versions.node; + var nodeVersion = _.map(_.split(nodeVersionString, '.'), _.parseInt); + + if((nodeVersion[0] === 0 && nodeVersion[1] < 11) || + (nodeVersion[0] === 0 && nodeVersion[1] === 11 && nodeVersion[2] < 13)) { + console.log("using node v" + nodeVersionString); + console.error("elm-test requires node v0.11.13 or greater - upgrade the installed version of node and try again"); + process.exit(1); + } +} + +if (args._[0] == "init") { + var copyTemplate = function(templateName, destName) { + if (arguments.length == 1) { + destName = templateName; + } + var source = path.resolve(__dirname, "../templates/" + templateName); + var destination = path.resolve("tests", destName); + if (fs.existsSync(destination)) { + console.log(destination + " already exists"); + } else { + fs.copySync(source, destination); + console.log("Created " + destination); + } + }; + + var ensureDirectory = function(dirName) { + var destination = path.resolve(".", dirName); + if (fs.existsSync(destination)) { + console.log(destination + " already exists"); + } else { + fs.mkdirSync(destination); + console.log("Created " + destination); + } + }; + + var elmOptions = ""; + if (args.yes) { + elmOptions += " --yes"; + } + + ensureDirectory("src"); + ensureDirectory("tests"); + copyTemplate("elm-package.json"); + copyTemplate("Main.elm"); + copyTemplate("Tests.elm"); + copyTemplate("gitignore", ".gitignore"); + process.exit(0); +} + +function evalElmCode (compiledCode, testModuleName) { + var Elm = function(module) { eval(compiledCode); return module.exports; }({}); + + // Make sure necessary things are defined. + if (typeof Elm === 'undefined') { throw 'elm-io config error: Elm is not defined. Make sure you provide a file compiled by Elm!'; } + + function getTestModule() { + var module = Elm; + var moduleParts = testModuleName.split('.'); + while (moduleParts.length) { + var modulePart = moduleParts.shift(); + if (module[modulePart] === undefined) { + return undefined; + } + + module = module[modulePart]; + } + + return module; + } + + var testModule = getTestModule(); + if (testModule === undefined) { throw 'Elm.' + testModuleName + ' is not defined. Make sure you provide a file compiled by Elm!'; } + + var initialSeed = null; + + if (args.seed !== undefined) { + initialSeed = args.seed; + } + + + + + // Apply Node polyfills as necessary. + var window = {Date: Date, addEventListener: function() {}, removeEventListener: function() {}}; + var document = {body: {}, createTextNode: function() {}}; + pathToMake = args.compiler; + if (typeof XMLHttpRequest === 'undefined') { XMLHttpRequest = function() { return { addEventListener: function() {}, open: function() {}, send: function() {} }; }; } + if (typeof FormData === 'undefined') { FormData = function () { this._data = []; }; FormData.prototype.append = function () { this._data.push(Array.prototype.slice.call(arguments)); }; } + + // Fix Windows Unicode problems. Credit to https://github.com/sindresorhus/figures for the Windows compat idea! + var windowsSubstitutions = [[/[↓✗►]/g, '>'], [/╵│╷╹┃╻/g, '|'], [/═/g, '='],, [/▔/g, '-'], [/✔/g, '√']]; + + function windowsify(str) { + return windowsSubstitutions.reduce( + function(result, sub) { return result.replace(sub[0], sub[1]); }, str); + } + + function chalkify(messages) { + return messages.map(function(msg) { + var path = msg.styles; + var text = process.platform === 'win32' ? windowsify(msg.text) : msg.text; + + if (path.length === 0) { + return text; + } else { + var fn = chalk; + + path.forEach(function(nextPath) { fn = fn[nextPath]; }); + + return fn(text); + } + }).join(''); + } + + // Run the Elm app. + var app = testModule.worker({seed: initialSeed, report: report}); + + // Receive messages from ports and translate them into appropriate JS calls. + app.ports.emit.subscribe(function(msg) { + var msgType = msg[0]; + var data = msg[1]; + + if (msgType === 'FINISHED') { + if (data.format === "CHALK") { + console.log(chalkify(data.message)); + } else { + console.log(JSON.stringify(data.message)); + } + + if (!args.watch) { + process.exit(data.exitCode); + } + } else if (msgType === "STARTED" || msgType === "TEST_COMPLETED") { + if (data.format === "CHALK") { + console.log(chalkify(data.message)); + } else { + console.log(JSON.stringify(data.message)); + } + + } + }); +} + + +var testFile = args._[0], + cwd = __dirname, + pathToMake = undefined; + +function spawnCompiler(cmd, args, opts) { + var compilerOpts = + _.defaults({stdio: [process.stdin, report === "chalk" ? process.stdout : 'ignore', process.stderr] }, opts); + + return spawn(cmd, args, compilerOpts); +} + +if (typeof testFile == "undefined") { + testFile = "tests/Main.elm"; +} + +if (args.compiler !== undefined) { + pathToMake = args.compiler; + + if (!pathToMake) { + console.error("The --compiler option must be given a path to an elm-make executable."); + process.exit(1); + } +} + +if (!fs.existsSync(testFile)) { + console.error("Could not find file " + testFile); + process.exit(1); +} + +var testModulePromise = firstline(testFile).then(function (testModuleLine) { + var moduleMatches = testModuleLine.match(/^(?:port\s+)?module\s+([^\s]+)/); + if (moduleMatches) { + return moduleMatches[1]; + } + + return 'Main'; +}); + +function infoLog(msg) { + if (report === "chalk") { + console.log(msg); + } +} + +findUp('elm-package.json', { cwd: path.dirname(testFile) }) + .then(function (elmPackagePath) { + var elmRootDir = path.dirname(elmPackagePath); + if (fs.realpathSync(elmRootDir) !== fs.realpathSync(process.cwd())) { + testFile = path.relative(elmRootDir, testFile); + process.chdir(elmRootDir); + } + + if (args.watch) { + infoLog('Running in watch mode'); + + var watcher = chokidar.watch('**/*.elm', { ignoreInitial: true }); + + var eventNameMap = { + add: 'added', + addDir: 'added', + change: 'changed', + unlink: 'removed', + unlinkDir: 'removed', + }; + + watcher.on('all', function (event, filePath) { + var relativePath = path.relative(elmRootDir, filePath); + var eventName = eventNameMap[event] || event; + + infoLog('\n' + relativePath + ' ' + eventName + '. Rebuilding!'); + + runTests(); + }); + } + + function runTests () { + temp.open({ prefix:'elm_test_', suffix:'.js' }, function(err, info) { + var dest = info.path; + var compileProcess = compile( [testFile], { + output: dest, + verbose: args.verbose, + yes: true, + spawn: spawnCompiler, + pathToMake: pathToMake, + warn:args.warn + }); + + compileProcess.on('close', function(exitCode) { + if (exitCode !== 0) { + console.error("Compilation failed for", testFile); + if (!args.watch) { + process.exit(exitCode); + } + } else { + testModulePromise.then(function (testModuleName) { + evalElmCode(fs.readFileSync(dest, {encoding: "utf8"}), testModuleName); + }); + } + }); + }); + } + + runTests(); + }); + + +process.on('uncaughtException', function(error) { + if (/ an argument in Javascript/.test(error)) { + // Handle arg mismatch between js and elm code. Expected message from Elm: + // "You are giving module `Main` an argument in JavaScript. + // This module does not take arguments though! You probably need to change the + // initialization code to something like `Elm.Main.fullscreen()`]" + console.error("Error starting the node-test-runner."); + console.error("Please check your Javascript 'elm-test' and Elm 'node-test-runner' package versions are compatible"); + } else { + console.error("Unhandled exception while running the tests:", error); + } +}); diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/elm-package.json new file mode 100644 index 0000000..90063c6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "3.0.1", + "summary": "Run elm-test suites in a Node.js CLI. Get it with npm install -g elm-test", + "repository": "https://github.com/rtfeldman/node-test-runner.git", + "license": "BSD-3-Clause", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Test.Runner.Node" + ], + "dependencies": { + "elm-community/elm-test": "3.0.0 <= v < 4.0.0", + "elm-community/json-extra": "2.0.0 <= v < 3.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "mgold/elm-random-pcg": "4.0.2 <= v < 5.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/FailingTests.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/FailingTests.elm new file mode 100644 index 0000000..992fb5d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/FailingTests.elm @@ -0,0 +1,152 @@ +port module Main exposing (..) + +import Test.Runner.Node exposing (run, TestProgram) +import String +import Expect +import Test exposing (..) +import Fuzz exposing (..) +import Json.Encode exposing (Value) +import Char + + +main : TestProgram +main = + [ testWithoutNums + , testOxfordify + , noDescription + , testExpectations + , testFailingFuzzTests + , testFuzz + , testShrinkables + ] + |> Test.concat + |> run emit + + +port emit : ( String, Value ) -> Cmd msg + + +withoutNums : String -> String +withoutNums = + String.filter (\ch -> not (Char.isDigit ch || ch == '.')) + + +testWithoutNums : Test +testWithoutNums = + describe "withoutNums" + [ fuzzWith { runs = 100 } (tuple3 ( string, float, string )) "adding numbers to strings has no effect" <| + \( prefix, num, suffix ) -> + withoutNums (prefix ++ toString num ++ suffix) + |> Expect.equal (withoutNums (prefix ++ suffix)) + ] + + +testExpectations : Test +testExpectations = + describe "basic expectations" + [ test "this should succeed" <| + \() -> + "blah" + |> Expect.equal " blah" + , test "this should fail" <| + \() -> + "something" + |> Expect.equal "someting else" + , test "another failure" <| + \() -> + "forty-two" + |> Expect.equal "forty-three" + ] + + +{-| stubbed function under test +-} +oxfordify : a -> b -> c -> String +oxfordify _ _ _ = + "Alice, Bob, and Claire" + + +noDescription : Test +noDescription = + test "" <| + \() -> + Expect.equal "No description" "Whatsoever!" + + +testFuzz : Test +testFuzz = + describe "fuzzing" + [ fuzz2 string string "empty list etc" <| + \name punctuation -> + oxfordify "This sentence is empty" "." [] + |> Expect.equal "" + |> Expect.onFail "given an empty list, did not return an empty string" + , fuzz2 string string "further testing" <| + \name punctuation -> + oxfordify "This sentence contains " "." [ "one item" ] + |> Expect.equal "This sentence contains one item." + , fuzz2 string string "custom onFail here" <| + \name punctuation -> + oxfordify "This sentence contains " "." [ "one item", "two item" ] + |> Expect.equal "This sentence contains one item and two item." + |> Expect.onFail "given an empty list, did not return an empty string" + , fuzz2 string string "This is a test." <| + \name punctuation -> + oxfordify "This sentence contains " "." [ "one item", "two item", "three item" ] + |> Expect.equal "This sentence contains one item, two item, and three item." + |> Expect.onFail "given a list of length 3, did not return an oxford-style sentence" + ] + + +testFailingFuzzTests : Test +testFailingFuzzTests = + describe "the first element in this fuzz tuple" + [ fuzz2 string string "is always \"foo\"" <| + \str1 str2 -> + str1 + |> Expect.equal "foo" + ] + + +testOxfordify : Test +testOxfordify = + describe "oxfordify" + [ describe "given an empty sentence" + [ test "returns an empty string" <| + \() -> + oxfordify "This sentence is empty" "." [] + |> Expect.equal "" + ] + , describe "given a sentence with one item" + [ test "still contains one item" <| + \() -> + oxfordify "This sentence contains " "." [ "one item" ] + |> Expect.equal "This sentence contains one item." + ] + , describe "given a sentence with multiple items" + [ test "returns an oxford-style sentence" <| + \() -> + oxfordify "This sentence contains " "." [ "one item", "two item" ] + |> Expect.equal "This sentence contains one item and two item." + , test "returns an oxford-style sentence" <| + \() -> + oxfordify "This sentence contains " "." [ "one item", "two item", "three item" ] + |> Expect.equal "This sentence contains one item, two item, and three item." + ] + ] + + +testShrinkables : Test +testShrinkables = + describe "Some tests that should fail and produce shrunken values" + [ describe "a randomly generated integer" + [ fuzz int "is for sure exactly 0" <| Expect.equal 0 + , fuzz int "is <42" <| Expect.lessThan 42 + , fuzz int "is also >42" <| Expect.greaterThan 42 + ] + , describe "a randomly generated string" + [ fuzz string "equals its reverse" <| + \str -> + Expect.equal str (String.reverse str) + ] + ] diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/PassingTests.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/PassingTests.elm new file mode 100644 index 0000000..2813694 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/PassingTests.elm @@ -0,0 +1,23 @@ +port module Main exposing (..) + +import Test.Runner.Node exposing (run, TestProgram) +import Expect +import Test exposing (..) +import Json.Encode exposing (Value) + + +main : TestProgram +main = + [ plainExpectation ] + |> concat + |> run emit + + +port emit : ( String, Value ) -> Cmd msg + + +plainExpectation : Test +plainExpectation = + test "" <| + \() -> + Expect.equal "success" "success" diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/elm-package.json b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/elm-package.json new file mode 100644 index 0000000..e2120ee --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/examples/tests/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "1.0.0", + "summary": "node-test-runner example", + "repository": "https://github.com/rtfeldman/node-test-runner.git", + "license": "BSD-3-Clause", + "source-directories": [ + ".", + "../../src" + ], + "exposed-modules": [], + "dependencies": { + "elm-community/elm-test": "3.0.0 <= v < 4.0.0", + "elm-community/json-extra": "2.0.0 <= v < 3.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/html": "2.0.0 <= v < 3.0.0", + "mgold/elm-random-pcg": "4.0.2 <= v < 5.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/package.json b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/package.json new file mode 100644 index 0000000..fa35889 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/package.json @@ -0,0 +1,45 @@ +{ + "name": "elm-test", + "version": "0.18.0-alpha", + "description": "Run elm-test suites.", + "main": "elm-test.js", + "engines": { + "node": ">=4.0.0" + }, + "scripts": { + "test": "node tests/ci.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/rtfeldman/node-test-runner.git" + }, + "bin": { + "elm-test": "bin/elm-test" + }, + "keywords": [ + "elm", + "elm-test", + "cli" + ], + "author": "Richard Feldman", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/rtfeldman/node-test-runner/issues" + }, + "homepage": "https://github.com/rtfeldman/node-test-runner#readme", + "dependencies": { + "chalk": "1.1.3", + "chokidar": "1.6.0", + "cross-spawn": "4.0.0", + "find-up": "^1.1.2", + "firstline": "^1.2.0", + "fs-extra": "0.30.0", + "lodash": "4.13.1", + "minimist": "^1.2.0", + "node-elm-compiler": "4.1.0", + "temp": "0.8.3" + }, + "devDependencies": { + "shelljs": "0.7.3" + } +} diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Chalk.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Chalk.elm new file mode 100644 index 0000000..fd2f847 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Chalk.elm @@ -0,0 +1,21 @@ +module Chalk exposing (Chalk, encode, withColorChar) + +import Json.Encode as Encode exposing (Value) +import String + + +type alias Chalk = + { styles : List String, text : String } + + +encode : Chalk -> Value +encode { styles, text } = + Encode.object + [ ( "styles", Encode.list (List.map Encode.string styles) ) + , ( "text", Encode.string text ) + ] + + +withColorChar : Char -> String -> String -> Chalk +withColorChar icon textColor str = + { styles = [ textColor ], text = String.fromChar icon ++ " " ++ str ++ "\n" } diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Chalk.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Chalk.elm new file mode 100644 index 0000000..5b70b3e --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Chalk.elm @@ -0,0 +1,123 @@ +module Test.Reporter.Chalk exposing (reportBegin, reportComplete, reportSummary) + +import Chalk exposing (Chalk) +import Test.Reporter.Result as Results +import Expect +import Json.Encode as Encode exposing (Value) +import String +import Test.Runner exposing (formatLabels) +import Time exposing (Time) + + +formatDuration : Time -> String +formatDuration time = + toString time ++ " ms" + + +indent : String -> String +indent str = + str + |> String.split "\n" + |> List.map ((++) " ") + |> String.join "\n" + + +pluralize : String -> String -> Int -> String +pluralize singular plural count = + let + suffix = + if count == 1 then + singular + else + plural + in + String.join " " [ toString count, suffix ] + + +failuresToChalk : List String -> List Results.Failure -> List Chalk +failuresToChalk labels failures = + labelsToChalk labels ++ List.concatMap failureToChalk failures + + +labelsToChalk : List String -> List Chalk +labelsToChalk = + formatLabels (Chalk.withColorChar '↓' "dim") (Chalk.withColorChar '✗' "red") + + +failureToChalk : Results.Failure -> List Chalk +failureToChalk { given, message } = + let + messageChalk = + { styles = [], text = "\n" ++ indent message ++ "\n\n" } + in + if String.isEmpty given then + [ messageChalk ] + else + [ { styles = [ "dim" ], text = "\nGiven " ++ given ++ "\n" } + , messageChalk + ] + + +chalkWith : List Chalk -> Value +chalkWith chalks = + chalks + |> List.map Chalk.encode + |> Encode.list + + +reportBegin : { testCount : Int, initialSeed : Int } -> Value +reportBegin { testCount, initialSeed } = + chalkWith + [ { styles = [] + , text = + "\nelm-test\n--------\n\nRunning " + ++ pluralize "test" "tests" testCount + ++ ". To reproduce these results, run: elm-test --seed " + ++ toString initialSeed + ++ "\n" + } + ] + + +reportComplete : Results.TestResult -> Maybe Value +reportComplete { duration, labels, expectations } = + case List.filterMap Expect.getFailure expectations of + [] -> + Nothing + + failures -> + failuresToChalk labels failures + |> chalkWith + |> Just + + +reportSummary : Time -> List Results.TestResult -> Value +reportSummary duration results = + let + failed = + results + |> List.filter (.expectations >> List.all ((/=) Expect.pass)) + |> List.length + + headline = + if failed > 0 then + [ { styles = [ "underline", "red" ], text = "\nTEST RUN FAILED\n\n" } ] + else + [ { styles = [ "underline", "green" ], text = "\nTEST RUN PASSED\n\n" } ] + + passed = + (List.length results) - failed + + stat label value = + [ { styles = [ "dim" ], text = label } + , { styles = [], text = value ++ "\n" } + ] + in + [ headline + , stat "Duration: " (formatDuration duration) + , stat "Passed: " (toString passed) + , stat "Failed: " (toString failed) + ] + |> List.concat + |> List.map Chalk.encode + |> Encode.list diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Json.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Json.elm new file mode 100644 index 0000000..3be7b1b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Json.elm @@ -0,0 +1,78 @@ +module Test.Reporter.Json exposing (reportBegin, reportComplete, reportSummary) + +import Test.Reporter.Result as Results +import Expect exposing (Expectation) +import Json.Encode as Encode exposing (Value) +import Time exposing (Time) + + +reportBegin : { testCount : Int, initialSeed : Int } -> Value +reportBegin { testCount, initialSeed } = + Encode.object + [ ( "event", Encode.string "runStart" ) + , ( "testCount", Encode.string <| toString testCount ) + , ( "initialSeed", Encode.string <| toString initialSeed ) + ] + + +reportComplete : Results.TestResult -> Maybe Value +reportComplete { duration, labels, expectations } = + Just + <| Encode.object + [ ( "event", Encode.string "testCompleted" ) + , ( "status", Encode.string (getStatus expectations) ) + , ( "labels", encodeLabels labels ) + , ( "failures", encodeFailures expectations ) + , ( "duration", Encode.string <| toString duration ) + ] + + +getStatus : List Expectation -> String +getStatus expectations = + case (List.filterMap Expect.getFailure expectations) of + [] -> + "pass" + + xs -> + "fail" + + +encodeLabels : List String -> Value +encodeLabels labels = + List.reverse labels + |> List.map Encode.string + |> Encode.list + + +encodeFailures : List Expectation -> Value +encodeFailures expectations = + List.filterMap Expect.getFailure expectations + |> List.map encodeFailure + |> Encode.list + + +encodeFailure : Results.Failure -> Value +encodeFailure { given, message } = + Encode.object + [ ( "given", Encode.string given ) + , ( "actual", Encode.string message ) + ] + + +reportSummary : Time -> List Results.TestResult -> Value +reportSummary duration results = + let + failed = + results + |> List.filter (.expectations >> List.all ((/=) Expect.pass)) + |> List.length + + passed = + (List.length results) - failed + in + Encode.object + [ ( "event", Encode.string "runComplete" ) + , ( "passed", Encode.string <| toString passed ) + , ( "failed", Encode.string <| toString failed ) + , ( "duration", Encode.string <| toString duration ) + ] diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Reporter.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Reporter.elm new file mode 100644 index 0000000..72f2b02 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Reporter.elm @@ -0,0 +1,36 @@ +module Test.Reporter.Reporter exposing (..) + +import Test.Reporter.Chalk as ChalkReporter +import Test.Reporter.Json as JsonReporter +import Test.Reporter.Result exposing (TestResult) +import Json.Encode as Encode exposing (Value) +import Time exposing (Time) + + +type Report + = ChalkReport + | JsonReport + + +type alias TestReporter = + { format : String + , reportBegin : { testCount : Int, initialSeed : Int } -> Value + , reportComplete : TestResult -> Maybe Value + , reportSummary : Time -> List TestResult -> Value + } + + +createReporter : Report -> TestReporter +createReporter report = + case report of + JsonReport -> + TestReporter "JSON" + JsonReporter.reportBegin + JsonReporter.reportComplete + JsonReporter.reportSummary + + ChalkReport -> + TestReporter "CHALK" + ChalkReporter.reportBegin + ChalkReporter.reportComplete + ChalkReporter.reportSummary diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Result.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Result.elm new file mode 100644 index 0000000..c81bcef --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Reporter/Result.elm @@ -0,0 +1,15 @@ +module Test.Reporter.Result exposing (TestResult, Failure) + +import Expect exposing (Expectation) +import Time exposing (Time) + + +type alias TestResult = + { labels : List String + , expectations : List Expectation + , duration : Time + } + + +type alias Failure = + { given : String, message : String } diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Runner/Node.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Runner/Node.elm new file mode 100644 index 0000000..07c7eda --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Runner/Node.elm @@ -0,0 +1,242 @@ +module Test.Runner.Node exposing (run, runWithOptions, TestProgram) + +{-| # Node Runner + +Runs a test and outputs its results to the console. Exit code is 0 if tests +passed and 1 if any failed. + +@docs run, runWithOptions, TestProgram +-} + +import Test.Reporter.Reporter exposing (TestReporter, Report(..), createReporter) +import Test.Reporter.Result exposing (Failure, TestResult) +import Test.Runner.Node.App as App +import Test exposing (Test) +import Dict exposing (Dict) +import Expect exposing (Expectation) +import Json.Encode as Encode exposing (Value) +import Set exposing (Set) +import Task +import Time exposing (Time) +import Tuple +import Platform + + +type alias TestId = + Int + + +type alias Model = + { available : Dict TestId (() -> ( List String, List Expectation )) + , running : Set TestId + , queue : List TestId + , startTime : Time + , finishTime : Maybe Time + , completed : List TestResult + , testReporter : TestReporter + } + + +{-| A program which will run tests and report their results. +-} +type alias TestProgram = + Platform.Program Value (App.Model Msg Model) (App.Msg Msg) + + +type alias Emitter msg = + ( String, Value ) -> Cmd msg + + +type Msg + = Dispatch Time + | Complete TestId ( List String, List Expectation ) Time Time + | Finish Time + + +warn : String -> a -> a +warn str result = + let + _ = + Debug.log str + in + result + + +update : Emitter Msg -> Msg -> Model -> ( Model, Cmd Msg ) +update emit msg ({ testReporter } as model) = + case msg of + Finish finishTime -> + let + failed = + model.completed + |> List.filter (.expectations >> List.all ((/=) Expect.pass)) + |> List.length + + duration = + finishTime - model.startTime + + summary = + testReporter.reportSummary duration model.completed + + exitCode = + if failed == 0 then + 0 + else + 1 + + data = + Encode.object + [ ( "exitCode", Encode.int exitCode ) + , ( "format", Encode.string testReporter.format ) + , ( "message", summary ) + ] + in + ( model, emit ( "FINISHED", data ) ) + |> warn "Attempted to Dispatch when all tests completed!" + + Complete testId ( labels, expectations ) startTime endTime -> + let + result = + { labels = labels + , expectations = expectations + , duration = endTime - startTime + } + + newModel = + { model | completed = result :: model.completed } + + reportCmd = + case (testReporter.reportComplete result) of + Just val -> + emit + ( "TEST_COMPLETED" + , Encode.object + [ ( "format", Encode.string testReporter.format ) + , ( "message", val ) + ] + ) + + Nothing -> + Cmd.none + in + ( newModel, Cmd.batch [ reportCmd, dispatch ] ) + + Dispatch startTime -> + case model.queue of + [] -> + ( model, Task.perform Finish Time.now ) + + testId :: newQueue -> + case Dict.get testId model.available of + Nothing -> + ( model, Cmd.none ) + |> warn ("Could not find testId " ++ toString testId) + + Just run -> + let + complete = + Complete testId (run ()) startTime + + available = + Dict.remove testId model.available + + newModel = + { model + | available = available + , queue = newQueue + } + in + ( newModel, Task.perform complete Time.now ) + + +dispatch : Cmd Msg +dispatch = + Task.perform Dispatch Time.now + + +init : + Emitter Msg + -> { initialSeed : Int + , startTime : Time + , thunks : List (() -> ( List String, List Expectation )) + , report : Report + } + -> ( Model, Cmd Msg ) +init emit { startTime, initialSeed, thunks, report } = + let + indexedThunks : List ( TestId, () -> ( List String, List Expectation ) ) + indexedThunks = + List.indexedMap (,) thunks + + testCount = + List.length indexedThunks + + testReporter = + createReporter report + + model = + { available = Dict.fromList indexedThunks + , running = Set.empty + , queue = List.map Tuple.first indexedThunks + , completed = [] + , startTime = startTime + , finishTime = Nothing + , testReporter = testReporter + } + + reportCmd = + emit + ( "STARTED" + , Encode.object + [ ( "format", Encode.string testReporter.format ) + , ( "message", testReporter.reportBegin { testCount = testCount, initialSeed = initialSeed } ) + ] + ) + in + ( model, Cmd.batch [ dispatch, reportCmd ] ) + + +{-| Run the test and report the results. + +Fuzz tests use a default run count of 100, and an initial seed based on the +system time when the test runs begin. +-} +run : Emitter Msg -> Test -> TestProgram +run = + runWithOptions defaultOptions + + +{-| The default Options for runWithOptions. +-} +defaultOptions : Options +defaultOptions = + { runs = 100 + , seed = Nothing + } + + +{-| The Options you can pass to runWithOptions. +-} +type alias Options = + { runs : Int + , seed : Maybe Int + } + + +{-| Run the test using the provided options. If `Nothing` is provided for either +`runs` or `seed`, it will fall back on the options used in [`run`](#run). +-} +runWithOptions : + { a | runs : Int, seed : Maybe Int } + -> Emitter Msg + -> Test + -> TestProgram +runWithOptions { runs, seed } emit = + App.run + { runs = runs + , seed = seed + } + { init = init emit + , update = update emit + , subscriptions = \_ -> Sub.none + } diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Runner/Node/App.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Runner/Node/App.elm new file mode 100644 index 0000000..2ab004c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/src/Test/Runner/Node/App.elm @@ -0,0 +1,253 @@ +module Test.Runner.Node.App exposing (run, Model, Msg) + +{-| Test runner for a Node app + +@docs run + +-} + +import Test.Reporter.Reporter as Reporter exposing (Report(ChalkReport)) +import Test exposing (Test) +import Test.Runner exposing (Runner(..)) +import Expect exposing (Expectation) +import Task +import Random.Pcg +import Time exposing (Time) +import Json.Decode as Decode exposing (Value, Decoder) +import String +import Tuple +import Platform + + +type Msg subMsg + = Init Time + | SubMsg subMsg + + +type alias InitArgs = + { initialSeed : Int + , startTime : Time + , thunks : List (() -> ( List String, List Expectation )) + , report : Reporter.Report + } + + +type Model subMsg subModel + = Initialized (SubUpdate subMsg subModel) subModel + | Uninitialized + (SubUpdate subMsg subModel) + { maybeInitialSeed : Maybe Int + , report : Reporter.Report + , runs : Int + , test : Test + , init : InitArgs -> ( subModel, Cmd subMsg ) + } + + +timeToNumericSeed : Time -> Int +timeToNumericSeed time = + time + |> floor + |> Random.Pcg.initialSeed + |> Random.Pcg.step (Random.Pcg.int 100 Random.Pcg.maxInt) + |> Tuple.first + + +fromNever : Never -> a +fromNever a = + fromNever a + + +initOrUpdate : Msg subMsg -> Model subMsg subModel -> ( Model subMsg subModel, Cmd (Msg subMsg) ) +initOrUpdate msg maybeModel = + case maybeModel of + Uninitialized update { maybeInitialSeed, report, runs, test, init } -> + case msg of + Init time -> + let + numericSeed = + case maybeInitialSeed of + Just givenNumericSeed -> + givenNumericSeed + + Nothing -> + timeToNumericSeed time + + seed = + Random.Pcg.initialSeed numericSeed + + thunks = + test + |> Test.Runner.fromTest runs seed + |> toThunks + + ( subModel, subCmd ) = + init + { initialSeed = numericSeed + , startTime = time + , thunks = thunks + , report = report + } + in + ( Initialized update subModel, Cmd.map SubMsg subCmd ) + + SubMsg _ -> + Debug.crash "Attempted to run a SubMsg pre-Init!" + + Initialized update model -> + case msg of + SubMsg subMsg -> + let + ( newModel, cmd ) = + update subMsg model + in + ( Initialized update newModel, Cmd.map SubMsg cmd ) + + Init _ -> + Debug.crash "Attempted to init twice!" + + +type alias SubUpdate msg model = + msg -> model -> ( model, Cmd msg ) + + +type alias RunnerOptions = + { seed : Maybe Int + , runs : Int + } + + +type alias AppOptions msg model = + { init : InitArgs -> ( model, Cmd msg ) + , update : SubUpdate msg model + , subscriptions : model -> Sub msg + } + + +subscriptions : (subModel -> Sub subMsg) -> Model subMsg subModel -> Sub (Msg subMsg) +subscriptions subs model = + case model of + Uninitialized _ _ -> + Sub.none + + Initialized _ subModel -> + Sub.map SubMsg (subs subModel) + + +toThunks : Runner -> List (() -> ( List String, List Expectation )) +toThunks = + toThunksHelp [] + + +toThunksHelp : List String -> Runner -> List (() -> ( List String, List Expectation )) +toThunksHelp labels runner = + case runner of + Runnable runnable -> + [ \() -> ( labels, Test.Runner.run runnable ) ] + + Labeled label subRunner -> + toThunksHelp (label :: labels) subRunner + + Batch runners -> + List.concatMap (toThunksHelp labels) runners + + +intFromString : Decoder Int +intFromString = + Decode.string + |> Decode.andThen + (\str -> + case String.toInt str of + Ok num -> + Decode.succeed num + + Err err -> + Decode.fail err + ) + + +decodeReport : Decoder String -> Decoder Reporter.Report +decodeReport decoder = + decoder + |> Decode.andThen + (\str -> + case str of + "json" -> + Decode.succeed Reporter.JsonReport + + "chalk" -> + Decode.succeed Reporter.ChalkReport + + _ -> + Decode.fail <| "Invalid --report argument: " ++ str + ) + + +decodeInitArgs : Value -> Result String ( Maybe Int, Reporter.Report ) +decodeInitArgs args = + args + |> Decode.decodeValue + (Decode.oneOf + [ Decode.null ( Nothing, ChalkReport ) + , (Decode.map2 (,) + (Decode.field "seed" (Decode.nullable intFromString)) + (Decode.field "report" (decodeReport Decode.string)) + ) + ] + ) + + +{-| Run the tests and render the results as a Web page. +-} +run : RunnerOptions -> AppOptions msg model -> Test -> Program Value (Model msg model) (Msg msg) +run { runs, seed } appOpts test = + let + init args = + let + cmd = + Task.perform Init Time.now + + initArgs : ( Maybe Int, Reporter.Report ) + initArgs = + case ( decodeInitArgs args, seed ) of + -- ( decodeValue (nullable intFromString) maybeInitialSeed, seed ) of + -- The --seed argument didn't decode + ( Err str, _ ) -> + Debug.crash ("Invalid --seed argument: " ++ str) + + -- The user provided both a --seed flag and a seed from Elm + ( Ok ( Just fromCli, report ), Just fromElm ) -> + if fromCli == fromElm then + -- If they were the same, then that's no problem. + ( seed, report ) + else + -- If they were different, crash. We don't know which to use. + Debug.crash ("Received both a --seed flag (" ++ toString fromCli ++ ") and a runner option seed (" ++ toString fromElm ++ "). Which initial seed did you mean to use?") + + -- User passed --seed but not an Elm arg + ( Ok ( Just fromCli, report ), Nothing ) -> + ( Just fromCli, report ) + + -- User passed an Elm arg but not --seed + ( Ok ( Nothing, report ), Just fromElm ) -> + ( seed, report ) + + -- User passed neither --seed nor an Elm arg + ( Ok ( Nothing, report ), Nothing ) -> + ( Nothing, report ) + in + ( Uninitialized appOpts.update + { maybeInitialSeed = Tuple.first initArgs + , report = Tuple.second initArgs + , runs = runs + , test = test + , init = appOpts.init + } + , cmd + ) + in + Platform.programWithFlags + { init = init + , update = initOrUpdate + , subscriptions = subscriptions appOpts.subscriptions + } diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/Main.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/Main.elm new file mode 100644 index 0000000..7d62c1a --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/Main.elm @@ -0,0 +1,13 @@ +port module Main exposing (..) + +import Tests +import Test.Runner.Node exposing (run, TestProgram) +import Json.Encode exposing (Value) + + +main : TestProgram +main = + run emit Tests.all + + +port emit : ( String, Value ) -> Cmd msg diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/Tests.elm b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/Tests.elm new file mode 100644 index 0000000..f31f173 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/Tests.elm @@ -0,0 +1,37 @@ +module Tests exposing (..) + +import Test exposing (..) +import Expect +import Fuzz exposing (list, int, tuple, string) +import String + + +all : Test +all = + describe "Sample Test Suite" + [ describe "Unit test examples" + [ test "Addition" <| + \() -> + Expect.equal (3 + 7) 10 + , test "String.left" <| + \() -> + Expect.equal "a" (String.left 1 "abcdefg") + , test "This test should fail - you should remove it" <| + \() -> + Expect.fail "Failed as expected!" + ] + , describe "Fuzz test examples, using randomly generated input" + [ fuzz (list int) "Lists always have positive length" <| + \aList -> + List.length aList |> Expect.atLeast 0 + , fuzz (list int) "Sorting a list does not change its length" <| + \aList -> + List.sort aList |> List.length |> Expect.equal (List.length aList) + , fuzzWith { runs = 1000 } int "List.member will find an integer in a list containing it" <| + \i -> + List.member i [ i ] |> Expect.true "If you see this, List.member returned False!" + , fuzz2 string string "The length of a string equals the sum of its substrings' lengths" <| + \s1 s2 -> + s1 ++ s2 |> String.length |> Expect.equal (String.length s1 + String.length s2) + ] + ] diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/elm-package.json b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/elm-package.json new file mode 100644 index 0000000..ec675c1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "1.0.0", + "summary": "Sample Elm Test", + "repository": "https://github.com/user/project.git", + "license": "BSD-3-Clause", + "source-directories": [ + ".", + "../src" + ], + "exposed-modules": [], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-community/elm-test": "3.0.0 <= v < 4.0.0", + "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/gitignore b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/gitignore new file mode 100644 index 0000000..aee9810 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/templates/gitignore @@ -0,0 +1 @@ +/elm-stuff/ diff --git a/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/tests/ci.js b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/tests/ci.js new file mode 100644 index 0000000..654e619 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/rtfeldman/node-test-runner/3.0.0/tests/ci.js @@ -0,0 +1,79 @@ +#!/usr/bin/env node + +require('shelljs/global'); + +var filename = __filename.replace(__dirname + '/', ''); + +function run(testFile) { + var logFile = 'elm-test.test.log'; + var retVal; + + if (!testFile) { + retVal = exec('elm-test'); + } else { + logFile = testFile + '.test.log'; + retVal = exec('elm-test ' + testFile); + } + + retVal.toEnd(logFile); + return retVal.code; +} + +function assertTestFailure(testFile) { + var code = run(testFile); + if (code !== 1) { + exec('echo ' + filename + ': ERROR: ' + (testFile ? testFile + ': ' : '') + 'Expected tests to fail >&2'); + exit(1); + } +} + +function assertTestSuccess(testFile) { + var code = run(testFile); + if (code !== 0) { + exec('echo ' + filename + ': ERROR: ' + (testFile ? testFile + ': ' : '') + 'Expected tests to pass >&2'); + exit(1); + } +} + +echo(filename + ': Installing elm-test...'); +exec('npm install --global'); + +echo(filename + ': Verifying installed elm-test version...'); +exec('elm-test --version'); + +echo(filename + ': Testing examples...'); + +cd('examples/tests'); +exec('elm-package install --yes'); +assertTestSuccess('PassingTests.elm'); +assertTestFailure('FailingTests.elm'); +cd('../..'); + +echo(filename + ': Testing elm-test init...'); +mkdir('-p', 'tmp'); +cd('tmp'); +exec('elm-test init --yes'); +cd('tests'); +exec('elm-package install --yes'); +cd('..'); +assertTestFailure(); + +// update failing test to passing test +sed('-i', /should fail/, 'should pass', 'tests/Tests.elm'); +sed('-i', /Expect.fail "failed as expected!"/, 'Expect.pass', 'tests/Tests.elm'); +rm('-Rf', 'tests/elm-stuff'); +cd('tests'); +exec('elm-package install --yes'); +cd('..'); +assertTestSuccess(); + +cd('..'); +rm('-Rf', 'tmp'); + +echo(''); +echo(filename + ': Everything looks good!'); +echo(' '); +echo(' __ ,_ _ __, -/- , __ __ _ , , '); +echo('_(_/__/ (__(/_(_/(__/_ _/_)__(_/__(_,__(_,__(/__/_)__/_)_'); +echo(' _/_ '); +echo('(/ '); diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/.editorconfig b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/.editorconfig new file mode 100644 index 0000000..d203964 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/.editorconfig @@ -0,0 +1,17 @@ +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 + +[*.elm] +indent_style = space +indent_size = 4 + +[*.yml] +indent_style = space +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/.gitignore b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/.gitignore new file mode 100644 index 0000000..27c83cf --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/.gitignore @@ -0,0 +1,4 @@ +elm-stuff +elm.js +node_modules +.DS_Store diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/changelog.md b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/changelog.md new file mode 100644 index 0000000..a47620b --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/changelog.md @@ -0,0 +1,15 @@ +# Changelog + +- `11.0.0` Change the query to `List (String, String)`. This allows the query string to hold duplicate values, which is valid. +- `10.0.2` Upgrade to Elm 0.18 +- `10.0.1` `extractPort` attempts to add a default port if missing in the url +- `10.0.0` Added `hasLeadingSlash` +- `9.0.0` Added `hasTrailingSlash` +- `8.0.0` `hash` is a string, not a list anymore +- `7.3.0` Added `hashToString` +- `7.2.0` Added `queryToString` +- `7.1.0` Added `appendPathSegments` +- `7.0.0` Hash goes after query as per https://url.spec.whatwg.org/ +- `6.0.0` `setQuery` replaces the whole query, Added `addQuery` and `removeQuery` +- `5.0.1` `setQuery` removes the key when passed an empty value +- `5.0.0` Renamed `fragment` to `hash` to aling with the MDN documentation better \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/elm-package.json b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/elm-package.json new file mode 100644 index 0000000..664bfd0 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/elm-package.json @@ -0,0 +1,17 @@ +{ + "version": "11.0.0", + "summary": "Parse and construct URLs", + "repository": "https://github.com/sporto/erl.git", + "license": "MIT", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Erl" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/http": "1.0.0 <= v < 2.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/package.json b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/package.json new file mode 100644 index 0000000..f6b5b14 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/package.json @@ -0,0 +1,22 @@ +{ + "name": "erl", + "version": "1.0.0", + "description": "A URL parsing library for ELM", + "main": "elm.js", + "scripts": { + "test": "elm-test tests/Main.elm" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sporto/erl.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/sporto/erl/issues" + }, + "homepage": "https://github.com/sporto/erl#readme", + "dependencies": { + "elm-test": "^0.18.0" + } +} diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/readme.md b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/readme.md new file mode 100644 index 0000000..8f1e56d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/readme.md @@ -0,0 +1,79 @@ +# Erl + +[ ![Codeship Status for sporto/erl](https://codeship.com/projects/74c708d0-6c07-0133-ba44-0e105eb8924a/status?branch=master)](https://codeship.com/projects/115393) + +A URL parsing and construction library for ELM + +## `parse` a url string + +```elm +-- Given a url string +url = "http://sam:pass@api.example.com:3000/products/kids?color=red&age=10#toys/1" + +Erl.parse url + +-- Returns a Erl.Url record: + +{ + protocol: "http", + username: "sam", + password: "pass", + host: ["api", "example", "com"], + port_: 3000, + path: ["products", "kids"], + hash: "toys/1", + hasLeadingSlash: True, + hasTrailingSlash: False, + query: Dict { + "color": "red", + "age": "10" + } +} +``` + +See MDN for more details (https://developer.mozilla.org/en-US/docs/Web/API/Location). Note that in MDN `query` is called `search`. + +## Construct + +### `new` + +```elm +-- Construct an empty Erl.Url record: + +url = + Erl.new +``` + +## `toString` + +```elm +-- Given a Erl.Url record (url): + +Erl.toString url + +-- Returns the url as string: + +"http://www.foo.com:2000/users/1?k=2&q=1#a/b" +``` + +## Mutations + +See documentation + +## Documentation + +[Documentation at package.elm-lang.org](http://package.elm-lang.org/packages/sporto/erl/latest/Erl) + +## Test + +``` +yarn install +npm test +``` + +## Todo + +- Username +- Password + +## [Changelog](https://github.com/sporto/erl/blob/master/changelog.md) diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/src/Erl.elm b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/src/Erl.elm new file mode 100644 index 0000000..2331191 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/src/Erl.elm @@ -0,0 +1,645 @@ +module Erl exposing (addQuery, clearQuery, extractHash, extractHost, extractPath, extractPort, extractProtocol, extractQuery, new, parse, removeQuery, setQuery, appendPathSegments, toString, queryToString, Url, Query) + +{-| Library for parsing and constructing URLs + +# Types +@docs Url, Query + +# Parse +@docs parse + +# Parse helpers +@docs extractHash, extractHost, extractPath, extractProtocol, extractPort, extractQuery + +# Construct +@docs new + +# Mutation helpers +@docs addQuery, setQuery, removeQuery, clearQuery, appendPathSegments + +# Serialize +@docs toString + +# Serialization helpers +@docs queryToString + +-} + +import Dict +import Http +import Regex +import String exposing (..) + + +-- TYPES + + +{-| List of tuples that holds the keys and values in the query string +-} +type alias Query = + List ( String, String ) + + +{-| Record that holds url attributes +-} +type alias Url = + { protocol : String + , username : String + , password : String + , host : List String + , port_ : Int + , path : List String + , hasLeadingSlash : Bool + , hasTrailingSlash : Bool + , hash : String + , query : Query + } + + + +-- UTILS + + +notEmpty : String -> Bool +notEmpty str = + not (isEmpty str) + + + +-- "aa#bb" --> "bb" + + +rightFrom : String -> String -> String +rightFrom delimiter str = + let + parts = + split delimiter str + in + case List.length parts of + 0 -> + "" + + 1 -> + "" + + _ -> + parts + |> List.reverse + |> List.head + |> Maybe.withDefault "" + + +rightFromOrSame : String -> String -> String +rightFromOrSame delimiter str = + let + parts = + split delimiter str + in + parts + |> List.reverse + |> List.head + |> Maybe.withDefault "" + + + +-- "a/b" -> "a" +-- "a" => "a" +-- "/b" => "" + + +leftFromOrSame : String -> String -> String +leftFromOrSame delimiter str = + let + parts = + split delimiter str + in + parts + |> List.head + |> Maybe.withDefault "" + + + +-- "a/b" -> "a" +-- "/b" -> "" +-- "a" -> "" + + +leftFrom : String -> String -> String +leftFrom delimiter str = + let + parts = + split delimiter str + + head = + List.head parts + in + case List.length parts of + 0 -> + "" + + 1 -> + "" + + _ -> + head |> Maybe.withDefault "" + + + +-- PROTOCOL + + +{-| Extract the protocol from the url + +-} +extractProtocol : String -> String +extractProtocol str = + let + parts = + split "://" str + in + case List.length parts of + 1 -> + "" + + _ -> + Maybe.withDefault "" (List.head parts) + + + +-- HOST + + +{-| Extract the host from the url + +-} + + + +-- valid host: a-z 0-9 and - + + +extractHost : String -> String +extractHost str = + let + dotsRx = + "((\\w|-)+\\.)+(\\w|-)+" + + localhostRx = + "localhost" + + rx = + "(" ++ dotsRx ++ "|" ++ localhostRx ++ ")" + in + str + |> rightFromOrSame "//" + |> leftFromOrSame "/" + |> Regex.find (Regex.AtMost 1) (Regex.regex rx) + |> List.map .match + |> List.head + |> Maybe.withDefault "" + + +parseHost : String -> List String +parseHost str = + str + |> split "." + + +host : String -> List String +host str = + parseHost (extractHost str) + + + +-- PORT + + +{-| Extract the port from the url + +If no port is included in the url then Erl will attempt to add a default port: + +Http -> 80 +Https -> 443 +FTP -> 21 +SFTP -> 22 + +-} +extractPort : String -> Int +extractPort str = + let + rx = + Regex.regex ":\\d+" + + res = + Regex.find (Regex.AtMost 1) rx str + in + res + |> List.map .match + |> List.head + |> Maybe.withDefault "" + |> String.dropLeft 1 + |> toInt + |> \result -> + case result of + Ok port_ -> + port_ + + _ -> + case extractProtocol str of + "http" -> + 80 + + "https" -> + 443 + + "ftp" -> + 21 + + "sftp" -> + 22 + + _ -> + 0 + + + +-- PATH + + +{-| Extract the path from the url + +-} +extractPath : String -> String +extractPath str = + let + host = + extractHost str + in + str + |> rightFromOrSame "//" + |> leftFromOrSame "?" + |> leftFromOrSame "#" + |> Regex.replace (Regex.AtMost 1) (Regex.regex host) (\_ -> "") + |> Regex.replace (Regex.AtMost 1) (Regex.regex ":\\d+") (\_ -> "") + + +parsePath : String -> List String +parsePath str = + str + |> split "/" + |> List.filter notEmpty + |> List.map Http.decodeUri + |> List.map (Maybe.withDefault "") + + +pathFromAll : String -> List String +pathFromAll str = + parsePath (extractPath str) + + +hasLeadingSlashFromAll : String -> Bool +hasLeadingSlashFromAll str = + Regex.contains (Regex.regex "^/") (extractPath str) + + +hasTrailingSlashFromAll : String -> Bool +hasTrailingSlashFromAll str = + Regex.contains (Regex.regex "/$") (extractPath str) + + + +-- FRAGMENT + + +{-| Extract the hash (hash) from the url + +-} +extractHash : String -> String +extractHash str = + str + |> split "#" + |> List.drop 1 + |> List.head + |> Maybe.withDefault "" + + +hashFromAll : String -> String +hashFromAll str = + extractHash str + + + +-- QUERY + + +{-| Extract the query string from the url + +-} +extractQuery : String -> String +extractQuery str = + str + |> split "?" + |> List.drop 1 + |> List.head + |> Maybe.withDefault "" + |> split "#" + |> List.head + |> Maybe.withDefault "" + + + +-- "a=1" --> ("a", "1") + + +queryStringElementToTuple : String -> ( String, String ) +queryStringElementToTuple element = + let + splitted = + split "=" element + + first = + Maybe.withDefault "" (List.head splitted) + + firstDecoded = + Http.decodeUri first |> Maybe.withDefault "" + + second = + Maybe.withDefault "" (List.head (List.drop 1 splitted)) + + secondDecoded = + Http.decodeUri second |> Maybe.withDefault "" + in + ( firstDecoded, secondDecoded ) + + + +-- "a=1&b=2&a=3" --> [("a", "1"), ("b", "2"), ("a", "1")] + + +parseQuery : String -> Query +parseQuery queryString = + let + splitted = + split "&" queryString + in + if String.isEmpty queryString then + [] + else + List.map queryStringElementToTuple splitted + + +queryFromAll : String -> Query +queryFromAll all = + all + |> extractQuery + |> parseQuery + + +{-| Parse a url string, returns an Erl.Url record + + Erl.parse "http://api.example.com/users/1#x/1?a=1" == Erl.Url{...} +-} +parse : String -> Url +parse str = + { host = (host str) + , hash = (hashFromAll str) + , password = "" + , path = (pathFromAll str) + , hasLeadingSlash = (hasLeadingSlashFromAll str) + , hasTrailingSlash = (hasTrailingSlashFromAll str) + , port_ = (extractPort str) + , protocol = (extractProtocol str) + , query = (queryFromAll str) + , username = "" + } + + + +-- TO STRING + + +{-| Convert to a string only the query component of an url, this includes '?' + + Erl.queryToString url == "?a=1&b=2" +-} +queryToString : Url -> String +queryToString url = + let + encodedTuples = + List.map (\( x, y ) -> ( Http.encodeUri x, Http.encodeUri y )) url.query + + parts = + List.map (\( a, b ) -> a ++ "=" ++ b) encodedTuples + in + if List.isEmpty url.query then + "" + else + "?" ++ (join "&" parts) + + +protocolComponent : Url -> String +protocolComponent url = + case url.protocol of + "" -> + "" + + _ -> + url.protocol ++ "://" + + +hostComponent : Url -> String +hostComponent url = + Http.encodeUri (join "." url.host) + + +portComponent : Url -> String +portComponent url = + case url.port_ of + 0 -> + "" + + 80 -> + "" + + _ -> + ":" ++ (Basics.toString url.port_) + + +pathComponent : Url -> String +pathComponent url = + let + encoded = + List.map Http.encodeUri url.path + + leadingSlash = + if hostComponent url /= "" || url.hasLeadingSlash then + "/" + else + "" + in + if (List.length url.path) == 0 then + "" + else + leadingSlash ++ (join "/" encoded) + + +trailingSlashComponent : Url -> String +trailingSlashComponent url = + if url.hasTrailingSlash == True then + "/" + else + "" + + +{-| Convert to a string the hash component of an url, this includes '#' + + queryToString url == "#a/b" +-} +hashToString : Url -> String +hashToString url = + if String.isEmpty url.hash then + "" + else + "#" ++ url.hash + + +{-| Generate an empty Erl.Url record + + Erl.new == + + { protocol = "" + , username = "" + , password = "" + , host = [] + , path = [] + , hasLeadingSlash = False + , hasTrailingSlash = False + , port_ = 0 + , hash = "" + , query = Dict.empty + } + +-} +new : Url +new = + { protocol = "" + , username = "" + , password = "" + , host = [] + , path = [] + , hasLeadingSlash = False + , hasTrailingSlash = False + , port_ = 0 + , hash = "" + , query = [] + } + + +{-| Clears the current query string + + Erl.clearQuery url +-} +clearQuery : Url -> Url +clearQuery url = + { url | query = [] } + + +{-| Adds key/value in query string + + Erl.addQuery key value url + +This doesn't replace existing keys, so if this is a duplicated this key is just added. +-} +addQuery : String -> String -> Url -> Url +addQuery key val url = + let + updated = + url.query + |> List.reverse + |> (::) ( key, val ) + |> List.reverse + in + { url | query = updated } + + +{-| Set key/value in query string, removes any existing one if necessary. + + Erl.setQuery key value url +-} +setQuery : String -> String -> Url -> Url +setQuery key val url = + let + without = + removeQuery key url + in + addQuery key val without + + +{-| Removes key from query string + + Erl.removeQuery key url +-} +removeQuery : String -> Url -> Url +removeQuery key url = + let + updated = + List.filter (\( k, v ) -> k /= key) url.query + in + { url | query = updated } + + +{-| Append some path segments to a url + + Erl.appendPathSegments ["hello", "world"] url +-} +appendPathSegments : List String -> Url -> Url +appendPathSegments segments url = + let + newPath = + List.append url.path segments + in + { url | path = newPath } + + +{-| Generate url string from an Erl.Url record + + url = { protocol = "http", + , username = "", + , password = "", + , host = ["www", "foo", "com"], + , path = ["users", "1"], + , hasLeadingSlash = False + , hasTrailingSlash = False + , port_ = 2000, + , hash = "a/b", + , query = Dict.empty |> Dict.insert "q" "1" |> Dict.insert "k" "2" + } + + Erl.toString url == "http://www.foo.com:2000/users/1?k=2&q=1#a/b" + +-} +toString : Url -> String +toString url = + let + protocol_ = + protocolComponent url + + host_ = + hostComponent url + + port_ = + portComponent url + + path_ = + pathComponent url + + trailingSlash_ = + trailingSlashComponent url + + query_ = + queryToString url + + hash = + hashToString url + in + protocol_ ++ host_ ++ port_ ++ path_ ++ trailingSlash_ ++ query_ ++ hash diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/src/ErlTests.elm b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/src/ErlTests.elm new file mode 100644 index 0000000..c957a73 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/src/ErlTests.elm @@ -0,0 +1,638 @@ +module ErlTests exposing (..) + +import String +import Dict +import Erl +import Test exposing (..) +import Expect + + +-- PROTOCOL + + +testProtocol = + let + inputs = + [ ( "http://example.com:3000", "http" ) + , ( "http://localhost:7000", "http" ) + ] + + run ( input, expected ) = + test "Protocol" + <| \() -> Expect.equal expected (Erl.parse input).protocol + in + describe "Protocol" + (List.map run inputs) + + +testProtocolExtract = + let + inputs = + [ ( "http://example.com:3000", "http" ) + , ( "https://example.com:3000", "https" ) + , ( "example.com:3000", "" ) + ] + + run ( input, expected ) = + test "Protocol" + <| \() -> Expect.equal expected (Erl.extractProtocol input) + in + describe "Extract protocol" + (List.map run inputs) + + + +-- USERNAME +-- PASSWORD +-- HOST +-- host must be a-z 0-9 and - + + +testHostExtract : Test +testHostExtract = + let + inputs = + [ ( "http://foo.com", "foo.com" ) + , ( "http://12345.com", "12345.com" ) + , ( "http://api.foo.com", "api.foo.com" ) + , ( "http://api.foo.com/", "api.foo.com" ) + , ( "http://api.foo.com/users", "api.foo.com" ) + , ( "http://api.foo.com/users", "api.foo.com" ) + , ( "http://localhost/users", "localhost" ) + , ( "http://localhost", "localhost" ) + , ( "http://localhost/localhost", "localhost" ) + , ( "http://192.168.0.0", "192.168.0.0" ) + , ( "http://192.168.0.0/localhost", "192.168.0.0" ) + , ( "foo.com", "foo.com" ) + , ( "foo-.com", "foo-.com" ) + , ( "foo.com/users", "foo.com" ) + , ( "api.foo.com", "api.foo.com" ) + , ( "users/1/edit", "" ) + , ( "users/index.html", "" ) + , ( "/users/index.html", "" ) + ] + + run ( input, expected ) = + test ("Extracts host " ++ input) + <| \() -> Expect.equal expected (Erl.extractHost input) + in + describe "Extract host" + (List.map run inputs) + + +testHost : Test +testHost = + let + inputs = + [ ( "http://www.foo.com/users", [ "www", "foo", "com" ] ) + ] + + run ( input, expected ) = + test ("Parses host in " ++ input) + <| \() -> Expect.equal expected (Erl.parse input).host + in + describe "Parses host" + (List.map run inputs) + + + +-- PORT + + +testPortExtract : Test +testPortExtract = + let + inputs = + [ ( "http://example.com:3000", 3000 ) + , ( "http://example.com:3000/", 3000 ) + , ( "http://example.com:3000/users", 3000 ) + , ( "http://example.com", 80 ) + , ( "http://example.com/users", 80 ) + , ( "https://example.com:3000", 3000 ) + , ( "https://example.com:3000/", 3000 ) + , ( "https://example.com:3000/users", 3000 ) + , ( "https://example.com", 443 ) + , ( "https://example.com/users", 443 ) + , ( "ftp://example.com:3000", 3000 ) + , ( "ftp://example.com:3000/", 3000 ) + , ( "ftp://example.com:3000/users", 3000 ) + , ( "ftp://example.com", 21 ) + , ( "ftp://example.com/users", 21 ) + , ( "sftp://example.com:3000", 3000 ) + , ( "sftp://example.com:3000/", 3000 ) + , ( "sftp://example.com:3000/users", 3000 ) + , ( "sftp://example.com", 22 ) + , ( "sftp://example.com/users", 22 ) + , ( "xyz://example.com:3000", 3000 ) + , ( "xyz://example.com:3000/", 3000 ) + , ( "xyz://example.com:3000/users", 3000 ) + , ( "xyz://example.com", 0 ) + , ( "xyz://example.com/users", 0 ) + ] + + run ( input, expected ) = + test "Extracts the port" + <| \() -> Expect.equal expected (Erl.extractPort input) + in + describe "Extract port" + (List.map run inputs) + + +testPort : Test +testPort = + let + inputs = + [ ( "http://example.com:3000/users", 3000 ) + , ( "http://example.com/users", 80 ) + ] + + run ( input, expected ) = + test "Extracts the port" + <| \() -> Expect.equal expected (Erl.parse input).port_ + in + describe "Port" + (List.map run inputs) + + + +-- PATH + + +testPathExtract : Test +testPathExtract = + let + inputs = + [ ( "http://foo.com/users/index.html", "/users/index.html" ) + , ( "//foo.com/users/index.html", "/users/index.html" ) + , ( "http://localhost/users/index.html", "/users/index.html" ) + , ( "//localhost/localhost/users/index.html", "/localhost/users/index.html" ) + , ( "/users/index.html", "/users/index.html" ) + , ( "users/index.html", "users/index.html" ) + , ( "users/index.html#xyz", "users/index.html" ) + , ( "users/index.html?a=1", "users/index.html" ) + , ( "http://example.com:2000", "" ) + ] + + run ( input, expected ) = + test ("Extracts path " ++ input) + <| \() -> Expect.equal expected (Erl.extractPath input) + in + describe "Extract path" + (List.map run inputs) + + +testPath : Test +testPath = + let + inputs = + [ ( "http://foo.com/users/index.html?a=1", [ "users", "index.html" ] ) + , ( "/users/1/edit", [ "users", "1", "edit" ] ) + , ( "//localhost/users/1/edit", [ "users", "1", "edit" ] ) + , -- it decodes + ( "/us%2Fers/1/edit", [ "us/ers", "1", "edit" ] ) + ] + + run ( input, expected ) = + test "Parses the path" + <| \() -> Expect.equal expected (Erl.parse input).path + in + describe "Path" + (List.map run inputs) + + +testHasLeadingSlash : Test +testHasLeadingSlash = + let + inputs = + [ ( "/users/all/?a=1", True ) + , ( "http://foo.com/users/all/?a=1", True ) + , ( "http://www.foo.com:2000/users/1?k=2&q=1#a/b", True ) + , ( "users/all/?a=1", False ) + ] + + run ( input, expected ) = + test "Identifies the absence of a leading slash" + <| \() -> Expect.equal expected (Erl.parse input).hasLeadingSlash + in + describe "Path" + (List.map run inputs) + + +testHasTrailingSlash : Test +testHasTrailingSlash = + let + inputs = + [ ( "http://foo.com/users/all/?a=1", True ) + , ( "http://foo.com/users/all?a=1", False ) + ] + + run ( input, expected ) = + test "Identifies the presence of a trailing slash" + <| \() -> Expect.equal expected (Erl.parse input).hasTrailingSlash + in + describe "Path" + (List.map run inputs) + + +testAppendPathSegments : Test +testAppendPathSegments = + let + inputs = + [ ( "http://foo.com/users/index.html?a=1", [ "extra" ], [ "users", "index.html", "extra" ] ) + , ( "/", [], [] ) + , ( "/zero", [ "one", "two" ], [ "zero", "one", "two" ] ) + ] + + run ( inputUrl, inputPathSegments, expected ) = + let + inputUrlAsUrl = + Erl.parse inputUrl + + actual = + (Erl.appendPathSegments inputPathSegments inputUrlAsUrl).path + in + test "Appends segments to the path" + <| \() -> Expect.equal expected actual + in + describe "appendPathSegments" + (List.map run inputs) + + + +-- FRAGMENT + + +testHashExtract = + let + inputs = + [ ( "#/users/1", "/users/1" ) + , ( "www.foo.com/hello?a=1#/users/1", "/users/1" ) + ] + + run ( input, expected ) = + test "Extracts the hash" + <| \() -> Expect.equal expected (Erl.extractHash input) + in + describe "Hash" + (List.map run inputs) + + +testHash = + let + inputs = + [ ( "it parses a hash by itself" + , "#/users/1" + , "/users/1" + ) + , ( "it parses a hash as part of an url" + , "www.foo.com?a=1#/users/1" + , "/users/1" + ) + , ( "it keeps the encoding" + , "#/us%2Fers/1" + , "/us%2Fers/1" + ) + ] + + run ( testCase, input, expected ) = + let + actual = + (Erl.parse input).hash + + result = + Expect.equal expected actual + in + test testCase <| \() -> result + in + describe "Hash" + (List.map run inputs) + + + +-- QUERY + + +testQueryExtract = + let + inputs = + [ ( "http://foo.com/users?a=1", "a=1" ) + , ( "http://foo.com/users?a=1#/users", "a=1" ) + ] + + run ( input, expected ) = + test "Extracts the query" + <| \() -> Expect.equal expected (Erl.extractQuery input) + in + describe "Query" + (List.map run inputs) + + +testQuery = + let + inputs = + [ ( "users?a=1&b=2", [ ( "a", "1" ), ( "b", "2" ) ] ) + , ( "users?a%3F=1%26", [ ( "a?", "1&" ) ] ) + , ( "users?a=1&a=2", [ ( "a", "1" ), ( "a", "2" ) ] ) + ] + + run ( input, expected ) = + test "Parses the query" + <| \() -> Expect.equal expected (Erl.parse input).query + in + describe "Query" + (List.map run inputs) + + +testQueryToString = + let + inputs = + [ ( "http://foo.com/a/?a=1&b=2#hash", "?a=1&b=2" ) + , ( "http://foo.com/a/#hash", "" ) + ] + + run ( input, expected ) = + let + url = + Erl.parse input + + actual = + Erl.queryToString url + in + test "queryToString" + <| \() -> Expect.equal expected actual + in + describe "queryToString" (List.map run inputs) + + + +-- TO STRING + + +testToString = + let + url1 = + { protocol = "http" + , username = "" + , password = "" + , host = [ "www", "foo", "com" ] + , path = [ "users", "1" ] + , hasLeadingSlash = True + , hasTrailingSlash = False + , port_ = 2000 + , hash = "a/b" + , query = [ ( "q", "1" ), ( "k", "2" ) ] + } + + url2 = + { protocol = "" + , username = "" + , password = "" + , host = [] + , port_ = 0 + , path = [] + , hasLeadingSlash = False + , hasTrailingSlash = False + , hash = "" + , query = [] + } + + inputs = + [ ( "it converts to string" + , url1 + , "http://www.foo.com:2000/users/1?q=1&k=2#a/b" + ) + , ( "it can have a trailing slash" + , { url1 | hasTrailingSlash = True } + , "http://www.foo.com:2000/users/1/?q=1&k=2#a/b" + ) + , ( "it can have an empty protocol" + , { url1 | protocol = "" } + , "www.foo.com:2000/users/1?q=1&k=2#a/b" + ) + , ( "it doesn't include the port when it is 80" + , { url1 | port_ = 80 } + , "http://www.foo.com/users/1?q=1&k=2#a/b" + ) + , ( "it doesn't add # when hash is empty" + , { url1 | hash = "" } + , "http://www.foo.com:2000/users/1?q=1&k=2" + ) + , ( "it doesn't add query when query is empty" + , { url1 | query = [] } + , "http://www.foo.com:2000/users/1#a/b" + ) + , ( "it adds duplicate values in the query" + , { url1 | query = [ ( "a", "1" ), ( "a", "2" ) ] } + , "http://www.foo.com:2000/users/1?a=1&a=2#a/b" + ) + , -- + ( "it encodes values in host" + , { url1 | host = [ "aa/bb", "com" ] } + , "http://aa%2Fbb.com:2000/users/1?q=1&k=2#a/b" + ) + , ( "it encodes values in path" + , { url1 | path = [ "aa/bb", "2" ] } + , "http://www.foo.com:2000/aa%2Fbb/2?q=1&k=2#a/b" + ) + , ( "it encodes values in query" + , { url1 | query = [ ( "a/b", "c/d" ) ] } + , "http://www.foo.com:2000/users/1?a%2Fb=c%2Fd#a/b" + ) + , ( "it handles localhost which has no ." + , { url1 | host = [ "localhost" ] } + , "http://localhost:2000/users/1?q=1&k=2#a/b" + ) + , ( "it handles a url without host, port, path" + , { url2 | hash = "a/b", query = [ ( "k", "1" ) ] } + , "?k=1#a/b" + ) + , ( "it handles a url with only query" + , { url2 | query = [ ( "k", "1" ) ] } + , "?k=1" + ) + ] + + run ( testCase, input, expected ) = + let + actual = + Erl.toString input + + result = + Expect.equal expected actual + in + test testCase <| \() -> result + in + describe "toString" + (List.map run inputs) + + +testRoundTrips = + let + inputs = + [ ( "Just host", "http://example.com" ) + , ( "Host with port", "http://example.com:2000" ) + , ( "With path", "http://example.com/users" ) + , ( "Path with trailing slash", "http://example.com/users/" ) + , ( "Deeper path", "http://example.com/users/1" ) + , ( "With query string", "http://example.com/users/1?color=red" ) + , ( "With hash", "http://example.com/users/1#a/b" ) + , ( "With query and hash", "http://example.com/users/1?color=red#a/b" ) + , ( "Without leading slash", "users/1?color=red#a/b" ) + , ( "With leading slash", "/users/1?color=red#a/b" ) + ] + + run ( testCase, input ) = + let + actual = + (input |> Erl.parse |> Erl.toString) + in + test testCase + <| \() -> Expect.equal input actual + in + describe "Round trip" + (List.map run inputs) + + +testNew = + let + expected = + { protocol = "" + , username = "" + , password = "" + , host = [] + , port_ = 0 + , path = [] + , hasLeadingSlash = False + , hasTrailingSlash = False + , hash = "" + , query = [] + } + + actual = + Erl.new + in + test "Generates an empty url" + <| \() -> Expect.equal expected actual + + +testAddQuery = + let + inputs = + [ ( Erl.new + |> Erl.addQuery "a" "1" + |> Erl.addQuery "b" "2" + |> .query + , [ ( "a", "1" ), ( "b", "2" ) ] + ) + , ( Erl.new + |> Erl.addQuery "a" "1" + |> Erl.addQuery "a" "2" + |> .query + , [ ( "a", "1" ), ( "a", "2" ) ] + ) + ] + + run ( actual, expected ) = + test "addQuery" + <| \() -> Expect.equal expected actual + in + describe "Adds to the query" + (List.map run inputs) + + +testSetQuery = + let + inputs = + [ ( Erl.new + |> Erl.addQuery "a" "1" + |> Erl.setQuery "a" "2" + |> .query + , [ ( "a", "2" ) ] + ) + ] + + run ( actual, expected ) = + test "setQuery" + <| \() -> Expect.equal expected actual + in + describe "Sets the query" + (List.map run inputs) + + +testRemoveQuery = + let + expected = + [ ( "a", "1" ) ] + + actual = + Erl.new + |> Erl.addQuery "a" "1" + |> Erl.addQuery "b" "2" + |> Erl.removeQuery "b" + |> .query + in + test "Removes the query" + <| \() -> Expect.equal expected actual + + +testQueryClear = + let + expected = + [] + + actual = + Erl.new + |> Erl.setQuery "a" "1" + |> Erl.clearQuery + |> .query + in + test "Cleans the query" + <| \() -> Expect.equal expected actual + + +testPathEdgeCase = + let + expected = + "http://some.domain/content" + + actual = + Erl.parse "http://some.domain" + |> Erl.appendPathSegments [ "content" ] + |> Erl.toString + in + test "Single append with host" + <| \() -> Expect.equal expected actual + + + +-- describe : String -> List Test -> Test + + +all : Test +all = + describe "Tests" + [ testAddQuery + , testAppendPathSegments + , testHash + , testHashExtract + , testHost + , testHostExtract + , testNew + , testPath + , testPathExtract + , testHasLeadingSlash + , testHasTrailingSlash + , testPort + , testPortExtract + , testProtocol + , testProtocolExtract + , testQuery + , testQueryClear + , testPathEdgeCase + , testQueryExtract + , testQueryToString + , testRemoveQuery + , testRoundTrips + , testSetQuery + , testToString + ] diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/support/prepare_test.sh b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/support/prepare_test.sh new file mode 100644 index 0000000..0c5a4aa --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/support/prepare_test.sh @@ -0,0 +1,7 @@ +# nvm use 4.0 # already done in CI +node --version +npm --version +npm install -g elm +cd test +npm install +elm-package install --yes \ No newline at end of file diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/.gitignore b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/.gitignore new file mode 100644 index 0000000..aee9810 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/.gitignore @@ -0,0 +1 @@ +/elm-stuff/ diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/Main.elm b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/Main.elm new file mode 100644 index 0000000..c12a82f --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/Main.elm @@ -0,0 +1,13 @@ +port module Main exposing (..) + +import Test.Runner.Node exposing (run, TestProgram) +import Json.Encode exposing (Value) +import ErlTests + + +main : TestProgram +main = + run emit ErlTests.all + + +port emit : ( String, Value ) -> Cmd msg diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/elm-package.json b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/elm-package.json new file mode 100644 index 0000000..ef04acf --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/tests/elm-package.json @@ -0,0 +1,19 @@ +{ + "version": "1.0.0", + "summary": "Sample Elm Test", + "repository": "https://github.com/user/project.git", + "license": "BSD-3-Clause", + "source-directories": [ + ".", + "../src" + ], + "exposed-modules": [], + "dependencies": { + "elm-community/elm-test": "3.0.0 <= v < 4.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0", + "elm-lang/html": "2.0.0 <= v < 3.0.0", + "elm-lang/http": "1.0.0 <= v < 2.0.0", + "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/yarn.lock b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/yarn.lock new file mode 100644 index 0000000..6928f40 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/sporto/erl/11.0.0/yarn.lock @@ -0,0 +1,1057 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +aproba@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +bcrypt-pbkdf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + dependencies: + tweetnacl "^0.14.3" + +binary-extensions@^1.0.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.7.0.tgz#6c1610db163abfb34edfe42fa423343a1e01185d" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +chalk@^1.1.1, chalk@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chokidar@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.0.tgz#90c32ad4802901d7713de532dc284e96a63ad058" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cross-spawn@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.0.tgz#8254774ab4786b8c5b3cf4dfba66ce563932c252" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +dashdash@^1.12.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.0.tgz#29e486c5418bf0f356034a993d51686a33e84141" + dependencies: + assert-plus "^1.0.0" + +debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +elm-test: + version "0.18.0" + resolved "https://registry.yarnpkg.com/elm-test/-/elm-test-0.18.0.tgz#c3014cc33c7d95b373a8c05d586208e7c92da434" + dependencies: + chalk "1.1.3" + chokidar "1.6.0" + cross-spawn "4.0.0" + find-up "^1.1.2" + firstline "^1.2.0" + fs-extra "0.30.0" + lodash "4.13.1" + minimist "^1.2.0" + node-elm-compiler "4.1.0" + temp "0.8.3" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-up@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +firstline@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/firstline/-/firstline-1.2.0.tgz#c9f4886e7f7fbf0afc12d71941dce06b192aea05" + +for-in@^0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" + +for-own@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + dependencies: + for-in "^0.1.5" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-extra@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.0.15" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.15.tgz#fa63f590f3c2ad91275e4972a6cea545fb0aae44" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.6.0.tgz#d35301ad18e96902b4751dcbbe40f4218b942a46" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-color "^0.1.7" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.10.tgz#f2d720c22092f743228775c75e3612632501f131" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-color@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.0.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-json-valid@^2.12.4: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "http://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +isarray@~1.0.0, isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +jsbn@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonpointer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" + +jsprim@^1.2.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + dependencies: + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +kind-of@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.0.4.tgz#7b8ecf18a4e17f8269d73b501c9f232c96887a74" + dependencies: + is-buffer "^1.0.2" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +lodash@4.13.1: + version "4.13.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.13.1.tgz#83e4b10913f48496d4d16fec4a560af2ee744b68" + +lodash@4.14.2: + version "4.14.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.14.2.tgz#bbccce6373a400fbfd0a8c67ca42f6d1ef416432" + +lru-cache@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.1.tgz#1343955edaf2e37d9b9e7ee7241e27c4b9fb72be" + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.24.0: + version "1.24.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.24.0.tgz#e2d13f939f0016c6e4e9ad25a8652f126c467f0c" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.12" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.12.tgz#152ba256777020dd4663f54c2e7bc26381e71729" + dependencies: + mime-db "~1.24.0" + +minimatch@^3.0.0, minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +"mkdirp@>=0.5 0", mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +nan@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" + +node-elm-compiler@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/node-elm-compiler/-/node-elm-compiler-4.1.0.tgz#1b00244902f3f6e5cd5f6a3abadfb0f55b6c35dd" + dependencies: + cross-spawn "4.0.0" + lodash "4.14.2" + temp "^0.8.3" + +node-pre-gyp@^0.6.29: + version "0.6.31" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.31.tgz#d8a00ddaa301a940615dbcc8caad4024d58f6017" + dependencies: + mkdirp "~0.5.1" + nopt "~3.0.6" + npmlog "^4.0.0" + rc "~1.1.6" + request "^2.75.0" + rimraf "~2.5.4" + semver "~5.3.0" + tar "~2.2.1" + tar-pack "~3.3.0" + +node-uuid@~1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + +npmlog@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.0.tgz#e094503961c70c1774eb76692080e8d578a9f88f" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.6.0" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + +randomatic@^1.1.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.5.tgz#5e9ef5f2d573c67bd2b8124ae90b5156e457840b" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +rc@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~1.0.4" + +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "http://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +request@^2.75.0: + version "2.78.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.78.0.tgz#e1c8dec346e1c81923b24acdb337f11decabe9cc" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + +rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +rimraf@~2.2.6: + version "2.2.8" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" + +semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +signal-exit@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sshpk@^1.7.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-json-comments@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +tar-pack@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" + dependencies: + debug "~2.2.0" + fstream "~1.0.10" + fstream-ignore "~1.0.5" + once "~1.3.3" + readable-stream "~2.1.4" + rimraf "~2.5.1" + tar "~2.2.1" + uid-number "~0.0.6" + +tar@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +temp@^0.8.3, temp@0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" + dependencies: + os-tmpdir "^1.0.0" + rimraf "~2.2.6" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.3.tgz#3da382f670f25ded78d7b3d1792119bca0b7132d" + +uid-number@~0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +which@^1.2.9: + version "1.2.12" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + dependencies: + isexe "^1.1.1" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +yallist@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" + diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/.gitignore b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/.gitignore new file mode 100644 index 0000000..1295a09 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/.gitignore @@ -0,0 +1,7 @@ +.cabal-sandbox/ +base64.js +cabal.sandbox.config +elm-stuff/ +node_modules/ +Test/*.js +elm-io.sh diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/LICENSE b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/LICENSE new file mode 100644 index 0000000..30fcf38 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 TruQu + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/README.md b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/README.md new file mode 100644 index 0000000..b09b399 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/README.md @@ -0,0 +1,26 @@ +Elm-Base64 +======== + +A base 64 encoding and decoding library for Elm. + +## Usage + +Add the import to the elm module where you want to do some base64 en- or decoding. + +```elm +import Base64 +``` + +To decode a String use + +```elm +decode : String -> Result String String +decode encodedString = Base64.decode encodedString +``` + +To encode a String use + +```elm +encode : String -> Result String String +encode regularString = Base64.encode regularString +``` diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/elm-package.json b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/elm-package.json new file mode 100644 index 0000000..50a97e6 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/elm-package.json @@ -0,0 +1,16 @@ +{ + "version": "1.0.5", + "summary": "Base64 encoding and decoding", + "repository": "https://github.com/truqu/elm-base64.git", + "license": "MIT", + "source-directories": [ + "src" + ], + "exposed-modules": [ + "Base64" + ], + "dependencies": { + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/src/Base64.elm b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/src/Base64.elm new file mode 100644 index 0000000..4d4341d --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/src/Base64.elm @@ -0,0 +1,165 @@ +module Base64 exposing (encode, decode) + +{-| Library for base64 encoding and decoding of Ascii strings. +For the moment only works with the characters : + +" !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" + +# Method +@docs encode, decode +-} + +import List +import List exposing (append) +import BitList +import BitList exposing (Bit) +import Array +import String +import Char +import Result +import Dict exposing (Dict) + + +{-| base64 encodes an ascii string. If the input is not valid returns a Result.Err, +otherwise a Result.Ok String + encode("Elm is Cool") == Result.Ok "RWxtIGlzIENvb2w=" +-} +encode : String -> Result String String +encode s = + Result.Ok (toCodeList s |> toTupleList |> toCharList |> String.fromList) + + +{-| base64 decodes an ascii string. If the input is not a valid base64 string returns a Result.Err, +otherwise a Result.Ok String + decode("RWxtIGlzIENvb2w=") == Result.Ok "Elm is Cool" +-} +decode : String -> Result String String +decode s = + if not (isValid s) then + Result.Err "Error while decoding" + else + let + bitList = + List.map BitList.toByte (toBase64BitList s |> BitList.partition 8) + + charList = + List.map Char.fromCode bitList + in + Result.Ok <| String.fromList charList + + +toCodeList : String -> List Int +toCodeList string = + List.map Char.toCode (String.toList string) + + +toTupleList : List Int -> List ( Int, Int, Int ) +toTupleList list = + case list of + a :: b :: c :: l -> + ( a, b, c ) :: toTupleList (l) + + a :: b :: [] -> + [ ( a, b, -1 ) ] + + a :: [] -> + [ ( a, -1, -1 ) ] + + [] -> + [] + + +toCharList : List ( Int, Int, Int ) -> List Char +toCharList bitList = + let + array = + Array.fromList base64CharsList + + toBase64Char index = + Maybe.withDefault '!' (Array.get index array) + + toChars ( a, b, c ) = + case ( a, b, c ) of + ( a, -1, -1 ) -> + append (dropLast 2 (List.map toBase64Char (partitionBits [ a, 0, 0 ]))) [ '=', '=' ] + + ( a, b, -1 ) -> + append (dropLast 1 (List.map toBase64Char (partitionBits [ a, b, 0 ]))) [ '=' ] + + ( a, b, c ) -> + (List.map toBase64Char (partitionBits [ a, b, c ])) + in + List.concatMap toChars bitList + + +base64CharsList : List Char +base64CharsList = + String.toList "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + + +base64Map : Dict Char Int +base64Map = + let + insert ( value, key ) dict = + Dict.insert key value dict + in + List.foldl insert Dict.empty (List.indexedMap (,) base64CharsList) + + +isValid : String -> Bool +isValid string = + let + isBase64Char char = + Dict.member char base64Map + + string_ = + if String.endsWith "==" string then + String.dropRight 2 string + else if String.endsWith "=" string then + String.dropRight 1 string + else + string + in + String.all isBase64Char string_ + + +partitionBits : List Int -> List Int +partitionBits list = + let + list_ = + List.foldr List.append [] (List.map BitList.fromByte list) + in + List.map BitList.toByte (BitList.partition 6 list_) + + +dropLast : Int -> List a -> List a +dropLast number list = + List.reverse list |> List.drop number |> List.reverse + + +toBase64BitList : String -> List Bit +toBase64BitList string = + let + base64ToInt char = + case Dict.get char base64Map of + Just value -> + value + + _ -> + -1 + + endingEquals = + if (String.endsWith "==" string) then + 2 + else if String.endsWith "=" string then + 1 + else + 0 + + stripped = + String.toList (String.dropRight endingEquals string) + + numberList = + List.map base64ToInt stripped + in + dropLast (endingEquals * 2) <| List.concatMap (flip BitList.fromNumberWithSize <| 6) numberList diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/src/BitList.elm b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/src/BitList.elm new file mode 100644 index 0000000..c9df682 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/src/BitList.elm @@ -0,0 +1,70 @@ +module BitList exposing (..) + +import List exposing (..) + + +type Bit + = On + | Off + + +fromNumber : Int -> List Bit +fromNumber int = + if int == 0 then + [] + else if int % 2 == 1 then + append (fromNumber (int // 2)) [ On ] + else + append (fromNumber (int // 2)) [ Off ] + + +fromNumberWithSize : Int -> Int -> List Bit +fromNumberWithSize number size = + let + bitList = + fromNumber number + + paddingSize = + size - length bitList + in + append (repeat paddingSize Off) bitList + + +fromByte : Int -> List Bit +fromByte byte = + fromNumberWithSize byte 8 + + +toByte : List Bit -> Int +toByte bitList = + toByteReverse <| reverse bitList + + +toByteReverse : List Bit -> Int +toByteReverse bitList = + case bitList of + [] -> + 0 + + Off :: tail -> + 2 * toByteReverse tail + + On :: tail -> + 1 + 2 * toByteReverse tail + + +partition : Int -> List Bit -> List (List Bit) +partition size list = + if length list <= size then + [ list ] + else + let + partitionTail size list res = + case list of + [] -> + res + + _ -> + partitionTail size (drop size list) (take size list :: res) + in + partitionTail size list [] |> reverse diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Test/Base64.elm b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Test/Base64.elm new file mode 100644 index 0000000..365e86e --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Test/Base64.elm @@ -0,0 +1,41 @@ +module Test.Base64 exposing (tests) + +import Base64 +import Legacy.ElmTest as ElmTest exposing (Test, assertEqual, defaultTest, suite) +import String + + +encodeTest : ( String, String ) -> Test +encodeTest ( string, base64 ) = + defaultTest (assertEqual (Result.Ok base64) (Base64.encode string)) + + +decodeTest : ( String, String ) -> Test +decodeTest ( string, base64 ) = + defaultTest (assertEqual (Result.Ok string) (Base64.decode base64)) + + +longDecoded = + String.repeat 9000 "@" + + +longEncoded = + String.repeat 3000 "QEBA" + + +examples = + [ ( "aaa", "YWFh" ) + , ( "my updated file contents", "bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz" ) + , ( "a", "YQ==" ) + , ( "aa", "YWE=" ) + , ( "Elm is Cool", "RWxtIGlzIENvb2w=" ) + , ( longDecoded, longEncoded ) + ] + + +tests : Test +tests = + suite "Base64" + [ suite "encode" <| List.map encodeTest examples + , suite "decode" <| List.map decodeTest examples + ] diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Test/BitList.elm b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Test/BitList.elm new file mode 100644 index 0000000..352dc1c --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Test/BitList.elm @@ -0,0 +1,64 @@ +module Test.BitList exposing (tests) + +import BitList exposing (..) +import Legacy.ElmTest as ElmTest exposing (Test, assertEqual, defaultTest, suite) + + +tests : Test +tests = + suite "BitList" + [ defaultTest <| + assertEqual + (fromByte (62)) + [ Off, Off, On, On, On, On, On, Off ] + , defaultTest <| + assertEqual + (toByte ([ On, Off ])) + 2 + , defaultTest <| + assertEqual + (toByte ([ Off, On, On, Off ])) + 6 + , defaultTest <| + assertEqual + (toByte ([ Off, Off, On, On, On, On, On, Off ])) + 62 + , defaultTest <| + assertEqual + (partition 3 [ Off, Off, Off, On, On, Off, On, Off ]) + [ [ Off, Off, Off ], [ On, On, Off ], [ On, Off ] ] + , defaultTest <| + assertEqual + (partition 6 + [ Off + , On + , Off + , On + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + , Off + ] + ) + [ [ Off, On, Off, On, Off, Off ] + , [ Off, Off, Off, Off, Off, Off ] + , [ Off, Off, Off, Off, Off, Off ] + , [ Off, Off, Off, Off, Off, Off ] + ] + ] diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Tests.elm b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Tests.elm new file mode 100644 index 0000000..09647c1 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/Tests.elm @@ -0,0 +1,18 @@ +module Tests exposing (..) + +import Legacy.ElmTest as ElmTest exposing (Test, suite, runSuite) +import Test.Base64 +import Test.BitList + + +all : Test +all = + suite "Main" + [ Test.Base64.tests + , Test.BitList.tests + ] + + +main : Program Never () msg +main = + runSuite all diff --git a/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/elm-package.json b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/elm-package.json new file mode 100644 index 0000000..e0d4f62 --- /dev/null +++ b/app/templates/client/elm-stuff/packages/truqu/elm-base64/1.0.5/test/elm-package.json @@ -0,0 +1,16 @@ +{ + "version": "1.0.5", + "summary": "Tests for elm-base64", + "repository": "https://github.com/truqu/elm-base64.git", + "license": "MIT", + "source-directories": [ + ".", + "../src" + ], + "exposed-modules": [], + "dependencies": { + "rtfeldman/legacy-elm-test": "3.0.0 <= v < 4.0.0", + "elm-lang/core": "5.0.0 <= v < 6.0.0" + }, + "elm-version": "0.18.0 <= v < 0.19.0" +} diff --git a/app/templates/client/gulpfile.js b/app/templates/client/gulpfile.js new file mode 100644 index 0000000..5f1aca2 --- /dev/null +++ b/app/templates/client/gulpfile.js @@ -0,0 +1,227 @@ +// Generated on 2015-05-04 using generator-jekyllized 0.7.3 +"use strict"; + +var gulp = require("gulp"); + +var gulpSequence = require('gulp-sequence'); + +// Loads the plugins without having to list all of them, but you need +// to call them as $.pluginname +var $ = require("gulp-load-plugins")(); +// "del" is used to clean out directories and such +var del = require("del"); +// BrowserSync isn"t a gulp package, and needs to be loaded manually +var browserSync = require("browser-sync"); + +var elm = require('gulp-elm'); + +var fs = require('fs'); + +// merge is used to merge the output from two different streams into the same stream +var merge = require("merge-stream"); +// Need a command for reloading webpages using BrowserSync + +var plumber = require("gulp-plumber"); + +var reload = browserSync.reload; +// And define a variable that BrowserSync uses in its function +var bs; + +var wiredep = require('wiredep').stream; + +// Deletes the directory that is used to serve the site during development +gulp.task("clean:dev", function(cb) { + return del(["serve"], cb); +}); + + +// Deletes the directory that the optimized site is output to +gulp.task("clean:prod", function(cb) { + return del(["dist"], cb); +}); + + +// Compiles the SASS files and moves them into the "assets/stylesheets" directory +gulp.task("styles", function () { + // Looks at the style.scss file for what to include and creates a style.css file + return gulp.src("src/assets/scss/style.scss") + .pipe(plumber()) + .pipe($.sass()) + .on('error', function(err){ + browserSync.notify("SASS error"); + + console.error(err.message); + + // Save the error to index.html, with a simple HTML wrapper + // so browserSync can inject itself in. + fs.writeFileSync('serve/index.html', "
    " + err.message + "
    "); + + // No need to continue processing. + this.emit('end'); + }) + // AutoPrefix your CSS so it works between browsers + .pipe($.autoprefixer("last 1 version", { cascade: true })) + // Directory your CSS file goes to + .pipe(gulp.dest("serve/assets/stylesheets/")) + // Outputs the size of the CSS file + .pipe($.size({title: "styles"})) + // Injects the CSS changes to your browser since Jekyll doesn"t rebuild the CSS + .pipe(reload({stream: true})); +}); + +// Optimizes the images that exists +gulp.task("images", function () { + return gulp.src("src/assets/images/**") + .pipe($.changed("dist/assets/images")) + .pipe($.imagemin({ + // Lossless conversion to progressive JPGs + progressive: true, + // Interlace GIFs for progressive rendering + interlaced: true + })) + .pipe(gulp.dest("dist/assets/images")) + .pipe($.size({title: "images"})); +}); + +// Copy over fonts to the "dist" directory +gulp.task("fonts", function () { + return gulp.src("src/assets/fonts/**") + .pipe(gulp.dest("dist/assets/fonts")) + .pipe($.size({ title: "fonts" })); +}); + +// Copy index.html and CNAME files to the "serve" directory +gulp.task("copy:dev", ["copy:bower"], function () { + return gulp.src(["src/index.html", "src/CNAME", "src/js/**/*", "src/assets/images/**/*"]) + .pipe(gulp.dest("serve")) + .pipe($.size({ title: "index.html & CNAME" })) +}); + +// Copy bower. +gulp.task("copy:bower", function () { + return gulp.src(["bower_components/**/*"]) + .pipe(gulp.dest("serve/bower_components")) + .pipe($.size({ title: "Bower" })) +}); + +// Copy images. +gulp.task("copy:images", function () { + return gulp.src([]) + .pipe(gulp.dest("serve/assets/images")) + .pipe($.size({ title: "Assets images" })) +}); + + +gulp.task("cname", function () { + return gulp.src(["serve/CNAME"]) + .pipe(gulp.dest("dist")) + .pipe($.size({ title: "CNAME" })) +}); + +gulp.task('bower', function () { + gulp.src("src/index.html") + .pipe(wiredep()) + .pipe(gulp.dest("serve")); +}); + + +// Optimizes all the CSS, HTML and concats the JS etc +gulp.task("minify", ["styles"], function () { + var assets = $.useref.assets({searchPath: "serve"}); + + return gulp.src("serve/**/*.*") + // Concatenate JavaScript files and preserve important comments + .pipe($.if("*.js", $.uglify({preserveComments: "some"}))) + // Minify CSS + .pipe($.if("*.css", $.minifyCss())) + // Start cache busting the files + .pipe($.revAll({ ignore: ["index.html", ".eot", ".svg", ".ttf", ".woff"] })) + .pipe(assets.restore()) + // Replace the asset names with their cache busted names + .pipe($.revReplace()) + // Minify HTML + .pipe($.if("*.html", $.htmlmin({ + removeComments: true, + removeCommentsFromCDATA: true, + removeCDATASectionsFromCDATA: true, + collapseWhitespace: true, + collapseBooleanAttributes: true, + removeAttributeQuotes: true, + removeRedundantAttributes: true + }))) + // Send the output to the correct folder + .pipe(gulp.dest("dist")) + .pipe($.size({title: "optimizations"})); +}); + + +// Task to upload your site to your GH Pages repo +gulp.task("deploy", [], function () { + // Deploys your optimized site, you can change the settings in the html task if you want to + return gulp.src("dist/**/*") + .pipe($.ghPages({branch: "gh-pages"})); +}); + +gulp.task('elm-init', elm.init); +gulp.task('elm', ['elm-init'], function(){ + return gulp.src('src/elm/Main.elm') + .pipe(plumber()) + .pipe(elm({'debug': true, 'warn' : true})) + .on('error', function(err) { + console.error(err.message); + + browserSync.notify("Elm compile error", 5000); + + // Save the error to index.html, with a simple HTML wrapper + // so browserSync can inject itself in. + fs.writeFileSync('serve/index.html', "
    " + err.message + "
    "); + }) + .pipe(gulp.dest('serve')); +}); + +// BrowserSync will serve our site on a local server for us and other devices to use +// It will also autoreload across all devices as well as keep the viewport synchronized +// between them. +gulp.task("serve:dev", ["build"], function () { + bs = browserSync({ + notify: true, + // tunnel: "", + server: { + baseDir: "serve" + } + }); +}); + + +// These tasks will look for files that change while serving and will auto-regenerate or +// reload the website accordingly. Update or add other files you need to be watched. +gulp.task("watch", function () { + // We need to copy dev, so index.html may be replaced by error messages. + gulp.watch(["src/index.html", "src/js/**/*.js"], ["copy:dev", reload]); + gulp.watch(["src/elm/**/*.elm"], ["elm", "copy:dev", reload]); + gulp.watch(["src/assets/scss/**/*.scss"], ["styles", "copy:dev", reload]); +}); + +// Serve the site after optimizations to see that everything looks fine +gulp.task("serve:prod", function () { + bs = browserSync({ + notify: false, + // tunnel: true, + server: { + baseDir: "dist" + } + }); +}); + +// Default task, run when just writing "gulp" in the terminal +gulp.task("default", ["serve:dev", "watch"]); + +// Builds the site but doesnt serve it to you +// @todo: Add "bower" here +gulp.task("build", gulpSequence("clean:dev", ["styles", "copy:dev", "elm"])); + +// Builds your site with the "build" command and then runs all the optimizations on +// it and outputs it to "./dist" +gulp.task("publish", ["build", "clean:prod"], function () { + gulp.start("minify", "cname", "images", "fonts"); +}); diff --git a/app/templates/client/package.json b/app/templates/client/package.json index a0e7508..2ddddc3 100644 --- a/app/templates/client/package.json +++ b/app/templates/client/package.json @@ -1,39 +1,43 @@ { - "name": "client", - "version": "0.0.1", - "dependencies": {}, - "devDependencies": { - "grunt": "^0.4.5", - "grunt-autoprefixer": "^3.0.3", - "grunt-build-control": "^0.5.0", - "grunt-concurrent": "^1.0.0", - "grunt-contrib-clean": "^0.6.0", - "grunt-contrib-compass": "^1.0.3", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-connect": "^0.10.1", - "grunt-contrib-copy": "^0.8.0", - "grunt-contrib-cssmin": "^0.12.3", - "grunt-contrib-htmlmin": "^0.4.0", - "grunt-contrib-imagemin": "^0.9.4", - "grunt-contrib-jshint": "^0.11.2", - "grunt-contrib-uglify": "^0.9.1", - "grunt-contrib-watch": "^0.6.1", - "grunt-filerev": "^2.3.1", - "grunt-google-cdn": "^0.4.3", - "grunt-newer": "^1.1.1", - "grunt-ng-annotate": "^1.0.1", - "grunt-ng-constant": "^1.1.0", - "grunt-svgmin": "^2.0.1", - "grunt-usemin": "^3.0.0", - "grunt-wiredep": "^2.0.0", - "jshint-stylish": "^2.0.0", - "load-grunt-tasks": "^3.2.0", - "time-grunt": "^1.2.1" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "grunt test" - } + "name": "generated-elm", + "private": false, + "version": "0.1.0", + "description": "Generated elm", + "dependencies": {}, + "devDependencies": { + "browser-sync": "2.18.2", + "del": "1.2.1", + "gulp": "3.9.1", + "gulp-autoprefixer": "2.3.1", + "gulp-cache": "0.2.10", + "gulp-cached": "1.0.1", + "gulp-changed": "1.0.0", + "gulp-elm": "0.6.1", + "gulp-filter": "2.0.2", + "gulp-gh-pages": "0.5.4", + "gulp-gzip": "0.0.8", + "gulp-htmlmin": "0.2.0", + "gulp-if": "1.2.5", + "gulp-imagemin": "2.3.0", + "gulp-jshint": "1.11.2", + "gulp-load-plugins": "0.8.1", + "gulp-minify-css": "0.3.13", + "gulp-plumber": "1.0.1", + "gulp-rev-all": "0.7.6", + "gulp-rev-replace": "0.3.4", + "gulp-sass": "2.1.0", + "gulp-sequence": "0.4.1", + "gulp-shell": "0.2.11", + "gulp-size": "1.3.0", + "gulp-uglify": "1.4.1", + "gulp-uncss": "0.5.2", + "gulp-useref": "1.3.0", + "jshint-stylish": "1.0.2", + "merge-stream": "0.1.8", + "wiredep": "2.2.2" + }, + "engines": { + "node": ">0.10.0" + }, + "scripts": {} } diff --git a/app/templates/client/src/CNAME b/app/templates/client/src/CNAME new file mode 100644 index 0000000..e69de29 diff --git a/app/templates/client/src/assets/scss/style.scss b/app/templates/client/src/assets/scss/style.scss new file mode 100644 index 0000000..f503f25 --- /dev/null +++ b/app/templates/client/src/assets/scss/style.scss @@ -0,0 +1,14 @@ +html { + height: 100%; +} + +body > div { + min-height: 100%; + display: flex; + flex-direction: column; +} + +.main { + /* flex: 1; would be enough but it looks bad in IE */ + flex: 1 0 auto; +} diff --git a/app/templates/client/src/elm/App/Model.elm b/app/templates/client/src/elm/App/Model.elm new file mode 100644 index 0000000..22fd204 --- /dev/null +++ b/app/templates/client/src/elm/App/Model.elm @@ -0,0 +1,44 @@ +module App.Model exposing (emptyModel, Flags, Msg(..), Model, Page(..)) + +import Config.Model +import Pages.Login.Model exposing (emptyModel, Model) +import RemoteData exposing (RemoteData(..), WebData) +import User.Model exposing (..) + + +type Page + = AccessDenied + | Login + | MyAccount + | PageNotFound + + +type Msg + = Logout + | PageLogin Pages.Login.Model.Msg + | SetActivePage Page + + +type alias Model = + { accessToken : String + , activePage : Page + , config : RemoteData String Config.Model.Model + , pageLogin : Pages.Login.Model.Model + , user : WebData User + } + + +type alias Flags = + { accessToken : String + , hostname : String + } + + +emptyModel : Model +emptyModel = + { accessToken = "" + , activePage = Login + , config = NotAsked + , pageLogin = Pages.Login.Model.emptyModel + , user = NotAsked + } diff --git a/app/templates/client/src/elm/App/Test.elm b/app/templates/client/src/elm/App/Test.elm new file mode 100644 index 0000000..e95f91f --- /dev/null +++ b/app/templates/client/src/elm/App/Test.elm @@ -0,0 +1,56 @@ +module App.Test exposing (all) + +import App.Model exposing (..) +import App.Update exposing (..) +import Expect +import Test exposing (describe, test, Test) +import RemoteData exposing (RemoteData(..)) + + +setActivePageTest : Test +setActivePageTest = + describe "SetActivePage msg" + [ test "set new active page" <| + \() -> + Expect.equal PageNotFound (getPageAsAnonymous PageNotFound) + , test "set Login page for anonymous user" <| + \() -> + Expect.equal Login (getPageAsAnonymous Login) + , test "set My account page for anonymous user" <| + \() -> + Expect.equal AccessDenied (getPageAsAnonymous MyAccount) + , test "set Login page for authenticated user" <| + \() -> + Expect.equal AccessDenied (getPageAsAuthenticated Login) + , test "set My account page for authenticated user" <| + \() -> + Expect.equal MyAccount (getPageAsAuthenticated MyAccount) + ] + + +getPageAsAnonymous : Page -> Page +getPageAsAnonymous page = + update (SetActivePage page) emptyModel + |> Tuple.first + |> .activePage + + +getPageAsAuthenticated : Page -> Page +getPageAsAuthenticated page = + let + dummyUser = + { id = 100, name = "Foo", avatarUrl = "https://example.com" } + + model = + { emptyModel | user = Success dummyUser } + in + update (SetActivePage page) model + |> Tuple.first + |> .activePage + + +all : Test +all = + describe "App tests" + [ setActivePageTest + ] diff --git a/app/templates/client/src/elm/App/Update.elm b/app/templates/client/src/elm/App/Update.elm new file mode 100644 index 0000000..66a4d8a --- /dev/null +++ b/app/templates/client/src/elm/App/Update.elm @@ -0,0 +1,108 @@ +port module App.Update exposing (init, update) + +import App.Model exposing (..) +import Config +import Dict +import Pages.Login.Update +import RemoteData exposing (RemoteData(..), WebData) +import User.Model exposing (..) + + +init : Flags -> ( Model, Cmd Msg ) +init flags = + let + ( config, cmds ) = + case (Dict.get flags.hostname Config.configs) of + Just config -> + let + cmd = + if (String.isEmpty flags.accessToken) then + -- Check if we have already an access token. + Cmd.none + else + Cmd.map PageLogin <| Pages.Login.Update.fetchUserFromBackend config.backendUrl flags.accessToken + in + ( Success config, cmd ) + + Nothing -> + ( Failure "No config found", Cmd.none ) + in + { emptyModel | accessToken = flags.accessToken, config = config } ! [ cmds ] + + +update : Msg -> Model -> ( Model, Cmd Msg ) +update msg model = + let + backendUrl = + case model.config of + Success config -> + config.backendUrl + + _ -> + "" + in + case msg of + Logout -> + ( { emptyModel | accessToken = "", config = model.config } + , accessTokenPort "" + ) + + PageLogin msg -> + let + ( val, cmds, ( webDataUser, accessToken ) ) = + Pages.Login.Update.update backendUrl msg model.pageLogin + + modelUpdated = + { model + | pageLogin = val + , accessToken = accessToken + , user = webDataUser + } + + ( modelWithRedirect, setActivePageCmds ) = + case webDataUser of + -- If user was successfuly fetched, reditect to my + -- account page. + Success _ -> + update (SetActivePage MyAccount) modelUpdated + + _ -> + modelUpdated ! [] + in + ( modelWithRedirect + , Cmd.batch + [ Cmd.map PageLogin cmds + , accessTokenPort accessToken + , setActivePageCmds + ] + ) + + SetActivePage page -> + { model | activePage = setActivePageAccess model.user page } ! [] + + +{-| Determine is a page can be accessed by a user (anonymous or authenticated), +and if not return a access denied page. + +If the user is authenticated, don't allow them to revisit Login page. Do the +opposite for anonumous user - don't allow them to visit the MyAccount page. +-} +setActivePageAccess : WebData User -> Page -> Page +setActivePageAccess user page = + case user of + Success _ -> + if page == Login then + AccessDenied + else + page + + _ -> + if page == MyAccount then + AccessDenied + else + page + + +{-| Send access token to JS. +-} +port accessTokenPort : String -> Cmd msg diff --git a/app/templates/client/src/elm/App/View.elm b/app/templates/client/src/elm/App/View.elm new file mode 100644 index 0000000..a763188 --- /dev/null +++ b/app/templates/client/src/elm/App/View.elm @@ -0,0 +1,154 @@ +module App.View exposing (..) + +import App.Model exposing (..) +import Config.View +import Html exposing (..) +import Html.Attributes exposing (class, classList, href, src, style, target) +import Html.Events exposing (onClick) +import User.Model exposing (..) +import Pages.Login.View exposing (..) +import Pages.MyAccount.View exposing (..) +import Pages.PageNotFound.View exposing (..) +import RemoteData exposing (RemoteData(..), WebData) + + +view : Model -> Html Msg +view model = + case model.config of + Failure err -> + Config.View.view + + _ -> + div [] + [ div [ class "ui container main" ] + [ viewHeader model + , viewMainContent model + , pre [ class "ui padded secondary segment" ] + [ div [] [ text <| "activePage: " ++ toString model.activePage ] + , div [] [ text <| "pageLogin: " ++ toString model.pageLogin ] + , div [] [ text <| "user: " ++ toString model.user ] + ] + ] + , viewFooter + ] + + +viewHeader : Model -> Html Msg +viewHeader model = + let + navbar = + case model.user of + Success _ -> + navbarAuthenticated + + _ -> + navbarAnonymous + in + div [ class "ui secondary pointing menu" ] (navbar model) + + +navbarAnonymous : Model -> List (Html Msg) +navbarAnonymous model = + [ a + [ classByPage Login model.activePage + , onClick <| SetActivePage Login + ] + [ text "Login" ] + , viewPageNotFoundItem model.activePage + ] + + +navbarAuthenticated : Model -> List (Html Msg) +navbarAuthenticated model = + [ a + [ classByPage MyAccount model.activePage + , onClick <| SetActivePage MyAccount + ] + [ text "My Account" ] + , viewPageNotFoundItem model.activePage + , div [ class "right menu" ] + [ viewAvatar model.user + , a + [ class "ui item" + , onClick <| Logout + ] + [ text "Logout" ] + ] + ] + + +viewPageNotFoundItem : Page -> Html Msg +viewPageNotFoundItem activePage = + a + [ classByPage PageNotFound activePage + , onClick <| SetActivePage PageNotFound + ] + [ text "404 page" ] + + +viewAvatar : WebData User -> Html Msg +viewAvatar user = + case user of + Success user_ -> + a + [ onClick <| SetActivePage MyAccount + , class "ui item" + ] + [ img + [ class "ui avatar image" + , src user_.avatarUrl + ] + [] + ] + + _ -> + div [] [] + + +viewMainContent : Model -> Html Msg +viewMainContent model = + case model.activePage of + AccessDenied -> + div [] [ text "Access denied" ] + + Login -> + Html.map PageLogin (Pages.Login.View.view model.user model.pageLogin) + + MyAccount -> + Pages.MyAccount.View.view model.user + + PageNotFound -> + -- We don't need to pass any cmds, so we can call the view directly + Pages.PageNotFound.View.view + + +viewFooter : Html Msg +viewFooter = + div + [ class "ui inverted vertical footer segment form-page" + ] + [ div [ class "ui container" ] + [ a + [ href "http://gizra.com" + , target "_blank" + ] + [ text "Gizra" ] + , span [] [ text " // " ] + , a + [ href "https://github.com/Gizra/elm-spa-example" + , target "_blank" + ] + [ text "Github" ] + ] + ] + + +{-| Get menu items classes. This function gets the active page and checks if +it is indeed the page used. +-} +classByPage : Page -> Page -> Attribute a +classByPage page activePage = + classList + [ ( "item", True ) + , ( "active", page == activePage ) + ] diff --git a/app/templates/client/src/elm/Config.elm b/app/templates/client/src/elm/Config.elm new file mode 100644 index 0000000..8725c4a --- /dev/null +++ b/app/templates/client/src/elm/Config.elm @@ -0,0 +1,26 @@ +module Config exposing (..) + +import Config.Model as Config exposing (Model) +import Dict exposing (..) + + +local : Model +local = + { backendUrl = "https://live-hedley-elm.pantheonsite.io" + , name = "local" + } + + +production : Model +production = + { backendUrl = "https://live-hedley-elm.pantheonsite.io" + , name = "gh-pages" + } + + +configs : Dict String Model +configs = + Dict.fromList + [ ( "localhost", local ) + , ( "example", production ) + ] diff --git a/app/templates/client/src/elm/Config/Model.elm b/app/templates/client/src/elm/Config/Model.elm new file mode 100644 index 0000000..b3af191 --- /dev/null +++ b/app/templates/client/src/elm/Config/Model.elm @@ -0,0 +1,11 @@ +module Config.Model exposing (..) + + +type alias BackendUrl = + String + + +type alias Model = + { backendUrl : BackendUrl + , name : String + } diff --git a/app/templates/client/src/elm/Config/View.elm b/app/templates/client/src/elm/Config/View.elm new file mode 100644 index 0000000..daf759c --- /dev/null +++ b/app/templates/client/src/elm/Config/View.elm @@ -0,0 +1,16 @@ +module Config.View exposing (..) + +import Html exposing (div, h2, text, Html) +import Html.Attributes exposing (class) + + +-- A plain function that always returns the error message + + +view : Html msg +view = + div + [ class "config-error" ] + [ h2 [] [ text "Configuration error" ] + , div [] [ text "Check your Config.elm file and make sure you have defined the enviorement properly" ] + ] diff --git a/app/templates/client/src/elm/Main.elm b/app/templates/client/src/elm/Main.elm new file mode 100644 index 0000000..4c0e169 --- /dev/null +++ b/app/templates/client/src/elm/Main.elm @@ -0,0 +1,25 @@ +module Main exposing (..) + +import App.Model exposing (Flags, Model, Msg) +import App.Update exposing (init, update) +import App.View exposing (view) +import Html + + +main : Program Flags Model Msg +main = + Html.programWithFlags + { init = App.Update.init + , update = App.Update.update + , view = App.View.view + , subscriptions = subscriptions + } + + + +-- SUBSCRIPTIONS + + +subscriptions : Model -> Sub Msg +subscriptions model = + Sub.none diff --git a/app/templates/client/src/elm/Pages/Login/Decoder.elm b/app/templates/client/src/elm/Pages/Login/Decoder.elm new file mode 100644 index 0000000..6044c21 --- /dev/null +++ b/app/templates/client/src/elm/Pages/Login/Decoder.elm @@ -0,0 +1,36 @@ +module Pages.Login.Decoder exposing (..) + +import Base64 exposing (encode) +import Json.Decode as Decode +import Pages.Login.Model exposing (AccessToken) +import User.Decoder as UserDecoder exposing (decodeUser) +import User.Model exposing (User) + + +decodeUser : Decode.Decoder User +decodeUser = + Decode.at [ "data", "0" ] <| UserDecoder.decodeUser + + +decodeAccessToken : Decode.Decoder AccessToken +decodeAccessToken = + Decode.at [ "access_token" ] <| Decode.string + + +decodeError : Decode.Decoder String +decodeError = + Decode.at [ "data", "error" ] <| Decode.string + + +encodeCredentials : ( String, String ) -> String +encodeCredentials ( name, pass ) = + let + base64 = + Base64.encode (name ++ ":" ++ pass) + in + case base64 of + Ok result -> + result + + Err err -> + "" diff --git a/app/templates/client/src/elm/Pages/Login/Model.elm b/app/templates/client/src/elm/Pages/Login/Model.elm new file mode 100644 index 0000000..2a9ca44 --- /dev/null +++ b/app/templates/client/src/elm/Pages/Login/Model.elm @@ -0,0 +1,38 @@ +module Pages.Login.Model exposing (..) + +import Http +import User.Model exposing (User) + + +type alias AccessToken = + String + + +type alias LoginForm = + { name : String + , pass : String + } + + +type UserMessage + = None + | Error String + + +type alias Model = + { loginForm : LoginForm + } + + +type Msg + = HandleFetchedAccessToken (Result Http.Error AccessToken) + | HandleFetchedUser AccessToken (Result Http.Error User) + | SetName String + | SetPassword String + | TryLogin + + +emptyModel : Model +emptyModel = + { loginForm = LoginForm "demo" "1234" + } diff --git a/app/templates/client/src/elm/Pages/Login/Update.elm b/app/templates/client/src/elm/Pages/Login/Update.elm new file mode 100644 index 0000000..dc74296 --- /dev/null +++ b/app/templates/client/src/elm/Pages/Login/Update.elm @@ -0,0 +1,91 @@ +module Pages.Login.Update exposing (fetchUserFromBackend, update) + +import Config.Model exposing (BackendUrl) +import HttpBuilder exposing (..) +import User.Model exposing (..) +import Pages.Login.Model as Login exposing (..) +import Pages.Login.Decoder exposing (..) +import RemoteData exposing (RemoteData(..), WebData) +import Utils.WebData exposing (sendWithHandler) + + +update : BackendUrl -> Msg -> Model -> ( Model, Cmd Msg, ( WebData User, AccessToken ) ) +update backendUrl msg model = + case msg of + HandleFetchedAccessToken (Ok accessToken) -> + ( model + , fetchUserFromBackend backendUrl accessToken + , ( Loading, accessToken ) + ) + + HandleFetchedAccessToken (Err err) -> + ( model + , Cmd.none + , ( Failure err, "" ) + ) + + HandleFetchedUser accessToken (Ok user) -> + ( model + , Cmd.none + , ( Success user, accessToken ) + ) + + HandleFetchedUser accessToken (Err err) -> + ( model + , Cmd.none + , ( Failure err, accessToken ) + ) + + SetName name -> + let + loginForm = + model.loginForm + + loginForm_ = + { loginForm | name = name } + in + ( { model | loginForm = loginForm_ } + , Cmd.none + , ( NotAsked, "" ) + ) + + SetPassword pass -> + let + loginForm = + model.loginForm + + loginForm_ = + { loginForm | pass = pass } + in + ( { model | loginForm = loginForm_ } + , Cmd.none + , ( NotAsked, "" ) + ) + + TryLogin -> + ( model + , fetchAccessTokenFromBackend backendUrl model.loginForm + , ( Loading, "" ) + ) + + +{-| Get access token from backend. +-} +fetchAccessTokenFromBackend : BackendUrl -> LoginForm -> Cmd Msg +fetchAccessTokenFromBackend backendUrl loginForm = + let + credentials = + encodeCredentials ( loginForm.name, loginForm.pass ) + in + HttpBuilder.get (backendUrl ++ "/api/login-token") + |> withHeader "Authorization" ("Basic " ++ credentials) + |> sendWithHandler decodeAccessToken HandleFetchedAccessToken + + +{-| Get user data from backend. +-} +fetchUserFromBackend : BackendUrl -> String -> Cmd Msg +fetchUserFromBackend backendUrl accessToken = + HttpBuilder.get (backendUrl ++ "/api/me") + |> withQueryParams [ ( "access_token", accessToken ) ] + |> sendWithHandler decodeUser (HandleFetchedUser accessToken) diff --git a/app/templates/client/src/elm/Pages/Login/View.elm b/app/templates/client/src/elm/Pages/Login/View.elm new file mode 100644 index 0000000..235b3c3 --- /dev/null +++ b/app/templates/client/src/elm/Pages/Login/View.elm @@ -0,0 +1,73 @@ +module Pages.Login.View exposing (view) + +import Html exposing (..) +import Html.Attributes exposing (..) +import Html.Events exposing (onClick, onInput, onSubmit) +import Pages.Login.Model exposing (..) +import RemoteData exposing (RemoteData(..), WebData) +import User.Model exposing (..) +import Utils.WebData exposing (viewError) + + +view : WebData User -> Model -> Html Msg +view user model = + let + spinner = + i [ class "notched circle loading icon" ] [] + + ( isLoading, isError ) = + case user of + Loading -> + ( True, False ) + + Failure _ -> + ( False, True ) + + _ -> + ( False, False ) + + inputClasses = + classList + [ ( "ui action input", True ) + , ( "error", isError ) + ] + + error = + case user of + Failure err -> + div [ class "ui error" ] [ viewError err ] + + _ -> + div [] [] + in + Html.form + [ onSubmit TryLogin + , action "javascript:void(0);" + , class "ui stacked segment" + ] + [ div [ inputClasses ] + [ input + [ type_ "text" + , placeholder "Name" + , onInput SetName + , value model.loginForm.name + ] + [] + , input + [ type_ "password" + , placeholder "Password" + , onInput SetPassword + , value model.loginForm.pass + ] + [] + -- Submit button + , button + [ disabled isLoading + , class "ui primary button" + ] + [ span [ hidden <| not isLoading ] [ spinner ] + , span [ hidden isLoading ] [ text "Login" ] + ] + ] + , error + ] diff --git a/app/templates/client/src/elm/Pages/MyAccount/View.elm b/app/templates/client/src/elm/Pages/MyAccount/View.elm new file mode 100644 index 0000000..3419e49 --- /dev/null +++ b/app/templates/client/src/elm/Pages/MyAccount/View.elm @@ -0,0 +1,28 @@ +module Pages.MyAccount.View exposing (view) + +import Html exposing (a, div, h2, i, p, text, img, Html) +import Html.Attributes exposing (class, href, src) +import RemoteData exposing (RemoteData(..), WebData) +import User.Model exposing (..) + + +-- VIEW + + +view : WebData User -> Html a +view user = + let + ( name, avatar ) = + case user of + Success val -> + ( val.name, img [ src val.avatarUrl ] [] ) + + _ -> + ( "", div [] [] ) + in + div [ class "ui centered card" ] + [ div [ class "image" ] [ avatar ] + , div [ class "content" ] + [ div [ class "header" ] [ text <| "Welcome " ++ name ] + ] + ] diff --git a/app/templates/client/src/elm/Pages/PageNotFound/View.elm b/app/templates/client/src/elm/Pages/PageNotFound/View.elm new file mode 100644 index 0000000..8576698 --- /dev/null +++ b/app/templates/client/src/elm/Pages/PageNotFound/View.elm @@ -0,0 +1,14 @@ +module Pages.PageNotFound.View exposing (view) + +import Html exposing (a, div, h2, text, Html) +import Html.Attributes exposing (class, href) + + +-- VIEW + + +view : Html a +view = + div [ class "ui segment center aligned" ] + [ h2 [] [ text "This is a 404 page!" ] + ] diff --git a/app/templates/client/src/elm/TestRunner.elm b/app/templates/client/src/elm/TestRunner.elm new file mode 100644 index 0000000..5fab3a3 --- /dev/null +++ b/app/templates/client/src/elm/TestRunner.elm @@ -0,0 +1,21 @@ +port module Main exposing (..) + +import App.Test as App exposing (..) +import Json.Encode exposing (Value) +import Test.Runner.Node exposing (run, TestProgram) +import Test exposing (describe, Test) + + +allTests : Test +allTests = + describe "All tests" + [ App.all + ] + + +main : TestProgram +main = + run emit allTests + + +port emit : ( String, Value ) -> Cmd msg diff --git a/app/templates/client/src/elm/User/Decoder.elm b/app/templates/client/src/elm/User/Decoder.elm new file mode 100644 index 0000000..89715ee --- /dev/null +++ b/app/templates/client/src/elm/User/Decoder.elm @@ -0,0 +1,14 @@ +module User.Decoder exposing (decodeUser) + +import Json.Decode exposing (nullable, string, Decoder) +import Json.Decode.Pipeline exposing (decode, optional, required) +import User.Model exposing (..) +import Utils.Json exposing (decodeInt) + + +decodeUser : Decoder User +decodeUser = + decode User + |> required "id" decodeInt + |> required "label" string + |> optional "avatar_url" string "https://github.com/foo.png?s=90" diff --git a/app/templates/client/src/elm/User/Model.elm b/app/templates/client/src/elm/User/Model.elm new file mode 100644 index 0000000..a2528f7 --- /dev/null +++ b/app/templates/client/src/elm/User/Model.elm @@ -0,0 +1,8 @@ +module User.Model exposing (..) + + +type alias User = + { id : Int + , name : String + , avatarUrl : String + } diff --git a/app/templates/client/src/elm/Utils/Json.elm b/app/templates/client/src/elm/Utils/Json.elm new file mode 100644 index 0000000..fa4fec4 --- /dev/null +++ b/app/templates/client/src/elm/Utils/Json.elm @@ -0,0 +1,32 @@ +module Utils.Json + exposing + ( decodeInt + , decodeError + ) + +import Json.Decode as Decode exposing (int, string, Decoder) +import String + + +{-| Cast String to Int. +-} +decodeInt : Decoder Int +decodeInt = + Decode.oneOf + [ Decode.int + , Decode.string + |> Decode.andThen + (\val -> + case String.toInt val of + Ok int -> + Decode.succeed int + + Err _ -> + Decode.fail "Cannot convert string to integer" + ) + ] + + +decodeError : Decoder String +decodeError = + Decode.field "title" Decode.string diff --git a/app/templates/client/src/elm/Utils/WebData.elm b/app/templates/client/src/elm/Utils/WebData.elm new file mode 100644 index 0000000..149c28f --- /dev/null +++ b/app/templates/client/src/elm/Utils/WebData.elm @@ -0,0 +1,84 @@ +module Utils.WebData exposing (sendWithHandler, viewError) + +import HttpBuilder exposing (..) +import Json.Decode exposing (Decoder) +import RemoteData exposing (RemoteData(..), WebData) +import Html exposing (..) +import Http +import Task + + +{-| Provide some `Html` to view an error message. +-} +viewError : Http.Error -> Html any +viewError error = + case error of + Http.BadUrl message -> + div [] [ text "URL is not valid." ] + + Http.BadPayload message _ -> + div [] + [ p [] [ text "The server responded with data of an unexpected type." ] + , p [] [ text message ] + ] + + Http.NetworkError -> + div [] [ text "There was a network error." ] + + Http.Timeout -> + div [] [ text "The network request timed out." ] + + Http.BadStatus response -> + div [] + [ div [] [ text "The server indicated the following error:" ] + , div [] [ text response.status.message ] + ] + + +{-| This is a convenience for the common pattern where we build a request with +`HttpBuilder` and want to handle the result as a `WebData a`. So, consider someting +like this: + + type alias Model = + -- Amongst other fields ... + { liveSessionId : WebData LiveSessionId + } + + type Msg + -- Amongst other messages + = HandleFetchedId (WebData LiveSessionId) + + -- The point is that the `update` method can now be very simple, since what + -- is passed to `HandleFetchedId` will already be the `WebData ...` we want + update : Msg -> Model -> (Model, Cmd Msg) + update msg model = + case msg of + HandleFetchedId id -> + { model | liveSessionId = id } ! [] + + -- Given the format of the JSON returned by the server, this picks out the + -- thing of the type we're interested in + decodeLiveSessionId : Decode.Decoder LiveSessionId + decodeLiveSessionId = + Decode.at [ "data", "live_session" ] decodeInt + + -- You just need to build the `RequestBuilder`, and then call `sendWithHandler` + fetchFromBackend = + HttpBuilder.post + |> -- whatever you need to finish the `RequestBuilder` + |> sendWithHandler decodeLiveSessionId HandleFetchedId +-} + + + +-- sendWithHandler : Decoder a -> (WebData a -> msg) -> RequestBuilder -> Cmd msg + + +sendWithHandler decoder tagger builder = + builder + |> withExpect (Http.expectJson decoder) + |> send tagger + + + +-- |> RemoteData.asCmd diff --git a/app/templates/client/src/index.html b/app/templates/client/src/index.html new file mode 100644 index 0000000..d036175 --- /dev/null +++ b/app/templates/client/src/index.html @@ -0,0 +1,21 @@ + + + + + + Elm + + + + + + + + + + + + + + + diff --git a/app/templates/client/src/js/README.md b/app/templates/client/src/js/README.md new file mode 100644 index 0000000..b9dfb1e --- /dev/null +++ b/app/templates/client/src/js/README.md @@ -0,0 +1 @@ +Place JS, and JS-inerop files in this folder. diff --git a/app/templates/client/src/js/app.js b/app/templates/client/src/js/app.js new file mode 100644 index 0000000..8c13e84 --- /dev/null +++ b/app/templates/client/src/js/app.js @@ -0,0 +1,8 @@ +var elmApp = Elm.Main.fullscreen({ + accessToken : localStorage.getItem('accessToken') || '', + hostname : window.location.hostname +}); + +elmApp.ports.accessTokenPort.subscribe(function(accessToken) { + localStorage.setItem('accessToken', accessToken); +}); diff --git a/app/templates/client/yarn.lock b/app/templates/client/yarn.lock new file mode 100644 index 0000000..6a32880 --- /dev/null +++ b/app/templates/client/yarn.lock @@ -0,0 +1,5242 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +accepts@1.3.3, accepts@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +after@0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-regex@^0.2.0, ansi-regex@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9" + +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +aproba@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + +archive-type@^3.0.0, archive-type@^3.0.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-3.2.0.tgz#9cd9c006957ebe95fadad5bd6098942a813737f6" + dependencies: + file-type "^3.1.0" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-index@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-index/-/array-index-1.0.0.tgz#ec56a749ee103e4e08c790b9c353df16055b97f9" + dependencies: + debug "^2.2.0" + es6-symbol "^3.0.2" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.0, array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@0.1.11: + version "0.1.11" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.1.11.tgz#559be18376d08a4ec4dbe80877d27818639b2df7" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.1.5.tgz#ee74009413002d84cec7219c6ac811812e723160" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +async-each-series@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-0.1.1.tgz#7617c1917401fd8ca4a28aadce3dbae98afeb432" + +async-each-series@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-1.1.0.tgz#f42fd8155d38f21a5b8ea07c28e063ed1700b138" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + +async@1.5.2, async@^1.2.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.0.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" + dependencies: + lodash "^4.14.0" + +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + +async@~0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.6.2.tgz#41fd038a3812c0a8bc1842ecf08ba63eb0392bef" + +async@~0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +autoprefixer-core@^5.0.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/autoprefixer-core/-/autoprefixer-core-5.2.1.tgz#e640c414ae419aae21c1ad43c8ea0f3db82a566d" + dependencies: + browserslist "~0.4.0" + caniuse-db "^1.0.30000214" + num2fraction "^1.1.0" + postcss "~4.1.12" + +aws-sign2@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.5.0.tgz#c57103f7a17fc037f02d7c2e64b602ea223f7d63" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + +base64id@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-0.1.0.tgz#02ce0fdeee0cef4f40080e1e73e834f0b1bfce3f" + +batch@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.5.3.tgz#3f3414f380321743bfc1042f9a83ff1d5824d464" + +bcrypt-pbkdf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + dependencies: + tweetnacl "^0.14.3" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +benchmark@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-1.0.0.tgz#2f1e2fa4c359f11122aa183082218e957e390c73" + +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + dependencies: + callsite "1.0.0" + +bin-build@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-2.2.0.tgz#11f8dd61f70ffcfa2bdcaa5b46f5e8fedd4221cc" + dependencies: + archive-type "^3.0.1" + decompress "^3.0.0" + download "^4.1.2" + exec-series "^1.0.0" + rimraf "^2.2.6" + tempfile "^1.0.0" + url-regex "^3.0.0" + +bin-check@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-2.0.0.tgz#86f8e6f4253893df60dc316957f5af02acb05930" + dependencies: + executable "^1.0.0" + +bin-version-check@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-2.1.0.tgz#e4e5df290b9069f7d111324031efc13fdd11a5b0" + dependencies: + bin-version "^1.0.0" + minimist "^1.1.0" + semver "^4.0.3" + semver-truncate "^1.0.0" + +bin-version@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-1.0.4.tgz#9eb498ee6fd76f7ab9a7c160436f89579435d78e" + dependencies: + find-versions "^1.0.0" + +bin-wrapper@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-3.0.2.tgz#67d3306262e4b1a5f2f88ee23464f6a655677aeb" + dependencies: + bin-check "^2.0.0" + bin-version-check "^2.1.0" + download "^4.0.0" + each-async "^1.1.1" + lazy-req "^1.0.0" + os-filter-obj "^1.0.0" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + +bl@^1.0.0, bl@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.0.3.tgz#fc5421a28fd4226036c3b3891a66a25bc64d226e" + dependencies: + readable-stream "~2.0.5" + +blob@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bluebird@^2.9.27: + version "2.11.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1" + +boom@0.4.x: + version "0.4.2" + resolved "https://registry.yarnpkg.com/boom/-/boom-0.4.2.tgz#7a636e9ded4efcefb19cef4947a3c67dfaee911b" + dependencies: + hoek "0.9.x" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +bower-config@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/bower-config/-/bower-config-0.5.2.tgz#1f7d2e899e99b70c29a613e70d4c64590414b22e" + dependencies: + graceful-fs "~2.0.0" + mout "~0.9.0" + optimist "~0.6.0" + osenv "0.0.3" + +brace-expansion@^1.0.0, brace-expansion@^1.1.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-sync-client@^2.3.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/browser-sync-client/-/browser-sync-client-2.4.3.tgz#e965033e0c83e5f06caacb516755b694836cea4f" + dependencies: + etag "^1.7.0" + fresh "^0.3.0" + +browser-sync-ui@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/browser-sync-ui/-/browser-sync-ui-0.6.1.tgz#d8b98ea3b755632287350a37ee2eaaacabea28d2" + dependencies: + async-each-series "0.1.1" + connect-history-api-fallback "^1.1.0" + immutable "^3.7.6" + server-destroy "1.0.1" + stream-throttle "^0.1.3" + weinre "^2.0.0-pre-I0Z7U9OV" + +browser-sync@2.18.2: + version "2.18.2" + resolved "https://registry.yarnpkg.com/browser-sync/-/browser-sync-2.18.2.tgz#3c101274c507e2f734dbce4e4b19bd3e124c3ea7" + dependencies: + browser-sync-client "^2.3.3" + browser-sync-ui "0.6.1" + bs-recipes "1.3.2" + chokidar "1.6.0" + connect "3.5.0" + dev-ip "^1.0.1" + easy-extender "2.3.2" + eazy-logger "3.0.2" + emitter-steward "^1.0.0" + fs-extra "0.30.0" + http-proxy "1.15.1" + immutable "3.8.1" + localtunnel "1.8.1" + micromatch "2.3.11" + opn "4.0.2" + portscanner "^1.0.0" + qs "6.2.1" + resp-modifier "6.0.2" + rx "4.1.0" + serve-index "1.8.0" + serve-static "1.11.1" + server-destroy "1.0.1" + socket.io "1.5.0" + ua-parser-js "0.7.10" + yargs "6.0.0" + +browserify-zlib@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +browserslist@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-0.4.0.tgz#3bd4ab9199dc1b9150d4d6dba4d9d3aabbc86dd4" + dependencies: + caniuse-db "^1.0.30000153" + +bs-recipes@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/bs-recipes/-/bs-recipes-1.3.2.tgz#aebff3bfc9dca4cab3c2938d91e43473cf41b6c1" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +buffer-to-vinyl@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz#00f15faee3ab7a1dda2cde6d9121bffdd07b2262" + dependencies: + file-type "^3.1.0" + readable-stream "^2.0.2" + uuid "^2.0.1" + vinyl "^1.0.0" + +bufferstreams@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/bufferstreams/-/bufferstreams-0.0.2.tgz#7ce8dff968bbac00b9e90158a2c41456f740abdd" + dependencies: + readable-stream "^1.0.26-2" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +bytes@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-0.3.0.tgz#78e2e0e28c7f9c7b988ea8aee0db4d5fa9941935" + +cache-swap@^0.2.0: + version "0.2.3" + resolved "https://registry.yarnpkg.com/cache-swap/-/cache-swap-0.2.3.tgz#53c1dea60c2939af347ef93bb7a86aefc6e6dcb4" + dependencies: + graceful-fs "^4.1.2" + mkdirp "^0.5.1" + object-assign "^4.0.1" + rimraf "^2.4.0" + +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + +camel-case@^1.0.0, camel-case@^1.1.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-1.2.2.tgz#1aca7c4d195359a2ce9955793433c6e5542511f2" + dependencies: + sentence-case "^1.1.1" + upper-case "^1.1.1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2, camelcase@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caniuse-db@^1.0.30000153, caniuse-db@^1.0.30000214: + version "1.0.30000592" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000592.tgz#7b916023941df4063d9d946a1f9ad0d5edaf2bcd" + +capture-stack-trace@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +caw@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/caw/-/caw-1.2.0.tgz#ffb226fe7efc547288dc62ee3e97073c212d1034" + dependencies: + get-proxy "^1.0.1" + is-obj "^1.0.0" + object-assign "^3.0.0" + tunnel-agent "^0.4.0" + +chalk@^0.5.0, chalk@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174" + dependencies: + ansi-styles "^1.1.0" + escape-string-regexp "^1.0.0" + has-ansi "^0.1.0" + strip-ansi "^0.3.0" + supports-color "^0.2.0" + +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" + dependencies: + ansi-styles "~1.0.0" + has-color "~0.1.0" + strip-ansi "~0.1.0" + +change-case@2.1.x: + version "2.1.6" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-2.1.6.tgz#514af20513158a68fe7f00dff4c332d6c298d2f9" + dependencies: + camel-case "^1.0.0" + constant-case "^1.0.0" + dot-case "^1.0.0" + is-lower-case "^1.0.0" + is-upper-case "^1.0.0" + lower-case "^1.0.0" + param-case "^1.0.0" + pascal-case "^1.0.0" + path-case "^1.0.0" + sentence-case "^1.0.0" + snake-case "^1.0.0" + swap-case "^1.0.0" + title-case "^1.0.0" + upper-case "^1.0.0" + upper-case-first "^1.0.0" + +chokidar@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.0.tgz#90c32ad4802901d7713de532dc284e96a63ad058" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +clap@^1.0.9: + version "1.1.2" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.2.tgz#316545bf22229225a2cecaa6824cd2f56a9709ed" + dependencies: + chalk "^1.1.3" + +clean-css@2.2.x: + version "2.2.23" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-2.2.23.tgz#0590b5478b516c4903edc2d89bd3fdbdd286328c" + dependencies: + commander "2.2.x" + +clean-css@~3.0.4: + version "3.0.10" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.0.10.tgz#d477b381baa41f759a829d51f9cb380db90d626e" + dependencies: + commander "2.5.x" + source-map ">=0.1.43 <0.2" + +cli@0.6.x: + version "0.6.6" + resolved "https://registry.yarnpkg.com/cli/-/cli-0.6.6.tgz#02ad44a380abf27adac5e6f0cdd7b043d74c53e3" + dependencies: + exit "0.1.2" + glob "~ 3.2.1" + +cli@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14" + dependencies: + exit "0.1.2" + glob "^7.1.1" + +cliui@^3.0.3, cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + +clone-stats@^0.0.1, clone-stats@~0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +cloneable-readable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117" + dependencies: + inherits "^2.0.1" + process-nextick-args "^1.0.6" + through2 "^2.0.1" + +co@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/co/-/co-3.1.0.tgz#4ea54ea5a08938153185e15210c68d9092bc1b78" + +coa@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.1.tgz#7f959346cfc8719e3f7233cd6852854a7c67d8a3" + dependencies: + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +combined-stream@~0.0.4: + version "0.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-0.0.7.tgz#0137e657baa5a7541c57ac37ac5fc07d73b4dc1f" + dependencies: + delayed-stream "0.0.5" + +commander@2.2.x, commander@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.2.0.tgz#175ad4b9317f3ff615f201c1e57224f55a3e91df" + +commander@2.5.x, commander@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.5.1.tgz#23c61f6e47be143cc02e7ad4bb1c47f5cd5a2883" + +commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +commander@~2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + dependencies: + graceful-readlink ">= 1.0.0" + +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + +component-emitter@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.0.tgz#ccd113a86388d06482d03de3fc7df98526ba8efe" + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +concat-stream@^1.4.1, concat-stream@^1.4.6, concat-stream@^1.4.7: + version "1.5.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +concat-with-sourcemaps@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz#f55b3be2aeb47601b10a2d5259ccfb70fd2f1dd6" + dependencies: + source-map "^0.5.1" + +connect-history-api-fallback@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz#e51d17f8f0ef0db90a64fdb47de3051556e9f169" + +connect@1.x: + version "1.9.2" + resolved "https://registry.yarnpkg.com/connect/-/connect-1.9.2.tgz#42880a22e9438ae59a8add74e437f58ae8e52807" + dependencies: + formidable "1.0.x" + mime ">= 0.0.1" + qs ">= 0.4.0" + +connect@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.5.0.tgz#b357525a0b4c1f50599cd983e1d9efeea9677198" + dependencies: + debug "~2.2.0" + finalhandler "0.5.0" + parseurl "~1.3.1" + utils-merge "1.0.0" + +console-browserify@1.1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +console-stream@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" + +constant-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-1.1.2.tgz#8ec2ca5ba343e00aa38dbf4e200fd5ac907efd63" + dependencies: + snake-case "^1.1.0" + upper-case "^1.1.1" + +convert-source-map@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +create-error-class@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + dependencies: + capture-stack-trace "^1.0.0" + +cross-spawn@^3.0.0, cross-spawn@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cryptiles@0.2.x: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-0.2.2.tgz#ed91ff1f17ad13d3748288594f8a48a0d26f325c" + dependencies: + boom "0.4.x" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +css-parse@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" + +css-stringify@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/css-stringify/-/css-stringify-1.4.1.tgz#252ccbf03f723a009bdd8770fe7eb274171afdfa" + dependencies: + source-map "~0.1.31" + +css@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/css/-/css-1.6.0.tgz#c06fff0afbb313fce5bce070d76531a6c8d300aa" + dependencies: + css-parse "1.7.0" + css-stringify "1.4.1" + +csso@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.0.0.tgz#178b43a44621221c27756086f531e02f42900ee8" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +ctype@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/ctype/-/ctype-0.5.3.tgz#82c18c2461f74114ef16c135224ad0b9144ca12f" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +d@^0.1.1, d@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" + dependencies: + es5-ext "~0.10.2" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +dateformat@^1.0.11, dateformat@^1.0.7-1.2.3: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +"deap@>=1.0.0 <2.0.0-0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/deap/-/deap-1.0.0.tgz#b148bf82430a27699b7483a03eb6b67585bfc888" + +debug@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + +debug@2.2.0, debug@^2.2.0, debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +decompress-tar@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-3.1.0.tgz#217c789f9b94450efaadc5c5e537978fc333c466" + dependencies: + is-tar "^1.0.0" + object-assign "^2.0.0" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-tarbz2@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz#8b23935681355f9f189d87256a0f8bdd96d9666d" + dependencies: + is-bzip2 "^1.0.0" + object-assign "^2.0.0" + seek-bzip "^1.0.3" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-targz@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-3.1.0.tgz#b2c13df98166268991b715d6447f642e9696f5a0" + dependencies: + is-gzip "^1.0.0" + object-assign "^2.0.0" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-unzip@^3.0.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-3.4.0.tgz#61475b4152066bbe3fee12f9d629d15fe6478eeb" + dependencies: + is-zip "^1.0.0" + read-all-stream "^3.0.0" + stat-mode "^0.2.0" + strip-dirs "^1.0.0" + through2 "^2.0.0" + vinyl "^1.0.0" + yauzl "^2.2.1" + +decompress@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-3.0.0.tgz#af1dd50d06e3bfc432461d37de11b38c0d991bed" + dependencies: + buffer-to-vinyl "^1.0.0" + concat-stream "^1.4.6" + decompress-tar "^3.0.0" + decompress-tarbz2 "^3.0.0" + decompress-targz "^3.0.0" + decompress-unzip "^3.0.0" + stream-combiner2 "^1.1.1" + vinyl-assign "^1.0.1" + vinyl-fs "^2.2.0" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + +defaults@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +del@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/del/-/del-1.2.1.tgz#aed6e5bcd7cb7325df34f563125fa265b2c1a014" + dependencies: + each-async "^1.0.0" + globby "^2.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^3.0.0" + rimraf "^2.2.8" + +delayed-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-0.0.5.tgz#d4b1f43a93e8296dfe02694f4680bc37a313c73f" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" + +deprecated@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-file@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" + dependencies: + fs-exists-sync "^0.1.0" + +dev-ip@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + dependencies: + domelementtype "1" + +domutils@1.5: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-1.1.2.tgz#1e73826900de28d6de5480bc1de31d0842b06bec" + dependencies: + sentence-case "^1.1.2" + +download@^4.0.0, download@^4.1.2: + version "4.4.3" + resolved "https://registry.yarnpkg.com/download/-/download-4.4.3.tgz#aa55fdad392d95d4b68e8c2be03e0c2aa21ba9ac" + dependencies: + caw "^1.0.1" + concat-stream "^1.4.7" + each-async "^1.0.0" + filenamify "^1.0.1" + got "^5.0.0" + gulp-decompress "^1.2.0" + gulp-rename "^1.2.0" + is-url "^1.2.0" + object-assign "^4.0.1" + read-all-stream "^3.0.0" + readable-stream "^2.0.2" + stream-combiner2 "^1.1.1" + vinyl "^1.0.0" + vinyl-fs "^2.2.0" + ware "^1.2.0" + +duplexer2@0.0.2, duplexer2@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +duplexer2@^0.1.4, duplexer2@~0.1.0: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + dependencies: + readable-stream "^2.0.2" + +duplexer@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +duplexify@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" + dependencies: + end-of-stream "1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +each-async@^1.0.0, each-async@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/each-async/-/each-async-1.1.1.tgz#dee5229bdf0ab6ba2012a395e1b869abf8813473" + dependencies: + onetime "^1.0.0" + set-immediate-shim "^1.0.0" + +easy-extender@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/easy-extender/-/easy-extender-2.3.2.tgz#3d3248febe2b159607316d8f9cf491c16648221d" + dependencies: + lodash "^3.10.1" + +eazy-logger@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/eazy-logger/-/eazy-logger-3.0.2.tgz#a325aa5e53d13a2225889b2ac4113b2b9636f4fc" + dependencies: + tfunk "^3.0.1" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +emitter-steward@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/emitter-steward/-/emitter-steward-1.0.0.tgz#f3411ade9758a7565df848b2da0cbbd1b46cbd64" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +end-of-stream@1.0.0, end-of-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" + dependencies: + once "~1.3.0" + +end-of-stream@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" + dependencies: + once "~1.3.0" + +engine.io-client@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.7.0.tgz#0bb81d3563ab7afb668f1e1b400c9403b03006ee" + dependencies: + component-emitter "1.1.2" + component-inherit "0.0.3" + debug "2.2.0" + engine.io-parser "1.3.0" + has-cors "1.1.0" + indexof "0.0.1" + parsejson "0.0.1" + parseqs "0.0.2" + parseuri "0.0.4" + ws "1.1.1" + xmlhttprequest-ssl "1.5.1" + yeast "0.1.2" + +engine.io-parser@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.0.tgz#61a35c7f3a3ccd1b179e4f52257a7a8cfacaeb21" + dependencies: + after "0.8.1" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.5" + blob "0.0.4" + has-binary "0.1.6" + wtf-8 "1.0.0" + +engine.io@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.7.0.tgz#a417857af4995d9bbdf8a0e03a87e473ebe64fbe" + dependencies: + accepts "1.3.3" + base64id "0.1.0" + debug "2.2.0" + engine.io-parser "1.3.0" + ws "1.1.1" + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +error-ex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + dependencies: + is-arrayish "^0.2.1" + +es5-ext@^0.10.7, es5-ext@~0.10.11, es5-ext@~0.10.2: + version "0.10.12" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" + dependencies: + d "^0.1.1" + es5-ext "^0.10.7" + es6-symbol "3" + +es6-promise@^2.3.0, es6-promise@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-2.3.0.tgz#96edb9f2fdb01995822b263dd8aadab6748181bc" + +es6-symbol@3, es6-symbol@^3.0.2, es6-symbol@~3.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +etag@^1.7.0, etag@~1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.7.0.tgz#03d30b5f67dd6e632d2945d30d6652731a34d5d8" + +event-stream@^3.3.1: + version "3.3.4" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + +event-stream@~3.1.0: + version "3.1.7" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.1.7.tgz#b4c540012d0fe1498420f3d8946008db6393c37a" + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.2" + stream-combiner "~0.0.4" + through "~2.3.1" + +eventemitter3@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + +exec-buffer@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-2.0.1.tgz#0028a31be0b1460b61d075f96af4583b9e335ea0" + dependencies: + rimraf "^2.2.6" + tempfile "^1.0.0" + +exec-series@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/exec-series/-/exec-series-1.0.3.tgz#6d257a9beac482a872c7783bc8615839fc77143a" + dependencies: + async-each-series "^1.1.0" + object-assign "^4.1.0" + +executable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/executable/-/executable-1.1.0.tgz#877980e9112f3391066da37265de7ad8434ab4d9" + dependencies: + meow "^3.1.0" + +exit@0.1.2, exit@0.1.x: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^1.2.1, expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + +express@2.5.x: + version "2.5.11" + resolved "https://registry.yarnpkg.com/express/-/express-2.5.11.tgz#4ce8ea1f3635e69e49f0ebb497b6a4b0a51ce6f0" + dependencies: + connect "1.x" + mime "1.2.4" + mkdirp "0.3.0" + qs "0.4.x" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend@^3.0.0, extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extract-zip@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.5.0.tgz#92ccf6d81ef70a9fa4c1747114ccef6d8688a6c4" + dependencies: + concat-stream "1.5.0" + debug "0.7.4" + mkdirp "0.5.0" + yauzl "2.4.1" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +"fancy-log@>=1.0.0 <2.0.0-0", fancy-log@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.2.0.tgz#d5a51b53e9ab22ca07d558f2b67ae55fdb5fcbd8" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-type@^3.1.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +filename-reserved-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4" + +filenamify@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5" + dependencies: + filename-reserved-regex "^1.0.0" + strip-outer "^1.0.0" + trim-repeated "^1.0.0" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-0.5.0.tgz#e9508abece9b6dba871a6942a1d7911b91911ac7" + dependencies: + debug "~2.2.0" + escape-html "~1.0.3" + on-finished "~2.3.0" + statuses "~1.3.0" + unpipe "~1.0.0" + +find-index@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-versions@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-1.2.1.tgz#cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62" + dependencies: + array-uniq "^1.0.0" + get-stdin "^4.0.1" + meow "^3.5.0" + semver-regex "^1.0.0" + +findup-sync@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.2.1.tgz#e0a90a450075c49466ee513732057514b81e878c" + dependencies: + glob "~4.3.0" + +findup-sync@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" + dependencies: + detect-file "^0.1.0" + is-glob "^2.0.1" + micromatch "^2.3.7" + resolve-dir "^0.1.0" + +fined@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97" + dependencies: + expand-tilde "^1.2.1" + lodash.assignwith "^4.0.7" + lodash.isempty "^4.2.1" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.pick "^4.2.1" + parse-filepath "^1.0.1" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flagged-respawn@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" + +for-in@^0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" + +for-own@^0.1.3, for-own@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + dependencies: + for-in "^0.1.5" + +forever-agent@~0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.5.2.tgz#6d0e09c4921f94a27f63d3b49c5feff1ea4c5130" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +fork-stream@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/fork-stream/-/fork-stream-0.0.4.tgz#db849fce77f6708a5f8f386ae533a0907b54ae70" + +form-data@~0.1.0: + version "0.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-0.1.4.tgz#91abd788aba9702b1aabfa8bc01031a2ac9e3b12" + dependencies: + async "~0.9.0" + combined-stream "~0.0.4" + mime "~1.2.11" + +form-data@~1.0.0-rc3: + version "1.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-1.0.1.tgz#ae315db9a4907fa065502304a66d7733475ee37c" + dependencies: + async "^2.0.1" + combined-stream "^1.0.5" + mime-types "^2.1.11" + +form-data@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +formatio@~1.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.0.2.tgz#e7991ca144ff7d8cff07bb9ac86a9b79c6ba47ef" + dependencies: + samsam "~1.1" + +formidable@1.0.x: + version "1.0.17" + resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.0.17.tgz#ef5491490f9433b705faa77249c99029ae348559" + +fresh@0.3.0, fresh@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" + +from@~0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.3.tgz#ef63ac2062ac32acf7862e0d40b44b896f22f3bc" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + +fs-extra@0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@~0.26.4: + version "0.26.7" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.26.7.tgz#9ae1fdd94897798edab76d0918cf42d0c3184fa9" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.0.15" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.15.tgz#fa63f590f3c2ad91275e4972a6cea545fb0aae44" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.6.0.tgz#d35301ad18e96902b4751dcbbe40f4218b942a46" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-color "^0.1.7" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gauge@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + supports-color "^0.2.0" + wide-align "^1.1.0" + +gaze@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" + dependencies: + globule "~0.1.0" + +gaze@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + dependencies: + globule "^1.0.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-proxy@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-1.1.0.tgz#894854491bc591b0f147d7ae570f5c678b7256eb" + dependencies: + rc "^1.1.2" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +gifsicle@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-3.0.4.tgz#f45cb5ed10165b665dc929e0e9328b6c821dfa3b" + dependencies: + bin-build "^2.0.0" + bin-wrapper "^3.0.0" + logalot "^2.0.0" + +gift@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/gift/-/gift-0.6.1.tgz#c1698e6b6887164ed978a01095423cff65b8e79f" + dependencies: + underscore "1.x.x" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.0.1.tgz#60021327cc963ddc3b5f085764f500479ecd82ff" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-stream@^3.1.5: + version "3.1.18" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^1.0.0" + +glob-stream@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-4.1.1.tgz#b842df10d688c7eb6bcfcebd846f3852296b3200" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^2.0.2" + +glob-stream@^5.3.2: + version "5.3.5" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22" + dependencies: + extend "^3.0.0" + glob "^5.0.3" + glob-parent "^3.0.0" + micromatch "^2.3.7" + ordered-read-streams "^0.3.0" + through2 "^0.6.0" + to-absolute-glob "^0.1.1" + unique-stream "^2.0.2" + +glob-watcher@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" + dependencies: + gaze "^0.5.1" + +glob-watcher@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.8.tgz#68aeb661e7e2ce8d3634381b2ec415f00c6bc2a4" + dependencies: + gaze "^0.5.1" + +glob2base@^0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + +glob@^4.0.5, glob@^4.3.1: + version "4.5.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + +glob@^5.0.3: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@~7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +"glob@~ 3.2.1": + version "3.2.11" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" + dependencies: + inherits "2" + minimatch "0.3" + +glob@~3.1.21: + version "3.1.21" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" + dependencies: + graceful-fs "~1.2.0" + inherits "1" + minimatch "~0.2.11" + +glob@~4.3.0: + version "4.3.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-4.3.5.tgz#80fbb08ca540f238acce5d11d1e9bc41e75173d3" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + +global-prefix@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" + dependencies: + homedir-polyfill "^1.0.0" + ini "^1.3.4" + is-windows "^0.2.0" + which "^1.2.12" + +globby@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-2.1.0.tgz#9e9192bcd33f4ab6a4f894e5e7ea8b713213c482" + dependencies: + array-union "^1.0.1" + async "^1.2.1" + glob "^5.0.3" + object-assign "^3.0.0" + +globule@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.1.0.tgz#c49352e4dc183d85893ee825385eb994bb6df45f" + dependencies: + glob "~7.1.1" + lodash "~4.16.4" + minimatch "~3.0.2" + +globule@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" + dependencies: + glob "~3.1.21" + lodash "~1.0.1" + minimatch "~0.2.11" + +glogg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + +got@^5.0.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/got/-/got-5.7.1.tgz#5f81635a61e4a6589f180569ea4e381680a51f35" + dependencies: + create-error-class "^3.0.1" + duplexer2 "^0.1.4" + is-redirect "^1.0.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + lowercase-keys "^1.0.0" + node-status-codes "^1.0.0" + object-assign "^4.0.1" + parse-json "^2.1.0" + pinkie-promise "^2.0.0" + read-all-stream "^3.0.0" + readable-stream "^2.0.5" + timed-out "^3.0.0" + unzip-response "^1.0.2" + url-parse-lax "^1.0.0" + +graceful-fs@^3.0.0, graceful-fs@~3.0.2: + version "3.0.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" + dependencies: + natives "^1.1.0" + +graceful-fs@^4.0.0, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +graceful-fs@~1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" + +graceful-fs@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.3.tgz#7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +gulp-autoprefixer@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/gulp-autoprefixer/-/gulp-autoprefixer-2.3.1.tgz#f675d3b1bd76f088df2f24ab7ad3e4a059e07e67" + dependencies: + autoprefixer-core "^5.0.0" + gulp-util "^3.0.0" + object-assign "^2.0.0" + postcss "^4.1.5" + through2 "^0.6.2" + vinyl-sourcemaps-apply "^0.1.3" + +gulp-cache@0.2.10: + version "0.2.10" + resolved "https://registry.yarnpkg.com/gulp-cache/-/gulp-cache-0.2.10.tgz#19a298a60728c46dd151dd8cdac7cc6e50b306a9" + dependencies: + bluebird "^2.9.27" + cache-swap "^0.2.0" + gulp-util "^3.0.5" + object-assign "^3.0.0" + object.omit "^1.1.0" + object.pick "^1.1.1" + through2 "^0.6.5" + try-json-parse "^0.1.1" + vinyl "^0.5.0" + +gulp-cached@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gulp-cached/-/gulp-cached-1.0.1.tgz#ca9cdfe95d638f6b93d3171c879db4bea8569948" + dependencies: + lodash.defaults "^2.4.1" + through2 "^0.5.0" + +gulp-changed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulp-changed/-/gulp-changed-1.0.0.tgz#84c476118677755a233bb2ee7dfbf036fc573380" + dependencies: + gulp-util "^3.0.0" + through2 "^0.6.1" + +gulp-concat@^2.5.2: + version "2.6.1" + resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353" + dependencies: + concat-with-sourcemaps "^1.0.0" + through2 "^2.0.0" + vinyl "^2.0.0" + +gulp-decompress@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gulp-decompress/-/gulp-decompress-1.2.0.tgz#8eeb65a5e015f8ed8532cafe28454960626f0dc7" + dependencies: + archive-type "^3.0.0" + decompress "^3.0.0" + gulp-util "^3.0.1" + readable-stream "^2.0.2" + +gulp-elm@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/gulp-elm/-/gulp-elm-0.6.1.tgz#1008ce70f0d9b12fb81ceca222a3ee26746fb7de" + dependencies: + cross-spawn "^3.0.1" + gulp-util "^3.0.1" + q "^1.1.2" + temp "^0.8.1" + through2 "^0.6.3" + which "^1.0.8" + +gulp-filter@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-2.0.2.tgz#1ceb1d113ee9942cedd49f5863b42be44bc7cd2c" + dependencies: + gulp-util "^3.0.0" + merge-stream "^0.1.7" + multimatch "^2.0.0" + plexer "0.0.3" + through2 "^0.6.1" + +gulp-gh-pages@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/gulp-gh-pages/-/gulp-gh-pages-0.5.4.tgz#a6732ca475ab9b5a53253c1c24734c40c21b6546" + dependencies: + gift "^0.6.1" + gulp-util "^3.0.7" + readable-stream "^2.0.2" + rimraf "^2.4.3" + vinyl-fs "^2.2.1" + wrap-promise "^1.0.1" + +gulp-gzip@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/gulp-gzip/-/gulp-gzip-0.0.8.tgz#793badc74120c0e0969a56d75a3c6d79f2afc98b" + dependencies: + bytes "^0.3.0" + gulp-util "^2.2.14" + stream-to-array "~1.0.0" + through2 "^0.4.1" + +gulp-htmlmin@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/gulp-htmlmin/-/gulp-htmlmin-0.2.0.tgz#4f0bbdddf581dadac6a5aa19abaef6dbf5bf9b61" + dependencies: + gulp-util "~3.0.0" + html-minifier "~0.6.0" + map-stream "^0.1.0" + +gulp-if@1.2.5, gulp-if@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/gulp-if/-/gulp-if-1.2.5.tgz#9bd9c16032ecc28e0154bfb05828d233166f2da9" + dependencies: + gulp-match "~0.2.1" + ternary-stream "^1.2.0" + through2 "~0.6.2" + +gulp-imagemin@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/gulp-imagemin/-/gulp-imagemin-2.3.0.tgz#47d60f14bdefbe17614a04d4ebbbb39ce68f9aa2" + dependencies: + chalk "^1.0.0" + gulp-util "^3.0.0" + imagemin "^3.0.0" + object-assign "^3.0.0" + plur "^1.0.0" + pretty-bytes "^2.0.1" + through2-concurrent "^1.1.0" + +gulp-jshint@1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/gulp-jshint/-/gulp-jshint-1.11.2.tgz#d430d00de42ce6e7ba0df30418c9d1d3153822b5" + dependencies: + gulp-util "^3.0.0" + jshint "^2.7.0" + lodash "^3.0.1" + minimatch "^2.0.1" + rcloader "0.1.2" + through2 "~0.6.1" + +gulp-load-plugins@0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/gulp-load-plugins/-/gulp-load-plugins-0.8.1.tgz#0a8261d059dfddc918fda406c8232e72fa34d2ea" + dependencies: + findup-sync "^0.2.1" + multimatch "2.0.0" + +gulp-match@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/gulp-match/-/gulp-match-0.2.1.tgz#0bed08da8bd6e89686f89ffb004337f8bad06d22" + dependencies: + minimatch "^1.0.0" + +gulp-minify-css@0.3.13: + version "0.3.13" + resolved "https://registry.yarnpkg.com/gulp-minify-css/-/gulp-minify-css-0.3.13.tgz#ba813c665422868305383ccd185f239c1e35209b" + dependencies: + bufferstreams "0.0.2" + clean-css "~3.0.4" + gulp-util "~3.0.1" + memory-cache "0.0.5" + through2 "^0.6.1" + vinyl-sourcemaps-apply "^0.1.4" + +gulp-plumber@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gulp-plumber/-/gulp-plumber-1.0.1.tgz#56d8e74a0a05a8b75d2ecc11800d0191df542af2" + dependencies: + gulp-util "~3" + through2 "~0.6" + +gulp-rename@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" + +gulp-rev-all@0.7.6: + version "0.7.6" + resolved "https://registry.yarnpkg.com/gulp-rev-all/-/gulp-rev-all-0.7.6.tgz#5a4a65ee84088e442fbf9c21d6ecefe05ea17c3e" + dependencies: + chalk "~0.4.0" + event-stream "~3.1.0" + graceful-fs "~3.0.2" + gulp-util "~2.2.14" + sinon "~1.10.2" + through2 "~0.4.0" + underscore "~1.6.0" + +gulp-rev-replace@0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/gulp-rev-replace/-/gulp-rev-replace-0.3.4.tgz#77726cc7afd47fe39ca50304b062ff847dc75e30" + dependencies: + gulp-util "~2.2.14" + through2 "~0.4.1" + +gulp-sass@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-2.1.0.tgz#2587bc535d8b508bc10f4e2cf35f01185737d80b" + dependencies: + gulp-util "^3.0" + node-sass "^3.4.1" + object-assign "^4.0.1" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-sequence@0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/gulp-sequence/-/gulp-sequence-0.4.1.tgz#985edfb6d62c576f6d49e633d2c75c2c90112a50" + dependencies: + gulp-util ">=3.0.6" + thunks "^3.5.0" + +gulp-shell@0.2.11: + version "0.2.11" + resolved "https://registry.yarnpkg.com/gulp-shell/-/gulp-shell-0.2.11.tgz#19ba680b65a866f6042ede0b0e34b62db71f2139" + dependencies: + async "~0.9.0" + gulp-util "~3.0.1" + lodash "~2.4.1" + through2 "~0.6.3" + +gulp-size@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/gulp-size/-/gulp-size-1.3.0.tgz#8923a07b4ac131a01825d5b482de31737b5f9c90" + dependencies: + chalk "^1.0.0" + gulp-util "^3.0.0" + gzip-size "^1.0.0" + pretty-bytes "^2.0.1" + through2 "^2.0.0" + +gulp-sourcemaps@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c" + dependencies: + convert-source-map "^1.1.1" + graceful-fs "^4.1.2" + strip-bom "^2.0.0" + through2 "^2.0.0" + vinyl "^1.0.0" + +gulp-uglify@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-1.4.1.tgz#3e9f46b6f66168989762d547ad4b9a5aa38906d0" + dependencies: + deap ">=1.0.0 <2.0.0-0" + fancy-log ">=1.0.0 <2.0.0-0" + gulp-util ">=3.0.0 <4.0.0-0" + isobject ">=2.0.0 <3.0.0-0" + through2 ">=2.0.0 <3.0.0-0" + uglify-js "2.4.24" + uglify-save-license ">=0.4.1 <0.5.0-0" + vinyl-sourcemaps-apply ">=0.1.1 <0.2.0-0" + +gulp-uncss@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/gulp-uncss/-/gulp-uncss-0.5.2.tgz#f7a37715b2d03d13bae6dafb8b67dc249f9217a9" + dependencies: + gulp-util "~3.0.1" + object-assign "^2.0.0" + uncss "0.8.1" + +gulp-useref@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/gulp-useref/-/gulp-useref-1.3.0.tgz#b3f4692f156b542100a457e1ac1cec4f6ce760fe" + dependencies: + brace-expansion "^1.1.0" + event-stream "^3.3.1" + gulp-concat "^2.5.2" + gulp-if "^1.2.5" + gulp-util "^3.0.1" + is-relative-url "^1.0.0" + lodash "^3.3.1" + multimatch "^2.0.0" + node-useref "^0.3.1" + through2 "^0.6.1" + vinyl-fs "^1.0.0" + +"gulp-util@>=3.0.0 <4.0.0-0", gulp-util@>=3.0.6, gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.5, gulp-util@^3.0.7, gulp-util@~3, gulp-util@~3.0.0, gulp-util@~3.0.1: + version "3.0.7" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.7.tgz#78925c4b8f8b49005ac01a011c557e6218941cbb" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^1.0.11" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp-util@^2.2.14, gulp-util@~2.2.14: + version "2.2.20" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-2.2.20.tgz#d7146e5728910bd8f047a6b0b1e549bc22dbd64c" + dependencies: + chalk "^0.5.0" + dateformat "^1.0.7-1.2.3" + lodash._reinterpolate "^2.4.1" + lodash.template "^2.4.1" + minimist "^0.2.0" + multipipe "^0.1.0" + through2 "^0.5.0" + vinyl "^0.2.1" + +gulp@3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" + dependencies: + archy "^1.0.0" + chalk "^1.0.0" + deprecated "^0.0.1" + gulp-util "^3.0.0" + interpret "^1.0.0" + liftoff "^2.1.0" + minimist "^1.1.0" + orchestrator "^0.3.0" + pretty-hrtime "^1.0.0" + semver "^4.1.0" + tildify "^1.0.0" + v8flags "^2.0.2" + vinyl-fs "^0.3.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +gzip-size@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-1.0.0.tgz#66cf8b101047227b95bace6ea1da0c177ed5c22f" + dependencies: + browserify-zlib "^0.1.4" + concat-stream "^1.4.1" + +har-validator@~2.0.2, har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e" + dependencies: + ansi-regex "^0.2.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-binary@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.6.tgz#25326f39cfa4f616ad8787894e3af2cfbc7b6e10" + dependencies: + isarray "0.0.1" + +has-binary@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" + dependencies: + isarray "0.0.1" + +has-color@^0.1.7, has-color@~0.1.0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" + +has-cors@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hasha@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" + dependencies: + is-stream "^1.0.1" + pinkie-promise "^2.0.0" + +hawk@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-1.0.0.tgz#b90bb169807285411da7ffcb8dd2598502d3b52d" + dependencies: + boom "0.4.x" + cryptiles "0.2.x" + hoek "0.9.x" + sntp "0.2.x" + +hawk@~3.1.0, hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@0.9.x: + version "0.9.1" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-0.9.1.tgz#3d322462badf07716ea7eb85baf88079cddce505" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +homedir-polyfill@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" + +hosted-git-info@^2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + +html-minifier@~0.6.0: + version "0.6.9" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-0.6.9.tgz#5105dc236f5e7e1a8ba651d4ab981386fc7abe53" + dependencies: + change-case "2.1.x" + clean-css "2.2.x" + cli "0.6.x" + relateurl "0.2.x" + uglify-js "2.4.x" + +htmlparser2@3.8.x: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-errors@~1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.5.1.tgz#788c0d2c1de2c81b9e6e8c01843b6b97eb920750" + dependencies: + inherits "2.0.3" + setprototypeof "1.0.2" + statuses ">= 1.3.1 < 2" + +http-proxy@1.15.1: + version "1.15.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.15.1.tgz#91a6088172e79bc0e821d5eb04ce702f32446393" + dependencies: + eventemitter3 "1.x.x" + requires-port "1.x.x" + +http-signature@~0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-0.10.1.tgz#4fbdac132559aa8323121e540779c0a012b27e66" + dependencies: + asn1 "0.1.11" + assert-plus "^0.1.5" + ctype "0.5.3" + +http-signature@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-0.11.0.tgz#1796cf67a001ad5cd6849dca0991485f09089fe6" + dependencies: + asn1 "0.1.11" + assert-plus "^0.1.5" + ctype "0.5.3" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +imagemin-gifsicle@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-4.2.0.tgz#0fef9bbad3476e6b76885736cc5b0b87a08757ca" + dependencies: + gifsicle "^3.0.0" + is-gif "^1.0.0" + through2 "^0.6.1" + +imagemin-jpegtran@^4.0.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-4.3.2.tgz#1bc6d1e2bd13fdb64d245526d635a7e5dfeb12fc" + dependencies: + is-jpg "^1.0.0" + jpegtran-bin "^3.0.0" + through2 "^2.0.0" + +imagemin-optipng@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-4.3.0.tgz#7604663ab2ee315733274726fd1c374d2b44adb6" + dependencies: + exec-buffer "^2.0.0" + is-png "^1.0.0" + optipng-bin "^3.0.0" + through2 "^0.6.1" + +imagemin-svgo@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-4.2.1.tgz#54f07dc56f47260462df6a61c54befb44b57be55" + dependencies: + is-svg "^1.0.0" + svgo "^0.6.0" + through2 "^2.0.0" + +imagemin@^3.0.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-3.2.2.tgz#17a8ad67e0e8ee6ae1ae0c5cb752b26579452366" + dependencies: + buffer-to-vinyl "^1.0.0" + concat-stream "^1.4.6" + get-stdin "^4.0.1" + meow "^3.3.0" + optional "^0.1.0" + path-exists "^1.0.0" + readable-stream "^2.0.0" + stream-combiner2 "^1.1.1" + vinyl-fs "^1.0.0" + optionalDependencies: + imagemin-gifsicle "^4.0.0" + imagemin-jpegtran "^4.0.0" + imagemin-optipng "^4.0.0" + imagemin-svgo "^4.0.0" + +immutable@3.8.1, immutable@^3.7.6: + version "3.8.1" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2" + +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4, ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +interpret@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +ip-regex@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd" + +is-absolute-url@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-1.0.0.tgz#2d7ef0fd0bb2a88dac7e92253c6808a0ace24bfb" + +is-absolute@^0.1.5: + version "0.1.7" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.1.7.tgz#847491119fccb5fb436217cc737f7faad50f603f" + dependencies: + is-relative "^0.1.0" + +is-absolute@^0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.0.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-bzip2@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-bzip2/-/is-bzip2-1.0.0.tgz#5ee58eaa5a2e9c80e21407bedf23ae5ac091b3fc" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.0.tgz#33411a482b046bf95e6b0cb27ee2711af4cf15ad" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-gif@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-1.0.0.tgz#a6d2ae98893007bffa97a1d8c01d63205832097e" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-gzip@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83" + +is-jpg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-1.0.0.tgz#2959c17e73430db38264da75b90dd54f2d86da1c" + +is-lower-case@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + dependencies: + lower-case "^1.1.0" + +is-my-json-valid@^2.12.4: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-natural-number@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-2.1.1.tgz#7d4c5728377ef386c3e194a9911bf57c6dc335e7" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-png@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.0.0.tgz#3d80373fe9b89d65fd341f659d3fc0a1135e718a" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-redirect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + +is-relative-url@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-relative-url/-/is-relative-url-1.0.0.tgz#87a9d35e8a789b49e079b4d7d69d64612e8e0e1f" + dependencies: + is-absolute-url "^1.0.0" + +is-relative@^0.1.0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.1.3.tgz#905fee8ae86f45b3ec614bc3c15c869df0876e82" + +is-relative@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + +is-retry-allowed@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-svg@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-1.1.1.tgz#ac0efaafb653ac58473708b1f873636ca110e31b" + +is-tar@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-tar/-/is-tar-1.0.0.tgz#2f6b2e1792c1f5bb36519acaa9d65c0d26fe853d" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-unc-path@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.1.tgz#ab2533d77ad733561124c3dc0f5cd8b90054c86b" + dependencies: + unc-path-regex "^0.1.0" + +is-upper-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + dependencies: + upper-case "^1.1.0" + +is-url@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.2.tgz#498905a593bf47cc2d9e7f738372bbf7696c7f26" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-valid-glob@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe" + +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + +is-zip@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-zip/-/is-zip-1.0.0.tgz#47b0a8ff4d38a76431ccfd99a8e15a4c86ba2325" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" + +"isobject@>=2.0.0 <3.0.0-0", isobject@^2.0.0, isobject@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-1.0.2.tgz#f0f9b8ce92dd540fa0740882e3835a2e022ec78a" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +jpegtran-bin@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-3.1.0.tgz#e6541eba8d97448282a1f8f80a1b6cc9feea55d0" + dependencies: + bin-build "^2.0.0" + bin-wrapper "^3.0.0" + logalot "^2.0.0" + +js-base64@~2.1.8: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +js-yaml@~3.6.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + +jshint-stylish@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jshint-stylish/-/jshint-stylish-1.0.2.tgz#e99f3cc340afb18e2a7702f8798d7400ca31446a" + dependencies: + chalk "^1.0.0" + log-symbols "^1.0.0" + string-length "^1.0.0" + text-table "^0.2.0" + +jshint@^2.7.0: + version "2.9.4" + resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.9.4.tgz#5e3ba97848d5290273db514aee47fe24cf592934" + dependencies: + cli "~1.0.0" + console-browserify "1.1.x" + exit "0.1.x" + htmlparser2 "3.8.x" + lodash "3.7.x" + minimatch "~3.0.2" + shelljs "0.3.x" + strip-json-comments "1.0.x" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.0, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.2.6.tgz#f6efc93c06a04de9aec53053df2559bb19e2038b" + +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" + +jsprim@^1.2.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + dependencies: + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +kew@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + +kind-of@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.0.4.tgz#7b8ecf18a4e17f8269d73b501c9f232c96887a74" + dependencies: + is-buffer "^1.0.2" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +lazy-req@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-1.1.0.tgz#bdaebead30f8d824039ce0ce149d4daa07ba1fac" + +lazystream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" + dependencies: + readable-stream "^2.0.5" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +liftoff@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" + dependencies: + extend "^3.0.0" + findup-sync "^0.4.2" + fined "^1.0.1" + flagged-respawn "^0.3.2" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.mapvalues "^4.4.0" + rechoir "^0.6.2" + resolve "^1.1.7" + +limiter@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.0.tgz#6e2bd12ca3fcdaa11f224e2e53c896df3f08d913" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +localtunnel@1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/localtunnel/-/localtunnel-1.8.1.tgz#d51b2bb7a7066afb05b57fc9db844015098f2e17" + dependencies: + debug "2.2.0" + openurl "1.1.0" + request "2.65.0" + yargs "3.29.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._escapehtmlchar@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz#df67c3bb6b7e8e1e831ab48bfa0795b92afe899d" + dependencies: + lodash._htmlescapes "~2.4.1" + +lodash._escapestringchar@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz#ecfe22618a2ade50bfeea43937e51df66f0edb72" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._htmlescapes@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz#32d14bf0844b6de6f8b62a051b4f67c228b624cb" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._isnative@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._isnative/-/lodash._isnative-2.4.1.tgz#3ea6404b784a7be836c7b57580e1cdf79b14832c" + +lodash._objecttypes@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz#7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^2.4.1, lodash._reinterpolate@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz#4f1227aa5a8711fc632f5b07a1f4607aab8b3222" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._reunescapedhtml@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz#747c4fc40103eb3bb8a0976e571f7a2659e93ba7" + dependencies: + lodash._htmlescapes "~2.4.1" + lodash.keys "~2.4.1" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash._shimkeys@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz#6e9cc9666ff081f0b5a6c978b83e242e6949d203" + dependencies: + lodash._objecttypes "~2.4.1" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.assignwith@^4.0.7: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" + +lodash.clonedeep@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + +lodash.defaults@^2.4.1, lodash.defaults@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.4.1.tgz#a7e8885f05e68851144b6e12a8f3678026bc4c54" + dependencies: + lodash._objecttypes "~2.4.1" + lodash.keys "~2.4.1" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.escape@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-2.4.1.tgz#2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4" + dependencies: + lodash._escapehtmlchar "~2.4.1" + lodash._reunescapedhtml "~2.4.1" + lodash.keys "~2.4.1" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isempty@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" + +lodash.isequal@^4.0.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.4.0.tgz#6295768e98e14dc15ce8d362ef6340db82852031" + +lodash.isobject@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-2.4.1.tgz#5a2e47fe69953f1ee631a7eba1fe64d2d06558f5" + dependencies: + lodash._objecttypes "~2.4.1" + +lodash.isplainobject@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.keys@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-2.4.1.tgz#48dea46df8ff7632b10d706b8acb26591e2b3727" + dependencies: + lodash._isnative "~2.4.1" + lodash._shimkeys "~2.4.1" + lodash.isobject "~2.4.1" + +lodash.mapvalues@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-2.4.1.tgz#9e611007edf629129a974ab3c48b817b3e1cf20d" + dependencies: + lodash._escapestringchar "~2.4.1" + lodash._reinterpolate "~2.4.1" + lodash.defaults "~2.4.1" + lodash.escape "~2.4.1" + lodash.keys "~2.4.1" + lodash.templatesettings "~2.4.1" + lodash.values "~2.4.1" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash.templatesettings@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz#ea76c75d11eb86d4dbe89a83893bb861929ac699" + dependencies: + lodash._reinterpolate "~2.4.1" + lodash.escape "~2.4.1" + +lodash.values@~2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-2.4.1.tgz#abf514436b3cb705001627978cbcf30b1280eea4" + dependencies: + lodash.keys "~2.4.1" + +lodash@3.7.x: + version "3.7.0" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.7.0.tgz#3678bd8ab995057c07ade836ed2ef087da811d45" + +lodash@^2.4.1, lodash@~2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" + +lodash@^3.0.1, lodash@^3.10.1, lodash@^3.3.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.0.0, lodash@^4.14.0: + version "4.17.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" + +lodash@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" + +lodash@~4.16.4: + version "4.16.6" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" + +log-symbols@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + dependencies: + chalk "^1.0.0" + +logalot@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" + dependencies: + figures "^1.3.5" + squeak "^1.0.0" + +longest@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lower-case@^1.0.0, lower-case@^1.1.0, lower-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.3.tgz#c92393d976793eee5ba4edb583cf8eae35bd9bfb" + +lowercase-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" + +lpad-align@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.0.tgz#27fa786bcb695fc434ea1500723eb8d0bdc82bf4" + dependencies: + get-stdin "^4.0.1" + longest "^1.0.0" + lpad "^2.0.1" + meow "^3.3.0" + +lpad@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/lpad/-/lpad-2.0.1.tgz#28316b4e7b2015f511f6591459afc0e5944008ad" + +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +lru-cache@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + +map-cache@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +map-stream@^0.1.0, map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + +memory-cache@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/memory-cache/-/memory-cache-0.0.5.tgz#dbf99a56d7362c43eccaf39f0ba6f97f31a06786" + +meow@^3.1.0, meow@^3.3.0, meow@^3.5.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-stream@0.1.8, merge-stream@^0.1.7, merge-stream@~0.1.6: + version "0.1.8" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-0.1.8.tgz#48a07b3b4a121d74a3edbfdcdb4b08adbf0240b1" + dependencies: + through2 "^0.6.1" + +merge-stream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + +micromatch@2.3.11, micromatch@^2.1.5, micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" + +mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.7: + version "2.1.13" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" + dependencies: + mime-db "~1.25.0" + +mime@1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.4.tgz#11b5fdaf29c2509255176b80ad520294f5de92b7" + +mime@1.3.4, "mime@>= 0.0.1": + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + +mime@~1.2.11, mime@~1.2.9: + version "1.2.11" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10" + +minimatch@0.3: + version "0.3.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimatch@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-1.0.0.tgz#e0dd2120b49e1b724ce8d714c520822a9438576d" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimatch@^2.0.1: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + +minimatch@~0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimist@0.0.8, minimist@~0.0.1: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.2.0.tgz#4dffe525dae2b864c66c2e23c6271d7afdecefce" + +minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" + +mkdirp@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mout@~0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/mout/-/mout-0.9.1.tgz#84f0f3fd6acc7317f63de2affdcc0cee009b0477" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +multimatch@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.0.0.tgz#c5ada425357b744ba54842ebdce1c8f0be542b6f" + dependencies: + array-differ "^1.0.0" + array-union "^1.0.1" + minimatch "^2.0.1" + +multimatch@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" + dependencies: + array-differ "^1.0.0" + array-union "^1.0.1" + arrify "^1.0.0" + minimatch "^3.0.0" + +multipipe@^0.1.0, multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +nan@^2.3.0, nan@^2.3.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" + +natives@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +node-gyp@^3.3.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.4.0.tgz#dda558393b3ecbbe24c9e6b8703c71194c63fa36" + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + minimatch "^3.0.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3" + osenv "0" + path-array "^1.0.0" + request "2" + rimraf "2" + semver "2.x || 3.x || 4 || 5" + tar "^2.0.0" + which "1" + +node-phantom-simple@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/node-phantom-simple/-/node-phantom-simple-1.2.0.tgz#999a5510780ffe68011c69697e1fb063fcb20ae5" + +node-pre-gyp@^0.6.29: + version "0.6.32" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" + dependencies: + mkdirp "~0.5.1" + nopt "~3.0.6" + npmlog "^4.0.1" + rc "~1.1.6" + request "^2.79.0" + rimraf "~2.5.4" + semver "~5.3.0" + tar "~2.2.1" + tar-pack "~3.3.0" + +node-sass@^3.4.1: + version "3.13.0" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-3.13.0.tgz#d08b95bdebf40941571bd2c16a9334b980f8924f" + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash.assign "^4.2.0" + lodash.clonedeep "^4.3.2" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.3.2" + node-gyp "^3.3.1" + npmlog "^4.0.0" + request "^2.61.0" + sass-graph "^2.1.1" + +node-status-codes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f" + +node-useref@^0.3.1: + version "0.3.15" + resolved "https://registry.yarnpkg.com/node-useref/-/node-useref-0.3.15.tgz#a8c5dc137458f15775ee7137b2a6ed87c7f081e5" + +node-uuid@~1.4.0, node-uuid@~1.4.3, node-uuid@~1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" + +"nopt@2 || 3", nopt@3.0.x, nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + +"npmlog@0 || 1 || 2 || 3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-3.1.2.tgz#2d46fa874337af9498a2f12bb43d8d0be4a36873" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.6.0" + set-blocking "~2.0.0" + +npmlog@^4.0.0, npmlog@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.1.tgz#d14f503b4cd79710375553004ba96e6662fbc0b8" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + set-blocking "~2.0.0" + +num2fraction@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.3.0.tgz#cb540f93bb2b22a7d5941691a288d60e8ea9386e" + +oauth-sign@~0.8.0, oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + +object-path@^0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.9.2.tgz#0fd9a74fc5fad1ae3968b586bda5c632bd6c05a5" + +object.omit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-1.1.0.tgz#9d17ea16778e5057deba7752c6f55f1496829e94" + dependencies: + for-own "^0.1.3" + isobject "^1.0.0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.2.0.tgz#b5392bee9782da6d9fb7d6afaf539779f1234c2b" + dependencies: + isobject "^2.1.0" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.0, once@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +openurl@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/openurl/-/openurl-1.1.0.tgz#e2f2189d999c04823201f083f0f1a7cd8903187a" + +opn@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +optimist@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optional@^0.1.0: + version v0.1.3 + resolved "https://registry.yarnpkg.com/optional/-/optional-0.1.3.tgz#f87537517b59a5e732cfd8f18e4f7eea7ab4761e" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + +optipng-bin@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-3.1.2.tgz#18c5a3388ed5d6f1e6ef1998ab0a6bcc8bdd0ca0" + dependencies: + bin-build "^2.0.0" + bin-wrapper "^3.0.0" + logalot "^2.0.0" + +orchestrator@^0.3.0: + version "0.3.8" + resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" + dependencies: + end-of-stream "~0.1.5" + sequencify "~0.0.7" + stream-consume "~0.1.0" + +ordered-read-streams@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" + +ordered-read-streams@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b" + dependencies: + is-stream "^1.0.1" + readable-stream "^2.0.1" + +os-filter-obj@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-1.0.3.tgz#5915330d90eced557d2d938a31c6dd214d9c63ad" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@0, osenv@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.0.3.tgz#cd6ad8ddb290915ad9e22765576025d411f29cb6" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +param-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-1.1.2.tgz#dcb091a43c259b9228f1c341e7b6a44ea0bf9743" + dependencies: + sentence-case "^1.1.2" + +parse-filepath@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" + dependencies: + is-absolute "^0.2.3" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.1.0, parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + +parsejson@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.1.tgz#9b10c6c0d825ab589e685153826de0a3ba278bcc" + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.2.tgz#9dfe70b2cddac388bde4f35b1f240fa58adbe6c7" + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.4.tgz#806582a39887e1ea18dd5e2fe0e01902268e9350" + dependencies: + better-assert "~1.0.0" + +parseurl@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +pascal-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-1.1.2.tgz#3e5d64a20043830a7c49344c2d74b41be0c9c99b" + dependencies: + camel-case "^1.1.1" + upper-case-first "^1.1.0" + +path-array@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-array/-/path-array-1.0.1.tgz#7e2f0f35f07a2015122b868b7eac0eb2c4fec271" + dependencies: + array-index "^1.0.0" + +path-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-1.1.2.tgz#50ce6ba0d3bed3dd0b5c2a9c4553697434409514" + dependencies: + sentence-case "^1.1.2" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + +path-exists@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-1.0.0.tgz#d5a8998eb71ef37a74c34eb0d9eba6e878eea081" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + dependencies: + path-root-regex "^0.1.0" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + dependencies: + through "~2.3" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +phantomjs@~1.9.7-1: + version "1.9.20" + resolved "https://registry.yarnpkg.com/phantomjs/-/phantomjs-1.9.20.tgz#4424aca20e14d255c0b0889af6f6b8973da10e0d" + dependencies: + extract-zip "~1.5.0" + fs-extra "~0.26.4" + hasha "^2.2.0" + kew "~0.7.0" + progress "~1.1.8" + request "~2.67.0" + request-progress "~2.0.1" + which "~1.2.2" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +plexer@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/plexer/-/plexer-0.0.3.tgz#334d1d7cd6232465417e9a66364901f29230f531" + dependencies: + readable-stream "^1.0.26-2" + +plur@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/plur/-/plur-1.0.0.tgz#db85c6814f5e5e5a3b49efc28d604fec62975156" + +portscanner@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-1.2.0.tgz#b14bbda257d14c310fa9cc09682af02d40961802" + dependencies: + async "1.5.2" + +postcss@^4.1.5, postcss@~4.1.12: + version "4.1.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-4.1.16.tgz#4c449b4c8af9df3caf6d37f8e1e575d0361758dc" + dependencies: + es6-promise "~2.3.0" + js-base64 "~2.1.8" + source-map "~0.4.2" + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-bytes@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-2.0.1.tgz#155ec4d0036f41391e7045d6dbe4963d525d264f" + dependencies: + get-stdin "^4.0.1" + meow "^3.1.0" + number-is-nan "^1.0.0" + +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + +process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +progress@~1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +propprop@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/propprop/-/propprop-0.3.1.tgz#a049a3568b896440067d15d8ec9f33735e570178" + +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +q@^1.1.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + +qs@0.4.x: + version "0.4.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-0.4.2.tgz#3cac4c861e371a8c9c4770ac23cda8de639b8e5f" + +qs@6.2.1, "qs@>= 0.4.0": + version "6.2.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625" + +qs@~0.6.0: + version "0.6.6" + resolved "https://registry.yarnpkg.com/qs/-/qs-0.6.6.tgz#6e015098ff51968b8a3c819001d5f2c89bc4b107" + +qs@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.1.tgz#801fee030e0b9450d6385adc48a4cc55b44aedfc" + +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +rc@^1.1.2, rc@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~1.0.4" + +rcfinder@~0.1.6: + version "0.1.9" + resolved "https://registry.yarnpkg.com/rcfinder/-/rcfinder-0.1.9.tgz#f3e80f387ddf9ae80ae30a4100329642eae81115" + dependencies: + lodash.clonedeep "^4.3.2" + +rcloader@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/rcloader/-/rcloader-0.1.2.tgz#a0963a6437d09ef8cb92d932d2dad497b0d1736c" + dependencies: + lodash "~2.4.1" + rcfinder "~0.1.6" + +read-all-stream@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa" + dependencies: + pinkie-promise "^2.0.0" + readable-stream "^2.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@1.1, readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@^1.0.26-2, readable-stream@~1.0.17: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.5: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.0.0, readable-stream@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + +request-progress@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" + dependencies: + throttleit "^1.0.0" + +request@2, request@2.65.0, request@^2.61.0: + version "2.65.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.65.0.tgz#cc1a3bc72b96254734fc34296da322f9486ddeba" + dependencies: + aws-sign2 "~0.6.0" + bl "~1.0.0" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~1.0.0-rc3" + har-validator "~2.0.2" + hawk "~3.1.0" + http-signature "~0.11.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.3" + oauth-sign "~0.8.0" + qs "~5.2.0" + stringstream "~0.0.4" + tough-cookie "~2.2.0" + tunnel-agent "~0.4.1" + +request@^2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +request@~2.34.0: + version "2.34.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.34.0.tgz#b5d8b9526add4a2d4629f4d417124573996445ae" + dependencies: + forever-agent "~0.5.0" + json-stringify-safe "~5.0.0" + mime "~1.2.9" + node-uuid "~1.4.0" + qs "~0.6.0" + optionalDependencies: + aws-sign2 "~0.5.0" + form-data "~0.1.0" + hawk "~1.0.0" + http-signature "~0.10.0" + oauth-sign "~0.3.0" + tough-cookie ">=0.12.0" + tunnel-agent "~0.3.0" + +request@~2.67.0: + version "2.67.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.67.0.tgz#8af74780e2bf11ea0ae9aa965c11f11afd272742" + dependencies: + aws-sign2 "~0.6.0" + bl "~1.0.0" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~1.0.0-rc3" + har-validator "~2.0.2" + hawk "~3.1.0" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.0" + qs "~5.2.0" + stringstream "~0.0.4" + tough-cookie "~2.2.0" + tunnel-agent "~0.4.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +requires-port@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + +resolve@^1.1.6, resolve@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resp-modifier@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/resp-modifier/-/resp-modifier-6.0.2.tgz#b124de5c4fbafcba541f48ffa73970f4aa456b4f" + dependencies: + debug "^2.2.0" + minimatch "^3.0.2" + +rimraf@2, rimraf@^2.2.6, rimraf@^2.2.8, rimraf@^2.4.0, rimraf@^2.4.3, rimraf@~2.5.1, rimraf@~2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +rimraf@~2.2.6: + version "2.2.8" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" + +rx@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" + +samsam@~1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.3.tgz#9f5087419b4d091f232571e7fa52e90b0f552621" + +sass-graph@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.1.2.tgz#965104be23e8103cb7e5f710df65935b317da57b" + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + yargs "^4.7.1" + +sax@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + +seek-bzip@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" + dependencies: + commander "~2.8.1" + +semver-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" + +semver-truncate@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" + dependencies: + semver "^5.3.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +"semver@2.x || 3.x || 4 || 5", semver@^4.0.3, semver@^4.1.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +send@0.14.1: + version "0.14.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.14.1.tgz#a954984325392f51532a7760760e459598c89f7a" + dependencies: + debug "~2.2.0" + depd "~1.1.0" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.7.0" + fresh "0.3.0" + http-errors "~1.5.0" + mime "1.3.4" + ms "0.7.1" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.0" + +sentence-case@^1.0.0, sentence-case@^1.1.1, sentence-case@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-1.1.3.tgz#8034aafc2145772d3abe1509aa42c9e1042dc139" + dependencies: + lower-case "^1.1.1" + +sequencify@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" + +serve-index@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.8.0.tgz#7c5d96c13fb131101f93c1c5774f8516a1e78d3b" + dependencies: + accepts "~1.3.3" + batch "0.5.3" + debug "~2.2.0" + escape-html "~1.0.3" + http-errors "~1.5.0" + mime-types "~2.1.11" + parseurl "~1.3.1" + +serve-static@1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.11.1.tgz#d6cce7693505f733c759de57befc1af76c0f0805" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.1" + send "0.14.1" + +server-destroy@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.0, set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setprototypeof@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.2.tgz#81a552141ec104b88e89ce383103ad5c66564d08" + +shelljs@0.3.x: + version "0.3.0" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" + +sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +sinon@~1.10.2: + version "1.10.3" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-1.10.3.tgz#c063e0e99d8327dc199113aab52eb83a2e9e3c2c" + dependencies: + formatio "~1.0" + util ">=0.10.3 <1" + +snake-case@^1.0.0, snake-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-1.1.2.tgz#0c2f25e305158d9a18d3d977066187fef8a5a66a" + dependencies: + sentence-case "^1.1.2" + +sntp@0.2.x: + version "0.2.4" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-0.2.4.tgz#fb885f18b0f3aad189f824862536bceeec750900" + dependencies: + hoek "0.9.x" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +socket.io-adapter@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.4.0.tgz#fb9f82ab1aa65290bf72c3657955b930a991a24f" + dependencies: + debug "2.2.0" + socket.io-parser "2.2.2" + +socket.io-client@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.5.0.tgz#08232d0adb5a665a7c24bd9796557a33f58f38ae" + dependencies: + backo2 "1.0.2" + component-bind "1.0.0" + component-emitter "1.2.0" + debug "2.2.0" + engine.io-client "1.7.0" + has-binary "0.1.7" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.4" + socket.io-parser "2.2.6" + to-array "0.1.4" + +socket.io-parser@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.2.2.tgz#3d7af6b64497e956b7d9fe775f999716027f9417" + dependencies: + benchmark "1.0.0" + component-emitter "1.1.2" + debug "0.7.4" + isarray "0.0.1" + json3 "3.2.6" + +socket.io-parser@2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.2.6.tgz#38dfd61df50dcf8ab1d9e2091322bf902ba28b99" + dependencies: + benchmark "1.0.0" + component-emitter "1.1.2" + debug "2.2.0" + isarray "0.0.1" + json3 "3.3.2" + +socket.io@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.5.0.tgz#024dd9719d9267d6a6984eebe2ab5ceb9a0b8a98" + dependencies: + debug "2.2.0" + engine.io "1.7.0" + has-binary "0.1.7" + socket.io-adapter "0.4.0" + socket.io-client "1.5.0" + socket.io-parser "2.2.6" + +source-map@0.1.34: + version "0.1.34" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.34.tgz#a7cfe89aec7b1682c3b198d0acfb47d7d090566b" + dependencies: + amdefine ">=0.0.4" + +"source-map@>=0.1.43 <0.2", source-map@^0.1.39, source-map@~0.1.31: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.1, source-map@^0.5.3: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +split@0.2: + version "0.2.10" + resolved "https://registry.yarnpkg.com/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57" + dependencies: + through "2" + +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + dependencies: + through "2" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +squeak@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3" + dependencies: + chalk "^1.0.0" + console-stream "^0.1.1" + lpad-align "^1.0.1" + +sshpk@^1.7.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stat-mode@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stream-combiner2@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + dependencies: + duplexer2 "~0.1.0" + readable-stream "^2.0.2" + +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + dependencies: + duplexer "~0.1.1" + +stream-consume@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +stream-throttle@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/stream-throttle/-/stream-throttle-0.1.3.tgz#add57c8d7cc73a81630d31cd55d3961cfafba9c3" + dependencies: + commander "^2.2.0" + limiter "^1.0.5" + +stream-to-array@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-to-array/-/stream-to-array-1.0.0.tgz#94166bb29f3ea24f082d2f8cd3ebb2cc0d6eca2c" + +string-length@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220" + dependencies: + ansi-regex "^0.2.1" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" + +strip-bom-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee" + dependencies: + first-chunk-stream "^1.0.0" + strip-bom "^2.0.0" + +strip-bom@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" + dependencies: + first-chunk-stream "^1.0.0" + is-utf8 "^0.2.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-dirs@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-1.1.1.tgz#960bbd1287844f3975a4558aa103a8255e2456a0" + dependencies: + chalk "^1.0.0" + get-stdin "^4.0.1" + is-absolute "^0.1.5" + is-natural-number "^2.0.0" + minimist "^1.1.0" + sum-up "^1.0.1" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@1.0.x, strip-json-comments@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +strip-outer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.0.tgz#aac0ba60d2e90c5d4f275fd8869fd9a2d310ffb8" + dependencies: + escape-string-regexp "^1.0.2" + +sum-up@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e" + dependencies: + chalk "^1.0.0" + +supports-color@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +svgo@^0.6.0: + version "0.6.6" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.6.6.tgz#b340889036f20f9b447543077d0f5573ed044c08" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.0.0" + js-yaml "~3.6.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +swap-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + +tar-pack@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" + dependencies: + debug "~2.2.0" + fstream "~1.0.10" + fstream-ignore "~1.0.5" + once "~1.3.3" + readable-stream "~2.1.4" + rimraf "~2.5.1" + tar "~2.2.1" + uid-number "~0.0.6" + +tar-stream@^1.1.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.5.2.tgz#fbc6c6e83c1a19d4cb48c7d96171fc248effc7bf" + dependencies: + bl "^1.0.0" + end-of-stream "^1.0.0" + readable-stream "^2.0.0" + xtend "^4.0.0" + +tar@^2.0.0, tar@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +temp@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" + dependencies: + os-tmpdir "^1.0.0" + rimraf "~2.2.6" + +tempfile@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + +ternary-stream@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/ternary-stream/-/ternary-stream-1.2.3.tgz#f1969f83847f9642261bc142e17ee200aada83fd" + dependencies: + duplexer2 "~0.0.2" + fork-stream "~0.0.4" + merge-stream "~0.1.6" + through2 "~0.6.3" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +tfunk@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/tfunk/-/tfunk-3.0.2.tgz#327ebc6176af2680c6cd0d6d22297c79d7f96efd" + dependencies: + chalk "^1.1.1" + object-path "^0.9.0" + +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + +through2-concurrent@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/through2-concurrent/-/through2-concurrent-1.1.1.tgz#11cb4ea4c9e31bca6e4c1e6dba48d1c728c3524b" + dependencies: + through2 "^2.0.0" + +through2-filter@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +"through2@>=2.0.0 <3.0.0-0", through2@^2.0.0, through2@^2.0.1, through2@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through2@^0.4.1, through2@~0.4.0, through2@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b" + dependencies: + readable-stream "~1.0.17" + xtend "~2.1.1" + +through2@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.5.1.tgz#dfdd012eb9c700e2323fd334f38ac622ab372da7" + dependencies: + readable-stream "~1.0.17" + xtend "~3.0.0" + +through2@^0.6.0, through2@^0.6.1, through2@^0.6.2, through2@^0.6.3, through2@^0.6.5, through2@~0.6, through2@~0.6.1, through2@~0.6.2, through2@~0.6.3: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +through@2, through@~2.3, through@~2.3.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +thunks@^3.5.0: + version "3.5.2" + resolved "https://registry.yarnpkg.com/thunks/-/thunks-3.5.2.tgz#eea861ba52b8f7ff359b7d7cf6b8a608c7eba6bf" + +tildify@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + +timed-out@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.0.0.tgz#ff88de96030ce960eabd42487db61d3add229273" + +title-case@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-1.1.2.tgz#fae4a6ae546bfa22d083a0eea910a40d12ed4f5a" + dependencies: + sentence-case "^1.1.1" + upper-case "^1.0.3" + +to-absolute-glob@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" + dependencies: + extend-shallow "^2.0.1" + +to-array@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + +tough-cookie@>=0.12.0, tough-cookie@~2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.2.2.tgz#c83a1830f4e5ef0b93ef2a3488e724f8de016ac7" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-repeated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" + dependencies: + escape-string-regexp "^1.0.2" + +try-json-parse@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/try-json-parse/-/try-json-parse-0.1.1.tgz#8db01622e877e51b83140caee7c80864ad390c82" + +tunnel-agent@^0.4.0, tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tunnel-agent@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.3.0.tgz#ad681b68f5321ad2827c4cfb1b7d5df2cfe942ee" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.4" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.4.tgz#8c9dbfb52795686f166cd2023794bcf103d13c2b" + +typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +ua-parser-js@0.7.10: + version "0.7.10" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.10.tgz#917559ddcce07cbc09ece7d80495e4c268f4ef9f" + +uglify-js@2.4.24, uglify-js@2.4.x: + version "2.4.24" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.4.24.tgz#fad5755c1e1577658bb06ff9ab6e548c95bebd6e" + dependencies: + async "~0.2.6" + source-map "0.1.34" + uglify-to-browserify "~1.0.0" + yargs "~3.5.4" + +"uglify-save-license@>=0.4.1 <0.5.0-0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uid-number@~0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + +uncss@0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/uncss/-/uncss-0.8.1.tgz#2bb5aa8e77af342178adf36f69b18ae2cc551063" + dependencies: + async "~0.6.2" + commander "~2.2.0" + css "~1.6.0" + node-phantom-simple "~1.2.0" + phantomjs "~1.9.7-1" + request "~2.34.0" + underscore "~1.6.0" + +underscore@1.7.x: + version "1.7.0" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" + +underscore@1.x.x, underscore@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" + +unique-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" + +unique-stream@^2.0.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369" + dependencies: + json-stable-stringify "^1.0.0" + through2-filter "^2.0.0" + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +unzip-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" + +upper-case-first@^1.0.0, upper-case-first@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.0, upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + dependencies: + prepend-http "^1.0.1" + +url-regex@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-3.2.0.tgz#dbad1e0c9e29e105dd0b1f09f6862f7fdb482724" + dependencies: + ip-regex "^1.0.1" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +"util@>=0.10.3 <1": + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +v8flags@^2.0.2: + version "2.0.11" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" + dependencies: + user-home "^1.1.1" + +vali-date@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vinyl-assign@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/vinyl-assign/-/vinyl-assign-1.2.1.tgz#4d198891b5515911d771a8cd9c5480a46a074a45" + dependencies: + object-assign "^4.0.1" + readable-stream "^2.0.0" + +vinyl-fs@^0.3.0: + version "0.3.14" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" + dependencies: + defaults "^1.0.0" + glob-stream "^3.1.5" + glob-watcher "^0.0.6" + graceful-fs "^3.0.0" + mkdirp "^0.5.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl-fs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-1.0.0.tgz#d15752e68c2dad74364e7e853473735354692edf" + dependencies: + duplexify "^3.2.0" + glob-stream "^4.0.1" + glob-watcher "^0.0.8" + graceful-fs "^3.0.0" + merge-stream "^0.1.7" + mkdirp "^0.5.0" + object-assign "^2.0.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl-fs@^2.2.0, vinyl-fs@^2.2.1: + version "2.4.4" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239" + dependencies: + duplexify "^3.2.0" + glob-stream "^5.3.2" + graceful-fs "^4.0.0" + gulp-sourcemaps "1.6.0" + is-valid-glob "^0.3.0" + lazystream "^1.0.0" + lodash.isequal "^4.0.0" + merge-stream "^1.0.0" + mkdirp "^0.5.0" + object-assign "^4.0.0" + readable-stream "^2.0.4" + strip-bom "^2.0.0" + strip-bom-stream "^1.0.0" + through2 "^2.0.0" + through2-filter "^2.0.0" + vali-date "^1.0.0" + vinyl "^1.0.0" + +"vinyl-sourcemaps-apply@>=0.1.1 <0.2.0-0", vinyl-sourcemaps-apply@^0.1.3, vinyl-sourcemaps-apply@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.1.4.tgz#c5fcbd43e2f238423c2dc98bddd6f79b72bc345b" + dependencies: + source-map "^0.1.39" + +vinyl-sourcemaps-apply@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.2.3.tgz#bca938209582ec5a49ad538a00fa1f125e513252" + dependencies: + clone-stats "~0.0.1" + +vinyl@^0.4.0, vinyl@^0.4.3: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.1.tgz#1c3b4931e7ac4c1efee743f3b91a74c094407bb6" + dependencies: + clone "^1.0.0" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + is-stream "^1.1.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + +ware@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ware/-/ware-1.3.0.tgz#d1b14f39d2e2cb4ab8c4098f756fe4b164e473d4" + dependencies: + wrap-fn "^0.1.0" + +weinre@^2.0.0-pre-I0Z7U9OV: + version "2.0.0-pre-I0Z7U9OV" + resolved "https://registry.yarnpkg.com/weinre/-/weinre-2.0.0-pre-I0Z7U9OV.tgz#fef8aa223921f7b40bbbbd4c3ed4302f6fd0a813" + dependencies: + express "2.5.x" + nopt "3.0.x" + underscore "1.7.x" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@1, which@^1.0.8, which@^1.2.12, which@^1.2.9, which@~1.2.2: + version "1.2.12" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + dependencies: + isexe "^1.1.1" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +window-size@^0.1.2: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + +wiredep@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/wiredep/-/wiredep-2.2.2.tgz#1444d18ab2e49375041093feddddd1b68f7b66b3" + dependencies: + bower-config "^0.5.0" + chalk "^0.5.1" + glob "^4.0.5" + lodash "^2.4.1" + minimist "^1.1.0" + propprop "^0.3.0" + through2 "^0.6.1" + +wordwrap@0.0.2, wordwrap@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-fn@^0.1.0: + version "0.1.5" + resolved "https://registry.yarnpkg.com/wrap-fn/-/wrap-fn-0.1.5.tgz#f21b6e41016ff4a7e31720dbc63a09016bdf9845" + dependencies: + co "3.1.0" + +wrap-promise@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wrap-promise/-/wrap-promise-1.0.1.tgz#b019f4236ccbf1fb560921b4b4870b7bda2f5255" + dependencies: + es6-promise "^2.3.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +ws@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018" + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +wtf-8@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" + +xmlhttprequest-ssl@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.1.tgz#3b7741fea4a86675976e908d296d4445961faa67" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + dependencies: + object-keys "~0.4.0" + +xtend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a" + +y18n@^3.2.0, y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-parser@^4.0.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.0.tgz#6ced869cd05a3dca6a1eaee38b68aeed4b0b4101" + dependencies: + camelcase "^3.0.0" + +yargs@3.29.0: + version "3.29.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.29.0.tgz#1aab9660eae79d8b8f675bcaeeab6ee34c2cf69c" + dependencies: + camelcase "^1.2.1" + cliui "^3.0.3" + decamelize "^1.0.0" + os-locale "^1.4.0" + window-size "^0.1.2" + y18n "^3.2.0" + +yargs@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.0.0.tgz#900479df4e8bf6ab0e87216f5ed2b2760b968345" + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^4.0.2" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yargs@~3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.5.4.tgz#d8aff8f665e94c34bd259bdebd1bfaf0ddd35361" + dependencies: + camelcase "^1.0.2" + decamelize "^1.0.0" + window-size "0.1.0" + wordwrap "0.0.2" + +yauzl@2.4.1, yauzl@^2.2.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + dependencies: + fd-slicer "~1.0.1" + +yeast@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" diff --git a/app/templates/README.md b/app/templates/server/README.md similarity index 100% rename from app/templates/README.md rename to app/templates/server/README.md diff --git a/app/templates/config.sh b/app/templates/server/config.sh similarity index 100% rename from app/templates/config.sh rename to app/templates/server/config.sh diff --git a/app/templates/default.config.sh b/app/templates/server/default.config.sh similarity index 100% rename from app/templates/default.config.sh rename to app/templates/server/default.config.sh diff --git a/app/templates/install b/app/templates/server/install similarity index 100% rename from app/templates/install rename to app/templates/server/install diff --git a/app/templates/pantheon.yml b/app/templates/server/pantheon.yml similarity index 100% rename from app/templates/pantheon.yml rename to app/templates/server/pantheon.yml diff --git a/app/templates/prepare_db_for_dev.example.sh b/app/templates/server/prepare_db_for_dev.example.sh similarity index 100% rename from app/templates/prepare_db_for_dev.example.sh rename to app/templates/server/prepare_db_for_dev.example.sh diff --git a/app/templates/scripts/build b/app/templates/server/scripts/build similarity index 100% rename from app/templates/scripts/build rename to app/templates/server/scripts/build diff --git a/app/templates/scripts/helper-colors.sh b/app/templates/server/scripts/helper-colors.sh similarity index 100% rename from app/templates/scripts/helper-colors.sh rename to app/templates/server/scripts/helper-colors.sh diff --git a/app/templates/scripts/helper-functions.sh b/app/templates/server/scripts/helper-functions.sh similarity index 100% rename from app/templates/scripts/helper-functions.sh rename to app/templates/server/scripts/helper-functions.sh diff --git a/app/templates/scripts/pantheon/db_sanitization.php b/app/templates/server/scripts/pantheon/db_sanitization.php similarity index 100% rename from app/templates/scripts/pantheon/db_sanitization.php rename to app/templates/server/scripts/pantheon/db_sanitization.php diff --git a/app/templates/scripts/pantheon/revert_all_features.php b/app/templates/server/scripts/pantheon/revert_all_features.php similarity index 100% rename from app/templates/scripts/pantheon/revert_all_features.php rename to app/templates/server/scripts/pantheon/revert_all_features.php diff --git a/app/templates/scripts/reset b/app/templates/server/scripts/reset similarity index 100% rename from app/templates/scripts/reset rename to app/templates/server/scripts/reset diff --git a/app/templates/scripts/setup-dev b/app/templates/server/scripts/setup-dev similarity index 100% rename from app/templates/scripts/setup-dev rename to app/templates/server/scripts/setup-dev diff --git a/app/templates/scripts/travis/install_behat.sh b/app/templates/server/scripts/travis/install_behat.sh similarity index 100% rename from app/templates/scripts/travis/install_behat.sh rename to app/templates/server/scripts/travis/install_behat.sh diff --git a/app/templates/scripts/travis/install_client.sh b/app/templates/server/scripts/travis/install_client.sh similarity index 100% rename from app/templates/scripts/travis/install_client.sh rename to app/templates/server/scripts/travis/install_client.sh diff --git a/app/templates/scripts/travis/install_coder.sh b/app/templates/server/scripts/travis/install_coder.sh similarity index 100% rename from app/templates/scripts/travis/install_coder.sh rename to app/templates/server/scripts/travis/install_coder.sh diff --git a/app/templates/scripts/travis/install_dependencies.sh b/app/templates/server/scripts/travis/install_dependencies.sh similarity index 100% rename from app/templates/scripts/travis/install_dependencies.sh rename to app/templates/server/scripts/travis/install_dependencies.sh diff --git a/app/templates/scripts/travis/install_drush.sh b/app/templates/server/scripts/travis/install_drush.sh similarity index 100% rename from app/templates/scripts/travis/install_drush.sh rename to app/templates/server/scripts/travis/install_drush.sh diff --git a/app/templates/scripts/travis/install_profile.sh b/app/templates/server/scripts/travis/install_profile.sh similarity index 100% rename from app/templates/scripts/travis/install_profile.sh rename to app/templates/server/scripts/travis/install_profile.sh diff --git a/app/templates/scripts/travis/run_behat.sh b/app/templates/server/scripts/travis/run_behat.sh similarity index 100% rename from app/templates/scripts/travis/run_behat.sh rename to app/templates/server/scripts/travis/run_behat.sh diff --git a/app/templates/scripts/travis/run_client_server.sh b/app/templates/server/scripts/travis/run_client_server.sh similarity index 100% rename from app/templates/scripts/travis/run_client_server.sh rename to app/templates/server/scripts/travis/run_client_server.sh diff --git a/app/templates/scripts/travis/run_coder.sh b/app/templates/server/scripts/travis/run_coder.sh similarity index 100% rename from app/templates/scripts/travis/run_coder.sh rename to app/templates/server/scripts/travis/run_coder.sh diff --git a/app/templates/scripts/travis/run_web_server.sh b/app/templates/server/scripts/travis/run_web_server.sh similarity index 100% rename from app/templates/scripts/travis/run_web_server.sh rename to app/templates/server/scripts/travis/run_web_server.sh diff --git a/app/templates/skeleton/drupal-org-core.make b/app/templates/server/skeleton/drupal-org-core.make similarity index 100% rename from app/templates/skeleton/drupal-org-core.make rename to app/templates/server/skeleton/drupal-org-core.make diff --git a/app/templates/skeleton/drupal-org.make b/app/templates/server/skeleton/drupal-org.make similarity index 100% rename from app/templates/skeleton/drupal-org.make rename to app/templates/server/skeleton/drupal-org.make diff --git a/app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_base.inc b/app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_base.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_base.inc rename to app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_base.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_instance.inc b/app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_instance.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_instance.inc rename to app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.features.field_instance.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.features.inc b/app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.features.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.features.inc rename to app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.features.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.info b/app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.info similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.info rename to app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.info diff --git a/app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.module b/app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.module similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.module rename to app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.module diff --git a/app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.strongarm.inc b/app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.strongarm.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_company/skeleton_company.strongarm.inc rename to app/templates/server/skeleton/modules/custom/skeleton_company/skeleton_company.strongarm.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_base.inc b/app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_base.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_base.inc rename to app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_base.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_instance.inc b/app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_instance.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_instance.inc rename to app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.features.field_instance.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.features.inc b/app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.features.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.features.inc rename to app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.features.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.info b/app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.info similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.info rename to app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.info diff --git a/app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.module b/app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.module similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.module rename to app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.module diff --git a/app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.strongarm.inc b/app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.strongarm.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_event/skeleton_event.strongarm.inc rename to app/templates/server/skeleton/modules/custom/skeleton_event/skeleton_event.strongarm.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_file/skeleton_file.info b/app/templates/server/skeleton/modules/custom/skeleton_file/skeleton_file.info similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_file/skeleton_file.info rename to app/templates/server/skeleton/modules/custom/skeleton_file/skeleton_file.info diff --git a/app/templates/skeleton/modules/custom/skeleton_file/skeleton_file.module b/app/templates/server/skeleton/modules/custom/skeleton_file/skeleton_file.module similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_file/skeleton_file.module rename to app/templates/server/skeleton/modules/custom/skeleton_file/skeleton_file.module diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/README.md b/app/templates/server/skeleton/modules/custom/skeleton_migrate/README.md similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/README.md rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/README.md diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/csv/node/company.csv b/app/templates/server/skeleton/modules/custom/skeleton_migrate/csv/node/company.csv similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/csv/node/company.csv rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/csv/node/company.csv diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/csv/node/event.csv b/app/templates/server/skeleton/modules/custom/skeleton_migrate/csv/node/event.csv similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/csv/node/event.csv rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/csv/node/event.csv diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/csv/user/user.csv b/app/templates/server/skeleton/modules/custom/skeleton_migrate/csv/user/user.csv similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/csv/user/user.csv rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/csv/user/user.csv diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/handlers/SkeletonMigrateBase.php b/app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/SkeletonMigrateBase.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/handlers/SkeletonMigrateBase.php rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/SkeletonMigrateBase.php diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonCompaniesMigrate.php b/app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonCompaniesMigrate.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonCompaniesMigrate.php rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonCompaniesMigrate.php diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonEventsMigrate.php b/app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonEventsMigrate.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonEventsMigrate.php rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/node/SkeletonEventsMigrate.php diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/handlers/user/SkeletonUsersMigrate.php b/app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/user/SkeletonUsersMigrate.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/handlers/user/SkeletonUsersMigrate.php rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/handlers/user/SkeletonUsersMigrate.php diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/images/company1.jpg b/app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company1.jpg similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/images/company1.jpg rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company1.jpg diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/images/company2.jpg b/app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company2.jpg similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/images/company2.jpg rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company2.jpg diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/images/company3.jpg b/app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company3.jpg similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/images/company3.jpg rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company3.jpg diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/images/company4.jpg b/app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company4.jpg similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/images/company4.jpg rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company4.jpg diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/images/company5.jpg b/app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company5.jpg similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/images/company5.jpg rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/images/company5.jpg diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.info b/app/templates/server/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.info similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.info rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.info diff --git a/app/templates/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.module b/app/templates/server/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.module similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.module rename to app/templates/server/skeleton/modules/custom/skeleton_migrate/skeleton_migrate.module diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/SkeletonEntityBaseNode.php b/app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/SkeletonEntityBaseNode.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/SkeletonEntityBaseNode.php rename to app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/SkeletonEntityBaseNode.php diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/SkeletonCompaniesResource.class.php b/app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/SkeletonCompaniesResource.class.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/SkeletonCompaniesResource.class.php rename to app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/SkeletonCompaniesResource.class.php diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/companies__1_0.inc b/app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/companies__1_0.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/companies__1_0.inc rename to app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/companies/1.0/companies__1_0.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/SkeletonEventsResource.class.php b/app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/SkeletonEventsResource.class.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/SkeletonEventsResource.class.php rename to app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/SkeletonEventsResource.class.php diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/events__1_0.inc b/app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/events__1_0.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/events__1_0.inc rename to app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/node/events/1.0/events__1_0.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/SkeletonMeResource.class.php b/app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/SkeletonMeResource.class.php similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/SkeletonMeResource.class.php rename to app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/SkeletonMeResource.class.php diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/me__1_0.inc b/app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/me__1_0.inc similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/me__1_0.inc rename to app/templates/server/skeleton/modules/custom/skeleton_restful/plugins/restful/user/me/1.0/me__1_0.inc diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/skeleton_restful.info b/app/templates/server/skeleton/modules/custom/skeleton_restful/skeleton_restful.info similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/skeleton_restful.info rename to app/templates/server/skeleton/modules/custom/skeleton_restful/skeleton_restful.info diff --git a/app/templates/skeleton/modules/custom/skeleton_restful/skeleton_restful.module b/app/templates/server/skeleton/modules/custom/skeleton_restful/skeleton_restful.module similarity index 100% rename from app/templates/skeleton/modules/custom/skeleton_restful/skeleton_restful.module rename to app/templates/server/skeleton/modules/custom/skeleton_restful/skeleton_restful.module diff --git a/app/templates/skeleton/skeleton.info b/app/templates/server/skeleton/skeleton.info similarity index 100% rename from app/templates/skeleton/skeleton.info rename to app/templates/server/skeleton/skeleton.info diff --git a/app/templates/skeleton/skeleton.install b/app/templates/server/skeleton/skeleton.install similarity index 100% rename from app/templates/skeleton/skeleton.install rename to app/templates/server/skeleton/skeleton.install diff --git a/app/templates/skeleton/skeleton.profile b/app/templates/server/skeleton/skeleton.profile similarity index 100% rename from app/templates/skeleton/skeleton.profile rename to app/templates/server/skeleton/skeleton.profile diff --git a/imgur b/imgur deleted file mode 100755 index 14b48ba..0000000 --- a/imgur +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -# -# https://gist.github.com/vivien/9768953 -# -# Upload image(s) to imgur.com -# Copyright (C) 2014 Vivien Didelot -# Licensed under GPL version 3, see http://www.gnu.org/licenses/gpl.txt -# -# Requires "jshon": -# http://kmkeen.com/jshon/ -# -# Alternatives, which suck: -# http://imgur.com/tools/imgurbash.sh -# https://raw.githubusercontent.com/JonApps/imgur-screenshot/master/imgur-screenshot.sh -# -# Usage: -# imgur ... -# Specify as '-' for standard input. -# -# Examples: -# -# * Upload several images: -# imgur foo.png bar.png -# -# * Take a screenshot and upload it: -# import png:- | imgur - -# -# * Copy the url to clipboard: -# imgur | xclip -# -# * Open the result in a web browser: -# imgur | xargs firefox -# -# * Quick use (no installation): -# curl -s https://gist.githubusercontent.com/vivien/9768953/raw/imgur | sh -s - -# API key from Alan@imgur.com, see imgurbash.sh -KEY=b3625162d3418ac51a9ee805b1840452 - -die () { - echo "$1" >&2 - exit 1 -} - -# Syntax check -[ $# -lt 1 ] && die "usage: imgur ... (use - for stdin)" - -# Upload every file given as argument -for IMG in "$@" -do - # A more verbose version of `curl -s [...] | jshon -Q -e rsp -e image -e original_image -u` - - RESP="`curl -sS -F key=$KEY -H 'Expect: ' -F "image=@$IMG" http://imgur.com/api/upload.json 2>&1`" - [ $? -ne 0 ] && die "$IMG: $RESP" - - URL=`echo "$RESP" | jshon -Q -e rsp -e image -e original_image -u` - [ -z "$URL" ] && die "$IMG: `echo "$RESP" | jshon -e rsp -e image -e error_msg -u`" - - echo $URL -done - -# vim: et ts=2 sw=2 \ No newline at end of file