[
  {
    "path": ".editorconfig",
    "content": "# editorconfig.org\nroot = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.json]\nindent_size = 2\n\n[*.md]\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules\n*.log\n.DS_Store\nThumbs.db\n*.swp\n*.autogenerated\n/build/*\n!/build/.gitkeep\n/releases/\n/tmp/\n/src/node_modules\n/src/platforms\n/src/plugins\n/src/www/build/\n/src/.tmp/\n.vscode\n/dist/*\n.sourcemaps/\nplugins/*\nwww/\nrelease/\nplatforms/\napp.db/\n"
  },
  {
    "path": "README.md",
    "content": "# Polyonic\n## The ultimate \"Universal Web App\" \n\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n[![devDependencies Status](https://david-dm.org/paulsutherland/Polyonic/dev-status.svg)](https://david-dm.org/paulsutherland/Polyonic?type=dev)\n[![optionalDependencies Status](https://david-dm.org/paulsutherland/Polyonic/optional-status.svg)](https://david-dm.org/paulsutherland/Polyonic?type=optional)\n[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badge/)\n\n> Now using Ionic 5, Electron 11 and Angular 11 :tada:. See here for [Ionic 1](https://github.com/paulsutherland/Polyonic/tree/Ionic1) and [Ionic 3](https://github.com/paulsutherland/Polyonic/tree/Ionic3).\n\n## Build once using web technologies and deploy everywhere!\n\nPolyonic is an Electron Ionic application shell for creating Web Apps, Progressive Mobile Web Apps, Native Mobile Apps and Desktop Apps.\n\nThis project combines the [Electron Framework](http://electron.atom.io/) with the [Ionic Framework](https://ionicframework.com/) and provides a starter for building out an app that can run on either the desktop (macOS, Windows and Linux), a browser or mobile devices (iOS and Android).  You can use this application to build and run on one or all of these platforms.\n\n## Motivation\n\nWhen working in small teams creating web and mobile applications, it is difficult and time consuming for new team members to pick up the different technologies for each platform. I have also been asked a few questions that motivated me to try Polyonic out:\n\n- Is there a way to run this mobile app on the desktop?\n- Can we cache more in the browser for offline working?\n- Can we have one Universal app that can run on the desktop, mobile, web and Office 365?\n\nThese questions made me think about the limitations of the browser for off-line editing and caching and was there a way to create a package that can be used to flesh out any app we require, whilst reducing the overhead of having to learn numerous libraries and frameworks for each platform.\n\nAnd that is why I decided to try combining Electron and Ionic. Is it wise to have a universal app using a mobile framework? Probably not, but it is fun :wink:\n\n## Quick start\n\nThe dependencies for this project are [Node.js](https://nodejs.org), [Ionic Framework](https://ionicframework.com/) and [Cordova](https://cordova.apache.org/).\n\nYou will need the latest Node 14 LTS and NPM 7 installed.\n\nMake sure you have [node installed and running](https://nodejs.org/en/download/), then install Ionic and Cordova globally using npm.\n\n```node\nnpm install -g ionic@latest cordova@latest\n```\n\nClone the repo, change into the Polyonic directory, install the npm packages and run the Electron app\n\n```node\ngit clone --depth 1 https://github.com/paulsutherland/Polyonic\ncd Polyonic\n\nnpm install\nnpm run electron:dev\n```\n\nYou now have Electron and Ionic running as a Desktop app.\n\n## Running live reload for development\n\nWhen developing, you will want to have the app live reload as you save your changes.\n\n### Desktop\n\n```node\nnpm run electron:dev\n```\n\nFor debugging the main process you will need to have the Chrome Browser installed.\n\n```node\nnpm run electron:dev:debug\n```\n\nOpen Chrome and navigate to chrome://inspect/ and select the Electron remote target that is available to attach the debugger to.\n\nIf you require live reloading of the main process debugging session, then it is recommended that you install the Chrome plugin [Node.js V8 --inspector Manager (NiM)](https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj?hl=en). In the plugin settings, set the host to localhost, the port to 9229 and the app to auto.  This will allow you to live reload changes made to the main process (electron.js file).\n\n```node\nnpm run electron:dev:debug-live\n```\n\n### iOS\n\n#### Emulator\n\n```node\nnpm run emulate:ios-dev\n```\n\n#### Device\n\n```node\nnpm run device:ios-dev\n```\n\n### Android\n\n#### Emulator\n\n```node\nnpm run emulate:android-dev\n```\n\n#### Device\n\n```node\nnpm run device:android-dev\n```\n\n## Building on Windows\n\nFor building on Windows you will need to install the Nullsoft Scriptable Install System.\n\nYou can [download NSIS here](http://nsis.sourceforge.net/Main_Page)\n\nYou will need to make sure the NSIS path is added as an environment variable:\n\n```node\nsetx PATH \"%PATH%;C:\\Program Files (x86)\\NSIS\"\n```\n\nOr using [point and click](http://nsis.sourceforge.net/Main_Page).\n\n## Porting existing Ionic Apps\n\nIt is possible to port your existing apps to run on the desktop, but you may need to make some platform adjustments to call out to an equivalent api for any mobile plugins your app uses.  The app includes and angular service for electron which makes is easy to call the Electron APIs from within the Ionic components.\n\nFor example you may want to check what platform you are running on before you make an api call, either calling out to an Ionic plugin, an Electron api or a browser api.  \n\nThe data service component ```data.service.ts``` has an example of setting up a PouchDB database depending upon what platform the app is running on.  \n\n```javascript\nimport { ElectronService } from './electron.service'\nimport { Platform } from '@ionic/angular'\n\n...\n\nconstructor(public electron: ElectronService, private platform: Platform) {}\n\n...\n\npublic setup() {\n    const ctx = this\n    console.log('Setting up the application database')\n\n    if (ctx.electron.isElectronApp) {\n      return ctx.desktopDB()\n    }\n    if (ctx.platform.is('mobile')) {\n      return ctx.mobileDB()\n    } else {\n      return ctx.webDB()\n    }\n}\n\n```\n\n## Encryption at rest\n\nIf your app requires your data to be encrypted at rest, the app includes an example of using the [cordova-sqlcipher-adapter](https://github.com/brodybits/cordova-sqlcipher-adapter) plugin for Ionic and the [polyonic-secure-pouch](https://github.com/paulsutherland/polyonic-secure-pouch) plugin for the desktop and browser.\n\nThe Cordova example encrypts the local sqlite database, whereas the secure pouch plugin encrypts and decrypts your data when it is saved or fetched from the browser database. Either way, at rest, your data is encrypted.\n\nYou will need to include a key or password/secret from the user, or an api app, to encrypt the data.  You can store this key in [Ionic Secure Storage](https://ionicframework.com/docs/native/secure-storage/) or for the desktop you can use [Keytar](https://github.com/atom/node-keytar).  \n\n## NPM Script Commands\n\n| Platform/Commands ||\n|:-|:-|\n| **Desktop** ||\n| `npm run electron:dev` | For development using live reload and opens with developer tools |\n| `npm run electron:local` | Build and run on the desktop, no livereload or developer tools |\n| `npm run electron:linux` | Production build for linux platform.  (Requires Linux) |\n| `npm run electron:mac` | Production build for macOS.  (Requires macOS) |\n| `npm run electron:windows` | Production build for Windows.  (Requires Windows) |\n| **iOS** ||\n| `npm run emulate:ios-dev` | For iOS development on the simulator using live reload |\n| `npm run emulate:ios` | For iOS development on the simulator |\n| `npm run device:ios-dev` | For iOS development on an iOS device using live reload |\n| `npm run device:ios` | For iOS development on an iOS device |\n| `npm run release:ios` | Production build for iOS.  (Requires XCode on macOS) |\n| **Android** ||\n| `npm run emulate:android-dev` | For Android development on an emulator using live reload |\n| `npm run emulate:android` | For Android development on an emulator |\n| `npm run device:android-dev` | For Android development on an Android device using live reload |\n| `npm run device:android` | For Android development on an Android device |\n| **Web Apps and PWA Apps** ||\n| `npm run ionic` | For web and progressive web app development using live reload |\n\n## Publishing your apps\n\n[How to publish an Android App](https://ionicframework.com/docs/publishing/play-store)\n\n[How to publish an iOS App](https://ionicframework.com/docs/publishing/play-store)\n\n[How to publish a macOS and/or Windows App](https://ionicframework.com/docs/publishing/desktop-app)\n\n[How to publish a progressive web app](https://ionicframework.com/docs/publishing/progressive-web-app)\n\n## Credits\n\nThis application was built using the [Electron Framework](http://electron.atom.io/) :heart: for creating desktop apps and [Ionic Framework](http://ionicframework.com/) :heart: for the UI and creating Native Mobile Applications, Progressive Mobile Web Applications and Web Applications.\n\nThe app was inspired by:\n\n[Angular Electron Shell](https://github.com/maximegris/angular-electron) :punch:\n\n[Simple Cryptor Pouch Plugin](https://www.npmjs.com/package/simple-cryptor-pouch) (forked to create the [polyonic-secure-pouch](https://github.com/paulsutherland/polyonic-secure-pouch) plugin). :pray:\n\n## Polyonic for Enterprise\n\nThis project is a generic shell/seed project that lets you build your app for multiple platforms.  For Enterprise use, including:\n\n- Azure AD multi-tenancy Integration\n- Office 365 apps\n- Realtime CouchDB integration\n- End to end encryption\n- Support services\n- WebXR\n- WebRTC\n\nYou can contact us at [polyonic.com](http://polyonic.com) :metal:\n\n## License\n\nReleased under the MIT license.\n"
  },
  {
    "path": "angular.json",
    "content": "{\n  \"$schema\": \"./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json\",\n  \"version\": 1,\n  \"defaultProject\": \"app\",\n  \"newProjectRoot\": \"projects\",\n  \"projects\": {\n    \"app\": {\n      \"root\": \"\",\n      \"sourceRoot\": \"src\",\n      \"projectType\": \"application\",\n      \"prefix\": \"app\",\n      \"schematics\": {},\n      \"architect\": {\n        \"build\": {\n          \"builder\": \"@angular-devkit/build-angular:browser\",\n          \"options\": {\n            \"progress\": false,\n            \"outputPath\": \"www\",\n            \"index\": \"src/index.html\",\n            \"main\": \"src/main.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"src/tsconfig.app.json\",\n            \"allowedCommonJsDependencies\": [\n               \"pouchdb-adapter-cordova-sqlite\",\n               \"polyonic-secure-pouch\",\n               \"pouchdb\",\n               \"pouchdb-utils\"\n            ],\n            \"assets\": [\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"assets\"\n              },\n              {\n                \"glob\": \"**/*.svg\",\n                \"input\": \"node_modules/ionicons/dist/ionicons/svg\",\n                \"output\": \"./svg\"\n              }\n            ],\n            \"styles\": [\n              {\n                \"input\": \"src/theme/variables.scss\"\n              },\n              {\n                \"input\": \"src/global.scss\"\n              }\n            ],\n            \"scripts\": []\n          },\n          \"configurations\": {\n            \"production\": {\n              \"fileReplacements\": [\n                {\n                  \"replace\": \"src/environments/environment.ts\",\n                  \"with\": \"src/environments/environment.prod.ts\"\n                }\n              ],\n              \"optimization\": true,\n              \"outputHashing\": \"all\",\n              \"sourceMap\": false,\n              \"namedChunks\": false,\n              \"aot\": true,\n              \"extractLicenses\": true,\n              \"vendorChunk\": false,\n              \"buildOptimizer\": true\n            }\n          }\n        },\n        \"serve\": {\n          \"builder\": \"@angular-devkit/build-angular:dev-server\",\n          \"options\": {\n            \"browserTarget\": \"app:build\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"browserTarget\": \"app:build:production\"\n            }\n          }\n        },\n        \"extract-i18n\": {\n          \"builder\": \"@angular-devkit/build-angular:extract-i18n\",\n          \"options\": {\n            \"browserTarget\": \"app:build\"\n          }\n        },\n        \"test\": {\n          \"builder\": \"@angular-devkit/build-angular:karma\",\n          \"options\": {\n            \"main\": \"src/test.ts\",\n            \"polyfills\": \"src/polyfills.ts\",\n            \"tsConfig\": \"src/tsconfig.spec.json\",\n            \"karmaConfig\": \"src/karma.conf.js\",\n            \"styles\": [\n              \"styles.css\"\n            ],\n            \"scripts\": [],\n            \"assets\": [\n              {\n                \"glob\": \"favicon.ico\",\n                \"input\": \"src/\",\n                \"output\": \"/\"\n              },\n              {\n                \"glob\": \"**/*\",\n                \"input\": \"src/assets\",\n                \"output\": \"/assets\"\n              }\n            ]\n          }\n        },\n        \"lint\": {\n          \"builder\": \"@angular-devkit/build-angular:tslint\",\n          \"options\": {\n            \"tsConfig\": [\n              \"src/tsconfig.app.json\",\n              \"src/tsconfig.spec.json\"\n            ],\n            \"exclude\": [\n              \"**/node_modules/**\"\n            ]\n          }\n        },\n        \"ionic-cordova-build\": {\n          \"builder\": \"@ionic/angular-toolkit:cordova-build\",\n          \"options\": {\n            \"browserTarget\": \"app:build\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"browserTarget\": \"app:build:production\"\n            }\n          }\n        },\n        \"ionic-cordova-serve\": {\n          \"builder\": \"@ionic/angular-toolkit:cordova-serve\",\n          \"options\": {\n            \"cordovaBuildTarget\": \"app:ionic-cordova-build\",\n            \"devServerTarget\": \"app:serve\"\n          },\n          \"configurations\": {\n            \"production\": {\n              \"cordovaBuildTarget\": \"app:ionic-cordova-build:production\",\n              \"devServerTarget\": \"app:serve:production\"\n            }\n          }\n        }\n      }\n    },\n    \"app-e2e\": {\n      \"root\": \"e2e/\",\n      \"projectType\": \"application\",\n      \"architect\": {\n        \"e2e\": {\n          \"builder\": \"@angular-devkit/build-angular:protractor\",\n          \"options\": {\n            \"protractorConfig\": \"e2e/protractor.conf.js\",\n            \"devServerTarget\": \"app:serve\"\n          }\n        },\n        \"lint\": {\n          \"builder\": \"@angular-devkit/build-angular:tslint\",\n          \"options\": {\n            \"tsConfig\": \"e2e/tsconfig.e2e.json\",\n            \"exclude\": [\n              \"**/node_modules/**\"\n            ]\n          }\n        }\n      }\n    }\n  },\n  \"cli\": {\n    \"defaultCollection\": \"@ionic/angular-toolkit\"\n  },\n  \"schematics\": {\n    \"@ionic/angular-toolkit:component\": {\n      \"styleext\": \"scss\"\n    },\n    \"@ionic/angular-toolkit:page\": {\n      \"styleext\": \"scss\"\n    }\n  }\n}\n"
  },
  {
    "path": "config.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\n<widget id=\"io.polyonic.starter\" version=\"0.0.1\" xmlns=\"http://www.w3.org/ns/widgets\" xmlns:cdv=\"http://cordova.apache.org/ns/1.0\">\n    <name>Polyonic</name>\n    <description>An awesome Polyonic Ionic/Cordova app.</description>\n    <author email=\"hi@polyonic\" href=\"http://polyonic.com/\">Polyonic Framework Team</author>\n    <content src=\"index.html\" />\n    <access origin=\"*\" />\n    <allow-intent href=\"http://*/*\" />\n    <allow-intent href=\"https://*/*\" />\n    <allow-intent href=\"tel:*\" />\n    <allow-intent href=\"sms:*\" />\n    <allow-intent href=\"mailto:*\" />\n    <allow-intent href=\"geo:*\" />\n    <preference name=\"ScrollEnabled\" value=\"false\" />\n    <preference name=\"android-minSdkVersion\" value=\"22\" />\n    <preference name=\"android-targetSdkVersion\" value=\"29\" />\n    <preference name=\"AndroidXEnabled\" value=\"true\" />\n    <preference name=\"BackupWebStorage\" value=\"none\" />\n    <preference name=\"SplashMaintainAspectRatio\" value=\"true\" />\n    <preference name=\"FadeSplashScreenDuration\" value=\"300\" />\n    <preference name=\"SplashShowOnlyFirstTime\" value=\"false\" />\n    <preference name=\"SplashScreen\" value=\"screen\" />\n    <preference name=\"SplashScreenDelay\" value=\"3000\" />\n    <preference name=\"WKWebViewOnly\" value=\"true\" />\n    <platform name=\"android\">\n        <resource-file src=\"resources/android/xml/network_security_config.xml\" target=\"app/src/main/res/xml/network_security_config.xml\" />\n        <edit-config file=\"app/src/main/AndroidManifest.xml\" mode=\"merge\" target=\"/manifest/application\" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n            <application android:networkSecurityConfig=\"@xml/network_security_config\" />\n        </edit-config>\n        <allow-intent href=\"market:*\" />\n        <icon density=\"ldpi\" src=\"resources/android/icon/drawable-ldpi-icon.png\" />\n        <icon density=\"mdpi\" src=\"resources/android/icon/drawable-mdpi-icon.png\" />\n        <icon density=\"hdpi\" src=\"resources/android/icon/drawable-hdpi-icon.png\" />\n        <icon density=\"xhdpi\" src=\"resources/android/icon/drawable-xhdpi-icon.png\" />\n        <icon density=\"xxhdpi\" src=\"resources/android/icon/drawable-xxhdpi-icon.png\" />\n        <icon density=\"xxxhdpi\" src=\"resources/android/icon/drawable-xxxhdpi-icon.png\" />\n        <splash density=\"land-ldpi\" src=\"resources/android/splash/drawable-land-ldpi-screen.png\" />\n        <splash density=\"land-mdpi\" src=\"resources/android/splash/drawable-land-mdpi-screen.png\" />\n        <splash density=\"land-hdpi\" src=\"resources/android/splash/drawable-land-hdpi-screen.png\" />\n        <splash density=\"land-xhdpi\" src=\"resources/android/splash/drawable-land-xhdpi-screen.png\" />\n        <splash density=\"land-xxhdpi\" src=\"resources/android/splash/drawable-land-xxhdpi-screen.png\" />\n        <splash density=\"land-xxxhdpi\" src=\"resources/android/splash/drawable-land-xxxhdpi-screen.png\" />\n        <splash density=\"port-ldpi\" src=\"resources/android/splash/drawable-port-ldpi-screen.png\" />\n        <splash density=\"port-mdpi\" src=\"resources/android/splash/drawable-port-mdpi-screen.png\" />\n        <splash density=\"port-hdpi\" src=\"resources/android/splash/drawable-port-hdpi-screen.png\" />\n        <splash density=\"port-xhdpi\" src=\"resources/android/splash/drawable-port-xhdpi-screen.png\" />\n        <splash density=\"port-xxhdpi\" src=\"resources/android/splash/drawable-port-xxhdpi-screen.png\" />\n        <splash density=\"port-xxxhdpi\" src=\"resources/android/splash/drawable-port-xxxhdpi-screen.png\" />\n    </platform>\n    <platform name=\"ios\">\n        <allow-intent href=\"itms:*\" />\n        <allow-intent href=\"itms-apps:*\" />\n        <icon height=\"57\" src=\"resources/ios/icon/icon.png\" width=\"57\" />\n        <icon height=\"114\" src=\"resources/ios/icon/icon@2x.png\" width=\"114\" />\n        <icon height=\"40\" src=\"resources/ios/icon/icon-40.png\" width=\"40\" />\n        <icon height=\"80\" src=\"resources/ios/icon/icon-40@2x.png\" width=\"80\" />\n        <icon height=\"120\" src=\"resources/ios/icon/icon-40@3x.png\" width=\"120\" />\n        <icon height=\"50\" src=\"resources/ios/icon/icon-50.png\" width=\"50\" />\n        <icon height=\"100\" src=\"resources/ios/icon/icon-50@2x.png\" width=\"100\" />\n        <icon height=\"60\" src=\"resources/ios/icon/icon-60.png\" width=\"60\" />\n        <icon height=\"120\" src=\"resources/ios/icon/icon-60@2x.png\" width=\"120\" />\n        <icon height=\"180\" src=\"resources/ios/icon/icon-60@3x.png\" width=\"180\" />\n        <icon height=\"72\" src=\"resources/ios/icon/icon-72.png\" width=\"72\" />\n        <icon height=\"144\" src=\"resources/ios/icon/icon-72@2x.png\" width=\"144\" />\n        <icon height=\"76\" src=\"resources/ios/icon/icon-76.png\" width=\"76\" />\n        <icon height=\"152\" src=\"resources/ios/icon/icon-76@2x.png\" width=\"152\" />\n        <icon height=\"167\" src=\"resources/ios/icon/icon-83.5@2x.png\" width=\"167\" />\n        <icon height=\"29\" src=\"resources/ios/icon/icon-small.png\" width=\"29\" />\n        <icon height=\"58\" src=\"resources/ios/icon/icon-small@2x.png\" width=\"58\" />\n        <icon height=\"87\" src=\"resources/ios/icon/icon-small@3x.png\" width=\"87\" />\n        <icon height=\"1024\" src=\"resources/ios/icon/icon-1024.png\" width=\"1024\" />\n        <splash height=\"1136\" src=\"resources/ios/splash/Default-568h@2x~iphone.png\" width=\"640\" />\n        <splash height=\"1334\" src=\"resources/ios/splash/Default-667h.png\" width=\"750\" />\n        <splash height=\"2208\" src=\"resources/ios/splash/Default-736h.png\" width=\"1242\" />\n        <splash height=\"1242\" src=\"resources/ios/splash/Default-Landscape-736h.png\" width=\"2208\" />\n        <splash height=\"1536\" src=\"resources/ios/splash/Default-Landscape@2x~ipad.png\" width=\"2048\" />\n        <splash height=\"2048\" src=\"resources/ios/splash/Default-Landscape@~ipadpro.png\" width=\"2732\" />\n        <splash height=\"768\" src=\"resources/ios/splash/Default-Landscape~ipad.png\" width=\"1024\" />\n        <splash height=\"2048\" src=\"resources/ios/splash/Default-Portrait@2x~ipad.png\" width=\"1536\" />\n        <splash height=\"2732\" src=\"resources/ios/splash/Default-Portrait@~ipadpro.png\" width=\"2048\" />\n        <splash height=\"1024\" src=\"resources/ios/splash/Default-Portrait~ipad.png\" width=\"768\" />\n        <splash height=\"960\" src=\"resources/ios/splash/Default@2x~iphone.png\" width=\"640\" />\n        <splash height=\"480\" src=\"resources/ios/splash/Default~iphone.png\" width=\"320\" />\n        <splash height=\"2732\" src=\"resources/ios/splash/Default@2x~universal~anyany.png\" width=\"2732\" />\n        <icon height=\"20\" src=\"resources/ios/icon/icon-20.png\" width=\"20\" />\n        <icon height=\"40\" src=\"resources/ios/icon/icon-20@2x.png\" width=\"40\" />\n        <icon height=\"60\" src=\"resources/ios/icon/icon-20@3x.png\" width=\"60\" />\n        <icon height=\"29\" src=\"resources/ios/icon/icon-29.png\" width=\"29\" />\n        <icon height=\"58\" src=\"resources/ios/icon/icon-29@2x.png\" width=\"58\" />\n        <icon height=\"87\" src=\"resources/ios/icon/icon-29@3x.png\" width=\"87\" />\n        <icon height=\"48\" src=\"resources/ios/icon/icon-24@2x.png\" width=\"48\" />\n        <icon height=\"55\" src=\"resources/ios/icon/icon-27.5@2x.png\" width=\"55\" />\n        <icon height=\"88\" src=\"resources/ios/icon/icon-44@2x.png\" width=\"88\" />\n        <icon height=\"172\" src=\"resources/ios/icon/icon-86@2x.png\" width=\"172\" />\n        <icon height=\"196\" src=\"resources/ios/icon/icon-98@2x.png\" width=\"196\" />\n        <splash height=\"2436\" src=\"resources/ios/splash/Default-2436h.png\" width=\"1125\" />\n        <splash height=\"1125\" src=\"resources/ios/splash/Default-Landscape-2436h.png\" width=\"2436\" />\n    </platform>\n    <plugin name=\"cordova-plugin-whitelist\" spec=\"1.3.3\" />\n    <plugin name=\"cordova-plugin-statusbar\" spec=\"2.4.2\" />\n    <plugin name=\"cordova-plugin-device\" spec=\"2.0.2\" />\n    <plugin name=\"cordova-plugin-splashscreen\" spec=\"5.0.2\" />\n    <plugin name=\"cordova-plugin-ionic-webview\" spec=\"^2.0.0\" />\n    <plugin name=\"cordova-plugin-ionic-keyboard\" spec=\"^2.0.5\" />\n    <plugin name=\"cordova-sqlcipher-adapter\" spec=\"0.1.12-rc2\" />\n</widget>\n"
  },
  {
    "path": "e2e/protractor.conf.js",
    "content": "// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib/config.ts\n\nconst { SpecReporter } = require('jasmine-spec-reporter');\n\nexports.config = {\n  allScriptsTimeout: 11000,\n  specs: [\n    './src/**/*.e2e-spec.ts'\n  ],\n  capabilities: {\n    'browserName': 'chrome'\n  },\n  directConnect: true,\n  baseUrl: 'http://localhost:4200/',\n  framework: 'jasmine',\n  jasmineNodeOpts: {\n    showColors: true,\n    defaultTimeoutInterval: 30000,\n    print: function() {}\n  },\n  onPrepare() {\n    require('ts-node').register({\n      project: 'e2e/tsconfig.e2e.json'\n    });\n    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));\n  }\n};\n"
  },
  {
    "path": "e2e/src/app.e2e-spec.ts",
    "content": "import { AppPage } from './app.po';\n\ndescribe('new App', () => {\n  let page: AppPage;\n\n  beforeEach(() => {\n    page = new AppPage();\n  });\n\n  it('should display welcome message', () => {\n    page.navigateTo();\n    expect(page.getParagraphText()).toContain('The world is your oyster.');\n  });\n});\n"
  },
  {
    "path": "e2e/src/app.po.ts",
    "content": "import { browser, by, element } from 'protractor';\n\nexport class AppPage {\n  navigateTo() {\n    return browser.get('/');\n  }\n\n  getParagraphText() {\n    return element(by.deepCss('app-root ion-content')).getText();\n  }\n}\n"
  },
  {
    "path": "e2e/tsconfig.e2e.json",
    "content": "{\n  \"extends\": \"../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"../out-tsc/e2e\",\n    \"baseUrl\": \"./\",\n    \"module\": \"commonjs\",\n    \"target\": \"es5\"\n  }\n}\n"
  },
  {
    "path": "electron-builder.json",
    "content": "{\n  \"productName\": \"Polyonic\",\n  \"directories\": {\n    \"buildResources\": \"./resources/electron\",\n    \"output\": \"release/\"\n  },\n    \"files\": [\n        \"**/*\",\n        \"!*.ts\",\n        \"!*.code-workspace\",\n        \"!LICENSE.md\",\n        \"!package.json\",\n        \"!package-lock.json\",\n        \"!config/\",\n        \"!platforms/\",\n        \"!plugins/\",\n        \"!src/\",\n        \"!e2e/\",\n        \"!hooks/\",\n        \"!.angular-cli.json\",\n        \"!_config.yml\",\n        \"!karma.conf.js\",\n        \"!tsconfig.json\",\n        \"!tslint.json\",\n        \"!app.db/\",\n        \"!release/\",\n        \"!resources/\"\n    ],\n  \"win\": {\n    \"icon\": \"resources/electron/windows/icon.ico\",\n    \"target\": [\n      \"portable\"\n    ]\n  },\n  \"squirrelWindows\": {\n    \"msi\":\"true\"\n  },\n  \"msi\" : {\n    \"warningsAsErrors\": false\n  },\n  \"nsis\" : {\n    \"oneClick\": false,\n    \"allowToChangeInstallationDirectory\": true\n  },\n  \"appx\": {\n    \"publisherDisplayName\":\"Polyonic\"\n  },\n  \"mac\": {\n    \"icon\": \"resources/electron/osx/icon.icns\",\n    \"target\": [\n      \"dmg\"\n    ]\n  },\n  \"linux\": {\n    \"icon\": \"dist\",\n    \"target\": [\n      \"AppImage\"\n    ]\n  }\n}\n"
  },
  {
    "path": "electron.js",
    "content": "const electron = require('electron')\nconst app = electron.app\nconst BrowserWindow = electron.BrowserWindow\nconst path = require('path')\n\n// process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true\n\nlet win\nconst args = process.argv.slice(1)\nconst serve = args.some(val => val === '--serve')\n\nfunction createWindow () {\n  debugger\n  win = new BrowserWindow({\n    width: 1800,\n    height: 1200,\n    center: true,\n    icon: path.join(__dirname, './resources/electron/icons/64x64.png'),\n    webPreferences: {\n      nodeIntegration: true,\n      enableRemoteModule: true,\n      contextIsolation: false\n    }\n  })\n\n  if (serve) {\n    win.loadURL('http://localhost:4200')\n  } else {\n    win.loadURL(`file://${__dirname}/www/index.html`)\n  }\n\n  win.webContents.on('did-fail-load', () => {\n    win.loadURL(`file://${__dirname}/www/index.html`)\n  })\n\n  console.log(`Node Environment: ${process.env.NODE_ENV}`)\n  if (process.env.NODE_ENV === 'development') {\n    win.toggleDevTools()\n  }\n\n  // Emitted when the window is closed.\n  win.on('closed', () => {\n    // Dereference the window object, usually you would store window\n    // in an array if your app supports multi windows, this is the time\n    // when you should delete the corresponding element.\n    win = null\n  })\n}\ntry {\n  // This method will be called when Electron has finished\n  // initialization and is ready to create browser windows.\n  // Some APIs can only be used after this event occurs.\n  app.on('ready', createWindow)\n\n  // Quit when all windows are closed.\n  app.on('window-all-closed', () => {\n    // On OS X it is common for applications and their menu bar\n    // to stay active until the user quits explicitly with Cmd + Q\n    if (process.platform !== 'darwin') {\n      app.quit()\n    }\n  })\n\n  app.on('activate', () => {\n    // On OS X it's common to re-create a window in the app when the\n    // dock icon is clicked and there are no other windows open.\n    if (win === null) {\n      createWindow()\n    }\n  })\n} catch (e) {\n  // Catch Error\n  // throw e;\n}\n"
  },
  {
    "path": "ionic.config.json",
    "content": "{\n  \"name\": \"ionic5\",\n  \"integrations\": {\n    \"cordova\": {}\n  },\n  \"type\": \"angular\"\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"polyonic\",\n  \"productName\": \"Polyonic App\",\n  \"description\": \"An Ionic project\",\n  \"version\": \"3.0.6\",\n  \"author\": {\n    \"name\": \"Your Name\",\n    \"email\": \"email@your-email.com\",\n    \"url\": \"http://yourwebsite.com\"\n  },\n  \"repository\": \"https://github.com/paulsutherland/polyonic\",\n  \"copyright\": \"© 2018, Your Name\",\n  \"private\": true,\n  \"main\": \"electron.js\",\n  \"scripts\": {\n    \"build:electron\": \"ng build --base-href ./\",\n    \"build:electron:dev\": \"npm run build:electron -- -c dev\",\n    \"build:electron:prod\": \"npm run build:electron -- -c production\",\n    \"electron:dev\": \"export NODE_ENV=development || set NODE_ENV=development && npm-run-all -p ng:serve electron:serve\",\n    \"electron:dev:debug\": \"npm-run-all -p ng:serve electron:serve:debug\",\n    \"electron:dev:debug-live\": \"npm-run-all -p ng:serve electron:serve:debug-live\",\n    \"electron:serve\": \"wait-on http-get://localhost:4200/ && run-electron . --serve\",\n    \"electron:serve:debug\": \"wait-on http-get://localhost:4200/ && run-electron --inspect-brk=9229 . --serve\",\n    \"electron:serve:debug-live\": \"wait-on http-get://localhost:4200/ && nodemon --watch electron.js --exec run-electron --inspect-brk=9229 . --serve\",\n    \"electron:local\": \"npm run build:electron:prod && run-electron .\",\n    \"electron:linux\": \"npm run build:electron:prod && npx electron-builder build --linux\",\n    \"electron:windows\": \"npm run build:electron:prod && npx electron-builder build --windows\",\n    \"electron:mac\": \"npm run build:electron:prod && npx electron-builder build --mac\",\n    \"ionic\": \"npm run ng:serve:web\",\n    \"emulate:ios-dev\": \"ionic cordova emulate ios --l\",\n    \"run:ios-dev\": \"ionic cordova run ios --l --device\",\n    \"emulate:ios\": \"ionic cordova emulate ios\",\n    \"run:ios\": \"ionic cordova run ios --device\",\n    \"release:ios\": \"ionic cordova build ios --prod --release\",\n    \"emulate:android-dev\": \"ionic cordova emulate android --l\",\n    \"run:android-dev\": \"ionic cordova run android --device --l\",\n    \"emulate:android\": \"ionic cordova emulate android\",\n    \"run:android\": \"ionic cordova run android --device\",\n    \"release:android\": \"ionic cordova build android --prod --release \",\n    \"ng\": \"ng\",\n    \"ng:serve\": \"ng serve\",\n    \"ng:serve:web\": \"ng serve -o\",\n    \"test\": \"ng test\",\n    \"e2e\": \"ng e2e\",\n    \"xcode\": \"open -a Xcode platforms/ios/\"\n  },\n  \"dependencies\": {\n    \"@angular/common\": \"11.2.6\",\n    \"@angular/core\": \"11.2.6\",\n    \"@angular/forms\": \"11.2.6\",\n    \"@angular/platform-browser\": \"11.2.6\",\n    \"@angular/platform-browser-dynamic\": \"11.2.6\",\n    \"@angular/router\": \"11.2.6\",\n    \"@ionic-native/core\": \"5.31.1\",\n    \"@ionic-native/splash-screen\": \"5.31.1\",\n    \"@ionic-native/status-bar\": \"5.31.1\",\n    \"@ionic/angular\": \"5.6.1\",\n    \"cordova-android\": \"9.0.0\",\n    \"cordova-ios\": \"6.2.0\",\n    \"cordova-plugin-device\": \"2.0.3\",\n    \"cordova-plugin-ionic-keyboard\": \"2.2.0\",\n    \"cordova-plugin-ionic-webview\": \"^5.0.0\",\n    \"cordova-plugin-splashscreen\": \"^6.0.0\",\n    \"cordova-plugin-statusbar\": \"2.4.3\",\n    \"cordova-plugin-whitelist\": \"1.3.4\",\n    \"cordova-sqlcipher-adapter\": \"^0.5.3\",\n    \"core-js\": \"3.9.1\",\n    \"polyonic-secure-pouch\": \"1.0.7\",\n    \"pouchdb\": \"7.2.2\",\n    \"pouchdb-adapter-cordova-sqlite\": \"2.0.8\",\n    \"run-electron\": \"1.0.0\",\n    \"rxjs\": \"6.6.6\",\n    \"zone.js\": \"0.11.4\"\n  },\n  \"devDependencies\": {\n    \"@angular-devkit/build-angular\": \"^0.1102.5\",\n    \"@angular/cli\": \"~11.2.5\",\n    \"@angular/compiler\": \"11.2.6\",\n    \"@angular/compiler-cli\": \"11.2.6\",\n    \"@angular/language-service\": \"11.2.6\",\n    \"@ionic/angular-toolkit\": \"^3.1.1\",\n    \"@types/jasmine\": \"3.6.7\",\n    \"@types/jasminewd2\": \"2.0.8\",\n    \"@types/node\": \"14.14.35\",\n    \"codelyzer\": \"6.0.1\",\n    \"electron\": \"11.3.0\",\n    \"electron-builder\": \"22.10.5\",\n    \"husky\": \"5.1.3\",\n    \"jasmine-core\": \"3.7.1\",\n    \"jasmine-spec-reporter\": \"6.0.0\",\n    \"karma\": \"6.2.0\",\n    \"karma-chrome-launcher\": \"3.1.0\",\n    \"karma-coverage-istanbul-reporter\": \"3.0.3\",\n    \"karma-jasmine\": \"4.0.1\",\n    \"karma-jasmine-html-reporter\": \"1.5.4\",\n    \"nodemon\": \"^2.0.7\",\n    \"npm-run-all\": \"4.1.5\",\n    \"protractor\": \"7.0.0\",\n    \"ts-node\": \"9.1.1\",\n    \"tslint\": \"6.1.3\",\n    \"typescript\": \"4.1.5\",\n    \"wait-on\": \"5.3.0\"\n  },\n  \"cordova\": {\n    \"plugins\": {\n      \"cordova-plugin-whitelist\": {},\n      \"cordova-plugin-statusbar\": {},\n      \"cordova-plugin-device\": {},\n      \"cordova-plugin-splashscreen\": {},\n      \"cordova-plugin-ionic-webview\": {},\n      \"cordova-plugin-ionic-keyboard\": {},\n      \"cordova-sqlcipher-adapter\": {},\n      \"cordova-plugin-androidx-adapter\": {}\n    },\n    \"platforms\": []\n  }\n}"
  },
  {
    "path": "resources/android/xml/network_security_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<network-security-config>\n    <base-config cleartextTrafficPermitted=\"true\">\n        <trust-anchors>\n            <certificates src=\"system\" />\n        </trust-anchors>\n    </base-config>\n    <domain-config cleartextTrafficPermitted=\"true\">\n        <domain includeSubdomains=\"true\">localhost</domain>\n    </domain-config>\n</network-security-config>\n"
  },
  {
    "path": "resources/electron/.gitkeep",
    "content": ""
  },
  {
    "path": "resources/electron/linux/DEBIAN/control",
    "content": "Package: {{name}}\nVersion: {{version}}\nMaintainer: {{author}}\nPriority: optional\nArchitecture: amd64\nInstalled-Size: {{size}}\nDescription: {{description}}\n"
  },
  {
    "path": "resources/electron/linux/app.desktop",
    "content": "[Desktop Entry]\nVersion=1.0\nType=Application\nEncoding=UTF-8\nName={{productName}}\nComment={{description}}\nExec=/opt/{{name}}/{{name}}\nPath=/opt/{{name}}/\nIcon=/opt/{{name}}/icon.png\nTerminal=false\nCategories=Application;\n"
  },
  {
    "path": "resources/electron/windows/installer.nsi",
    "content": "; NSIS packaging/install script\n; Docs: http://nsis.sourceforge.net/Docs/Contents.html\n\n!include LogicLib.nsh\n!include nsDialogs.nsh\n\n; --------------------------------\n; Variables\n; --------------------------------\n\n!define dest \"{{dest}}\"\n!define src \"{{src}}\"\n!define name \"{{name}}\"\n!define productName \"{{productName}}\"\n!define author \"{{author}}\"\n!define version \"{{version}}\"\n!define icon \"{{icon}}\"\n!define setupIcon \"{{setupIcon}}\"\n!define banner \"{{banner}}\"\n\n!define exec \"{{productName}}.exe\"\n\n!define regkey \"Software\\${productName}\"\n!define uninstkey \"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${productName}\"\n\n!define uninstaller \"uninstall.exe\"\n\n; --------------------------------\n; Installation\n; --------------------------------\n\nUnicode true\nSetCompressor /SOLID lzma\n\nName \"${productName}\"\nIcon \"${setupIcon}\"\nOutFile \"${dest}\"\nInstallDir \"$PROGRAMFILES\\${productName}\"\nInstallDirRegKey HKLM \"${regkey}\" \"\"\n\nRequestExecutionLevel admin\nCRCCheck on\nSilentInstall normal\n\nXPStyle on\nShowInstDetails nevershow\nAutoCloseWindow false\nWindowIcon off\n\nCaption \"${productName} Setup\"\n; Don't add sub-captions to title bar\nSubCaption 3 \" \"\nSubCaption 4 \" \"\n\nPage custom welcome\nPage instfiles\n\nVar Image\nVar ImageHandle\n\nFunction .onInit\n\n    ; Extract banner image for welcome page\n    InitPluginsDir\n    ReserveFile \"${banner}\"\n    File /oname=$PLUGINSDIR\\banner.bmp \"${banner}\"\n\nFunctionEnd\n\n; Custom welcome page\nFunction welcome\n\n    nsDialogs::Create 1018\n\n    ${NSD_CreateLabel} 185 1u 210 100% \"Welcome to ${productName} version ${version} installer.$\\r$\\n$\\r$\\nClick install to begin.\"\n\n    ${NSD_CreateBitmap} 0 0 170 210 \"\"\n    Pop $Image\n    ${NSD_SetImage} $Image $PLUGINSDIR\\banner.bmp $ImageHandle\n\n    nsDialogs::Show\n\n    ${NSD_FreeImage} $ImageHandle\n\nFunctionEnd\n\n; Installation declarations\nSection \"Install\"\n\n    WriteRegStr HKLM \"${regkey}\" \"Install_Dir\" \"$INSTDIR\"\n    WriteRegStr HKLM \"${uninstkey}\" \"DisplayName\" \"${productName}\"\n    WriteRegStr HKLM \"${uninstkey}\" \"DisplayIcon\" '\"$INSTDIR\\icon.ico\"'\n    WriteRegStr HKLM \"${uninstkey}\" \"UninstallString\" '\"$INSTDIR\\${uninstaller}\"'\n    WriteRegStr HKLM \"${uninstkey}\" \"Publisher\" \"${author}\"\n    WriteRegStr HKLM \"${uninstkey}\" \"DisplayVersion\" \"${version}\"\n\n    ; Remove all application files copied by previous installation\n    RMDir /r \"$INSTDIR\"\n\n    SetOutPath $INSTDIR\n\n    ; Include all files from /build directory\n    File /r \"${src}\\*\"\n\n    ; Create start menu shortcut\n    SetShellVarContext all\n    CreateShortCut \"$SMPROGRAMS\\${productName}.lnk\" \"$INSTDIR\\${exec}\" \"\" \"$INSTDIR\\icon.ico\"\n    ; Create desktop shortcut\n    CreateShortCut \"$DESKTOP\\${productName}.lnk\" \"$INSTDIR\\${exec}\" \"\" \"$INSTDIR\\icon.ico\"\n\n    WriteUninstaller \"${uninstaller}\"\n\nSectionEnd\n\n; --------------------------------\n; Uninstaller\n; --------------------------------\n\nShowUninstDetails nevershow\n\nUninstallCaption \"Uninstall ${productName}\"\nUninstallText \"Don't like ${productName} anymore? Hit uninstall button.\"\nUninstallIcon \"${icon}\"\n\nUninstPage custom un.confirm un.confirmOnLeave\nUninstPage instfiles\n\nVar RemoveAppDataCheckbox\nVar RemoveAppDataCheckbox_State\n\n; Custom uninstall confirm page\nFunction un.confirm\n\n    nsDialogs::Create 1018\n\n    ${NSD_CreateLabel} 1u 1u 100% 24u \"If you really want to remove ${productName} from your computer press uninstall button.\"\n\n    ${NSD_CreateCheckbox} 1u 35u 100% 10u \"Remove also my ${productName} personal data\"\n    Pop $RemoveAppDataCheckbox\n\n    nsDialogs::Show\n\nFunctionEnd\n\nFunction un.confirmOnLeave\n\n    ; Save checkbox state on page leave\n    ${NSD_GetState} $RemoveAppDataCheckbox $RemoveAppDataCheckbox_State\n\nFunctionEnd\n\n; Uninstall declarations\nSection \"Uninstall\"\n\n    DeleteRegKey HKLM \"${uninstkey}\"\n    DeleteRegKey HKLM \"${regkey}\"\n\n    SetShellVarContext all\n    Delete \"$SMPROGRAMS\\${productName}.lnk\"\n    ; Remove desktop shortcut\n    Delete \"$DESKTOP\\${productName}.lnk\"\n    ; Remove whole directory from Program Files\n    RMDir /r \"$INSTDIR\"\n\n    ; Remove also appData directory generated by your app if user checked this option\n    ${If} $RemoveAppDataCheckbox_State == ${BST_CHECKED}\n        RMDir /r \"$APPDATA\\${productName}\"\n    ${EndIf}\n\nSectionEnd\n"
  },
  {
    "path": "resources/icon.png.md5",
    "content": "e495003092b862d39b09a0f1b31f732b"
  },
  {
    "path": "resources/splash.png.md5",
    "content": "f010d2a2420ae8b5b5fa398e77da6397"
  },
  {
    "path": "src/app/app-routing.module.ts",
    "content": "import { NgModule } from '@angular/core'\nimport { Routes, RouterModule } from '@angular/router'\n\nconst routes: Routes = [\n  { path: '', loadChildren: './tabs/tabs.module#TabsPageModule' }\n]\n@NgModule({\n  imports: [RouterModule.forRoot(routes)],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule {}\n"
  },
  {
    "path": "src/app/app.component.html",
    "content": "<ion-app>\n  <ion-router-outlet></ion-router-outlet>\n</ion-app>\n"
  },
  {
    "path": "src/app/app.component.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'\nimport { TestBed, async } from '@angular/core/testing'\n\nimport { Platform } from '@ionic/angular'\nimport { SplashScreen } from '@ionic-native/splash-screen/ngx'\nimport { StatusBar } from '@ionic-native/status-bar/ngx'\n\nimport { AppComponent } from './app.component'\n\ndescribe('AppComponent', () => {\n\n  let statusBarSpy, splashScreenSpy, platformReadySpy, platformSpy\n\n  beforeEach(async(() => {\n    statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault'])\n    splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide'])\n    platformReadySpy = Promise.resolve()\n    platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy })\n\n    TestBed.configureTestingModule({\n      declarations: [AppComponent],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n      providers: [\n        { provide: StatusBar, useValue: statusBarSpy },\n        { provide: SplashScreen, useValue: splashScreenSpy },\n        { provide: Platform, useValue: platformSpy },\n      ],\n    }).compileComponents()\n  }))\n\n  it('should create the app', () => {\n    const fixture = TestBed.createComponent(AppComponent)\n    const app = fixture.debugElement.componentInstance\n    expect(app).toBeTruthy()\n  })\n\n  it('should initialize the app', async () => {\n    TestBed.createComponent(AppComponent)\n    expect(platformSpy.ready).toHaveBeenCalled()\n    await platformReadySpy\n    expect(statusBarSpy.styleDefault).toHaveBeenCalled()\n    expect(splashScreenSpy.hide).toHaveBeenCalled()\n  })\n\n  // TODO: add more tests!\n\n})\n"
  },
  {
    "path": "src/app/app.component.ts",
    "content": "import { Component } from '@angular/core'\n\nimport { Platform } from '@ionic/angular'\nimport { SplashScreen } from '@ionic-native/splash-screen/ngx'\nimport { StatusBar } from '@ionic-native/status-bar/ngx'\nimport { DataService } from './data.service'\n\n@Component({\n  selector: 'app-root',\n  templateUrl: 'app.component.html'\n})\nexport class AppComponent {\n  constructor(\n    private platform: Platform,\n    private splashScreen: SplashScreen,\n    private statusBar: StatusBar,\n    private data: DataService\n  ) {\n    this.initializeApp()\n  }\n\n  initializeApp() {\n    this.platform.ready().then(() => {\n      if (this.platform.is('mobile')) {\n        this.statusBar.styleLightContent()\n        this.splashScreen.hide()\n      }\n\n      this.data.setup()\n      .then(info => {\n        console.log('Database setup complete')\n      })\n      .catch(error => console.log('Error setting up the Database: ', error))\n    })\n  }\n}\n"
  },
  {
    "path": "src/app/app.module.ts",
    "content": "import { NgModule } from '@angular/core'\nimport { BrowserModule } from '@angular/platform-browser'\nimport { RouteReuseStrategy } from '@angular/router'\n\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular'\nimport { SplashScreen } from '@ionic-native/splash-screen/ngx'\nimport { StatusBar } from '@ionic-native/status-bar/ngx'\n\nimport { AppRoutingModule } from './app-routing.module'\nimport { AppComponent } from './app.component'\n\n@NgModule({\n  declarations: [AppComponent],\n  entryComponents: [],\n  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],\n  providers: [\n    StatusBar,\n    SplashScreen,\n    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }\n  ],\n  bootstrap: [AppComponent]\n})\nexport class AppModule {}\n"
  },
  {
    "path": "src/app/data.service.spec.ts",
    "content": "import { TestBed, inject } from '@angular/core/testing'\n\nimport { DataService } from './data.service'\n\ndescribe('DataService', () => {\n  beforeEach(() => {\n    TestBed.configureTestingModule({\n      providers: [DataService]\n    })\n  })\n\n  it('should be created', inject([DataService], (service: DataService) => {\n    expect(service).toBeTruthy()\n  }))\n})\n"
  },
  {
    "path": "src/app/data.service.ts",
    "content": "import { Injectable } from '@angular/core'\nimport { Platform } from '@ionic/angular'\nimport { environment } from '../environments/environment'\nimport { ElectronService } from './electron.service'\nimport { EventService } from './events.service'\nimport * as PouchDB from 'pouchdb/dist/pouchdb'\nimport SecurePouch from 'polyonic-secure-pouch'\nimport cordovaSqlitePlugin from 'pouchdb-adapter-cordova-sqlite'\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class DataService {\n\n  public db: any\n  public dbInfo: any\n\n  constructor(\n    public electron: ElectronService,\n    private events: EventService,\n    private platform: Platform\n  ) {}\n\n  public setup() {\n    const ctx = this\n    console.log('Setting up the application database')\n\n    if (ctx.platform.is('mobile')) {\n      return ctx.mobileDB()\n    } else {\n      return ctx.webDB()\n    }\n  }\n\n  private mobileDB() {\n    const ctx = this\n    console.log('This app is running on a mobile device')\n    return new Promise<void>((resolve, reject) => {\n      ctx.platform.ready()\n      .then(() => {\n        // Go for either an encrypted db or encrypted data\n        // There is a greater performance hit on the encrypted data option\n        PouchDB.plugin(cordovaSqlitePlugin)\n        return ctx.db = new PouchDB('app.db', {\n          adapter: 'cordova-sqlite',\n          key: 'secret', // <<<<<<<<<<<<< Replace with your secret key\n          iosDatabaseLocation: 'Documents'\n        })\n        // PouchDB.plugin(SecurePouch)\n        // ctx.db = new PouchDB('app.db')\n        // ctx.db.securePouch('secret') // <<<<<<<<<<<<< Replace with your secret key\n      })\n      .then(res => {\n        return ctx.db.info()\n      })\n      .then(info => {\n        ctx.events.publish('database:available', info)\n        resolve()\n      })\n      .catch(error => {\n        console.log('Error waiting for platform to load', error)\n        reject(error)\n      })\n    })\n  }\n\n  private webDB() {\n    const ctx = this\n    console.log('This app is running in a web browser')\n    return new Promise<void>((resolve, reject) => {\n      ctx.platform.ready()\n      .then(() => {\n        PouchDB.plugin(SecurePouch)\n        return ctx.db = new PouchDB('app.db')\n\n      })\n      .then(res => {\n        ctx.db.encrypt('password') // <<<<<<<<<<<<< Replace with your secret key\n        return ctx.db.info()\n      })\n      .then(info => {\n        ctx.events.publish('database:available', info)\n        resolve()\n      })\n      .catch(error => {\n        console.log('Error waiting for platform to load', error)\n        reject(error)\n      })\n    })\n  }\n}\n"
  },
  {
    "path": "src/app/electron.service.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\n\nimport { ElectronService } from './electron.service';\n\ndescribe('ElectronService', () => {\n  let service: ElectronService;\n\n  beforeEach(() => {\n    TestBed.configureTestingModule({});\n    service = TestBed.inject(ElectronService);\n  });\n\n  it('should be created', () => {\n    expect(service).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "src/app/electron.service.ts",
    "content": "import { Injectable } from '@angular/core'\nimport { ipcRenderer, webFrame, remote } from 'electron'\nimport * as childProcess from 'child_process'\nimport * as fs from 'fs'\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class ElectronService {\n  ipcRenderer: typeof ipcRenderer\n  webFrame: typeof webFrame\n  remote: typeof remote\n  childProcess: typeof childProcess\n  fs: typeof fs\n  \n  get isElectron(): boolean {\n    return !!(typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0)\n  }\n\n  get isElectronApp(): boolean {\n    // For compatibility with anyone who used the ngx-electron package\n    return this.isElectron\n  }\n\n  constructor() {\n    if (this.isElectron) {\n      this.ipcRenderer = window.require('electron').ipcRenderer\n      this.webFrame = window.require('electron').webFrame\n      this.remote = window.require('electron').remote\n      this.childProcess = window.require('child_process')\n      this.fs = window.require('fs')\n    }\n  }\n}"
  },
  {
    "path": "src/app/events.service.spec.ts",
    "content": "import { TestBed } from '@angular/core/testing';\n\nimport { EventsService } from './events.service';\n\ndescribe('EventsService', () => {\n  beforeEach(() => TestBed.configureTestingModule({}));\n\n  it('should be created', () => {\n    const service: EventsService = TestBed.get(EventsService);\n    expect(service).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "src/app/events.service.ts",
    "content": "import { Injectable } from '@angular/core'\nimport { Subject, Subscription } from 'rxjs'\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class EventService {\n\n  private channels: { [key: string]: Subject<any> } = {}\n\n  subscribe(topic: string, observer: (_: any) => void): Subscription {\n    const ctx = this\n\n    if (!ctx.channels[topic]) { ctx.channels[topic] = new Subject<any>() }\n\n    return ctx.channels[topic].subscribe(observer)\n  }\n\n  publish(topic: string, data: any): void {\n    const ctx = this\n\n    const subject = ctx.channels[topic]\n    if (!subject) { return } // Or you can create a new subject for future subscribers\n\n    subject.next(data)\n  }\n\n  destroy(topic: string): null {\n    const ctx = this\n    const subject = ctx.channels[topic]\n    if (!subject) {\n      return\n    }\n\n    subject.complete()\n    delete ctx.channels[topic]\n  }\n\n}\n\n"
  },
  {
    "path": "src/app/tab1/tab1.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { RouterModule } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Tab1Page } from './tab1.page';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    RouterModule.forChild([{ path: '', component: Tab1Page }])\n  ],\n  declarations: [Tab1Page]\n})\nexport class Tab1PageModule {}\n"
  },
  {
    "path": "src/app/tab1/tab1.page.html",
    "content": "<ion-header>\n  <ion-toolbar>\n    <ion-title>\n      Tab One\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content>\n  <ion-card class=\"welcome-card\">\n    <ion-img src=\"assets/shapes.svg\"></ion-img>\n    <ion-card-header>\n      <ion-card-subtitle>Get Started</ion-card-subtitle>\n      <ion-card-title>Welcome to Polyonic</ion-card-title>\n    </ion-card-header>\n    <ion-card-content>\n      <p>Now that your app has been created, you'll want to start building out features and components. Check out some of the resources below for next steps.</p>\n    </ion-card-content>\n  </ion-card>\n  \n  <ion-card>\n    <ion-card-header>\n      <ion-card-subtitle>System</ion-card-subtitle>\n      <ion-card-title>Data</ion-card-title>\n    </ion-card-header>\n    <ion-card-content>\n      <!-- All of the Node.js APIs are available in this renderer process. -->\n      <span *ngIf=\"electron.remote && electron.remote.process && electron.isElectronApp\">\n        <pre>\n          Node v{{electron.remote.process.versions.node}}\n          Chromium v{{electron.remote.process.versions.chrome}}\n          Electron v{{electron.remote.process.versions.electron}}\n        </pre>\n      </span>\n      We are using PouchDB for our Database<pre>{{dbInfo | json}}</pre>\n    </ion-card-content>\n  </ion-card>\n</ion-content>\n"
  },
  {
    "path": "src/app/tab1/tab1.page.scss",
    "content": ".welcome-card ion-img {\n  max-height: 35vh;\n  overflow: hidden;\n}\n"
  },
  {
    "path": "src/app/tab1/tab1.page.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { Tab1Page } from './tab1.page';\n\ndescribe('Tab1Page', () => {\n  let component: Tab1Page;\n  let fixture: ComponentFixture<Tab1Page>;\n\n  beforeEach(async(() => {\n    TestBed.configureTestingModule({\n      declarations: [Tab1Page],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n    }).compileComponents();\n  }));\n\n  beforeEach(() => {\n    fixture = TestBed.createComponent(Tab1Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "src/app/tab1/tab1.page.ts",
    "content": "import { Component, OnInit } from '@angular/core'\nimport { ElectronService } from '../electron.service'\nimport { DataService } from '../data.service'\nimport { EventService } from '../events.service'\n\n@Component({\n  selector: 'app-tab1',\n  templateUrl: 'tab1.page.html',\n  styleUrls: ['tab1.page.scss']\n})\nexport class Tab1Page  implements OnInit {\n\n  public db: any\n  public dbInfo: Object\n  public electron: any\n\n  constructor(\n    public electronService: ElectronService,\n    private data: DataService,\n    private events: EventService\n  ) {\n    this.events.subscribe('database:available', (info) => {\n      console.log('Database is now available')\n      this.db = this.data.db\n      this.dbInfo = info\n    })\n  }\n\n  ngOnInit () {\n    const ctx = this\n\n    ctx.electron = ctx.electronService\n\n    if (ctx.electron.isElectronApp) {\n      ctx.db = ctx.data.db\n      ctx.data.db.info()\n      .then(info => ctx.dbInfo = info)\n      .catch(err => console.log(err))\n    }\n  }\n\n}\n"
  },
  {
    "path": "src/app/tab2/tab2.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { RouterModule } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Tab2Page } from './tab2.page';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    RouterModule.forChild([{ path: '', component: Tab2Page }])\n  ],\n  declarations: [Tab2Page]\n})\nexport class Tab2PageModule {}\n"
  },
  {
    "path": "src/app/tab2/tab2.page.html",
    "content": "<ion-header>\n  <ion-toolbar>\n    <ion-title>\n      Tab Two\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content></ion-content>\n"
  },
  {
    "path": "src/app/tab2/tab2.page.scss",
    "content": "\n"
  },
  {
    "path": "src/app/tab2/tab2.page.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { Tab2Page } from './tab2.page';\n\ndescribe('Tab2Page', () => {\n  let component: Tab2Page;\n  let fixture: ComponentFixture<Tab2Page>;\n\n  beforeEach(async(() => {\n    TestBed.configureTestingModule({\n      declarations: [Tab2Page],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n    }).compileComponents();\n  }));\n\n  beforeEach(() => {\n    fixture = TestBed.createComponent(Tab2Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "src/app/tab2/tab2.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-tab2',\n  templateUrl: 'tab2.page.html',\n  styleUrls: ['tab2.page.scss']\n})\nexport class Tab2Page {}\n"
  },
  {
    "path": "src/app/tab3/tab3.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { RouterModule } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Tab3Page } from './tab3.page';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    RouterModule.forChild([{ path: '', component: Tab3Page }])\n  ],\n  declarations: [Tab3Page]\n})\nexport class Tab3PageModule {}\n"
  },
  {
    "path": "src/app/tab3/tab3.page.html",
    "content": "<ion-header>\n  <ion-toolbar>\n    <ion-title>\n      Tab Three\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content></ion-content>\n"
  },
  {
    "path": "src/app/tab3/tab3.page.scss",
    "content": "\n"
  },
  {
    "path": "src/app/tab3/tab3.page.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { Tab3Page } from './tab3.page';\n\ndescribe('Tab3Page', () => {\n  let component: Tab3Page;\n  let fixture: ComponentFixture<Tab3Page>;\n\n  beforeEach(async(() => {\n    TestBed.configureTestingModule({\n      declarations: [Tab3Page],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n    }).compileComponents();\n  }));\n\n  beforeEach(() => {\n    fixture = TestBed.createComponent(Tab3Page);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "src/app/tab3/tab3.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-tab3',\n  templateUrl: 'tab3.page.html',\n  styleUrls: ['tab3.page.scss']\n})\nexport class Tab3Page {}\n"
  },
  {
    "path": "src/app/tabs/tabs.module.ts",
    "content": "import { IonicModule } from '@ionic/angular';\nimport { RouterModule } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { TabsPageRoutingModule } from './tabs.router.module';\n\nimport { TabsPage } from './tabs.page';\n\n@NgModule({\n  imports: [\n    IonicModule,\n    CommonModule,\n    FormsModule,\n    TabsPageRoutingModule\n  ],\n  declarations: [TabsPage]\n})\nexport class TabsPageModule {}\n"
  },
  {
    "path": "src/app/tabs/tabs.page.html",
    "content": "<ion-tabs>\n\n  <ion-tab-bar slot=\"bottom\">\n    <ion-tab-button tab=\"tab1\">\n      <ion-icon name=\"flash\"></ion-icon>\n      <ion-label>Tab One</ion-label>\n    </ion-tab-button>\n\n    <ion-tab-button tab=\"tab2\">\n      <ion-icon name=\"apps\"></ion-icon>\n      <ion-label>Tab Two</ion-label>\n    </ion-tab-button>\n\n    <ion-tab-button tab=\"tab3\">\n      <ion-icon name=\"send\"></ion-icon>\n      <ion-label>Tab Three</ion-label>\n    </ion-tab-button>\n  </ion-tab-bar>\n\n</ion-tabs>\n"
  },
  {
    "path": "src/app/tabs/tabs.page.scss",
    "content": "\n"
  },
  {
    "path": "src/app/tabs/tabs.page.spec.ts",
    "content": "import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { TabsPage } from './tabs.page';\n\ndescribe('TabsPage', () => {\n  let component: TabsPage;\n  let fixture: ComponentFixture<TabsPage>;\n\n  beforeEach(async(() => {\n    TestBed.configureTestingModule({\n      declarations: [TabsPage],\n      schemas: [CUSTOM_ELEMENTS_SCHEMA],\n    }).compileComponents();\n  }));\n\n  beforeEach(() => {\n    fixture = TestBed.createComponent(TabsPage);\n    component = fixture.componentInstance;\n    fixture.detectChanges();\n  });\n\n  it('should create', () => {\n    expect(component).toBeTruthy();\n  });\n});\n"
  },
  {
    "path": "src/app/tabs/tabs.page.ts",
    "content": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-tabs',\n  templateUrl: 'tabs.page.html',\n  styleUrls: ['tabs.page.scss']\n})\nexport class TabsPage {}\n"
  },
  {
    "path": "src/app/tabs/tabs.router.module.ts",
    "content": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { TabsPage } from './tabs.page';\n\nconst routes: Routes = [\n  {\n    path: 'tabs',\n    component: TabsPage,\n    children: [\n      {\n        path: 'tab1',\n        children: [\n          {\n            path: '',\n            loadChildren: '../tab1/tab1.module#Tab1PageModule'\n          }\n        ]\n      },\n      {\n        path: 'tab2',\n        children: [\n          {\n            path: '',\n            loadChildren: '../tab2/tab2.module#Tab2PageModule'\n          }\n        ]\n      },\n      {\n        path: 'tab3',\n        children: [\n          {\n            path: '',\n            loadChildren: '../tab3/tab3.module#Tab3PageModule'\n          }\n        ]\n      },\n      {\n        path: '',\n        redirectTo: '/tabs/tab1',\n        pathMatch: 'full'\n      }\n    ]\n  },\n  {\n    path: '',\n    redirectTo: '/tabs/tab1',\n    pathMatch: 'full'\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule]\n})\nexport class TabsPageRoutingModule {}\n"
  },
  {
    "path": "src/environments/environment.prod.ts",
    "content": "export const environment = {\n  production: true\n};\n"
  },
  {
    "path": "src/environments/environment.ts",
    "content": "// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\nexport const environment = {\n  production: false\n};\n\n/*\n * In development mode, to ignore zone related error stack frames such as\n * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can\n * import the following file, but please comment it out in production mode\n * because it will have performance impact when throw error\n */\n// import 'zone.js/dist/zone-error';  // Included with Angular CLI.\n"
  },
  {
    "path": "src/global.scss",
    "content": "// http://ionicframework.com/docs/theming/\n@import \"~@ionic/angular/css/core.css\";\n@import \"~@ionic/angular/css/normalize.css\";\n@import \"~@ionic/angular/css/structure.css\";\n@import \"~@ionic/angular/css/typography.css\";\n\n@import \"~@ionic/angular/css/padding.css\";\n@import \"~@ionic/angular/css/float-elements.css\";\n@import \"~@ionic/angular/css/text-alignment.css\";\n@import \"~@ionic/angular/css/text-transformation.css\";\n@import \"~@ionic/angular/css/flex-utils.css\";\n\n"
  },
  {
    "path": "src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Ionic App</title>\n\n  <base href=\"/\" />\n\n  <meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n  <meta name=\"format-detection\" content=\"telephone=no\">\n  <meta name=\"msapplication-tap-highlight\" content=\"no\">\n\n  <link rel=\"icon\" type=\"image/png\" href=\"assets/icon/favicon.png\">\n\n  <!-- add to homescreen for ios -->\n  <meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n\n</head>\n<body>\n  <app-root></app-root>\n</body>\n</html>\n"
  },
  {
    "path": "src/karma.conf.js",
    "content": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = function (config) {\n  config.set({\n    basePath: '',\n    frameworks: ['jasmine', '@angular-devkit/build-angular'],\n    plugins: [\n      require('karma-jasmine'),\n      require('karma-chrome-launcher'),\n      require('karma-jasmine-html-reporter'),\n      require('karma-coverage-istanbul-reporter'),\n      require('@angular-devkit/build-angular/plugins/karma')\n    ],\n    client: {\n      clearContext: false // leave Jasmine Spec Runner output visible in browser\n    },\n    coverageIstanbulReporter: {\n      dir: require('path').join(__dirname, '../coverage'),\n      reports: ['html', 'lcovonly'],\n      fixWebpackSourcePaths: true\n    },\n    reporters: ['progress', 'kjhtml'],\n    port: 9876,\n    colors: true,\n    logLevel: config.LOG_INFO,\n    autoWatch: true,\n    browsers: ['Chrome'],\n    singleRun: false\n  });\n};\n"
  },
  {
    "path": "src/main.ts",
    "content": "import { enableProdMode } from '@angular/core'\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic'\n\nimport { AppModule } from './app/app.module'\nimport { environment } from './environments/environment'\n\nif (environment.production) {\n  enableProdMode()\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n  .catch(err => console.log(err))\n"
  },
  {
    "path": "src/polyfills.ts",
    "content": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n *   2. Application imports. Files imported after ZoneJS that should be loaded before your main\n *      file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/** IE9, IE10 and IE11 requires all of the following polyfills. **/\n// import 'core-js/es6/symbol';\n// import 'core-js/es6/object';\n// import 'core-js/es6/function';\n// import 'core-js/es6/parse-int';\n// import 'core-js/es6/parse-float';\n// import 'core-js/es6/number';\n// import 'core-js/es6/math';\n// import 'core-js/es6/string';\n// import 'core-js/es6/date';\n// import 'core-js/es6/regexp';\n// import 'core-js/es6/map';\n// import 'core-js/es6/weak-map';\n// import 'core-js/es6/set';\n\n/**\n * If your app need to indexed by Google Search, your app require polyfills 'core-js/es6/array'\n * Google bot use ES5.\n * FYI: Googlebot uses a renderer following the similar spec to Chrome 41.\n * https://developers.google.com/search/docs/guides/rendering\n **/\n// import 'core-js/es6/array';\n\n/** IE10 and IE11 requires the following for NgClass support on SVG elements */\n// import 'classlist.js';  // Run `npm install --save classlist.js`.\n\n/** IE10 and IE11 requires the following for the Reflect API. */\n// import 'core-js/es6/reflect';\n\n\n/** Evergreen browsers require these. **/\n// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.\n// import 'core-js/es7/reflect';\n\n\n/**\n * Web Animations `@angular/platform-browser/animations`\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\n **/\n// import 'web-animations-js';  // Run `npm install --save web-animations-js`.\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n */\n\n // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n\n /*\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\n */\n// (window as any).__Zone_enable_cross_context_check = true;\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js/dist/zone';  // Included with Angular CLI.\n\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n\n(window as any).global = window;\n(window as any).process = {};\n(window as any).process.nextTick = setTimeout;\n"
  },
  {
    "path": "src/test.ts",
    "content": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/dist/zone-testing'\nimport { getTestBed } from '@angular/core/testing'\nimport {\n  BrowserDynamicTestingModule,\n  platformBrowserDynamicTesting\n} from '@angular/platform-browser-dynamic/testing'\n\ndeclare const require: any\n\n// First, initialize the Angular testing environment.\ngetTestBed().initTestEnvironment(\n  BrowserDynamicTestingModule,\n  platformBrowserDynamicTesting()\n)\n// Then we find all the tests.\nconst context = require.context('./', true, /\\.spec\\.ts$/)\n// And load the modules.\ncontext.keys().map(context)\n"
  },
  {
    "path": "src/theme/variables.scss",
    "content": "// Ionic Variables and Theming. For more info, please see:\n// http://ionicframework.com/docs/theming/\n\n/** Ionic CSS Variables **/\n:root {\n\n  /** primary **/\n  --ion-color-primary: #3880ff;\n  --ion-color-primary-rgb: 56,128,255;\n  --ion-color-primary-contrast: #ffffff;\n  --ion-color-primary-contrast-rgb: 255,255,255;\n  --ion-color-primary-shade: #3171e0;\n  --ion-color-primary-tint: #4c8dff;\n\n  /** secondary **/\n  --ion-color-secondary: #0cd1e8;\n  --ion-color-secondary-rgb: 12,209,232;\n  --ion-color-secondary-contrast: #ffffff;\n  --ion-color-secondary-contrast-rgb: 255,255,255;\n  --ion-color-secondary-shade: #0bb8cc;\n  --ion-color-secondary-tint: #24d6ea;\n\n  /** tertiary **/\n  --ion-color-tertiary: #7044ff;\n  --ion-color-tertiary-rgb: 112,68,255;\n  --ion-color-tertiary-contrast: #ffffff;\n  --ion-color-tertiary-contrast-rgb: 255,255,255;\n  --ion-color-tertiary-shade: #633ce0;\n  --ion-color-tertiary-tint: #7e57ff;\n\n  /** success **/\n  --ion-color-success: #10dc60;\n  --ion-color-success-rgb: 16,220,96;\n  --ion-color-success-contrast: #ffffff;\n  --ion-color-success-contrast-rgb: 255,255,255;\n  --ion-color-success-shade: #0ec254;\n  --ion-color-success-tint: #28e070;\n\n  /** warning **/\n  --ion-color-warning: #ffce00;\n  --ion-color-warning-rgb: 255,206,0;\n  --ion-color-warning-contrast: #ffffff;\n  --ion-color-warning-contrast-rgb: 255,255,255;\n  --ion-color-warning-shade: #e0b500;\n  --ion-color-warning-tint: #ffd31a;\n\n  /** danger **/\n  --ion-color-danger: #f04141;\n  --ion-color-danger-rgb: 245,61,61;\n  --ion-color-danger-contrast: #ffffff;\n  --ion-color-danger-contrast-rgb: 255,255,255;\n  --ion-color-danger-shade: #d33939;\n  --ion-color-danger-tint: #f25454;\n\n  /** dark **/\n  --ion-color-dark: #222428;\n  --ion-color-dark-rgb: 34,34,34;\n  --ion-color-dark-contrast: #ffffff;\n  --ion-color-dark-contrast-rgb: 255,255,255;\n  --ion-color-dark-shade: #1e2023;\n  --ion-color-dark-tint: #383a3e;\n\n  /** medium **/\n  --ion-color-medium: #989aa2;\n  --ion-color-medium-rgb: 152,154,162;\n  --ion-color-medium-contrast: #ffffff;\n  --ion-color-medium-contrast-rgb: 255,255,255;\n  --ion-color-medium-shade: #86888f;\n  --ion-color-medium-tint: #a2a4ab;\n\n  /** light **/\n  --ion-color-light: #f4f5f8;\n  --ion-color-light-rgb: 244,244,244;\n  --ion-color-light-contrast: #000000;\n  --ion-color-light-contrast-rgb: 0,0,0;\n  --ion-color-light-shade: #d7d8da;\n  --ion-color-light-tint: #f5f6f9;\n\n}\n"
  },
  {
    "path": "src/tsconfig.app.json",
    "content": "{\n  \"extends\": \"../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"../out-tsc/app\",\n    \"baseUrl\": \"./\",\n    \"module\": \"es2015\"\n  },\n  \"exclude\": [\n    \"test.ts\",\n    \"**/*.spec.ts\",\n    \"environments/*.ts\"\n  ]\n}\n"
  },
  {
    "path": "src/tsconfig.spec.json",
    "content": "{\n  \"extends\": \"../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"../out-tsc/spec\",\n    \"baseUrl\": \"./\",\n    \"module\": \"commonjs\",\n    \"types\": [\n      \"jasmine\",\n      \"node\"\n    ]\n  },\n  \"files\": [\n    \"test.ts\"\n  ],\n  \"include\": [\n    \"polyfills.ts\",\n    \"**/*.spec.ts\",\n    \"**/*.d.ts\"\n  ]\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compileOnSave\": false,\n  \"compilerOptions\": {\n    \"outDir\": \"./dist/out-tsc\",\n    \"sourceMap\": true,\n    \"declaration\": false,\n    \"moduleResolution\": \"node\",\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"target\": \"es5\",\n    \"lib\": [\n      \"es2017\",\n      \"dom\"\n    ]\n  }\n}\n"
  },
  {
    "path": "tslint.json",
    "content": "{\n  \"rulesDirectory\": [\n    \"node_modules/codelyzer\"\n  ],\n  \"rules\": {\n    \"arrow-return-shorthand\": true,\n    \"callable-types\": true,\n    \"class-name\": true,\n    \"comment-format\": [\n      true,\n      \"check-space\"\n    ],\n    \"curly\": true,\n    \"deprecation\": {\n      \"severity\": \"warn\"\n    },\n    \"eofline\": true,\n    \"forin\": true,\n    \"import-spacing\": true,\n    \"indent\": [\n      true,\n      \"spaces\"\n    ],\n    \"interface-over-type-literal\": true,\n    \"label-position\": true,\n    \"max-line-length\": [\n      true,\n      140\n    ],\n    \"member-access\": false,\n    \"member-ordering\": [\n      true,\n      {\n        \"order\": [\n          \"static-field\",\n          \"instance-field\",\n          \"static-method\",\n          \"instance-method\"\n        ]\n      }\n    ],\n    \"no-arg\": true,\n    \"no-bitwise\": true,\n    \"no-console\": [\n      true,\n      \"debug\",\n      \"info\",\n      \"time\",\n      \"timeEnd\",\n      \"trace\"\n    ],\n    \"no-construct\": true,\n    \"no-debugger\": true,\n    \"no-duplicate-super\": true,\n    \"no-empty\": false,\n    \"no-empty-interface\": true,\n    \"no-eval\": true,\n    \"no-inferrable-types\": [\n      true,\n      \"ignore-params\"\n    ],\n    \"no-misused-new\": true,\n    \"no-non-null-assertion\": true,\n    \"no-shadowed-variable\": true,\n    \"no-string-literal\": false,\n    \"no-string-throw\": true,\n    \"no-switch-case-fall-through\": true,\n    \"no-trailing-whitespace\": true,\n    \"no-unnecessary-initializer\": true,\n    \"no-unused-expression\": true,\n    \"no-use-before-declare\": true,\n    \"no-var-keyword\": true,\n    \"object-literal-sort-keys\": false,\n    \"one-line\": [\n      true,\n      \"check-open-brace\",\n      \"check-catch\",\n      \"check-else\",\n      \"check-whitespace\"\n    ],\n    \"prefer-const\": true,\n    \"quotemark\": [\n      true,\n      \"single\"\n    ],\n    \"radix\": true,\n    \"semicolon\": [\n      false,\n      \"always\"\n    ],\n    \"triple-equals\": [\n      true,\n      \"allow-null-check\"\n    ],\n    \"typedef-whitespace\": [\n      true,\n      {\n        \"call-signature\": \"nospace\",\n        \"index-signature\": \"nospace\",\n        \"parameter\": \"nospace\",\n        \"property-declaration\": \"nospace\",\n        \"variable-declaration\": \"nospace\"\n      }\n    ],\n    \"unified-signatures\": true,\n    \"variable-name\": false,\n    \"whitespace\": [\n      true,\n      \"check-branch\",\n      \"check-decl\",\n      \"check-operator\",\n      \"check-separator\",\n      \"check-type\"\n    ],\n    \"directive-selector\": [\n      true,\n      \"attribute\",\n      \"app\",\n      \"camelCase\"\n    ],\n    \"component-selector\": [\n      true,\n      \"element\",\n      \"app\",\n      \"page\",\n      \"kebab-case\"\n    ],\n    \"no-output-on-prefix\": true,\n    \"use-input-property-decorator\": true,\n    \"use-output-property-decorator\": true,\n    \"use-host-property-decorator\": true,\n    \"no-input-rename\": true,\n    \"no-output-rename\": true,\n    \"use-life-cycle-interface\": true,\n    \"use-pipe-transform-interface\": true,\n    \"directive-class-suffix\": true\n  }\n}\n"
  }
]