New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-data

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-data - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2

conf.json

13

CHANGELOG.md
##### 3.0.0-alpha.1 - 12 December 2015
###### Breaking API changes
- js-data now requires full ES5 compatibility from the runtime. The developer
- js-data now requires full ES5 support from the runtime. The developer
can add es5-shim for older browsers.

@@ -17,2 +17,9 @@ - `DS` is now just a container for `Model` classes. It no longer stores data or

legacy `DS#defineResource` or `DS#defineModel` methods.
- Use of `Object.observe` and the observe-js polyfill have been dropped in
`3.0.0-alpha.1` (see https://esdiscuss.org/topic/an-update-on-object-observe),
replaced with Backbone-style change detection (but unlike with Backbone, you can
still treat instances like POJOs!) Change detection is now more “opt in”, so you
can use it more wisely when you actually need, improving performance overall.
- In `3.0.0-alpha.1` Models (Resources) can now be defined with plain ES6
classes

@@ -25,2 +32,6 @@ ###### Other

- 3.0.0-alpha.1 gzipped is approximately 40% smaller than 2.8.2 gzipped.
- In `3.0.0-alpha.1`, the internal store (cache) of each Model (Resource)
supports secondary indexes for blazing fast lookups on indexed keys. Where in
2.x a `hasMany` property accessor performs a O(n) lookup, in `3.0.0-alpha.1` the
lookup is performed in O(log n) time.

@@ -27,0 +38,0 @@ ##### 2.8.2 - 04 November 2015

6

dist/js-data.min.js
/*!
* js-data
* @version 3.0.0-alpha.1 - Homepage <http://www.js-data.io/>
* @version 3.0.0-alpha.2 - Homepage <http://www.js-data.io/>
* @author Jason Dobry <jason.dobry@gmail.com>

@@ -10,4 +10,4 @@ * @copyright (c) 2014-2015 Jason Dobry

*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JSData=t():e.JSData=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.utils=void 0;var i=n(1),o=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})};for(var a in i){o(a)}var u=n(15),s=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})};for(var c in u){s(c)}var f=n(4),l=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})};for(var d in f){l(d)}var h=n(16),v=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})};for(var p in h){v(p)}var g=n(11),y=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})};for(var m in g){y(m)}var b=n(3),A=r(b);Promise.prototype.spread||(Promise.prototype.spread=function(e){return this.then(function(t){return e.apply(this,t)})}),t.utils=A;t.version={full:"<%= pkg.version %>",major:parseInt("<%= major %>",10),minor:parseInt("<%= minor %>",10),patch:parseInt("<%= patch %>",10),alpha:"<%= alpha %>",beta:"<%= beta %>"}},function(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments.length<=1||void 0===arguments[1]?"id":arguments[1];if(!(0,a.isArray)(e))throw new TypeError("new Collection([data]): data: Expected array. Found "+("undefined"==typeof e?"undefined":r(e)));this.idAttribute=t,this.index=new s.Index([t],t),this.indexes={},e.forEach(this.index.insertRecord,this.index)}Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=i;var o=n(2),a=n(3),u=n(4),s=n(13);t.Query=o.Query,(0,u.configure)({createIndex:function(e,t){(0,a.isString)(e)&&void 0===t&&(t=[e]);var n=this.indexes[e]=new s.Index(t,this.idAttribute);return this.index.visitAll(n.insertRecord,n),this},query:function(){return new o.Query(this)},between:function(){var e;return(e=this.query()).between.apply(e,arguments).run()},get:function(){var e;return(e=this.query()).get.apply(e,arguments).run()},getAll:function(){var e;return(e=this.query()).getAll.apply(e,arguments).run()},filter:function(e){return this.query().filter(e).run()},skip:function(e){return this.query().skip(e).run()},limit:function(e){return this.query().limit(e).run()},forEach:function(e,t){this.index.visitAll(e,t)},map:function(e,t){var n=[];return this.index.visitAll(function(r){n.push(e.call(t,r))}),n},insert:function(e){this.index.insertRecord(e),(0,a.forOwn)(this.indexes,function(t,n){t.insertRecord(e)})},update:function(e){this.index.updateRecord(e),(0,a.forOwn)(this.indexes,function(t,n){t.updateRecord(e)})},remove:function(e){this.index.removeRecord(e),(0,a.forOwn)(this.indexes,function(t,n){t.removeRecord(e)})},insertRecord:function(e,t){t||(t={});var n=t.index?this.indexes[t.index]:this.index;n.insertRecord(e)},updateRecord:function(e,t){t||(t={});var n=t.index?this.indexes[t.index]:this.index;n.updateRecord(e)},removeRecord:function(e,t){t||(t={});var n=t.index?this.indexes[t.index]:this.index;n.removeRecord(e)}})(i.prototype)},function(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e){this.collection=e}function o(e,t,n,r){var i=e[t],a=(0,c.get)(n,i[0]),u=(0,c.get)(r,i[0]);return a&&(0,c.isString)(a)&&(a=a.toUpperCase()),u&&(0,c.isString)(u)&&(u=u.toUpperCase()),"DESC"===i[1]?a>u?-1:u>a?1:t<e.length-1?o(e,t+1,n,r):0:u>a?-1:a>u?1:t<e.length-1?o(e,t+1,n,r):0}function a(e){return e.replace(d,"\\$1")}function u(e,t){return new RegExp("^"+a(e).replace(h,".*").replace(v,".")+"$",t)}function s(e,t,n){switch(t){case"==":return e==n;case"===":return e===n;case"!=":return e!=n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return n>e;case"<=":return n>=e;case"isectEmpty":return!(0,c.intersection)(e||[],n||[]).length;case"isectNotEmpty":return(0,c.intersection)(e||[],n||[]).length;case"in":return-1!==n.indexOf(e);case"notIn":return-1===n.indexOf(e);case"contains":return-1!==e.indexOf(n);case"notContains":return-1===e.indexOf(n);default:if(0===t.indexOf("like"))return null!==u(n,t.substr(4)).exec(e);if(0===t.indexOf("notLike"))return null===u(n,t.substr(7)).exec(e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Query=i;var c=n(3),f=n(4),l={skip:"",offset:"",where:"",limit:"",orderBy:"",sort:""},d=/([.*+?^=!:${}()|[\]\/\\])/g,h=/%/g,v=/_/g;(0,f.configure)({getData:function(){return this.data||(this.data=this.collection.index.getAll()),this.data},between:function(e,t,n){n||(n={});var r=this.collection,i=n.index?r.indexes[n.index]:r.index;if(this.data)throw new Error("Cannot access index after first operation!");return this.data=i.between(e,t,n),this},get:function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1];if(t||(t={}),this.data)throw new Error("Cannot access index after first operation!");if(e&&!(0,c.isArray)(e)&&(e=[e]),!e.length)return this.getData(),this;var n=this.collection,r=t.index?n.indexes[t.index]:n.index;return this.data=r.get(e),this},getAll:function(){var e=this,t={};if(this.data)throw new Error("Cannot access index after first operation!");for(var n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];if(!r.length||1===r.length&&(0,c.isObject)(r[0]))return this.getData(),this;r.length&&(0,c.isObject)(r[r.length-1])&&(t=r[r.length-1],r.pop());var o=this.collection,a=t.index?o.indexes[t.index]:o.index;return this.data=[],r.forEach(function(t){e.data=e.data.concat(a.get(t))}),this},filter:function(e,t){var n=this;return e||(e={}),this.getData(),(0,c.isObject)(e)?!function(){var t={};(0,c.isObject)(e.where)&&(t=e.where),(0,c.forOwn)(e,function(e,n){n in l||n in t||(t[n]={"==":e})});var r=[],i=[],a=[];(0,c.forOwn)(t,function(e,t){(0,c.isObject)(e)||(e={"==":e}),(0,c.forOwn)(e,function(e,n){r.push(t),i.push(n),a.push(e)})}),r.length&&!function(){var e=void 0,t=r.length;n.data=n.data.filter(function(n){var o=!0,u=!0;for(e=0;t>e;e++){var f=i[e],l="|"===f.charAt(0);f=l?f.substr(1):f;var d=s((0,c.get)(n,r[e]),f,a[e]);void 0!==d&&(u=o?d:l?u||d:u&&d),o=!1}return u})}();var u=e.orderBy||e.sort;(0,c.isString)(u)&&(u=[[u,"ASC"]]),(0,c.isArray)(u)||(u=null),u&&!function(){var e=0;u.forEach(function(e,t){(0,c.isString)(e)&&(u[t]=[e,"ASC"])}),n.data.sort(function(t,n){return o(u,e,t,n)})}(),(0,c.isNumber)(e.skip)?n.skip(e.skip):(0,c.isNumber)(e.offset)&&n.skip(e.offset),(0,c.isNumber)(e.limit)&&n.limit(e.limit)}():(0,c.isFunction)(e)&&(this.data=this.data.filter(e,t)),this},skip:function(e){if(!(0,c.isNumber)(e))throw new TypeError("skip: Expected number but found "+("undefined"==typeof e?"undefined":r(e))+"!");var t=this.getData();return e<t.length?this.data=t.slice(e):this.data=[],this},limit:function(e){if(!(0,c.isNumber)(e))throw new TypeError("limit: Expected number but found "+("undefined"==typeof e?"undefined":r(e))+"!");var t=this.getData();return this.data=t.slice(0,Math.min(t.length,e)),this},forEach:function(e,t){return this.getData().forEach(e,t),this},map:function(e,t){return this.data=this.getData().map(e,t),this},run:function(){var e=this.data;return this.data=null,this.params=null,e}})(i.prototype)},function(e,t){"use strict";function n(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function r(e){return"[object Object]"===toString.call(e)||!1}function i(e){return!!e&&"object"===("undefined"==typeof e?"undefined":n(e))&&e.constructor===Object}function o(e){return"[object RegExp]"===toString.call(e)||!1}function a(e){return"string"==typeof e||e&&"object"===("undefined"==typeof e?"undefined":n(e))&&"[object String]"===toString.call(e)||!1}function u(e){return e&&"object"===("undefined"==typeof e?"undefined":n(e))&&"[object Date]"===toString.call(e)||!1}function s(e){var t="undefined"==typeof e?"undefined":n(e);return"number"===t||e&&"object"===t&&"[object Number]"===toString.call(e)||!1}function c(e){return"[object Boolean]"===toString.call(e)}function f(e){return"function"==typeof e||e&&"[object Function]"===toString.call(e)||!1}function l(e){return a(e)||s(e)}function d(e,t){for(var n=t.split("."),r=n.pop();t=n.shift();)if(e=e[t],null==e)return;return e[r]}function h(e,t){for(var n=t.split("."),r=n.pop();t=n.shift();)if(e=e[t],null==e)return;delete e[r]}function v(e,t){if(!t)return e;var n=t.split(".");return n.forEach(function(t){e[t]||(e[t]={}),e=e[t]}),e}function p(e,t,n){if(r(t))g(t,function(t,n){p(e,n,t)});else{var i=R.exec(t);i?v(e,i[1])[i[2]]=n:e[t]=n}}function g(e,t,n){var r=Object.keys(e),i=r.length,o=void 0;for(o=0;i>o;o++)t.call(n,e[r[o]],r[o],e)}function y(e,t){return t&&g(t,function(e,t){var n=this[t];i(e)&&i(n)?y(n,e):this[t]=e},e),e}function m(e){return Promise.resolve(e)}function b(e){return Promise.reject(e)}function A(e,t){for(var n in e){var r=e[n];void 0!==t[n]||f(r)||(t[n]=r)}}function x(e,t){if(!e||!t)return[];var n=[],r=void 0,i=void 0,o=e.length;for(i=0;o>i;i++)r=e[i],-1===n.indexOf(r)&&-1!==t.indexOf(r)&&n.push(r);return n}function O(e,t){g(t,function(t,n){void 0===e[n]&&(e[n]=t)})}function w(e,t){if(!t||!t.length)return!1;for(var n=void 0,r=0;r<t.length;r++)if("[object RegExp]"===Object.prototype.toString.call(t[r])&&t[r].test(e)||t[r]===e)return n=e;return!!n}function j(e,t){var n=[];return g(e,function(e,r){w(r,t)&&n.push(r)}),n.forEach(function(t){delete e[t]}),e}function k(e){return a(e)?JSON.parse(e):e}function _(e,t,n,i,a){if(t){if(e===t)throw new Error("Cannot copy! Source and destination are identical.");if(n=n||[],i=i||[],r(e)){var s=n.indexOf(e);if(-1!==s)return i[s];n.push(e),i.push(t)}var c=void 0;if(I(e)){var f=void 0;for(t.length=0,f=0;f<e.length;f++)c=_(e[f],null,n,i,a),r(e[f])&&(n.push(e[f]),i.push(c)),t.push(c)}else{I(t)?t.length=0:g(t,function(e,n){delete t[n]});for(var l in e)if(e.hasOwnProperty(l)){if(w(l,a))continue;c=_(e[l],null,n,i,a),r(e[l])&&(n.push(e[l]),i.push(c)),t[l]=c}}}else t=e,e&&(I(e)?t=_(e,[],n,i,a):u(e)?t=new Date(e.getTime()):o(e)?(t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex):r(e)&&(t=_(e,Object.create(Object.getPrototypeOf(e)),n,i,a)));return t}function E(e,t,n){return""+t.toUpperCase()+n.toLowerCase()}function S(e){return e.replace(N,"").replace(D,E)}function P(e){return e.split(F).map(S).join("")}function M(e){return e=P(e),e?e.charAt(0).toLowerCase()+e.slice(1):e}function C(e,t,n){e=e||this;var r={};t||n||(t=function(){return r},n=function(e){r=e}),Object.defineProperties(e,{on:{value:function(e,r,i){t.call(this)||n.call(this,{});var o=t.call(this);o[e]=o[e]||[],o[e].push({f:r,c:i})}},off:{value:function(e,r){var i=t.call(this),o=i[e];if(o)if(r){for(var a=0;a<o.length;a++)if(o[a].f===r){o.splice(a,1);break}}else o.splice(0,o.length);else n.call(this,{})}},emit:{value:function(){for(var e=t.call(this),n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];var o=e[r.shift()]||[];if(o)for(var a=0;a<o.length;a++)o[a].f.apply(o[a].c,r)}}})}Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=r,t.isRegExp=o,t.isString=a,t.isDate=u,t.isNumber=s,t.isBoolean=c,t.isFunction=f,t.isSorN=l,t.get=d,t.unset=h,t.set=p,t.forOwn=g,t.deepMixIn=y,t.resolve=m,t.reject=b,t._=A,t.intersection=x,t.fillIn=O,t.isBlacklisted=w,t.omit=j,t.fromJson=k,t.copy=_,t.pascalCase=P,t.camelCase=M,t.Events=C;var I=t.isArray=Array.isArray,R=/^(.+)\.(.+)$/,F=(t.toJson=JSON.stringify,/\s+/),N=/[^A-Za-z]/g,D=/(\w)(\w*)/g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})};for(var o in r){i(o)}var a=n(6),u=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})};for(var s in a){u(s)}var c=n(7),f=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})};for(var l in c){f(l)}var d=n(8),h=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})};for(var v in d){h(v)}var p=n(9),g=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})};for(var y in p){g(y)}var m=n(10),b=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})};for(var A in m){b(A)}var x=n(12),O=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}})};for(var w in x){O(w)}t.DECORATORS="FIXME"},function(e,t,n){"use strict";function r(e,t,n){n||(n={});var r=n.localField=n.localField||t.name.toLowerCase(),i=n.localKey=n.localKey||t.name.toLowerCase()+"_id",a={enumerable:void 0!==n.enumerable?!!n.enumerable:!1,get:function(){var e=(0,o.get)(this,i);return void 0!==e?t.get(e):void 0},set:function(e){return(0,o.set)(this,i,e[t.idAttribute]),(0,o.get)(this,r)}};return(n.link===!1||void 0===n.link&&!e.linkRelations)&&(delete a.get,delete a.set,a.writable=!0),n.get&&!function(){var r=a.get;a.get=function(){var i=this;return n.get(e,t,this,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(i,t)}:void 0)}}(),n.set&&!function(){var r=a.set;a.set=function(i){var o=this;return n.set(e,t,this,i,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(o,t)}:void 0)}}(),Object.defineProperty(e.prototype,r,a),e.relationList||(e.relationList=[]),e.relationFields||(e.relationFields=[]),n.type="belongsTo",n.name=e.name,n.relation=t.name,n.Relation=t,e.relationList.push(n),e.relationFields.push(r),e.data().createIndex(i),e}function i(e,t){return function(n){return r(n,e,t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.belongsTo=i;var o=n(3)},function(e,t,n){"use strict";function r(e){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];return e=e||{},function(n){return(0,i.forOwn)(e,function(e,r){(void 0===n[r]||t)&&(n[r]=(0,i.copy)(e))}),n}}Object.defineProperty(t,"__esModule",{value:!0}),t.configure=r;var i=n(3)},function(e,t,n){"use strict";function r(e,t,n){n||(n={});var r=n.localField||(0,o.camelCase)(t.name)+"Collection",i=n.foreignKey,a=n.localKeys,u=n.foreignKeys;i||a||u||(i=n.foreignKey=(0,o.camelCase)(e.name)+"Id"),i&&t.data().createIndex(i);var s={enumerable:void 0!==n.enumerable?!!n.enumerable:!1,get:function(){var n={};if(i)return t.getAll((0,o.get)(this,e.idAttribute),{index:i});if(a){var r=(0,o.get)(this,a)||[],s=(0,o.isArray)(r)?r:Object.keys(r);return t.getAll.apply(t,s)}return u?((0,o.set)(n,"where."+u+".contains",(0,o.get)(this,e.idAttribute)),t.filter(n)):void 0},set:function(n){var s=this;return n&&n.length&&!function(){var r=(0,o.get)(s,e.idAttribute);i?n.forEach(function(e){(0,o.set)(e,i,r)}):a?!function(){var e=[];n.forEach(function(n){e.push((0,o.get)(n,t.idAttribute))}),(0,o.set)(s,a,e)}():u&&n.forEach(function(e){var t=(0,o.get)(e,u);t?-1===t.indexOf(r)&&t.push(r):(0,o.set)(e,u,[r])})}(),(0,o.get)(this,r)}};return(n.link===!1||void 0===n.link&&!e.linkRelations)&&(delete s.get,delete s.set,s.writable=!0),n.get&&!function(){var r=s.get;s.get=function(){var i=this;return n.get(e,t,this,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(i,t)}:void 0)}}(),n.set&&!function(){var r=s.set;s.set=function(i){var o=this;return n.set(e,t,this,i,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(o,t)}:void 0)}}(),Object.defineProperty(e.prototype,r,s),e.relationList||(e.relationList=[]),e.relationFields||(e.relationFields=[]),n.type="hasMany",n.name=e.name,n.relation=t.name,n.Relation=t,e.relationList.push(n),e.relationFields.push(r),e}function i(e,t){return function(n){return r(n,e,t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasMany=i;var o=n(3)},function(e,t,n){"use strict";function r(e,t,n){n||(n={});var r=n.localField=n.localField||(0,o.camelCase)(t.name),i=n.foreignKey=n.foreignKey||(0,o.camelCase)(e.name)+"Id",a={enumerable:void 0!==n.enumerable?!!n.enumerable:!1,get:function(){var n=t.getAll((0,o.get)(this,e.idAttribute),{index:i});return n&&n.length?n[0]:void 0},set:function(t){return(0,o.set)(t,i,(0,o.get)(this,e.idAttribute)),(0,o.get)(this,r)}};return(n.link===!1||void 0===n.link&&!e.linkRelations)&&(delete a.get,delete a.set),n.get&&!function(){var r=a.get;a.get=function(){var i=this;return n.get(e,t,this,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(i,t)}:void 0)}}(),n.set&&!function(){var r=a.set;a.set=function(i){var o=this;return n.set(e,t,this,i,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(o,t)}:void 0)}}(),Object.defineProperty(e.prototype,r,a),e.relationList||(e.relationList=[]),e.relationFields||(e.relationFields=[]),n.type="hasOne",n.name=e.name,n.relation=t.name,n.Relation=t,e.relationList.push(n),e.relationFields.push(r),e.data().createIndex(i),e}function i(e,t){return function(n){return r(n,e,t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasOne=i;var o=n(3)},function(e,t,n){"use strict";function r(e){return e+": Schemas are not inheritable, did you forget to define a schema?"}function i(e){return e||(e={}),function(e){var t=new o.Collection([],e.idAttribute);e.data=function(){if(this.data===Object.getPrototypeOf(this).data)throw new Error(r(this.name));return t}}}Object.defineProperty(t,"__esModule",{value:!0}),t.initialize=i;var o=n(1)},function(e,t,n){"use strict";function r(e,t,n){var r={enumerable:void 0!==n.enumerable?n.enumerable:!0,configurable:void 0!==n.configurable?n.configurable:!0};return r.get=function(){return this._get("props."+t)},r.set=function(r){var i=this,u=this._get,s=this._set,c=this._unset;if(!u("noValidate")){var f=(0,a.validate)(n,r);if(f)throw new Error(f.join(", "))}return n.track&&!u("creating")&&!function(){var e=u("changing"),n=u("previous."+t),a=u("props."+t),f=u("changed");e||(f=[]),a!==r&&f.push(t),n!==r?s("changes."+t,r):c("changes."+t),!e&&f.length&&(s("changed",f),s("changing",!0),s("eventId",setTimeout(function(){c("changed"),c("eventId"),c("changing");var e=void 0;for(e=0;e<f.length;e++)i.emit("change:"+f[e],i,(0,o.get)(i,f[e]));i.emit("change",i,u("changes"))},0)))}(),s("props."+t,r),u("$")&&n.indexed&&e.data().updateRecord(this,{index:t}),r},n.indexed&&e.createIndex(t),n.get&&(r.get?!function(){var e=r.get;r.get=function(){return n.get.call(this,e)}}():r.get=n.get),n.set&&(r.set?!function(){var e=r.set;r.set=function(t){return n.set.call(this,t,e)}}():r.set=n.set),r}function i(e){return e||(e={}),function(t){try{t.data()}catch(n){(0,s.initialize)(e)(t)}return t.schema||(t.schema={}),(0,u.configure)(t.schema,e),(0,o.forOwn)(e,function(e,n){var i=r(t,n,e);i.writable||Object.defineProperty(t.prototype,n,i)}),t}}Object.defineProperty(t,"__esModule",{value:!0}),t.setSchema=i;var o=n(3),a=n(11),u=n(6),s=n(9)},function(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e,t){var n=[];return(0,o.forOwn)(e,function(e,r){var i=u[r];if(i){var o=i(e,t);o&&n.push(o)}}),n.length?n:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.rules=void 0,t.validate=i;var o=n(3),a={array:o.isArray,boolean:o.isBoolean,integer:o.isNumber,number:o.isNumber,null:function(e){return null===e},object:o.isObject,string:o.isString},u=t.rules={type:function(e,t){if(void 0!==t){(0,o.isString)(e)&&(e=[e]);var n=e.map(function(n){var r=a[n];return r?r(t)?void 0:1:"type: Unknown type "+e});return-1!==n.indexOf(void 0)?void 0:"type: Expected: "+e.join(" or ")+". Actual: "+("undefined"==typeof t?"undefined":r(t))}},anyOf:function(e,t){var n=!1,r=[];return e.forEach(function(e){var o=i(e,t);o?r=r.concat(o):n=!0}),n?void 0:r},allOf:function(e,t){var n=[];return e.forEach(function(e){n=n.concat(i(e,t)||[])}),n.length?void 0:n},oneOf:function(e,t){var n=!1,r=[];return e.forEach(function(e){var o=i(e,t);if(o)r=r.concat(o);else{if(n)return r=["more than one schema validated"],n=!1,!1;n=!0}}),n?void 0:r}}},function(e,t,n){"use strict";function r(e,t,n){return n||(n={}),function(r){r.adapters&&r.adapters===Object.getPrototypeOf(r).adapters&&(r.adapters={},(0,i.fillIn)(r.adapters,Object.getPrototypeOf(r).adapters)),r.adapters[e]=t,(n===!0||n.default)&&(r.defaultAdapter=e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.registerAdapter=r;var i=n(3)},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1];if(!(0,i.isArray)(e))throw new Error("fieldList must be an array.");this.fieldList=e,this.idAttribute=t,this.isIndex=!0,this.keys=[],this.values=[]}Object.defineProperty(t,"__esModule",{value:!0}),t.Index=r;var i=n(3),o=n(4),a=n(14);(0,o.configure)({set:function(e,t){(0,i.isArray)(e)||(e=[e]);var n=e.shift()||null,o=(0,a.binarySearch)(this.keys,n);if(0===e.length)if(o.found){var u=(0,a.binarySearch)(this.values[o.index],t,this.idAttribute);u.found||(0,a.insertAt)(this.values[o.index],u.index,t)}else(0,a.insertAt)(this.keys,o.index,n),(0,a.insertAt)(this.values,o.index,[t]);else if(o.found)this.values[o.index].set(e,t);else{(0,a.insertAt)(this.keys,o.index,n);var s=new r([],this.idAttribute);s.set(e,t),(0,a.insertAt)(this.values,o.index,s)}},get:function(e){(0,i.isArray)(e)||(e=[e]);var t=e.shift()||null,n=(0,a.binarySearch)(this.keys,t);return 0===e.length?n.found?this.values[n.index].isIndex?this.values[n.index].getAll():this.values[n.index]:[]:n.found?this.values[n.index].get(e):[]},getAll:function(){var e=[];return this.values.forEach(function(t){e=t.isIndex?e.concat(t.getAll()):e.concat(t)}),e},visitAll:function(e,t){this.values.forEach(function(n){n.isIndex?n.visitAll(e,t):n.forEach(e,t)})},query:function(e){var t=void 0,n=void 0;if(e[">"]?(t=e[">"],e.leftInclusive=!1):e[">="]&&(t=e[">="],e.leftInclusive=!0),e["<"]?(n=e["<"],e.rightInclusive=!1):e["<="]&&(n=e["<="],e.rightInclusive=!0),t.length!==n.length)throw new Error("Key arrays must be same length");return this.between(t,n,(0,i.omit)(e,[">",">=","<","<="]))},between:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];(0,i.isArray)(e)||(e=[e]),(0,i.isArray)(t)||(t=[t]),(0,i.fillIn)(n,{leftInclusive:!0,rightInclusive:!1,limit:void 0,offset:0});var r=this._between(e,t,n);return n.limit?r.slice(n.offset,n.limit+n.offset):r.slice(n.offset)},_between:function(e,t,n){var r=[],o=e.shift(),u=t.shift(),s=void 0;if(s=void 0!==o?(0,a.binarySearch)(this.keys,o):{found:!1,index:0},0===e.length){s.found&&n.leftInclusive===!1&&(s.index+=1);for(var c=s.index;c<this.keys.length;c+=1){if(void 0!==u)if(n.rightInclusive){if(this.keys[c]>u)break}else if(this.keys[c]>=u)break;if(r=this.values[c].isIndex?r.concat(this.values[c].getAll()):r.concat(this.values[c]),n.limit&&r.length>=n.limit+n.offset)break}}else for(var c=s.index;c<this.keys.length;c+=1){var f=this.keys[c];if(f>u)break;if(r=this.values[c].isIndex?f===o?r.concat(this.values[c]._between((0,i.copy)(e),t.map(function(){}),n)):f===u?r.concat(this.values[c]._between(e.map(function(){}),(0,i.copy)(t),n)):r.concat(this.values[c].getAll()):r.concat(this.values[c]),n.limit&&r.length>=n.limit+n.offset)break}return n.limit?r.slice(0,n.limit+n.offset):r},remove:function(e,t){(0,i.isArray)(e)||(e=[e]);var n=e.shift(),r=(0,a.binarySearch)(this.keys,n);if(0===e.length){if(r.found){var o=(0,a.binarySearch)(this.values[r.index],t,this.idAttribute);o.found&&((0,a.removeAt)(this.values[r.index],o.index),0===this.values[r.index].length&&((0,a.removeAt)(this.keys,r.index),(0,a.removeAt)(this.values,r.index)))}}else r.found&&this.values[r.index].delete(e,t)},clear:function(){this.keys=[],this.values=[]},insertRecord:function(e){var t=this.fieldList.map(function(t){return e[t]||null});this.set(t,e)},removeRecord:function(e){var t=this.fieldList.map(function(t){return e[t]||null});this.remove(t,e)},updateRecord:function(e){this.removeRecord(e),this.insertRecord(e)}})(r.prototype)},function(e,t){"use strict";function n(e,t,n){return e===t?0:(n&&(e=e[n],t=t[n]),null===e&&null===t?0:null===e?-1:null===t?1:t>e?-1:e>t?1:0)}function r(e,t,n){return e.splice(t,0,n),e}function i(e,t){return e.splice(t,1),e}function o(e,t,r){for(var i=0,o=e.length,a=void 0,u=void 0;o>i;){if(u=(i+o)/2|0,a=n(t,e[u],r),0===a)return{found:!0,index:u};0>a?o=u:i=u+1}return{found:!1,index:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.sort=n,t.insertAt=r,t.removeAt=i,t.binarySearch=o},function(e,t,n){"use strict";function r(e){e||(e={}),this.definitions={}}Object.defineProperty(t,"__esModule",{value:!0}),t.DS=r;var i=n(4),o=n(3),a=n(16);(0,i.configure)({clear:function(){var e={};return(0,o.forOwn)(this.definitions,function(t){var n=t.name;e[n]=t.ejectAll()}),e},defineModel:function(e){var t=a.Model.extend(e.methods||{},e);return this.definitions[t.name]=t,t}})(r.prototype),r.prototype.defineResource=r.prototype.defineModel,(0,o.forOwn)(a.Model,function(e,t){(0,o.isFunction)(e)&&(r.prototype[t]=function(e){var n;if(!this.definitions[e])throw new Error(e+" is not a registered Model!");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];return(n=this.definitions[e])[t].apply(n,i)})})},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0;var f=n(3),l=r(f),d=n(4),h=n(11),v=r(h),p=l.resolve,g=!1;try{g=!!window}catch(e){}var y=function(e,t,n,r){return n.raw?(t.adapter=r,n.autoInject&&(t.data=e.inject(t.data)),t):(n.autoInject&&(t=e.inject(t)),t)},m=function e(){s(this,e)},b=t.Model=function(e){function t(e,n){s(this,t);var r=a(this,Object.getPrototypeOf(t).call(this));e||(e={}),n||(n={});var i={};return Object.defineProperties(r,{_get:{value:function(e){return l.get(i,e)}},_set:{value:function(e,t){return l.set(i,e,t)}},_unset:{value:function(e){return l.unset(i,e)}}}),r._set("creating",!0),n.noValidate&&r._set("noValidate",!0),(0,d.configure)(e)(r),r._unset("creating"),r._unset("noValidate"),r._set("previous",l.copy(e)),r}return u(t,e),c(t,[{key:"schema",value:function(e){var t=this.constructor.schema;return e?t[e]:t}},{key:"validate",value:function(e,t){var n=[],r=this.schema();if(e)if(l.isString(e)){var i=r[e];i&&(n=v.validate(i,t)||[])}else l.forOwn(r,function(t,r){n=n.concat(v.validate(t,l.get(e,r))||[])});else e=this;return n.length?n:void 0}},{key:"create",value:function(e){return this.constructor.create(this,e)}},{key:"save",value:function(e){var t=this.constructor,n=t.getAdapterName(e);return t.getAdapter(n).update(t,l.get(this,t.idAttribute),this,e)}},{key:"destroy",value:function(e){var t=this.constructor;return t.destroy(l.get(this,t.idAttribute),e)}},{key:"get",value:function(e){return l.get(this,e)}},{key:"set",value:function(e,t,n){return n||(n={}),l.set(this,e,t)}},{key:"toJSON",value:function(e){var n=this;e||(e={});var r=this.constructor,i=this;return this instanceof t&&(i={},l.set(i,this),r&&r.relationList&&e.with&&(l.isString(e.with)&&(e.with=[e.with]),r.relationList.forEach(function(t){var r=void 0;-1!==e.with.indexOf(t.relation)?r=t.relation:-1!==e.with.indexOf(t.localField)&&(r=t.localField),r&&!function(){var o={with:e.with.slice()};o.with.splice(o.with.indexOf(r),1),o.with.forEach(function(e,t){e&&0===e.indexOf(r)&&e.length>=r.length&&"."===e[r.length]?o.with[t]=e.substr(r.length+1):o.with[t]=""});var a=l.get(n,t.localField);a&&(l.isArray(a)?l.set(i,t.localField,a.map(function(e){return t.Relation.prototype.toJSON.call(e,o)})):l.set(i,t.localField,t.Relation.prototype.toJSON.call(a,o)))}()}))),i}}],[{key:"data",value:function(){throw new Error(this.name+".data(): Did you forget to define a schema?")}},{key:"createIndex",value:function(e,t){this.data().createIndex(e,t)}},{key:"createInstance",value:function(e){var t=this;return e instanceof t?e:new t(e)}},{key:"is",value:function(e){return e instanceof this}},{key:"inject",value:function(e,t){t||(t={});var n=this,r=!1,i=n.data(),a=n.idAttribute,u=n.relationList||[];return l.isArray(e)||(e=[e],r=!0),e.forEach(function(e){u.forEach(function(t){var r=t.Relation,i=l.get(e,t.localField);if(l.isFunction(t.inject))t.inject(n,t,e);else if(i&&t.inject!==!1)if(l.isArray(i))i.forEach(function(n){if(n!==r.get(l.get(n,r.idAttribute)))try{t.foreignKey&&l.set(n,t.foreignKey,l.get(e,a)),r.inject(n)}catch(e){throw new Error("Failed to inject "+t.type+' relation: "'+t.relation+'"!')}}),t.localKeys&&l.set(i,t.localKeys,i.map(function(e){return l.get(e,r.idAttribute)}));else if(i!==r.get(r.idAttribute))try{t.localKey&&l.set(e,t.localKey,l.get(i,r.idAttribute)),t.foreignKey&&l.set(i,t.foreignKey,l.get(e,a)),r.inject(i)}catch(e){throw new Error("Failed to inject "+t.type+' relation: "'+t.relation+'"!')}("boolean"==typeof t.link?t.link:!!n.linkRelations)&&l.unset(e,t.localField)})}),e=e.map(function(e){var r=l.get(e,a);if(!r)throw new TypeError("User#"+a+": Expected string or number, found "+("undefined"==typeof r?"undefined":o(r))+"!");var u=n.get(r);if(u){var s=t.onConflict||n.onConflict;"merge"===s?l.deepMixIn(u,e):"replace"===s&&(l.forOwn(u,function(t,n){n===a||e.hasOwnProperty(n)||delete u[n]}),u.set(e)),e=u}else e=n.createInstance(e),e._set("$",!0),i.index.insertRecord(e);return l.forOwn(i.indexes,function(t){t.updateRecord(e)}),e}),r?e.length?e[0]:void 0:e}},{key:"eject",value:function(e){var t=this.get(e);return t&&(t._unset("$"),this.data().remove(t)),t}},{key:"ejectAll",value:function(e){var t=this.filter(e),n=this.data();return t.forEach(function(e){n.remove(e)}),t}},{key:"get",value:function(e){var t=this.data().get(e);return t.length?t[0]:void 0}},{key:"between",value:function(){var e;return(e=this.data()).between.apply(e,arguments)}},{key:"getAll",value:function(){var e;return(e=this.data()).getAll.apply(e,arguments)}},{key:"filter",value:function(e){return this.data().filter(e)}},{key:"query",value:function(){return this.data().query()}},{key:"getAdapter",value:function(e){var t=this.getAdapterName(e);if(!t)throw new ReferenceError(t+" not found!");return this.adapters[t]}},{key:"getAdapterName",value:function(e){
return e||(e={}),l.isString(e)&&(e={adapter:e}),e.adapter||e.defaultAdapter}},{key:"beforeCreate",value:function(){}},{key:"create",value:function(e,t){var n=this,r=void 0;return e||(e={}),t||(t={}),l._(this,t),t.op="create",t.upsert&&l.get(e,this.idAttribute)?this.update(l.get(e,this.idAttribute),e,t):p(this.beforeCreate(e,t)).then(function(){return r=n.getAdapterName(t),n.getAdapter(r).create(n,n.prototype.toJSON.call(e,t),t)}).then(function(e){return p(n.afterCreate(e,t)).then(function(){return y(n,e,t,r)})})}},{key:"afterCreate",value:function(){}},{key:"beforeCreateMany",value:function(){}},{key:"createMany",value:function(e,t){var n=this,r=void 0;if(e||(e=[]),t||(t={}),l._(this,t),t.op="createMany",t.upsert){var i=function(){var r=!0;return e.forEach(function(e){r=r&&l.get(e,n.idAttribute)}),r?{v:n.updateMany(e,t)}:void 0}();if("object"===("undefined"==typeof i?"undefined":o(i)))return i.v}return p(this.beforeCreateMany(e,t)).then(function(){return r=n.getAdapterName(t),n.getAdapter(r).createMany(n,e.map(function(e){return n.prototype.toJSON.call(e,t)}),t)}).then(function(e){return p(n.afterCreateMany(e,t)).then(function(){return y(n,e,t,r)})})}},{key:"afterCreateMany",value:function(){}},{key:"beforeFind",value:function(){}},{key:"find",value:function(e,t){var n=this,r=void 0;return t||(t={}),l._(this,t),t.op="find",p(this.beforeFind(e,t)).then(function(){return r=n.getAdapterName(t),n.getAdapter(r).find(n,e,t)}).then(function(e){return p(n.afterFind(e,t)).then(function(){return y(n,e,t,r)})})}},{key:"afterFind",value:function(){}},{key:"beforeFindAll",value:function(){}},{key:"findAll",value:function(e,t){var n=this,r=void 0;return e||(e={}),t||(t={}),l._(this,t),t.op="findAll",p(this.beforeFindAll(e,t)).then(function(){return r=n.getAdapterName(t),n.getAdapter(r).findAll(n,e,t)}).then(function(e){return p(n.afterFindAll(e,t)).then(function(){return y(n,e,t,r)})})}},{key:"afterFindAll",value:function(){}},{key:"beforeUpdate",value:function(){}},{key:"update",value:function(e,t,n){var r=this,i=void 0;return t||(t={}),n||(n={}),l._(this,n),n.op="update",p(this.beforeUpdate(e,t,n)).then(function(){return i=r.getAdapterName(n),r.getAdapter(i).update(r,e,r.prototype.toJSON.call(t,n),n)}).then(function(t){return p(r.afterUpdate(e,t,n)).then(function(){return y(r,t,n,i)})})}},{key:"afterUpdate",value:function(){}},{key:"beforeUpdateMany",value:function(){}},{key:"updateMany",value:function(e,t){var n=this,r=void 0;return e||(e=[]),t||(t={}),l._(this,t),t.op="updateMany",p(this.beforeUpdateMany(e,t)).then(function(){return r=n.getAdapterName(t),n.getAdapter(r).updateMany(n,e.map(function(e){return n.prototype.toJSON.call(e,t)}),t)}).then(function(e){return p(n.afterUpdateMany(e,t)).then(function(){return y(n,e,t,r)})})}},{key:"afterUpdateMany",value:function(){}},{key:"beforeUpdateAll",value:function(){}},{key:"updateAll",value:function(e,t,n){var r=this,i=void 0;return e||(e={}),t||(t={}),n||(n={}),l._(this,n),n.op="updateAll",p(this.beforeUpdateAll(e,t,n)).then(function(){return i=r.getAdapterName(n),r.getAdapter(i).updateAll(r,e,t,n)}).then(function(t){return p(r.afterUpdateAll(e,t,n)).then(function(){return y(r,t,n,i)})})}},{key:"afterUpdateAll",value:function(){}},{key:"beforeDestroy",value:function(){}},{key:"destroy",value:function(e,t){var n=this,r=void 0;return t||(t={}),l._(this,t),t.op="destroy",p(this.beforeDestroy(e,t)).then(function(){return r=n.getAdapterName(t),n.getAdapter(r).destroy(n,e,t)}).then(function(i){return p(n.afterDestroy(e,t)).then(function(){return t.raw?(i.adapter=r,t.autoEject&&(i.data=n.eject(e,t)),i):(t.autoEject&&(i=n.eject(e,t)),i)})})}},{key:"afterDestroy",value:function(){}},{key:"beforeDestroyAll",value:function(){}},{key:"destroyAll",value:function(e,t){var n=this,r=void 0;return e||(e={}),t||(t={}),l._(this,t),t.op="destroyAll",p(this.beforeDestroyAll(e,t)).then(function(){return r=n.getAdapterName(t),n.getAdapter(r).destroyAll(n,e,t)}).then(function(i){return p(n.afterDestroyAll(e,t)).then(function(){return t.raw?(i.adapter=r,t.autoEject&&(i.data=n.ejectAll(e,t)),i):(t.autoEject&&(i=n.ejectAll(e,t)),i)})})}},{key:"afterDestroyAll",value:function(){}},{key:"belongsTo",value:function(e,t){return(0,d.belongsTo)(e,t)(this)}},{key:"hasMany",value:function(e,t){return(0,d.hasMany)(e,t)(this)}},{key:"hasOne",value:function(e,t){return(0,d.hasOne)(e,t)(this)}},{key:"initialize",value:function(e){return(0,d.initialize)(e)(this)}},{key:"setSchema",value:function(e){return(0,d.setSchema)(e)(this)}},{key:"configure",value:function(e){return(0,d.configure)(e)(this)}},{key:"registerAdapter",value:function(e,t,n){return(0,d.registerAdapter)(e,t,n)(this)}},{key:"extend",value:function(e,t){var n=void 0,r=this;e=e||{},t=t||{};var c=t.schema||i({},t.idAttribute,{}),f=e.initialize;if(delete e.initialize,c[t.idAttribute]=c[t.idAttribute]||{},e.hasOwnProperty("constructor"))n=e.constructor,delete e.constructor;else{if(!t.name)throw new TypeError("name: Expected string, found "+o(t.name)+"!");if(t.csp)n=function(){s(this,n);for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];var i=a(this,Object.getPrototypeOf(n).apply(this,t));return f&&f.apply(this,t),i};else{var h=l.pascalCase(t.name),v="return function "+h+"() {\n _classCallCheck(this, "+h+")\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf("+h+").apply(this, arguments));\n if (initialize) {\n initialize.apply(this, arguments)\n }\n return _this\n }";n=new Function("_classCallCheck","_possibleConstructorReturn","Parent","initialize",v)(s,a,r,f)}}return t.shortname=t.shortname||l.camelCase(n.name||t.name),delete t.name,u(n,r),(0,d.configure)(e)(n.prototype),(0,d.configure)(t)(n),(0,d.setSchema)(c)(n),n}}]),t}(m);(0,d.configure)({adapters:{},autoEject:!0,autoInject:g,bypassCache:!1,csp:!1,defaultAdapter:"http",eagerEject:!1,idAttribute:"id",linkRelations:g,onConflict:"merge",relationsEnumerable:!1,raw:!1,strategy:"single",upsert:!0,useFilter:!0})(b),l.Events(b.prototype,function(){return this._get("events")},function(e){this._set("events",e)})}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JSData=t():e.JSData=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.utils=void 0;var i=n(1),o=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})};for(var a in i){o(a)}var u=n(14),s=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})};for(var c in u){s(c)}var l=n(4),f=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})};for(var d in l){f(d)}var h=n(15),v=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})};for(var p in h){v(p)}var g=n(10),y=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})};for(var b in g){y(b)}var m=n(3),A=r(m);Promise.prototype.spread||(Promise.prototype.spread=function(e){return this.then(function(t){return e.apply(this,t)})});t.utils=A,t.version={full:"<%= pkg.version %>",major:parseInt("<%= major %>",10),minor:parseInt("<%= minor %>",10),patch:parseInt("<%= patch %>",10),alpha:"<%= alpha %>",beta:"<%= beta %>"}},function(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(){var e=this,t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],n=arguments.length<=1||void 0===arguments[1]?"id":arguments[1];if(!(0,a.isArray)(t))throw new TypeError("new Collection([data]): data: Expected array. Found "+("undefined"==typeof t?"undefined":r(t)));this.idAttribute=n,this.index=new s.Index([n],n),this.indexes={},t.forEach(function(t){e.index.insertRecord(t),t&&(0,a.isFunction)(t.on)&&t.on("all",e._onModelEvent,e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=i;var o=n(2),a=n(3),u=n(4),s=n(12);t.Query=o.Query,(0,u.configure)({_onModelEvent:function(){this.emit.apply(this,arguments)},createIndex:function(e,t){(0,a.isString)(e)&&void 0===t&&(t=[e]);var n=this.indexes[e]=new s.Index(t,this.idAttribute);return this.index.visitAll(n.insertRecord,n),this},query:function(){return new o.Query(this)},between:function(){var e;return(e=this.query()).between.apply(e,arguments).run()},get:function(){var e;return(e=this.query()).get.apply(e,arguments).run()},getAll:function(){var e;return(e=this.query()).getAll.apply(e,arguments).run()},filter:function(e){return this.query().filter(e).run()},skip:function(e){return this.query().skip(e).run()},limit:function(e){return this.query().limit(e).run()},forEach:function(e,t){this.index.visitAll(e,t)},reduce:function(e,t){var n=this.getAll();return n.reduce(e,t)},map:function(e,t){var n=[];return this.index.visitAll(function(r){n.push(e.call(t,r))}),n},insert:function(e){this.index.insertRecord(e),(0,a.forOwn)(this.indexes,function(t,n){t.insertRecord(e)}),e&&(0,a.isFunction)(e.on)&&e.on("all",this._onModelEvent,this)},update:function(e){this.index.updateRecord(e),(0,a.forOwn)(this.indexes,function(t,n){t.updateRecord(e)})},remove:function(e){this.index.removeRecord(e),(0,a.forOwn)(this.indexes,function(t,n){t.removeRecord(e)}),e&&(0,a.isFunction)(e.off)&&e.off("all",this._onModelEvent,this)},updateRecord:function(e,t){t||(t={});var n=t.index?this.indexes[t.index]:this.index;n.updateRecord(e)}})(i.prototype),(0,a.eventify)(i.prototype,function(){return this._events},function(e){this._events=e})},function(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e){this.collection=e,this.data=null}function o(e,t,n,r){var i=e[t],a=(0,c.get)(n,i[0]),u=(0,c.get)(r,i[0]);return a&&(0,c.isString)(a)&&(a=a.toUpperCase()),u&&(0,c.isString)(u)&&(u=u.toUpperCase()),"DESC"===i[1]?a>u?-1:u>a?1:t<e.length-1?o(e,t+1,n,r):0:u>a?-1:a>u?1:t<e.length-1?o(e,t+1,n,r):0}function a(e){return e.replace(d,"\\$1")}function u(e,t){return new RegExp("^"+a(e).replace(h,".*").replace(v,".")+"$",t)}function s(e,t,n){switch(t){case"==":return e==n;case"===":return e===n;case"!=":return e!=n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return n>e;case"<=":return n>=e;case"isectEmpty":return!(0,c.intersection)(e||[],n||[]).length;case"isectNotEmpty":return(0,c.intersection)(e||[],n||[]).length;case"in":return-1!==n.indexOf(e);case"notIn":return-1===n.indexOf(e);case"contains":return-1!==e.indexOf(n);case"notContains":return-1===e.indexOf(n);default:if(0===t.indexOf("like"))return null!==u(n,t.substr(4)).exec(e);if(0===t.indexOf("notLike"))return null===u(n,t.substr(7)).exec(e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Query=i;var c=n(3),l=n(4),f={skip:"",offset:"",where:"",limit:"",orderBy:"",sort:""},d=/([.*+?^=!:${}()|[\]\/\\])/g,h=/%/g,v=/_/g;(0,l.configure)({getData:function(){return this.data||(this.data=this.collection.index.getAll()),this.data},between:function(e,t,n){n||(n={});var r=this.collection,i=n.index?r.indexes[n.index]:r.index;if(this.data)throw new Error("Cannot access index after first operation!");return this.data=i.between(e,t,n),this},get:function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1];if(t||(t={}),this.data)throw new Error("Cannot access index after first operation!");if(e&&!(0,c.isArray)(e)&&(e=[e]),!e.length)return this.getData(),this;var n=this.collection,r=t.index?n.indexes[t.index]:n.index;return this.data=r.get(e),this},getAll:function(){var e=this,t={};if(this.data)throw new Error("Cannot access index after first operation!");for(var n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];if(!r.length||1===r.length&&(0,c.isObject)(r[0]))return this.getData(),this;r.length&&(0,c.isObject)(r[r.length-1])&&(t=r[r.length-1],r.pop());var o=this.collection,a=t.index?o.indexes[t.index]:o.index;return this.data=[],r.forEach(function(t){e.data=e.data.concat(a.get(t))}),this},filter:function(e,t){var n=this;return e||(e={}),this.getData(),(0,c.isObject)(e)?!function(){var t={};(0,c.isObject)(e.where)&&(t=e.where),(0,c.forOwn)(e,function(e,n){n in f||n in t||(t[n]={"==":e})});var r=[],i=[],a=[];(0,c.forOwn)(t,function(e,t){(0,c.isObject)(e)||(e={"==":e}),(0,c.forOwn)(e,function(e,n){r.push(t),i.push(n),a.push(e)})}),r.length&&!function(){var e=void 0,t=r.length;n.data=n.data.filter(function(n){var o=!0,u=!0;for(e=0;t>e;e++){var l=i[e],f="|"===l.charAt(0);l=f?l.substr(1):l;var d=s((0,c.get)(n,r[e]),l,a[e]);void 0!==d&&(u=o?d:f?u||d:u&&d),o=!1}return u})}();var u=e.orderBy||e.sort;(0,c.isString)(u)&&(u=[[u,"ASC"]]),(0,c.isArray)(u)||(u=null),u&&!function(){var e=0;u.forEach(function(e,t){(0,c.isString)(e)&&(u[t]=[e,"ASC"])}),n.data.sort(function(t,n){return o(u,e,t,n)})}(),(0,c.isNumber)(e.skip)?n.skip(e.skip):(0,c.isNumber)(e.offset)&&n.skip(e.offset),(0,c.isNumber)(e.limit)&&n.limit(e.limit)}():(0,c.isFunction)(e)&&(this.data=this.data.filter(e,t)),this},skip:function(e){if(!(0,c.isNumber)(e))throw new TypeError("skip: Expected number but found "+("undefined"==typeof e?"undefined":r(e))+"!");var t=this.getData();return e<t.length?this.data=t.slice(e):this.data=[],this},limit:function(e){if(!(0,c.isNumber)(e))throw new TypeError("limit: Expected number but found "+("undefined"==typeof e?"undefined":r(e))+"!");var t=this.getData();return this.data=t.slice(0,Math.min(t.length,e)),this},forEach:function(e,t){return this.getData().forEach(e,t),this},map:function(e,t){return this.data=this.getData().map(e,t),this},run:function(){var e=this.data;return this.data=null,e}})(i.prototype)},function(e,t){"use strict";function n(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function r(e){return"[object Object]"===toString.call(e)||!1}function i(e){return!!e&&"object"===("undefined"==typeof e?"undefined":n(e))&&e.constructor===Object}function o(e){return"[object RegExp]"===toString.call(e)||!1}function a(e){return"string"==typeof e||e&&"object"===("undefined"==typeof e?"undefined":n(e))&&"[object String]"===toString.call(e)||!1}function u(e){return e&&"object"===("undefined"==typeof e?"undefined":n(e))&&"[object Date]"===toString.call(e)||!1}function s(e){var t="undefined"==typeof e?"undefined":n(e);return"number"===t||e&&"object"===t&&"[object Number]"===toString.call(e)||!1}function c(e){return"[object Boolean]"===toString.call(e)}function l(e){return"function"==typeof e||e&&"[object Function]"===toString.call(e)||!1}function f(e){return a(e)||s(e)}function d(e,t){if(t){for(var n=t.split("."),r=n.pop();t=n.shift();)if(e=e[t],null==e)return;return e[r]}}function h(e,t){for(var n=t.split("."),r=n.pop();t=n.shift();)if(e=e[t],null==e)return;delete e[r]}function v(e,t){if(!t)return e;var n=t.split(".");return n.forEach(function(t){e[t]||(e[t]={}),e=e[t]}),e}function p(e,t,n){if(r(t))g(t,function(t,n){p(e,n,t)});else{var i=I.exec(t);i?v(e,i[1])[i[2]]=n:e[t]=n}}function g(e,t,n){var r=Object.keys(e),i=r.length,o=void 0;for(o=0;i>o;o++)t.call(n,e[r[o]],r[o],e)}function y(e,t){return t&&g(t,function(e,t){var n=this[t];i(e)&&i(n)?y(n,e):this[t]=e},e),e}function b(e){return Promise.resolve(e)}function m(e){return Promise.reject(e)}function A(e,t){for(var n in e){var r=e[n];void 0!==t[n]||l(r)||(t[n]=r)}}function x(e,t){if(!e||!t)return[];var n=[],r=void 0,i=void 0,o=e.length;for(i=0;o>i;i++)r=e[i],-1===n.indexOf(r)&&-1!==t.indexOf(r)&&n.push(r);return n}function k(e,t){g(t,function(t,n){void 0===e[n]&&(e[n]=t)})}function O(e,t){if(!t||!t.length)return!1;for(var n=void 0,r=0;r<t.length;r++)if("[object RegExp]"===Object.prototype.toString.call(t[r])&&t[r].test(e)||t[r]===e)return n=e;return!!n}function _(e){return a(e)?JSON.parse(e):e}function w(e,t,n,i,a){if(t){if(e===t)throw new Error("Cannot copy! Source and destination are identical.");if(n=n||[],i=i||[],r(e)){var s=n.indexOf(e);if(-1!==s)return i[s];n.push(e),i.push(t)}var c=void 0;if(C(e)){var l=void 0;for(t.length=0,l=0;l<e.length;l++)c=w(e[l],null,n,i,a),r(e[l])&&(n.push(e[l]),i.push(c)),t.push(c)}else{C(t)?t.length=0:g(t,function(e,n){delete t[n]});for(var f in e)if(e.hasOwnProperty(f)){if(O(f,a))continue;c=w(e[f],null,n,i,a),r(e[f])&&(n.push(e[f]),i.push(c)),t[f]=c}}}else t=e,e&&(C(e)?t=w(e,[],n,i,a):u(e)?t=new Date(e.getTime()):o(e)?(t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex):r(e)&&(t=w(e,Object.create(Object.getPrototypeOf(e)),n,i,a)));return t}function j(e,t,n){return""+t.toUpperCase()+n.toLowerCase()}function E(e){return e.replace(R,"").replace(N,j)}function S(e){return e.split(F).map(E).join("")}function P(e){return e=S(e),e?e.charAt(0).toLowerCase()+e.slice(1):e}function M(e,t,n){e=e||this;var r={};t||n||(t=function(){return r},n=function(e){r=e}),Object.defineProperties(e,{on:{value:function(e,r,i){t.call(this)||n.call(this,{});var o=t.call(this);o[e]=o[e]||[],o[e].push({f:r,c:i})}},off:{value:function(e,r){var i=t.call(this),o=i[e];if(o)if(r){for(var a=0;a<o.length;a++)if(o[a].f===r){o.splice(a,1);break}}else o.splice(0,o.length);else n.call(this,{})}},emit:{value:function(){for(var e=t.call(this)||{},n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];var o=r.shift(),a=e[o]||[],u=void 0;for(u=0;u<a.length;u++)a[u].f.apply(a[u].c,r);for(a=e.all||[],r.unshift(o),u=0;u<a.length;u++)a[u].f.apply(a[u].c,r)}}})}Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=r,t.isRegExp=o,t.isString=a,t.isDate=u,t.isNumber=s,t.isBoolean=c,t.isFunction=l,t.isSorN=f,t.get=d,t.unset=h,t.set=p,t.forOwn=g,t.deepMixIn=y,t.resolve=b,t.reject=m,t._=A,t.intersection=x,t.fillIn=k,t.isBlacklisted=O,t.fromJson=_,t.copy=w,t.pascalCase=S,t.camelCase=P,t.eventify=M;var C=t.isArray=Array.isArray,I=/^(.+)\.(.+)$/,F=(t.toJson=JSON.stringify,/\s+/),R=/[^A-Za-z]/g,N=/(\w)(\w*)/g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})};for(var o in r){i(o)}var a=n(6),u=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})};for(var s in a){u(s)}var c=n(7),l=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})};for(var f in c){l(f)}var d=n(8),h=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})};for(var v in d){h(v)}var p=n(9),g=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})};for(var y in p){g(y)}var b=n(11),m=function(e){return"default"===e?"continue":void Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}})};for(var A in b){m(A)}t.DECORATORS="FIXME"},function(e,t,n){"use strict";function r(e,t,n){n||(n={});var r=n.localField=n.localField||t.name.toLowerCase(),o=n.localKey=n.localKey||t.name.toLowerCase()+"_id",a={enumerable:void 0!==n.enumerable?!!n.enumerable:!1,get:function(){if(!this._get("$"))return this._get("links."+r);var e=(0,i.get)(this,o),n=void 0!==e?t.get(e):void 0;return this._set("links."+r,n),n},set:function(e){return this._set("links."+r,e),(0,i.set)(this,o,e[t.idAttribute]),(0,i.get)(this,r)}};return(n.link===!1||void 0===n.link&&!e.linkRelations)&&(delete a.get,delete a.set,a.writable=!0),n.get&&!function(){var r=a.get;a.get=function(){var i=this;return n.get(e,t,this,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(i,t)}:void 0)}}(),n.set&&!function(){var r=a.set;a.set=function(i){var o=this;return n.set(e,t,this,i,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(o,t)}:void 0)}}(),Object.defineProperty(e.prototype,r,a),e.relationList||(e.relationList=[]),e.relationFields||(e.relationFields=[]),n.type="belongsTo",n.name=e.name,n.relation=t.name,n.Relation=t,e.relationList.push(n),e.relationFields.push(r),e.collection.createIndex(o),e}var i=n(3),o="belongsTo";t.belongsTo=function(e,t){return function(n){return n.dbg(o,"Model:",e,"opts:",t),r(n,e,t)}}},function(e,t,n){"use strict";function r(e){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];return e=e||{},function(n){return(0,i.forOwn)(e,function(e,r){(void 0===n[r]||t)&&(n[r]=(0,i.copy)(e))}),n}}Object.defineProperty(t,"__esModule",{value:!0}),t.configure=r;var i=n(3)},function(e,t,n){"use strict";function r(e,t,n){n||(n={});var r=n.localField||(0,o.camelCase)(t.name)+"Collection",i=n.foreignKey,a=n.localKeys,u=n.foreignKeys;i||a||u||(i=n.foreignKey=(0,o.camelCase)(e.name)+"Id"),i&&t.collection.createIndex(i);var s={enumerable:void 0!==n.enumerable?!!n.enumerable:!1,get:function(){if(!this._get("$"))return this._get("links."+r);var n={},s=void 0;if(i)s=t.getAll((0,o.get)(this,e.idAttribute),{index:i});else if(a){var c=(0,o.get)(this,a)||[],l=(0,o.isArray)(c)?c:Object.keys(c);s=t.getAll.apply(t,l)}else u&&((0,o.set)(n,"where."+u+".contains",(0,o.get)(this,e.idAttribute)),s=t.filter(n));return this._set("links."+r,s),s},set:function(n){var s=this;return this._set("links."+r,n),n&&n.length&&!function(){var r=(0,o.get)(s,e.idAttribute);i?n.forEach(function(e){(0,o.set)(e,i,r)}):a?!function(){var e=[];n.forEach(function(n){e.push((0,o.get)(n,t.idAttribute))}),(0,o.set)(s,a,e)}():u&&n.forEach(function(e){var t=(0,o.get)(e,u);t?-1===t.indexOf(r)&&t.push(r):(0,o.set)(e,u,[r])})}(),(0,o.get)(this,r)}};return(n.link===!1||void 0===n.link&&!e.linkRelations)&&(delete s.get,delete s.set,s.writable=!0),n.get&&!function(){var r=s.get;s.get=function(){var i=this;return n.get(e,t,this,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(i,t)}:void 0)}}(),n.set&&!function(){var r=s.set;s.set=function(i){var o=this;return n.set(e,t,this,i,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(o,t)}:void 0)}}(),Object.defineProperty(e.prototype,r,s),e.relationList||(e.relationList=[]),e.relationFields||(e.relationFields=[]),n.type="hasMany",n.name=e.name,n.relation=t.name,n.Relation=t,e.relationList.push(n),e.relationFields.push(r),e}function i(e,t){return function(n){return n.dbg(a,"Model:",e,"opts:",t),r(n,e,t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasMany=i;var o=n(3),a="hasMany"},function(e,t,n){"use strict";function r(e,t,n){n||(n={});var r=n.localField=n.localField||(0,o.camelCase)(t.name),i=n.foreignKey=n.foreignKey||(0,o.camelCase)(e.name)+"Id",a={enumerable:void 0!==n.enumerable?!!n.enumerable:!1,get:function(){if(!this._get("$"))return this._get("links."+r);var n=t.getAll((0,o.get)(this,e.idAttribute),{index:i}),a=n&&n.length?n[0]:void 0;return this._set("links."+r,a),a},set:function(t){return this._set("links."+r,t),(0,o.set)(t,i,(0,o.get)(this,e.idAttribute)),(0,o.get)(this,r)}};return(n.link===!1||void 0===n.link&&!e.linkRelations)&&(delete a.get,delete a.set),n.get&&!function(){var r=a.get;a.get=function(){var i=this;return n.get(e,t,this,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(i,t)}:void 0)}}(),n.set&&!function(){var r=a.set;a.set=function(i){var o=this;return n.set(e,t,this,i,r?function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return r.apply(o,t)}:void 0)}}(),Object.defineProperty(e.prototype,r,a),e.relationList||(e.relationList=[]),e.relationFields||(e.relationFields=[]),n.type="hasOne",n.name=e.name,n.relation=t.name,n.Relation=t,e.relationList.push(n),e.relationFields.push(r),e.collection.createIndex(i),e}function i(e,t){return function(n){return n.dbg(a,"Model:",e,"opts:",t),r(n,e,t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasOne=i;var o=n(3),a="hasOne"},function(e,t,n){"use strict";function r(e,t,n){var r={enumerable:void 0!==n.enumerable?n.enumerable:!0,configurable:void 0!==n.configurable?n.configurable:!0};return r.get=function(){return this._get("props."+t)},r.set=function(r){var i=this,u=this._get,s=this._set,c=this._unset;if(!u("noValidate")){var l=(0,a.validate)(n,r);if(l)throw new Error(l.join(", "))}return n.track&&!u("creating")&&!function(){var e=u("changing"),n=u("previous."+t),a=u("props."+t),l=u("changed");e||(l=[]),a!==r&&l.push(t),n!==r?s("changes."+t,r):c("changes."+t),!e&&l.length&&(s("changed",l),s("changing",!0),s("eventId",setTimeout(function(){c("changed"),c("eventId"),c("changing");var e=void 0;for(e=0;e<l.length;e++)i.emit("change:"+l[e],i,(0,o.get)(i,l[e]));i.emit("change",i,u("changes"))},0)))}(),s("props."+t,r),u("$")&&n.indexed&&e.collection.updateRecord(this,{index:t}),r},n.indexed&&e.createIndex(t),n.get&&(r.get?!function(){var e=r.get;r.get=function(){return n.get.call(this,e)}}():r.get=n.get),n.set&&(r.set?!function(){var e=r.set;r.set=function(t){return n.set.call(this,t,e)}}():r.set=n.set),r}function i(e){return e||(e={}),function(t){return t.dbg(s,"opts:",e),t.schema||(t.schema={}),(0,u.configure)(t.schema,e),(0,o.forOwn)(e,function(e,n){var i=r(t,n,e);i.writable||Object.defineProperty(t.prototype,n,i)}),t}}Object.defineProperty(t,"__esModule",{value:!0}),t.setSchema=i;var o=n(3),a=n(10),u=n(6),s="setSchema"},function(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e,t){var n=[];return(0,o.forOwn)(e,function(e,r){var i=u[r];if(i){var o=i(e,t);o&&n.push(o)}}),n.length?n:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.rules=void 0,t.validate=i;var o=n(3),a={array:o.isArray,boolean:o.isBoolean,integer:o.isNumber,number:o.isNumber,null:function(e){return null===e},object:o.isObject,string:o.isString},u=t.rules={type:function(e,t){if(void 0!==t){(0,o.isString)(e)&&(e=[e]);var n=e.map(function(n){var r=a[n];return r?r(t)?void 0:1:"type: Unknown type "+e});return-1!==n.indexOf(void 0)?void 0:"type: Expected: "+e.join(" or ")+". Actual: "+("undefined"==typeof t?"undefined":r(t))}},anyOf:function(e,t){var n=!1,r=[];return e.forEach(function(e){var o=i(e,t);o?r=r.concat(o):n=!0}),n?void 0:r},allOf:function(e,t){var n=[];return e.forEach(function(e){n=n.concat(i(e,t)||[])}),n.length?void 0:n},oneOf:function(e,t){var n=!1,r=[];return e.forEach(function(e){var o=i(e,t);if(o)r=r.concat(o);else{if(n)return r=["more than one schema validated"],n=!1,!1;n=!0}}),n?void 0:r}}},function(e,t){"use strict";function n(e,t,n){return n||(n={}),n.op=r,function(i){i.dbg(r,"name:",e,"adapter:",t,"opts:",n),i.adapters[e]=t,(n===!0||n.default)&&(i.defaultAdapter=e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.registerAdapter=n;var r="registerAdapter"},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1];if(!(0,i.isArray)(e))throw new Error("fieldList must be an array.");this.fieldList=e,this.idAttribute=t,this.isIndex=!0,this.keys=[],this.values=[]}Object.defineProperty(t,"__esModule",{value:!0}),t.Index=r;var i=n(3),o=n(4),a=n(13);(0,o.configure)({set:function(e,t){(0,i.isArray)(e)||(e=[e]);var n=e.shift()||null,o=(0,a.binarySearch)(this.keys,n);if(0===e.length)if(o.found){var u=(0,a.binarySearch)(this.values[o.index],t,this.idAttribute);u.found||(0,a.insertAt)(this.values[o.index],u.index,t)}else(0,a.insertAt)(this.keys,o.index,n),(0,a.insertAt)(this.values,o.index,[t]);else if(o.found)this.values[o.index].set(e,t);else{(0,a.insertAt)(this.keys,o.index,n);var s=new r([],this.idAttribute);s.set(e,t),(0,a.insertAt)(this.values,o.index,s)}},get:function(e){(0,i.isArray)(e)||(e=[e]);var t=e.shift()||null,n=(0,a.binarySearch)(this.keys,t);return 0===e.length?n.found?this.values[n.index].isIndex?this.values[n.index].getAll():this.values[n.index]:[]:n.found?this.values[n.index].get(e):[]},getAll:function(){var e=[];return this.values.forEach(function(t){e=t.isIndex?e.concat(t.getAll()):e.concat(t)}),e},visitAll:function(e,t){this.values.forEach(function(n){n.isIndex?n.visitAll(e,t):n.forEach(e,t)})},query:function(e){var t=void 0,n=void 0;if(e[">"]?(t=e[">"],e.leftInclusive=!1):e[">="]&&(t=e[">="],e.leftInclusive=!0),e["<"]?(n=e["<"],e.rightInclusive=!1):e["<="]&&(n=e["<="],e.rightInclusive=!0),t.length!==n.length)throw new Error("Key arrays must be same length");return this.between(t,n,(0,i.omit)(e,[">",">=","<","<="]))},between:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];(0,i.isArray)(e)||(e=[e]),(0,i.isArray)(t)||(t=[t]),(0,i.fillIn)(n,{leftInclusive:!0,rightInclusive:!1,limit:void 0,offset:0});var r=this._between(e,t,n);return n.limit?r.slice(n.offset,n.limit+n.offset):r.slice(n.offset)},_between:function(e,t,n){var r=[],o=e.shift(),u=t.shift(),s=void 0;if(s=void 0!==o?(0,a.binarySearch)(this.keys,o):{found:!1,index:0},0===e.length){s.found&&n.leftInclusive===!1&&(s.index+=1);for(var c=s.index;c<this.keys.length;c+=1){if(void 0!==u)if(n.rightInclusive){if(this.keys[c]>u)break}else if(this.keys[c]>=u)break;if(r=this.values[c].isIndex?r.concat(this.values[c].getAll()):r.concat(this.values[c]),n.limit&&r.length>=n.limit+n.offset)break}}else for(var c=s.index;c<this.keys.length;c+=1){var l=this.keys[c];if(l>u)break;if(r=this.values[c].isIndex?l===o?r.concat(this.values[c]._between((0,i.copy)(e),t.map(function(){}),n)):l===u?r.concat(this.values[c]._between(e.map(function(){}),(0,i.copy)(t),n)):r.concat(this.values[c].getAll()):r.concat(this.values[c]),n.limit&&r.length>=n.limit+n.offset)break}return n.limit?r.slice(0,n.limit+n.offset):r},remove:function(e,t){(0,i.isArray)(e)||(e=[e]);var n=e.shift(),r=(0,a.binarySearch)(this.keys,n);if(0===e.length){if(r.found){var o=(0,a.binarySearch)(this.values[r.index],t,this.idAttribute);o.found&&((0,a.removeAt)(this.values[r.index],o.index),0===this.values[r.index].length&&((0,a.removeAt)(this.keys,r.index),(0,a.removeAt)(this.values,r.index)))}}else r.found&&this.values[r.index].delete(e,t)},clear:function(){this.keys=[],this.values=[]},insertRecord:function(e){var t=this.fieldList.map(function(t){return e[t]||null});this.set(t,e)},removeRecord:function(e){var t=this,n=void 0;return this.values.forEach(function(r,i){if(r.isIndex){if(r.removeRecord(e))return 0===r.keys.length&&((0,a.removeAt)(t.keys,i),(0,a.removeAt)(t.values,i)),n=!0,!1}else{var o=(0,a.binarySearch)(r,e,t.idAttribute);if(o.found)return(0,a.removeAt)(r,o.index),0===r.length&&((0,a.removeAt)(t.keys,i),(0,a.removeAt)(t.values,i)),n=!0,!1}}),n?e:void 0},updateRecord:function(e){this.removeRecord(e),this.insertRecord(e)}})(r.prototype)},function(e,t){"use strict";function n(e,t,n){return e===t?0:(n&&(e=e[n],t=t[n]),null===e&&null===t?0:null===e?-1:null===t?1:t>e?-1:e>t?1:0)}function r(e,t,n){return e.splice(t,0,n),e}function i(e,t){return e.splice(t,1),e}function o(e,t,r){for(var i=0,o=e.length,a=void 0,u=void 0;o>i;){if(u=(i+o)/2|0,a=n(t,e[u],r),0===a)return{found:!0,index:u};0>a?o=u:i=u+1}return{found:!1,index:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.sort=n,t.insertAt=r,t.removeAt=i,t.binarySearch=o},function(e,t,n){"use strict";function r(e){e||(e={}),this.definitions={}}Object.defineProperty(t,"__esModule",{value:!0}),t.DS=r;var i=n(4),o=n(3),a=n(15);(0,i.configure)({clear:function(){var e={};return(0,o.forOwn)(this.definitions,function(t){var n=t.name;e[n]=t.ejectAll()}),e},defineModel:function(e){var t=a.Model.extend(e.methods||{},e);return this.definitions[t.name]=t,t}})(r.prototype),r.prototype.defineResource=r.prototype.defineModel,(0,o.forOwn)(a.Model,function(e,t){(0,o.isFunction)(e)&&(r.prototype[t]=function(e){var n;if(!this.definitions[e])throw new Error(e+" is not a registered Model!");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];return(n=this.definitions[e])[t].apply(n,i)})})},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0;var c=n(3),l=r(c),f=n(4),d=n(1),h=n(10),v=r(h),p=l.resolve,g=!1;try{g=!!window}catch(e){}var y=function(e,t,n,r){return n.raw?(t.adapter=r,n.autoInject&&(t.data=e.inject(t.data)),t):(n.autoInject&&(t=e.inject(t)),t)},b=function e(){u(this,e)},m=t.Model=function(e){function t(e,n){u(this,t);var r=o(this,Object.getPrototypeOf(t).call(this));e||(e={}),n||(n={});var i={};return Object.defineProperties(r,{_get:{value:function(e){return l.get(i,e)}},_set:{value:function(e,t,r){return l.set(i,e,t,n)}},_unset:{value:function(e){return l.unset(i,e)}}}),r._set("creating",!0),n.noValidate&&r._set("noValidate",!0),l.fillIn(r,e),r._unset("creating"),r._unset("noValidate"),r._set("previous",l.copy(e)),r}return a(t,e),s(t,[{key:"schema",value:function(e){var t=this.constructor.schema;return e?t[e]:t}},{key:"validate",value:function(e,t){var n=[],r=this.schema();if(e)if(l.isString(e)){var i=r[e];i&&(n=v.validate(i,t)||[])}else l.forOwn(r,function(t,r){n=n.concat(v.validate(t,l.get(e,r))||[])});else e=this;return n.length?n:void 0}},{key:"create",value:function(e){return this.constructor.create(this,e)}},{key:"save",value:function(e){var t=this.constructor,n=t.getAdapterName(e);return t.getAdapter(n).update(t,l.get(this,t.idAttribute),this,e)}},{key:"destroy",value:function(e){var t=this.constructor;return t.destroy(l.get(this,t.idAttribute),e)}},{key:"get",value:function(e){return l.get(this,e)}},{key:"set",value:function(e,t,n){return n||(n={}),l.set(this,e,t)}},{key:"toJSON",value:function(e){var n=this;e||(e={});var r=this.constructor,i=this;return this instanceof t&&(i={},l.set(i,this),r&&r.relationList&&e.with&&(l.isString(e.with)&&(e.with=[e.with]),r.relationList.forEach(function(t){var r=void 0;-1!==e.with.indexOf(t.relation)?r=t.relation:-1!==e.with.indexOf(t.localField)&&(r=t.localField),r&&!function(){var o={with:e.with.slice()};o.with.splice(o.with.indexOf(r),1),o.with.forEach(function(e,t){e&&0===e.indexOf(r)&&e.length>=r.length&&"."===e[r.length]?o.with[t]=e.substr(r.length+1):o.with[t]=""});var a=l.get(n,t.localField);a&&(l.isArray(a)?l.set(i,t.localField,a.map(function(e){return t.Relation.prototype.toJSON.call(e,o)})):l.set(i,t.localField,t.Relation.prototype.toJSON.call(a,o)))}()}))),i}}],[{key:"createIndex",value:function(e,t){this.dbg("createIndex","name:",e,"keyList:",t),this.collection.createIndex(e,t)}},{key:"createInstance",value:function(e){var t=this;return e instanceof t?e:new t(e)}},{key:"is",value:function(e){return e instanceof this}},{key:"inject",value:function(e,t){var n=this,r="inject";n.dbg(r,"item(s):",e,"opts:",t),t||(t={}),t.op=r;var o=!1,a=n.collection,u=n.idAttribute,s=n.relationList||[];return l.isArray(e)||(e=[e],o=!0),e=e.map(function(e){var r=l.get(e,u);if(!l.isSorN(r))throw new TypeError("User#"+u+": Expected string or number, found "+("undefined"==typeof r?"undefined":i(r))+"!");var o=n.get(r);if(e===o)return o;if(s.forEach(function(t){var i=t.Relation,o=i.idAttribute,a=t.foreignKey,s=l.get(e,t.localField);if(l.isFunction(t.inject))t.inject(n,t,e);else if(s&&t.inject!==!1)if(l.isArray(s))s=s.map(function(e){if(e!==i.get(l.get(e,o)))try{a&&l.set(e,a,r),e=i.inject(e)}catch(e){throw new Error("Failed to inject "+t.type+' relation: "'+t.relation+'"! '+e.message)}return e}),t.localKeys&&l.set(e,t.localKeys,s.map(function(e){return l.get(e,o)}));else if(s!==i.get(l.get(s,o)))try{t.localKey&&l.set(e,t.localKey,l.get(s,i.idAttribute)),a&&l.set(s,t.foreignKey,l.get(e,u)),s=i.inject(s)}catch(e){throw new Error("Failed to inject "+t.type+' relation: "'+t.relation+'"!')}t.link||void 0===t.link&&n.linkRelations?l.unset(e,t.localField):l.set(e,t.localField,s)}),o){var c=t.onConflict||n.onConflict;"merge"===c?l.deepMixIn(o,e):"replace"===c&&(l.forOwn(o,function(t,n){n===u||e.hasOwnProperty(n)||delete o[n]}),o.set(e)),e=o,a.update(e)}else e=n.createInstance(e),e._set("$",!0),a.insert(e);return e}),o?e.length?e[0]:void 0:e}},{key:"eject",value:function(e,t){var n="eject";this.dbg(n,"id:",e,"opts:",t),t||(t={}),t.op=n;var r=this.get(e);return r&&(r._unset("$"),this.collection.remove(r)),r}},{key:"ejectAll",value:function(e,t){var n="ejectAll";this.dbg(n,"params:",e,"opts:",t),t||(t={}),t.op=n;var r=this.filter(e),i=this.collection;return r.forEach(function(e){i.remove(e)}),r}},{key:"get",value:function(e){this.dbg("get","id:",e);var t=this.collection.get(e);return t.length?t[0]:void 0}},{key:"between",value:function(){var e;return(e=this.collection).between.apply(e,arguments)}},{key:"getAll",value:function(){var e;return(e=this.collection).getAll.apply(e,arguments)}},{key:"filter",value:function(e){return this.collection.filter(e)}},{
key:"query",value:function(){return this.collection.query()}},{key:"getAdapter",value:function(e){this.dbg("getAdapter","name:",e);var t=this.getAdapterName(e);if(!t)throw new ReferenceError(t+" not found!");return this.adapters[t]}},{key:"getAdapterName",value:function(e){return e||(e={}),l.isString(e)&&(e={adapter:e}),e.adapter||e.defaultAdapter}},{key:"beforeCreate",value:function(){}},{key:"create",value:function(e,t){var n=this,r="create";this.dbg(r,"props:",e,"opts:",t);var i=void 0;return e||(e={}),t||(t={}),l._(this,t),t.op=r,t.upsert&&l.get(e,this.idAttribute)?this.update(l.get(e,this.idAttribute),e,t):p(this.beforeCreate(e,t)).then(function(){return i=n.getAdapterName(t),n.getAdapter(i).create(n,n.prototype.toJSON.call(e,t),t)}).then(function(e){return p(n.afterCreate(e,t)).then(function(){return y(n,e,t,i)})})}},{key:"afterCreate",value:function(){}},{key:"beforeCreateMany",value:function(){}},{key:"createMany",value:function(e,t){var n=this,r="createMany";this.dbg(r,"items:",e,"opts:",t);var o=void 0;if(e||(e=[]),t||(t={}),l._(this,t),t.op=r,t.upsert){var a=function(){var r=!0;return e.forEach(function(e){r=r&&l.get(e,n.idAttribute)}),r?{v:n.updateMany(e,t)}:void 0}();if("object"===("undefined"==typeof a?"undefined":i(a)))return a.v}return p(this.beforeCreateMany(e,t)).then(function(){return o=n.getAdapterName(t),n.getAdapter(o).createMany(n,e.map(function(e){return n.prototype.toJSON.call(e,t)}),t)}).then(function(e){return p(n.afterCreateMany(e,t)).then(function(){return y(n,e,t,o)})})}},{key:"afterCreateMany",value:function(){}},{key:"beforeFind",value:function(){}},{key:"find",value:function(e,t){var n=this,r="find";this.dbg(r,"id:",e,"opts:",t);var i=void 0;return t||(t={}),l._(this,t),t.op=r,p(this.beforeFind(e,t)).then(function(){return i=n.getAdapterName(t),n.getAdapter(i).find(n,e,t)}).then(function(e){return p(n.afterFind(e,t)).then(function(){return y(n,e,t,i)})})}},{key:"afterFind",value:function(){}},{key:"beforeFindAll",value:function(){}},{key:"findAll",value:function(e,t){var n=this,r="findAll";this.dbg(r,"query:",e,"opts:",t);var i=void 0;return e||(e={}),t||(t={}),l._(this,t),t.op=r,p(this.beforeFindAll(e,t)).then(function(){return i=n.getAdapterName(t),n.getAdapter(i).findAll(n,e,t)}).then(function(e){return p(n.afterFindAll(e,t)).then(function(){return y(n,e,t,i)})})}},{key:"afterFindAll",value:function(){}},{key:"beforeUpdate",value:function(){}},{key:"update",value:function(e,t,n){var r=this,i="update";this.dbg(i,"id:",e,"props:",t,"opts:",n);var o=void 0;return t||(t={}),n||(n={}),l._(this,n),n.op=i,p(this.beforeUpdate(e,t,n)).then(function(){return o=r.getAdapterName(n),r.getAdapter(o).update(r,e,r.prototype.toJSON.call(t,n),n)}).then(function(t){return p(r.afterUpdate(e,t,n)).then(function(){return y(r,t,n,o)})})}},{key:"afterUpdate",value:function(){}},{key:"beforeUpdateMany",value:function(){}},{key:"updateMany",value:function(e,t){var n=this,r="updateMany";this.dbg(r,"items:",e,"opts:",t);var i=void 0;return e||(e=[]),t||(t={}),l._(this,t),t.op=r,p(this.beforeUpdateMany(e,t)).then(function(){return i=n.getAdapterName(t),n.getAdapter(i).updateMany(n,e.map(function(e){return n.prototype.toJSON.call(e,t)}),t)}).then(function(e){return p(n.afterUpdateMany(e,t)).then(function(){return y(n,e,t,i)})})}},{key:"afterUpdateMany",value:function(){}},{key:"beforeUpdateAll",value:function(){}},{key:"updateAll",value:function(e,t,n){var r=this,i="updateAll";this.dbg(i,"query:",e,"props:",t,"opts:",n);var o=void 0;return e||(e={}),t||(t={}),n||(n={}),l._(this,n),n.op=i,p(this.beforeUpdateAll(e,t,n)).then(function(){return o=r.getAdapterName(n),r.getAdapter(o).updateAll(r,e,t,n)}).then(function(t){return p(r.afterUpdateAll(e,t,n)).then(function(){return y(r,t,n,o)})})}},{key:"afterUpdateAll",value:function(){}},{key:"beforeDestroy",value:function(){}},{key:"destroy",value:function(e,t){var n=this,r="destroy";this.dbg(r,"id:",e,"opts:",t);var i=void 0;return t||(t={}),l._(this,t),t.op=r,p(this.beforeDestroy(e,t)).then(function(){return i=n.getAdapterName(t),n.getAdapter(i).destroy(n,e,t)}).then(function(r){return p(n.afterDestroy(e,t)).then(function(){return t.raw?(r.adapter=i,t.autoEject&&(r.data=n.eject(e,t)),r):(t.autoEject&&(r=n.eject(e,t)),r)})})}},{key:"afterDestroy",value:function(){}},{key:"beforeDestroyAll",value:function(){}},{key:"destroyAll",value:function(e,t){var n=this,r="destroyAll";this.dbg(r,"query:",e,"opts:",t);var i=void 0;return e||(e={}),t||(t={}),l._(this,t),t.op=r,p(this.beforeDestroyAll(e,t)).then(function(){return i=n.getAdapterName(t),n.getAdapter(i).destroyAll(n,e,t)}).then(function(r){return p(n.afterDestroyAll(e,t)).then(function(){return t.raw?(r.adapter=i,t.autoEject&&(r.data=n.ejectAll(e,t)),r):(t.autoEject&&(r=n.ejectAll(e,t)),r)})})}},{key:"afterDestroyAll",value:function(){}},{key:"log",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];if(e&&!n.length&&(n.push(e),e="debug"),"debug"!==e||this.debug){var i=e.toUpperCase()+": ("+this.name+")";if(console[e]){var o;(o=console)[e].apply(o,[i].concat(n))}else{var a;(a=console).log.apply(a,[i].concat(n))}}}},{key:"dbg",value:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];this.log.apply(this,["debug"].concat(t))}},{key:"belongsTo",value:function(e,t){return(0,f.belongsTo)(e,t)(this)}},{key:"hasMany",value:function(e,t){return(0,f.hasMany)(e,t)(this)}},{key:"hasOne",value:function(e,t){return(0,f.hasOne)(e,t)(this)}},{key:"setSchema",value:function(e){return(0,f.setSchema)(e)(this)}},{key:"configure",value:function(e){return(0,f.configure)(e)(this)}},{key:"registerAdapter",value:function(e,t,n){return(0,f.registerAdapter)(e,t,n)(this)}},{key:"extend",value:function(e,t){var n=this,r=void 0;n.dbg("extend","props:",e,"classProps:",t),e||(e={}),t||(t={});var s=e.initialize;if(delete e.initialize,e.hasOwnProperty("constructor"))r=e.constructor,delete e.constructor;else{if(!t.name)throw new TypeError("name: Expected string, found "+i(t.name)+"!");if(t.csp)r=function(){u(this,r);for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var i=o(this,Object.getPrototypeOf(r).apply(this,t));return s&&s.apply(this,t),i};else{var c=l.pascalCase(t.name),d="return function "+c+"() {\n _classCallCheck(this, "+c+")\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf("+c+").apply(this, arguments));\n if (initialize) {\n initialize.apply(this, arguments)\n }\n return _this\n }";r=new Function("_classCallCheck","_possibleConstructorReturn","Parent","initialize",d)(u,o,n,s)}}t.shortname=t.shortname||l.camelCase(r.name||t.name),delete t.name;var h=t.schema;return delete t.schema,a(r,n),(0,f.configure)(e)(r.prototype),(0,f.configure)(t)(r),h&&(0,f.setSchema)(h)(r),r}}]),t}(b);m.__events={},Object.defineProperty(m,"_events",{get:function(){return this.__events===Object.getPrototypeOf(this).__events&&(this.__events={}),this.__events}}),m._adapters={},Object.defineProperty(m,"adapters",{get:function(){var e=Object.getPrototypeOf(this)._adapters;return this._adapters===e&&(this._adapters={},l.fillIn(this._adapters,e)),this._adapters}}),m._collection=new d.Collection([],"id"),Object.defineProperty(m,"collection",{get:function(){return this._collection===Object.getPrototypeOf(this)._collection&&(this._collection=new d.Collection([],this.idAttribute),this._collection.on("all",this.emit,this)),this._collection}}),m.autoEject=!0,m.autoInject=g,m.bypassCache=!1,m.csp=!1,m.defaultAdapter="http",m.debug=!1,m.eagerEject=!1,m.idAttribute="id",m.linkRelations=g,m.onConflict="merge",m.relationsEnumerable=!1,m.raw=!1,m.upsert=!0,l.eventify(m,function(){return this._events},function(e){this._events=e}),l.eventify(m.prototype,function(){return this._get("events")},function(e){this._set("events",e)})}])});
//# sourceMappingURL=dist/js-data.min.map
{
"name": "js-data",
"description": "Robust, framework-agnostic in-memory data store.",
"version": "3.0.0-alpha.1",
"version": "3.0.0-alpha.2",
"homepage": "http://www.js-data.io",

@@ -43,2 +43,3 @@ "repository": {

"scripts": {
"doc": "jsdoc -c conf.json src",
"lint": "standard src/**/*.js test/**/*.js",

@@ -61,7 +62,7 @@ "webpack": "webpack --config webpack.config.js",

"devDependencies": {
"babel-core": "6.3.17",
"babel-core": "6.3.21",
"babel-eslint": "4.1.6",
"babel-loader": "6.2.0",
"babel-plugin-syntax-async-functions": "6.3.13",
"babel-plugin-transform-regenerator": "6.3.13",
"babel-plugin-transform-regenerator": "6.3.18",
"babel-polyfill": "6.3.14",

@@ -73,3 +74,5 @@ "babel-preset-es2015": "6.3.13",

"coveralls": "2.11.6",
"ink-docstrap": "1.1.0",
"istanbul": "0.4.1",
"jsdoc": "3.4.0",
"mocha": "2.3.4",

@@ -76,0 +79,0 @@ "sinon": "1.17.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc